Skip to content

Commit

Permalink
publish patched @oclif/core
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Razon committed Nov 27, 2023
1 parent 5455c2e commit f9f3d90
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 74 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/npm-publish-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: yarn
# cache: yarn

- run: |
rm -rf node_modules packages/*/node_modules
find `yarn cache dir` -maxdepth 1 -name '*oclif*' -delete
- run: yarn

Expand Down Expand Up @@ -61,10 +65,10 @@ jobs:
yarn -s lerna version $VERSION --no-git-tag-version --preid $GIT_ID --ignore-scripts --exact --yes
# commit that goes nowhere
git commit -m "canary version $VERSION" lerna.json packages/*/package.json
git commit -m "canary version $VERSION" lerna.json packages/*/package.json yarn.lock
# publish
yarn -s lerna publish from-package --pre-dist-tag $GIT_ID --yes
yarn -s lerna publish from-package --pre-dist-tag $GIT_ID --dist-tag $GIT_ID --pre-dist-tag $GIT_ID --yes
# undo the commit
git reset --hard HEAD^1
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"private": true,
"workspaces": [
"packages/*"
],
"workspaces": ["packages/*"],
"devDependencies": {
"husky": "^8.0.0",
"lerna": "^6.6.2",
Expand All @@ -13,6 +11,9 @@
"syncpack": "^9.8.4",
"typescript": "^5.0.4"
},
"resolutions": {
"**/@oclif/core": "livecycle/oclif-core-patched-for-preevy#v3.12.0-preevy-patch-9"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --cache --fix"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@preevy/core": "0.0.56",
"chalk": "^4.1.2",
"iter-tools-es": "^7.5.3",
Expand Down
1 change: 1 addition & 0 deletions packages/cli-common/src/commands/base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ abstract class BaseCommand<T extends typeof Command=typeof Command> extends Comm
})
emitter.unref()
await emitter.flush()
// eslint-disable-next-line @typescript-eslint/return-await
return await super.catch(error)
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"dependencies": {
"@inquirer/confirm": "^2.0.14",
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@oclif/plugin-help": "^5",
"@preevy/cli-common": "0.0.56",
"@preevy/common": "0.0.56",
Expand All @@ -38,6 +38,7 @@
"yaml": "^2.3.2"
},
"devDependencies": {
"@types/cli-progress": "^3.11.5",
"@types/inquirer": "^8.0.0",
"@types/inquirer-autocomplete-prompt": "^3.0.3",
"@types/lodash": "^4.14.192",
Expand Down Expand Up @@ -95,14 +96,13 @@
"dist/hooks/**/*.js"
]
},
"bundleDependencies": ["@oclif/core"],
"scripts": {
"build": "yarn clean && tsc -b",
"clean": "shx rm -rf dist",
"lint": "eslint . --ext .ts --cache",
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "yarn build && oclif manifest && oclif readme --dir docs --multi && ./scripts/prepare_and_copy_docs.sh",
"prepack": "yarn build && ./scripts/validate-tsconfig && oclif manifest && oclif readme --dir docs --multi && ./scripts/prepare_and_copy_docs.sh",
"cli": "./bin/dev",
"version": "oclif readme && git add README.md"
},
Expand Down
14 changes: 14 additions & 0 deletions packages/cli/scripts/validate-tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node
const path = require('path')
const util = require('util')
const fs = require('fs')

const tsConfig = path.join(__dirname, '..', './tsconfig.json')

try {
JSON.parse(fs.readFileSync('./tsconfig.json'))
} catch (e) {
console.error('Error parsing %s: oclif expects valid JSON: %j', tsConfig, util.inspect(e))
process.exit(1)
}

