@semantic-release/github 12.0.0-beta.2 → 12.0.0-beta.4
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 +1 -1
- package/lib/glob-assets.js +2 -2
- package/lib/publish.js +4 -3
- package/lib/success.js +5 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to publish a
|
|
4
4
|
[GitHub release](https://help.github.com/articles/about-releases) and comment on released Pull Requests/Issues.
|
|
5
5
|
|
|
6
|
-
[](https://github.com/semantic-release/github/actions/workflows/test.yml?query=branch%3Amaster)
|
|
7
7
|
|
|
8
8
|
[](https://www.npmjs.com/package/@semantic-release/github)
|
|
9
9
|
[](https://www.npmjs.com/package/@semantic-release/github)
|
package/lib/glob-assets.js
CHANGED
|
@@ -2,7 +2,7 @@ import { basename, resolve } from "node:path";
|
|
|
2
2
|
|
|
3
3
|
import { isPlainObject, castArray, uniqWith, uniq } from "lodash-es";
|
|
4
4
|
import dirGlob from "dir-glob";
|
|
5
|
-
import {
|
|
5
|
+
import { glob as tinyglobby } from "tinyglobby";
|
|
6
6
|
import debugFactory from "debug";
|
|
7
7
|
|
|
8
8
|
const debug = debugFactory("semantic-release:github");
|
|
@@ -27,7 +27,7 @@ export default async function globAssets({ cwd }, assets) {
|
|
|
27
27
|
return [];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const globbed = await
|
|
30
|
+
const globbed = await tinyglobby(glob, {
|
|
31
31
|
cwd,
|
|
32
32
|
expandDirectories: false, // TODO Temporary workaround for https://github.com/mrmlnc/fast-glob/issues/47
|
|
33
33
|
dot: true,
|
package/lib/publish.js
CHANGED
|
@@ -107,10 +107,11 @@ export default async function publish(pluginConfig, context, { Octokit }) {
|
|
|
107
107
|
await Promise.all(
|
|
108
108
|
globbedAssets.map(async (asset) => {
|
|
109
109
|
const filePath = isPlainObject(asset) ? asset.path : asset;
|
|
110
|
+
const resolved = resolve(cwd, filePath);
|
|
110
111
|
let file;
|
|
111
112
|
|
|
112
113
|
try {
|
|
113
|
-
file = await stat(
|
|
114
|
+
file = await stat(resolved);
|
|
114
115
|
} catch {
|
|
115
116
|
logger.error(
|
|
116
117
|
"The asset %s cannot be read, and will be ignored.",
|
|
@@ -122,7 +123,7 @@ export default async function publish(pluginConfig, context, { Octokit }) {
|
|
|
122
123
|
if (!file || !file.isFile()) {
|
|
123
124
|
logger.error(
|
|
124
125
|
"The asset %s is not a file, and will be ignored.",
|
|
125
|
-
|
|
126
|
+
resolved,
|
|
126
127
|
);
|
|
127
128
|
return;
|
|
128
129
|
}
|
|
@@ -131,7 +132,7 @@ export default async function publish(pluginConfig, context, { Octokit }) {
|
|
|
131
132
|
const upload = {
|
|
132
133
|
method: "POST",
|
|
133
134
|
url: uploadUrl,
|
|
134
|
-
data: await readFile(
|
|
135
|
+
data: await readFile(resolved),
|
|
135
136
|
name: fileName,
|
|
136
137
|
headers: {
|
|
137
138
|
"content-type": mime.getType(extname(fileName)) || "text/plain",
|
package/lib/success.js
CHANGED
|
@@ -265,6 +265,11 @@ export default async function success(pluginConfig, context, { Octokit }) {
|
|
|
265
265
|
|
|
266
266
|
if (failComment === false || failTitle === false) {
|
|
267
267
|
logger.log("Skip closing issue.");
|
|
268
|
+
logger.warn(
|
|
269
|
+
`DEPRECATION: 'false' for 'failComment' or 'failTitle' is deprecated and will be removed in a future major version. Use 'failCommentCondition' instead.`,
|
|
270
|
+
);
|
|
271
|
+
} else if (failCommentCondition === false) {
|
|
272
|
+
logger.log("Skip closing issue.");
|
|
268
273
|
} else {
|
|
269
274
|
const srIssues = await findSRIssues(octokit, logger, labels, owner, repo);
|
|
270
275
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semantic-release/github",
|
|
3
3
|
"description": "semantic-release plugin to publish a GitHub release and comment on released Pull Requests/Issues",
|
|
4
|
-
"version": "12.0.0-beta.
|
|
4
|
+
"version": "12.0.0-beta.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Pierre Vanduynslager (https://twitter.com/@pvdlg_)",
|
|
7
7
|
"ava": {
|
|
@@ -30,32 +30,32 @@
|
|
|
30
30
|
"aggregate-error": "^5.0.0",
|
|
31
31
|
"debug": "^4.3.4",
|
|
32
32
|
"dir-glob": "^3.0.1",
|
|
33
|
-
"globby": "^14.0.0",
|
|
34
33
|
"http-proxy-agent": "^7.0.0",
|
|
35
34
|
"https-proxy-agent": "^7.0.0",
|
|
36
35
|
"issue-parser": "^7.0.0",
|
|
37
36
|
"lodash-es": "^4.17.21",
|
|
38
37
|
"mime": "^4.0.0",
|
|
39
38
|
"p-filter": "^4.0.0",
|
|
39
|
+
"tinyglobby": "^0.2.14",
|
|
40
40
|
"url-join": "^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"ava": "6.4.
|
|
43
|
+
"ava": "6.4.1",
|
|
44
44
|
"c8": "10.1.3",
|
|
45
|
-
"cpy": "
|
|
45
|
+
"cpy": "12.0.1",
|
|
46
46
|
"cz-conventional-changelog": "3.3.0",
|
|
47
47
|
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
|
|
48
48
|
"lockfile-lint": "4.14.1",
|
|
49
49
|
"ls-engines": "0.9.3",
|
|
50
50
|
"npm-run-all2": "8.0.4",
|
|
51
51
|
"prettier": "3.6.2",
|
|
52
|
-
"publint": "0.3.
|
|
53
|
-
"semantic-release": "24.2.
|
|
52
|
+
"publint": "0.3.14",
|
|
53
|
+
"semantic-release": "24.2.9",
|
|
54
54
|
"sinon": "21.0.0",
|
|
55
55
|
"tempy": "3.1.0"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
|
-
"node": "^22.14.0 || >= 24.
|
|
58
|
+
"node": "^22.14.0 || >= 24.10.0"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"lib",
|