@anolilab/multi-semantic-release 1.0.1 → 1.0.3
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/CHANGELOG.md +14 -0
- package/README.md +8 -6
- package/lib/create-inline-plugin-creator.js +2 -1
- package/lib/get-config.js +1 -1
- package/lib/update-deps.js +1 -23
- package/package.json +34 -34
- package/lib/git.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.0.3](https://github.com/anolilab/multi-semantic-release/compare/v1.0.2...v1.0.3) (2023-12-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* updated dev deps and cosmiconfig to v9 ([569e401](https://github.com/anolilab/multi-semantic-release/commit/569e401c41ccbfd86dc718f2a32ab717cb3c5cc4))
|
|
7
|
+
|
|
8
|
+
## [1.0.2](https://github.com/anolilab/multi-semantic-release/compare/v1.0.1...v1.0.2) (2023-09-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* removed dead code ([#5](https://github.com/anolilab/multi-semantic-release/issues/5)) ([238f997](https://github.com/anolilab/multi-semantic-release/commit/238f997d6d186062388d334840cf29dfa64b7383))
|
|
14
|
+
|
|
1
15
|
## [1.0.1](https://github.com/anolilab/multi-semantic-release/compare/v1.0.0...v1.0.1) (2023-09-28)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
hacky [semantic-release](https://github.com/semantic-release/semantic-release) for monorepos based on [qiwi/multi-semantic-release](https://github.com/qiwi/multi-semantic-release)
|
|
8
8
|
|
|
9
|
-
[![
|
|
9
|
+
[![npm-image]][npm-url] [![license-image]][license-url]
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -249,6 +249,8 @@ You can also combine the CLI ignore options with the `!` operator at each packag
|
|
|
249
249
|
|
|
250
250
|
We use this tool to release our JS platform code inhouse (GitHub Enterprise + JB TeamCity) and for our OSS (GitHub + Travis CI). Guaranteed working configurations available in projects.
|
|
251
251
|
|
|
252
|
+
- [anolilab/multi-semantic-release](https://github.com/anolilab/multi-semantic-release)
|
|
253
|
+
- [visulima/visulima](https://github.com/visulima/visulima)
|
|
252
254
|
- [qiwi/substrate](https://github.com/qiwi/substrate)
|
|
253
255
|
- [qiwi/json-rpc](https://github.com/qiwi/json-rpc)
|
|
254
256
|
- [qiwi/lint-config-qiwi](https://github.com/qiwi/lint-config-qiwi)
|
|
@@ -395,6 +397,8 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
395
397
|
|
|
396
398
|
- [Daniel Bannert](https://github.com/prisis)
|
|
397
399
|
- [All Contributors](https://github.com/anolilab/multi-semantic-release/graphs/contributors)
|
|
400
|
+
- [hanseltime](https://github.com/hanseltime) -> https://github.com/qiwi/multi-semantic-release/pull/96
|
|
401
|
+
- [lyh543](https://github.com/lyh543) -> https://github.com/dhoulb/multi-semantic-release/issues/111
|
|
398
402
|
- [dhoub/multi-semantic-release](https://github.com/dhoulb/multi-semantic-release)
|
|
399
403
|
- [qiwi/multi-semantic-release](https://github.com/qiwi/multi-semantic-release)
|
|
400
404
|
|
|
@@ -402,9 +406,7 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
402
406
|
|
|
403
407
|
[0BSD](./LICENSE.md)
|
|
404
408
|
|
|
405
|
-
[
|
|
406
|
-
[typescript-url]: "typescript"
|
|
407
|
-
[license-image]: https://img.shields.io/npm/l/@anolilab/eslint-config?color=blueviolet&style=for-the-badge
|
|
409
|
+
[license-image]: https://img.shields.io/npm/l/@anolilab/multi-semantic-release?color=blueviolet&style=for-the-badge
|
|
408
410
|
[license-url]: LICENSE.md "license"
|
|
409
|
-
[npm-image]: https://img.shields.io/npm/v/@anolilab/
|
|
410
|
-
[npm-url]: https://www.npmjs.com/package/@anolilab/
|
|
411
|
+
[npm-image]: https://img.shields.io/npm/v/@anolilab/multi-semantic-release/latest.svg?style=for-the-badge&logo=npm
|
|
412
|
+
[npm-url]: https://www.npmjs.com/package/@anolilab/multi-semantic-releasv/latest "npm"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { getTagHead } from "semantic-release/lib/git.js";
|
|
2
|
+
|
|
1
3
|
import getCommitsFiltered from "./get-commits-filtered.js";
|
|
2
|
-
import { getTagHead } from "./git.js";
|
|
3
4
|
import logger from "./logger.js";
|
|
4
5
|
import { resolveReleaseType, updateManifestDeps } from "./update-deps.js";
|
|
5
6
|
|
package/lib/get-config.js
CHANGED
|
@@ -25,7 +25,7 @@ const CONFIG_FILES = [
|
|
|
25
25
|
*/
|
|
26
26
|
export default async function getConfig(cwd) {
|
|
27
27
|
// Call cosmiconfig.
|
|
28
|
-
const config = await cosmiconfig(CONFIG_NAME, { searchPlaces: CONFIG_FILES }).search(cwd);
|
|
28
|
+
const config = await cosmiconfig(CONFIG_NAME, { mergeSearchPlaces: false, searchPlaces: CONFIG_FILES }).search(cwd);
|
|
29
29
|
|
|
30
30
|
// Return the found config or empty object.
|
|
31
31
|
// istanbul ignore next (not important).
|
package/lib/update-deps.js
CHANGED
|
@@ -201,28 +201,6 @@ export const getNextVersion = (package_) => {
|
|
|
201
201
|
return lastVersion && typeof package_._nextType === "string" ? semver.inc(lastVersion, package_._nextType) : lastVersion || "1.0.0";
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
/**
|
|
205
|
-
* Resolve the package version from a tag
|
|
206
|
-
*
|
|
207
|
-
* @param {Package} package_ Package object.
|
|
208
|
-
* @param {string} tag The tag containing the version to resolve
|
|
209
|
-
* @returns {string|null} The version of the package or null if no tag was passed
|
|
210
|
-
* @internal
|
|
211
|
-
*/
|
|
212
|
-
export const getVersionFromTag = (package_, tag) => {
|
|
213
|
-
if (!package_.name) {
|
|
214
|
-
return tag || null;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (!tag) {
|
|
218
|
-
return null;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// TODO inherit semantic-release/lib/branches/get-tags.js
|
|
222
|
-
const stringMatch = tag.match(/\d.\d.\d[^+]*/u);
|
|
223
|
-
return stringMatch && stringMatch[0] && semver.valid(stringMatch[0]) ? stringMatch[0] : null;
|
|
224
|
-
};
|
|
225
|
-
|
|
226
204
|
/**
|
|
227
205
|
* Parse the prerelease tag from a semver version.
|
|
228
206
|
*
|
|
@@ -356,7 +334,7 @@ export const resolveNextVersion = (currentVersion, nextVersion, bumpStrategy = "
|
|
|
356
334
|
* Update pkg deps.
|
|
357
335
|
*
|
|
358
336
|
* @param {Package} package_ The package this function is being called on.
|
|
359
|
-
* @returns {
|
|
337
|
+
* @returns {void}
|
|
360
338
|
* @internal
|
|
361
339
|
*/
|
|
362
340
|
export const updateManifestDeps = (package_) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/multi-semantic-release",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A multi semantic release tool for
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "A multi semantic release tool for a monorepo.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/anolilab/multi-semantic-release.git"
|
|
@@ -31,12 +31,14 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "echo 'There is no need for build' && exit 0",
|
|
34
|
-
"prepare": "is-ci || (node verify-node-version.cjs && pnpx only-allow pnpm && husky install)",
|
|
35
34
|
"lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
|
|
36
35
|
"lint:eslint:fix": "pnpm run lint:eslint --fix",
|
|
37
36
|
"lint:prettier": "prettier --config=.prettierrc.cjs --check .",
|
|
38
37
|
"lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
|
|
39
38
|
"lint:staged": "lint-staged --verbose --concurrent false --debug",
|
|
39
|
+
"lint:text": "textlint ./.github/ ./README.md ./UPGRADE.md --parallel --experimental --cache --dry-run",
|
|
40
|
+
"lint:text:fix": "textlint ./.github/ ./README.md ./UPGRADE.md --parallel --experimental --fix",
|
|
41
|
+
"prepare": "is-ci || (node verify-node-version.cjs && pnpx only-allow pnpm && husky install)",
|
|
40
42
|
"sort-package-json": "sort-package-json ./package.json",
|
|
41
43
|
"test": "vitest run",
|
|
42
44
|
"test:bench": "vitest bench",
|
|
@@ -47,14 +49,13 @@
|
|
|
47
49
|
"dependencies": {
|
|
48
50
|
"@semrel-extra/topo": "^1.14.0",
|
|
49
51
|
"blork": "^9.3.0",
|
|
50
|
-
"cosmiconfig": "^
|
|
52
|
+
"cosmiconfig": "^9.0.0",
|
|
51
53
|
"debug": "^4.3.4",
|
|
52
54
|
"detect-indent": "^7.0.1",
|
|
53
55
|
"detect-newline": "^4.0.1",
|
|
54
56
|
"execa": "^8.0.1",
|
|
55
57
|
"git-log-parser": "^1.2.0",
|
|
56
58
|
"lodash-es": "^4.17.21",
|
|
57
|
-
"promise-events": "^0.2.4",
|
|
58
59
|
"resolve-from": "^5.0.0",
|
|
59
60
|
"semver": "^7.5.4",
|
|
60
61
|
"signale": "^1.4.0",
|
|
@@ -62,52 +63,50 @@
|
|
|
62
63
|
"yargs": "^17.7.2"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@anolilab/commitlint-config": "^
|
|
66
|
-
"@anolilab/eslint-config": "^
|
|
67
|
-
"@anolilab/lint-staged-config": "^2.
|
|
68
|
-
"@anolilab/prettier-config": "^5.0.
|
|
69
|
-
"@anolilab/textlint-config": "^8.0.
|
|
70
|
-
"@babel/core": "^7.23.
|
|
71
|
-
"@babel/eslint-parser": "7.
|
|
72
|
-
"@commitlint/
|
|
73
|
-
"@
|
|
74
|
-
"@secretlint/secretlint-rule-preset-recommend": "^
|
|
66
|
+
"@anolilab/commitlint-config": "^5.0.2",
|
|
67
|
+
"@anolilab/eslint-config": "^15.0.2",
|
|
68
|
+
"@anolilab/lint-staged-config": "^2.1.6",
|
|
69
|
+
"@anolilab/prettier-config": "^5.0.13",
|
|
70
|
+
"@anolilab/textlint-config": "^8.0.15",
|
|
71
|
+
"@babel/core": "^7.23.5",
|
|
72
|
+
"@babel/eslint-parser": "7.23.3",
|
|
73
|
+
"@commitlint/cli": "^18.4.3",
|
|
74
|
+
"@commitlint/config-conventional": "^18.4.3",
|
|
75
|
+
"@secretlint/secretlint-rule-preset-recommend": "^8.0.0",
|
|
75
76
|
"@semantic-release/changelog": "^6.0.3",
|
|
76
77
|
"@semantic-release/git": "^10.0.1",
|
|
77
|
-
"@semantic-release/github": "^9.2.
|
|
78
|
-
"@semantic-release/npm": "^11.0.
|
|
79
|
-
"@vitest/coverage-v8": "^0.34.
|
|
78
|
+
"@semantic-release/github": "^9.2.4",
|
|
79
|
+
"@semantic-release/npm": "^11.0.1",
|
|
80
|
+
"@vitest/coverage-v8": "^0.34.6",
|
|
80
81
|
"commitizen": "^4.3.0",
|
|
81
|
-
"commitlint": "^
|
|
82
|
+
"commitlint": "^18.4.3",
|
|
82
83
|
"cross-env": "^7.0.3",
|
|
83
84
|
"cz-conventional-changelog": "^3.3.0",
|
|
84
|
-
"eslint": "^8.
|
|
85
|
-
"eslint-config-prettier": "^9.0.0",
|
|
85
|
+
"eslint": "^8.55.0",
|
|
86
86
|
"eslint-plugin-editorconfig": "^4.0.3",
|
|
87
|
-
"eslint-plugin-import": "npm:eslint-plugin-i@2.
|
|
87
|
+
"eslint-plugin-import": "npm:eslint-plugin-i@2.29.0",
|
|
88
88
|
"eslint-plugin-mdx": "^2.2.0",
|
|
89
|
-
"eslint-plugin-n": "^16.1
|
|
90
|
-
"eslint-plugin-
|
|
91
|
-
"eslint-plugin-vitest": "^0.3.1",
|
|
89
|
+
"eslint-plugin-n": "^16.3.1",
|
|
90
|
+
"eslint-plugin-vitest": "^0.3.10",
|
|
92
91
|
"eslint-plugin-vitest-globals": "^1.4.0",
|
|
93
92
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.13.0",
|
|
94
93
|
"file-url": "^4.0.0",
|
|
95
94
|
"husky": "^8.0.3",
|
|
96
95
|
"is-ci": "^3.0.1",
|
|
97
|
-
"lint-staged": "^
|
|
98
|
-
"prettier": "^3.0
|
|
96
|
+
"lint-staged": "^15.2.0",
|
|
97
|
+
"prettier": "^3.1.0",
|
|
99
98
|
"rimraf": "^5.0.5",
|
|
100
|
-
"secretlint": "
|
|
101
|
-
"semantic-release": "^22.0.
|
|
102
|
-
"sort-package-json": "^2.
|
|
99
|
+
"secretlint": "8.0.0",
|
|
100
|
+
"semantic-release": "^22.0.8",
|
|
101
|
+
"sort-package-json": "^2.6.0",
|
|
103
102
|
"tempy": "^3.1.0",
|
|
104
|
-
"textlint": "^13.
|
|
105
|
-
"vitest": "^0.34.
|
|
103
|
+
"textlint": "^13.4.1",
|
|
104
|
+
"vitest": "^0.34.6"
|
|
106
105
|
},
|
|
107
106
|
"peerDependencies": {
|
|
108
107
|
"semantic-release": "^20.0 || ^21.0 || >=22.0.3"
|
|
109
108
|
},
|
|
110
|
-
"packageManager": "pnpm@8.
|
|
109
|
+
"packageManager": "pnpm@8.11.0",
|
|
111
110
|
"engines": {
|
|
112
111
|
"node": ">=18 || >=20.6.1"
|
|
113
112
|
},
|
|
@@ -135,7 +134,8 @@
|
|
|
135
134
|
"trim@<0.0.3": ">=0.0.3",
|
|
136
135
|
"chrono-node@<2.2.4": ">=2.2.4",
|
|
137
136
|
"get-func-name@<2.0.1": ">=3.0.0",
|
|
138
|
-
"chai": ">=4.3.10"
|
|
137
|
+
"chai": ">=4.3.10",
|
|
138
|
+
"postcss@<8.4.31": ">=8.4.31"
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
package/lib/git.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { execaSync } from "execa";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Get all the tags for a given branch.
|
|
5
|
-
*
|
|
6
|
-
* @param {String} branch The branch for which to retrieve the tags.
|
|
7
|
-
* @param {Object} [execaOptions] Options to pass to `execa`.
|
|
8
|
-
* @param {Array<String>} filters List of string to be checked inside tags.
|
|
9
|
-
*
|
|
10
|
-
* @return {Array<String>} List of git tags.
|
|
11
|
-
* @throws {Error} If the `git` command fails.
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export function getTags(branch, execaOptions, filters) {
|
|
15
|
-
const { stdout } = execaSync("git", ["tag", "--merged", branch], execaOptions);
|
|
16
|
-
|
|
17
|
-
const tags = stdout
|
|
18
|
-
.split("\n")
|
|
19
|
-
.map((tag) => tag.trim())
|
|
20
|
-
.filter(Boolean);
|
|
21
|
-
|
|
22
|
-
if (!filters || filters.length === 0) {
|
|
23
|
-
return tags;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const validateSubstr = (t, f) => f.every((v) => t.includes(v));
|
|
27
|
-
|
|
28
|
-
return tags.filter((tag) => validateSubstr(tag, filters));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Get the commit sha for a given tag.
|
|
33
|
-
*
|
|
34
|
-
* @param {String} tagName Tag name for which to retrieve the commit sha.
|
|
35
|
-
* @param {Object} [execaOptions] Options to pass to `execa`.
|
|
36
|
-
*
|
|
37
|
-
* @return {String} The commit sha of the tag in parameter or `null`.
|
|
38
|
-
*/
|
|
39
|
-
export function getTagHead(tagName, execaOptions) {
|
|
40
|
-
return execaSync("git", ["rev-list", "-1", tagName], execaOptions).stdout;
|
|
41
|
-
}
|