Skip to content

Commit

Permalink
chore: adjust dep
Browse files Browse the repository at this point in the history
  • Loading branch information
fireairforce committed Nov 23, 2021
1 parent 76681d8 commit c2667ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-commands-installation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@pnpm/types": "workspace:7.6.0",
"@yarnpkg/core": "^3.2.0-rc.4",
"@yarnpkg/lockfile": "^1.1.0",
"@yarnpkg/parsers": "^2.5.0-rc.3",
"@zkochan/rimraf": "^2.1.1",
"@zkochan/table": "^1.0.0",
"@zkochan/which": "^2.0.3",
Expand All @@ -93,6 +92,7 @@
"enquirer": "^2.3.6",
"is-ci": "^3.0.0",
"is-subdir": "^1.1.1",
"js-yaml": "^4.1.0",
"load-json-file": "^6.2.0",
"mem": "^8.0.0",
"p-filter": "^2.1.0",
Expand Down
7 changes: 5 additions & 2 deletions packages/plugin-commands-installation/src/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import exists from 'path-exists'
import recursive from './recursive'
import { yarnLockFileKeyNormalizer } from 'snyk-nodejs-lockfile-parser/dist/parsers/yarn-utils'
import * as yarnCore from '@yarnpkg/core'
import { parseSyml } from '@yarnpkg/parsers'
import { load, FAILSAFE_SCHEMA } from 'js-yaml';

interface NpmPackageLock {
dependencies: LockedPackagesMap
Expand Down Expand Up @@ -179,7 +179,10 @@ async function readYarnLockFile (dir: string) {

function parseYarn2Lock (lockFileContents: string): YarnLock2Struct {
// eslint-disable-line
const parseYarnLock: any = parseSyml(lockFileContents)
const parseYarnLock: any = load(lockFileContents, {
json: true,
schema: FAILSAFE_SCHEMA
})

delete parseYarnLock.__metadata
const dependencies: YarnPackgeLock = {}
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit c2667ee

Please sign in to comment.