@rightkit/git 0.2.27 → 0.2.28
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/manifest.mjs +5 -2
- package/manifest.test.mjs +3 -0
- package/package.json +1 -1
package/manifest.mjs
CHANGED
|
@@ -83,8 +83,11 @@ const NATIVE_RUNNER_TARGETS = new Map([
|
|
|
83
83
|
["macos-15-intel", ["macos", "x86_64"]],
|
|
84
84
|
]);
|
|
85
85
|
|
|
86
|
+
// Hosted `macos-*` runners plus the self-hosted Xcode runner labels (`xcode-27`).
|
|
87
|
+
const MACOS_RUNNER_RE = /^(macos|xcode)-/i;
|
|
88
|
+
|
|
86
89
|
function inferredTarget(os) {
|
|
87
|
-
const platform = /^windows-/i.test(os) ? "windows" :
|
|
90
|
+
const platform = /^windows-/i.test(os) ? "windows" : MACOS_RUNNER_RE.test(os) ? "macos" : "linux";
|
|
88
91
|
return { os, platform, architecture: platform === "macos" ? "arm64" : "x86_64" };
|
|
89
92
|
}
|
|
90
93
|
|
|
@@ -253,7 +256,7 @@ export function validateManifest(manifest) {
|
|
|
253
256
|
if (nativeTarget && (target.platform !== nativeTarget[0] || target.architecture !== nativeTarget[1])) {
|
|
254
257
|
errors.push(`candidate.targets[] must declare ${target.os} as ${nativeTarget[0]}/${nativeTarget[1]}`);
|
|
255
258
|
}
|
|
256
|
-
if ((target.platform === "windows" && !/^windows-/i.test(target.os)) || (target.platform === "macos" &&
|
|
259
|
+
if ((target.platform === "windows" && !/^windows-/i.test(target.os)) || (target.platform === "macos" && !MACOS_RUNNER_RE.test(target.os))) {
|
|
257
260
|
errors.push("candidate.targets[].os must match its Windows or macOS platform");
|
|
258
261
|
}
|
|
259
262
|
const targetKey = `${target.os}|${target.platform}|${target.architecture}`;
|
package/manifest.test.mjs
CHANGED
|
@@ -207,6 +207,9 @@ test("candidate targets permit native multi-architecture matrices independent of
|
|
|
207
207
|
assert.equal(validateManifest({ ...multiArchitecture, candidate: { ...multiArchitecture.candidate, targets: [{ os: "windows-2025", platform: "windows", architecture: "riscv64" }] } }).valid, false);
|
|
208
208
|
assert.equal(validateManifest({ ...multiArchitecture, candidate: { ...multiArchitecture.candidate, targets: [{ os: "windows-11-arm", platform: "windows", architecture: "x86_64" }] } }).valid, false);
|
|
209
209
|
assert.equal(validateManifest({ ...multiArchitecture, candidate: { ...multiArchitecture.candidate, targets: [{ os: "ubuntu-24.04", platform: "windows", architecture: "x86_64" }] } }).valid, false);
|
|
210
|
+
const xcodeRunner = { ...multiArchitecture, candidate: { ...multiArchitecture.candidate, os: ["xcode-27"], targets: [{ os: "xcode-27", platform: "macos", architecture: "arm64" }], signWindows: false } };
|
|
211
|
+
assert.equal(validateManifest(xcodeRunner).valid, true, JSON.stringify(validateManifest(xcodeRunner).errors));
|
|
212
|
+
assert.equal(validateManifest({ ...multiArchitecture, candidate: { ...multiArchitecture.candidate, os: ["ubuntu-24.04"], targets: [{ os: "ubuntu-24.04", platform: "macos", architecture: "arm64" }] } }).valid, false);
|
|
210
213
|
assert.equal(validateManifest({ ...multiArchitecture, candidate: { ...multiArchitecture.candidate, targets: [{ os: "${{ secrets.X }}", platform: "windows", architecture: "x86_64" }] } }).valid, false);
|
|
211
214
|
assert.equal(validateManifest({ ...multiArchitecture, candidate: { ...multiArchitecture.candidate, releaseChain: { windowsFinalizeScript: "release:finalize:win", macosFinalizeScript: "release:finalize:mac", installedQualificationScript: "release:qualify", publishScript: "release:publish", qualificationRunnerVariable: "QUALIFICATION_RUNNER_LABEL" } } }).valid, false);
|
|
212
215
|
});
|
package/package.json
CHANGED