release-it 17.1.1 → 17.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -79
- package/lib/index.js +6 -1
- package/lib/plugin/git/Git.js +6 -1
- package/lib/util.js +1 -0
- package/package.json +16 -15
- package/test/git.init.js +1 -1
package/README.md
CHANGED
|
@@ -60,18 +60,13 @@ npx release-it
|
|
|
60
60
|
|
|
61
61
|
You will be prompted to select the new version, and more prompts will follow based on your configuration.
|
|
62
62
|
|
|
63
|
-
## Experimental: knowledge base
|
|
64
|
-
|
|
65
|
-
You might want to ask your questions in the [Release It! knowledge base][15] (powered by OpenAI and [7-docs][16]). This
|
|
66
|
-
is an experimental knowledge base, answers may be incorrect.
|
|
67
|
-
|
|
68
63
|
## Yarn
|
|
69
64
|
|
|
70
|
-
Using Yarn? Please see the [npm section on Yarn][
|
|
65
|
+
Using Yarn? Please see the [npm section on Yarn][15].
|
|
71
66
|
|
|
72
67
|
## Monorepos
|
|
73
68
|
|
|
74
|
-
Using a monorepo? Please see this [monorepo recipe][
|
|
69
|
+
Using a monorepo? Please see this [monorepo recipe][16].
|
|
75
70
|
|
|
76
71
|
## Global Installation
|
|
77
72
|
|
|
@@ -80,6 +75,11 @@ Per-project installation as shown above is recommended, but global installs are
|
|
|
80
75
|
- From npm: `npm install -g release-it`
|
|
81
76
|
- From Homebrew: `brew install release-it`
|
|
82
77
|
|
|
78
|
+
## Containerized
|
|
79
|
+
|
|
80
|
+
Use [Release It! - Containerized][17] to run it in any environment as a standardized container without the need for a
|
|
81
|
+
Node environment. Thanks [Juan Carlos][18]!
|
|
82
|
+
|
|
83
83
|
## Videos, articles & examples
|
|
84
84
|
|
|
85
85
|
Here's a list of interesting external resources:
|
|
@@ -291,66 +291,67 @@ Use `verbose: 2` in a configuration file to have the equivalent of `-VV` on the
|
|
|
291
291
|
|
|
292
292
|
Since v11, release-it can be extended in many, many ways. Here are some plugins:
|
|
293
293
|
|
|
294
|
-
| Plugin | Description
|
|
295
|
-
| ----------------------------------------- |
|
|
296
|
-
| [@release-it/bumper][25] | Read & write the version from/to any file
|
|
297
|
-
| [@release-it/conventional-changelog][26] | Provides recommended bump, conventional-changelog, and updates `CHANGELOG.md`
|
|
298
|
-
| [@release-it/keep-a-changelog][39] | Maintain CHANGELOG.md using the Keep a Changelog standards
|
|
299
|
-
| [@release-it-plugins/lerna-changelog][40] | Integrates lerna-changelog into the release-it pipeline
|
|
300
|
-
| [@jcamp-code/release-it-changelogen][41] | Use [@unjs/changelogen][42] for versioning and changelog
|
|
301
|
-
| [@release-it-plugins/workspaces][43] | Releases each of your projects configured workspaces
|
|
302
|
-
| [release-it-calver-plugin][27] | Enables Calendar Versioning (calver) with release-it
|
|
303
|
-
| [@grupoboticario/news-fragments][44] | An easy way to generate your changelog file
|
|
304
|
-
| [@j-ulrich/release-it-regex-bumper][45] | Regular expression based version read/write plugin for release-it
|
|
305
|
-
| [@jcamp-code/release-it-dotnet][46] | Use .csproj or .props file for versioning, automate NuGet publishing
|
|
294
|
+
| Plugin | Description |
|
|
295
|
+
| ----------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
296
|
+
| [@release-it/bumper][25] | Read & write the version from/to any file |
|
|
297
|
+
| [@release-it/conventional-changelog][26] | Provides recommended bump, conventional-changelog, and updates `CHANGELOG.md` |
|
|
298
|
+
| [@release-it/keep-a-changelog][39] | Maintain CHANGELOG.md using the Keep a Changelog standards |
|
|
299
|
+
| [@release-it-plugins/lerna-changelog][40] | Integrates lerna-changelog into the release-it pipeline |
|
|
300
|
+
| [@jcamp-code/release-it-changelogen][41] | Use [@unjs/changelogen][42] for versioning and changelog |
|
|
301
|
+
| [@release-it-plugins/workspaces][43] | Releases each of your projects configured workspaces |
|
|
302
|
+
| [release-it-calver-plugin][27] | Enables Calendar Versioning (calver) with release-it |
|
|
303
|
+
| [@grupoboticario/news-fragments][44] | An easy way to generate your changelog file |
|
|
304
|
+
| [@j-ulrich/release-it-regex-bumper][45] | Regular expression based version read/write plugin for release-it |
|
|
305
|
+
| [@jcamp-code/release-it-dotnet][46] | Use .csproj or .props file for versioning, automate NuGet publishing |
|
|
306
|
+
| [release-it-pnpm][47] | Add basic support for pnpm workspaces, integrates with [bumpp][48] and [changelogithub][49] |
|
|
306
307
|
|
|
307
308
|
Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab, npm).
|
|
308
309
|
|
|
309
|
-
→ See all [release-it plugins on npm][
|
|
310
|
+
→ See all [release-it plugins on npm][50].
|
|
310
311
|
|
|
311
|
-
→ See [plugins][
|
|
312
|
+
→ See [plugins][51] for documentation to write plugins.
|
|
312
313
|
|
|
313
314
|
## Use release-it programmatically
|
|
314
315
|
|
|
315
316
|
While mostly used as a CLI tool, release-it can be used as a dependency to integrate in your own scripts. See [use
|
|
316
|
-
release-it programmatically][
|
|
317
|
+
release-it programmatically][52] for example code.
|
|
317
318
|
|
|
318
319
|
## Example projects using release-it
|
|
319
320
|
|
|
320
|
-
- [axios/axios][
|
|
321
|
-
- [blockchain/blockchain-wallet-v4-frontend][
|
|
322
|
-
- [callstack/react-native-paper][
|
|
323
|
-
- [ember-cli/ember-cli][
|
|
324
|
-
- [js-cookie/js-cookie][
|
|
325
|
-
- [metalsmith/metalsmith][
|
|
326
|
-
- [mozilla/readability][
|
|
327
|
-
- [pahen/madge][
|
|
328
|
-
- [redis/node-redis][
|
|
329
|
-
- [reduxjs/redux][
|
|
330
|
-
- [saleor/saleor][
|
|
331
|
-
- [Semantic-Org/Semantic-UI-React][
|
|
332
|
-
- [shipshapecode/shepherd][
|
|
333
|
-
- [StevenBlack/hosts][
|
|
334
|
-
- [swagger-api/swagger-ui][
|
|
335
|
-
- [tabler/tabler][
|
|
336
|
-
- [youzan/vant][
|
|
337
|
-
- [Repositories that depend on release-it][
|
|
338
|
-
- GitHub search for [path:\*\*/.release-it.json][
|
|
321
|
+
- [axios/axios][53]
|
|
322
|
+
- [blockchain/blockchain-wallet-v4-frontend][54]
|
|
323
|
+
- [callstack/react-native-paper][55]
|
|
324
|
+
- [ember-cli/ember-cli][56]
|
|
325
|
+
- [js-cookie/js-cookie][57]
|
|
326
|
+
- [metalsmith/metalsmith][58]
|
|
327
|
+
- [mozilla/readability][59]
|
|
328
|
+
- [pahen/madge][60]
|
|
329
|
+
- [redis/node-redis][61]
|
|
330
|
+
- [reduxjs/redux][62]
|
|
331
|
+
- [saleor/saleor][63]
|
|
332
|
+
- [Semantic-Org/Semantic-UI-React][64]
|
|
333
|
+
- [shipshapecode/shepherd][65]
|
|
334
|
+
- [StevenBlack/hosts][66]
|
|
335
|
+
- [swagger-api/swagger-ui][67] + [swagger-editor][68]
|
|
336
|
+
- [tabler/tabler][69] + [tabler-icons][70]
|
|
337
|
+
- [youzan/vant][71]
|
|
338
|
+
- [Repositories that depend on release-it][72]
|
|
339
|
+
- GitHub search for [path:\*\*/.release-it.json][73]
|
|
339
340
|
|
|
340
341
|
## Legacy Node.js
|
|
341
342
|
|
|
342
343
|
The latest major version is v17, supporting Node.js 18 and up (as Node.js v16 is EOL). The previous major version was
|
|
343
|
-
v16, supporting Node.js 16. Use release-it v15 for environments running Node.js v14. Also see [CHANGELOG.md][
|
|
344
|
+
v16, supporting Node.js 16. Use release-it v15 for environments running Node.js v14. Also see [CHANGELOG.md][74].
|
|
344
345
|
|
|
345
346
|
## Links
|
|
346
347
|
|
|
347
|
-
- See [CHANGELOG.md][
|
|
348
|
-
- To **contribute**, please read [CONTRIBUTING.md][
|
|
349
|
-
- Please [open an issue][
|
|
348
|
+
- See [CHANGELOG.md][74] for major/breaking updates, and [releases][75] for a detailed version history.
|
|
349
|
+
- To **contribute**, please read [CONTRIBUTING.md][76] first.
|
|
350
|
+
- Please [open an issue][77] if anything is missing or unclear in this documentation.
|
|
350
351
|
|
|
351
352
|
## License
|
|
352
353
|
|
|
353
|
-
[MIT][
|
|
354
|
+
[MIT][78]
|
|
354
355
|
|
|
355
356
|
Are you using release-it at work? Please consider [sponsoring me][14]!
|
|
356
357
|
|
|
@@ -368,10 +369,10 @@ Are you using release-it at work? Please consider [sponsoring me][14]!
|
|
|
368
369
|
[12]: https://www.npmjs.com/package/release-it
|
|
369
370
|
[13]: https://badge.fury.io/js/release-it.svg
|
|
370
371
|
[14]: https://github.com/sponsors/webpro
|
|
371
|
-
[15]:
|
|
372
|
-
[16]:
|
|
373
|
-
[17]:
|
|
374
|
-
[18]:
|
|
372
|
+
[15]: ./docs/npm.md#yarn
|
|
373
|
+
[16]: ./docs/recipes/monorepo.md
|
|
374
|
+
[17]: https://github.com/juancarlosjr97/release-it-containerized
|
|
375
|
+
[18]: https://github.com/juancarlosjr97
|
|
375
376
|
[19]: https://www.youtube.com/watch?v=7pBcuT7j_A0
|
|
376
377
|
[20]: https://medium.com/valtech-ch/monorepo-semantic-releases-db114811efa5
|
|
377
378
|
[21]: https://github.com/b12k/monorepo-semantic-releases
|
|
@@ -400,32 +401,35 @@ Are you using release-it at work? Please consider [sponsoring me][14]!
|
|
|
400
401
|
[44]: https://github.com/grupoboticario/news-fragments
|
|
401
402
|
[45]: https://github.com/j-ulrich/release-it-regex-bumper
|
|
402
403
|
[46]: https://github.com/jcamp-code/release-it-dotnet
|
|
403
|
-
[47]: https://
|
|
404
|
-
[48]:
|
|
405
|
-
[49]:
|
|
406
|
-
[50]: https://
|
|
407
|
-
[51]:
|
|
408
|
-
[52]:
|
|
409
|
-
[53]: https://github.com/
|
|
410
|
-
[54]: https://github.com/
|
|
411
|
-
[55]: https://github.com/
|
|
412
|
-
[56]: https://github.com/
|
|
413
|
-
[57]: https://github.com/
|
|
414
|
-
[58]: https://github.com/
|
|
415
|
-
[59]: https://github.com/
|
|
416
|
-
[60]: https://github.com/
|
|
417
|
-
[61]: https://github.com/
|
|
418
|
-
[62]: https://github.com/
|
|
419
|
-
[63]: https://github.com/
|
|
420
|
-
[64]: https://github.com/
|
|
421
|
-
[65]: https://github.com/
|
|
422
|
-
[66]: https://github.com/
|
|
423
|
-
[67]: https://github.com/
|
|
424
|
-
[68]: https://github.com/
|
|
425
|
-
[69]: https://github.com/
|
|
426
|
-
[70]: https://github.com/
|
|
427
|
-
[71]:
|
|
428
|
-
[72]: https://github.com/release-it/release-it/
|
|
429
|
-
[73]:
|
|
430
|
-
[74]:
|
|
431
|
-
[75]:
|
|
404
|
+
[47]: https://github.com/hyoban/release-it-pnpm
|
|
405
|
+
[48]: https://github.com/antfu/bumpp
|
|
406
|
+
[49]: https://github.com/antfu/changelogithub
|
|
407
|
+
[50]: https://www.npmjs.com/search?q=keywords:release-it-plugin
|
|
408
|
+
[51]: ./docs/plugins.md
|
|
409
|
+
[52]: ./docs/recipes/programmatic.md
|
|
410
|
+
[53]: https://github.com/axios/axios
|
|
411
|
+
[54]: https://github.com/blockchain/blockchain-wallet-v4-frontend
|
|
412
|
+
[55]: https://github.com/callstack/react-native-paper
|
|
413
|
+
[56]: https://github.com/ember-cli/ember-cli
|
|
414
|
+
[57]: https://github.com/js-cookie/js-cookie
|
|
415
|
+
[58]: https://github.com/metalsmith/metalsmith
|
|
416
|
+
[59]: https://github.com/mozilla/readability
|
|
417
|
+
[60]: https://github.com/pahen/madge
|
|
418
|
+
[61]: https://github.com/redis/node-redis
|
|
419
|
+
[62]: https://github.com/reduxjs/redux
|
|
420
|
+
[63]: https://github.com/saleor/saleor
|
|
421
|
+
[64]: https://github.com/Semantic-Org/Semantic-UI-React
|
|
422
|
+
[65]: https://github.com/shipshapecode/shepherd
|
|
423
|
+
[66]: https://github.com/StevenBlack/hosts
|
|
424
|
+
[67]: https://github.com/swagger-api/swagger-ui
|
|
425
|
+
[68]: https://github.com/swagger-api/swagger-editor
|
|
426
|
+
[69]: https://github.com/tabler/tabler
|
|
427
|
+
[70]: https://github.com/tabler/tabler-icons
|
|
428
|
+
[71]: https://github.com/youzan/vant
|
|
429
|
+
[72]: https://github.com/release-it/release-it/network/dependents
|
|
430
|
+
[73]: https://github.com/search?q=path%3A**%2F.release-it.json&type=code
|
|
431
|
+
[74]: ./CHANGELOG.md
|
|
432
|
+
[75]: https://github.com/release-it/release-it/releases
|
|
433
|
+
[76]: ./.github/CONTRIBUTING.md
|
|
434
|
+
[77]: https://github.com/release-it/release-it/issues/new
|
|
435
|
+
[78]: ./LICENSE
|
package/lib/index.js
CHANGED
|
@@ -138,7 +138,12 @@ const runTasks = async (opts, di) => {
|
|
|
138
138
|
};
|
|
139
139
|
} catch (err) {
|
|
140
140
|
const { log } = container;
|
|
141
|
-
|
|
141
|
+
|
|
142
|
+
const errorMessage = err.message || err;
|
|
143
|
+
const logger = log || console;
|
|
144
|
+
|
|
145
|
+
err.cause === 'INFO' ? logger.info(errorMessage) : logger.error(errorMessage);
|
|
146
|
+
|
|
142
147
|
throw err;
|
|
143
148
|
}
|
|
144
149
|
};
|
package/lib/plugin/git/Git.js
CHANGED
|
@@ -215,7 +215,12 @@ class Git extends GitBase {
|
|
|
215
215
|
this.disableRollback();
|
|
216
216
|
return push;
|
|
217
217
|
} catch (error) {
|
|
218
|
-
|
|
218
|
+
try {
|
|
219
|
+
await this.rollbackTagPush();
|
|
220
|
+
} catch (tagError) {
|
|
221
|
+
this.log.warn(`An error was encountered when trying to rollback the tag on the remote: ${tagError.message}`);
|
|
222
|
+
}
|
|
223
|
+
|
|
219
224
|
throw error;
|
|
220
225
|
}
|
|
221
226
|
}
|
package/lib/util.js
CHANGED
|
@@ -92,6 +92,7 @@ const parseVersion = raw => {
|
|
|
92
92
|
const e = (message, docs, fail = true) => {
|
|
93
93
|
const error = new Error(docs ? `${message}${EOL}Documentation: ${docs}${EOL}` : message);
|
|
94
94
|
error.code = fail ? 1 : 0;
|
|
95
|
+
error.cause = fail ? 'ERROR' : 'INFO';
|
|
95
96
|
return error;
|
|
96
97
|
};
|
|
97
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-it",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.1",
|
|
4
4
|
"description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"lint": "eslint lib test",
|
|
63
63
|
"format": "prettier --write \"{lib,test}/**/*.js\"",
|
|
64
64
|
"docs": "remark README.md 'docs/**/*.md' '.github/*.md' -o",
|
|
65
|
-
"test": "ava --no-worker-threads",
|
|
65
|
+
"test": "ava --no-worker-threads && installed-check",
|
|
66
66
|
"release": "./bin/release-it.js"
|
|
67
67
|
},
|
|
68
68
|
"author": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"license": "MIT",
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@iarna/toml": "2.2.5",
|
|
75
|
-
"@octokit/rest": "20.0
|
|
75
|
+
"@octokit/rest": "20.1.0",
|
|
76
76
|
"async-retry": "1.3.3",
|
|
77
77
|
"chalk": "5.3.0",
|
|
78
78
|
"cosmiconfig": "9.0.0",
|
|
@@ -80,14 +80,14 @@
|
|
|
80
80
|
"git-url-parse": "14.0.0",
|
|
81
81
|
"globby": "14.0.1",
|
|
82
82
|
"got": "13.0.0",
|
|
83
|
-
"inquirer": "9.2.
|
|
83
|
+
"inquirer": "9.2.19",
|
|
84
84
|
"is-ci": "3.0.1",
|
|
85
|
-
"issue-parser": "
|
|
85
|
+
"issue-parser": "7.0.0",
|
|
86
86
|
"lodash": "4.17.21",
|
|
87
87
|
"mime-types": "2.1.35",
|
|
88
88
|
"new-github-release-url": "2.0.0",
|
|
89
89
|
"node-fetch": "3.3.2",
|
|
90
|
-
"open": "10.0
|
|
90
|
+
"open": "10.1.0",
|
|
91
91
|
"ora": "8.0.1",
|
|
92
92
|
"os-name": "5.1.0",
|
|
93
93
|
"promise.allsettled": "1.0.7",
|
|
@@ -96,30 +96,31 @@
|
|
|
96
96
|
"shelljs": "0.8.5",
|
|
97
97
|
"update-notifier": "7.0.0",
|
|
98
98
|
"url-join": "5.0.0",
|
|
99
|
-
"wildcard-match": "5.1.
|
|
99
|
+
"wildcard-match": "5.1.3",
|
|
100
100
|
"yargs-parser": "21.1.1"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@octokit/request-error": "5.0
|
|
104
|
-
"ava": "6.1.
|
|
105
|
-
"eslint": "8.
|
|
103
|
+
"@octokit/request-error": "5.1.0",
|
|
104
|
+
"ava": "6.1.2",
|
|
105
|
+
"eslint": "8.57.0",
|
|
106
106
|
"eslint-config-prettier": "9.1.0",
|
|
107
107
|
"eslint-plugin-ava": "14.0.0",
|
|
108
108
|
"eslint-plugin-import": "2.29.1",
|
|
109
109
|
"eslint-plugin-prettier": "5.1.3",
|
|
110
110
|
"fs-monkey": "1.0.5",
|
|
111
|
-
"
|
|
112
|
-
"
|
|
111
|
+
"installed-check": "9.3.0",
|
|
112
|
+
"knip": "5.10.1",
|
|
113
|
+
"memfs": "4.8.2",
|
|
113
114
|
"mock-stdio": "1.0.3",
|
|
114
|
-
"nock": "13.5.
|
|
115
|
+
"nock": "13.5.4",
|
|
115
116
|
"prettier": "3.2.5",
|
|
116
117
|
"remark-cli": "12.0.0",
|
|
117
|
-
"remark-preset-webpro": "1.
|
|
118
|
+
"remark-preset-webpro": "1.1.0",
|
|
118
119
|
"sinon": "17.0.1",
|
|
119
120
|
"strip-ansi": "7.1.0"
|
|
120
121
|
},
|
|
121
122
|
"engines": {
|
|
122
|
-
"node": "
|
|
123
|
+
"node": "^18.18.0 || ^20.8.0 || ^21.0.0"
|
|
123
124
|
},
|
|
124
125
|
"remarkConfig": {
|
|
125
126
|
"plugins": [
|
package/test/git.init.js
CHANGED
|
@@ -76,7 +76,7 @@ test.serial('should not throw if there are commits', async t => {
|
|
|
76
76
|
const gitClient = factory(Git, { options });
|
|
77
77
|
sh.exec('git tag 1.0.0');
|
|
78
78
|
gitAdd('line', 'file', 'Add file');
|
|
79
|
-
await t.notThrowsAsync(gitClient.init());
|
|
79
|
+
await t.notThrowsAsync(gitClient.init(), 'There are no commits since the latest tag');
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
test.serial('should fail (exit code 1) if there are no commits', async t => {
|