diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 155ee99f..19c9bd70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -339,10 +339,15 @@ e.g: Before releasing, the following steps must be completed: 1. Schedule a code freeze -2. Decide what version bump the package needs (major, minor, or patch) +2. Decide what type of version bump the package needs + - `yarn release ` - `yarn release major` - `yarn release minor` - `yarn release patch` + - `yarn release premajor --pre ` + - `yarn release preminor --pre ` + - `yarn release prepatch --pre ` + - `yarn release prerelease --pre ` 3. Open a new PR from `release/*` into `main` - do **not** change the PR title - should match `release: @` diff --git a/package.json b/package.json index 47c60d31..e2adef55 100644 --- a/package.json +++ b/package.json @@ -147,6 +147,7 @@ "tsconfig": "7.0.0", "tsconfig-paths": "4.0.0", "unbuild": "0.7.6", + "version-bump-prompt": "6.1.0", "vite-tsconfig-paths": "3.5.0", "vitest": "0.20.3", "vitest-github-actions-reporter": "0.8.1", diff --git a/scripts/release.sh b/scripts/release.sh index c96b4532..5b3d7968 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -4,7 +4,7 @@ # # References: # -# - https://yarnpkg.com/cli/version +# - https://github.com/JS-DevTools/version-bump-prompt#usage # - https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli # 1. run tests @@ -18,7 +18,7 @@ # 9. push release branch to origin yarn test -yarn version -i $@ +bump $@ conventional-changelog -n ./changelog.config.json -i CHANGELOG.md -s VERSION=$(fx package.json '.version') RELEASE_BRANCH=release/$VERSION diff --git a/yarn.lock b/yarn.lock index 5f887c6c..6086f558 100644 --- a/yarn.lock +++ b/yarn.lock @@ -928,6 +928,7 @@ __metadata: tsconfig: "npm:7.0.0" tsconfig-paths: "npm:4.0.0" unbuild: "npm:0.7.6" + version-bump-prompt: "npm:6.1.0" vite-tsconfig-paths: "npm:3.5.0" vitest: "npm:0.20.3" vitest-github-actions-reporter: "npm:0.8.1" @@ -1052,6 +1053,36 @@ __metadata: languageName: node linkType: hard +"@jsdevtools/ez-spawn@npm:^3.0.4": + version: 3.0.4 + resolution: "@jsdevtools/ez-spawn@npm:3.0.4" + dependencies: + call-me-maybe: "npm:^1.0.1" + cross-spawn: "npm:^7.0.3" + string-argv: "npm:^0.3.1" + type-detect: "npm:^4.0.8" + checksum: 5a1522b3e6434bd8b45aed522c79ee9ffab0ed1154038dc8d73abac3e2af0b111c2bf22a4ac5043fc707a7990b19660a1f7184196d53af7a3d9a047970d40d84 + languageName: node + linkType: hard + +"@jsdevtools/version-bump-prompt@npm:6.1.0": + version: 6.1.0 + resolution: "@jsdevtools/version-bump-prompt@npm:6.1.0" + dependencies: + "@jsdevtools/ez-spawn": "npm:^3.0.4" + command-line-args: "npm:^5.1.1" + detect-indent: "npm:^6.0.0" + detect-newline: "npm:^3.1.0" + globby: "npm:^11.0.1" + inquirer: "npm:^7.3.3" + log-symbols: "npm:^4.0.0" + semver: "npm:^7.3.2" + bin: + bump: bin/bump.js + checksum: 7cb75f3e42e4d538e4dcc8db550f7ad8672745c07cc8639e09c84004426bdf6ceefc35a7e2febef286fbd34b78cc416fcbcf54444668340c993fea9c4d442aa2 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -1695,7 +1726,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.3.0": +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -1781,6 +1812,13 @@ __metadata: languageName: node linkType: hard +"array-back@npm:^3.0.1, array-back@npm:^3.1.0": + version: 3.1.0 + resolution: "array-back@npm:3.1.0" + checksum: c660d6ce965f4a615b2e077f07c7fb1d361c286c0566e06dea40bb69e032d05a9a8b5074b89fab5a02e335dc87f070f365e84e031786caf59d119ba3271b363a + languageName: node + linkType: hard + "array-ify@npm:^1.0.0": version: 1.0.0 resolution: "array-ify@npm:1.0.0" @@ -1985,6 +2023,13 @@ __metadata: languageName: node linkType: hard +"call-me-maybe@npm:^1.0.1": + version: 1.0.1 + resolution: "call-me-maybe@npm:1.0.1" + checksum: c8dc3d89d9e659b019bdcf03c737a4d258651673356cc3d5c8150177a6c3c46f112566774a1acab6e9e64440ac5a53f821dc057c7164a082760021ba82bf5ad3 + languageName: node + linkType: hard + "callsites@npm:^3.0.0, callsites@npm:^3.1.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -2100,6 +2145,13 @@ __metadata: languageName: node linkType: hard +"chardet@npm:^0.7.0": + version: 0.7.0 + resolution: "chardet@npm:0.7.0" + checksum: 8886cf3418ac6ac87aeef0444203ad3829664c4764ea40b00627161cd586cea088ffb9c99e5a1571db0d653016cc4248a1f214bdb36f8cf6b8f7012e9057fa78 + languageName: node + linkType: hard + "check-error@npm:^1.0.2": version: 1.0.2 resolution: "check-error@npm:1.0.2" @@ -2185,6 +2237,13 @@ __metadata: languageName: node linkType: hard +"cli-width@npm:^3.0.0": + version: 3.0.0 + resolution: "cli-width@npm:3.0.0" + checksum: fea352954833d6a9ea97e464135adb687dc96bc0c062603fe1e20c8e4400b7c2eb4dfbbd4b07a9a0dcd9c45c592dc6026e96835afd3bfb56c49455e12fb8fa59 + languageName: node + linkType: hard + "cliui@npm:^7.0.2": version: 7.0.4 resolution: "cliui@npm:7.0.4" @@ -2253,6 +2312,18 @@ __metadata: languageName: node linkType: hard +"command-line-args@npm:^5.1.1": + version: 5.2.1 + resolution: "command-line-args@npm:5.2.1" + dependencies: + array-back: "npm:^3.1.0" + find-replace: "npm:^3.0.0" + lodash.camelcase: "npm:^4.3.0" + typical: "npm:^4.0.0" + checksum: bd2402c0bf97ebebdb060db29b351cc4cf59c0a332c9d4098978adefc59064aa762798056814f5d5421b1081a3a561644c904ef7f798554025c2d076e85b81c1 + languageName: node + linkType: hard + "commander@npm:9.4.0, commander@npm:^9.3.0, commander@npm:^9.4.0": version: 9.4.0 resolution: "commander@npm:9.4.0" @@ -2830,6 +2901,20 @@ __metadata: languageName: node linkType: hard +"detect-indent@npm:^6.0.0": + version: 6.1.0 + resolution: "detect-indent@npm:6.1.0" + checksum: 0f487ae80c5304387dec92ab348cf709111c2860792e2681cd42cfdda0e2242dd32431862a32e8ece7f21fa0ab3205719b69e49fc887c43d79922f0cb2cc328b + languageName: node + linkType: hard + +"detect-newline@npm:^3.1.0": + version: 3.1.0 + resolution: "detect-newline@npm:3.1.0" + checksum: cd4fd05735c6964f5d5a8cfa03aba5e9e89c491fb47f37c89b85f02b2581a1a7e9a2c8b3d904fa575463db59b706aaa494413dd11e10323daf990c33fc2d85bd + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -3685,6 +3770,17 @@ __metadata: languageName: node linkType: hard +"external-editor@npm:^3.0.3": + version: 3.1.0 + resolution: "external-editor@npm:3.1.0" + dependencies: + chardet: "npm:^0.7.0" + iconv-lite: "npm:^0.4.24" + tmp: "npm:^0.0.33" + checksum: 12edf8dafd08209ac07daff12081b68fb882267d83222643768b1bff7997a1bae794db570c6303beae4f0a6cee0620aa37c13aa6ba43b10fd7e92f49f70373a2 + languageName: node + linkType: hard + "fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" @@ -3742,6 +3838,15 @@ __metadata: languageName: node linkType: hard +"figures@npm:^3.0.0": + version: 3.2.0 + resolution: "figures@npm:3.2.0" + dependencies: + escape-string-regexp: "npm:^1.0.5" + checksum: 6d482424c6a6eac60b6ff786886ab7a1174e29a3fd664d756fa73fc71730e44016f6032d535f295efd42e9c260897b8dc0f45981c6e6c07a83353cf3afb05021 + languageName: node + linkType: hard + "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -3760,6 +3865,15 @@ __metadata: languageName: node linkType: hard +"find-replace@npm:^3.0.0": + version: 3.0.0 + resolution: "find-replace@npm:3.0.0" + dependencies: + array-back: "npm:^3.0.1" + checksum: 122d4aed8b73dff227d6fc2646cf471fa5a13930b1bb48457c652aa209aa207a3a434a5cfee53d83df3861ca17f12455292bbe54c057cad872e9a42346ed787f + languageName: node + linkType: hard + "find-up@npm:^2.0.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" @@ -4138,7 +4252,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.3, globby@npm:^11.1.0": +"globby@npm:^11.0.1, globby@npm:^11.0.3, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -4385,6 +4499,15 @@ __metadata: languageName: node linkType: hard +"iconv-lite@npm:^0.4.24": + version: 0.4.24 + resolution: "iconv-lite@npm:0.4.24" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3" + checksum: 6cc23a171d6fe7c49ab89956a5f151dfc4db34b48b61cebe887051e35dbb9bebb25bf5e410e8c79efadfd8ed602a0f79f7d7814f77365841e0596c3136408eaf + languageName: node + linkType: hard + "iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" @@ -4470,6 +4593,27 @@ __metadata: languageName: node linkType: hard +"inquirer@npm:^7.3.3": + version: 7.3.3 + resolution: "inquirer@npm:7.3.3" + dependencies: + ansi-escapes: "npm:^4.2.1" + chalk: "npm:^4.1.0" + cli-cursor: "npm:^3.1.0" + cli-width: "npm:^3.0.0" + external-editor: "npm:^3.0.3" + figures: "npm:^3.0.0" + lodash: "npm:^4.17.19" + mute-stream: "npm:0.0.8" + run-async: "npm:^2.4.0" + rxjs: "npm:^6.6.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + through: "npm:^2.3.6" + checksum: 7daea33d3ff79e050a421cdf35cd4a8da614496db70cdd7e0576f2c9f5426af407e8ff5662f6fb3a14bc6fe9107c2f51cc6427459246b44b2b0ab69d016b3008 + languageName: node + linkType: hard + "internal-slot@npm:^1.0.3": version: 1.0.3 resolution: "internal-slot@npm:1.0.3" @@ -4763,6 +4907,13 @@ __metadata: languageName: node linkType: hard +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: 89a336ffc0aaf907bb1072bd5e8aa7187076620d0099607084911a733a055a52712257d619b2ab2031f6f0eb9ba886504384ebe218a6737d9bac734e6baaa736 + languageName: node + linkType: hard + "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -5104,6 +5255,13 @@ __metadata: languageName: node linkType: hard +"lodash.camelcase@npm:^4.3.0": + version: 4.3.0 + resolution: "lodash.camelcase@npm:4.3.0" + checksum: 773d36b52707814ad5b6880fe8ccefa1a490a69cb5d233b9600e00a310ef64b639f56760e383743ac06901f2c073ee4c317b19896397bf1cf94d1cbcf2706923 + languageName: node + linkType: hard + "lodash.ismatch@npm:^4.4.0": version: 4.4.0 resolution: "lodash.ismatch@npm:4.4.0" @@ -5125,6 +5283,16 @@ __metadata: languageName: node linkType: hard +"log-symbols@npm:^4.0.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: "npm:^4.1.0" + is-unicode-supported: "npm:^0.1.0" + checksum: 07e344c4cc89ae0184979f26cca88cfd258dd1f05a8737e3942674af7d3d77e6a367c091398d46593d9144ea7673342afd1132b3b901ce6dc78fd1eeb00ea01c + languageName: node + linkType: hard + "log-update@npm:^4.0.0": version: 4.0.0 resolution: "log-update@npm:4.0.0" @@ -5630,6 +5798,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:0.0.8": + version: 0.0.8 + resolution: "mute-stream@npm:0.0.8" + checksum: 93cf7e69722c5c56365fb005bfcb31aa3bbcaeb96098223e8893983a65bd6f025bfb44916a7efb658559e59da2d351c50a8441180e5451443c0e8e5d99a35e1b + languageName: node + linkType: hard + "mvdan-sh@npm:^0.10.1": version: 0.10.1 resolution: "mvdan-sh@npm:0.10.1" @@ -5938,6 +6113,13 @@ __metadata: languageName: node linkType: hard +"os-tmpdir@npm:~1.0.2": + version: 1.0.2 + resolution: "os-tmpdir@npm:1.0.2" + checksum: c69d1cc11e9da80f1e2b21a08566fec9a690e4b5bc47b3ac996cfe8d24f4e9e6857779a39a326bf322f2e8bc936ada1a92d48aa10c6dda99c13c551c23bdadfb + languageName: node + linkType: hard + "p-finally@npm:^2.0.0": version: 2.0.1 resolution: "p-finally@npm:2.0.1" @@ -6755,6 +6937,13 @@ __metadata: languageName: node linkType: hard +"run-async@npm:^2.4.0": + version: 2.4.1 + resolution: "run-async@npm:2.4.1" + checksum: bf03d6deaab379c48b1c0c9aae808a286cef93744da27841c6b28ba1310e9fc000272e54b0c34172818ec2f149e44e3a9791ddc4fcb9b9df64d43f5a4bebfc6f + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -6764,6 +6953,15 @@ __metadata: languageName: node linkType: hard +"rxjs@npm:^6.6.0": + version: 6.6.7 + resolution: "rxjs@npm:6.6.7" + dependencies: + tslib: "npm:^1.9.0" + checksum: f593c1d7a24848a2c937d31b806b7940a7fad61902eea6893dad51298f42291585c3339112eec876671a5cd0eb3cf73da14e45a91255440db239c8f640f57ada + languageName: node + linkType: hard + "rxjs@npm:^7.5.5": version: 7.5.6 resolution: "rxjs@npm:7.5.6" @@ -6796,7 +6994,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3.0.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: d4199666e9e792968c0b88c2c35dd400f56d3eecb9affbcf5207922822eadf30cc06995bae3c5d0a653851bbd40fc0af578bf046bbf734199ce22433ba4da659 @@ -6819,7 +7017,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.3.7, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7": +"semver@npm:7.3.7, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7": version: 7.3.7 resolution: "semver@npm:7.3.7" dependencies: @@ -7329,7 +7527,7 @@ __metadata: languageName: node linkType: hard -"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.8": +"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.6, through@npm:^2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: c9d6883ace26b3c967283827cafdd4ceee6164fa4d3754865f5032dcb564e0cbdea9dc6f43806afa51e1f2863d8e3beca141cbf7b8dcff989982aef69bb851c0 @@ -7360,6 +7558,15 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.0.33": + version: 0.0.33 + resolution: "tmp@npm:0.0.33" + dependencies: + os-tmpdir: "npm:~1.0.2" + checksum: 0800f6e40216bf17e4ecd68f507e4325829723e3db7a1b9ebcfdd28e49d6061a222942265d97251f72c03ced281cf53b42e55f9f9f5135a811fc2294b05a184c + languageName: node + linkType: hard + "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -7500,7 +7707,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.8.1, tslib@npm:^1.9.3": +"tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 441af59dc42ad4ae57140e62cb362369620c6076845c2c2b0ecc863c1d719ce24fdbc301e9053433fef43075e061bf84b702318ff1204b496a5bba10baf9eb9f @@ -7541,7 +7748,7 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:^4.0.0, type-detect@npm:^4.0.5": +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.5, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 2d2111a44529a381e9be7090066cc89b60ac2c822194e3d213a0d5f630e81abfd07d2b91a324ef4a173973c5b0c68b0bdf29ac6896459cf819914a6f56199e0f @@ -7619,6 +7826,13 @@ __metadata: languageName: node linkType: hard +"typical@npm:^4.0.0": + version: 4.0.0 + resolution: "typical@npm:4.0.0" + checksum: 021d8f02081e739799915b683c23b34146c2bb9ebc5d7474ef041bac023cf323b381fe8554a869bdf1daade0ea6ed413860e16cf790747418275d8fd25030ad9 + languageName: node + linkType: hard + "uc.micro@npm:^1.0.1, uc.micro@npm:^1.0.5": version: 1.0.6 resolution: "uc.micro@npm:1.0.6" @@ -7831,6 +8045,17 @@ __metadata: languageName: node linkType: hard +"version-bump-prompt@npm:6.1.0": + version: 6.1.0 + resolution: "version-bump-prompt@npm:6.1.0" + dependencies: + "@jsdevtools/version-bump-prompt": "npm:6.1.0" + bin: + bump: bump.js + checksum: 6423d66a28bc849c1570f1f7108db485dbb78c0c2a19333cae26ebf1ac09c8e52c2b09e6f2ea0b76be884899da29e94b5fd027da215dda1f7d0380d9d4f768ed + languageName: node + linkType: hard + "vite-tsconfig-paths@npm:3.5.0": version: 3.5.0 resolution: "vite-tsconfig-paths@npm:3.5.0"