Skip to content

Commit

Permalink
feat: remove legacy update logic (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Oct 20, 2021
1 parent 7a65d7d commit 5241c20
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 60 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"bugs": "https://github.com/oclif/plugin-update/issues",
"dependencies": {
"@oclif/color": "^0.1.0",
"@oclif/core": "^0.5.39",
"@oclif/core": "^1.0.1",
"@types/semver": "^7.3.4",
"cli-ux": "^5.5.1",
"cross-spawn": "^7.0.3",
Expand All @@ -19,7 +19,6 @@
"tar-fs": "^2.1.1"
},
"devDependencies": {
"@oclif/dev-cli": "^1.26.0",
"@oclif/plugin-help": "^5.1.0",
"@oclif/test": "^1.2.8",
"@types/chai": "^4.2.15",
Expand Down
19 changes: 0 additions & 19 deletions src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,6 @@ export default class UpdateCommand extends Command {
const http: typeof HTTP = require('http-call').HTTP

cli.action.status = 'fetching manifest'
if (!this.config.scopedEnvVarTrue('USE_LEGACY_UPDATE')) {
try {
const newManifestUrl = this.config.s3Url(
this.s3ChannelManifestKey(
this.config.bin,
this.config.platform,
this.config.arch,
(this.config.pjson.oclif.update.s3 as any).folder,
),
)
const {body} = await http.get<IManifest | string>(newManifestUrl)
if (typeof body === 'string') {
return JSON.parse(body)
}
return body
} catch (error: any) {
this.debug(error.message)
}
}

try {
const url = this.config.s3Url(this.config.s3Key('manifest', {
Expand Down
61 changes: 22 additions & 39 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
supports-color "^5.4.0"
tslib "^1"

"@oclif/command@^1.5.10", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0", "@oclif/command@^1.8.0":
"@oclif/command@^1.5.10", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.0.tgz#c1a499b10d26e9d1a611190a81005589accbb339"
integrity sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==
Expand All @@ -95,7 +95,7 @@
debug "^4.1.1"
semver "^7.3.2"

"@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1", "@oclif/config@^1.17.0":
"@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1":
version "1.17.0"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.17.0.tgz#ba8639118633102a7e481760c50054623d09fcab"
integrity sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==
Expand Down Expand Up @@ -130,24 +130,28 @@
widest-line "^3.1.0"
wrap-ansi "^7.0.0"

"@oclif/dev-cli@^1.26.0":
version "1.26.0"
resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.26.0.tgz#e3ec294b362c010ffc8948003d3770955c7951fd"
integrity sha512-272udZP+bG4qahoAcpWcMTJKiA+V42kRMqQM7n4tgW35brYb2UP5kK+p08PpF8sgSfRTV8MoJVJG9ax5kY82PA==
"@oclif/core@^1.0.1":
version "1.0.1"
resolved "https://registry.npmjs.org/@oclif/core/-/core-1.0.1.tgz#e97fc5c234db1a745fb4468eb79cabeea5f84af9"
integrity sha512-ai9XwnEZ+P34VUtV+fX/6HmRbo5CXGdZjX3iK3PsY6O+KYeJBKVAkPCKLz0qtAHxx0HX4+Yj2wnmy+hTCx6HYQ==
dependencies:
"@oclif/command" "^1.8.0"
"@oclif/config" "^1.17.0"
"@oclif/errors" "^1.3.3"
"@oclif/plugin-help" "^3.2.0"
cli-ux "^5.2.1"
"@oclif/linewrap" "^1.0.0"
chalk "^4.1.0"
clean-stack "^3.0.0"
cli-ux "^5.1.0"
debug "^4.1.1"
find-yarn-workspace-root "^2.0.0"
fs-extra "^8.1"
github-slugger "^1.2.1"
lodash "^4.17.11"
normalize-package-data "^3.0.0"
qqjs "^0.3.10"
tslib "^2.0.3"
fs-extra "^9.0.1"
get-package-type "^0.1.0"
globby "^11.0.1"
indent-string "^4.0.0"
is-wsl "^2.1.1"
lodash.template "^4.4.0"
semver "^7.3.2"
string-width "^4.2.0"
strip-ansi "^6.0.0"
tslib "^2.0.0"
widest-line "^3.1.0"
wrap-ansi "^7.0.0"

"@oclif/errors@^1.2.1", "@oclif/errors@^1.2.2", "@oclif/errors@^1.3.3":
version "1.3.4"
Expand Down Expand Up @@ -200,22 +204,6 @@
widest-line "^3.1.0"
wrap-ansi "^4.0.0"

"@oclif/plugin-help@^3.2.0":
version "3.2.3"
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.3.tgz#cd24010e7eb326782843d3aa6d6b5a4affebb2c3"
integrity sha512-l2Pd0lbOMq4u/7xsl9hqISFqyR9gWEz/8+05xmrXFr67jXyS6EUCQB+mFBa0wepltrmJu0sAFg9AvA2mLaMMqQ==
dependencies:
"@oclif/command" "^1.5.20"
"@oclif/config" "^1.15.1"
"@oclif/errors" "^1.2.2"
chalk "^4.1.0"
indent-string "^4.0.0"
lodash.template "^4.4.0"
string-width "^4.2.0"
strip-ansi "^6.0.0"
widest-line "^3.1.0"
wrap-ansi "^4.0.0"

"@oclif/plugin-help@^5.1.0":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.1.1.tgz#d24bf4669ddfc9319d9844c7d210b606441216a3"
Expand Down Expand Up @@ -4861,11 +4849,6 @@ tslib@^2.0.0, tslib@^2.1.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==

tslib@^2.0.3:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==

tsutils@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
Expand Down

0 comments on commit 5241c20

Please sign in to comment.