diff --git a/.circleci/config.yml b/.circleci/config.yml index 6775c185..798cefbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,8 +12,8 @@ jobs: - checkout - restore_cache: &restore_cache keys: - - v2-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} - - v2-yarn-{{checksum ".circleci/config.yml"}} + - v3-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}} + - v3-yarn-{{checksum ".circleci/config.yml"}} - run: .circleci/greenkeeper - run: yarn add -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1 - run: ./bin/run --help @@ -40,7 +40,7 @@ jobs: export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH semantic-release -e @oclif/semantic-release - save_cache: - key: v2-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} + key: v3-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}} paths: - ~/cli/node_modules - /usr/local/share/.cache/yarn diff --git a/.circleci/greenkeeper b/.circleci/greenkeeper index bf73a3e4..4f6d324f 100755 --- a/.circleci/greenkeeper +++ b/.circleci/greenkeeper @@ -17,7 +17,7 @@ if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then fi if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then - yarn global add greenkeeper-lockfile@1 + yarn global add greenkeeper-lockfile@2 fi greenkeeper-lockfile-update diff --git a/package.json b/package.json index 0a73f6be..0b2baf1b 100644 --- a/package.json +++ b/package.json @@ -8,22 +8,22 @@ "@oclif/color": "^0.0.0", "@oclif/command": "^1.5.0", "chalk": "^2.4.1", - "cli-ux": "^4.7.3", + "cli-ux": "^4.8.0", "debug": "^3.1.0", "fs-extra": "^7.0.0", - "http-call": "^5.1.4", + "http-call": "^5.2.0", "load-json-file": "^5.0.0", "npm-run-path": "^2.0.2", - "semver": "^5.5.0", + "semver": "^5.5.1", "tslib": "^1.9.3", "yarn": "^1.9.4" }, "devDependencies": { "@oclif/config": "^1.7.0", - "@oclif/dev-cli": "^1.16.0", - "@oclif/errors": "^1.1.2", - "@oclif/plugin-help": "^2.0.5", - "@oclif/test": "^1.1.0", + "@oclif/dev-cli": "^1.17.0", + "@oclif/errors": "^1.2.0", + "@oclif/plugin-help": "^2.1.0", + "@oclif/test": "^1.2.0", "@oclif/tslint": "^2.0.0", "@types/chai": "^4.1.4", "@types/fs-extra": "^5.0.4", @@ -34,7 +34,7 @@ "@types/supports-color": "^5.3.0", "chai": "^4.1.2", "concurrently": "^3.6.1", - "fancy-test": "^1.2.0", + "fancy-test": "^1.3.0", "globby": "^8.0.1", "mocha": "^5.2.0", "ts-node": "^7.0.1", diff --git a/src/plugins.ts b/src/plugins.ts index 7173fd56..2200151e 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -205,10 +205,14 @@ export default class Plugins { return path.join(this.config.dataDir, 'package.json') } + private get npmRegistry(): string { + return this.config.npmRegistry || 'https://registry.npmjs.org' + } + private async npmHasPackage(name: string): Promise { try { const http: typeof HTTP = require('http-call').HTTP - let url = `${this.config.npmRegistry}/-/package/${name.replace('/', '%2f')}/dist-tags` + let url = `${this.npmRegistry}/-/package/${name.replace('/', '%2f')}/dist-tags` await http.get(url) return true } catch (err) { diff --git a/yarn.lock b/yarn.lock index 37798143..dbd66cdf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,7 +38,7 @@ supports-color "^5.4.0" tslib "^1" -"@oclif/command@^1.4.30", "@oclif/command@^1.4.36", "@oclif/command@^1.5.0": +"@oclif/command@^1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.5.0.tgz#d5276a19506349fff0254b0dd98e3b8a2bd971aa" dependencies: @@ -47,22 +47,22 @@ debug "^3.1.0" semver "^5.5.0" -"@oclif/config@^1.6.33", "@oclif/config@^1.7.0": +"@oclif/config@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.7.0.tgz#deb465093d10a1ee802cca7580cd2d33f78d9d60" dependencies: debug "^3.1.0" tslib "^1.9.3" -"@oclif/dev-cli@^1.16.0": - version "1.16.0" - resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.16.0.tgz#a535deac47f87891760fa230d7b8084466266734" +"@oclif/dev-cli@^1.17.0": + version "1.17.0" + resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.17.0.tgz#b7af28a79f792f5981c43e104a667dfb5df28595" dependencies: - "@oclif/command" "^1.4.36" - "@oclif/config" "^1.6.33" - "@oclif/errors" "^1.1.2" - "@oclif/plugin-help" "^2.0.5" - cli-ux "^4.7.3" + "@oclif/command" "^1.5.0" + "@oclif/config" "^1.7.0" + "@oclif/errors" "^1.2.0" + "@oclif/plugin-help" "^2.1.0" + cli-ux "^4.8.0" debug "^3.1.0" fs-extra "^7.0.0" lodash "^4.17.10" @@ -80,6 +80,16 @@ strip-ansi "^4.0.0" wrap-ansi "^3.0.1" +"@oclif/errors@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.2.0.tgz#4166952699724c25af2ab4528fe223e930655e72" + dependencies: + clean-stack "^1.3.0" + fs-extra "^7.0.0" + indent-string "^3.2.0" + strip-ansi "^4.0.0" + wrap-ansi "^3.0.1" + "@oclif/linewrap@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91" @@ -92,11 +102,11 @@ chalk "^2.4.1" tslib "^1.9.3" -"@oclif/plugin-help@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-2.0.5.tgz#98084286099b44c8c6ed6214e3589f32525f4827" +"@oclif/plugin-help@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-2.1.0.tgz#eb0748904558b8e379416ab3ef7bbefed2151348" dependencies: - "@oclif/command" "^1.4.30" + "@oclif/command" "^1.5.0" chalk "^2.4.1" indent-string "^3.2.0" lodash.template "^4.4.0" @@ -108,11 +118,11 @@ version "1.0.2" resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.2.tgz#c9d7c84b0ea60ecec8dd7a9b22c012ba9967aed8" -"@oclif/test@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@oclif/test/-/test-1.1.0.tgz#63eea93f3b20ff534831b1a281d217eb02073a9c" +"@oclif/test@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@oclif/test/-/test-1.2.0.tgz#764ca66215f5bd36c0b5cbcbfc5963f0271825b8" dependencies: - fancy-test "^1.2.0" + fancy-test "^1.3.0" "@oclif/tslint@^2.0.0": version "2.0.0" @@ -134,21 +144,21 @@ version "2.0.7" resolved "https://registry.yarnpkg.com/@types/load-json-file/-/load-json-file-2.0.7.tgz#c887826f5230b7507d5230994d26315c6776be06" -"@types/lodash@^4.14.109": +"@types/lodash@^4.14.116": version "4.14.116" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9" -"@types/mocha@^5.2.2", "@types/mocha@^5.2.5": +"@types/mocha@^5.2.5": version "5.2.5" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" -"@types/nock@^9.1.3": +"@types/nock@^9.3.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@types/nock/-/nock-9.3.0.tgz#9d34358fdcc08afd07144e0784ac9e951d412dd4" dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^10.3.3", "@types/node@^10.7.1": +"@types/node@*", "@types/node@^10.7.1": version "10.7.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.7.1.tgz#b704d7c259aa40ee052eec678758a68d07132a2e" @@ -393,9 +403,9 @@ clean-stack@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31" -cli-ux@^4.7.3: - version "4.7.3" - resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-4.7.3.tgz#5b7f5e70105fde53883c5307a88e2f29f64236c4" +cli-ux@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-4.8.0.tgz#4013e177bfb6a2138565c071ef99f4a13e1cab20" dependencies: "@oclif/linewrap" "^1.0.0" "@oclif/screen" "^1.0.2" @@ -404,12 +414,12 @@ cli-ux@^4.7.3: chalk "^2.4.1" clean-stack "^1.3.0" extract-stack "^1.0.0" - fs-extra "^6.0.1" + fs-extra "^7.0.0" hyperlinker "^1.0.0" indent-string "^3.2.0" is-wsl "^1.1.0" lodash "^4.17.10" - password-prompt "^1.0.6" + password-prompt "^1.0.7" semver "^5.5.0" strip-ansi "^4.0.0" supports-color "^5.4.0" @@ -637,15 +647,15 @@ extract-stack@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa" -fancy-test@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.2.0.tgz#c5f6f81725ea42b9caec9bb18731449cfab526f3" +fancy-test@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.3.0.tgz#014b63b5be0dd2dde602ec677cec443f34578f37" dependencies: "@types/chai" "^4.1.4" - "@types/lodash" "^4.14.109" - "@types/mocha" "^5.2.2" - "@types/nock" "^9.1.3" - "@types/node" "^10.3.3" + "@types/lodash" "^4.14.116" + "@types/mocha" "^5.2.5" + "@types/nock" "^9.3.0" + "@types/node" "^10.7.1" "@types/sinon" "^5.0.1" lodash "^4.17.10" mock-stdin "^0.3.1" @@ -822,7 +832,7 @@ hosted-git-info@^2.1.4: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" -http-call@^5.1.2, http-call@^5.1.4: +http-call@^5.1.2: version "5.1.4" resolved "https://registry.yarnpkg.com/http-call/-/http-call-5.1.4.tgz#fc37a1f6638ece82aba3d12eb6030f0889da850a" dependencies: @@ -832,6 +842,16 @@ http-call@^5.1.2, http-call@^5.1.4: is-stream "^1.1.0" tunnel-agent "^0.6.0" +http-call@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/http-call/-/http-call-5.2.0.tgz#9e923cbc51c2d0d78c286e8ad913d666e2e46682" + dependencies: + content-type "^1.0.4" + debug "^3.1.0" + is-retry-allowed "^1.1.0" + is-stream "^1.1.0" + tunnel-agent "^0.6.0" + hyperlinker@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" @@ -1277,7 +1297,7 @@ pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" -password-prompt@^1.0.6: +password-prompt@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/password-prompt/-/password-prompt-1.0.7.tgz#8e27748d3400bc9c9140d5ade705dfb7aeb7d91a" dependencies: @@ -1434,6 +1454,10 @@ safe-regex@^1.1.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"