Skip to content

Conversation

@MikeMcC399
Copy link
Contributor

@MikeMcC399 MikeMcC399 commented Nov 12, 2025

Additional details

In the directories:

  1. update the npm module mime from mime@^3.0.0 to mime@^4.1.0 (current latest).
  2. remove the use of the deprecated npm module @types/mime.

The npm module @types/mime is deprecated and shows the message:

This is a stub types definition. mime provides its own type definitions, so you do not need this installed.

Steps to test

git clean -xfd
n auto
yarn
yarn workspace @packages/driver check-ts
yarn workspace @packages/net-stubbing check-ts
yarn workspace @packages/server check-ts

In separate terminal window:

cd .. # to cypress-io directory
git clone https://github.com/cypress-io/cypress-example-kitchensink
cd cypress-example-kitchensink
npm ci
npm start

In cypress terminal window:

yarn cypress:run --project ../cypress-example-kitchensink

How has the user experience changed?

No change expected to user experience.

PR Tasks


Note

Upgrades mime to 4.1.0 across packages, removes @types/mime, updates a test to expect text/javascript for .js files, and notes the change in the changelog.

  • Dependencies:
    • Upgrade mime to ^4.1.0 in packages/driver, packages/net-stubbing, and packages/server.
    • Remove deprecated @types/mime references.
  • Tests:
    • Update packages/driver/cypress/e2e/commands/actions/selectFile.cy.ts to expect text/javascript for .js files.
  • Changelog:
    • Add 15.6.1 entry noting the mime upgrade.

Written by Cursor Bugbot for commit 25b5b2d. This will update automatically on new commits. Configure here.

Remove deprecated @types/mime - no longer needed with mime v4
@cypress-app-bot
Copy link
Collaborator

@jennifer-shehane jennifer-shehane self-requested a review November 12, 2025 18:32
@MikeMcC399 MikeMcC399 marked this pull request as draft November 13, 2025 11:40
@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

There are some hard errors in this PR.

The driver-integrations-tests-* like the following show a common issue:

In https://app.circleci.com/pipelines/github/cypress-io/cypress/77013/workflows/d738ac62-dac8-42d3-9cae-20445449f5c4/jobs/3295755

  1. src/cy/commands/actions/selectFile
    #selectFile
    shorthands
    works with passed in paths:

    AssertionError: expected 'text/javascript' to equal 'application/javascript'

    • expected - actual

    -'text/javascript'
    +'application/javascript'

According to RFC 9239 from May 2022, application/javascript is an obsolete alias of text/javascript.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Contributor Author

Changed test packages/driver/cypress/e2e/commands/actions/selectFile.cy.ts to check for text/javascript instead of checking for the obsolete and deprecated mime-typ application/javascript.

Running the following locally now passes:

yarn workspace @packages/driver cypress:run --spec cypress/e2e/commands/actions/selectFile.cy.ts

@MikeMcC399 MikeMcC399 marked this pull request as ready for review November 13, 2025 15:51
@jennifer-shehane
Copy link
Member

@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.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Nov 13, 2025

@jennifer-shehane

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.

Thanks for the reminder about draft status! I knew about that and forgot about it!

Since you've done a merge into the PR in the meantime, that has also triggered a CI run. It looks like this is waiting for your approval to continue running the rest of the tests now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to mime current version 4.x

3 participants