@rightkit/release 0.2.72 → 0.2.73

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.72",
3
+ "version": "0.2.73",
4
4
  "description": "Portable Right Suite release CLI/SDK: signed native archives, direct bootstrap transactions, immutable GitHub Release upload, R2 bootstrap publication, and add-on adoption.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -39,6 +39,23 @@ export function comparePackedTrees(local, published) {
39
39
  return Object.freeze({ equal: false, differences: Object.freeze(differences) });
40
40
  }
41
41
 
42
+ export function packedArchivePath(output) {
43
+ const parsed = typeof output === 'string' ? JSON.parse(output) : output;
44
+ const record = Array.isArray(parsed) ? parsed[0] : parsed;
45
+ if (typeof record?.filename !== 'string' || !record.filename.trim()) {
46
+ throw new Error('pnpm pack output omitted filename');
47
+ }
48
+ return record.filename;
49
+ }
50
+
51
+ function runPnpm(args, options = {}) {
52
+ const npmExecPath = process.env.npm_execpath;
53
+ if (typeof npmExecPath !== 'string' || !npmExecPath.trim()) {
54
+ throw new Error('registry parity must run through the pnpm package script');
55
+ }
56
+ return execFileSync(process.execPath, [npmExecPath, ...args], options);
57
+ }
58
+
42
59
  async function extract(archive, destination) {
43
60
  await mkdir(destination, { recursive: true });
44
61
  execFileSync('tar', ['-xzf', archive, '-C', destination], { stdio: 'pipe' });
@@ -57,8 +74,8 @@ export async function verifyRegistryParity({ allowUnpublished = false, fetchImpl
57
74
  try {
58
75
  const localDir = join(root, 'local'); const publishedArchive = join(root, 'published.tgz');
59
76
  await mkdir(localDir, { recursive: true });
60
- const packed = JSON.parse(execFileSync('pnpm', ['pack', '--pack-destination', localDir, '--json'], { cwd: packageRoot, encoding: 'utf8' }));
61
- const localArchive = join(localDir, basename(packed[0]?.filename ?? ''));
77
+ const packed = runPnpm(['pack', '--pack-destination', localDir, '--json'], { cwd: packageRoot, encoding: 'utf8' });
78
+ const localArchive = join(localDir, basename(packedArchivePath(packed)));
62
79
  const response = await fetchImpl(record.dist.tarball);
63
80
  if (!response.ok) throw new Error(`registry tarball failed: HTTP ${response.status}`);
64
81
  await writeFile(publishedArchive, Buffer.from(await response.arrayBuffer()));
@@ -22,7 +22,7 @@
22
22
  "@rightkit/logs": "0.1.4",
23
23
  "@rightkit/platform-ui": "0.1.1",
24
24
  "@rightkit/qa": "0.2.1",
25
- "@rightkit/release": "0.2.72",
25
+ "@rightkit/release": "0.2.73",
26
26
  "@rightkit/tauri": "0.1.1",
27
27
  "@rightkit/updates": "0.2.4"
28
28
  },
@@ -70,7 +70,8 @@
70
70
  "0.2.68",
71
71
  "0.2.69",
72
72
  "0.2.70",
73
- "0.2.71"
73
+ "0.2.71",
74
+ "0.2.72"
74
75
  ],
75
76
  "@rightkit/qa": [
76
77
  "0.1.0",