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

Increase NPM version requirement and regenerate package lockfiles #287

Merged
merged 6 commits into from
Sep 1, 2022

Conversation

mattheu
Copy link
Member

@mattheu mattheu commented Jul 28, 2022

@tfrommen
Copy link
Contributor

tfrommen commented Jul 28, 2022

The issue I am (still) seeing with this is that people locally can use npm 6, and Node 12 or so. And everything is fine. Until they install or update a dependency, in which case they would generate a v1 lockfile, and again produce a massive change.

In the other PR, I said:

if we decided to do require a modern verison of npm, I'd do this outside of this very PR.

By that, I did not mean to just use npm 7+ and push a v2 lockfile, but actually state that the coding standards (i.e., the ESLint and stylelint configs) require npm and Node in a specific version. Since we do not really require any specific version, but want people not to "downgrade" the lockfile, this should do:

  "engines" : { 
    "npm" : ">=7.0.0",
    "node" : ">=15.0.0"
  }

@mattheu
Copy link
Member Author

mattheu commented Jul 28, 2022

But my understanding is we need this to run on node 12 and npm 6 (as is the current requirement of the Altis build pipeline unless it has changed since Feb. If so I don’t think we can set the engine above that, which could still cause generation of v1 lock files.

@tfrommen
Copy link
Contributor

But my understanding is we need this to run on node 12 and npm 6 (as is the current requirement of the Altis build pipeline

Node 12 is what the build pipeline currently has installed, yes. But that is not a requirement in terms of "you cannot use anything newer". I know of projects that are using Node 14, and I think some are looking to use 16 or even Node 18.

@mattheu
Copy link
Member Author

mattheu commented Jul 29, 2022

@tfrommen I've updated this to add the following.

  • Specify requirement for Node 16 and npm 7. (I skipped node 15 as you suggested as 16 is the current LTS)
  • Add documentation on using this in Altis build script.
  • Remove the Travis CI tests for Node 10, 12 and 14. Replace with 16 and 18.

Copy link
Contributor

@tfrommen tfrommen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mattheu mattheu changed the title Regenerate package lockfiles Increase NPM version requirement and regenerate package lockfiles Aug 3, 2022
Copy link
Member

@ntwb ntwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @mattheu

@ntwb ntwb merged commit 34cd2de into master Sep 1, 2022
@ntwb ntwb deleted the regenerate-package-lockfiles branch September 1, 2022 02:50
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.

None yet

3 participants