release-it 17.3.0 → 17.4.0

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  🚀 Generic CLI tool to automate versioning and package publishing-related tasks:
4
4
 
5
- <img align="right" src="./docs/assets/release-it.svg?raw=true" height="280">
5
+ <img align="right" src="./docs/assets/release-it.svg?raw=true" height="280" />
6
6
 
7
7
  - Bump version (in e.g. `package.json`)
8
8
  - [Git commit, tag, push][1]
@@ -113,7 +113,7 @@ Here's a quick example `.release-it.json`:
113
113
 
114
114
  By default, release-it is **interactive** and allows you to confirm each task before execution:
115
115
 
116
- <img src="./docs/assets/release-it-interactive.gif?raw=true" height="290">
116
+ <img src="./docs/assets/release-it-interactive.gif?raw=true" height="290" />
117
117
 
118
118
  By using the `--ci` option, the process is fully automated without prompts. The configured tasks will be executed as
119
119
  demonstrated in the first animation above. In a Continuous Integration (CI) environment, this non-interactive mode is
@@ -316,42 +316,43 @@ Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab
316
316
  While mostly used as a CLI tool, release-it can be used as a dependency to integrate in your own scripts. See [use
317
317
  release-it programmatically][52] for example code.
318
318
 
319
- ## Example projects using release-it
320
-
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]
319
+ ## Projects using release-it
320
+
321
+ - [AdonisJs][53]
322
+ - [Axios][54]
323
+ - [Cal.com][55]
324
+ - [Ember CLI][56]
325
+ - [Halo][57]
326
+ - [hosts][58]
327
+ - [js-cookie][59]
328
+ - [Madge][60]
329
+ - [Metalsmith][61]
330
+ - [Node-Redis][62]
331
+ - [React Native Paper][63]
332
+ - [Readability.js][64]
333
+ - [Redux][65]
334
+ - [Saleor][66]
335
+ - [Semantic UI React][67]
336
+ - [Shepherd][68]
337
+ - [Tabler][69] + [tabler-icons][70]
338
+ - Swagger ([swagger-ui][71] + [swagger-editor][72])
339
+ - [Repositories that depend on release-it][73]
340
+ - GitHub search for [path:\*\*/.release-it.json][74]
340
341
 
341
342
  ## Legacy Node.js
342
343
 
343
344
  The latest major version is v17, supporting Node.js 18 and up (as Node.js v16 is EOL). The previous major version was
344
- v16, supporting Node.js 16. Use release-it v15 for environments running Node.js v14. Also see [CHANGELOG.md][74].
345
+ v16, supporting Node.js 16. Use release-it v15 for environments running Node.js v14. Also see [CHANGELOG.md][75].
345
346
 
346
347
  ## Links
347
348
 
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.
349
+ - See [CHANGELOG.md][75] for major/breaking updates, and [releases][76] for a detailed version history.
350
+ - To **contribute**, please read [CONTRIBUTING.md][77] first.
351
+ - Please [open an issue][78] if anything is missing or unclear in this documentation.
351
352
 
352
353
  ## License
353
354
 
354
- [MIT][78]
355
+ [MIT][79]
355
356
 
356
357
  Are you using release-it at work? Please consider [sponsoring me][14]!
357
358
 
@@ -407,29 +408,30 @@ Are you using release-it at work? Please consider [sponsoring me][14]!
407
408
  [50]: https://www.npmjs.com/search?q=keywords:release-it-plugin
408
409
  [51]: ./docs/plugins.md
