Skip to content

Commit

Permalink
Merge pull request #9668 from tusbar/support-pnpm-lockfile-9
Browse files Browse the repository at this point in the history
Use pnpm@9 for lockfile >= 9.0
  • Loading branch information
thavaahariharangit authored May 6, 2024
2 parents d38e419 + 176339f commit bb0fe65
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 1 deletion.
4 changes: 3 additions & 1 deletion npm_and_yarn/lib/dependabot/npm_and_yarn/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def self.yarn_version_numeric(yarn_lock)

sig { params(pnpm_lock: DependencyFile).returns(Integer) }
def self.pnpm_version_numeric(pnpm_lock)
if pnpm_lockfile_version(pnpm_lock).to_f >= 6.0
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@
expect(dependencies.map(&:name)).to include("@sentry/react")
end
end

context "in v9.0 format" do
let(:dependency_files) { project_dependency_files("pnpm/9_0_format") }

it "parses dependencies properly" do
expect(dependencies.map(&:name)).to include("@sentry/node")
end
end
end

context "for npm lockfiles" do
Expand Down
92 changes: 92 additions & 0 deletions npm_and_yarn/spec/fixtures/projects/pnpm/9_0_format/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb0fe65

Please sign in to comment.