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

fix(npm): use lockfileVersion from npm-shrinkwrap #26726

Merged
merged 1 commit into from Jan 19, 2024

Conversation

fastman
Copy link
Contributor

@fastman fastman commented Jan 18, 2024

Changes

Read lockfileVersion from npm-shrinkwrap.json file in case of package-lock.json missing.

Context

In case of npm-shrinkwrap.json file is used and Node.js engine set in package.json (with the version like >= 10.x) where npm version may be different than the one detected vs used to create npm-shrinkwrap.json, check the lockfileVersion and use proper npm version.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Jan 18, 2024

CLA assistant check
All committers have signed the CLA.

@fastman fastman force-pushed the fix/25817-npm-shrinkwrap-version branch from d0dc3e4 to 225cee8 Compare January 18, 2024 13:52
@rarkins rarkins changed the title fix(npm): use lockfileVersion from npm-shrinkwrap to determine npm ve… fix(npm): use lockfileVersion from npm-shrinkwrap Jan 18, 2024
@fastman fastman force-pushed the fix/25817-npm-shrinkwrap-version branch 3 times, most recently from 01f37b4 to 98d69cf Compare January 18, 2024 14:34
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

This won't work if the lock file is in a subdirectory

Copy link
Member

@viceice viceice 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 to me

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

We should already know which lock file type is in use and not need to guess / try-catch-try

@fastman fastman force-pushed the fix/25817-npm-shrinkwrap-version branch from 98d69cf to 6ed3bdf Compare January 19, 2024 08:58
@fastman fastman force-pushed the fix/25817-npm-shrinkwrap-version branch 3 times, most recently from 2619020 to da90176 Compare January 19, 2024 12:23
rarkins
rarkins previously approved these changes Jan 19, 2024
auto-merge was automatically disabled January 19, 2024 12:25

Head branch was pushed to by a user without write access

@fastman fastman force-pushed the fix/25817-npm-shrinkwrap-version branch from da90176 to fac6938 Compare January 19, 2024 12:25
@rarkins rarkins added this pull request to the merge queue Jan 19, 2024
Merged via the queue into renovatebot:main with commit 5fdf4fc Jan 19, 2024
38 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.140.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

zT-1337 pushed a commit to scm-manager/renovate that referenced this pull request Jan 22, 2024
zT-1337 pushed a commit to scm-manager/renovate that referenced this pull request Jan 24, 2024
zT-1337 pushed a commit to scm-manager/renovate that referenced this pull request Jan 24, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants