super-release 1.4.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
- f56ba8935a455d102d6857ee1877153af2a0d6ec7cc80b8d32ae819cb0389b19 super-release-darwin-aarch64.tar.gz
1
+ c019857476ab0edc558044cd8ba0592389dc413bac2ff5fed3e35068aaa7a049 super-release-darwin-aarch64.tar.gz
@@ -1 +1 @@
1
- 0991f78976d7bb59868e5705c16b79267c0132cacd38711cd7981d2c8155e6a2 super-release-darwin-x86_64.tar.gz
1
+ 950b975c569013d69fdad1a1eff42d10c06b4a9ebe86e526bfcc0304a142e422 super-release-darwin-x86_64.tar.gz
@@ -1 +1 @@
1
- 8fccbed26a5d756f20f2ca3667150b98166ec109ad412ccb3aa7af010979915e super-release-linux-aarch64.tar.gz
1
+ ba84621ae49a9e8c336150b024718c7f96b54adfe3ac5fe6f42806523e16c446 super-release-linux-aarch64.tar.gz
@@ -1 +1 @@
1
- 0ba7f6997f392f6544ba4c867164a7c357cb599ed2a12cb992a73d38a12650d5 super-release-linux-x86_64-musl.tar.gz
1
+ 31c83305cfeb0c35cc26bc4916202f0183a8c516a24aa76e21046d5ad93d7883 super-release-linux-x86_64-musl.tar.gz
@@ -1 +1 @@
1
- 8d6acf0612494cbad0f5100fced69c620ee534d50377d6125da81c3d4359a4fb super-release-linux-x86_64.tar.gz
1
+ 053e64ef93868d4053b686cd474d3d11e1c94077bcdf88c1e3080bb4354c5363 super-release-linux-x86_64.tar.gz
@@ -1 +1 @@
1
- BA00724ABC4F0BC0E03F6B8E9CC08D7ECBEC7E2F262DA1FA19C7CA951A9794E2
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.4.0",
4
+ "version": "1.5.1",
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.2.0",
34
- "super-release-linux-arm64": "1.2.0",
35
- "super-release-darwin-x64": "1.2.0",
36
- "super-release-darwin-arm64": "1.2.0",
37
- "super-release-windows-x64": "1.2.0"
33
+ "super-release-linux-x64": "1.3.0",
34
+ "super-release-linux-arm64": "1.3.0",
35
+ "super-release-darwin-x64": "1.3.0",
36
+ "super-release-darwin-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",