@ontrails/trails 1.0.0-beta.47 → 1.0.0-beta.48
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/CHANGELOG.md +7 -0
- package/package.json +16 -16
- package/src/regrade/receipt-history.ts +1 -0
- package/src/release/policy.ts +18 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# trails
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.48
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d8a2e7a`](https://github.com/outfitter-dev/trails/commit/d8a2e7a3e89ac06c1f594ef845ea18acaf58ea64): Preserve governed conversion provenance when Regrade appends a run to an existing v3 receipt.
|
|
8
|
+
- [`7cca56b`](https://github.com/outfitter-dev/trails/commit/7cca56bdf3802826f2d4d338ee490d261cb8e52b): Keep ordinary source pull request labels out of generated release policy by requiring the canonical `changeset-release/main` head route during release PR discovery.
|
|
9
|
+
|
|
3
10
|
## 1.0.0-beta.47
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ontrails/trails",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.48",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/outfitter-dev/trails.git",
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@clack/prompts": "^1.1.0",
|
|
35
|
-
"@ontrails/adapter-kit": "^1.0.0-beta.
|
|
36
|
-
"@ontrails/cli": "^1.0.0-beta.
|
|
37
|
-
"@ontrails/commander": "^1.0.0-beta.
|
|
38
|
-
"@ontrails/config": "^1.0.0-beta.
|
|
39
|
-
"@ontrails/core": "^1.0.0-beta.
|
|
40
|
-
"@ontrails/http": "^1.0.0-beta.
|
|
41
|
-
"@ontrails/mcp": "^1.0.0-beta.
|
|
42
|
-
"@ontrails/observability": "^1.0.0-beta.
|
|
43
|
-
"@ontrails/permits": "^1.0.0-beta.
|
|
44
|
-
"@ontrails/regrade": "^1.0.0-beta.
|
|
45
|
-
"@ontrails/source": "^1.0.0-beta.
|
|
46
|
-
"@ontrails/topography": "^1.0.0-beta.
|
|
47
|
-
"@ontrails/warden": "^1.0.0-beta.
|
|
35
|
+
"@ontrails/adapter-kit": "^1.0.0-beta.48",
|
|
36
|
+
"@ontrails/cli": "^1.0.0-beta.48",
|
|
37
|
+
"@ontrails/commander": "^1.0.0-beta.48",
|
|
38
|
+
"@ontrails/config": "^1.0.0-beta.48",
|
|
39
|
+
"@ontrails/core": "^1.0.0-beta.48",
|
|
40
|
+
"@ontrails/http": "^1.0.0-beta.48",
|
|
41
|
+
"@ontrails/mcp": "^1.0.0-beta.48",
|
|
42
|
+
"@ontrails/observability": "^1.0.0-beta.48",
|
|
43
|
+
"@ontrails/permits": "^1.0.0-beta.48",
|
|
44
|
+
"@ontrails/regrade": "^1.0.0-beta.48",
|
|
45
|
+
"@ontrails/source": "^1.0.0-beta.48",
|
|
46
|
+
"@ontrails/topography": "^1.0.0-beta.48",
|
|
47
|
+
"@ontrails/warden": "^1.0.0-beta.48",
|
|
48
48
|
"commander": "^14.0.3",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
50
|
"zod": "^4.3.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@ontrails/cloudflare": "^1.0.0-beta.
|
|
54
|
-
"@ontrails/testing": "^1.0.0-beta.
|
|
53
|
+
"@ontrails/cloudflare": "^1.0.0-beta.48",
|
|
54
|
+
"@ontrails/testing": "^1.0.0-beta.48"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -405,6 +405,7 @@ export const buildRegradeHistoryReceipt = (params: {
|
|
|
405
405
|
transitionId: params.transitionId,
|
|
406
406
|
};
|
|
407
407
|
const receipt = {
|
|
408
|
+
conversion: params.prior?.artifact.conversion,
|
|
408
409
|
id: params.transitionId,
|
|
409
410
|
kind: 'regrade-history',
|
|
410
411
|
path: params.historyPath,
|
package/src/release/policy.ts
CHANGED
|
@@ -407,7 +407,8 @@ const makeReport = (
|
|
|
407
407
|
}
|
|
408
408
|
): ReleasePolicyReport => {
|
|
409
409
|
const canPublish =
|
|
410
|
-
|
|
410
|
+
input.releasePullRequest !== undefined &&
|
|
411
|
+
(options.decision === 'auto' || options.decision === 'manual');
|
|
411
412
|
const packagesPublished = registryComplete(input.registryPackages);
|
|
412
413
|
const reasons = [...options.reasons];
|
|
413
414
|
if (canPublish) {
|
|
@@ -1125,6 +1126,20 @@ const managedGitHubLabels = [
|
|
|
1125
1126
|
},
|
|
1126
1127
|
] as const;
|
|
1127
1128
|
|
|
1129
|
+
export const selectGeneratedReleasePullRequest = <
|
|
1130
|
+
PullRequest extends {
|
|
1131
|
+
readonly base: { readonly ref: string };
|
|
1132
|
+
readonly head: { readonly ref: string };
|
|
1133
|
+
},
|
|
1134
|
+
>(
|
|
1135
|
+
pulls: readonly PullRequest[]
|
|
1136
|
+
): PullRequest | undefined =>
|
|
1137
|
+
pulls.find(
|
|
1138
|
+
(candidate) =>
|
|
1139
|
+
candidate.base.ref === 'main' &&
|
|
1140
|
+
candidate.head.ref === 'changeset-release/main'
|
|
1141
|
+
);
|
|
1142
|
+
|
|
1128
1143
|
const readReleasePullRequest = async (
|
|
1129
1144
|
repository: string,
|
|
1130
1145
|
sha: string
|
|
@@ -1133,7 +1148,7 @@ const readReleasePullRequest = async (
|
|
|
1133
1148
|
repository,
|
|
1134
1149
|
`/commits/${sha}/pulls`
|
|
1135
1150
|
);
|
|
1136
|
-
const pull = pulls
|
|
1151
|
+
const pull = selectGeneratedReleasePullRequest(pulls);
|
|
1137
1152
|
if (!pull) {
|
|
1138
1153
|
return undefined;
|
|
1139
1154
|
}
|
|
@@ -1161,9 +1176,7 @@ const readOpenReleasePullRequest = async (
|
|
|
1161
1176
|
repository,
|
|
1162
1177
|
'/pulls?state=open&base=main&per_page=100'
|
|
1163
1178
|
);
|
|
1164
|
-
const pull = pulls
|
|
1165
|
-
(candidate) => candidate.head.ref === 'changeset-release/main'
|
|
1166
|
-
);
|
|
1179
|
+
const pull = selectGeneratedReleasePullRequest(pulls);
|
|
1167
1180
|
if (!pull) {
|
|
1168
1181
|
return undefined;
|
|
1169
1182
|
}
|