Skip to content

Commit 9ab4497

Browse files
committed
feat: add lockfile option to control npmrc and ci cache
1 parent 0555d67 commit 9ab4497

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lib/content/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module.exports = {
6969
branches: ['main', 'latest'],
7070
distPaths: ['bin/', 'lib/'],
7171
ciVersions: ['12.13.0', '12.x', '14.15.0', '14.x', '16.0.0', '16.x'],
72+
lockfile: false,
7273
unwantedPackages: [
7374
'eslint',
7475
'eslint-plugin-node',

lib/content/npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
package-lock=false
1+
package-lock={{lockfile}}

lib/content/setup-node.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
- uses: actions/setup-node@v3
22
with:
33
node-version: {{#if useMatrix}}$\{{ matrix.node-version }}{{else}}{{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}{{/if}}
4+
{{#if lockfile}}
5+
cache: npm
6+
{{/if}}
47
{{#if useMatrix}}
58
- name: Update to workable npm (windows)
69
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows

0 commit comments

Comments
 (0)