From 39ff428814eccdd476444c536df862d3ade7edc5 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Thu, 22 Feb 2024 13:54:48 -0700 Subject: [PATCH] fix: publish npm-shrinkwrap.json --- .gitignore | 3 +- .lintstagedrc.json | 2 +- commitlint.config.js | 1 - package.json | 21 +++++----- src/commands/schema/generate.ts | 1 - tsconfig.json | 2 +- yarn.lock | 68 ++++++++++----------------------- 7 files changed, 36 insertions(+), 62 deletions(-) delete mode 100644 commitlint.config.js diff --git a/.gitignore b/.gitignore index 1ad35790..32133390 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ oclif.manifest.json yarn-error.json .idea/* -oclif.lock \ No newline at end of file +oclif.lock +npm-shrinkwrap.json diff --git a/.lintstagedrc.json b/.lintstagedrc.json index c3147078..364a0195 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,5 +1,5 @@ { "*.json": ["prettier --write"], "*.md": ["prettier --write"], - "+(src|test)/**/*.+(ts|js)": ["eslint --fix", "prettier --write"] + "+(src|test|bin)/**/*.+(ts|js)": ["eslint --fix", "prettier --write"] } diff --git a/commitlint.config.js b/commitlint.config.js deleted file mode 100644 index 28fe5c5b..00000000 --- a/commitlint.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {extends: ['@commitlint/config-conventional']} diff --git a/package.json b/package.json index 0e481de7..85429b67 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@commitlint/config-conventional": "^18.6.2", - "@oclif/plugin-help": "^5.2.20", + "@oclif/plugin-help": "^6", "@oclif/prettier-config": "^0.2.1", "@oclif/test": "^3.1.12", "@types/chai": "^4.3.11", @@ -32,12 +32,13 @@ "eslint-config-oclif": "^5.0.0", "eslint-config-oclif-typescript": "^3.0.42", "eslint-config-prettier": "^9.1.0", - "husky": "^8.0.3", + "husky": "^9", "lint-staged": "^15.2.2", "mocha": "^10.2.0", "nyc": "^15", "oclif": "^4.4.8", "prettier": "^3.2.5", + "shx": "^0.3.4", "sinon": "^17.0.1", "ts-node": "^10.9.2", "typescript": "^5.2.2" @@ -50,9 +51,7 @@ "/lib", "/npm-shrinkwrap.json", "/oclif.manifest.json", - "/schemas", - "/yarn.lock", - "/oclif.lock" + "/schemas" ], "homepage": "https://github.com/oclif/plugin-command-snapshot", "keywords": [ @@ -78,13 +77,15 @@ }, "repository": "oclif/plugin-command-snapshot", "scripts": { - "build": "rm -rf lib && tsc -b", - "commitlint": "commitlint", + "build": "shx rm -rf lib && tsc", + "clean": "shx rm -f oclif.manifest.json npm-shrinkwrap.json", + "compile": "tsc", "lint": "eslint . --ext .ts", - "postpack": "rm -f oclif.lock oclif.manifest.json", + "postpack": "yarn run clean", "posttest": "yarn lint", - "prepack": "rm -rf lib && tsc -b && oclif lock && oclif manifest . && oclif readme", - "prepare": "husky install && yarn build", + "prepack": "yarn build && oclif manifest && oclif readme && npm shrinkwrap", + "prepare": "husky && yarn build", + "pretest": "yarn build --noEmit && tsc -p test --noEmit", "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\" --timeout 20000", "version": "oclif readme && git add README.md" }, diff --git a/src/commands/schema/generate.ts b/src/commands/schema/generate.ts index 6887b557..2c0821f5 100644 --- a/src/commands/schema/generate.ts +++ b/src/commands/schema/generate.ts @@ -36,7 +36,6 @@ export function getAllFiles(dirPath: string, ext: string, allFiles: string[] = [ export class SchemaGenerator { private classToId: Record = {} - // eslint-disable-next-line no-useless-constructor constructor( private base: SnapshotCommand, private ignoreVoid = true, diff --git a/tsconfig.json b/tsconfig.json index accfb513..cdf151eb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "module": "Node16", "outDir": "lib", - "rootDir": "src", + "rootDirs": ["./src"], "strict": true, "target": "ES2022", "skipLibCheck": true, diff --git a/yarn.lock b/yarn.lock index dfd8c2d1..5d030a13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1310,40 +1310,6 @@ node-gyp "^8.2.0" read-package-json-fast "^2.0.1" -"@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" - debug "^4.3.4" - ejs "^3.1.8" - get-package-type "^0.1.0" - globby "^11.1.0" - hyperlinker "^1.0.0" - indent-string "^4.0.0" - is-wsl "^2.2.0" - js-yaml "^3.14.1" - natural-orderby "^2.0.3" - object-treeify "^1.1.33" - password-prompt "^1.1.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - supports-color "^8.1.1" - supports-hyperlinks "^2.2.0" - ts-node "^10.9.1" - tslib "^2.5.0" - widest-line "^3.1.0" - wordwrap "^1.0.0" - wrap-ansi "^7.0.0" - "@oclif/core@^3.16.0", "@oclif/core@^3.18.1", "@oclif/core@^3.18.2", "@oclif/core@^3.19.2": version "3.19.2" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.19.2.tgz#1672061e7309f0048f9f9991607b303a9e5082fc" @@ -1377,12 +1343,12 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/plugin-help@^5.2.20": - version "5.2.20" - resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.2.20.tgz#4035a0ac231f95fb8e334da342175e3ca00f6abc" - integrity sha512-u+GXX/KAGL9S10LxAwNUaWdzbEBARJ92ogmM7g3gDVud2HioCmvWQCDohNRVZ9GYV9oKwZ/M8xwd6a1d95rEKQ== +"@oclif/plugin-help@^6": + version "6.0.14" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-6.0.14.tgz#9e572fb8394e9cbe2da3465c029eb9521f9c9198" + integrity sha512-orKUsV8hYtbnPf1W7y5wnnR2X6UFOl7hqTh/Uj4E+3ju/8TnvpavZXFA2UQecKWcfdbYjuTwxuZdeh8vBWFLIQ== dependencies: - "@oclif/core" "^2.15.0" + "@oclif/core" "^3.19.2" "@oclif/plugin-help@^6.0.12": version "6.0.12" @@ -2110,7 +2076,7 @@ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.11.tgz#e95050bf79a932cb7305dd130254ccdf9bde671c" integrity sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ== -"@types/cli-progress@^3.11.0", "@types/cli-progress@^3.11.5": +"@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== @@ -4629,10 +4595,10 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -husky@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" - integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +husky@^9: + version "9.0.11" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9" + integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw== hyperlinker@^1.0.0: version "1.0.0" @@ -5684,7 +5650,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.2.0, minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -6380,7 +6346,7 @@ pascal-case@^3.1.2: no-case "^3.0.4" tslib "^2.0.3" -password-prompt@^1.1.2, password-prompt@^1.1.3: +password-prompt@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/password-prompt/-/password-prompt-1.1.3.tgz#05e539f4e7ca4d6c865d479313f10eb9db63ee5f" integrity sha512-HkrjG2aJlvF0t2BMH0e2LB/EHf3Lcq3fNMzy4GYHcQblAvOl+QQji1Lx7WRBMqpVK8p+KR7bCg7oqAMXtdgqyw== @@ -6977,6 +6943,14 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" +shx@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02" + integrity sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g== + dependencies: + minimist "^1.2.3" + shelljs "^0.8.5" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -7445,7 +7419,7 @@ ts-json-schema-generator@^1.5.0: safe-stable-stringify "^2.4.3" typescript "~5.3.2" -ts-node@^10.9.1, ts-node@^10.9.2: +ts-node@^10.9.2: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==