4 changes: 2 additions & 2 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lib": ["es2022"],
"esModuleInterop": true,
"sourceMap": true,
"baseUrl": ".",
"baseUrl": "."
},
"include": [
"src/**/*"
Expand All @@ -25,6 +25,6 @@
{ "path": "../driver-gce" },
{ "path": "../driver-azure" },
{ "path": "../driver-kube-pod" },
{ "path": "../plugin-github" },
{ "path": "../plugin-github" }
]
}
2 changes: 1 addition & 1 deletion packages/driver-azure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@azure/arm-subscriptions": "^5.1.0",
"@azure/identity": "^3.2.2",
"@azure/logger": "^1.0.4",
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@preevy/core": "0.0.56",
"inquirer": "^8.0.0",
"inquirer-autocomplete-prompt": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/driver-gce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@google-cloud/compute": "^4.0.1",
"@google-cloud/storage": "^6.9.5",
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@preevy/core": "0.0.56",
"google-auth-library": "^8.7.0",
"google-gax": "^4.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/driver-kube-pod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@kubernetes/client-node": "^0.18.1",
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@preevy/common": "0.0.56",
"@preevy/core": "0.0.56",
"fast-safe-stringify": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/driver-lightsail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@aws-sdk/client-s3": "^3.271.0",
"@aws-sdk/client-sts": "^3.289.0",
"@aws-sdk/util-waiter": "^3.271.0",
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@preevy/core": "0.0.56",
"inquirer": "^8.0.0",
"inquirer-autocomplete-prompt": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@oclif/core": "^3",
"@oclif/core": "3.12.0",
"@preevy/cli-common": "0.0.56",
"@preevy/core": "0.0.56",
"lodash": "^4.17.21",
Expand Down
38 changes: 0 additions & 38 deletions patches/@oclif+core+3.12.0.patch

This file was deleted.

37 changes: 18 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2528,20 +2528,19 @@
dependencies:
nx "15.9.4"

"@oclif/core@^2.15.0":
version "2.15.0"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a"
integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==
"@oclif/[email protected]", "@oclif/core@^3.0.4", "@oclif/core@^3.11.0":
version "3.12.0"
resolved "https://codeload.github.com/livecycle/oclif-core-patched-for-preevy/tar.gz/a76886f9c73fbedc4d18d43134387aadc53ca4f3"
dependencies:
"@types/cli-progress" "^3.11.0"
ansi-escapes "^4.3.2"
ansi-styles "^4.3.0"
cardinal "^2.1.1"
chalk "^4.1.2"
clean-stack "^3.0.1"
cli-progress "^3.12.0"
color "^4.2.3"
debug "^4.3.4"
ejs "^3.1.8"
ejs "^3.1.9"
get-package-type "^0.1.0"
globby "^11.1.0"
hyperlinker "^1.0.0"
Expand All @@ -2556,26 +2555,25 @@
strip-ansi "^6.0.1"
supports-color "^8.1.1"
supports-hyperlinks "^2.2.0"
ts-node "^10.9.1"
tslib "^2.5.0"
tsconfck "^3.0.0"
widest-line "^3.1.0"
wordwrap "^1.0.0"
wrap-ansi "^7.0.0"

"@oclif/core@^3", "@oclif/core@^3.0.4", "@oclif/core@^3.11.0":
version "3.12.0"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.12.0.tgz#4b38b1b5dab2f7585f89c3927a8a157b258b4bd6"
integrity sha512-mT1Vpd1E20IJ7P6GDYOivylPdTHq/xVgFjeCDjitFW86UAklFM8BEFyFB7KpsTvpmjRbCoda3yU10lSI1224lw==
"@oclif/core@^2.15.0":
version "2.15.0"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a"
integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==
dependencies:
"@types/cli-progress" "^3.11.0"
ansi-escapes "^4.3.2"
ansi-styles "^4.3.0"
cardinal "^2.1.1"
chalk "^4.1.2"
clean-stack "^3.0.1"
cli-progress "^3.12.0"
color "^4.2.3"
debug "^4.3.4"
ejs "^3.1.9"
ejs "^3.1.8"
get-package-type "^0.1.0"
globby "^11.1.0"
hyperlinker "^1.0.0"
Expand All @@ -2590,7 +2588,8 @@
strip-ansi "^6.0.1"
supports-color "^8.1.1"
supports-hyperlinks "^2.2.0"
tsconfck "^3.0.0"
ts-node "^10.9.1"
tslib "^2.5.0"
widest-line "^3.1.0"
wordwrap "^1.0.0"
wrap-ansi "^7.0.0"
Expand Down Expand Up @@ -3789,10 +3788,10 @@
resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8"
integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==

"@types/cli-progress@^3.11.0":
version "3.11.0"
resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.0.tgz#ec79df99b26757c3d1c7170af8422e0fc95eef7e"
integrity sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg==
"@types/cli-progress@^3.11.0", "@types/cli-progress@^3.11.5":
version "3.11.5"
resolved "https://registry.yarnpkg.com/@types/cli-progress/-/cli-progress-3.11.5.tgz#9518c745e78557efda057e3f96a5990c717268c3"
integrity sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g==
dependencies:
"@types/node" "*"

Expand Down

0 comments on commit f9f3d90

Please sign in to comment.