Skip to content

Commit b6ed55e

Browse files
authored
Merge pull request #916 from semantic-release/add/warn
chore(deps): bump minimum peer dependency bound with `semantic-release`
2 parents 39aa5b5 + 5bef865 commit b6ed55e

12 files changed

+126
-48
lines changed

README.md

Lines changed: 33 additions & 33 deletions
Large diffs are not rendered by default.

lib/fail.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ export default async function fail(pluginConfig, context, { Octokit }) {
3232

3333
if (failComment === false || failTitle === false) {
3434
logger.log("Skip issue creation.");
35-
// TODO: use logger.warn() instead of logger.log()
36-
logger.log(
35+
logger.warn(
3736
`DEPRECATION: 'false' for 'failComment' or 'failTitle' is deprecated and will be removed in a future major version. Use 'failCommentCondition' instead.`,
3837
);
3938
} else if (failCommentCondition === false) {

lib/success.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ export default async function success(pluginConfig, context, { Octokit }) {
6262
logger.log("No commits found in release");
6363
}
6464
logger.log("Skip commenting on issues and pull requests.");
65-
// TODO: use logger.warn() instead of logger.log()
66-
logger.log(
65+
logger.warn(
6766
`DEPRECATION: 'false' for 'successComment' is deprecated and will be removed in a future major version. Use 'successCommentCondition' instead.`,
6867
);
6968
} else if (successCommentCondition === false) {
@@ -387,6 +386,8 @@ const baseFields = `
387386
url
388387
name
389388
color
389+
description
390+
isDefault
390391
}
391392
}
392393
milestone {
@@ -522,7 +523,16 @@ function buildIssuesOrPRsFromResponseNode(responseNodes, type = "ISSUE") {
522523
number: node.number,
523524
title: node.title,
524525
body: node.body,
525-
labels: node.labels?.nodes.map((label) => label.name),
526+
labels: node.labels?.nodes.map((label) => {
527+
return {
528+
id: label.id,
529+
url: label.url,
530+
name: label.name,
531+
color: label.color,
532+
description: label.description,
533+
default: label.isDefault,
534+
};
535+
}),
526536
html_url: node.url,
527537
created_at: node.createdAt,
528538
updated_at: node.updatedAt,

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
]
102102
},
103103
"peerDependencies": {
104-
"semantic-release": ">=20.1.0"
104+
"semantic-release": ">=24.1.0"
105105
},
106106
"publishConfig": {
107107
"access": "public",

test/add-channel.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ test.beforeEach((t) => {
1212
// Mock logger
1313
t.context.log = sinon.stub();
1414
t.context.error = sinon.stub();
15-
t.context.logger = { log: t.context.log, error: t.context.error };
15+
t.context.warn = sinon.stub();
16+
t.context.logger = {
17+
log: t.context.log,
18+
error: t.context.error,
19+
warn: t.context.warn,
20+
};
1621
});
1722

1823
test("Update a release", async (t) => {

test/fail.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ test.beforeEach((t) => {
1414
// Mock logger
1515
t.context.log = sinon.stub();
1616
t.context.error = sinon.stub();
17-
t.context.logger = { log: t.context.log, error: t.context.error };
17+
t.context.warn = sinon.stub();
18+
t.context.logger = {
19+
log: t.context.log,
20+
error: t.context.error,
21+
warn: t.context.warn,
22+
};
1823
});
1924

2025
test("Open a new issue with the list of errors", async (t) => {

test/find-sr-issue.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ test.beforeEach((t) => {
1010
// Mock logger
1111
t.context.log = sinon.stub();
1212
t.context.error = sinon.stub();
13-
t.context.logger = { log: t.context.log, error: t.context.error };
13+
t.context.warn = sinon.stub();
14+
t.context.logger = {
15+
log: t.context.log,
16+
error: t.context.error,
17+
warn: t.context.warn,
18+
};
1419
});
1520

1621
test("Filter out issues without ID", async (t) => {

test/integration.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ test.beforeEach(async (t) => {
1414
// Stub the logger
1515
t.context.log = sinon.stub();
1616
t.context.error = sinon.stub();
17-
t.context.logger = { log: t.context.log, error: t.context.error };
17+
t.context.warn = sinon.stub();
18+
t.context.logger = {
19+
log: t.context.log,
20+
error: t.context.error,
21+
warn: t.context.warn,
22+
};
1823
});
1924

2025
test("Verify GitHub auth", async (t) => {

test/publish.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ test.beforeEach((t) => {
1515
// Mock logger
1616
t.context.log = sinon.stub();
1717
t.context.error = sinon.stub();
18-
t.context.logger = { log: t.context.log, error: t.context.error };
18+
t.context.warn = sinon.stub();
19+
t.context.logger = {
20+
log: t.context.log,
21+
error: t.context.error,
22+
warn: t.context.warn,
23+
};
1924
});
2025

2126
test("Publish a release without creating discussion", async (t) => {

0 commit comments

Comments
 (0)