Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
fix: use package-lock or npm-shrinkwrap
Browse files Browse the repository at this point in the history
Fixes: #50
  • Loading branch information
jdx committed Oct 13, 2018
1 parent cd75200 commit 1ce4cbe
Show file tree
Hide file tree
Showing 3 changed files with 431 additions and 34 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
},
"bugs": "https://github.com/oclif/dev-cli/issues",
"dependencies": {
"@oclif/command": "^1.5.1",
"@oclif/config": "^1.7.6",
"@oclif/command": "^1.5.2",
"@oclif/config": "^1.8.6",
"@oclif/errors": "^1.2.1",
"@oclif/plugin-help": "^2.1.2",
"cli-ux": "^4.8.2",
"debug": "^4.0.1",
"cli-ux": "^4.9.0",
"debug": "^4.1.0",
"fs-extra": "^7.0.0",
"lodash": "^4.17.11",
"normalize-package-data": "^2.4.0",
Expand All @@ -24,23 +24,23 @@
"@oclif/plugin-legacy": "^1.1.1",
"@oclif/test": "^1.2.1",
"@oclif/tslint": "^3.1.0",
"@types/chai": "^4.1.4",
"@types/chai": "^4.1.6",
"@types/execa": "^0.9.0",
"@types/fs-extra": "^5.0.4",
"@types/globby": "^8.0.0",
"@types/lodash": "^4.14.116",
"@types/lodash": "^4.14.117",
"@types/lodash.template": "^4.4.4",
"@types/mocha": "^5.2.5",
"@types/node": "^10.9.4",
"@types/node": "^10.11.7",
"@types/supports-color": "^5.3.0",
"@types/write-json-file": "^2.2.1",
"aws-sdk": "^2.315.0",
"chai": "^4.1.2",
"aws-sdk": "^2.334.0",
"chai": "^4.2.0",
"globby": "^8.0.1",
"mocha": "^5.2.0",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"typescript": "^3.0.3"
"typescript": "^3.1.3"
},
"engines": {
"node": ">=8.0.0"
Expand Down
6 changes: 5 additions & 1 deletion src/tarballs/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export async function build(c: IConfig, options: {
await qq.cp([c.root, 'yarn.lock'], '.')
await qq.x('yarn --no-progress --production --non-interactive')
} else {
await qq.cp([c.root, 'package-lock.json'], '.')
let lockpath = qq.join(c.root, 'package-lock.json')
if (!await qq.exists(lockpath)) {
lockpath = qq.join(c.root, 'npm-shrinkwrap.json')
}
await qq.cp(lockpath, '.')
await qq.x('npm install --production')
}
}
Expand Down
Loading

0 comments on commit 1ce4cbe

Please sign in to comment.