Created
August 2, 2022 08:08
-
-
Save davesnx/8f379c627ac3e7d206c8fdc0a4e7c693 to your computer and use it in GitHub Desktop.
Package manager check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lockfileSpecs = [ | |
{ | |
checkfile: ".yarnrc.yml", | |
lockfile: "yarn.lock", | |
command: "yarn", | |
version: "2", | |
arguments: ["install", "--immutable"] | |
}, | |
{ | |
checkfile: "yarn.lock", | |
lockfile: "yarn.lock", | |
command: "yarn", | |
version: "1", | |
arguments: ["install", "--prefer-offline", "--pure-lockfile"] | |
}, | |
{ | |
checkfile: "package-lock.json", | |
lockfile: "package-lock.json", | |
command: "npm", | |
version: ">=5", | |
arguments: ["install", "--prefer-offline", "--no-audit", "--no-save"] | |
}, | |
{ | |
checkfile: "npm-shrinkwrap.json", | |
lockfile: "npm-shrinkwrap.json", | |
command: "npm", | |
version: "<5", | |
arguments: ["install", "--prefer-offline", "--no-audit", "--no-save"] | |
}, | |
{ | |
checkfile: "pnpm-lock.yaml", | |
lockfile: "pnpm-lock.yaml", | |
command: "pnpm", | |
version: ">=3", | |
arguments: ["install", "--prefer-offline", "--prefer-frozen-lockfile"] | |
}, | |
{ | |
checkfile: "shrinkwrap.yaml", | |
lockfile: "shrinkwrap.yaml", | |
command: "pnpm", | |
version: "<3", | |
arguments: ["install", "--prefer-offline", "--prefer-frozen-shrinkwrap"] | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment