semantic-release 25.0.7 → 25.0.8

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.
@@ -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) => (isString(value) ? template(value)({ 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
  []
@@ -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 });
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 }) => ({ ...commit, message: message.trim(), gitTags: gitTags.trim() }));
57
+ ).map(({ message, gitTags, ...commit }) => ({
58
+ ...commit,
59
+ message: (message ?? "").trim(),
60
+ gitTags: (gitTags ?? "").trim(),
61
+ }));
58
62
  }
59
63
 
60
64
  /**
@@ -8,7 +8,10 @@ export default (env) => {
8
8
  return false;
9
9
  }
10
10
 
11
- return /token|password|credential|secret|private/i.test(envVar) && size(env[envVar].trim()) >= SECRET_MIN_SIZE;
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.7",
4
+ "version": "25.0.8",
5
5
  "type": "module",
6
6
  "author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
7
7
  "ava": {
@@ -167,5 +167,5 @@
167
167
  ]
168
168
  }
169
169
  },
170
- "packageManager": "npm@12.0.0+sha512.ab3bcf41f35263b968ba233aaefedd2f4862e5eb0118b9f594bc316ddc8be57388b2c5b3a183309fcc6abd68587192faa274e47a7612c6bb4ac6c16b15b505cb"
170
+ "packageManager": "npm@12.0.1+sha512.2f94fd8bf600416416a934bfc59c4991e8bff7372ef7d842784e2a8b8d48c81555ee645069ddea73625fb8e92dc261feab0188fd5dab6c22fefd46316f5f9140"
171
171
  }