@rightkit/release 0.2.36 → 0.2.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/release",
3
- "version": "0.2.36",
3
+ "version": "0.2.37",
4
4
  "description": "Portable Right Suite release CLI/SDK: signed installers, updater artifacts, patch/update routing, hardening, R2 publish, and RightApps registration.",
5
5
  "type": "module",
6
6
  "bin": {
package/pub-upload.mjs CHANGED
@@ -8,12 +8,7 @@ const BUCKETS = new Map([
8
8
  ["public", "rightapps-downloads"],
9
9
  ["private", "rightapps-updates"],
10
10
  ]);
11
- // Wrangler always runs remotely through a package runner; which one exists is machine-specific
12
- // (a node install without npm/npx is normal when pnpm is the pinned package manager).
13
- const RUNNERS = [
14
- { cmd: "npx", prefix: [] },
15
- { cmd: "pnpm", prefix: ["dlx"] },
16
- ];
11
+ const RUNNER = { cmd: "pnpm", prefix: ["dlx"] };
17
12
 
18
13
  const [, , localFile, r2Key, bucketAlias = "public"] = process.argv;
19
14
  if (!localFile || !r2Key) {
@@ -48,8 +43,7 @@ const runner = resolveRunner(env);
48
43
  if (!runner) {
49
44
  console.error(
50
45
  "upload-large: no package runner found. Tried: " +
51
- `${RUNNERS.map((entry) => [entry.cmd, ...entry.prefix].join(" ")).join(", ")}. ` +
52
- "Install one, or set RIGHT_RELEASE_WRANGLER_RUNNER (e.g. \"pnpm dlx\").",
46
+ "pnpm dlx. Install the pinned workspace package manager before release.",
53
47
  );
54
48
  process.exit(1);
55
49
  }
@@ -73,21 +67,13 @@ if (result.error) {
73
67
  process.exit(result.status ?? 1);
74
68
 
75
69
  function resolveRunner(env) {
76
- const override = process.env.RIGHT_RELEASE_WRANGLER_RUNNER?.trim();
77
- if (override) {
78
- const [cmd, ...prefix] = override.split(/\s+/);
79
- return { cmd, prefix };
80
- }
81
- for (const candidate of RUNNERS) {
82
- const probe = spawnSync(candidate.cmd, ["--version"], {
83
- env,
84
- stdio: "ignore",
85
- shell: process.platform === "win32",
86
- windowsHide: true,
87
- });
88
- if (!probe.error && probe.status === 0) return candidate;
89
- }
90
- return null;
70
+ const probe = spawnSync(RUNNER.cmd, ["--version"], {
71
+ env,
72
+ stdio: "ignore",
73
+ shell: process.platform === "win32",
74
+ windowsHide: true,
75
+ });
76
+ return !probe.error && probe.status === 0 ? RUNNER : null;
91
77
  }
92
78
 
93
79
  function cleanCloudflareEnv(source) {
@@ -52,3 +52,9 @@ test("Windows upload trust verification uses signtool instead of PowerShell modu
52
52
  assert.match(signingSource, /verifyOnly/);
53
53
  assert.match(signingSource, /\["verify", "\/pa", "\/v", file\]/);
54
54
  });
55
+
56
+ test("upload uses only the pinned pnpm runner", () => {
57
+ const source = readFileSync(upload, "utf8");
58
+ assert.match(source, /spawnSync\("pnpm", \["dlx", "wrangler@4"/);
59
+ assert.doesNotMatch(source, /\bnpx\b/);
60
+ });
@@ -317,7 +317,7 @@ test("Cargo version contract rejects staged versions that mismatch canonical man
317
317
  test("RightKit exposes one current version manifest", () => {
318
318
  assert.equal(existsSync(versionsPath), true, "rightkit-versions.json must be the single current-version source");
319
319
  assert.match(versions.packageManager, /^pnpm@\d+\.\d+\.\d+$/);
320
- assert.equal(versions.npm["@rightkit/release"], "0.2.36");
320
+ assert.equal(versions.npm["@rightkit/release"], "0.2.37");
321
321
  assert.equal(versions.npm["@rightkit/legal"], "0.2.0");
322
322
  assert.equal(versions.npm["@rightkit/license"], "0.1.5");
323
323
  assert.equal(versions.npm["@rightkit/logs"], "0.1.3");
@@ -7,7 +7,7 @@
7
7
  "@rightkit/logs": "0.1.3",
8
8
  "@rightkit/platform-ui": "0.1.0",
9
9
  "@rightkit/qa": "0.1.0",
10
- "@rightkit/release": "0.2.36",
10
+ "@rightkit/release": "0.2.37",
11
11
  "@rightkit/tauri": "0.1.0",
12
12
  "@rightkit/updates": "0.2.3"
13
13
  },
package/upload-large.mjs CHANGED
@@ -8,12 +8,7 @@ const BUCKETS = new Map([
8
8
  ["public", "rightapps-downloads"],
9
9
  ["private", "rightapps-updates"],
10
10
  ]);
11
- // Wrangler always runs remotely through a package runner; which one exists is machine-specific
12
- // (a node install without npm/npx is normal when pnpm is the pinned package manager).
13
- const RUNNERS = [
14
- { cmd: "npx", prefix: [] },
15
- { cmd: "pnpm", prefix: ["dlx"] },
16
- ];
11
+ const RUNNER = { cmd: "pnpm", prefix: ["dlx"] };
17
12
 
18
13
  const [, , localFile, r2Key, bucketAlias = "public"] = process.argv;
19
14
  if (!localFile || !r2Key) {
@@ -48,8 +43,7 @@ const runner = resolveRunner(env);
48
43
  if (!runner) {
49
44
  console.error(
50
45
  "upload-large: no package runner found. Tried: " +
51
- `${RUNNERS.map((entry) => [entry.cmd, ...entry.prefix].join(" ")).join(", ")}. ` +
52
- "Install one, or set RIGHT_RELEASE_WRANGLER_RUNNER (e.g. \"pnpm dlx\").",
46
+ "pnpm dlx. Install the pinned workspace package manager before release.",
53
47
  );
54
48
  process.exit(1);
55
49
  }
@@ -73,21 +67,13 @@ if (result.error) {
73
67
  process.exit(result.status ?? 1);
74
68
 
75
69
  function resolveRunner(env) {
76
- const override = process.env.RIGHT_RELEASE_WRANGLER_RUNNER?.trim();
77
- if (override) {
78
- const [cmd, ...prefix] = override.split(/\s+/);
79
- return { cmd, prefix };
80
- }
81
- for (const candidate of RUNNERS) {
82
- const probe = spawnSync(candidate.cmd, ["--version"], {
83
- env,
84
- stdio: "ignore",
85
- shell: process.platform === "win32",
86
- windowsHide: true,
87
- });
88
- if (!probe.error && probe.status === 0) return candidate;
89
- }
90
- return null;
70
+ const probe = spawnSync(RUNNER.cmd, ["--version"], {
71
+ env,
72
+ stdio: "ignore",
73
+ shell: process.platform === "win32",
74
+ windowsHide: true,
75
+ });
76
+ return !probe.error && probe.status === 0 ? RUNNER : null;
91
77
  }
92
78
 
93
79
  function cleanCloudflareEnv(source) {
@@ -46,10 +46,7 @@ test("refuses unknown bucket aliases", () => {
46
46
  test("resolves a real package runner for wrangler on this machine", () => {
47
47
  const result = run("public");
48
48
  assert.equal(result.status, 0, result.stderr);
49
- // A node install carrying neither npm nor npx is normal where pnpm is the pinned package
50
- // manager; the uploader must find a runner that actually exists rather than assume npx.
51
- // Assuming npx once made every R2 upload a silent no-op while the publish reported success.
52
- assert.match(result.stdout, /^runner: (npx|pnpm dlx)$/m);
49
+ assert.match(result.stdout, /^runner: pnpm dlx$/m);
53
50
  });
54
51
 
55
52
  test("fails loudly when no package runner exists instead of skipping the upload", () => {
@@ -71,16 +68,3 @@ test("fails loudly when no package runner exists instead of skipping the upload"
71
68
  assert.notEqual(result.status, 0, "a box with no runner must not report a successful upload");
72
69
  assert.match(result.stderr, /no package runner found/);
73
70
  });
74
-
75
- test("honours an explicit runner override", () => {
76
- const result = spawnSync(
77
- process.execPath,
78
- [uploader, fixtureFile(), "fixture/installers/windows/current/Artifact.exe", "public"],
79
- {
80
- encoding: "utf8",
81
- env: { ...process.env, RIGHT_RELEASE_UPLOAD_DRY_RUN: "1", RIGHT_RELEASE_WRANGLER_RUNNER: "pnpm dlx" },
82
- },
83
- );
84
- assert.equal(result.status, 0, result.stderr);
85
- assert.match(result.stdout, /^runner: pnpm dlx$/m);
86
- });
@@ -182,7 +182,7 @@ function bucketName(bucket) {
182
182
  }
183
183
 
184
184
  function wrangler(runArgs) {
185
- return spawnSync("npx", ["wrangler@4", ...runArgs], { cwd: repoRoot, env: process.env, encoding: "utf8", windowsHide: true, shell: process.platform === "win32" });
185
+ return spawnSync("pnpm", ["dlx", "wrangler@4", ...runArgs], { cwd: repoRoot, env: process.env, encoding: "utf8", windowsHide: true, shell: process.platform === "win32" });
186
186
  }
187
187
 
188
188
  function hashFile(file) {