@ucdjs/release-scripts 0.1.1 → 0.1.2
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/dist/index.mjs +22 -8
- package/package.json +12 -9
package/dist/index.mjs
CHANGED
|
@@ -291,8 +291,8 @@ var GitHubClient = class {
|
|
|
291
291
|
...init,
|
|
292
292
|
headers: {
|
|
293
293
|
...init.headers,
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
Accept: "application/vnd.github.v3+json",
|
|
295
|
+
Authorization: `token ${this.githubToken}`,
|
|
296
296
|
"User-Agent": "ucdjs-release-scripts (+https://github.com/ucdjs/ucdjs-release-scripts)"
|
|
297
297
|
}
|
|
298
298
|
});
|
|
@@ -464,28 +464,42 @@ function dedentString(str) {
|
|
|
464
464
|
function generatePullRequestBody(updates, body) {
|
|
465
465
|
const eta = new Eta();
|
|
466
466
|
const bodyTemplate = body ? dedentString(body) : DEFAULT_PR_BODY_TEMPLATE;
|
|
467
|
-
|
|
467
|
+
const allPackages = updates.map((u) => ({
|
|
468
468
|
name: u.package.name,
|
|
469
469
|
currentVersion: u.currentVersion,
|
|
470
470
|
newVersion: u.newVersion,
|
|
471
471
|
bumpType: u.bumpType,
|
|
472
|
-
hasDirectChanges: u.hasDirectChanges
|
|
473
|
-
|
|
472
|
+
hasDirectChanges: u.hasDirectChanges,
|
|
473
|
+
changeKind: u.changeKind
|
|
474
|
+
}));
|
|
475
|
+
return eta.renderString(bodyTemplate, {
|
|
476
|
+
packages: allPackages,
|
|
477
|
+
releases: allPackages.filter((p) => p.changeKind !== "as-is"),
|
|
478
|
+
asIs: allPackages.filter((p) => p.changeKind === "as-is")
|
|
479
|
+
});
|
|
474
480
|
}
|
|
475
481
|
//#endregion
|
|
476
482
|
//#region src/options.ts
|
|
477
483
|
const DEFAULT_PR_BODY_TEMPLATE = dedent`
|
|
478
484
|
This PR was automatically generated by the UCD release scripts.
|
|
479
485
|
|
|
486
|
+
<% if (it.releases.length > 0) { %>
|
|
480
487
|
The following packages have been prepared for release:
|
|
481
488
|
|
|
482
|
-
<%
|
|
483
|
-
<% it.packages.forEach((pkg) => { %>
|
|
489
|
+
<% it.releases.forEach((pkg) => { %>
|
|
484
490
|
- **<%= pkg.name %>**: <%= pkg.currentVersion %> → <%= pkg.newVersion %> (<%= pkg.bumpType %>)
|
|
485
491
|
<% }) %>
|
|
486
492
|
<% } else { %>
|
|
487
493
|
There are no packages to release.
|
|
488
494
|
<% } %>
|
|
495
|
+
<% if (it.asIs.length > 0) { %>
|
|
496
|
+
|
|
497
|
+
The following packages are keeping their current version:
|
|
498
|
+
|
|
499
|
+
<% it.asIs.forEach((pkg) => { %>
|
|
500
|
+
- **<%= pkg.name %>**: <%= pkg.currentVersion %> (as-is)
|
|
501
|
+
<% }) %>
|
|
502
|
+
<% } %>
|
|
489
503
|
|
|
490
504
|
Please review the changes and merge when ready.
|
|
491
505
|
|
|
@@ -1393,7 +1407,7 @@ async function selectVersionPrompt(workspaceRoot, pkg, currentVersion, suggested
|
|
|
1393
1407
|
const initial = Math.max(0, choices.findIndex((choice) => choice.value === initialValue));
|
|
1394
1408
|
const prereleaseVersionByChoice = {
|
|
1395
1409
|
"next-prerelease": nextDefaultPrerelease,
|
|
1396
|
-
|
|
1410
|
+
next: nextDefaultPrerelease,
|
|
1397
1411
|
"next-beta": nextBeta,
|
|
1398
1412
|
"next-alpha": nextAlpha,
|
|
1399
1413
|
"prepatch-beta": prePatchBeta,
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ucdjs/release-scripts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "@ucdjs release scripts",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"license": "MIT",
|
|
7
6
|
"repository": {
|
|
8
7
|
"type": "git",
|
|
9
8
|
"url": "git+https://github.com/ucdjs/release-scripts.git"
|
|
10
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
11
15
|
"imports": {
|
|
12
16
|
"#core/*": "./src/core/*.ts",
|
|
13
17
|
"#operations/*": "./src/operations/*.ts",
|
|
@@ -20,10 +24,6 @@
|
|
|
20
24
|
".": "./dist/index.mjs",
|
|
21
25
|
"./package.json": "./package.json"
|
|
22
26
|
},
|
|
23
|
-
"types": "./dist/index.d.mts",
|
|
24
|
-
"files": [
|
|
25
|
-
"dist"
|
|
26
|
-
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@luxass/utils": "2.7.3",
|
|
29
29
|
"commit-parser": "1.3.1",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"tinyexec": "1.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@luxass/eslint-config": "7.3.0",
|
|
37
36
|
"@luxass/msw-utils": "0.6.1",
|
|
38
37
|
"@types/node": "22.18.12",
|
|
39
38
|
"@types/prompts": "2.4.9",
|
|
40
39
|
"@types/semver": "7.7.1",
|
|
41
|
-
"eslint": "10.0.3",
|
|
42
40
|
"eta": "4.5.1",
|
|
43
41
|
"msw": "2.12.14",
|
|
42
|
+
"oxfmt": "^0.42.0",
|
|
43
|
+
"oxlint": "^1.57.0",
|
|
44
44
|
"tsdown": "0.21.2",
|
|
45
45
|
"typescript": "5.9.3",
|
|
46
46
|
"vitest": "4.1.0",
|
|
@@ -54,7 +54,10 @@
|
|
|
54
54
|
"dev": "tsdown --watch",
|
|
55
55
|
"test": "vitest --run",
|
|
56
56
|
"test:watch": "vitest",
|
|
57
|
-
"lint": "
|
|
57
|
+
"lint": "oxlint",
|
|
58
|
+
"lint:fix": "oxlint --fix",
|
|
59
|
+
"fmt": "oxfmt",
|
|
60
|
+
"fmt:check": "oxfmt --check",
|
|
58
61
|
"typecheck": "tsc --noEmit"
|
|
59
62
|
}
|
|
60
63
|
}
|