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 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][84] | Generate beautiful changelogs using conventional commits by [@unjs/changelogen][45] |
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][55].
322
+ → See all [release-it plugins on npm][56].
323
323
 
324
- → See [plugins][56] for documentation to write 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][57] for example code.
329
+ release-it programmatically][58] for example code.
330
330
 
331
331
  ## Projects using release-it
332
332
 
333
- - [AdonisJs][58]
334
- - [Axios][59]
335
- - [Chakra UI][60]
336
- - [Halo][61]
337
- - [hosts][62]
338
- - [js-cookie][63]
339
- - [jQuery][64]
340
- - [Madge][65]
341
- - [Metalsmith][66]
342
- - [n8n][67]
343
- - [Node-Redis][68]
344
- - [React Native Paper][69]
345
- - [Readability.js][70]
346
- - [Redux][71]
347
- - [Saleor][72]
348
- - [Semantic UI React][73]
349
- - [tabler-icons][74]
350
- - Swagger ([swagger-ui][75] + [swagger-editor][76])
351
- - [Repositories that depend on release-it][77]
352
- - GitHub search for [path:\*\*/.release-it.json][78]
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][79] for dates and details.
366
+ Also see [CHANGELOG.md][80] for dates and details.
367
367
 
368
368
  ## Links
369
369
 
370
- - See [CHANGELOG.md][79] for major/breaking updates, and [releases][80] for a detailed version history.
371
- - To **contribute**, please read [CONTRIBUTING.md][81] first.
372
- - Please [open an issue][82] if anything is missing or unclear in this documentation.
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][83]
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://www.npmjs.com/search?q=keywords:release-it-plugin
435
- [56]: ./docs/plugins.md
436
- [57]: ./docs/recipes/programmatic.md
437
- [58]: https://github.com/adonisjs/core
438
- [59]: https://github.com/axios/axios
439
- [60]: https://github.com/chakra-ui/chakra-ui
440
- [61]: https://github.com/halo-dev/halo
441
- [62]: https://github.com/StevenBlack/hosts
442
- [63]: https://github.com/js-cookie/js-cookie
443
- [64]: https://github.com/jquery/jquery
444
- [65]: https://github.com/pahen/madge
445
- [66]: https://github.com/metalsmith/metalsmith
446
- [67]: https://github.com/n8n-io/n8n
447
- [68]: https://github.com/redis/node-redis
448
- [69]: https://github.com/callstack/react-native-paper
449
- [70]: https://github.com/mozilla/readability
450
- [71]: https://github.com/reduxjs/redux
451
- [72]: https://github.com/saleor/saleor
452
- [73]: https://github.com/Semantic-Org/Semantic-UI-React
453
- [74]: https://github.com/tabler/tabler-icons
454
- [75]: https://github.com/swagger-api/swagger-ui
455
- [76]: https://github.com/swagger-api/swagger-editor
456
- [77]: https://github.com/release-it/release-it/network/dependents
457
- [78]: https://github.com/search?q=path%3A**%2F.release-it.json&type=code
458
- [79]: ./CHANGELOG.md
459
- [80]: https://github.com/release-it/release-it/releases
460
- [81]: ./.github/CONTRIBUTING.md
461
- [82]: https://github.com/release-it/release-it/issues/new
462
- [83]: ./LICENSE
463
- [84]: https://github.com/mohammadGh/release-it-beautiful-changelog
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
@@ -27,6 +27,7 @@
27
27
  "publish": true,
28
28
  "publishPath": ".",
29
29
  "publishArgs": [],
30
+ "publishPackageManager": "npm",
30
31
  "tag": null,
31
32
  "otp": null,
32
33
  "ignoreVersion": false,
@@ -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 => `Commit (${truncateLines(format(context.git.commitMessage, context), 1, ' [...]')})?`,
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: {
@@ -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(['npm', 'publish', ...args], { options: { ...getOptions(), interactive: isInteractive } })
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
- return [...choices, otherChoice];
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 = spawn(program, programArgs, spawnOptions);
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 (!context || context === null || !template || template === null || template.indexOf('${') === -1) return template;
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.0",
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.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.1",
86
- "ci-info": "^4.3.0",
87
- "eta": "4.0.1",
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.9.6",
89
+ "inquirer": "12.11.1",
90
90
  "issue-parser": "7.0.1",
91
91
  "lodash.merge": "4.6.2",
92
- "mime-types": "3.0.1",
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.2",
98
+ "semver": "7.7.3",
99
99
  "tinyglobby": "0.2.15",
100
- "undici": "6.21.3",
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.3.2",
107
- "@eslint/eslintrc": "3.3.1",
108
- "@eslint/js": "9.35.0",
109
- "@octokit/request-error": "7.0.0",
110
- "@types/node": "24.5.2",
111
- "eslint": "9.35.0",
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.4.0",
113
+ "globals": "16.5.0",
114
114
  "installed-check": "9.3.0",
115
- "knip": "5.63.1",
116
- "mentoss": "0.11.0",
115
+ "knip": "5.76.3",
116
+ "mentoss": "0.12.0",
117
117
  "mock-stdio": "1.0.3",
118
- "prettier": "3.6.2",
118
+ "prettier": "3.7.4",
119
119
  "remark-cli": "12.0.1",
120
- "remark-preset-webpro": "1.1.1",
121
- "tar": "7.4.3",
122
- "typescript": "5.9.2"
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
@@ -21,6 +21,10 @@
21
21
  },
22
22
  "default": []
23
23
  },
24
+ "publishPackageManager": {
25
+ "type": "string",
26
+ "default": "npm"
27
+ },
24
28
  "tag": {
25
29
  "type": "string",
26
30
  "default": null
package/types/config.d.ts CHANGED
@@ -77,6 +77,9 @@ export interface Config {
77
77
 
78
78
  publishArgs?: Array<any>;
79
79
 
80
+ /** @default "npm" */
81
+ publishPackageManager?: 'npm' | 'pnpm' | 'bun';
82
+
80
83
  /** @default null */
81
84
  tag?: any;
82
85