Skip to content

Commit

Permalink
Support npm-shrinkwrap.json out-of-the-box
Browse files Browse the repository at this point in the history
  • Loading branch information
strugee committed Mar 9, 2022
1 parent 9ced9a4 commit a5578cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -43,7 +43,7 @@ nvm lts syntax: `lts/erbium`, `lts/fermium`, `lts/*`

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 dependencies 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.

See the examples of using cache for `yarn` / `pnpm` and `cache-dependency-path` input in the [Advanced usage](docs/advanced-usage.md#caching-packages-dependencies) guide.

Expand Down
2 changes: 1 addition & 1 deletion dist/cache-save/index.js
Expand Up @@ -3813,7 +3813,7 @@ const core = __importStar(__webpack_require__(470));
const exec = __importStar(__webpack_require__(986));
exports.supportedPackageManagers = {
npm: {
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
getCacheFolderCommand: 'npm config get cache'
},
pnpm: {
Expand Down
2 changes: 1 addition & 1 deletion dist/setup/index.js
Expand Up @@ -46072,7 +46072,7 @@ const core = __importStar(__webpack_require__(470));
const exec = __importStar(__webpack_require__(986));
exports.supportedPackageManagers = {
npm: {
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
getCacheFolderCommand: 'npm config get cache'
},
pnpm: {
Expand Down
2 changes: 1 addition & 1 deletion src/cache-utils.ts
Expand Up @@ -12,7 +12,7 @@ export interface PackageManagerInfo {

export const supportedPackageManagers: SupportedPackageManagers = {
npm: {
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
getCacheFolderCommand: 'npm config get cache'
},
pnpm: {
Expand Down

0 comments on commit a5578cf

Please sign in to comment.