Skip to content

Commit

Permalink
feat: add lockfile option to control npmrc and ci cache
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Mar 30, 2022
1 parent ca2a591 commit d94fd52
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module.exports = {
branches: ['main', 'latest'],
distPaths: ['bin/', 'lib/'],
ciVersions: ['12.13.0', '12.x', '14.15.0', '14.x', '16.0.0', '16.x'],
lockfile: false,
unwantedPackages: [
'eslint',
'eslint-plugin-node',
Expand Down
2 changes: 1 addition & 1 deletion lib/content/npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-lock=false
package-lock={{lockfile}}
3 changes: 3 additions & 0 deletions lib/content/setup-node.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
- uses: actions/setup-node@v3
with:
node-version: {{#if useMatrix}}$\{{ matrix.node-version }}{{else}}{{#each ciVersions}}{{#if @last}}{{.}}{{/if}}{{/each}}{{/if}}
{{#if lockfile}}
cache: npm
{{/if}}
{{#if useMatrix}}
- name: Update to workable npm (windows)
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
Expand Down

0 comments on commit d94fd52

Please sign in to comment.