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

Update node modules PR check with fixed npm version #1357

Closed
wants to merge 5 commits into from

Conversation

angelapwen
Copy link
Contributor

@angelapwen angelapwen commented Nov 10, 2022

We used to always use the latest version of npm in this PR check, but the most recent version of npm would create a different package-lock.json file that causes the PR check to fail. We are unable to update this package-lock.json file because it would not be backwards compatible, so instead we are pinning the PR check to version 8.19.2.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@angelapwen angelapwen mentioned this pull request Nov 10, 2022
3 tasks
@angelapwen angelapwen changed the title Add node setup step to Check node modules PR check Update node modules with new npm version Nov 10, 2022
@angelapwen angelapwen changed the title Update node modules with new npm version Update node modules PR check with fixed npm version Nov 10, 2022
@angelapwen angelapwen marked this pull request as ready for review November 11, 2022 00:00
@angelapwen angelapwen requested a review from a team as a code owner November 11, 2022 00:00
@@ -15,7 +15,7 @@ npm run removeNPMAbsolutePaths
# Check that repo is still clean
if [ ! -z "$(git status --porcelain)" ]; then
# If we get a fail here then the PR needs attention
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci && npm run removeNPMAbsolutePaths' on a macOS machine to update. Note it is important this command is run on macOS and not any other operating system as there is one dependency (fsevents) that is needed for macOS and may not be installed if the command is run on a Windows or Linux machine."
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci && npm run removeNPMAbsolutePaths' on a macOS machine to update and commit. Note it is important this command is run on macOS and not any other operating system as there is one dependency (fsevents) that is needed for macOS and may not be installed if the command is run on a Windows or Linux machine. If there are no changes, run 'npm install --force -g npm@latest' with root permissions first."
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to pin to v8.19.2? I don't think we can move to package-lock v3 while we also need to support node v12.

Copy link
Contributor

Choose a reason for hiding this comment

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

The latest v8 release (8.19.3) of npm is compatible with Node 12. I think package-lock v3 should be compatible with Node 12 since the package-lock is only consumed by npm

@angelapwen
Copy link
Contributor Author

Closing as this PR check was fixed in #1348

@angelapwen angelapwen closed this Nov 14, 2022
@angelapwen angelapwen deleted the fix-node-modules-check branch November 14, 2022 17:47
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.

3 participants