release-it 19.1.0 → 19.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 +59 -59
- package/config/release-it.json +1 -0
- package/lib/plugin/git/prompts.js +5 -2
- package/lib/plugin/npm/npm.js +5 -2
- package/lib/plugin/version/Version.js +12 -4
- package/lib/shell.js +4 -1
- package/lib/util.js +2 -1
- package/package.json +22 -22
- package/schema/npm.json +4 -0
- package/types/config.d.ts +3 -0
package/README.md
CHANGED
|
@@ -315,41 +315,41 @@ Since v11, release-it can be extended in many, many ways. Here are some plugins:
|
|
|
315
315
|
| [release-it-pnpm][16] | Add basic support for pnpm workspaces, integrates with [bumpp][50] and [changelogithub][51] |
|
|
316
316
|
| [changesets-release-it-plugin][52] | Combine [Changesets][53] changelog management with release-it |
|
|
317
317
|
| [release-it-gitea][54] | Gitea plugin to create Gitea releases and upload attachments |
|
|
318
|
-
| [release-it-beautiful-changelog][
|
|
318
|
+
| [release-it-beautiful-changelog][55] | Generate beautiful changelogs using conventional commits by [@unjs/changelogen][45] |
|
|
319
319
|
|
|
320
320
|
Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab, npm).
|
|
321
321
|
|
|
322
|
-
→ See all [release-it plugins on npm][
|
|
322
|
+
→ See all [release-it plugins on npm][56].
|
|
323
323
|
|
|
324
|
-
→ See [plugins][
|
|
324
|
+
→ See [plugins][57] for documentation to write plugins.
|
|
325
325
|
|
|
326
326
|
## Use release-it programmatically
|
|
327
327
|
|
|
328
328
|
While mostly used as a CLI tool, release-it can be used as a dependency to integrate in your own scripts. See [use
|
|
329
|
-
release-it programmatically][
|
|
329
|
+
release-it programmatically][58] for example code.
|
|
330
330
|
|
|
331
331
|
## Projects using release-it
|
|
332
332
|
|
|
333
|
-
- [AdonisJs][
|
|
334
|
-
- [Axios][
|
|
335
|
-
- [Chakra UI][
|
|
336
|
-
- [Halo][
|
|
337
|
-
- [hosts][
|
|
338
|
-
- [js-cookie][
|
|
339
|
-
- [jQuery][
|
|
340
|
-
- [Madge][
|
|
341
|
-
- [Metalsmith][
|
|
342
|
-
- [n8n][
|
|
343
|
-
- [Node-Redis][
|
|
344
|
-
- [React Native Paper][
|
|
345
|
-
- [Readability.js][
|
|
346
|
-
- [Redux][
|
|
347
|
-
- [Saleor][
|
|
348
|
-
- [Semantic UI React][
|
|
349
|
-
- [tabler-icons][
|
|
350
|
-
- Swagger ([swagger-ui][
|
|
351
|
-
- [Repositories that depend on release-it][
|
|
352
|
-
- GitHub search for [path:\*\*/.release-it.json][
|
|
333
|
+
- [AdonisJs][59]
|
|
334
|
+
- [Axios][60]
|
|
335
|
+
- [Chakra UI][61]
|
|
336
|
+
- [Halo][62]
|
|
337
|
+
- [hosts][63]
|
|
338
|
+
- [js-cookie][64]
|
|
339
|
+
- [jQuery][65]
|
|
340
|
+
- [Madge][66]
|
|
341
|
+
- [Metalsmith][67]
|
|
342
|
+
- [n8n][68]
|
|
343
|
+
- [Node-Redis][69]
|
|
344
|
+
- [React Native Paper][70]
|
|
345
|
+
- [Readability.js][71]
|
|
346
|
+
- [Redux][72]
|
|
347
|
+
- [Saleor][73]
|
|
348
|
+
- [Semantic UI React][74]
|
|
349
|
+
- [tabler-icons][75]
|
|
350
|
+
- Swagger ([swagger-ui][76] + [swagger-editor][77])
|
|
351
|
+
- [Repositories that depend on release-it][78]
|
|
352
|
+
- GitHub search for [path:\*\*/.release-it.json][79]
|
|
353
353
|
|
|
354
354
|
## Node.js version support
|
|
355
355
|
|
|
@@ -363,17 +363,17 @@ The latest major version is v19, supporting Node.js 20 and up:
|
|
|
363
363
|
| v16 | v16 |
|
|
364
364
|
| v15 | v14 |
|
|
365
365
|
|
|
366
|
-
Also see [CHANGELOG.md][
|
|
366
|
+
Also see [CHANGELOG.md][80] for dates and details.
|
|
367
367
|
|
|
368
368
|
## Links
|
|
369
369
|
|
|
370
|
-
- See [CHANGELOG.md][
|
|
371
|
-
- To **contribute**, please read [CONTRIBUTING.md][
|
|
372
|
-
- Please [open an issue][
|
|
370
|
+
- See [CHANGELOG.md][80] for major/breaking updates, and [releases][81] for a detailed version history.
|
|
371
|
+
- To **contribute**, please read [CONTRIBUTING.md][82] first.
|
|
372
|
+
- Please [open an issue][83] if anything is missing or unclear in this documentation.
|
|
373
373
|
|
|
374
374
|
## License
|
|
375
375
|
|
|
376
|
-
[MIT][
|
|
376
|
+
[MIT][84]
|
|
377
377
|
|
|
378
378
|
Are you using release-it at work? Please consider [sponsoring me][14]!
|
|
379
379
|
|
|
@@ -431,33 +431,33 @@ Are you using release-it at work? Please consider [sponsoring me][14]!
|
|
|
431
431
|
[52]: https://www.npmjs.com/package/changesets-release-it-plugin
|
|
432
432
|
[53]: https://github.com/changesets/changesets
|
|
433
433
|
[54]: https://github.com/lib-pack/release-it-gitea
|
|
434
|
-
[55]: https://
|
|
435
|
-
[56]:
|
|
436
|
-
[57]: ./docs/
|
|
437
|
-
[58]:
|
|
438
|
-
[59]: https://github.com/
|
|
439
|
-
[60]: https://github.com/
|
|
440
|
-
[61]: https://github.com/
|
|
441
|
-
[62]: https://github.com/
|
|
442
|
-
[63]: https://github.com/
|
|
443
|
-
[64]: https://github.com/
|
|
444
|
-
[65]: https://github.com/
|
|
445
|
-
[66]: https://github.com/
|
|
446
|
-
[67]: https://github.com/
|
|
447
|
-
[68]: https://github.com/
|
|
448
|
-
[69]: https://github.com/
|
|
449
|
-
[70]: https://github.com/
|
|
450
|
-
[71]: https://github.com/
|
|
451
|
-
[72]: https://github.com/
|
|
452
|
-
[73]: https://github.com/
|
|
453
|
-
[74]: https://github.com/
|
|
454
|
-
[75]: https://github.com/
|
|
455
|
-
[76]: https://github.com/swagger-api/swagger-
|
|
456
|
-
[77]: https://github.com/
|
|
457
|
-
[78]: https://github.com/
|
|
458
|
-
[79]:
|
|
459
|
-
[80]:
|
|
460
|
-
[81]:
|
|
461
|
-
[82]:
|
|
462
|
-
[83]:
|
|
463
|
-
[84]:
|
|
434
|
+
[55]: https://github.com/mohammadGh/release-it-beautiful-changelog
|
|
435
|
+
[56]: https://www.npmjs.com/search?q=keywords:release-it-plugin
|
|
436
|
+
[57]: ./docs/plugins.md
|
|
437
|
+
[58]: ./docs/recipes/programmatic.md
|
|
438
|
+
[59]: https://github.com/adonisjs/core
|
|
439
|
+
[60]: https://github.com/axios/axios
|
|
440
|
+
[61]: https://github.com/chakra-ui/chakra-ui
|
|
441
|
+
[62]: https://github.com/halo-dev/halo
|
|
442
|
+
[63]: https://github.com/StevenBlack/hosts
|
|
443
|
+
[64]: https://github.com/js-cookie/js-cookie
|
|
444
|
+
[65]: https://github.com/jquery/jquery
|
|
445
|
+
[66]: https://github.com/pahen/madge
|
|
446
|
+
[67]: https://github.com/metalsmith/metalsmith
|
|
447
|
+
[68]: https://github.com/n8n-io/n8n
|
|
448
|
+
[69]: https://github.com/redis/node-redis
|
|
449
|
+
[70]: https://github.com/callstack/react-native-paper
|
|
450
|
+
[71]: https://github.com/mozilla/readability
|
|
451
|
+
[72]: https://github.com/reduxjs/redux
|
|
452
|
+
[73]: https://github.com/saleor/saleor
|
|
453
|
+
[74]: https://github.com/Semantic-Org/Semantic-UI-React
|
|
454
|
+
[75]: https://github.com/tabler/tabler-icons
|
|
455
|
+
[76]: https://github.com/swagger-api/swagger-ui
|
|
456
|
+
[77]: https://github.com/swagger-api/swagger-editor
|
|
457
|
+
[78]: https://github.com/release-it/release-it/network/dependents
|
|
458
|
+
[79]: https://github.com/search?q=path%3A**%2F.release-it.json&type=code
|
|
459
|
+
[80]: ./CHANGELOG.md
|
|
460
|
+
[81]: https://github.com/release-it/release-it/releases
|
|
461
|
+
[82]: ./.github/CONTRIBUTING.md
|
|
462
|
+
[83]: https://github.com/release-it/release-it/issues/new
|
|
463
|
+
[84]: ./LICENSE
|
package/config/release-it.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { format, truncateLines } from '../../util.js';
|
|
1
|
+
import { format, truncateLines, fixArgs } from '../../util.js';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
commit: {
|
|
5
5
|
type: 'confirm',
|
|
6
|
-
message: context =>
|
|
6
|
+
message: context => {
|
|
7
|
+
if (fixArgs(context.git.commitArgs).includes('--amend')) return 'Amend commit?';
|
|
8
|
+
return `Commit (${truncateLines(format(context.git.commitMessage, context), 1, ' [...]')})?`;
|
|
9
|
+
},
|
|
7
10
|
default: true
|
|
8
11
|
},
|
|
9
12
|
tag: {
|
package/lib/plugin/npm/npm.js
CHANGED
|
@@ -246,6 +246,7 @@ class npm extends Plugin {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
async publish({ otp = this.options.otp, otpCallback } = {}) {
|
|
249
|
+
const publishPackageManager = this.options.publishPackageManager || 'npm';
|
|
249
250
|
const { publishPath = '.', publishArgs } = this.options;
|
|
250
251
|
const { private: isPrivate, tag = DEFAULT_TAG } = this.getContext();
|
|
251
252
|
const otpArgs = otp ? ['--otp', otp] : [];
|
|
@@ -260,14 +261,16 @@ class npm extends Plugin {
|
|
|
260
261
|
publishPath,
|
|
261
262
|
'--tag',
|
|
262
263
|
tag,
|
|
263
|
-
'--workspaces=false',
|
|
264
|
+
publishPackageManager === 'npm' && '--workspaces=false',
|
|
264
265
|
...otpArgs,
|
|
265
266
|
dryRunArg,
|
|
266
267
|
registryArg,
|
|
267
268
|
...fixArgs(publishArgs)
|
|
268
269
|
].filter(Boolean);
|
|
269
270
|
const isInteractive = !this.config.isCI;
|
|
270
|
-
return this.exec([
|
|
271
|
+
return this.exec([publishPackageManager, 'publish', ...args], {
|
|
272
|
+
options: { ...getOptions(), interactive: isInteractive }
|
|
273
|
+
})
|
|
271
274
|
.then(() => {
|
|
272
275
|
this.setContext({ isReleased: true });
|
|
273
276
|
})
|
|
@@ -13,6 +13,8 @@ const CHOICES = {
|
|
|
13
13
|
default: [...RELEASE_TYPES, ...PRERELEASE_TYPES]
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
const EXIT = Symbol('exit');
|
|
17
|
+
|
|
16
18
|
const getIncrementChoices = context => {
|
|
17
19
|
const { latestIsPreRelease, isPreRelease, preReleaseId, preReleaseBase } = context.version;
|
|
18
20
|
const types = latestIsPreRelease ? CHOICES.latestIsPreRelease : isPreRelease ? CHOICES.preRelease : CHOICES.default;
|
|
@@ -24,7 +26,11 @@ const getIncrementChoices = context => {
|
|
|
24
26
|
name: 'Other, please specify...',
|
|
25
27
|
value: null
|
|
26
28
|
};
|
|
27
|
-
|
|
29
|
+
const exitChoice = {
|
|
30
|
+
name: 'Exit',
|
|
31
|
+
value: EXIT
|
|
32
|
+
};
|
|
33
|
+
return [...choices, otherChoice, exitChoice];
|
|
28
34
|
};
|
|
29
35
|
|
|
30
36
|
const versionTransformer = context => input =>
|
|
@@ -73,10 +79,12 @@ class Version extends Plugin {
|
|
|
73
79
|
return new Promise(resolve => {
|
|
74
80
|
this.step({
|
|
75
81
|
prompt: 'incrementList',
|
|
76
|
-
task: increment =>
|
|
77
|
-
increment
|
|
82
|
+
task: increment => {
|
|
83
|
+
if (increment === EXIT) process.exit(0);
|
|
84
|
+
return increment
|
|
78
85
|
? resolve(this.incrementVersion(Object.assign({}, options, { increment })))
|
|
79
|
-
: this.step({ prompt: 'version', task: resolve })
|
|
86
|
+
: this.step({ prompt: 'version', task: resolve });
|
|
87
|
+
}
|
|
80
88
|
});
|
|
81
89
|
});
|
|
82
90
|
}
|
package/lib/shell.js
CHANGED
|
@@ -81,7 +81,10 @@ class Shell {
|
|
|
81
81
|
};
|
|
82
82
|
delete spawnOptions.interactive;
|
|
83
83
|
|
|
84
|
-
const proc =
|
|
84
|
+
const proc =
|
|
85
|
+
process.platform === 'win32' && /^(npm|yarn|pnpm)$/.test(program)
|
|
86
|
+
? spawn(command.join(' '), [], { ...spawnOptions, shell: true })
|
|
87
|
+
: spawn(program, programArgs, spawnOptions);
|
|
85
88
|
|
|
86
89
|
let stdout = '';
|
|
87
90
|
let stderr = '';
|
package/lib/util.js
CHANGED
|
@@ -63,7 +63,8 @@ export const getSystemInfo = () => {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
export const format = (template = '', context = {}) => {
|
|
66
|
-
if (!
|
|
66
|
+
if (!template || typeof template !== 'string') return '';
|
|
67
|
+
if (!context || context === null || template.indexOf('${') === -1) return template;
|
|
67
68
|
const log = new Log();
|
|
68
69
|
try {
|
|
69
70
|
return eta.renderString(template, context);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-it",
|
|
3
|
-
"version": "19.1
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -79,47 +79,47 @@
|
|
|
79
79
|
"license": "MIT",
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@nodeutils/defaults-deep": "1.1.0",
|
|
82
|
-
"@octokit/rest": "22.0.
|
|
82
|
+
"@octokit/rest": "22.0.1",
|
|
83
83
|
"@phun-ky/typeof": "2.0.3",
|
|
84
84
|
"async-retry": "1.3.3",
|
|
85
|
-
"c12": "3.3.
|
|
86
|
-
"ci-info": "^4.3.
|
|
87
|
-
"eta": "4.0
|
|
85
|
+
"c12": "3.3.3",
|
|
86
|
+
"ci-info": "^4.3.1",
|
|
87
|
+
"eta": "4.5.0",
|
|
88
88
|
"git-url-parse": "16.1.0",
|
|
89
|
-
"inquirer": "12.
|
|
89
|
+
"inquirer": "12.11.1",
|
|
90
90
|
"issue-parser": "7.0.1",
|
|
91
91
|
"lodash.merge": "4.6.2",
|
|
92
|
-
"mime-types": "3.0.
|
|
92
|
+
"mime-types": "3.0.2",
|
|
93
93
|
"new-github-release-url": "2.0.0",
|
|
94
94
|
"open": "10.2.0",
|
|
95
95
|
"ora": "9.0.0",
|
|
96
96
|
"os-name": "6.1.0",
|
|
97
97
|
"proxy-agent": "6.5.0",
|
|
98
|
-
"semver": "7.7.
|
|
98
|
+
"semver": "7.7.3",
|
|
99
99
|
"tinyglobby": "0.2.15",
|
|
100
|
-
"undici": "6.
|
|
100
|
+
"undici": "6.22.0",
|
|
101
101
|
"url-join": "5.0.0",
|
|
102
102
|
"wildcard-match": "5.1.4",
|
|
103
103
|
"yargs-parser": "21.1.1"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@eslint/compat": "1.
|
|
107
|
-
"@eslint/eslintrc": "3.3.
|
|
108
|
-
"@eslint/js": "9.
|
|
109
|
-
"@octokit/request-error": "7.
|
|
110
|
-
"@types/node": "
|
|
111
|
-
"eslint": "9.
|
|
106
|
+
"@eslint/compat": "1.4.1",
|
|
107
|
+
"@eslint/eslintrc": "3.3.3",
|
|
108
|
+
"@eslint/js": "9.39.2",
|
|
109
|
+
"@octokit/request-error": "7.1.0",
|
|
110
|
+
"@types/node": "25.0.3",
|
|
111
|
+
"eslint": "9.39.2",
|
|
112
112
|
"eslint-plugin-import-x": "4.16.1",
|
|
113
|
-
"globals": "16.
|
|
113
|
+
"globals": "16.5.0",
|
|
114
114
|
"installed-check": "9.3.0",
|
|
115
|
-
"knip": "5.
|
|
116
|
-
"mentoss": "0.
|
|
115
|
+
"knip": "5.76.3",
|
|
116
|
+
"mentoss": "0.12.0",
|
|
117
117
|
"mock-stdio": "1.0.3",
|
|
118
|
-
"prettier": "3.
|
|
118
|
+
"prettier": "3.7.4",
|
|
119
119
|
"remark-cli": "12.0.1",
|
|
120
|
-
"remark-preset-webpro": "
|
|
121
|
-
"tar": "7.
|
|
122
|
-
"typescript": "5.9.
|
|
120
|
+
"remark-preset-webpro": "2.0.1",
|
|
121
|
+
"tar": "7.5.2",
|
|
122
|
+
"typescript": "5.9.3"
|
|
123
123
|
},
|
|
124
124
|
"overrides": {
|
|
125
125
|
"pac-resolver": "7.0.1",
|
package/schema/npm.json
CHANGED