super-release 1.5.0 → 1.5.1

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
+ c019857476ab0edc558044cd8ba0592389dc413bac2ff5fed3e35068aaa7a049 super-release-darwin-aarch64.tar.gz
@@ -1 +1 @@
1
- b7430ac396103f018a65bc0faeab4ca2dc2ab00eb45bc42c10363ca1cd9f395a super-release-darwin-x86_64.tar.gz
1
+ 950b975c569013d69fdad1a1eff42d10c06b4a9ebe86e526bfcc0304a142e422 super-release-darwin-x86_64.tar.gz
@@ -1 +1 @@
1
- 3e3e8955da3723c3ce65855b4475fb3b8b1d89c692eb163b518097ed38b77684 super-release-linux-aarch64.tar.gz
1
+ ba84621ae49a9e8c336150b024718c7f96b54adfe3ac5fe6f42806523e16c446 super-release-linux-aarch64.tar.gz
@@ -1 +1 @@
1
- 4b2e5c25b591f3d7c67052e7551a6bef11ac837ca7d39ceb2a5b9d3dff182f3b super-release-linux-x86_64-musl.tar.gz
1
+ 31c83305cfeb0c35cc26bc4916202f0183a8c516a24aa76e21046d5ad93d7883 super-release-linux-x86_64-musl.tar.gz
@@ -1 +1 @@
1
- c9a3c4b2570041abda0cd87f8d105a3266073174bd3c8bb5c1eb05572065dc91 super-release-linux-x86_64.tar.gz
1
+ 053e64ef93868d4053b686cd474d3d11e1c94077bcdf88c1e3080bb4354c5363 super-release-linux-x86_64.tar.gz
@@ -1 +1 @@
1
- F5A9B3DD4ADB0468842DCC39510A51AEDC397EBE9EBC612BDC77D60034EDDEBB
1
+ EF54D9244EAB2085F032C5E8B418C109B590B7F9AA7F72A3438716E41D1D74B7
@@ -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.1",
5
5
  "bin": {
6
6
  "super-release": "bin/super-release.js"
7
7
  },
@@ -31,10 +31,10 @@
31
31
  },
32
32
  "optionalDependencies": {
33
33
  "super-release-linux-x64": "1.3.0",
34
+ "super-release-linux-arm64": "1.3.0",
34
35
  "super-release-darwin-x64": "1.3.0",
35
36
  "super-release-darwin-arm64": "1.3.0",
36
- "super-release-windows-x64": "1.3.0",
37
- "super-release-linux-arm64": "1.3.0"
37
+ "super-release-windows-x64": "1.3.0"
38
38
  },
39
39
  "scripts": {
40
40
  "prepublish": "cp ../../README.md README.md",