Compare commits

..
260 Commits
Author SHA1 Message Date
simon aa666d7acf lib/get-config.js aktualisiert 2024-02-06 20:49:24 +00:00
28bcc1d54b chore(deps): update dependency prettier to v3.2.5 (#3177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 17:41:14 +00:00
9faded8d50 fix(deps): update dependency marked-terminal to v7
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-06 09:37:02 -08:00
fccab39b87 chore(deps): lock file maintenance (#3179)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-05 01:23:19 +00:00
6be228070f chore(deps): update dependency got to v14.2.0 (#3175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-03 13:53:59 +00:00
518b47d030 chore(deps): update dependency npm-run-all2 to v6.1.2 (#3171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-02 23:06:08 +00:00
c6c01aa1ae ci(action): update github/codeql-action action to v3.24.0 (#3173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-02 22:30:01 +00:00
ee4f99f0cf chore(deps): update dependency ava to v6.1.1 (#3168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-30 05:15:45 +00:00
9b9c9b76c3 chore(deps): update dependency got to v14.1.0 (#3167)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-29 14:53:22 +00:00
Matt TraviandGitHub 211704d102 Merge pull request #3166 from knownasnaffy/patch-1
Docs: fix typo in JS API guide
2024-01-29 08:50:14 -06:00
Barinderpreet SinghandGitHub 01779f4efa docs: fix typo in JS API guide 2024-01-29 19:57:56 +05:30
95ea5ef9b7 chore(deps): lock file maintenance (#3165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-29 03:53:31 +00:00
2fd9685bff chore(deps): update dependency nock to v13.5.1 (#3164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-28 21:18:00 +00:00
c85cde96f2 ci(action): update github/codeql-action action to v3.23.2 (#3161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 16:35:46 +00:00
ac5fdeaf05 chore(deps): lock file maintenance (#3155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-24 01:10:53 +00:00
4044e7a932 ci(action): update github/codeql-action action to v3.23.1 (#3149)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-23 23:09:00 +00:00
440d0661eb ci(action): update actions/upload-artifact action to v4.3.0 (#3156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-23 18:35:58 +00:00
6e57047eca ci(action): update actions/upload-artifact action to v4.2.0 (#3151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 00:24:38 +00:00
58b338bc9b chore(deps): update dependency ava to v6.1.0 (#3154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-21 22:46:36 +00:00
4692834087 chore(deps): update dependency prettier to v3.2.4 (#3147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-17 10:53:25 +00:00
2c04f32744 chore(deps): lock file maintenance (#3143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-15 05:53:20 +00:00
c5071df260 chore(deps): update dependency c8 to v9.1.0 (#3139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 22:27:03 +00:00
2096d44b0c chore(deps): update dependency nock to v13.5.0 (#3142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 20:15:58 +00:00
2c0b371f7b chore(deps): update dependency prettier to v3.2.2 (#3140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-14 05:22:19 +00:00
a2de1057b7 ci(action): update actions/upload-artifact action to v4.1.0 (#3141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-12 22:00:16 +00:00
Matt TraviandGitHub 58e21774cb next major (#3111) 2024-01-12 15:55:05 -06:00
Matt Travi 8066b7fd54 Merge branch 'master' of github.com:semantic-release/semantic-release into beta 2024-01-12 13:21:47 -06:00
f31d43c429 ci(action): update github/codeql-action action to v3.23.0 (#3136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 17:34:06 +00:00
13f980149a chore(deps): lock file maintenance (#3134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 01:54:31 +00:00
020ea7d7d5 fix: use one note reference per tag to prevent conflicts (#2085)
Co-authored-by: Matt Travi <126441+travi@users.noreply.github.com>
2024-01-05 14:51:59 -06:00
6d2a6f1aa6 fix(deps): update dependency marked to v11 (#3079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Travi <programmer@travi.org>
2024-01-05 14:27:04 -06:00
Matt TraviandGitHub ce580be16d Merge branch 'master' into beta 2024-01-05 13:48:05 -06:00
d4b7c9a23d chore(deps): update dependency c8 to v9 (#3128)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-05 19:47:05 +00:00
Matt Travi 7983c57300 ci(renovate): fixed reference to the org-level config 2024-01-01 15:06:05 -06:00
50ad70f229 chore(deps): lock file maintenance (#3126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 06:18:39 +00:00
90513bbc0a chore(deps): update dependency publint to v0.2.7 (#3122)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 04:53:48 +00:00
b07ddfaaf9 chore(deps): update dependency dockerode to v4.0.2 (#3124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 02:10:29 +00:00
acd6f05dad ci(action): update github/codeql-action action to v3.22.12 (#3120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-25 16:13:16 +00:00
5a7fa82309 chore(deps): update dependency dockerode to v4.0.1 (#3121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-25 03:38:41 +00:00
81346ff687 chore(deps): lock file maintenance (#3123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-25 01:45:52 +00:00
a8e0d6d611 chore(deps): update dependency p-retry to v6.2.0 (#3118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 21:33:41 +00:00
Matt Travi afc7518c50 docs: fixed links
fixes #3114
2023-12-18 22:11:31 -06:00
ee110291b2 ci(action): update actions/upload-artifact action to v4 (#3109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 15:58:43 +00:00
f021f25ad2 ci(action): update actions/setup-node action to v4.0.1 (#3116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 12:24:28 +00:00
fd2c179131 chore(deps): lock file maintenance (#3115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 00:37:23 +00:00
Matt Travi ad8f5b2608 docs(node-versions): updated the minimum documented node version in the node requirement doc
relates to https://github.com/semantic-release/semantic-release/issues/3106
2023-12-16 22:32:03 -06:00
Matt Travi 0d0ed9d08a fix(deps): upgraded to the latest version of env-ci
BREAKING CHANGE: woodpecker ci users need to upgrade to v1.0.0 or higher to remain supported. see
https://github.com/semantic-release/env-ci/releases/tag/v11.0.0 for more information
2023-12-16 10:12:05 -06:00
Matt Travi 2904832967 feat(node-versions): dropped support for node v18 and raised the minimum for v20
reasoning for the chosen version:
https://github.com/semantic-release/gitlab/pull/647#discussion_r1423131205

BREAKING CHANGE: support for node v18 has been dropped and the minimum for v20 is now v20.8.1

related to https://github.com/semantic-release/semantic-release/discussions/3088
2023-12-15 17:01:50 -06:00
Matt Travi abf8ddd978 ci(verify): avoid uncancellable workflow
https://github.com/semantic-release/.github/issues/19#issuecomment-1800963916

for semantic-release/.github#19
2023-12-15 16:47:07 -06:00
renovate[bot]andGitHub 07dde042bb fix(deps): update dependency cosmiconfig to v9 (#3105)
BREAKING CHANGE: if using `release.config.js` as the name of your config file, it needs to be moved to a `.config/` directory. see https://github.com/cosmiconfig/cosmiconfig/releases/tag/v9.0.0 for more detail
2023-12-15 16:27:25 -06:00
2557e9e8f1 ci(action): update github/codeql-action action to v3 (#3108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 20:06:10 +00:00
786b48f886 ci(action): update github/codeql-action action to v2.22.10 (#3107)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-12 19:50:05 +00:00
Gregor MartynusandGitHub f6f1bf167c fix: Revert "fix(deps): update dependency cosmiconfig to v9" (#3104)
This reverts commit b38cd2e44e.
2023-12-11 20:28:12 -08:00
b38cd2e44e fix(deps): update dependency cosmiconfig to v9
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 15:04:52 -08:00
3722204510 chore(deps): lock file maintenance (#3101)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 18:25:02 +00:00
1fd1ce85eb chore(deps): update dependency prettier to v3.1.1 (#3099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-10 09:29:39 +00:00
Matt TraviandGitHub 00e7ca8d2e docs(getting-started): fix rendering through gitbook 2023-12-09 16:31:45 -06:00
Matt TraviandGitHub 9912d34b8d docs(cli): stop recommending setup with the cli (#3098)
since we have not been keeping up with maintenance of the cli and it has known problems that are
likely to cause more pain than it is helpful
2023-12-09 12:38:45 -08:00
f72e493d69 ci(action): update github/codeql-action action to v2.22.9 (#3094)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 13:03:33 +00:00
e8d3b2eede chore(deps): update dependency ava to v6.0.1 (#3092)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 01:46:18 +00:00
Matt Travi 88efeadac9 fix: revert updating cosmiconfig to v9 2023-12-05 23:17:13 -06:00
Matt TraviandGitHub 3a2acce01f Revert "fix(deps): update dependency cosmiconfig to v9" (#3090) 2023-12-05 23:06:46 -06:00
8b0dbd2805 fix(deps): update dependency cosmiconfig to v9 (#3072)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 20:45:33 -06:00
5aa56da694 chore(deps): update dependency ava to v6 (#3087)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-05 01:18:45 +00:00
c516d59bf0 chore(deps): lock file maintenance (#3086)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 04:07:48 +00:00
67995485c3 chore(deps): update dependency got to v14 (#3081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-01 23:46:53 +00:00
14a5755ef1 chore(deps): update dependency publint to v0.2.6 (#3083)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-01 18:37:27 +00:00
f6fb0fc130 chore(deps): update dependency fs-extra to v11.2.0 (#3077)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 01:55:16 +00:00
5ca3d78c63 chore(deps): update dependency nock to v13.4.0 (#3076)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 21:44:20 +00:00
cac1dbb121 chore(deps): lock file maintenance (#3073)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 01:21:45 +00:00
29aefa4b87 ci(action): update github/codeql-action action to v2.22.8 (#3071)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-23 12:44:40 +00:00
Thomas BriotandGitHub 3d8c7154b2 docs: fix broken link to 'sentimental versioning' resource (#3067) 2023-11-19 21:20:11 -06:00
ea446a4ea4 chore(deps): lock file maintenance (#3068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-20 02:15:57 +00:00
Pierre CavinandGitHub 0d06f62411 fix: support windows absolute extends (#3062) 2023-11-16 20:04:02 -06:00
26df1d2aa1 ci(action): update github/codeql-action action to v2.22.7 (#3061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 13:30:07 +00:00
b3a87bfa8f chore(deps): update dependency ls-engines to v0.9.1 (#3060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 03:54:29 +00:00
b36036e920 ci(action): update github/codeql-action action to v2.22.6 (#3058)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-14 13:31:15 +00:00
c084008274 chore(deps): update dependency prettier to v3.1.0 (#3057)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 04:46:59 +00:00
9fd162b3bc chore(deps): lock file maintenance (#3056)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 01:44:53 +00:00
c129474e93 chore(deps): update dependency testdouble to v3.20.1 (#3055)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-12 19:58:06 +00:00
02f2cb1c8b chore(deps): lock file maintenance (#3048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-09 06:02:13 +00:00
xiaolou86andGitHub b1683a7b4d docs: fix typos (#3052) 2023-11-08 23:56:53 -06:00
f09e55f39f fix(deps): update dependency read-pkg-up to v11 (#3047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-03 15:56:47 -05:00
9e41b43294 chore(deps): lock file maintenance (#3034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-03 20:38:34 +00:00
6900865324 Support extending ESM based configurations (#3037)
Co-authored-by: Matt Travi <programmer@travi.org>
2023-11-03 15:33:43 -05:00
250e7ae2c5 chore(deps): update dependency nock to v13.3.8 (#3045)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-03 07:45:15 +00:00
50a789638c chore(deps): update dependency sinon to v17.0.1 (#3042)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-01 12:41:52 +00:00
305674d1db fix(deps): update dependency figures to v6 (#3033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-30 20:37:56 -05:00
bef62a26b0 chore(deps): update dependency nock to v13.3.7 (#3035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-30 18:30:55 +00:00
4711a38196 ci(action): update github/codeql-action action to v2.22.5 (#3031)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-28 04:49:51 +00:00
6726543295 ci(action): update actions/setup-node action to v4 (#3025)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-24 03:46:29 +00:00
9504ea8706 chore(deps): update dependency node to v20 (#3026)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 21:21:18 -05:00
1c980143d1 ci(action): update actions/checkout action to v4.1.1 (#3022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 21:01:47 -05:00
d1120546b5 ci(action): update actions/setup-node action to v3.8.2 (#3023)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-24 01:47:11 +00:00
164697ccd3 ci(action): update actions/setup-node digest to 1a4442c (#3021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-24 00:02:36 +00:00
cad08804e6 ci(action): update ossf/scorecard-action action to v2.3.1 (#3024)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 22:47:47 +00:00
bfd2506f5b ci(action): update actions/checkout digest to b4ffde6 (#3001)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 10:12:10 +00:00
3c4137198d chore(deps): lock file maintenance (#3020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 03:50:41 +00:00
40b359784d ci(action): update github/codeql-action action to v2.22.4 (#3018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 19:40:23 +00:00
2baab7f78a chore(deps): update dependency sinon to v17 (#3019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 19:32:00 +00:00
Matt Travi fabdf9b1c6 test(ava): removed the failFast flag
since im wondering if it is contributing to recent pipeline instability
2023-10-20 14:24:20 -05:00
46fd8102ed chore(deps): update dependency testdouble to v3.20.0 (#3017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 09:36:12 +00:00
c8895edef6 chore(deps): update dependency publint to v0.2.5 (#3016)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 08:07:37 +00:00
6ed3fa5a1e chore(deps): update dependency dockerode to v4 (#3007)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 04:33:30 +00:00
eb881d5721 ci(action): update actions/checkout action to v4.1.1 (#3013)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 01:37:14 +00:00
c119263f00 ci(action): update github/codeql-action action to v2.22.3 (#3010)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 22:46:39 +00:00
382edf1c7d chore(deps): update dependency sinon to v16.1.3 (#3014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 21:17:16 +00:00
e247cca3c7 chore(deps): update dependency nock to v13.3.6 (#3015)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-19 17:41:33 +00:00
LudalandGitHub bd664bdf6a docs(extending): add semantic-release-jira-notes plugin (#2747) 2023-10-17 03:26:13 +00:00
bdfb5296f2 chore(deps): update dependency nock to v13.3.4 (#3005)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 04:49:18 +00:00
f5d2d7ee05 chore(deps): lock file maintenance (#3012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 00:18:38 +00:00
3773a682a7 ci(action): update github/codeql-action action to v2.22.2 (#3004)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-12 14:11:31 +00:00
4445caeb70 chore(deps): update dependency publint to v0.2.4 (#3002)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-09 04:10:52 +00:00
f1e0892c02 chore(deps): update dependency npm-run-all2 to v6.1.1 (#3003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-08 22:25:03 +00:00
Matt TraviandGitHub 50cf1aacbe Merge pull request #2964 from semantic-release/test-structure
test(structure): consolidated all verification under the `test` script while also enabling isolated execution
2023-10-08 13:54:10 -05:00
Matt Travi d8e16a055f docs(contributing): fixed the commitizen config and aligned the docs 2023-10-08 10:24:20 -05:00
Matt Travi 579259c578 docs(contributing): updated details about local verification 2023-10-08 10:22:53 -05:00
Matt Travi 842c0eb8bc ci(test): removed the lint step from the test job and the related checkout and setup
since the purpose of this job is specifically to summarize the verification results
2023-10-08 10:22:51 -05:00
Matt Travi b5d80411ea test(publish): added publint to verify the details of the published package 2023-10-08 10:22:06 -05:00
Matt Travi 0586f55164 test(prettier): adjusted the lint script name since prettier isnt specific to js 2023-10-08 10:19:17 -05:00
Matt Travi 473925187a ci(dev-node): added a job to verify against the version in the .nvmrc intended for development
to help ensure all verification passes before deciding to update the development version (partly to
help automate this process with renovate)
2023-10-08 10:19:17 -05:00
Matt Travi aaed2f4a6f docs(contributing): captured notes to update the contributing guide based on conversation result 2023-10-08 10:19:17 -05:00
Matt Travi 65aea33182 test(engines): moved the ls-engines check into the lint group under the combined test process 2023-10-08 10:19:15 -05:00
Matt Travi a8d863834a test(lockfile): added lockfile lint to prevent attacks that download deps from malicious registries
i thought we'd already taken the step of adding this protection, but it looks like i failed to
follow up with getting applied across all repos
2023-10-08 10:15:39 -05:00
Matt Travi de413899fe test(structure): split unit tests from integration tests
and used npm-run-all2 to define verification script groups that can be parallelized while also enabling scripts to be run independantly

for semantic-release/.github#19
2023-10-08 10:14:10 -05:00
c6c39d67f7 ci(action): update ossf/scorecard-action action to v2.3.0 (#2999)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 22:17:35 +00:00
dac69c981a ci(action): update github/codeql-action action to v2.22.0 (#2998)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 13:41:04 +00:00
4d3c394522 chore(deps): update dependency sinon to v16.1.0 (#2996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 13:28:17 +00:00
Josh Goldberg ✨andGitHub 125d41ebbc docs: improve FAQ note about 0.x major versions (#2993) 2023-10-03 06:25:10 -05:00
b178c18fde docs: Add release.config.cjs example with TypeScript definitions on docs/usage/configuration.md (#2950)
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: Matt Travi <programmer@travi.org>
2023-09-28 14:16:33 +00:00
cff501a083 ci(action): update github/codeql-action action to v2.21.9 (#2989)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-27 15:17:25 +00:00
8e6295e214 chore(deps): update dependency p-retry to v6.1.0 (#2985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-26 16:48:11 +00:00
a92afa2a7a chore(deps): lock file maintenance (#2984)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-25 01:36:05 +00:00
e759493e07 fix(deps): update dependency env-ci to v10 (#2983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-24 11:40:51 -05:00
Joshua TangandGitHub 7bbf1e804a docs: add community plugin semantic-release-pub (#2981) 2023-09-23 01:19:07 +00:00
84f2ee9374 fix(deps): update dependency marked to v9 (#2947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 18:15:26 -05:00
Matt TraviandGitHub 6070bf61fc Merge pull request #2980 from semantic-release/exports
fix(exports): removed the `exports` definition for the time being
2023-09-22 18:07:44 -05:00
8a7befe96b fix(deps): update dependency marked-terminal to v6
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 17:15:55 -05:00
993bf59af9 ci(action): update actions/checkout digest to 8ade135 (#2976)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 20:30:25 +00:00
Matt Travi 561e2d648d fix(exports): removed the exports definition for the time being
closes #2968
2023-09-22 15:26:37 -05:00
94d50ed934 ci(action): update actions/checkout action to v4.1.0 (#2977)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-22 19:37:53 +00:00
Matt TraviandGitHub bd4725b041 Merge pull request #2972 from semantic-release/stable-plugins
fix(deps): upgraded `release-notes-generator` and `commit-analyzer` plugins to stable versions
2023-09-21 07:32:08 -05:00
Matt Travi 041e4f7e37 fix(deps): upgraded release-notes-generator and commit-analyzer plugins to stable versions
follow up to #2934
2023-09-20 16:50:51 -05:00
1c8d848a4f ci(action): update github/codeql-action action to v2.21.8 (#2969)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-19 11:13:27 +00:00
Matt TraviandGitHub 2822fbee5d Merge pull request #2963 from semantic-release/always-test 2023-09-18 07:33:49 -05:00
2a67c65328 chore(deps): lock file maintenance (#2967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-18 00:47:38 +00:00
Matt Travi 87f0c12cf6 ci(matrix): prevent skipping the test job when test_matrix fails
for #semantic-release/.github#19
2023-09-17 10:23:40 -05:00
Matt TraviandGitHub 11788ed5dc Merge pull request #2934 from semantic-release/beta 2023-09-16 14:03:51 -05:00
Matt Travi b93bef4eea feat(node-versions): raised the minimum supported node version w/in the v20 range to v20.6.1
because of a known issue with v20.6.0 that we might as well avoid since we are restricting the
supported ranges at this point anyway: https://github.com/nodejs/node/issues/49497

BREAKING CHANGE: the minimum supported version for the v20 range of node has been raised slightly to
v20.6.1 to avoid a known node bug
2023-09-16 13:43:05 -05:00
Matt Travi 6604153812 Merge branch 'master' of github.com:semantic-release/semantic-release into beta 2023-09-16 11:59:52 -05:00
Matt Travi e623cc642a feat(node-versions): raised the minimum node v20 requirement to v20.6
for auto-registered loader support

BREAKING CHANGE: the minimum supported node version in the v20 major range is now v20.6
2023-09-16 11:52:49 -05:00
42f7b8269e chore(deps): update dependency testdouble to v3.19.0 (#2961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-16 13:52:55 +00:00
1017e1aac2 fix(deps): update dependency aggregate-error to v5 (#2956)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-15 23:41:01 -05:00
Matt Travi a23b71890b fix(deps): upgraded to the latest version of the npm plugin with npm v10 2023-09-15 16:06:44 -05:00
Matt Travi fb850ff26d Merge branch 'master' of github.com:semantic-release/semantic-release into beta 2023-09-15 15:49:37 -05:00
Matt Travi b9f294d179 feat(node-versions): raised the minimum required node version to v18.17 and dropped v19 support
npm v20 requires v18.17

BREAKING CHANGE: node v18.17 is now the minimum supported node version and support for v19 has been dropped
2023-09-15 15:39:49 -05:00
Matt Travi 03a687b3ea fix(deps): updated to the latest beta of the commit analyzer plugin 2023-09-15 13:23:18 -05:00
86a639dee9 ci(action): update github/codeql-action action to v2.21.7 (#2958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-14 17:19:37 +00:00
da5620171e chore(deps): update dependency sinon to v16 (#2954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-13 22:55:16 +00:00
89d51e7db7 ci(action): update github/codeql-action action to v2.21.6 (#2953)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-13 18:13:04 +00:00
Matt Travi de8e4e05e9 fix(deps): updated to the latest betas of the commit-analyzer and release-notes-generator plugins 2023-09-11 20:55:11 -05:00
0fd3bb8b3a chore(deps): lock file maintenance (#2948)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-11 10:47:23 -07:00
c39513f24d ci(action): update actions/upload-artifact action to v3.1.3 (#2943)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 22:46:55 +00:00
Simon SeyockandGitHub 6a5d96102d docs(plugins): add @terrestris/maven-semantic-release (#2939) 2023-09-05 21:21:41 +00:00
19c09653fe ci(action): update actions/checkout action to v4 (#2938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-04 14:53:20 +00:00
32a248077f chore(deps): lock file maintenance (#2936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-04 01:53:23 +00:00
Matt Travi 72ab317bb0 feat: defined exports for the package
BREAKING CHANGE: exports prevents access to internal files, but they arent intended for public use anyway
2023-09-01 21:08:13 -05:00
Matt Travi 07a79ea7e9 feat(conventional-changelog-presets): supported new preset format
BREAKING CHANGE: the new preset format is a breaking change when compared to the previous preset format. updating to support the new format means that the old preset format is no longer supported. update your preset to the latest version to maintain compatibility
2023-09-01 17:23:14 -05:00
0d92579e13 chore(deps): update dependency prettier to v3.0.3 (#2930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-29 15:21:15 +00:00
cb6613e2ee ci(action): update github/codeql-action action to v2.21.5 (#2928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-28 21:53:52 +00:00
9e10e44fed chore(deps): lock file maintenance (#2923)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-28 02:40:27 +00:00
d3c1338eac chore(deps): update dependency p-retry to v6 (#2921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 18:48:28 +00:00
01cb041e1d ci(action): update actions/checkout action to v3.6.0 (#2919)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 16:25:08 +00:00
Matt TraviandGitHub 4c95c97d8f fix(types): included the definitions file in the published package (#2920) 2023-08-24 11:20:48 -05:00
5e08c4d95a ci(action): update actions/checkout digest to f43a0e5 (#2918)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 14:42:30 +00:00
Matt TraviandGitHub c84d5d39e5 Merge pull request #2904 from semantic-release/gitlab-provenance 2023-08-23 21:17:58 -05:00
Sibin GrašićandGitHub c21a1ac793 feat: Added TypeScript definitions (#2916) 2023-08-23 20:27:22 -05:00
915f36cda7 chore(deps): lock file maintenance (#2915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 01:30:59 +00:00
eba86ac8e5 fix(deps): update dependency hosted-git-info to v7 (#2908)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-19 20:37:27 -05:00
7bc21fcdc7 fix(deps): update dependency execa to v8 (#2914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-19 17:20:09 -05:00
79bca752a7 ci(action): update actions/setup-node digest to 5e21ff4 (#2912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-17 15:12:45 +00:00
0e5e41f460 chore(deps): update dependency nock to v13.3.3 (#2911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-16 23:05:46 +00:00
c41d55c25b chore(deps): update dependency prettier to v3.0.2 (#2909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-15 16:35:49 +00:00
eddbc53172 ci(action): update github/codeql-action action to v2.21.4 (#2907)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 16:54:11 +00:00
2b28ba98d2 ci(action): update actions/setup-node digest to bea5baf (#2906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 12:16:26 +00:00
9878b316bc chore(deps): lock file maintenance (#2905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 01:45:14 +00:00
Matt Travi e40eecdce0 docs(gitlab): highlighted that GitLab CI is now a supported CI provider for provenance 2023-08-11 15:40:18 -05:00
3bb968c87d ci(action): update github/codeql-action action to v2.21.3 (#2902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 14:42:59 +00:00
1f54c5a9d9 chore(deps): update dependency prettier to v3.0.1 (#2898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 06:47:36 +00:00
fd6b46e1b1 chore(deps): lock file maintenance (#2894)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-31 00:16:10 +00:00
07b12ceeb9 ci(action): update github/codeql-action action to v2.21.2 (#2892)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-28 15:56:04 +00:00
a5dd6dad3a ci(action): update github/codeql-action action to v2.21.1 (#2889)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-26 22:31:04 +00:00
cb8a95b3d3 chore(deps): update dependency c8 to v8.0.1 (#2888)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-25 17:35:45 +00:00
24b34fe9df chore(deps): lock file maintenance (#2886)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-24 02:26:27 +00:00
19e3963acc ci(action): update github/codeql-action action to v2.21.0 (#2878)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 14:09:23 +00:00
2659253cfb chore(deps): lock file maintenance (#2876)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 02:28:07 +00:00
Matt Travi f8a41a9af4 chore(license): changed line wrapping hoping to trigger github to recognize the license 2023-07-15 22:32:10 -05:00
078c86814c ci(action): update github/codeql-action action to v2.20.4 (#2873)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-14 16:09:09 +00:00
c8c7d121e6 chore(deps): update dependency nock to v13.3.2 (#2872)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-13 23:29:44 +00:00
1c30a57287 chore(deps): update dependency tempy to v3.1.0 (#2869)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-10 21:01:24 +00:00
3e6be5fff1 ci(action): update actions/setup-node digest to e33196f (#2866)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-10 10:13:10 -07:00
b81b9ee522 ci(action): update github/codeql-action action to v2.20.3 (#2867)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-10 06:48:42 +00:00
ba4a25e3f2 chore(deps): lock file maintenance (#2868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-10 01:02:15 +00:00
Justin PoehneltandGitHub 4a1378d6c7 docs(plugins): change to new repo and package name (#2865)
chore: change to new repo and package name

https://www.npmjs.com/package/@google/semantic-release-replace-plugin now points to `semantic-release-replace-plugin'.
2023-07-05 20:45:48 -07:00
Matt TraviandGitHub af5f0e30b5 Merge pull request #2863 from semantic-release/renovate/prettier-3.x 2023-07-05 12:10:14 -05:00
Matt Travi 6fd45e865f chore(prettier): ignored formatting change for v3 upgrade from git blame 2023-07-05 11:10:14 -05:00
Matt Travi 272af21052 style(prettier): adjusted to match prettier v3 expectations 2023-07-05 11:07:42 -05:00
renovate[bot]andGitHub 738cefc802 chore(deps): update dependency prettier to v3 2023-07-05 13:07:13 +00:00
81e1ca4dd1 ci(action): update github/codeql-action action to v2.20.2 (#2861)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-05 07:01:48 +00:00
a2c7303d62 chore(deps): lock file maintenance (#2859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-05 03:37:46 +00:00
70996e0181 fix(deps): update dependency read-pkg-up to v10 (#2862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-04 20:03:53 -05:00
40dbf5633f ci(action): update actions/checkout action to v3.5.3 (#2852)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-29 07:50:42 +00:00
3159c977fc chore(deps): lock file maintenance (#2849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-29 03:23:24 +00:00
41e7027b2d ci(action): update actions/upload-artifact action to v3.1.2 (#2851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-29 02:47:04 +00:00
Tijmen van de MeentandGitHub e4229f9c68 fix: get correct version if prerelease branch shares version with ... (#2416) 2023-06-28 14:38:35 -07:00
9514e20e7b ci(action): update ossf/scorecard-action action to v2.2.0 (#2854)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-26 17:57:07 -05:00
5fcdc27e75 ci(action): update github/codeql-action action to v2.20.1 (#2853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-26 09:26:04 +00:00
1260d3a971 ci(action): pin dependencies (#2850)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-26 04:50:50 +00:00
Matt TraviandGitHub 9ebabe1266 ci(ossf-scorecard): added workflow calculating scorecard metrics (#2848) 2023-06-25 21:44:40 -05:00
Matt TraviandGitHub e39ae90ae2 test(integration): properly waited for the image pulls to complete (#2842) 2023-06-25 17:51:31 -07:00
39d2a05014 chore(deps): update dependency sinon to v15.2.0 (#2844)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-20 13:15:55 -07:00
45eb11ae9c chore(deps): update dependency c8 to v8 (#2833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 11:31:31 -07:00
71e805d90c chore(deps): update dependency ava to v5.3.1 (#2839)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 06:33:31 +00:00
9f660ff885 chore(deps): lock file maintenance (#2841)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 03:58:31 +00:00
01e85df88a chore(deps): update dependency sinon to v15.1.2 (#2832)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-12 20:39:33 +00:00
caa0d50d52 chore(deps): lock file maintenance (#2831)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-12 04:32:51 +00:00
452e1fa4b9 fix(deps): update dependency marked to v5
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-09 16:54:36 -07:00
94e773d915 ci(action): update actions/checkout digest to c85c95e
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-09 16:25:38 -07:00
Matt TraviandGitHub 18730e824f Merge pull request #2826 from semantic-release/renovate/major-semantic-release-monorepo 2023-06-09 16:32:02 -05:00
Matt Travi 4bf763f264 test(semantic-release-error): switched instanceof check to the native version
since the check provided by the ava assertion seems to fail beyond the context of the test
2023-06-09 16:14:46 -05:00
renovate[bot]andGitHub d259350c3e fix(deps): update dependency @semantic-release/error to v4 2023-06-07 21:29:33 +00:00
286bd67de5 chore(deps): lock file maintenance (#2825)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-05 04:23:37 +00:00
95551a0df8 chore(deps): update dependency ava to v5.3.0 (#2809)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-02 15:30:01 -05:00
4e80bab563 chore(deps): lock file maintenance (#2816)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-02 15:25:29 -05:00
5145268539 chore(deps): update dependency got to v13 (#2813)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-02 15:18:21 -05:00
Matt TraviandGitHub dd352f1044 Merge pull request #2823 from semantic-release/beta 2023-06-02 15:09:44 -05:00
Matt Travi 39410186df fix(deps): updated the beta plugins to stable versions 2023-06-02 14:30:32 -05:00
Matt Travi 4a6b31f57e fix: bump @semantic-release/commit-analyzer to v10.0.0-beta.1 2023-05-29 22:03:54 -05:00
6f19d77e54 fix: bump @semantic-release/github to 9.0.0-beta.2 (#2818)
Co-authored-by: Matt Travi <programmer@travi.org>
2023-05-29 20:47:17 -05:00
6ef4cee971 chore(deps): update dependency c8 to v7.14.0 (#2815)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 19:00:28 +00:00
18bd0c4904 chore(deps): lock file maintenance (#2797)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-23 07:05:08 +00:00
Matt Travi ab4fe4c3d4 refactor: leverage native async setTimeout rather than delay 2023-05-22 22:25:22 -05:00
42385d0f96 chore(deps): update dependency sinon to v15.1.0 (#2801)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 15:39:53 -07:00
57db31ad97 chore(deps): update dependency delay to v6 (#2803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 20:14:15 +00:00
Matt TraviandGitHub fa133f2a9d ci(release): pinned the version of semantic-release (#2796) 2023-05-12 17:17:04 -05:00
4af49f3c87 chore(deps): update dependency nock to v13.3.1 (#2777)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-10 16:01:22 -05:00
Joram van den BoezemandGitHub 0d5e717fa6 docs(extending): add semantic-release-yarn to community plugins (#2790) 2023-05-10 08:40:17 -05:00
Matt Travi ee250a04db docs(gitbook): fixed reference to the installation page 2023-05-09 09:07:50 -05:00
85a31fb612 docs(npx-version): mentioned using a renovate regex manager to update the version (#2786)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2023-05-09 08:02:45 -05:00
8826e524e4 chore(deps): update dependency testdouble to v3.18.0 (#2787)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-09 06:35:20 +00:00
Liran TalandGitHub f1b0801157 docs: Update README.md with npm package provenance (#2789) 2023-05-08 21:06:39 -05:00
214a376342 ci(action): pin dependencies (#2781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 10:09:56 +00:00
0c6c20ee96 chore(deps): lock file maintenance (#2763)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 08:06:29 +00:00
420211c806 chore(deps): update dependency prettier to v2.8.8 (#2771)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 04:19:59 +00:00
Eric KandGitHub 0476ae58a0 docs(extending): add link to semantic-release-major-tag (#2776) 2023-05-05 16:55:09 -05:00
ac40804dc4 fix(deps): update dependency @semantic-release/release-notes-generator to v11 (#2778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-28 17:01:24 -05:00
Matt Travi e046ece3cb ci(signatures): moved the audit step to the non-matrix stage
since older versions of npm dont support `npm audit signatures` and instead simply audit for vulnerabilities
2023-04-28 16:33:03 -05:00
Matt Travi ef998acd4d ci(dependencies): audited signatures and provenance attestations of installed packages 2023-04-21 16:41:27 -05:00
Matt Travi 278d8e6bec docs(gh-actions): captured details about publishing with provenance from an actions workflow 2023-04-21 16:01:08 -05:00
ddf4065b4e chore(deps): update dependency sinon to v15.0.4 (#2769)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-20 17:40:03 +00:00
40 changed files with 10592 additions and 9594 deletions
+3 -1
View File
@@ -1,2 +1,4 @@
# style: prettier (#2670)
b06c9bbe4c6be121c5561b356d8c465c1cadffba
b06c9bbe4c6be121c5561b356d8c465c1cadffba
# style: upgraded prettier to v3 (#2863)
272af210523804de782b3076f05e56bcb4aeeb8f
+7 -4
View File
@@ -18,13 +18,16 @@ jobs:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
cache: npm
node-version: lts/*
- run: npm ci
- run: npx semantic-release
- run: npm clean-install
- run: npm audit signatures
# pinned version updated automatically by Renovate.
# details at https://semantic-release.gitbook.io/semantic-release/usage/installation#global-installation
- run: npx semantic-release@21.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
+36
View File
@@ -0,0 +1,36 @@
name: OpenSSF Scorecard
"on":
schedule:
- cron: 31 2 * * 1
push:
branches:
- master
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
with:
sarif_file: results.sarif
+41 -16
View File
@@ -15,41 +15,66 @@ on:
permissions:
contents: read # to fetch code (actions/checkout)
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
jobs:
# verify against ranges defined as supported in engines.node
test_matrix:
strategy:
matrix:
node-version:
- 18.0.0
- 19
- 20.8.1
- 20
- 21
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm clean-install
- name: Ensure dependencies are compatible with the version of node
run: npx ls-engines
- run: npm run test:ci
- run: npm audit signatures
- run: npm test
# verify against the node version defined for development in the .nvmrc
test_dev:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com
- name: Use Node.js from .nvmrc
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm audit signatures
- run: npm test
# separate job to set as required in branch protection,
# as the build names above change each time Node versions change
test:
runs-on: ubuntu-latest
needs: test_matrix
needs:
- test_dev
- test_matrix
if: ${{ !cancelled() }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
- run: npm clean-install
- run: npm run lint
- name: All matrix versions passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some matrix version failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
+1
View File
@@ -0,0 +1 @@
20
+58 -18
View File
@@ -146,7 +146,7 @@ If possible, make [atomic commits](https://en.wikipedia.org/wiki/Atomic_commit),
- a commit should contain exactly one self-contained functional change
- a functional change should be contained in exactly one commit
- a commit should not create an inconsistent state (such as test errors, linting errors, partial fix, feature with documentation etc...)
- a commit should not create an inconsistent state (such as test errors, linting errors, partial fix, feature without documentation, etc...)
A complex feature can be broken down into multiple commits as long as each one maintains a consistent state and consists of a self-contained change.
@@ -241,42 +241,82 @@ $ git clone https://github.com/semantic-release/<repo-name>
$ cd <repo-name>
# Assign the original repo to a remote called "upstream"
$ git remote add upstream https://github.com/semantic-release/<repo-name>
# Switch your node version to the version defined by the project as the development version
# This step assumes you have already installed and configured https://github.com/nvm-sh/nvm
# You may need to run `nvm install` if you have not already installed the development node version
$ nvm use
# Install the dependencies
$ npm install
```
### Lint
### Verification
All the [semantic-release](https://github.com/semantic-release) repositories use [XO](https://github.com/sindresorhus/xo) for linting and [Prettier](https://prettier.io) for formatting.
Prettier formatting will be automatically verified and fixed by XO.
The `test` script is structured to execute as much of the verification for the project as possible.
Ensuring that the `test` script fully passes in the node version defined as the development version in the `.nvmrc`
minimizes the chances of the test workflow failing after pushing your changes.
Before pushing your code changes make sure there are no linting errors with `npm run lint`.
> [!IMPORTANT]
> Before pushing your code changes, be sure to run the verification for the project with `npm test`.
**Tips**:
[npm-run-all2](https://www.npmjs.com/package/npm-run-all2) is used to enable running multiple independent lint and test
scripts together from the `test` script.
This enables the test script to not only run all scripts, but also parallelize some of the scripts to optimize the overall
time required for verification.
- Most linting errors can be automatically fixed with `npm run lint -- --fix`.
- Install the [XO plugin](https://github.com/sindresorhus/xo#editor-plugins) for your editor to see linting errors directly in your editor and automatically fix them on save.
When a failure occurs with the `test`, the output can be a bit confusing because there may be output from multiple parallel
scripts mixed together.
To investigate the failure with cleaner output, re-run the problematic script directly using the script name from the label
included on the left side of the output
### Tests
```shell
$ npm run <script-name>
```
Running the integration test requires you to install [Docker](https://docs.docker.com/engine/installation) on your machine.
#### Lint
##### Prettier
All the [semantic-release](https://github.com/semantic-release) repositories use [Prettier](https://prettier.io) for formatting.
Prettier formatting will be automatically verified by the `lint:prettier` script, included in the `test` script.
> [!NOTE]
> Most linting errors can be automatically fixed with `npm run lint:prettier:fix`.
##### Other Lint Tools
Other tools are used for specific compatibility concerns, but are less likely to result in failures in common contributions.
Please follow the guidance of these tools if failures are encountered.
#### Tests
> [!NOTE]
> Before pushing your code changes make sure all **tests pass** and the unit test **coverage is 100%**:
All the [semantic-release](https://github.com/semantic-release) repositories use [AVA](https://github.com/avajs/ava) for writing and running tests.
Before pushing your code changes make sure all **tests pass** and the **coverage is 100%**:
```bash
$ npm run test
```
**Tips:** During development you can:
During development, you can:
- run only a subset of test files with `ava <glob>`, for example `ava test/mytestfile.test.js`
- run in watch mode with `ava -w` to automatically run a test file when you modify it
- run only the test you are working on by adding [`.only` to the test definition](https://github.com/avajs/ava#running-specific-tests)
##### Unit Tests
```bash
$ npm run test:unit
```
##### Integration Tests
> [!IMPORTANT]
> Running the integration test requires you to install [Docker](https://docs.docker.com/engine/installation) on your machine.
```bash
$ npm run test:integration
```
### Commits
All the [semantic-release](https://github.com/semantic-release) repositories use [Commitizen](https://github.com/commitizen/cz-cli) to help you create [valid commit messages](#commit-message-guidelines).
After staging your changes with `git add`, run `npm run cm` to start the interactive commit message CLI.
Assuming you have [installed Commitizen](https://github.com/commitizen/cz-cli#installing-the-command-line-tool), run `git cz` to start the interactive commit message CLI rather than `git commit` when committing.
+2 -2
View File
@@ -9,8 +9,8 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+8 -4
View File
@@ -7,6 +7,9 @@
<a href="https://github.com/semantic-release/semantic-release/actions?query=workflow%3ATest+branch%3Amaster">
<img alt="Build states" src="https://github.com/semantic-release/semantic-release/workflows/Test/badge.svg">
</a>
<a href="https://securityscorecards.dev/viewer/?uri=github.com/semantic-release/semantic-release">
<img alt="OpenSSF Scorecard" src="https://api.securityscorecards.dev/projects/github.com/semantic-release/semantic-release/badge">
</a>
<a href="#badge">
<img alt="semantic-release: angular" src="https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release">
</a>
@@ -41,6 +44,7 @@ This removes the immediate connection between human emotions and version numbers
- Avoid potential errors associated with manual releases
- Support any [package managers and languages](docs/recipes/release-workflow/README.md#package-managers-and-languages) via [plugins](docs/usage/plugins.md)
- Simple and reusable configuration via [shareable configurations](docs/usage/shareable-configurations.md)
- Support for [npm package provenance](https://github.com/semantic-release/npm#npm-provenance) that promotes increased supply-chain security via signed attestations on GitHub Actions
## How does it work?
@@ -65,7 +69,7 @@ The table below shows which commit message gets you which release type when `sem
### Automation with CI
**semantic-release** is meant to be executed on the CI environment after every successful build on the release branch.
This way no human is directly involved in the release process and the releases are guaranteed to be [unromantic and unsentimental](http://sentimentalversioning.org).
This way no human is directly involved in the release process and the releases are guaranteed to be [unromantic and unsentimental](https://github.com/dominictarr/sentimental-versioning#readme).
### Triggering a release
@@ -106,9 +110,9 @@ In order to use **semantic-release** you need:
## Documentation
- Usage
- [Getting started](docs/usage/getting-started.md#getting-started)
- [Installation](docs/usage/installation.md#installation)
- [CI Configuration](docs/usage/ci-configuration.md#ci-configuration)
- [Getting started](docs/usage/getting-started.md)
- [Installation](docs/usage/installation.md)
- [CI Configuration](docs/usage/ci-configuration.md)
- [Configuration](docs/usage/configuration.md#configuration)
- [Plugins](docs/usage/plugins.md)
- [Workflow configuration](docs/usage/workflow-configuration.md)
+2 -2
View File
@@ -2,8 +2,8 @@
## Usage
- [Getting started](docs/usage/getting-started.md#getting-started)
- [Installation](docs/usage/installation.md#installation)
- [Getting started](docs/usage/getting-started.md)
- [Installation](docs/usage/installation.md)
- [CI Configuration](docs/usage/ci-configuration.md)
- [Configuration](docs/usage/configuration.md)
- [Plugins](docs/usage/plugins.md)
+3 -3
View File
@@ -127,7 +127,7 @@ It allows to configure **semantic-release** to write errors to a specific stream
Type: `Object` `Boolean`<br>
And object with [`lastRelease`](#lastrelease), [`nextRelease`](#nextrelease), [`commits`](#commits) and [`releases`](#releases) if a release is published or `false` if no release was published.
An object with [`lastRelease`](#lastrelease), [`nextRelease`](#nextrelease), [`commits`](#commits) and [`releases`](#releases) if a release is published or `false` if no release was published.
#### lastRelease
@@ -142,7 +142,7 @@ Information related to the last release found:
| gitTag | `String` | The [Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) associated with the last release. |
| channel | `String` | The distribution channel on which the last release was initially made available (`undefined` for the default distribution channel). |
**Notes**: If no previous release is found, `lastRelease` will be an empty `Object`.
**Note**: If no previous release is found, `lastRelease` will be an empty `Object`.
Example:
@@ -159,7 +159,7 @@ Example:
Type: `Array<Object>`
The list of commit included in the new release.<br>
The list of commit(s) included in the new release.<br>
Each commit object has the following properties:
| Name | Type | Description |
+21 -1
View File
@@ -84,6 +84,11 @@
- `verifyRelease`: Checks and warns (does not error by default) if the version numbers found on maven central and within the Git project differ by quite a bit
- `prepare`: Changes the version number in the `pom.xml` (or all `pom.xml` files in maven projects with multiple `pom.xml` files) and optionally creates a commit with this version number and pushes it to `master`
- `publish`: Runs `mvn deploy` to deploy to maven central and optionally will update to next snapshot version and merge changes to development branch
- [maven-semantic-release](https://github.com/terrestris/maven-semantic-release) (alternative version)
- `verifyConditions`: Verifies that the `mvn` command exists.
- `prepare`: Changes version number in `pom.xml` and optionally in all child modules.
- `publish`: Runs one of the mvn targets `deploy`, `package jib:build` or `deploy jib:build`.
- `success`: Optionally sets new snapshot version and commits it.
- [semantic-release-ado](https://github.com/lluchmk/semantic-release-ado)
- `prepare`: Stores the version number as an Azure DevOps pipeline variable available to downstream steps on the job
- [gradle-semantic-release](https://github.com/KengoTODA/gradle-semantic-release-plugin)
@@ -107,7 +112,7 @@
- `verifyConditions`: Verify the presence and the validity of the authentication and the assets option configuration.
- `publish`: Publish a Gitea release, optionally uploading file assets.
- `addChannel`: Update a Gitea release's pre-release field.
- [@google/semantic-release-replace-plugin](https://github.com/google/semantic-release-replace-plugin)
- [semantic-release-replace-plugin](https://github.com/jpoehnelt/semantic-release-replace-plugin)
- `prepare`: Replace version strings in files using regex and glob.
- [semantic-release-rubygem](https://github.com/Gusto/semantic-release-rubygem)
- `verifyConditions`: Locate and validate a `.gemspec` file, locate and validate a `lib/**/version.rb` file, verify the presence of the `GEM_HOST_API_KEY` environment variable, and create a credentials file with the API key.
@@ -174,3 +179,18 @@
- [semantic-release-coralogix](https://github.com/adobe/semantic-release-coralogix)
- `verifyConditions` Verified that required credentials are provided and API is accessible
- `publish` add a release tag to Coralogix
- [semantic-release-jira-notes](https://github.com/iamludal/semantic-release-jira-notes)
- `verifyConditions`: Validate the config options.
- `generateNotes`: Generate the release notes with links to JIRA issues.
- [semantic-release-major-tag](https://github.com/doteric/semantic-release-major-tag)
- `success` Create major version tag, for example `v1`.
- [semantic-release-yarn](https://github.com/hongaar/semantic-release-yarn)
- **Note**: this is an alternative to the default `@semantic-release/npm` plugin and adds support for monorepos.
- `verifyConditions` Verify Yarn 2 or higher is installed, verify the presence of a NPM auth token (either in an environment variable or a `.yarnrc.yml` file) and verify the authentication method is valid.
- `prepare` Update the `package.json` version and create the package tarball.
- `addChannel` Add a tag for the release.
- `publish` Publish to the npm registry.
- [semantic-release-pub](https://github.com/zeshuaro/semantic-release-pub)
- `verifyConditions`: Verify the presence of the `pub.dev` authentication and release configuration
- `prepare`: Update the `pubspec.yaml` version
- `publish`: Publish the package onto the `pub.dev` registry
@@ -6,6 +6,11 @@ The [Authentication](../../usage/ci-configuration.md#authentication) environment
In this example a publish type [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) is required to publish a package to the npm registry. GitHub Actions [automatically populate](https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret) a [`GITHUB_TOKEN`](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) environment variable which can be used in Workflows.
## npm provenance
Since GitHub Actions is a [supported provider](https://docs.npmjs.com/generating-provenance-statements#provenance-limitations) for [npm provenance](https://docs.npmjs.com/generating-provenance-statements), it is recommended to enable this to increase supply-chain security for your npm packages.
Find more detail about configuring npm to publish with provenance through semantic-release [in the documentation for our npm plugin](https://github.com/semantic-release/npm#npm-provenance).
## Node project configuration
[GitHub Actions](https://github.com/features/actions) support [Workflows](https://help.github.com/en/articles/configuring-workflows), allowing to run tests on multiple Node versions and publish a release only when all test pass.
@@ -23,10 +28,19 @@ on:
push:
branches:
- master
permissions:
contents: read # for checkout
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -37,7 +51,9 @@ jobs:
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -6,6 +6,11 @@ The [Authentication](../../usage/ci-configuration.md#authentication) environment
**Note**: Make sure to configure your release branch as [protected](https://docs.gitlab.com/ce/user/project/protected_branches.html) in order for the CI/CD build to access the protected variables.
## npm provenance
Since GitLab CI is a [supported provider](https://docs.npmjs.com/generating-provenance-statements#provenance-limitations) for [npm provenance](https://docs.npmjs.com/generating-provenance-statements), it is recommended to enable this to increase supply-chain security for your npm packages.
Find more detail about configuring npm to publish with provenance through semantic-release [in the documentation for our npm plugin](https://github.com/semantic-release/npm#npm-provenance).
## Node project configuration
GitLab CI supports [Pipelines](https://docs.gitlab.com/ee/ci/pipelines.html) allowing to test on multiple Node versions and publishing a release only when all test pass.
+1 -1
View File
@@ -195,7 +195,7 @@ If you need more control over the timing of releases, see [Triggering a release]
## Can I set the initial release version of my package to `0.0.1`?
This is not supported by **semantic-release** as it's not considered a good practice, mostly because [Semantic Versioning](https://semver.org) rules applies differently to major version zero.
This is not supported by semantic-release. [Semantic Versioning](https://semver.org/) rules apply differently to major version zero and supporting those differences is out of scope and not one of the goals of the semantic-release project.
If your project is under heavy development, with frequent breaking changes, and is not production ready yet we recommend [publishing pre-releases](../recipes/release-workflow/pre-releases.md#publishing-pre-releases).
+1 -1
View File
@@ -1,6 +1,6 @@
# Node version requirement
**semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 18.0.0 or higher**.
**semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 20.8.1 or higher**.
**semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency.
Therefore, the only constraint is to run the `semantic-release` in a CI environment providing version of Node that meets our version requirement.
+11
View File
@@ -40,6 +40,17 @@ The following three examples are the same.
}
```
- Via `release.config.cjs` file:
```js
/**
* @type {import('semantic-release').GlobalConfig}
*/
module.exports = {
branches: ["master", "next"],
};
```
- Via CLI argument:
```bash
-13
View File
@@ -6,16 +6,3 @@ In order to use **semantic-release** you must follow these steps:
2. Configure your Continuous Integration service to [run **semantic-release**](./ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded)
3. Configure your Git repository and package manager repository [authentication](ci-configuration.md#authentication) in your Continuous Integration service
4. Configure **semantic-release** [options and plugins](./configuration.md#configuration)
Alternatively those steps can be easily done with the [**semantic-release** interactive CLI](https://github.com/semantic-release/cli):
```bash
cd your-module
npx semantic-release-cli setup
```
![dialogue](../../media/semantic-release-cli.png)
See the [semantic-release-cli](https://github.com/semantic-release/cli#what-it-does) documentation for more details.
**Note**: only a limited number of options, CI services and plugins are currently supported by `semantic-release-cli`.
+24 -5
View File
@@ -24,9 +24,28 @@ For other type of projects we recommend installing **semantic-release** directly
$ npx semantic-release
```
**Note**: For a global installation, it's recommended to specify the major **semantic-release** version to install (for example with `npx semantic-release@18`).
This way your build will not automatically use the next major **semantic-release** release that could possibly break your build.
You will have to upgrade manually when a new major version is released.
### Notes
**Note**: `npx` is a tool bundled with `npm@>=5.2.0`. It is used to conveniently install the semantic-release binary and to execute it.
See [What is npx](../support/FAQ.md#what-is-npx) for more details.
1. If you've globally installed **semantic-release** then we recommend that you set the major **semantic-release** version to install.
For example, by using `npx semantic-release@18`.
This way you control which major version of **semantic-release** is used by your build, and thus avoid breaking the build when there's a new major version of **semantic-release**.
This also means you, or a bot, must upgrade **semantic-release** when a new major version is released.
2. Pinning **semantic-release** to an exact version makes your releases even more deterministic.
But pinning also means you, or a bot, must update to newer versions of **semantic-release** more often.
3. You can use [Renovate's regex manager](https://docs.renovatebot.com/modules/manager/regex/) to get automatic updates for **semantic-release** in either of the above scenarios.
Put this in your Renovate configuration file:
```json
{
"regexManagers": [
{
"description": "Update semantic-release version used by npx",
"fileMatch": ["^\\.github/workflows/[^/]+\\.ya?ml$"],
"matchStrings": ["\\srun: npx semantic-release@(?<currentValue>.*?)\\s"],
"datasourceTemplate": "npm",
"depNameTemplate": "semantic-release"
}
]
}
```
4. `npx` is a tool bundled with `npm@>=5.2.0`. You can use it to install (and run) the **semantic-release** binary.
See [What is npx](../support/FAQ.md#what-is-npx) for more details.
Vendored
+711
View File
@@ -0,0 +1,711 @@
declare interface AggregateError extends Error {
errors: any[];
}
declare module "semantic-release" {
import { Signale } from "signale";
export interface EnvCi {
/**
* Boolean, true if the environment is a CI environment
*/
isCi: boolean;
/**
* Commit hash
*/
commit: string;
/**
* Current branch name
*/
branch: string;
}
/**
* Base context used in every semantic release step.
*/
export interface BaseContext {
/**
* stdout for semantic-release process
*/
stdout: NodeJS.WriteStream;
/**
* stderr for semantic-release process
*/
stderr: NodeJS.WriteStream;
/**
* Signale console loger instance.
*
* Has error, log and success methods.
*/
logger: Signale<"error" | "log" | "success">;
}
/**
* Context used for the verify conditions step.
*/
export interface VerifyConditionsContext extends BaseContext {
/**
* The current working directory to use. It should be configured to
* the root of the Git repository to release from.
*
* It allows to run semantic-release from a specific path without
* having to change the local process cwd with process.chdir().
*
* @default process.cwd
*/
cwd?: string | undefined;
/**
* The environment variables to use.
*
* It allows to run semantic-release with specific environment
* variables without having to modify the local process.env.
*
* @default process.env
*/
env: Record<string, string>;
/**
* Information about the CI environment.
*/
envCi: EnvCi;
/**
* Information of the current branch
*/
branch: BranchObject;
/**
* Information on branches
*/
branches: ReadonlyArray<BranchObject>;
}
/**
* Context used for the analyze commits step.
*/
export interface AnalyzeCommitsContext extends VerifyConditionsContext {
/**
* List of commits taken into account when determining the new version.
*/
commits: ReadonlyArray<Commit>;
/**
* List of releases
*/
releases: ReadonlyArray<Release>;
/**
* Last release
*/
lastRelease: LastRelease;
}
/**
* Context used for the verify release step.
*/
export interface VerifyReleaseContext extends AnalyzeCommitsContext {
/**
* The next release.
*/
nextRelease: NextRelease;
}
/**
* Context used for the generate notes step.
*/
export type GenerateNotesContext = VerifyReleaseContext;
/**
* Context used for the add channel step.
*/
export type AddChannelContext = VerifyReleaseContext;
/**
* Context used for the prepare step.
*/
export type PrepareContext = VerifyReleaseContext;
/**
* Context used for the publish step.
*/
export type PublishContext = VerifyReleaseContext;
/**
* Context used for the success step.
*/
export type SuccessContext = VerifyReleaseContext;
export interface FailContext extends BaseContext {
/**
* Errors that occurred during the release process.
*/
errors: AggregateError;
}
export interface Commit {
/**
* The commit abbreviated and full hash.
*/
commit: {
/**
* The commit hash.
*/
long: string;
/**
* The commit abbreviated hash.
*/
short: string;
};
/**
* The commit abbreviated and full tree hash.
*/
tree: {
/**
* The commit tree hash.
*/
long: string;
/**
* The commit abbreviated tree hash.
*/
short: string;
};
/**
* The commit author information.
*/
author: {
/**
* The commit author name.
*/
name: string;
/**
* The commit author email.
*/
email: string;
/**
* The commit author date.
*/
short: string;
};
/**
* The committer information.
*/
committer: {
/**
* The committer name.
*/
name: string;
/**
* The committer email.
*/
email: string;
/**
* The committer date.
*/
short: string;
};
/**
* The commit subject.
*/
subject: string;
/**
* The commit body.
*/
body: string;
/**
* The commit full message (subject and body).
*/
message: string;
/**
* The commit hash.
*/
hash: string;
/**
* The committer date.
*/
committerDate: string;
}
export interface BranchObject {
/**
* The name of git branch.
*
* A `name` is required for all types of branch. It can be defined as a
* [glob](https://github.com/micromatch/micromatch#matching-features)
* in which case the definition will be expanded to one per matching
* branch existing in the repository.
*
* If `name` doesn't match any branch existing in the repository, the
* definition will be ignored. For example, the default configuration
* includes the definition `next` and `next-major` which will become
* active only when the branches `next` and/or `next-major` are
* created in the repository.
*/
name: string;
/**
* The distribution channel on which to publish releases from this
* branch.
*
* If this field is set to `false`, then the branch will be released
* on the default distribution channel (for example the `@latest`
* [dist-tag](https://docs.npmjs.com/cli/dist-tag) for npm). This is
* also the default behavior for the first
* [release branch](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#release-branches)
* if the channel property is not set.
*
* For all other branches, if the channel property is not set, then the
* channel name will be the same as the branch name.
*
* The value of `channel`, if defined as a string, is generated with
* [Lodash template](https://lodash.com/docs#template) with the
* variable `name` set to the branch name.
*
* For example `{name: 'next', channel: 'channel-${name}'}` will be
* expanded to `{name: 'next', channel: 'channel-next'}`.
*/
channel?: string | false | undefined;
/**
* The range of [semantic versions](https://semver.org/) to support on
* this branch.
*
* A `range` only applies to maintenance branches and must be formatted
* like `N.N.x` or `N.x` (`N` is a number). If no range is specified
* but the `name` is formatted as a range, then the branch will be
* considered a maintenance branch and the `name` value will be used
* for the `range`.
*
* Required for maintenance branches, unless `name` is formatted like
* `N.N.x` or `N.x` (`N` is a number).
*/
range?: string | undefined;
/**
* The pre-release identifier to append to [semantic versions](https://semver.org/)
* released from this branch.
*
* A `prerelease` property applies only to pre-release branches and
* the `prerelease` value must be valid per the [Semantic Versioning
* Specification](https://semver.org/#spec-item-9). It will determine
* the name of versions. For example if `prerelease` is set to
* `"beta"`, the version will be formatted like `2.0.0-beta.1`,
* `2.0.0-beta.2`, etc.
*
* The value of `prerelease`, if defined as a string, is generated with
* [Lodash template](https://lodash.com/docs#template) with the
* variable `name` set to the name of the branch.
*
* If the `prerelease property is set to `true` then the name of the
* branch is used as the pre-release identifier.
*
* Required for pre-release branches.
*/
prerelease?: string | boolean | undefined;
}
/**
* Specifies a git branch holding commits to analyze and code to release.
*
* Each branch may be defined either by a string or an object. Specifying
* a string is a shortcut for specifying that string as the `name` field,
* for example `"master"` expands to `{name: "master"}`.
*/
export type BranchSpec = string | BranchObject;
/**
* A semver release type.
* See https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-types.js
*/
export type ReleaseType = "prerelease" | "prepatch" | "patch" | "preminor" | "minor" | "premajor" | "major";
/**
* Details of a release published by a publish plugin.
*/
export interface Release {
/**
* The release name, only if set by the corresponding publish plugin.
*/
name?: string | undefined;
/**
* The release URL, only if set by the corresponding publish plugin.
*/
url?: string | undefined;
/**
* The semver export type of the release.
*/
type: ReleaseType;
/**
* The version of the release.
*/
version: string;
/**
* The sha of the last commit being part of the release.
*/
gitHead: string;
/**
* The Git tag associated with the release.
*/
gitTag: string;
/**
* The release notes for the release.
*/
notes: string;
/**
* The name of the plugin that published the release.
*/
pluginName: string;
}
export interface LastRelease {
/**
* The version name of the release.
*/
version: string;
/**
* The Git tag of the release.
*/
gitTag: string;
/**
* List of channels the release was published to.
*/
channels: string[];
/**
* The Git checksum of the last commit of the release.
*/
gitHead: string;
/**
* The Release name
*/
name: string;
}
export interface NextRelease extends Omit<LastRelease, "channels"> {
/**
* The semver export type of the release.
*/
type: ReleaseType;
/**
* The release channel of the release.
*/
channel: string;
/**
* The release notes of the next release.
*/
notes?: string | undefined;
}
/**
* Specifies a plugin to use.
*
* The plugin is specified by its module name.
*
* To pass options to a plugin, specify an array containing the plugin module
* name and an options object.
*/
export type PluginSpec<T = any> = string | [string, T];
/**
* semantic-release options, after normalization and defaults have been
* applied.
*/
export interface GlobalConfig extends Options {
/**
* The branches on which releases should happen. By default
* **semantic-release** will release:
*
* * regular releases to the default distribution channel from the
* branch `master`
* * regular releases to a distribution channel matching the branch
* name from any existing branch with a name matching a maintenance
* release range (`N.N.x` or `N.x.x` or `N.x` with `N` being a
* number)
* * regular releases to the `next` distribution channel from the
* branch `next` if it exists
* * regular releases to the `next-major` distribution channel from
* the branch `next-major` if it exists.
* * prereleases to the `beta` distribution channel from the branch
* `beta` if it exists
* * prereleases to the `alpha` distribution channel from the branch
* `alpha` if it exists
*
* **Note**: If your repository does not have a release branch, then
* **semantic-release** will fail with an `ERELEASEBRANCHES` error
* message. If you are using the default configuration, you can fix
* this error by pushing a `master` branch.
*
* **Note**: Once **semantic-release** is configured, any user with the
* permission to push commits on one of those branches will be able to
* publish a release. It is recommended to protect those branches, for
* example with [GitHub protected branches](https://help.github.com/articles/about-protected-branches).
*
* See [Workflow configuration](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#workflow-configuration)
* for more details.
*/
branches: ReadonlyArray<BranchSpec> | BranchSpec;
/**
* The git repository URL.
*
* Any valid git url format is supported (see
* [git protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols))
*
* Default: `repository` property in `package.json`, or git origin url.
*/
repositoryUrl: string;
/**
* The git tag format used by **semantic-release** to identify
* releases. The tag name is generated with [Lodash template](https://lodash.com/docs#template)
* and will be compiled with the `version` variable.
*
* **Note**: The `tagFormat` must contain the `version` variable
* exactly once and compile to a
* [valid git reference](https://git-scm.com/docs/git-check-ref-format#_description).
*/
tagFormat: string;
/**
* Define the list of plugins to use. Plugins will run in series, in
* the order defined, for each [step](https://semantic-release.gitbook.io/semantic-release/#release-steps)
* if they implement it.
*
* Plugins configuration can be defined by wrapping the name and an
* options object in an array.
*
* See [Plugins configuration](https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugins)
* for more details.
*
* Default: `[
* "@semantic-release/commit-analyzer",
* "@semantic-release/release-notes-generator",
* "@semantic-release/npm",
* "@semantic-release/github"
* ]`
*/
plugins: ReadonlyArray<PluginSpec>;
}
/** semantic-release configuration specific for API usage. */
export interface Config {
/**
* The current working directory to use. It should be configured to
* the root of the Git repository to release from.
*
* It allows to run semantic-release from a specific path without
* having to change the local process cwd with process.chdir().
*
* @default process.cwd
*/
cwd?: string | undefined;
/**
* The environment variables to use.
*
* It allows to run semantic-release with specific environment
* variables without having to modify the local process.env.
*
* @default process.env
*/
env?: Record<string, any> | undefined;
/**
* The writable stream used to log information.
*
* It allows to configure semantic-release to write logs to a specific
* stream rather than the local process.stdout.
*
* @default process.stdout
*/
stdout?: NodeJS.WriteStream | undefined;
/**
* The writable stream used to log errors.
*
* It allows to configure semantic-release to write errors to a
* specific stream rather than the local process.stderr.
*
* @default process.stderr
*/
stderr?: NodeJS.WriteStream | undefined;
}
/**
* semantic-release options.
*
* Can be used to set any core option or plugin options.
* Each option will take precedence over options configured in the
* configuration file and shareable configurations.
*/
export interface Options {
/**
* List of modules or file paths containing a
* [shareable configuration](https://semantic-release.gitbook.io/semantic-release/usage/shareable-configurations).
* If multiple shareable configurations are set, they will be imported
* in the order defined with each configuration option taking
* precedence over the options defined in a previous shareable
* configuration.
*
* **Note**: Options defined via CLI arguments or in the configuration
* file will take precedence over the ones defined in any shareable
* configuration.
*/
extends?: ReadonlyArray<string> | string | undefined;
/**
* The branches on which releases should happen. By default
* **semantic-release** will release:
*
* * regular releases to the default distribution channel from the
* branch `master`
* * regular releases to a distribution channel matching the branch
* name from any existing branch with a name matching a maintenance
* release range (`N.N.x` or `N.x.x` or `N.x` with `N` being a
* number)
* * regular releases to the `next` distribution channel from the
* branch `next` if it exists
* * regular releases to the `next-major` distribution channel from
* the branch `next-major` if it exists.
* * prereleases to the `beta` distribution channel from the branch
* `beta` if it exists
* * prereleases to the `alpha` distribution channel from the branch
* `alpha` if it exists
*
* **Note**: If your repository does not have a release branch, then
* **semantic-release** will fail with an `ERELEASEBRANCHES` error
* message. If you are using the default configuration, you can fix
* this error by pushing a `master` branch.
*
* **Note**: Once **semantic-release** is configured, any user with the
* permission to push commits on one of those branches will be able to
* publish a release. It is recommended to protect those branches, for
* example with [GitHub protected branches](https://help.github.com/articles/about-protected-branches).
*
* See [Workflow configuration](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#workflow-configuration)
* for more details.
*/
branches?: ReadonlyArray<BranchSpec> | BranchSpec | undefined;
/**
* The git repository URL.
*
* Any valid git url format is supported (see
* [git protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols))
*
* Default: `repository` property in `package.json`, or git origin url.
*/
repositoryUrl?: string | undefined;
/**
* The git tag format used by **semantic-release** to identify
* releases. The tag name is generated with [Lodash template](https://lodash.com/docs#template)
* and will be compiled with the `version` variable.
*
* **Note**: The `tagFormat` must contain the `version` variable
* exactly once and compile to a
* [valid git reference](https://git-scm.com/docs/git-check-ref-format#_description).
*/
tagFormat?: string | undefined;
/**
* Define the list of plugins to use. Plugins will run in series, in
* the order defined, for each [step](https://semantic-release.gitbook.io/semantic-release/#release-steps)
* if they implement it.
*
* Plugins configuration can be defined by wrapping the name and an
* options object in an array.
*
* See [Plugins configuration](https://semantic-release.gitbook.io/semantic-release/usage/plugins#plugins)
* for more details.
*
* Default: `[
* "@semantic-release/commit-analyzer",
* "@semantic-release/release-notes-generator",
* "@semantic-release/npm",
* "@semantic-release/github"
* ]`
*/
plugins?: ReadonlyArray<PluginSpec> | undefined;
/**
* Dry-run mode, skip publishing, print next version and release notes.
*/
dryRun?: boolean | undefined;
/**
* Set to false to skip Continuous Integration environment verifications.
* This allows for making releases from a local machine.
*/
ci?: boolean | undefined;
/**
* Any other options supported by plugins.
*/
[name: string]: any;
}
/**
* An object with details of the release if a release was published, or
* false if no release was published.
*/
export type Result =
| false
| {
/**
* Information related to the last release found.
*/
lastRelease: LastRelease;
/**
* The list of commits included in the new release.
*/
commits: Commit[];
/**
* Information related to the newly published release.
*/
nextRelease: NextRelease;
/**
* The list of releases published, one release per publish plugin.
*/
releases: Release[];
};
/**
* Run semantic-release and returns a Promise that resolves to a Result
* object.
* @async
*/
export default function (options: Options, environment?: Config): Promise<Result>;
}
+7 -4
View File
@@ -123,12 +123,15 @@ async function run(context, plugins) {
if (options.dryRun) {
logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`);
} else {
await addNote({ channels: [...currentRelease.channels, nextRelease.channel] }, nextRelease.gitHead, {
await addNote({ channels: [...currentRelease.channels, nextRelease.channel] }, nextRelease.gitTag, {
cwd,
env,
});
await push(options.repositoryUrl, { cwd, env });
await pushNotes(options.repositoryUrl, { cwd, env });
await pushNotes(options.repositoryUrl, nextRelease.gitTag, {
cwd,
env,
});
logger.success(
`Add ${nextRelease.channel ? `channel ${nextRelease.channel}` : "default channel"} to tag ${
nextRelease.gitTag
@@ -203,9 +206,9 @@ async function run(context, plugins) {
} else {
// Create the tag before calling the publish plugins as some require the tag to exists
await tag(nextRelease.gitTag, nextRelease.gitHead, { cwd, env });
await addNote({ channels: [nextRelease.channel] }, nextRelease.gitHead, { cwd, env });
await addNote({ channels: [nextRelease.channel] }, nextRelease.gitTag, { cwd, env });
await push(options.repositoryUrl, { cwd, env });
await pushNotes(options.repositoryUrl, { cwd, env });
await pushNotes(options.repositoryUrl, nextRelease.gitTag, { cwd, env });
logger.success(`Created tag ${nextRelease.gitTag}`);
}
+1 -1
View File
@@ -60,7 +60,7 @@ export function release({ release }) {
return release;
}
// The intial lastVersion is the last release from the base branch of `FIRST_RELEASE` (1.0.0)
// The initial lastVersion is the last release from the base branch of `FIRST_RELEASE` (1.0.0)
let lastVersion = getLatestVersion(tagsToVersions(release[0].tags)) || FIRST_RELEASE;
return release.map(({ name, tags, channel, ...rest }, idx) => {
+5 -7
View File
@@ -1,11 +1,10 @@
import { dirname, resolve } from "node:path";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { createRequire } from "node:module";
import { castArray, isNil, isPlainObject, isString, pickBy } from "lodash-es";
import { readPackageUp } from "read-pkg-up";
import { cosmiconfig } from "cosmiconfig";
import resolveFrom from "resolve-from";
import importFrom from "import-from-esm";
import debugConfig from "debug";
import { repoUrl } from "./git.js";
import PLUGINS_DEFINITIONS from "./definitions/plugins.js";
@@ -14,7 +13,6 @@ import { parseConfig, validatePlugin } from "./plugins/utils.js";
const debug = debugConfig("semantic-release:config");
const __dirname = dirname(fileURLToPath(import.meta.url));
const require = createRequire(import.meta.url);
const CONFIG_NAME = "release";
@@ -35,7 +33,7 @@ export default async (context, cliOptions) => {
options = {
...(await castArray(extendPaths).reduce(async (eventualResult, extendPath) => {
const result = await eventualResult;
const extendsOptions = require(resolveFrom.silent(__dirname, extendPath) || resolveFrom(cwd, extendPath));
const extendsOptions = (await importFrom.silent(__dirname, extendPath)) || (await importFrom(cwd, extendPath));
// For each plugin defined in a shareable config, save in `pluginsPath` the extendable config path,
// so those plugin will be loaded relative to the config file
@@ -76,8 +74,8 @@ export default async (context, cliOptions) => {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
//"@semantic-release/npm",
//"@semantic-release/github",
],
// Remove `null` and `undefined` options, so they can be replaced with default ones
...pickBy(options, (option) => !isNil(option)),
+1 -1
View File
@@ -36,7 +36,7 @@ function formatAuthUrl(protocol, repositoryUrl, gitCredentials) {
* @param {Object} context semantic-release context.
* @param {String} authUrl Repository URL to verify
*
* @return {String} The authUrl as is if the connection was successfull, null otherwise
* @return {String} The authUrl as is if the connection was successful, null otherwise
*/
async function ensureValidAuthUrl({ cwd, env, branch }, authUrl) {
try {
+5 -1
View File
@@ -30,7 +30,11 @@ export default ({ branch, options: { tagFormat } }, { before } = {}) => {
const [{ version, gitTag, channels } = {}] = branch.tags
.filter(
(tag) =>
((branch.type === "prerelease" && tag.channels.some((channel) => isSameChannel(branch.channel, channel))) ||
((branch.type === "prerelease" &&
tag.channels.some((channel) => isSameChannel(branch.channel, channel)) &&
semver
.parse(tag.version)
.prerelease.includes(branch.prerelease === true ? branch.name : branch.prerelease)) ||
!semver.prerelease(tag.version)) &&
(isUndefined(before) || semver.lt(tag.version, before))
)
+39 -10
View File
@@ -2,6 +2,7 @@ import gitLogParser from "git-log-parser";
import getStream from "get-stream";
import { execa } from "execa";
import debugGit from "debug";
import { merge } from "lodash-es";
import { GIT_NOTE_REF } from "./definitions/constants.js";
const debug = debugGit("semantic-release:git");
@@ -141,13 +142,9 @@ export async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
*/
export async function fetchNotes(repositoryUrl, execaOptions) {
try {
await execa(
"git",
["fetch", "--unshallow", repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`],
execaOptions
);
await execa("git", ["fetch", "--unshallow", repositoryUrl, `+refs/notes/*:refs/notes/*`], execaOptions);
} catch {
await execa("git", ["fetch", repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`], {
await execa("git", ["fetch", repositoryUrl, `+refs/notes/*:refs/notes/*`], {
...execaOptions,
reject: false,
});
@@ -246,8 +243,8 @@ export async function push(repositoryUrl, execaOptions) {
*
* @throws {Error} if the push failed.
*/
export async function pushNotes(repositoryUrl, execaOptions) {
await execa("git", ["push", repositoryUrl, `refs/notes/${GIT_NOTE_REF}`], execaOptions);
export async function pushNotes(repositoryUrl, ref, execaOptions) {
await execa("git", ["push", repositoryUrl, `refs/notes/${GIT_NOTE_REF}-${ref}`], execaOptions);
}
/**
@@ -307,8 +304,26 @@ export async function isBranchUpToDate(repositoryUrl, branch, execaOptions) {
* @return {Object} the parsed JSON note if there is one, an empty object otherwise.
*/
export async function getNote(ref, execaOptions) {
const handleError = (error) => {
if (error.exitCode === 1) {
return { stdout: "{}" };
}
debug(error);
throw error;
};
try {
return JSON.parse((await execa("git", ["notes", "--ref", GIT_NOTE_REF, "show", ref], execaOptions)).stdout);
return merge(
JSON.parse(
// Used for retro-compatibility
(await execa("git", ["notes", "--ref", GIT_NOTE_REF, "show", ref], execaOptions).catch(handleError)).stdout
),
JSON.parse(
(await execa("git", ["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "show", ref], execaOptions).catch(handleError))
.stdout
)
);
} catch (error) {
if (error.exitCode === 1) {
return {};
@@ -327,5 +342,19 @@ export async function getNote(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
export async function addNote(note, ref, execaOptions) {
await execa("git", ["notes", "--ref", GIT_NOTE_REF, "add", "-f", "-m", JSON.stringify(note), ref], execaOptions);
await execa(
"git",
["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "add", "-f", "-m", JSON.stringify(note), ref],
execaOptions
);
}
/**
* Get the reference of a tag
*
* @param {String} tag The tag name to get the reference of.
* @param {Object} [execaOpts] Options to pass to `execa`.
**/
export async function getTagRef(tag, execaOptions) {
return (await execa("git", ["show-ref", tag, "--hash"], execaOptions)).stdout;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

+9311 -9427
View File
File diff suppressed because it is too large Load Diff
+59 -35
View File
@@ -6,7 +6,8 @@
"author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
"ava": {
"files": [
"test/**/*.test.js"
"test/**/*.test.js",
"!test/integration.test.js"
],
"nodeArguments": [
"--loader=testdouble",
@@ -26,29 +27,30 @@
"Matt Travi <npm@travi.org> (https://matt.travi.org/)"
],
"dependencies": {
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/error": "^3.0.0",
"@semantic-release/github": "^8.0.0",
"@semantic-release/npm": "^10.0.2",
"@semantic-release/release-notes-generator": "^10.0.0",
"aggregate-error": "^4.0.1",
"cosmiconfig": "^8.0.0",
"@semantic-release/commit-analyzer": "^11.0.0",
"@semantic-release/error": "^4.0.0",
"@semantic-release/github": "^9.0.0",
"@semantic-release/npm": "^11.0.0",
"@semantic-release/release-notes-generator": "^12.0.0",
"aggregate-error": "^5.0.0",
"cosmiconfig": "^9.0.0",
"debug": "^4.0.0",
"env-ci": "^9.0.0",
"execa": "^7.0.0",
"figures": "^5.0.0",
"env-ci": "^11.0.0",
"execa": "^8.0.0",
"figures": "^6.0.0",
"find-versions": "^5.1.0",
"get-stream": "^6.0.0",
"git-log-parser": "^1.2.0",
"hook-std": "^3.0.0",
"hosted-git-info": "^6.0.0",
"hosted-git-info": "^7.0.0",
"import-from-esm": "^1.3.1",
"lodash-es": "^4.17.21",
"marked": "^4.1.0",
"marked-terminal": "^5.1.1",
"marked": "^11.0.0",
"marked-terminal": "^7.0.0",
"micromatch": "^4.0.2",
"p-each-series": "^3.0.0",
"p-reduce": "^3.0.0",
"read-pkg-up": "^9.1.0",
"read-pkg-up": "^11.0.0",
"resolve-from": "^5.0.0",
"semver": "^7.3.2",
"semver-diff": "^4.0.0",
@@ -56,32 +58,37 @@
"yargs": "^17.5.1"
},
"devDependencies": {
"ava": "5.2.0",
"c8": "7.13.0",
"ava": "6.1.1",
"c8": "9.1.0",
"clear-module": "4.1.2",
"codecov": "3.8.3",
"delay": "5.0.0",
"dockerode": "3.3.5",
"cz-conventional-changelog": "3.3.0",
"dockerode": "4.0.2",
"file-url": "4.0.0",
"fs-extra": "11.1.1",
"got": "12.6.0",
"fs-extra": "11.2.0",
"got": "14.2.0",
"js-yaml": "4.1.0",
"lockfile-lint": "4.12.1",
"ls-engines": "0.9.1",
"mockserver-client": "5.15.0",
"nock": "13.3.0",
"p-retry": "5.1.2",
"prettier": "2.8.7",
"sinon": "15.0.3",
"nock": "13.5.1",
"npm-run-all2": "6.1.2",
"p-retry": "6.2.0",
"prettier": "3.2.5",
"publint": "0.2.7",
"sinon": "17.0.1",
"stream-buffers": "3.0.2",
"tempy": "3.0.0",
"testdouble": "3.17.2"
"tempy": "3.1.0",
"testdouble": "3.20.1"
},
"engines": {
"node": ">=18"
"node": ">=20.8.1"
},
"files": [
"bin",
"docs",
"lib",
"index.d.ts",
"index.js",
"cli.js"
],
@@ -98,7 +105,8 @@
"version"
],
"license": "MIT",
"main": "index.js",
"main": "./index.js",
"types": "index.d.ts",
"c8": {
"include": [
"lib/**/*.js",
@@ -112,6 +120,14 @@
],
"all": true
},
"lockfile-lint": {
"path": "package-lock.json",
"type": "npm",
"validate-https": true,
"allowed-hosts": [
"npm"
]
},
"prettier": {
"printWidth": 120,
"trailingComma": "es5"
@@ -124,18 +140,26 @@
"type": "git",
"url": "git+https://github.com/semantic-release/semantic-release.git"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"scripts": {
"codecov": "codecov -f coverage/coverage-final.json",
"lint": "prettier --check \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"docs/**/*.md\" \"{bin,lib,test}/**/*.js\"",
"lint:fix": "prettier --write \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"docs/**/*.md\" \"{bin,lib,test}/**/*.js\"",
"pretest": "npm run lint",
"lint:prettier": "prettier --check \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"docs/**/*.md\" \"{bin,lib,test}/**/*.js\"",
"lint:prettier:fix": "prettier --write \"*.{js,json,md}\" \".github/**/*.{md,yml}\" \"docs/**/*.md\" \"{bin,lib,test}/**/*.js\"",
"lint:lockfile": "lockfile-lint",
"lint:engines": "ls-engines",
"lint:publish": "publint --strict",
"semantic-release": "./bin/semantic-release.js",
"test": "c8 ava --verbose",
"test:ci": "c8 ava --verbose"
"test": "npm-run-all --print-label --parallel lint:* --parallel test:*",
"test:unit": "c8 ava --verbose",
"test:integration": "ava --verbose test/integration.test.js"
},
"renovate": {
"extends": [
"github>semantic-release/.github"
"github>semantic-release/.github:renovate-config"
]
}
}
+86
View File
@@ -389,6 +389,92 @@ test.serial('Read configuration from an array of paths in "extends"', async (t)
t.deepEqual(result, { options: expectedOptions, plugins: pluginsConfig });
});
test.serial('Read configuration from an array of CJS files in "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
const { cwd } = await gitRepo();
const pkgOptions = { extends: ["./shareable1.cjs", "./shareable2.cjs"] };
const options1 = {
verifyRelease: "verifyRelease1",
analyzeCommits: { path: "analyzeCommits1", param: "analyzeCommits_param1" },
branches: ["test_branch"],
repositoryUrl: "https://host.null/owner/module.git",
};
const options2 = {
verifyRelease: "verifyRelease2",
generateNotes: "generateNotes2",
analyzeCommits: { path: "analyzeCommits2", param: "analyzeCommits_param2" },
branches: ["test_branch"],
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json and shareable.json in repository root
await outputJson(path.resolve(cwd, "package.json"), { release: pkgOptions });
await writeFile(path.resolve(cwd, "shareable1.cjs"), `module.exports = ${JSON.stringify(options1)}`);
await writeFile(path.resolve(cwd, "shareable2.cjs"), `module.exports = ${JSON.stringify(options2)}`);
const expectedOptions = { ...options1, ...options2, branches: ["test_branch"] };
// Verify the plugins module is called with the plugin options from shareable1.mjs and shareable2.mjs
td.when(
plugins(
{ options: expectedOptions, cwd },
{
verifyRelease1: "./shareable1.cjs",
verifyRelease2: "./shareable2.cjs",
generateNotes2: "./shareable2.cjs",
analyzeCommits1: "./shareable1.cjs",
analyzeCommits2: "./shareable2.cjs",
}
)
).thenResolve(pluginsConfig);
const result = await t.context.getConfig({ cwd });
// Verify the options contains the plugin config from shareable1.json and shareable2.json
t.deepEqual(result, { options: expectedOptions, plugins: pluginsConfig });
});
test.serial('Read configuration from an array of ESM files in "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
const { cwd } = await gitRepo();
const pkgOptions = { extends: ["./shareable1.mjs", "./shareable2.mjs"] };
const options1 = {
verifyRelease: "verifyRelease1",
analyzeCommits: { path: "analyzeCommits1", param: "analyzeCommits_param1" },
branches: ["test_branch"],
repositoryUrl: "https://host.null/owner/module.git",
};
const options2 = {
verifyRelease: "verifyRelease2",
generateNotes: "generateNotes2",
analyzeCommits: { path: "analyzeCommits2", param: "analyzeCommits_param2" },
branches: ["test_branch"],
tagFormat: `v\${version}`,
plugins: false,
};
// Create package.json and shareable.json in repository root
await outputJson(path.resolve(cwd, "package.json"), { release: pkgOptions });
await writeFile(path.resolve(cwd, "shareable1.mjs"), `export default ${JSON.stringify(options1)}`);
await writeFile(path.resolve(cwd, "shareable2.mjs"), `export default ${JSON.stringify(options2)}`);
const expectedOptions = { ...options1, ...options2, branches: ["test_branch"] };
// Verify the plugins module is called with the plugin options from shareable1.mjs and shareable2.mjs
td.when(
plugins(
{ options: expectedOptions, cwd },
{
verifyRelease1: "./shareable1.mjs",
verifyRelease2: "./shareable2.mjs",
generateNotes2: "./shareable2.mjs",
analyzeCommits1: "./shareable1.mjs",
analyzeCommits2: "./shareable2.mjs",
}
)
).thenResolve(pluginsConfig);
const result = await t.context.getConfig({ cwd });
// Verify the options contains the plugin config from shareable1.json and shareable2.json
t.deepEqual(result, { options: expectedOptions, plugins: pluginsConfig });
});
test.serial('Prioritize configuration from config file over "extends"', async (t) => {
// Create a git repository, set the current working directory at the root of the repo
const { cwd } = await gitRepo();
+37
View File
@@ -43,6 +43,43 @@ test("Get the highest prerelease valid tag, ignoring other tags from other prere
});
});
test("Get the correct prerelease tag, when other prereleases share the same git HEAD", (t) => {
const testConfig = {
branch: {
name: "alpha",
prerelease: "alpha",
channel: "alpha",
tags: [
{ version: "1.0.0-beta.1", gitTag: "v1.0.0-beta.1", gitHead: "v1.0.0-beta.1", channels: ["beta"] },
{ version: "1.0.0-beta.2", gitTag: "v1.0.0-beta.2", gitHead: "v1.0.0-alpha.1", channels: ["alpha", "beta"] },
{ version: "1.0.0-alpha.1", gitTag: "v1.0.0-alpha.1", gitHead: "v1.0.0-alpha.1", channels: ["alpha", "beta"] },
],
type: "prerelease",
},
options: { tagFormat: `v\${version}`, debug: true },
};
const firstResult = getLastRelease(testConfig);
t.deepEqual(firstResult, {
version: "1.0.0-alpha.1",
gitTag: "v1.0.0-alpha.1",
name: "v1.0.0-alpha.1",
gitHead: "v1.0.0-alpha.1",
channels: ["alpha", "beta"],
});
testConfig.branch.prerelease = true;
const secondResult = getLastRelease(testConfig);
t.deepEqual(secondResult, {
version: "1.0.0-alpha.1",
gitTag: "v1.0.0-alpha.1",
name: "v1.0.0-alpha.1",
gitHead: "v1.0.0-alpha.1",
channels: ["alpha", "beta"],
});
});
test("Return empty object if no valid tag is found", (t) => {
const result = getLastRelease({
branch: {
+21
View File
@@ -275,3 +275,24 @@ test("Increase version for release on prerelease branch when there is no regular
"1.0.0-beta.2"
);
});
test("Increase patch when previous version shares HEAD with other releases", (t) => {
t.is(
getNextVersion({
branch: {
name: "alpha",
type: "prerelease",
prerelease: "alpha",
tags: [
{ gitTag: "v1.0.0-beta.1", version: "1.0.0-beta.1", channels: ["beta"] },
{ gitTag: "v1.0.0-beta.2", version: "1.0.0-beta.2", channels: ["alpha", "beta"] },
{ gitTag: "v1.0.0-alpha.1", version: "1.0.0-alpha.1", channels: ["alpha", "beta"] },
],
},
nextRelease: { type: "patch", channel: "alpha" },
lastRelease: { version: "v1.0.0-alpha.1", channels: ["alpha", "beta"] },
logger: t.context.logger,
}),
"1.0.0-alpha.2"
);
});
+6 -8
View File
@@ -43,7 +43,7 @@ export async function initGit(withRemote) {
*
* @param {Boolean} withRemote `true` to create a shallow clone of a bare repository.
* @param {String} [branch='master'] The branch to initialize.
* @return {String} The path of the clone if `withRemote` is `true`, the path of the repository otherwise.
* @return {Promise<Object>} The path of the clone if `withRemote` is `true`, the path of the repository otherwise.
*/
export async function gitRepo(withRemote, branch = "master") {
let { cwd, repositoryUrl } = await initGit(withRemote);
@@ -90,9 +90,7 @@ export async function gitCommits(messages, execaOptions) {
await pEachSeries(
messages,
async (message) =>
(
await execa("git", ["commit", "-m", message, "--allow-empty", "--no-gpg-sign"], execaOptions)
).stdout
(await execa("git", ["commit", "-m", message, "--allow-empty", "--no-gpg-sign"], execaOptions)).stdout
);
return (await gitGetCommits(undefined, execaOptions)).slice(0, messages.length);
}
@@ -100,7 +98,7 @@ export async function gitCommits(messages, execaOptions) {
/**
* Get the list of parsed commits since a git reference.
*
* @param {String} [from] Git reference from which to seach commits.
* @param {String} [from] Git reference from which to search commits.
* @param {Object} [execaOpts] Options to pass to `execa`.
*
* @return {Array<Object>} The list of parsed commits.
@@ -242,7 +240,7 @@ export async function gitTagHead(tagName, execaOptions) {
* Get the first commit sha referenced by the tag `tagName` in the remote repository.
*
* @param {String} repositoryUrl The repository remote URL.
* @param {String} tagName The tag name to seach for.
* @param {String} tagName The tag name to search for.
* @param {Object} [execaOpts] Options to pass to `execa`.
*
* @return {String} The sha of the commit associated with `tagName` on the remote repository.
@@ -317,7 +315,7 @@ export async function rebase(ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
export async function gitAddNote(note, ref, execaOptions) {
await execa("git", ["notes", "--ref", GIT_NOTE_REF, "add", "-m", note, ref], execaOptions);
await execa("git", ["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "add", "-m", note, ref], execaOptions);
}
/**
@@ -327,5 +325,5 @@ export async function gitAddNote(note, ref, execaOptions) {
* @param {Object} [execaOpts] Options to pass to `execa`.
*/
export async function gitGetNote(ref, execaOptions) {
return (await execa("git", ["notes", "--ref", GIT_NOTE_REF, "show", ref], execaOptions)).stdout;
return (await execa("git", ["notes", "--ref", `${GIT_NOTE_REF}-${ref}`, "show", ref], execaOptions)).stdout;
}
+12 -4
View File
@@ -1,5 +1,4 @@
import Docker from "dockerode";
import getStream from "get-stream";
import pRetry from "p-retry";
import { gitShallowClone, initBareRepo } from "./git-utils.js";
@@ -15,11 +14,20 @@ let container;
export const gitCredential = `${GIT_USERNAME}:${GIT_PASSWORD}`;
/**
* Download the `gitbox` Docker image, create a new container and start it.
* Download the `gitbox` Docker image
*/
export function pull() {
return docker.pull(IMAGE).then((stream) => {
return new Promise((resolve, reject) => {
docker.modem.followProgress(stream, (err, res) => (err ? reject(err) : resolve(res)));
});
});
}
/**
* create a new container and start it.
*/
export async function start() {
await getStream(await docker.pull(IMAGE));
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
+12 -4
View File
@@ -1,5 +1,4 @@
import Docker from "dockerode";
import getStream from "get-stream";
import got from "got";
import pRetry from "p-retry";
import { mockServerClient } from "mockserver-client";
@@ -11,11 +10,20 @@ const docker = new Docker();
let container;
/**
* Download the `mockserver` Docker image, create a new container and start it.
* Download the `mockserver` Docker image,
*/
export function pull() {
return docker.pull(IMAGE).then((stream) => {
return new Promise((resolve, reject) => {
docker.modem.followProgress(stream, (err, res) => (err ? reject(err) : resolve(res)));
});
});
}
/**
* create a new container and start it.
*/
export async function start() {
await getStream(await docker.pull(IMAGE));
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
+14 -6
View File
@@ -1,9 +1,8 @@
import path, { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { setTimeout } from "node:timers/promises";
import Docker from "dockerode";
import getStream from "get-stream";
import got from "got";
import delay from "delay";
import pRetry from "p-retry";
const IMAGE = "verdaccio/verdaccio:5";
@@ -17,11 +16,20 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
let container, npmToken;
/**
* Download the `npm-registry-docker` Docker image, create a new container and start it.
* Download the `npm-registry-docker` Docker image
*/
export function pull() {
return docker.pull(IMAGE).then((stream) => {
return new Promise((resolve, reject) => {
docker.modem.followProgress(stream, (err, res) => (err ? reject(err) : resolve(res)));
});
});
}
/**
* create a new container and start it.
*/
export async function start() {
await getStream(await docker.pull(IMAGE));
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
@@ -33,7 +41,7 @@ export async function start() {
});
await container.start();
await delay(4000);
await setTimeout(4000);
try {
// Wait for the registry to be ready
+1 -1
View File
@@ -11,7 +11,7 @@ test("Replace multiple sensitive environment variable values", (t) => {
);
});
test("Replace multiple occurences of sensitive environment variable values", (t) => {
test("Replace multiple occurrences of sensitive environment variable values", (t) => {
const env = { secretKey: "secret" };
t.is(
hideSensitive(env)(`https://user:${env.secretKey}@host.com?token=${env.secretKey}`),
+13 -4
View File
@@ -1853,10 +1853,19 @@ test.serial("Throw an Error if plugin returns an unexpected value", async (t) =>
await td.replaceEsm("../lib/get-logger.js", null, () => t.context.logger);
await td.replaceEsm("env-ci", null, () => ({ isCi: true, branch: "master", isPr: false }));
const semanticRelease = (await import("../index.js")).default;
const error = await t.throwsAsync(
semanticRelease(options, { cwd, env: {}, stdout: new WritableStreamBuffer(), stderr: new WritableStreamBuffer() }),
{ instanceOf: SemanticReleaseError }
);
let error;
try {
await semanticRelease(options, {
cwd,
env: {},
stdout: new WritableStreamBuffer(),
stderr: new WritableStreamBuffer(),
});
} catch (e) {
error = e;
}
t.is(error.code, "EANALYZECOMMITSOUTPUT");
t.regex(error.details, /string/);
});
+7 -6
View File
@@ -1,11 +1,11 @@
import path from "path";
import path from "node:path";
import { setTimeout } from "node:timers/promises";
import test from "ava";
import * as td from "testdouble";
import { escapeRegExp } from "lodash-es";
import fsExtra from "fs-extra";
import { execa } from "execa";
import { WritableStreamBuffer } from "stream-buffers";
import delay from "delay";
import getAuthUrl from "../lib/get-git-auth-url.js";
import { SECRET_REPLACEMENT } from "../lib/definitions/constants.js";
@@ -35,7 +35,7 @@ let env;
// Environment variables used only for the local npm command used to do verification
const npmTestEnv = {
...process.env,
...processEnvWithoutGitHubActionsVariables,
...npmRegistry.authEnv(),
npm_config_registry: npmRegistry.url,
};
@@ -47,6 +47,7 @@ const pluginLogEnv = path.resolve("./test/fixtures/plugin-log-env");
const pluginEsmNamedExports = path.resolve("./test/fixtures/plugin-esm-named-exports");
test.before(async () => {
await Promise.all([gitbox.pull(), npmRegistry.pull(), mockServer.pull()]);
await Promise.all([gitbox.start(), npmRegistry.start(), mockServer.start()]);
env = {
@@ -295,7 +296,7 @@ test("Release patch, minor and major versions", async (t) => {
t.is(exitCode, 0);
// Wait for 3s as the change of dist-tag takes time to be reflected in the registry
await delay(3000);
await setTimeout(3000);
// Retrieve the published package from the registry and check version and gitHead
({
"dist-tags": { latest: releasedVersion },
@@ -515,8 +516,8 @@ test("Pass options via CLI arguments", async (t) => {
});
test("Run via JS API", async (t) => {
td.replace("../lib/logger", { log: () => {}, error: () => {}, stdout: () => {} });
td.replace("env-ci", () => ({ isCi: true, branch: "master", isPr: false }));
await td.replaceEsm("../lib/logger", null, { log: () => {}, error: () => {}, stdout: () => {} });
await td.replaceEsm("env-ci", null, () => ({ isCi: true, branch: "master", isPr: false }));
const semanticRelease = (await import("../index.js")).default;
const packageName = "test-js-api";
const owner = "git";
+1 -1
View File
@@ -96,7 +96,7 @@ test("Normalize and load plugin from function", async (t) => {
t.is(typeof plugin, "function");
});
test("Normalize and load plugin that retuns multiple functions", async (t) => {
test("Normalize and load plugin that returns multiple functions", async (t) => {
const plugin = await normalize(
{ cwd, options: {}, logger: t.context.logger },
"verifyConditions",
+2 -2
View File
@@ -52,7 +52,7 @@ test("validateStep: optional plugin configuration", (t) => {
t.true(validateStep(type, { path: () => {}, options: "value" }));
t.false(validateStep(type, { path: null }));
// Considered as an Array of 2 definitions and not as one Array definition in case of a muliple plugin type
// Considered as an Array of 2 definitions and not as one Array definition in case of a multiple plugin type
t.false(validateStep(type, [() => {}, { options: "value" }]));
t.false(validateStep(type, ["plugin-path.js", { options: "value" }]));
@@ -134,7 +134,7 @@ test("validateStep: required plugin configuration", (t) => {
t.true(validateStep(type, { path: () => {}, options: "value" }));
t.false(validateStep(type, { path: null }));
// Considered as an Array of 2 definitions and not as one Array definition in the case of a muliple plugin type
// Considered as an Array of 2 definitions and not as one Array definition in the case of a multiple plugin type
t.false(validateStep(type, [() => {}, { options: "value" }]));
t.false(validateStep(type, ["plugin-path.js", { options: "value" }]));