-
Notifications
You must be signed in to change notification settings - Fork 28
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
[🐛] yarn 2 lock file parsing issues #56
Labels
Comments
It seems that the "equivelnt" package for yarn 2 is @yarnpkg/parsers and the usage is: const parsers = require('@yarnpkg/parsers');
parsers.parseSyml(file); But it seems that the output is different than what you are expecting |
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
5 tasks
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 14, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 20, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 22, 2020
regevbr
added a commit
to regevbr/nodejs-lockfile-parser
that referenced
this issue
Apr 23, 2020
This was referenced May 18, 2020
Merged
dkontorovskyy
added a commit
that referenced
this issue
Jun 24, 2020
feat: add support for yarn 2 lock files #56
Was released in #75 (comment) |
Functionality is available in Snyk CLI since |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node -v
: 12npm -v
: yarn 2snyk -v
: snyk/actions/node@masterExpected behaviour
Work well with yarn 2 lock files
Actual behaviour
yarn.lock parsing failed with an error: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile
Steps to reproduce
create a project with yarn 2 and a github actions workflows that uses the snyk/actions/node@master action
Found issues
You use @yarnpkg/lockfile to parse the lock file, but it doesn't support yarn 2 lock files as they contain
which the parser does not support.
Suggested solution
realize that the repo is using yarn 2 (the existence of .yarnrc.yml is the indicator) and then use a different parser (I couldn't find an equivalent in yarn 2)
Removing the __metadata line manually still doesn't solve the issue, we need to use a different parser
Debug log
The text was updated successfully, but these errors were encountered: