3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-22 01:59:32 +01:00

Support npm-shrinkwrap.json out-of-the-box (#439)

This commit is contained in:
AJ Jordan 2022-07-04 17:29:56 -04:00 committed by GitHub
parent 78faa555e1
commit b3ca1ac971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -58,7 +58,7 @@ It's **always** recommended to commit the lockfile of your package manager for s
The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under the hood for caching global packages data but requires less configuration settings. Supported package managers are `npm`, `yarn`, `pnpm` (v6.10+). The `cache` input is optional, and caching is turned off by default. The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under the hood for caching global packages data but requires less configuration settings. Supported package managers are `npm`, `yarn`, `pnpm` (v6.10+). The `cache` input is optional, and caching is turned off by default.
The action defaults to search for the dependency file (`package-lock.json` or `yarn.lock`) in the repository root, and uses its hash as a part of the cache key. Use `cache-dependency-path` for cases when multiple dependency files are used, or they are located in different subdirectories. The action defaults to search for the dependency file (`package-lock.json`, `npm-shrinkwrap.json` or `yarn.lock`) in the repository root, and uses its hash as a part of the cache key. Use `cache-dependency-path` for cases when multiple dependency files are used, or they are located in different subdirectories.
**Note:** The action does not cache `node_modules` **Note:** The action does not cache `node_modules`

View file

@ -59926,7 +59926,7 @@ const exec = __importStar(__nccwpck_require__(1514));
const cache = __importStar(__nccwpck_require__(7799)); const cache = __importStar(__nccwpck_require__(7799));
exports.supportedPackageManagers = { exports.supportedPackageManagers = {
npm: { npm: {
lockFilePatterns: ['package-lock.json', 'yarn.lock'], lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
getCacheFolderCommand: 'npm config get cache' getCacheFolderCommand: 'npm config get cache'
}, },
pnpm: { pnpm: {

2
dist/setup/index.js vendored
View file

@ -71272,7 +71272,7 @@ const exec = __importStar(__nccwpck_require__(1514));
const cache = __importStar(__nccwpck_require__(7799)); const cache = __importStar(__nccwpck_require__(7799));
exports.supportedPackageManagers = { exports.supportedPackageManagers = {
npm: { npm: {
lockFilePatterns: ['package-lock.json', 'yarn.lock'], lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
getCacheFolderCommand: 'npm config get cache' getCacheFolderCommand: 'npm config get cache'
}, },
pnpm: { pnpm: {

View file

@ -13,7 +13,7 @@ export interface PackageManagerInfo {
export const supportedPackageManagers: SupportedPackageManagers = { export const supportedPackageManagers: SupportedPackageManagers = {
npm: { npm: {
lockFilePatterns: ['package-lock.json', 'yarn.lock'], lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
getCacheFolderCommand: 'npm config get cache' getCacheFolderCommand: 'npm config get cache'
}, },
pnpm: { pnpm: {