Skip to content

Commit b3ca1ac

Browse files
authored
Support npm-shrinkwrap.json out-of-the-box (#439)
1 parent 78faa55 commit b3ca1ac

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
@@ -59926,7 +59926,7 @@ const exec = __importStar(__nccwpck_require__(1514));
5992659926
const cache = __importStar(__nccwpck_require__(7799));
5992759927
exports.supportedPackageManagers = {
5992859928
npm: {
59929-
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
59929+
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
5993059930
getCacheFolderCommand: 'npm config get cache'
5993159931
},
5993259932
pnpm: {

dist/setup/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71272,7 +71272,7 @@ const exec = __importStar(__nccwpck_require__(1514));
7127271272
const cache = __importStar(__nccwpck_require__(7799));
7127371273
exports.supportedPackageManagers = {
7127471274
npm: {
71275-
lockFilePatterns: ['package-lock.json', 'yarn.lock'],
71275+
lockFilePatterns: ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock'],
7127671276
getCacheFolderCommand: 'npm config get cache'
7127771277
},
7127871278
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)