Skip to content

Conversation

@MikeMcC399
Copy link
Contributor

Additional details

  1. Update the npm module mime to mime@4.0.4 in:
  1. 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
yarn
yarn workspace @packages/server check-ts

How has the user experience changed?

No change to user experience.

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@jennifer-shehane
Copy link
Member

@MikeMcC399 Some failures. Ran some more of the tests.

@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

yarn test-unit --scope @packages/server

Also fails locally with

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/mike/github/cypress-io/cypress/packages/server/test/unit/automation/util_spec.ts

@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

The CI tests have highlighted that the upgrade needs significant work, so I would propose to close it. Sorry for the false start! I probably need to hand over to somebody else.

The CHANGELOG shows "drop CJS support, switch to TS" in mime@4.0.0 and mime > README states "Built-in Typescript types (@types/mime no longer needed)".

@MikeMcC399 MikeMcC399 marked this pull request as draft August 30, 2024 15:39
@MikeMcC399
Copy link
Contributor Author

mime is being used in JavaScript CommonJS modules

It would be out of scope to convert these modules to ESM and TypeScript as part of this PR. mime@4.0.0 has however dropped CJS support.

@MikeMcC399 MikeMcC399 closed this Aug 30, 2024
@MikeMcC399 MikeMcC399 deleted the issue-30144-mime-to-4.0.4 branch August 30, 2024 16:27
@jennifer-shehane
Copy link
Member

Oof. Thanks for looking into it.

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