super-release 1.5.0 → 1.5.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.
@@ -1 +1 @@
1
- c7454b2b90b822379d42b42fe435d9fa85fe0c557bd4ff59a63c5ee246c55793 super-release-darwin-aarch64.tar.gz
1
+ fe6fea5666588e92b2914f5acf8bc65b24ccf406299a81a96519165a45260d98 super-release-darwin-aarch64.tar.gz
@@ -1 +1 @@
1
- b7430ac396103f018a65bc0faeab4ca2dc2ab00eb45bc42c10363ca1cd9f395a super-release-darwin-x86_64.tar.gz
1
+ 4297daede1e4c7cbd52275ee271de053dff63765de4034dbd33838a93d2550a1 super-release-darwin-x86_64.tar.gz
@@ -1 +1 @@
1
- 3e3e8955da3723c3ce65855b4475fb3b8b1d89c692eb163b518097ed38b77684 super-release-linux-aarch64.tar.gz
1
+ 924669f5db88d8b2dd3ca566cc6510b6c8748d3b0c2920c7405861a8e1ccd47c super-release-linux-aarch64.tar.gz
@@ -1 +1 @@
1
- 4b2e5c25b591f3d7c67052e7551a6bef11ac837ca7d39ceb2a5b9d3dff182f3b super-release-linux-x86_64-musl.tar.gz
1
+ a2d0c6fea728465a2d566e8259a3fbd9cf7b82f2310c3365c88a80da0e64f00e super-release-linux-x86_64-musl.tar.gz
@@ -1 +1 @@
1
- c9a3c4b2570041abda0cd87f8d105a3266073174bd3c8bb5c1eb05572065dc91 super-release-linux-x86_64.tar.gz
1
+ 6c72879cf4cdf7d55d62694a243043b8b6fd5e09bf23dd6eb4d82f315a4d3819 super-release-linux-x86_64.tar.gz
@@ -1 +1 @@
1
- F5A9B3DD4ADB0468842DCC39510A51AEDC397EBE9EBC612BDC77D60034EDDEBB
1
+ C385AA8C6D60D6D47207A27960B2884C600F7E0A55D7BAD32BFB972293D9F229
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { execFileSync } from "node:child_process";
3
+ import { spawnSync, execFileSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
  import { arch, platform } from "node:os";
6
6
  import { fileURLToPath } from "node:url";
@@ -26,40 +26,23 @@ function isMusl() {
26
26
  function getBinaryPath() {
27
27
  const os = platform() === "win32" ? "windows" : platform();
28
28
  const cpu = arch();
29
- const pkg = `super-release-${os}-${cpu}`;
29
+ const pkgName = `super-release-${os}-${cpu}`;
30
30
 
31
31
  try {
32
32
  if (os === "linux" && isMusl()) {
33
- return fileURLToPath(import.meta.resolve(`${pkg}/musl`));
33
+ return fileURLToPath(import.meta.resolve(`${pkgName}/musl`));
34
34
  }
35
- return fileURLToPath(import.meta.resolve(pkg));
35
+ return fileURLToPath(import.meta.resolve(pkgName));
36
36
  } catch {
37
37
  throw new Error(
38
- `Unsupported platform: ${os}-${cpu}. Install the platform-specific package "${pkg}" manually.`
38
+ `Unsupported platform: ${os}-${cpu}. Install the platform-specific package "${pkgName}" manually.`
39
39
  );
40
40
  }
41
41
  }
42
42
 
43
- const binPath = getBinaryPath();
43
+ const result = spawnSync(getBinaryPath(), process.argv.slice(2), {
44
+ stdio: "inherit",
45
+ env: { ...process.env, SUPER_RELEASE_VERSION: pkg.version },
46
+ });
44
47
 
45
- try {
46
- execFileSync(binPath, process.argv.slice(2), {
47
- stdio: "inherit",
48
- env: { ...process.env, SUPER_RELEASE_VERSION: pkg.version },
49
- });
50
- process.exit(0);
51
- } catch (err) {
52
- if (err.code === "ENOENT" || err.code === "EACCES") {
53
- console.error(
54
- `super-release: binary not found or not executable at ${binPath}`
55
- );
56
- console.error(err);
57
- } else if (err.status === null) {
58
- console.error(`super-release: failed to execute binary at ${binPath}`);
59
- console.error(
60
- `If running on Alpine/musl, ensure the musl build is being downloaded.`
61
- );
62
- console.error(err);
63
- }
64
- process.exit(err.status ?? 1);
65
- }
48
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "super-release",
3
3
  "type": "module",
4
- "version": "1.5.0",
4
+ "version": "1.5.2",
5
5
  "bin": {
6
6
  "super-release": "bin/super-release.js"
7
7
  },
@@ -30,11 +30,11 @@
30
30
  "url": "git+https://github.com/BowlingX/super-release.git"
31
31
  },
32
32
  "optionalDependencies": {
33
- "super-release-linux-x64": "1.3.0",
34
- "super-release-darwin-x64": "1.3.0",
35
- "super-release-darwin-arm64": "1.3.0",
36
- "super-release-windows-x64": "1.3.0",
37
- "super-release-linux-arm64": "1.3.0"
33
+ "super-release-linux-x64": "1.3.1",
34
+ "super-release-linux-arm64": "1.3.1",
35
+ "super-release-darwin-x64": "1.3.1",
36
+ "super-release-darwin-arm64": "1.3.1",
37
+ "super-release-windows-x64": "1.3.0"
38
38
  },
39
39
  "scripts": {
40
40
  "prepublish": "cp ../../README.md README.md",