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

[ANE-1166] Support lock-file v6 for pnpm #1320

Merged
merged 7 commits into from
Nov 15, 2023
Merged

Conversation

meghfossa
Copy link
Contributor

@meghfossa meghfossa commented Nov 8, 2023

Overview

This PR,

  • Adds support for pnpm lock-file: 6.0, which is default format with pnpm 8.x.

Sibling PR: fossas/example-projects#10

Acceptance criteria

As a user,

  • I can analyze pnpm project using lock-file, with6.0
  • I can analyze pnpm workspace project using lock-file, with6.0

Testing plan

I added automated tests.

  • You can also test by performing fossa analyze -o against any pnpm project using 8.x

For example,

# Make fossa-cli
git pull origin && git checkout feat/pnpm-lock-v6 && make install-dev

# Get cases
cd ..
git clone -b feat/adds-pnpm-v6 git clone https://github.com/fossas/example-projects

# Analyze
fossa-dev analyze ./example-projects/javascript/pnpm-v6/ -o | jq
fossa-dev analyze ./example-projects/javascript/pnpm-v6-workspace/ -o | jq

Let's take popular project:

git clone https://github.com/vitejs/vite.git --depth 0
cd viite && fossa-dev analyze -o --only-target pnpm@./

There is also example: https://fossa.atlassian.net/browse/ANE-1166

Risks

N/A

Metrics

N/A

References

https://fossa.atlassian.net/browse/ANE-1166

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an # Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).
  • If I made changes to a subcommand's options, I updated docs/references/subcommands/<subcommand>.md.

@meghfossa meghfossa changed the title Feat/pnpm lock v6 [ANE-1166] Support lock-file v6 for pnpm Nov 8, 2023
@meghfossa meghfossa marked this pull request as ready for review November 8, 2023 05:35
@meghfossa meghfossa requested a review from a team as a code owner November 8, 2023 05:35
Copy link
Member

@jssblck jssblck left a comment

Choose a reason for hiding this comment

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

The v4/v7 handling is the only hard blocker here unless there's good reason for it working the way it does (or I'm misunderstanding).

src/Strategy/Node/Pnpm/PnpmLock.hs Outdated Show resolved Hide resolved
src/Strategy/Node/Pnpm/PnpmLock.hs Show resolved Hide resolved
src/Strategy/Node/Pnpm/PnpmLock.hs Outdated Show resolved Hide resolved
src/Strategy/Node/Pnpm/PnpmLock.hs Outdated Show resolved Hide resolved
src/Strategy/Node/Pnpm/PnpmLock.hs Outdated Show resolved Hide resolved
@meghfossa meghfossa merged commit e26f21e into master Nov 15, 2023
16 of 17 checks passed
@meghfossa meghfossa deleted the feat/pnpm-lock-v6 branch November 15, 2023 21:11
meghfossa added a commit that referenced this pull request Nov 16, 2023
This pull request was closed.
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.

2 participants