409
410
  [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
411
+ [53]: https://github.com/adonisjs/core
412
+ [54]: https://github.com/axios/axios
413
+ [55]: https://github.com/calcom/cal.com
413
414
  [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
415
+ [57]: https://github.com/halo-dev/halo
416
+ [58]: https://github.com/StevenBlack/hosts
417
+ [59]: https://github.com/js-cookie/js-cookie
417
418
  [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
419
+ [61]: https://github.com/metalsmith/metalsmith
420
+ [62]: https://github.com/redis/node-redis
421
+ [63]: https://github.com/callstack/react-native-paper
422
+ [64]: https://github.com/mozilla/readability
423
+ [65]: https://github.com/reduxjs/redux
424
+ [66]: https://github.com/saleor/saleor
425
+ [67]: https://github.com/Semantic-Org/Semantic-UI-React
426
+ [68]: https://github.com/shipshapecode/shepherd
426
427
  [69]: https://github.com/tabler/tabler
427
428
  [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
429
+ [71]: https://github.com/swagger-api/swagger-ui
430
+ [72]: https://github.com/swagger-api/swagger-editor
431
+ [73]: https://github.com/release-it/release-it/network/dependents
432
+ [74]: https://github.com/search?q=path%3A**%2F.release-it.json&type=code
433
+ [75]: ./CHANGELOG.md
434
+ [76]: https://github.com/release-it/release-it/releases
435
+ [77]: ./.github/CONTRIBUTING.md
436
+ [78]: https://github.com/release-it/release-it/issues/new
437
+ [79]: ./LICENSE
package/lib/config.js CHANGED
@@ -12,6 +12,7 @@ const searchPlaces = [
12
12
  'package.json',
13
13
  '.release-it.json',
14
14
  '.release-it.js',
15
+ '.release-it.ts',
15
16
  '.release-it.cjs',
16
17
  '.release-it.yaml',
17
18
  '.release-it.yml',
package/lib/log.js CHANGED
@@ -17,11 +17,11 @@ class Logger {
17
17
  }
18
18
 
19
19
  log(...args) {
20
- console.log(...args); // eslint-disable-line no-console
20
+ console.log(...args);
21
21
  }
22
22
 
23
23
  error(...args) {
24
- console.error(chalk.red('ERROR'), ...args); // eslint-disable-line no-console
24
+ console.error(chalk.red('ERROR'), ...args);
25
25
  }
26
26
 
27
27
  info(...args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-it",
3
- "version": "17.3.0",
3
+ "version": "17.4.0",
4
4
  "description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
5
5
  "keywords": [
6
6
  "build",
@@ -55,12 +55,14 @@
55
55
  "bin",
56
56
  "config",
57
57
  "lib",
58
- "test"
58
+ "test",
59
+ "schema"
59
60
  ],
61
+ "types": "./types/index.d.ts",
60
62
  "scripts": {
61
63
  "knip": "knip",
62
64
  "lint": "eslint lib test",
63
- "format": "prettier --write \"{lib,test}/**/*.js\"",
65
+ "format": "prettier --write eslint.config.mjs \"{lib,test}/**/*.js\"",
64
66
  "docs": "remark README.md 'docs/**/*.md' '.github/*.md' -o",
65
67
  "test": "ava --no-worker-threads && installed-check",
66
68
  "release": "./bin/release-it.js"
@@ -80,9 +82,9 @@
80
82
  "git-url-parse": "14.0.0",
81
83
  "globby": "14.0.1",
82
84
  "got": "13.0.0",
83
- "inquirer": "9.2.22",
85
+ "inquirer": "9.2.23",
84
86
  "is-ci": "3.0.1",
85
- "issue-parser": "7.0.0",
87
+ "issue-parser": "7.0.1",
86
88
  "lodash": "4.17.21",
87
89
  "mime-types": "2.1.35",
88
90
  "new-github-release-url": "2.0.0",
@@ -100,27 +102,31 @@
100
102
  "yargs-parser": "21.1.1"
101
103
  },
102
104
  "devDependencies": {
105
+ "@eslint/compat": "1.1.0",
106
+ "@eslint/eslintrc": "3.1.0",
107
+ "@eslint/js": "9.5.0",
103
108
  "@octokit/request-error": "5.1.0",
104
109
  "ava": "6.1.3",
105
- "eslint": "8.57.0",
110
+ "eslint": "9.5.0",
106
111
  "eslint-config-prettier": "9.1.0",
107
- "eslint-plugin-ava": "14.0.0",
112
+ "eslint-plugin-ava": "15.0.1",
108
113
  "eslint-plugin-import": "2.29.1",
109
114
  "eslint-plugin-prettier": "5.1.3",
110
115
  "fs-monkey": "1.0.6",
116
+ "globals": "15.6.0",
111
117
  "installed-check": "9.3.0",
112
- "knip": "5.16.0",
113
- "memfs": "4.9.2",
118
+ "knip": "5.22.1",
119
+ "memfs": "4.9.3",
114
120
  "mock-stdio": "1.0.3",
115
121
  "nock": "13.5.4",
116
- "prettier": "3.2.5",
122
+ "prettier": "3.3.2",
117
123
  "remark-cli": "12.0.1",
118
124
  "remark-preset-webpro": "1.1.0",
119
125
  "sinon": "18.0.0",
120
126
  "strip-ansi": "7.1.0"
121
127
  },
122
128
  "engines": {
123
- "node": "^18.18.0 || ^20.8.0 || ^22.0.0"
129
+ "node": "^18.18.0 || ^20.9.0 || ^22.0.0"
124
130
  },
125
131
  "remarkConfig": {
126
132
  "plugins": [
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "release-it#git",
4
+ "title": "JSON schema for release-it Git configuration",
5
+ "type": "object",
6
+ "additionalItems": false,
7
+ "properties": {
8
+ "changelog": {
9
+ "type": "string",
10
+ "default": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}"
11
+ },
12
+ "requireCleanWorkingDir": {
13
+ "type": "boolean",
14
+ "default": true
15
+ },
16
+ "requireBranch": {
17
+ "type": "boolean",
18
+ "default": false
19
+ },
20
+ "requireUpstream": {
21
+ "type": "boolean",
22
+ "default": true
23
+ },
24
+ "requireCommits": {
25
+ "type": "boolean",
26
+ "default": false
27
+ },
28
+ "requireCommitsFail": {
29
+ "type": "boolean",
30
+ "default": true
31
+ },
32
+ "commitsPath": {
33
+ "type": "string",
34
+ "default": ""
35
+ },
36
+ "addUntrackedFiles": {
37
+ "type": "string",
38
+ "default": ""
39
+ },
40
+ "commit": {
41
+ "type": "boolean",
42
+ "default": true
43
+ },
44
+ "commitArgs": {
45
+ "type": "array",
46
+ "uniqueItems": true,
47
+ "items": {
48
+ "type": "string"
49
+ },
50
+ "default": []
51
+ },
52
+ "tag": {
53
+ "type": "boolean",
54
+ "default": true
55
+ },
56
+ "tagExclude": {
57
+ "type": "string",
58
+ "default": null
59
+ },
60
+ "tagMatch": {
61
+ "type": "string",
62
+ "default": null
63
+ },
64
+ "getLatestTagFromAllRefs": {
65
+ "type": "boolean",
66
+ "default": false
67
+ },
68
+ "tagAnnotation": {
69
+ "type": "string",
70
+ "default": "Release ${version}"
71
+ },
72
+ "tagArgs": {
73
+ "type": "array",
74
+ "uniqueItems": true,
75
+ "items": {
76
+ "type": "string"
77
+ },
78
+ "default": []
79
+ },
80
+ "push": {
81
+ "type": "boolean",
82
+ "default": true
83
+ },
84
+ "pushArgs": {
85
+ "type": "array",
86
+ "uniqueItems": true,
87
+ "items": {
88
+ "type": "string"
89
+ },
90
+ "default": ["--follow-tags"]
91
+ },
92
+ "pushRepo": {
93
+ "type": "string",
94
+ "default": ""
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "release-it#github",
4
+ "title": "JSON schema for release-it github configuration",
5
+ "type": "object",
6
+ "additionalItems": false,
7
+ "properties": {
8
+ "release": {
9
+ "type": "boolean",
10
+ "default": false
11
+ },
12
+ "releaseName": {
13
+ "type": "string",
14
+ "default": "Release ${version}"
15
+ },
16
+ "releaseNotes": {
17
+ "default": null
18
+ },
19
+ "autoGenerate": {
20
+ "type": "boolean",
21
+ "default": false
22
+ },
23
+ "preRelease": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "draft": {
28
+ "type": "boolean",
29
+ "default": false
30
+ },
31
+ "tokenRef": {
32
+ "type": "string",
33
+ "default": "GITHUB_TOKEN"
34
+ },
35
+ "assets": {
36
+ "default": null
37
+ },
38
+ "host": {
39
+ "type": "string",
40
+ "default": null
41
+ },
42
+ "timeout": {
43
+ "type": "integer",
44
+ "default": 0
45
+ },
46
+ "proxy": {
47
+ "type": "string",
48
+ "default": null
49
+ },
50
+ "skipChecks": {
51
+ "type": "boolean",
52
+ "default": false
53
+ },
54
+ "web": {
55
+ "type": "boolean",
56
+ "default": false
57
+ },
58
+ "comments": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "submit": {
63
+ "type": "boolean",
64
+ "default": false
65
+ },
66
+ "issue": {
67
+ "type": "string",
68
+ "default": ":rocket: _This issue has been resolved in v${version}. See [${releaseName}](${releaseUrl}) for release notes._"
69
+ },
70
+ "pr": {
71
+ "type": "string",
72
+ "default": ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "release-it#gitlab",
4
+ "title": "JSON schema for release-it gitlab configuration",
5
+ "type": "object",
6
+ "additionalItems": false,
7
+ "properties": {
8
+ "release": {
9
+ "type": "boolean",
10
+ "default": false
11
+ },
12
+ "releaseName": {
13
+ "type": "string",
14
+ "default": "Release ${version}"
15
+ },
16
+ "releaseNotes": {
17
+ "default": null
18
+ },
19
+ "autoGenerate": {
20
+ "type": "boolean",
21
+ "default": false
22
+ },
23
+ "preRelease": {
24
+ "type": "boolean",
25
+ "default": false
26
+ },
27
+ "draft": {
28
+ "type": "boolean",
29
+ "default": false
30
+ },
31
+ "milesstones": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "string"
35
+ },
36
+ "default": []
37
+ },
38
+ "tokenRef": {
39
+ "type": "string",
40
+ "default": "GITLAB_TOKEN"
41
+ },
42
+ "tokenHeader": {
43
+ "type": "string",
44
+ "default": "Private-Token"
45
+ },
46
+ "certificateAuthorityFile": {
47
+ "default": null
48
+ },
49
+ "assets": {
50
+ "default": null
51
+ },
52
+ "origin": {
53
+ "type": "string",
54
+ "default": null
55
+ },
56
+ "skipChecks": {
57
+ "type": "boolean",
58
+ "default": false
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "release-it#npm",
4
+ "title": "JSON schema for release-it npm configuration",
5
+ "type": "object",
6
+ "additionalItems": false,
7
+ "properties": {
8
+ "publish": {
9
+ "type": "boolean",
10
+ "default": true
11
+ },
12
+ "publishPath": {
13
+ "type": "string",
14
+ "default": "."
15
+ },
16
+ "publishArgs": {
17
+ "type": "array",
18
+ "uniqueItems": true,
19
+ "items": {
20
+ "type": "string"
21
+ },
22
+ "default": []
23
+ },
24
+ "tag": {
25
+ "type": "string",
26
+ "default": null
27
+ },
28
+ "otp": {
29
+ "type": "string",
30
+ "default": null
31
+ },
32
+ "ignoreVersion": {
33
+ "type": "boolean",
34
+ "default": false
35
+ },
36
+ "allowSameVersion": {
37
+ "type": "boolean",
38
+ "default": false
39
+ },
40
+ "versionArgs": {
41
+ "type": "array",
42
+ "uniqueItems": true,
43
+ "items": {
44
+ "type": "string"
45
+ },
46
+ "default": []
47
+ },
48
+ "skipChecks": {
49
+ "type": "boolean",
50
+ "default": false
51
+ },
52
+ "timeout": {
53
+ "type": "integer",
54
+ "default": 10
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "release-it#release-it",
4
+ "title": "JSON schema for release-it configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "The JSON schema version used to validate this configuration file"
11
+ },
12
+ "hooks": {
13
+ "type": "object",
14
+ "additionalProperties": true,
15
+ "patternProperties": {
16
+ "^(before|after):((version|git|npm|github|gitlab):)?(init|bump|release)$": {
17
+ "if": {
18
+ "type": "array"
19
+ },
20
+ "then": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "else": {
27
+ "type": "string"
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "plugins": {
33
+ "type": "object",
34
+ "additionalProperties": true
35
+ },
36
+ "git": {
37
+ "$comment": "Boolean or git config object",
38
+ "if": {
39
+ "type": "object"
40
+ },
41
+ "then": {
42
+ "$ref": "./git.json"
43
+ },
44
+ "else": {
45
+ "type": "boolean",
46
+ "default": false
47
+ }
48
+ },
49
+ "npm": {
50
+ "$comment": "Boolean or npm config object",
51
+ "if": {
52
+ "type": "object"
53
+ },
54
+ "then": {
55
+ "$ref": "./npm.json"
56
+ },
57
+ "else": {
58
+ "type": "boolean",
59
+ "default": false
60
+ }
61
+ },
62
+ "github": {
63
+ "$comment": "Boolean or github config object",
64
+ "if": {
65
+ "type": "object"
66
+ },
67
+ "then": {
68
+ "$ref": "./github.json"
69
+ },
70
+ "else": {
71
+ "type": "boolean",
72
+ "default": false
73
+ }
74
+ },
75
+ "gitlab": {
76
+ "$comment": "Boolean or gitlab config object",
77
+ "if": {
78
+ "type": "object"
79
+ },
80
+ "then": {
81
+ "$ref": "./gitlab.json"
82
+ },
83
+ "else": {
84
+ "type": "boolean",
85
+ "default": false
86
+ }
87
+ }
88
+ }
89
+ }
package/test/github.js CHANGED
@@ -23,7 +23,7 @@ test.serial('should check token and perform checks', async t => {
23
23
  const options = { github: { release: true, tokenRef, pushRepo } };
24
24
  const github = factory(GitHub, { options });
25
25
 
26
- process.env[tokenRef] = '123'; // eslint-disable-line require-atomic-updates
26
+ process.env[tokenRef] = '123';
27
27
 
28
28
  interceptAuthentication();
29
29
  interceptCollaborator();
package/test/gitlab.js CHANGED
@@ -24,7 +24,7 @@ test.serial('should validate token', async t => {
24
24
  await t.throwsAsync(gitlab.init(), {
25
25
  message: /^Environment variable "MY_GITLAB_TOKEN" is required for GitLab releases/
26
26
  });
27
- process.env[tokenRef] = '123'; // eslint-disable-line require-atomic-updates
27
+ process.env[tokenRef] = '123';
28
28
 
29
29
  interceptUser(undefined, { reqheaders: { 'private-token': '123' } });
30
30
  interceptCollaborator(undefined, { reqheaders: { 'private-token': '123' } });