Skip to content
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

Cypress forcing install of @types/node to specific version (18.17.5) #28473

Closed
joshkaplan opened this issue Dec 6, 2023 · 2 comments · Fixed by #28475
Closed

Cypress forcing install of @types/node to specific version (18.17.5) #28473

joshkaplan opened this issue Dec 6, 2023 · 2 comments · Fixed by #28475
Labels
type: typings Issue related to Cypress types (for TypeScript)

Comments

@joshkaplan
Copy link

Current behavior

Cypress is currently being shipped with a dependency on @types/node^18.17.5 (not a devDependency).

However, Cypress lists engine compatibility with 16, 18, or 20.

The most recent change came from #27715 and shipped in cypress v13.2. The changelog explicitly states:

This does NOT have an impact on the node version you are using with Cypress and is merely an internal update

So, I think Cypress should not be forcing users to install such a strict version of these types, if at all.

(On our end, this is causing some issues with our builds + package deduplication.)

Desired behavior

Don't force such a specific version of @types/node.

Some possible implementations:

  1. Don't have the distribution depend on @types/node at all (it's listed as a devDependency in package.json, so not sure why it's making it into the distribution)
  2. Have the dependency be "@types/node": "*" (this is pretty common; it's how ~90% of our current packages handle it)
  3. Have the dependency be ^16.0.0 || ^18.0.0 || >=20.0.0 to match engine compatibliity
  4. If there's some reason it needs to be a non-dev dependency, and needs to be 18, at least loosen to ^18.0.0

Test code to reproduce

n/a

Cypress Version

13.16.1

Node version

18.16

Operating System

all

Debug Logs

No response

Other

No response

@sharmilajesupaul
Copy link
Contributor

sharmilajesupaul commented Dec 6, 2023

Another thing to callout --
It looks like the this repo's CI build uses a different version of node than the specified @types/node package:

- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
(18.15.0 vs 18.17.5 which is what is defined in dependencies)

So it would be great to at least correct this for this repository's infrastructure too!

@jennifer-shehane jennifer-shehane added the type: typings Issue related to Cypress types (for TypeScript) label Dec 8, 2023
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 17, 2024

Released in 13.6.3.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.6.3, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: typings Issue related to Cypress types (for TypeScript)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants