semantic-release 25.0.7 → 25.0.9
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 +0 -3
- package/lib/branches/expand.js +3 -1
- package/lib/branches/get-tags.js +4 -1
- package/lib/definitions/errors.js +4 -2
- package/lib/git.js +5 -1
- package/lib/hide-sensitive.js +4 -1
- package/lib/utils.js +1 -1
- package/lib/verify.js +2 -2
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
<a href="https://www.npmjs.com/package/semantic-release">
|
|
19
19
|
<img alt="npm latest version" src="https://img.shields.io/npm/v/semantic-release/latest.svg">
|
|
20
20
|
</a>
|
|
21
|
-
<a href="https://www.npmjs.com/package/semantic-release">
|
|
22
|
-
<img alt="npm next version" src="https://img.shields.io/npm/v/semantic-release/next.svg">
|
|
23
|
-
</a>
|
|
24
21
|
<a href="https://www.npmjs.com/package/semantic-release">
|
|
25
22
|
<img alt="npm beta version" src="https://img.shields.io/npm/v/semantic-release/beta.svg">
|
|
26
23
|
</a>
|
package/lib/branches/expand.js
CHANGED
|
@@ -10,7 +10,9 @@ export default async (repositoryUrl, { cwd }, branches) => {
|
|
|
10
10
|
...branches,
|
|
11
11
|
...remove(gitBranches, (name) => micromatch(gitBranches, branch.name).includes(name)).map((name) => ({
|
|
12
12
|
name,
|
|
13
|
-
...mapValues(omit(branch, "name"), (value) =>
|
|
13
|
+
...mapValues(omit(branch, "name"), (value) =>
|
|
14
|
+
isString(value) ? template(value, { evaluate: false, escape: false })({ name }) : value
|
|
15
|
+
),
|
|
14
16
|
})),
|
|
15
17
|
],
|
|
16
18
|
[]
|
package/lib/branches/get-tags.js
CHANGED
|
@@ -11,7 +11,10 @@ export default async ({ cwd, env, options: { tagFormat } }, branches) => {
|
|
|
11
11
|
// by replacing the `version` variable in the template by `(.+)`.
|
|
12
12
|
// The `tagFormat` is compiled with space as the `version` as it's an invalid tag character,
|
|
13
13
|
// so it's guaranteed to no be present in the `tagFormat`.
|
|
14
|
-
const tagRegexp = `^${escapeRegExp(template(tagFormat)({ version: " " })).replace(
|
|
14
|
+
const tagRegexp = `^${escapeRegExp(template(tagFormat, { evaluate: false, escape: false })({ version: " " })).replace(
|
|
15
|
+
" ",
|
|
16
|
+
"(.+)"
|
|
17
|
+
)}`;
|
|
15
18
|
|
|
16
19
|
// Get the tags notes for all the tags in the repository
|
|
17
20
|
const tagsNotesMap = await getTagsNotes({ cwd, env });
|
|
@@ -57,10 +57,12 @@ Please verify the \`repository\` property in your \`package.json\` and the [repo
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export function EGITNOPERMISSION({ options: { repositoryUrl }, branch: { name } }) {
|
|
60
|
+
export function EGITNOPERMISSION({ options: { originalRepositoryURL, repositoryUrl }, branch: { name } }) {
|
|
61
61
|
return {
|
|
62
62
|
message: "Cannot push to the Git repository.",
|
|
63
|
-
|
|
63
|
+
// Use `originalRepositoryURL` as `repositoryUrl` may contain credentials resolved by `getGitAuthUrl`,
|
|
64
|
+
// and this error is rethrown to API consumers without masking
|
|
65
|
+
details: `**semantic-release** cannot push the version tag to the branch \`${name}\` on the remote Git repository with URL \`${originalRepositoryURL || repositoryUrl}\`.
|
|
64
66
|
|
|
65
67
|
This can be caused by:
|
|
66
68
|
- a misconfiguration of the [repositoryUrl](${linkify("usage/configuration#repositoryurl")}) option
|
package/lib/git.js
CHANGED
|
@@ -54,7 +54,11 @@ export async function getCommits(from, to, execaOptions) {
|
|
|
54
54
|
{ cwd: execaOptions.cwd, env: { ...process.env, ...execaOptions.env } }
|
|
55
55
|
)
|
|
56
56
|
)
|
|
57
|
-
).map(({ message, gitTags, ...commit }) => ({
|
|
57
|
+
).map(({ message, gitTags, ...commit }) => ({
|
|
58
|
+
...commit,
|
|
59
|
+
message: (message ?? "").trim(),
|
|
60
|
+
gitTags: (gitTags ?? "").trim(),
|
|
61
|
+
}));
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
/**
|
package/lib/hide-sensitive.js
CHANGED
|
@@ -8,7 +8,10 @@ export default (env) => {
|
|
|
8
8
|
return false;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
return
|
|
11
|
+
return (
|
|
12
|
+
/token|password|credential|secret|private|key|auth|webhook/i.test(envVar) &&
|
|
13
|
+
size(env[envVar].trim()) >= SECRET_MIN_SIZE
|
|
14
|
+
);
|
|
12
15
|
});
|
|
13
16
|
|
|
14
17
|
const regexp = new RegExp(
|
package/lib/utils.js
CHANGED
|
@@ -75,7 +75,7 @@ export function getRange(min, max) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export function makeTag(tagFormat, version) {
|
|
78
|
-
return template(tagFormat)({ version });
|
|
78
|
+
return template(tagFormat, { evaluate: false, escape: false })({ version });
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export function isSameChannel(channel, otherChannel) {
|
package/lib/verify.js
CHANGED
|
@@ -22,14 +22,14 @@ export default async (context) => {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// Verify that compiling the `tagFormat` produce a valid Git tag
|
|
25
|
-
if (!(await verifyTagName(template(tagFormat)({ version: "0.0.0" })))) {
|
|
25
|
+
if (!(await verifyTagName(template(tagFormat, { evaluate: false, escape: false })({ version: "0.0.0" })))) {
|
|
26
26
|
errors.push(getError("EINVALIDTAGFORMAT", context));
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Verify the `tagFormat` contains the variable `version` by compiling the `tagFormat` template
|
|
30
30
|
// with a space as the `version` value and verify the result contains the space.
|
|
31
31
|
// The space is used as it's an invalid tag character, so it's guaranteed to no be present in the `tagFormat`.
|
|
32
|
-
if ((template(tagFormat)({ version: " " }).match(/ /g) || []).length !== 1) {
|
|
32
|
+
if ((template(tagFormat, { evaluate: false, escape: false })({ version: " " }).match(/ /g) || []).length !== 1) {
|
|
33
33
|
errors.push(getError("ETAGNOVERSION", context));
|
|
34
34
|
}
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semantic-release",
|
|
3
3
|
"description": "Automated semver compliant package publishing",
|
|
4
|
-
"version": "25.0.
|
|
4
|
+
"version": "25.0.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
|
|
7
7
|
"ava": {
|
|
@@ -60,22 +60,22 @@
|
|
|
60
60
|
"@types/node": "24.13.3",
|
|
61
61
|
"@types/signale": "1.4.7",
|
|
62
62
|
"ava": "8.0.1",
|
|
63
|
-
"c8": "
|
|
63
|
+
"c8": "12.0.0",
|
|
64
64
|
"clear-module": "4.1.3",
|
|
65
65
|
"cz-conventional-changelog": "3.3.0",
|
|
66
66
|
"file-url": "4.0.0",
|
|
67
|
-
"fs-extra": "11.
|
|
67
|
+
"fs-extra": "11.4.0",
|
|
68
68
|
"got": "15.1.0",
|
|
69
|
-
"js-yaml": "4.3.
|
|
69
|
+
"js-yaml": "4.3.1",
|
|
70
70
|
"lockfile-lint": "5.0.0",
|
|
71
71
|
"ls-engines": "0.10.1",
|
|
72
|
-
"mockserver-client": "7.
|
|
73
|
-
"nock": "14.0.
|
|
74
|
-
"npm-run-all2": "9.0.
|
|
72
|
+
"mockserver-client": "7.5.0",
|
|
73
|
+
"nock": "14.0.17",
|
|
74
|
+
"npm-run-all2": "9.0.3",
|
|
75
75
|
"p-retry": "8.0.0",
|
|
76
76
|
"prettier": "3.8.5",
|
|
77
|
-
"publint": "0.3.
|
|
78
|
-
"sinon": "22.
|
|
77
|
+
"publint": "0.3.22",
|
|
78
|
+
"sinon": "22.1.0",
|
|
79
79
|
"stream-buffers": "3.0.3",
|
|
80
80
|
"tempy": "3.2.0",
|
|
81
81
|
"testcontainers": "12.0.4",
|
|
@@ -167,5 +167,5 @@
|
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
},
|
|
170
|
-
"packageManager": "npm@12.0.
|
|
170
|
+
"packageManager": "npm@12.0.2+sha512.b885e890b9418fa1693544d05f53e64f9a73ec194837d4258b15fecdd692347b1dd2a517b1b0cbaf9d31cd8e92c3b70956bd2ecc72833a57b4b3098f5bfa7943"
|
|
171
171
|
}
|