-
Notifications
You must be signed in to change notification settings - Fork 3.4k
dependency: update mime from 3.0.0 to 4.1.0 #32936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dependency: update mime from 3.0.0 to 4.1.0 #32936
Conversation
Remove deprecated @types/mime - no longer needed with mime v4
|
|
There are some hard errors in this PR. The
According to RFC 9239 from May 2022, |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Changed test Running the following locally now passes: yarn workspace @packages/driver cypress:run --spec cypress/e2e/commands/actions/selectFile.cy.ts |
|
@MikeMcC399 CI won't trigger if the PR is in draft - and moving it out of draft does not trigger CI (probably some way we could automate this), so you'll want to do an empty commit after you move it out of draft to have CI run again. |
This comment was marked as outdated.
This comment was marked as outdated.
| expect($input.files?.[1].name).to.eq('app.js') | ||
| expect($input.files?.[0].type).to.eq('application/json') | ||
| expect($input.files?.[1].type).to.eq('application/javascript') | ||
| expect($input.files?.[1].type).to.eq('text/javascript') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legacy JavaScript MIME type.
According to RFC 9239 from May 2022,
application/javascriptis an obsolete alias oftext/javascript.
This comment was marked as outdated.
This comment was marked as outdated.
|
@MikeMcC399 Just very unlucky on your PRs lately 😄 |
Not just me affected! It was even on the local radio this afternoon. Once again the Internet has failed in a big way with https://downdetector.com/ painting a big picture of failures. |
|
Starting to wonder if this update is breaking these Studio tests 🤔 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Let's try again today! So many outages yesterday 🤦🏻♀️ |
Perseverance and patience was rewarded. The errors from yesterday have disappeared into thin air! 😄 |
|
The current status is:
What is happening with the expected checks? I don't see anything queued on https://app.circleci.com/pipelines/github/cypress-io/cypress/77260. Are these missing from PRs submitted from contributor forks, or is something else going wrong? |
|
@MikeMcC399 Yah, we updated the flow in CircleCI so those jobs never run for contributor PRs because they require secret keys, so we need different status checks for contributor PRs vs team PRs. I haven't looked into if there's a way to do that. It's perfect though - all green on the first run! |
| "md5": "2.3.0", | ||
| "memfs": "3.5.3", | ||
| "mime": "^3.0.0", | ||
| "mime": "^4.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeMcC399 it looks like mime 4+ requires esm support https://github.com/broofa/mime?tab=readme-ov-file#mime. This is fine for the driver because everything gets bundled, but won't work for the server since we can't require it correctly in the ts-node context for our unit tests. https://app.circleci.com/pipelines/github/cypress-io/cypress/77276/workflows/97832e74-5300-4e6a-867e-e5590af97ae1/jobs/3311239 looks like its trying to use the esm loader. It likely works in the server in the binary itself because we use tsx to load the runtime to get bidirectional support https://tsx.is/#seamless-cjs-%E2%86%94-esm-imports.
unfortunately I'm going to have to revert this until we are in a better place with ESM support in the server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/broofa/mime/blob/main/CHANGELOG.md confirms that [email protected] dropped CJS support.
I did mention that in the issue #30144
Sorry if this update is causing an issue. The CI results looked perfect, so I didn't suspect any issue here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and unfortunately exactly the test which is failing is not carried out for PR contributions from forks, so it wasn't apparent when the PR was merged.
Possibly there is a need to re-route contributor PRs to a feature branch first and then from there do a separate PR under the ownership of a Cypress.io member?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeMcC399 Yah that was the problem, a subset of tests dont run on contributor PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeMcC399 no worries the ESM only support felt hidden to me and I didn't notice it the first time around. This wont be the first or last time this happens while we transition to more ECMAScript friendly code.
This reverts commit a267d31.
This reverts commit a267d31.
|
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
mimecurrent version 4.x #30144Additional details
In the directories:
mime@^3.0.0to mime@^4.1.0 (currentlatest).The npm module @types/mime is deprecated and shows the message:
Steps to test
In separate terminal window:
In
cypressterminal window:How has the user experience changed?
No change expected to user experience.
PR Tasks
cypress-documentation?type definitions?Note
Upgrades
mimeto 4.1.0 across packages, removes@types/mime, updates tests to new JS MIME type, and adds changelog entry.mimefrom^3.0.0to^4.1.0inpackages/driver/package.json,packages/net-stubbing/package.json, andpackages/server/package.json.@types/mimefrom devDependencies where present.yarn.lockto resolve[email protected]..jsfiles fromapplication/javascripttotext/javascriptinpackages/driver/cypress/e2e/commands/actions/selectFile.cy.ts.mimeupgrade incli/CHANGELOG.md.Written by Cursor Bugbot for commit 47475c3. This will update automatically on new commits. Configure here.