-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve support for PNPM 9 #9687
Conversation
@robaiken it seems that the corepack version is always the version getting used and the |
else | ||
6 | ||
pnpm_version.to_i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes that the lockfile version will always match the pnpm version.
It is unsafe and probably wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but that's the current state of things, right? This is a better version of what is currently already "unsafe and probably wrong", right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's unsafe or wrong with this exactly ?
if pnpm_lockfile_version(pnpm_lock).to_f >= 9.0
9
elsif pnpm_lockfile_version(pnpm_lock).to_f >= 6.0
8
elsif pnpm_lockfile_version(pnpm_lock).to_f >= 5.4
7
else
6
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's unsafe or wrong with this exactly ?
- Given
pnpm_lockfile_version(pnpm_lock).to_f == 10
, then it will use version9
- Given
pnpm_lockfile_version(pnpm_lock).to_f == 42
, then it will use version9
- Given
pnpm_lockfile_version(pnpm_lock).to_f == 8576309
, then it will use version9
Invert the logic, and you can future proof it. It makes no sense to constrain it the way it is.
@robaiken hello, can this get more attention please? pnpm support has been broken for almost a month now. |
npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/pnpm_lockfile_updater.rb
Outdated
Show resolved
Hide resolved
expect(lockfile.content).to include("/lodash@1.3.1:") | ||
expect(lockfile.content).to include("/lodash").once | ||
expect(lockfile.content).to include("lodash@1.3.1:") | ||
expect(lockfile.content).to include("lodash").exactly(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's causing the lockfile to contain this dep 5 times in this new version?
b01128d
to
e9ac160
Compare
this has been replaced by: #10073 |
No description provided.