diff --git a/packages/karbon/scripts/release.mts b/packages/karbon/scripts/release.mts new file mode 100644 index 00000000..3c2246ca --- /dev/null +++ b/packages/karbon/scripts/release.mts @@ -0,0 +1,19 @@ +import { $ } from 'zx' + +await $`git pull --rebase --autostash` + +const res = await $`yarn prettier --check package.json`.nothrow() + +if (res.exitCode !== 0) { + await $`yarn prettier --write package.json` + await $`git add package.json` + await $`git commit -m "style: format package.json"` +} + +await $`git push` + +await $`yarn run lint` +await $`yarn run prepack` +await $`yarn run changelogen --release` +await $`yarn npm publish` +await $`git push --follow-tags` diff --git a/yarn.lock b/yarn.lock index 2b627e50..eadfcc12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3026,7 +3026,7 @@ __metadata: tiny-invariant: "npm:^1.3.1" ts-pattern: "npm:^5.0.6" tsup: "npm:8.0.1" - tsx: "npm:4.7.0" + tsx: "npm:^4.7.0" type-fest: "npm:^4.8.3" typescript: "npm:5.3.3" typesense: "npm:^1.7.2" @@ -3047,6 +3047,7 @@ __metadata: vue3-lazy-hydration: "npm:^1.2.1" zod: "npm:^3.22.4" zod-validation-error: "npm:^2.1.0" + zx: "npm:^7.2.3" bin: karbon: ./bin/karbon.mjs languageName: unknown @@ -3157,7 +3158,7 @@ __metadata: languageName: node linkType: hard -"@types/fs-extra@npm:11.0.4": +"@types/fs-extra@npm:11.0.4, @types/fs-extra@npm:^11.0.1": version: 11.0.4 resolution: "@types/fs-extra@npm:11.0.4" dependencies: @@ -3272,7 +3273,7 @@ __metadata: languageName: node linkType: hard -"@types/minimist@npm:1.2.5": +"@types/minimist@npm:1.2.5, @types/minimist@npm:^1.2.2": version: 1.2.5 resolution: "@types/minimist@npm:1.2.5" checksum: 477047b606005058ab0263c4f58097136268007f320003c348794f74adedc3166ffc47c80ec3e94687787f2ab7f4e72c468223946e79892cf0fd9e25e9970a90 @@ -3295,6 +3296,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.16.3": + version: 18.19.3 + resolution: "@types/node@npm:18.19.3" + dependencies: + undici-types: "npm:~5.26.4" + checksum: b95d0c0be342275e27d882bb6ca73c0b757d1672a121cae1fc3249eda4f86a8abeb5745e5c5c1150914bcfda323a3fc51526cd34e2097f8355bf7cbf12fa6bcb + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0": version: 2.4.1 resolution: "@types/normalize-package-data@npm:2.4.1" @@ -3316,6 +3326,13 @@ __metadata: languageName: node linkType: hard +"@types/ps-tree@npm:^1.1.2": + version: 1.1.6 + resolution: "@types/ps-tree@npm:1.1.6" + checksum: bf5b7bb9bd11b8762a8302b93c335728ecb19c85a74c640a3888d476368a03733f11612b9a87b1ad9ea56f95720db23a824c78113b16024dc59264b7f9008df5 + languageName: node + linkType: hard + "@types/qs@npm:^6.5.3": version: 6.9.7 resolution: "@types/qs@npm:6.9.7" @@ -3407,6 +3424,13 @@ __metadata: languageName: node linkType: hard +"@types/which@npm:^3.0.0": + version: 3.0.3 + resolution: "@types/which@npm:3.0.3" + checksum: eee298875ff62f7d56a2267cd70789a7032647c599d6abc684864281923763c082626b9742d4cfa7ea3e0790ac5d05aff48edd6ecba0f61eb69a6d57cc83c6f5 + languageName: node + linkType: hard + "@typescript-eslint/eslint-plugin@npm:^6.5.0, @typescript-eslint/eslint-plugin@npm:^6.7.0": version: 6.7.0 resolution: "@typescript-eslint/eslint-plugin@npm:6.7.0" @@ -6583,7 +6607,7 @@ __metadata: languageName: node linkType: hard -"duplexer@npm:^0.1.1, duplexer@npm:^0.1.2": +"duplexer@npm:^0.1.1, duplexer@npm:^0.1.2, duplexer@npm:~0.1.1": version: 0.1.2 resolution: "duplexer@npm:0.1.2" checksum: 62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0 @@ -7540,6 +7564,21 @@ __metadata: languageName: node linkType: hard +"event-stream@npm:=3.3.4": + version: 3.3.4 + resolution: "event-stream@npm:3.3.4" + dependencies: + duplexer: "npm:~0.1.1" + from: "npm:~0" + map-stream: "npm:~0.1.0" + pause-stream: "npm:0.0.11" + split: "npm:0.3" + stream-combiner: "npm:~0.0.4" + through: "npm:~2.3.1" + checksum: 48ea0e17df89ff45778c25e7111a6691401c902162823ddd7656d83fc972e75380f789f7a48f272f50fe7015420cc04f835d458560bf95e34b2c7a479570c8fb + languageName: node + linkType: hard + "events@npm:^3.3.0": version: 3.3.0 resolution: "events@npm:3.3.0" @@ -7947,6 +7986,13 @@ __metadata: languageName: node linkType: hard +"from@npm:~0": + version: 0.1.7 + resolution: "from@npm:0.1.7" + checksum: b85125b7890489656eb2e4f208f7654a93ec26e3aefaf3bbbcc0d496fc1941e4405834fcc9fe7333192aa2187905510ace70417bbf9ac6f6f4784a731d986939 + languageName: node + linkType: hard + "fs-constants@npm:^1.0.0": version: 1.0.0 resolution: "fs-constants@npm:1.0.0" @@ -8054,6 +8100,15 @@ __metadata: languageName: node linkType: hard +"fx@npm:*": + version: 31.0.0 + resolution: "fx@npm:31.0.0" + bin: + fx: index.js + checksum: 2f3f0ad63b738daee73374dc576f54dd2bdf3439502062958a8ec9b0aec138f89b987ad0d154125e51bb6cbc6ada0f9fb952e4d542d5d29ac5f8dc65658c1bfc + languageName: node + linkType: hard + "gauge@npm:^3.0.0": version: 3.0.2 resolution: "gauge@npm:3.0.2" @@ -8369,7 +8424,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^13.2.2": +"globby@npm:^13.1.4, globby@npm:^13.2.2": version: 13.2.2 resolution: "globby@npm:13.2.2" dependencies: @@ -10288,6 +10343,13 @@ __metadata: languageName: node linkType: hard +"map-stream@npm:~0.1.0": + version: 0.1.0 + resolution: "map-stream@npm:0.1.0" + checksum: f04a07041dccdf8140a4a6613e4731e917153ee031d3c837cb32ea7d609e8fbea538c44053718772f59dd1dca0ce68a5689ad006688612ee720d78bacf5bf24d + languageName: node + linkType: hard + "mdast-util-from-markdown@npm:^0.8.5": version: 0.8.5 resolution: "mdast-util-from-markdown@npm:0.8.5" @@ -10961,6 +11023,17 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:3.3.1, node-fetch@npm:^3.3.1": + version: 3.3.1 + resolution: "node-fetch@npm:3.3.1" + dependencies: + data-uri-to-buffer: "npm:^4.0.0" + fetch-blob: "npm:^3.1.4" + formdata-polyfill: "npm:^4.0.10" + checksum: 9fed9ed9ab83f719ffbe51b5029f32ee9820a725afc57a3e6a7e5742a05dd38b22d005f2d03d70e8e0924b497e513b08992843bb1bc7f0a15b72ad071d8c1271 + languageName: node + linkType: hard + "node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.7": version: 2.6.12 resolution: "node-fetch@npm:2.6.12" @@ -10975,17 +11048,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^3.3.1": - version: 3.3.1 - resolution: "node-fetch@npm:3.3.1" - dependencies: - data-uri-to-buffer: "npm:^4.0.0" - fetch-blob: "npm:^3.1.4" - formdata-polyfill: "npm:^4.0.10" - checksum: 9fed9ed9ab83f719ffbe51b5029f32ee9820a725afc57a3e6a7e5742a05dd38b22d005f2d03d70e8e0924b497e513b08992843bb1bc7f0a15b72ad071d8c1271 - languageName: node - linkType: hard - "node-forge@npm:^1.3.1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -12115,6 +12177,15 @@ __metadata: languageName: node linkType: hard +"pause-stream@npm:0.0.11": + version: 0.0.11 + resolution: "pause-stream@npm:0.0.11" + dependencies: + through: "npm:~2.3" + checksum: 1407efadfe814b5c487e4b28d6139cb7e03ee5d25fbb5f89a68f2053e81f05ce6b2bec196eeb3d46ef2c856f785016d14816b0d0e3c3abd1b64311c5c20660dc + languageName: node + linkType: hard + "peek-readable@npm:^5.0.0": version: 5.0.0 resolution: "peek-readable@npm:5.0.0" @@ -12909,6 +12980,17 @@ __metadata: languageName: node linkType: hard +"ps-tree@npm:^1.2.0": + version: 1.2.0 + resolution: "ps-tree@npm:1.2.0" + dependencies: + event-stream: "npm:=3.3.4" + bin: + ps-tree: ./bin/ps-tree.js + checksum: 0587defdc20c0768fad884623c0204c77e5228878a5cb043676b00529220ec12d9cb6a328a0580767a9909a317bff466fe4530a4676e3d145a9deb3b7fbbeef3 + languageName: node + linkType: hard + "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -13986,6 +14068,15 @@ __metadata: languageName: node linkType: hard +"split@npm:0.3": + version: 0.3.3 + resolution: "split@npm:0.3.3" + dependencies: + through: "npm:2" + checksum: 41b397e9fedc984ee1b061780bf173ef72a4f99265ca9cbccd9765b8cc0729eeee6cdeaf70664eb3eb0823e8430db033e50a33050498d75569fc743c6964c84e + languageName: node + linkType: hard + "splitpanes@npm:^3.1.5": version: 3.1.5 resolution: "splitpanes@npm:3.1.5" @@ -14062,6 +14153,15 @@ __metadata: languageName: node linkType: hard +"stream-combiner@npm:~0.0.4": + version: 0.0.4 + resolution: "stream-combiner@npm:0.0.4" + dependencies: + duplexer: "npm:~0.1.1" + checksum: 844b622cfe8b9de45a6007404f613b60aaf85200ab9862299066204242f89a7c8033b1c356c998aa6cfc630f6cd9eba119ec1c6dc1f93e245982be4a847aee7d + languageName: node + linkType: hard + "streamx@npm:^2.15.0": version: 2.15.0 resolution: "streamx@npm:2.15.0" @@ -14644,7 +14744,7 @@ __metadata: languageName: node linkType: hard -"through@npm:^2.3.4, through@npm:^2.3.6, through@npm:^2.3.8": +"through@npm:2, through@npm:^2.3.4, through@npm:^2.3.6, through@npm:^2.3.8, through@npm:~2.3, through@npm:~2.3.1": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: 5da78346f70139a7d213b65a0106f3c398d6bc5301f9248b5275f420abc2c4b1e77c2abc72d218dedc28c41efb2e7c312cb76a7730d04f9c2d37d247da3f4198 @@ -14930,7 +15030,7 @@ __metadata: languageName: node linkType: hard -"tsx@npm:4.7.0": +"tsx@npm:4.7.0, tsx@npm:^4.7.0": version: 4.7.0 resolution: "tsx@npm:4.7.0" dependencies: @@ -16279,6 +16379,15 @@ __metadata: languageName: node linkType: hard +"webpod@npm:^0": + version: 0.0.2 + resolution: "webpod@npm:0.0.2" + bin: + webpod: dist/index.js + checksum: 32a893b1239766f95cfe9f6900ca000278cb7c46626ce0ded3492744e44a3015e28721ccf01e1855dd44b8b815d4c47abcfd6555cd1eb50f98f39ad1396b5c12 + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -16640,3 +16749,28 @@ __metadata: checksum: 73622ca36a916f785cf528fe612a884b3e0f183dbe6b33365a7d0fc92abdbedf7804c5e2bd8df0a278e1472106d46674281397a3dd800fa9031dc3429758c6ac languageName: node linkType: hard + +"zx@npm:^7.2.3": + version: 7.2.3 + resolution: "zx@npm:7.2.3" + dependencies: + "@types/fs-extra": "npm:^11.0.1" + "@types/minimist": "npm:^1.2.2" + "@types/node": "npm:^18.16.3" + "@types/ps-tree": "npm:^1.1.2" + "@types/which": "npm:^3.0.0" + chalk: "npm:^5.2.0" + fs-extra: "npm:^11.1.1" + fx: "npm:*" + globby: "npm:^13.1.4" + minimist: "npm:^1.2.8" + node-fetch: "npm:3.3.1" + ps-tree: "npm:^1.2.0" + webpod: "npm:^0" + which: "npm:^3.0.0" + yaml: "npm:^2.2.2" + bin: + zx: build/cli.js + checksum: 8dfecbb939cc8390707a686ccf85dcff3ac24ff69482fe5c39ec43848f438d9e84a8e946b823f8a725bf7ac606d1a6c596a3ffc2b7aaa22f9480b06b5b777ef9 + languageName: node + linkType: hard