From c65c556ac7015f5b7a941684c533f83bb088eb88 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Sun, 8 Apr 2018 22:32:13 -0700 Subject: [PATCH] fix: updater fixes --- .circleci/config.yml | 8 +- README.md | 2 +- examples/s3-update-example-cli/package.json | 19 +- examples/s3-update-example-cli/yarn.lock | 742 +++++--------------- package.json | 18 +- src/commands/update.ts | 20 +- src/tar.ts | 2 +- test/commands/update.test.ts | 60 +- test/mocha.opts | 2 +- tslint.json | 5 +- yarn.lock | 84 ++- 11 files changed, 321 insertions(+), 641 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14efe134..52c960dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: node-latest: &test docker: - - image: node:latest + - image: oclif/release:0.0.0-9.11.1 working_directory: ~/cli environment: NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc" @@ -34,7 +34,7 @@ jobs: - add_ssh_keys - checkout - restore_cache: *restore_cache - - run: yarn global add @oclif/semantic-release@2 semantic-release@15 + - run: yarn global add @oclif/semantic-release@3 semantic-release@15 - run: yarn --frozen-lockfile - run: | export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH @@ -51,11 +51,11 @@ workflows: "@oclif/plugin-update": jobs: - node-latest - - node-8 + #- node-8 - release: context: org-global filters: branches: {only: master} requires: - node-latest - - node-8 + #- node-8 diff --git a/README.md b/README.md index a4464377..c2fbba9c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ $ npm install -g @oclif/plugin-update $ oclif-example COMMAND running command... $ oclif-example (-v|--version|version) -@oclif/plugin-update/1.1.0 linux-x64 node-v9.11.1 +@oclif/plugin-update/1.1.0 darwin-x64 node-v9.11.1 $ oclif-example --help [COMMAND] USAGE $ oclif-example COMMAND diff --git a/examples/s3-update-example-cli/package.json b/examples/s3-update-example-cli/package.json index 551bd163..c18da915 100644 --- a/examples/s3-update-example-cli/package.json +++ b/examples/s3-update-example-cli/package.json @@ -1,6 +1,6 @@ { "name": "s3-update-example-cli", - "version": "0.0.0", + "version": "2.0.0", "author": "Jeff Dickey @jdxcode", "bin": { "s3-example": "./bin/run" @@ -9,13 +9,14 @@ "dependencies": { "@oclif/command": "^1.4.9", "@oclif/config": "^1.4.7", - "@oclif/plugin-help": "^1.2.3" + "@oclif/plugin-help": "^1.2.3", + "@oclif/plugin-update": "/Users/jdickey/src/github.com/oclif/plugin-update/oclif-plugin-update-1.1.0.tgz" }, "devDependencies": { - "@oclif/dev-cli": "^1.9.5", + "@oclif/dev-cli": "^1.9.10", "@types/node": "^9.6.2", + "aws-sdk": "^2.222.1", "globby": "^8.0.1", - "pkg": "^4.3.1", "ts-node": "5", "tslib": "^1.9.0", "typescript": "^2.8.1" @@ -44,8 +45,14 @@ }, "node": { "version": "8.11.1", - "xtargets": [ "darwin-x64", "linux-x64", "win32-x64" ], - "targets": [ "darwin-x64" ] + "xtargets": [ + "darwin-x64", + "linux-x64", + "win32-x64" + ], + "targets": [ + "darwin-x64" + ] } }, "plugins": [ diff --git a/examples/s3-update-example-cli/yarn.lock b/examples/s3-update-example-cli/yarn.lock index d6c957ac..d2017f1e 100644 --- a/examples/s3-update-example-cli/yarn.lock +++ b/examples/s3-update-example-cli/yarn.lock @@ -11,10 +11,6 @@ strip-ansi "^4.0.0" supports-color "^5.1.0" -"@heroku/linewrap@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@heroku/linewrap/-/linewrap-1.0.0.tgz#a9d4e99f0a3e423a899b775f5f3d6747a1ff15c6" - "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -22,44 +18,36 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@oclif/command@^1.4.7", "@oclif/command@^1.4.9": - version "1.4.9" - resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.9.tgz#009bd5bb717ceb445bb81f08767c17cd4e7c7f02" +"@oclif/command@^1.4.10", "@oclif/command@^1.4.7", "@oclif/command@^1.4.9": + version "1.4.10" + resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.10.tgz#15d229ba975018ca62cf4a94bec6d9796e18b619" dependencies: "@oclif/errors" "^1.0.4" - "@oclif/parser" "^3.2.11" + "@oclif/parser" "^3.2.13" debug "^3.1.0" semver "^5.5.0" -"@oclif/config@^1.4.0": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.3.tgz#38b3423c5ed09bc7e4d01bca10f59939c4168482" - dependencies: - debug "^3.1.0" - -"@oclif/config@^1.4.6", "@oclif/config@^1.4.7": +"@oclif/config@^1.4.0", "@oclif/config@^1.4.7": version "1.4.7" resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.7.tgz#31edcbffa0f47ca14985cd0da31bf8a11cd9b540" dependencies: debug "^3.1.0" -"@oclif/dev-cli@^1.9.5": - version "1.9.5" - resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.5.tgz#63beb2ce60e4db291152b1932734518dbee62d9d" +"@oclif/dev-cli@^1.9.10": + version "1.9.11" + resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.11.tgz#3f98c49f5c835f0daefaf474383270d521b1484d" dependencies: - "@heroku-cli/color" "^1.1.3" - "@oclif/command" "^1.4.9" - "@oclif/config" "^1.4.6" + "@oclif/command" "^1.4.10" + "@oclif/config" "^1.4.7" "@oclif/errors" "^1.0.4" "@oclif/plugin-help" "^1.2.3" "@oclif/plugin-warn-if-update-available" "^1.3.0" - cli-ux "^3.3.27" + cli-ux "^3.3.28" debug "^3.1.0" fs-extra "^5.0.0" lodash "^4.17.5" - lodash.template "^4.4.0" normalize-package-data "^2.4.0" - qqjs "^0.3.4" + qqjs "^0.3.6" require-resolve "^0.0.2" tslib "^1.9.0" @@ -73,11 +61,15 @@ strip-ansi "^4.0.0" wrap-ansi "^3.0.1" -"@oclif/parser@^3.2.11": - version "3.2.11" - resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.11.tgz#03a5fef0c45dd1badd0375ae05b476e0c27faf40" +"@oclif/linewrap@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91" + +"@oclif/parser@^3.2.13": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.13.tgz#4baf2b4ea23165e57adaae1f223861d8d9a33a24" dependencies: - "@heroku/linewrap" "^1.0.0" + "@oclif/linewrap" "^1.0.0" chalk "^2.3.2" "@oclif/plugin-help@^1.2.3": @@ -92,6 +84,47 @@ widest-line "^2.0.0" wrap-ansi "^3.0.1" +"@oclif/plugin-update@/Users/jdickey/src/github.com/oclif/plugin-update/oclif-plugin-update-1.1.0.tgz": + version "1.1.0" + uid adceca83c339f48cc2b44a5ec0606b923572c1b5 + resolved "/Users/jdickey/src/github.com/oclif/plugin-update/oclif-plugin-update-1.1.0.tgz#adceca83c339f48cc2b44a5ec0606b923572c1b5" + dependencies: + "@heroku-cli/color" "^1.1.3" + "@oclif/command" "^1.4.10" + "@oclif/config" "^1.4.7" + "@oclif/errors" "^1.0.4" + "@types/semver" "^5.5.0" + cli-ux "^3.3.28" + cross-spawn "^6.0.5" + debug "^3.1.0" + filesize "^3.6.1" + fs-extra "^5.0.0" + http-call "^5.1.0" + lodash "^4.17.5" + log-chopper "^1.0.2" + semver "^5.5.0" + tar-fs "^1.16.0" + +"@oclif/plugin-update@file:../../oclif-plugin-update-1.1.0.tgz": + version "1.1.0" + resolved "file:../../oclif-plugin-update-1.1.0.tgz#adceca83c339f48cc2b44a5ec0606b923572c1b5" + dependencies: + "@heroku-cli/color" "^1.1.3" + "@oclif/command" "^1.4.10" + "@oclif/config" "^1.4.7" + "@oclif/errors" "^1.0.4" + "@types/semver" "^5.5.0" + cli-ux "^3.3.28" + cross-spawn "^6.0.5" + debug "^3.1.0" + filesize "^3.6.1" + fs-extra "^5.0.0" + http-call "^5.1.0" + lodash "^4.17.5" + log-chopper "^1.0.2" + semver "^5.5.0" + tar-fs "^1.16.0" + "@oclif/plugin-warn-if-update-available@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.3.0.tgz#f332eee1560cdeed1b4f4857cb54260fe1ca2582" @@ -113,26 +146,9 @@ version "9.6.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.2.tgz#e49ac1adb458835e95ca6487bc20f916b37aff23" -acorn-object-rest-spread@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/acorn-object-rest-spread/-/acorn-object-rest-spread-1.1.0.tgz#78699aefdd18ec3182caadadf52e2697c048f476" - dependencies: - acorn "^5.0.3" - -acorn@5.5.3, acorn@^5.0.3: - version "5.5.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" +"@types/semver@^5.5.0": + version "5.5.0" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" ansi-escapes@^3.0.0: version "3.1.0" @@ -142,7 +158,7 @@ ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" -ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: @@ -182,49 +198,37 @@ arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - atob@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" - -babel-runtime@6.25.0: - version "6.25.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.10.0" +aws-sdk@^2.222.1: + version "2.222.1" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.222.1.tgz#d84c34003bb882d1fec17c41c74cb817bda84914" + dependencies: + buffer "4.9.1" + events "1.1.1" + ieee754 "1.1.8" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.1.0" + xml2js "0.4.17" + xmlbuilder "4.2.1" balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +base64-js@^1.0.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -237,12 +241,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - bl@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" @@ -250,12 +248,6 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -278,11 +270,19 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +buffer@4.9.1: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -byline@5.0.0: +byline@5.x: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" @@ -311,18 +311,6 @@ cardinal@^1.0.0: ansicolors "~0.2.1" redeyed "~1.0.0" -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -chalk@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - chalk@^2.3.0, chalk@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" @@ -348,11 +336,11 @@ 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@^3.3.27: - version "3.3.27" - resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.3.27.tgz#1ee13e5d4dbce4980e14f2abf368a3aed54743b4" +cli-ux@^3.3.28: + version "3.3.28" + resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.3.28.tgz#9d516d389a9bbca272e8a195f7cac6c61d0e69fa" dependencies: - "@heroku/linewrap" "^1.0.0" + "@oclif/linewrap" "^1.0.0" "@oclif/screen" "^1.0.2" ansi-styles "^3.2.1" cardinal "^1.0.0" @@ -367,10 +355,6 @@ cli-ux@^3.3.27: strip-ansi "^4.0.0" supports-color "^5.3.0" -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -388,12 +372,6 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - dependencies: - delayed-stream "~1.0.0" - component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" @@ -410,11 +388,7 @@ copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" -core-js@^2.4.0: - version "2.5.4" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.4.tgz#f2c8bf181f2a80b92f360121429ce63a2f0aeae0" - -core-util-is@1.0.2, core-util-is@~1.0.0: +core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -426,7 +400,7 @@ cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" dependencies: @@ -436,18 +410,6 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -464,10 +426,6 @@ decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -487,10 +445,6 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -506,12 +460,6 @@ dir-glob@^2.0.0: arrify "^1.0.1" path-type "^3.0.0" -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" @@ -528,32 +476,13 @@ escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -escodegen@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - esprima@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" +events@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" execa@^0.10.0: version "0.10.0" @@ -579,10 +508,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-template@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-1.0.3.tgz#6c303323177a62b1b22c070279f7861287b69b1a" - extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -596,10 +521,6 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -617,14 +538,6 @@ extract-stack@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa" -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - fast-glob@^2.0.2: version "2.2.0" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.0.tgz#e9d032a69b86bef46fc03d935408f02fb211d9fc" @@ -635,9 +548,9 @@ fast-glob@^2.0.2: merge2 "^1.2.1" micromatch "^3.1.8" -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" +filesize@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" fill-range@^4.0.0: version "4.0.0" @@ -658,32 +571,12 @@ for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" dependencies: map-cache "^0.2.2" -fs-extra@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^3.0.0" - universalify "^0.1.0" - fs-extra@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" @@ -704,12 +597,6 @@ get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -721,7 +608,7 @@ glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" -glob@^7.0.3, glob@^7.1.2: +glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -732,16 +619,6 @@ glob@^7.0.3, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -globby@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - globby@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" @@ -758,21 +635,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -804,19 +666,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - hosted-git-info@^2.1.4: version "2.6.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" @@ -832,13 +681,13 @@ http-call@^5.1.0: tslib "^1.9.0" tunnel-agent "^0.6.0" -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" +ieee754@1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + +ieee754@^1.1.4: + version "1.1.11" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" ignore@^3.3.5: version "3.3.7" @@ -848,10 +697,6 @@ imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" -in-publish@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" - indent-string@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" @@ -863,7 +708,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@~2.0.3: +inherits@2, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -985,15 +830,11 @@ is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1011,57 +852,20 @@ isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jmespath@0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -jsonfile@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -1082,13 +886,6 @@ kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -1122,10 +919,16 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.17.5: +lodash@^4.0.0, lodash@^4.17.5: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" +log-chopper@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-chopper/-/log-chopper-1.0.2.tgz#a88da7a47a9f0e511eda4d5e1dc840e0eaf4547a" + dependencies: + byline "5.x" + lru-cache@^4.0.1: version "4.1.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" @@ -1175,16 +978,6 @@ micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - dependencies: - mime-db "~1.33.0" - minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -1195,7 +988,7 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@1.2.0, minimist@^1.2.0: +minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -1216,13 +1009,6 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -multistream@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/multistream/-/multistream-2.1.0.tgz#625c267d5c44424ad6294788b5bb4da3dcb32f1d" - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.5" - nanomatch@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" @@ -1259,14 +1045,6 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -1293,18 +1071,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -optionator@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -1366,96 +1133,30 @@ path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" dependencies: pify "^3.0.0" -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" dependencies: find-up "^2.1.0" -pkg-fetch@2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-2.5.4.tgz#0573550050f38d2d5f91131c1bd718f9b39faf06" - dependencies: - babel-runtime "6.25.0" - byline "5.0.0" - chalk "2.1.0" - expand-template "1.0.3" - fs-extra "4.0.1" - in-publish "2.0.0" - minimist "1.2.0" - progress "2.0.0" - request "2.81.0" - request-progress "3.0.0" - semver "5.4.1" - unique-temp-dir "1.0.0" - -pkg@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/pkg/-/pkg-4.3.1.tgz#1a161a53f1e3222c3dd3ca5705c738d419395a24" - dependencies: - acorn "5.5.3" - acorn-object-rest-spread "1.1.0" - babel-runtime "6.25.0" - chalk "2.1.0" - escodegen "1.8.1" - fs-extra "4.0.1" - globby "6.1.0" - minimist "1.2.0" - multistream "2.1.0" - pkg-fetch "2.5.4" - progress "2.0.0" - resolve "1.4.0" - simple-bufferstream "1.0.0" - stream-meter "1.0.4" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" -progress@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" - pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -1467,13 +1168,13 @@ pump@^1.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" -qqjs@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.4.tgz#60581f655e980f41c6e57fcd7522dd5179f00add" +qqjs@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.6.tgz#6e4b8008489a055fb95a93365154a9e777e9b784" dependencies: chalk "^2.3.2" debug "^3.1.0" @@ -1489,11 +1190,11 @@ qqjs@^0.3.4: tmp "^0.0.33" write-json-file "^2.3.0" -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" -readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.3.5: +readable-stream@^2.0.0, readable-stream@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -1511,10 +1212,6 @@ redeyed@~1.0.0: dependencies: esprima "~3.0.0" -regenerator-runtime@^0.10.0: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -1530,39 +1227,6 @@ repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" -request-progress@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" - dependencies: - throttleit "^1.0.0" - -request@2.81.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - require-resolve@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/require-resolve/-/require-resolve-0.0.2.tgz#bab410ab1aee2f3f55b79317451dd3428764e6f3" @@ -1573,12 +1237,6 @@ resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" -resolve@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" - dependencies: - path-parse "^1.0.5" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -1593,14 +1251,18 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" +sax@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +sax@>=0.6.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + "semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" -semver@5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -1633,10 +1295,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" -simple-bufferstream@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simple-bufferstream/-/simple-bufferstream-1.0.0.tgz#5cab10e851aa71c667b77b61fe1bb1d90a60baa4" - slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -1668,12 +1326,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -1708,12 +1360,6 @@ source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - dependencies: - amdefine ">=0.0.4" - spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" @@ -1742,20 +1388,6 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" -sshpk@^1.7.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -1763,12 +1395,6 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -stream-meter@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" - dependencies: - readable-stream "^2.1.4" - string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -1782,10 +1408,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -1800,12 +1422,6 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - supports-color@^5.1.0, supports-color@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" @@ -1830,10 +1446,6 @@ tar-stream@^1.1.2: readable-stream "^2.0.0" xtend "^4.0.0" -throttleit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -1862,12 +1474,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@~2.3.0: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - dependencies: - punycode "^1.4.1" - ts-node@5: version "5.0.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-5.0.1.tgz#78e5d1cb3f704de1b641e43b76be2d4094f06f81" @@ -1891,24 +1497,10 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - typescript@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" -uid2@0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -1918,14 +1510,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" -unique-temp-dir@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz#6dce95b2681ca003eebfb304a415f9cbabcc5385" - dependencies: - mkdirp "^0.5.1" - os-tmpdir "^1.0.1" - uid2 "0.0.3" - universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -1941,6 +1525,13 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" +url@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" + dependencies: + punycode "1.3.2" + querystring "0.2.0" + use@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" @@ -1951,9 +1542,9 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -uuid@^3.0.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" +uuid@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" validate-npm-package-license@^3.0.1: version "3.0.3" @@ -1962,14 +1553,6 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - which@^1.2.9: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" @@ -1982,10 +1565,6 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - wrap-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" @@ -2022,6 +1601,19 @@ x-path@^0.0.2: dependencies: path-extra "^1.0.2" +xml2js@0.4.17: + version "0.4.17" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" + dependencies: + sax ">=0.6.0" + xmlbuilder "^4.1.0" + +xmlbuilder@4.2.1, xmlbuilder@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" + dependencies: + lodash "^4.0.0" + xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" diff --git a/package.json b/package.json index 6cb08898..5a2bc04d 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "bugs": "https://github.com/oclif/plugin-update/issues", "dependencies": { "@heroku-cli/color": "^1.1.3", - "@oclif/command": "^1.4.9", + "@oclif/command": "^1.4.10", "@oclif/config": "^1.4.7", "@oclif/errors": "^1.0.4", "@types/semver": "^5.5.0", - "cli-ux": "^3.3.27", + "cli-ux": "^3.3.28", "cross-spawn": "^6.0.5", "debug": "^3.1.0", "filesize": "^3.6.1", @@ -21,20 +21,24 @@ "tar-fs": "^1.16.0" }, "devDependencies": { - "@oclif/dev-cli": "^1.9.7", + "@oclif/dev-cli": "^1.9.11", "@oclif/plugin-help": "^1.2.3", "@oclif/test": "^1.0.4", "@oclif/tslint": "^1.1.0", "@types/chai": "^4.1.2", "@types/cross-spawn": "^6.0.0", + "@types/execa": "^0.9.0", "@types/fs-extra": "^5.0.1", + "@types/glob": "^5.0.35", "@types/lodash": "^4.14.106", "@types/mocha": "^5.0.0", "@types/node": "^9.6.2", "@types/supports-color": "^3.1.0", + "@types/write-json-file": "^2.2.1", "chai": "^4.1.2", "globby": "^8.0.1", "mocha": "^5.0.5", + "qqjs": "^0.3.6", "ts-node": "5", "tslib": "^1.9.0", "tslint": "^5.9.1", @@ -65,13 +69,9 @@ }, "repository": "oclif/plugin-update", "scripts": { - "build": "rm -rf lib && tsc", - "clean": "rm -f .oclif.manifest.json", - "lint": "tsc -p test --noEmit && tslint -p test -t stylish", - "postpublish": "yarn run clean", + "postpack": "rm -f .oclif.manifest.json", "posttest": "tsc -p test --noEmit && tslint -p test -t stylish", - "prepublishOnly": "yarn run build && oclif-dev manifest && oclif-dev readme", - "preversion": "yarn run clean", + "prepack": "rm -rf lib && tsc && oclif-dev manifest && oclif-dev readme", "test": "mocha --forbid-only \"test/**/*.test.ts\"", "version": "oclif-dev readme && git add README.md" } diff --git a/src/commands/update.ts b/src/commands/update.ts index 50658a8b..289a3f75 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -20,20 +20,15 @@ export default class UpdateCommand extends Command { private autoupdate!: boolean private channel!: string - private clientRoot = path.join(this.config.dataDir, 'client') - private clientBin = path.join(this.clientRoot, 'bin', this.config.windows ? `${this.config.bin}.cmd` : this.config.bin) - private s3Host = this.config.pjson.oclif.update.s3.host + private readonly clientRoot = path.join(this.config.dataDir, 'client') + private readonly clientBin = path.join(this.clientRoot, 'bin', this.config.windows ? `${this.config.bin}.cmd` : this.config.bin) + private readonly s3Host = this.config.pjson.oclif.update.s3.host async run() { const {args, flags} = this.parse(UpdateCommand) this.autoupdate = !!flags.autoupdate - if (this.autoupdate) { - await this.debounce() - } else { - // on manual run, also log to file - cli.config.errlog = path.join(this.config.cacheDir, 'autoupdate') - } + if (this.autoupdate) await this.debounce() cli.action.start(`${this.config.name}: Updating CLI`) this.channel = args.channel || this.config.channel || 'stable' @@ -69,10 +64,6 @@ export default class UpdateCommand extends Command { } } - private base(version: string): string { - return `${this.config.bin}-v${version}-${this.config.platform}-${this.config.arch}` - } - private async update(manifest: ITargetManifest) { const {version, channel} = manifest cli.action.start(`${this.config.name}: Updating CLI from ${color.green(this.config.version)} to ${color.green(version)}${channel === 'stable' ? '' : ' (' + color.yellow(channel) + ')'}`) @@ -110,6 +101,7 @@ export default class UpdateCommand extends Command { } private async needsUpdate() { + if (this.autoupdate && this.config.scopedEnvVar('DISABLE_AUTOUPDATE') === '1') return if (this.channel !== this.config.channel) return true let manifest = await this.fetchManifest() return this.config.version !== manifest.version @@ -177,7 +169,7 @@ export default class UpdateCommand extends Command { .on('error', reject) .on('close', (status: number) => { try { - cli.exit(status) + this.exit(status) } catch (err) { reject(err) } diff --git a/src/tar.ts b/src/tar.ts index b58df7cc..7a7f6f6c 100644 --- a/src/tar.ts +++ b/src/tar.ts @@ -71,7 +71,7 @@ export async function extract(stream: NodeJS.ReadableStream, basename: string, o } const from = path.join(tmp, basename) debug('moving %s to %s', from, output) - await fs.move(from, output) + await fs.rename(from, output) await fs.remove(tmp).catch(debug) await touch(output) debug('done extracting') diff --git a/test/commands/update.test.ts b/test/commands/update.test.ts index d402155d..7cc83309 100644 --- a/test/commands/update.test.ts +++ b/test/commands/update.test.ts @@ -1,4 +1,62 @@ +import {expect} from 'chai' +import * as path from 'path' +import * as qq from 'qqjs' + +const skipIfWindows = process.platform === 'win32' ? it.skip : it + describe('update', () => { - it.skip('tests the updater', () => { + skipIfWindows('tests the updater', async () => { + await qq.rm([process.env.HOME!, '.local', 'share', 'oclif-example-s3-cli']) + await qq.x('aws s3 rm --recursive s3://oclif-staging/s3-update-example-cli') + const sha = await qq.x.stdout('git', ['rev-parse', '--short', 'HEAD']) + const stdout = await qq.x.stdout('npm', ['pack']) + const tarball = path.resolve(stdout.split('\n').pop()!) + + qq.cd('examples/s3-update-example-cli') + process.env.EXAMPLE_CLI_DISABLE_AUTOUPDATE = '1' + process.env.YARN_CACHE_FOLDER = path.resolve('tmp', 'yarn') + await qq.rm(process.env.YARN_CACHE_FOLDER) + const pjson = await qq.readJSON('package.json') + // pjson.dependencies['@oclif/plugin-update'] = `file:${path.resolve(tarball)}` + // await qq.writeJSON('package.json', pjson) + + await qq.rm('yarn.lock') + await qq.x(`yarn add ${tarball}`) + // await qq.x('yarn') + + const release = async (version: string, channel?: string) => { + const pjson = await qq.readJSON('package.json') + pjson.version = version + await qq.writeJSON('package.json', pjson) + await qq.x(`./node_modules/.bin/oclif-dev pack${channel ? ` -c${channel}` : ''}`) + await qq.x(`./node_modules/.bin/oclif-dev publish${channel ? ` -c${channel}` : ''}`) + } + const checkVersion = async (version: string, nodeVersion = pjson.oclif.update.node.version) => { + const stdout = await qq.x.stdout('./tmp/example-cli/bin/example-cli', ['version']) + expect(stdout).to.equal(`s3-update-example-cli/${version} ${process.platform}-${process.arch} node-v${nodeVersion}`) + } + const resetLocalVersion = async () => { + const f = 'tmp/example-cli/package.json' + const pjson = await qq.readJSON(f) + pjson.version = '0.0.0' + await qq.writeJSON(f, pjson) + } + await release('1.0.0') + await checkVersion('1.0.0', process.versions.node) + await resetLocalVersion() + await qq.x('./tmp/example-cli/bin/example-cli', ['update']) + await checkVersion('1.0.0') + + await release('1.0.1') + await checkVersion('1.0.0') + await qq.x.stdout('./tmp/example-cli/bin/example-cli', ['update']) + await checkVersion('1.0.1') + + await release('2.0.0', 'beta') + await checkVersion('1.0.1') + await qq.x.stdout('./tmp/example-cli/bin/example-cli', ['update']) + await checkVersion('1.0.1') + await qq.x.stdout('./tmp/example-cli/bin/example-cli', ['update', 'beta']) + await checkVersion(`2.0.0-beta.${sha}`) }) }) diff --git a/test/mocha.opts b/test/mocha.opts index ccc7f349..18ecfd98 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -4,4 +4,4 @@ --watch-extensions ts --recursive --reporter spec ---timeout 5000 +--timeout 0 diff --git a/tslint.json b/tslint.json index f5703540..e910b534 100644 --- a/tslint.json +++ b/tslint.json @@ -1,3 +1,6 @@ { - "extends": "@oclif/tslint" + "extends": "@oclif/tslint", + "rules": { + "no-useless-files": false + } } diff --git a/yarn.lock b/yarn.lock index a2b2d227..17ce0dc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,6 +15,15 @@ version "1.0.0" resolved "https://registry.yarnpkg.com/@heroku/linewrap/-/linewrap-1.0.0.tgz#a9d4e99f0a3e423a899b775f5f3d6747a1ff15c6" +"@oclif/command@^1.4.10": + version "1.4.10" + resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.10.tgz#15d229ba975018ca62cf4a94bec6d9796e18b619" + dependencies: + "@oclif/errors" "^1.0.4" + "@oclif/parser" "^3.2.13" + debug "^3.1.0" + semver "^5.5.0" + "@oclif/command@^1.4.7": version "1.4.7" resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.7.tgz#32423fcb3317c1e9fd5b864c728ddd5e4f8fd361" @@ -24,15 +33,6 @@ debug "^3.1.0" semver "^5.5.0" -"@oclif/command@^1.4.9": - version "1.4.9" - resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.9.tgz#009bd5bb717ceb445bb81f08767c17cd4e7c7f02" - dependencies: - "@oclif/errors" "^1.0.4" - "@oclif/parser" "^3.2.11" - debug "^3.1.0" - semver "^5.5.0" - "@oclif/config@^1.4.0": version "1.4.6" resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.6.tgz#cb7adde8398ea6aec669b70a8a6e7b8903cc9b45" @@ -45,23 +45,21 @@ dependencies: debug "^3.1.0" -"@oclif/dev-cli@^1.9.7": - version "1.9.7" - resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.7.tgz#e575574264b77f2b7fe92731507e40ef71daf110" +"@oclif/dev-cli@^1.9.11": + version "1.9.11" + resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.11.tgz#3f98c49f5c835f0daefaf474383270d521b1484d" dependencies: - "@heroku-cli/color" "^1.1.3" - "@oclif/command" "^1.4.9" + "@oclif/command" "^1.4.10" "@oclif/config" "^1.4.7" "@oclif/errors" "^1.0.4" "@oclif/plugin-help" "^1.2.3" "@oclif/plugin-warn-if-update-available" "^1.3.0" - cli-ux "^3.3.27" + cli-ux "^3.3.28" debug "^3.1.0" fs-extra "^5.0.0" lodash "^4.17.5" - lodash.template "^4.4.0" normalize-package-data "^2.4.0" - qqjs "^0.3.4" + qqjs "^0.3.6" require-resolve "^0.0.2" tslib "^1.9.0" @@ -85,11 +83,15 @@ strip-ansi "^4.0.0" wrap-ansi "^3.0.1" -"@oclif/parser@^3.2.11": - version "3.2.12" - resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.12.tgz#1ff34a98fa73b2ecb8b2b11daf139b9e151b52c6" +"@oclif/linewrap@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91" + +"@oclif/parser@^3.2.13": + version "3.2.13" + resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.13.tgz#4baf2b4ea23165e57adaae1f223861d8d9a33a24" dependencies: - "@heroku/linewrap" "^1.0.0" + "@oclif/linewrap" "^1.0.0" chalk "^2.3.2" "@oclif/parser@^3.2.9": @@ -149,16 +151,38 @@ dependencies: "@types/node" "*" +"@types/events@*": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + +"@types/execa@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@types/execa/-/execa-0.9.0.tgz#9b025d2755f17e80beaf9368c3f4f319d8b0fb93" + dependencies: + "@types/node" "*" + "@types/fs-extra@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.1.tgz#cd856fbbdd6af2c11f26f8928fd8644c9e9616c9" dependencies: "@types/node" "*" +"@types/glob@^5.0.35": + version "5.0.35" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.35.tgz#1ae151c802cece940443b5ac246925c85189f32a" + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + "@types/lodash@^4.14.106": version "4.14.106" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.106.tgz#6093e9a02aa567ddecfe9afadca89e53e5dce4dd" +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + "@types/mocha@^5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.0.0.tgz#a3014921991066193f6c8e47290d4d598dfd19e6" @@ -179,6 +203,10 @@ version "3.1.0" resolved "https://registry.yarnpkg.com/@types/supports-color/-/supports-color-3.1.0.tgz#3584b6b54f45333e988da2c29e6797eff5a20f8c" +"@types/write-json-file@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@types/write-json-file/-/write-json-file-2.2.1.tgz#74155aaccbb0d532be21f9d66bebc4ea875a5a62" + ansi-escapes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" @@ -407,11 +435,11 @@ 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@^3.3.27: - version "3.3.27" - resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.3.27.tgz#1ee13e5d4dbce4980e14f2abf368a3aed54743b4" +cli-ux@^3.3.28: + version "3.3.28" + resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.3.28.tgz#9d516d389a9bbca272e8a195f7cac6c61d0e69fa" dependencies: - "@heroku/linewrap" "^1.0.0" + "@oclif/linewrap" "^1.0.0" "@oclif/screen" "^1.0.2" ansi-styles "^3.2.1" cardinal "^1.0.0" @@ -1310,9 +1338,9 @@ pump@^1.0.0: end-of-stream "^1.1.0" once "^1.3.1" -qqjs@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.4.tgz#60581f655e980f41c6e57fcd7522dd5179f00add" +qqjs@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.6.tgz#6e4b8008489a055fb95a93365154a9e777e9b784" dependencies: chalk "^2.3.2" debug "^3.1.0"