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

package.json engines lists Node.js 14 in end-of-life status #687

Closed
MikeMcC399 opened this issue Jun 7, 2023 · 5 comments · Fixed by #727
Closed

package.json engines lists Node.js 14 in end-of-life status #687

MikeMcC399 opened this issue Jun 7, 2023 · 5 comments · Fixed by #727
Labels
E2E released triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jun 7, 2023

Node.js 14 is still listed in package.json although it entered end-of-life on April 30, 2023.

currently lists

  "engines": {
    "node": "^14.0.0 || ^16.0.0 || >=18.0.0"
  }

as supported Node.js versions. This is no longer in line with the Node.js release schedule:

  • Node.js 14 passed into end-of-life status on Apr 30, 2023
  • Node.js 19 passed into end-of-life status on Jun 1, 2023
  • Node.js 20 was released on Apr 18, 2023

(in addition

  • Node.js 16 is planned to transition into end-of-life status on Sep 11, 2023)

Currently:

  • package-lock.json uses "lockfileVersion": 2 which produces a warning when npm install is used with Node.js 14. If npm ci is used, no warning is issued regarding the lockfileVersion.

  • .node-version already specifies Node.js 18 as the compatible version for this repository.

Suggestion

To reflect the official Node.js release schedule update the engines section to:

  "engines": {
    "node": "^16.0.0 || ^18.0.0 || >=20.0.0"
  }

Yarn strictly enforces engine constraints. npm produces warnings by default if engine constraints are not met.

Changes to the engines definition need to be declared as a BREAKING CHANGE meaning that a new major version number would be created at release time.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jun 7, 2023

The main Cypress repo cypress-io/cypress uses Yarn and in the default develop branch it specifies:

  "engines": {
    "node": ">=16.16.0",
    "yarn": ">=1.17.3"
  },

so updating this repo should not cause a problem for building Cypress.

cypress-io/cypress/blob/develop/cli/package.json however specifies:

  "engines": {
    "node": "^14.0.0 || ^16.0.0 || >=18.0.0"
  },

which affects the released npm package cypress so I suggest delaying changes in the cypress-io/cypress-example-kitchensink until the engines definition of Cypress has been updated to a minimum Node.js 16 version.

@nagash77 nagash77 added triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. E2E labels Jun 7, 2023
@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jul 26, 2023

@nagash77

Are there any plans to update engines for the Cypress 13.x release to drop Node.js 14 and explicitly add Node.js 20 (implicitly dropping Node.js 19)?

I can't see any change so far to engines in
https://github.com/cypress-io/cypress/blob/release/13.0.0/cli/package.json

https://github.com/cypress-io/cypress/blob/fb68512bfaa7d64a7308e16f5df1e88e49119ec3/cli/package.json#L125-L127 shows

  "engines": {
    "node": "^14.0.0 || ^16.0.0 || >=18.0.0"
  },

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399

This comment was marked as outdated.

@cypress-app-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E released triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants