Skip to content

Commit 833e0fd

Browse files
committed
Support npm-shrinkwrap.json out-of-the-box
1 parent cdcc53e commit 833e0fd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ It's **always** recommended to commit the lockfile of your package manager for s
5858

5959
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.
6060

61-
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.
61+
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.
6262

6363
**Note:** The action does not cache `node_modules`
6464

dist/cache-save/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59139,7 +59139,7 @@ const exec = __importStar(__nccwpck_require__(1514));
5913959139
const cache = __importStar(__nccwpck_require__(7799));
5914059140
exports.supportedPackageManagers = {
5914159141
npm: {
59142-
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
59142+
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
5914359143
getCacheFolderCommand: 'npm config get cache'
5914459144
},
5914559145
pnpm: {

dist/setup/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70475,7 +70475,7 @@ const exec = __importStar(__nccwpck_require__(1514));
7047570475
const cache = __importStar(__nccwpck_require__(7799));
7047670476
exports.supportedPackageManagers = {
7047770477
npm: {
70478-
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
70478+
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
7047970479
getCacheFolderCommand: 'npm config get cache'
7048070480
},
7048170481
pnpm: {

src/cache-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface PackageManagerInfo {
1313

1414
export const supportedPackageManagers: SupportedPackageManagers = {
1515
npm: {
16-
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
16+
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
1717
getCacheFolderCommand: 'npm config get cache'
1818
},
1919
pnpm: {

0 commit comments

Comments
 (0)