fix: shrinkwrap
MODIFY
src/generators/app.ts
src/generators/app.ts
@@ -307,8 +307,8 @@ class App extends Generator {
this.pjson.scripts.prepack = nps.series(`${rmrf} lib`, 'tsc -b')
}
if (['plugin', 'multi'].includes(this.type)) {
- this.pjson.scripts.prepack = nps.series('oclif-dev manifest', 'oclif-dev readme', 'npm shrinkwrap')
- this.pjson.scripts.postpack = `${rmf} oclif.manifest.json npm-shrinkwrap.json`
+ this.pjson.scripts.prepack = nps.series('oclif-dev manifest', 'oclif-dev readme')
+ this.pjson.scripts.postpack = `${rmf} oclif.manifest.json`
this.pjson.scripts.version = nps.series('oclif-dev readme', 'git add README.md')
this.pjson.files.push('/oclif.manifest.json')
this.pjson.files.push('/npm-shrinkwrap.json')
@@ -495,7 +495,11 @@ class App extends Generator {
return Promise.all([
install(devDependencies, {...yarnOpts, ...dev, ignoreScripts: true}),
install(dependencies, {...yarnOpts, ...save}),
- ])
+ ]).then(() => {
+ if (!this.yarn) {
+ return this.spawnCommand('npm', ['shrinkwrap'])
+ }
+ })
}
end() {

MODIFY
templates/circle.yml.ejs
templates/circle.yml.ejs
@@ -9,7 +9,7 @@ jobs:
- checkout
- restore_cache: &restore_cache
keys:
- - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "<%- yarn ? 'yarn.lock' : 'package-lock.json' %>"}}
+ - v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "<%- yarn ? 'yarn.lock' : 'npm-shrinkwrap.json' %>"}}
- v1-npm-{{checksum ".circleci/config.yml"}}
- run:
name: Install dependencies
@@ -42,7 +42,7 @@ jobs:
name: Install dependencies
command: yarn
- save_cache:
- key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "<%- yarn ? 'yarn.lock' : 'package-lock.json' %>"}}
+ key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "<%- yarn ? 'yarn.lock' : 'npm-shrinkwrap.json' %>"}}
paths:
- ~/cli/node_modules
<%_ if (yarn) { _%>

fix: shrinkwrap

https://github.com/oclif/dev-cli/issues/50