super-release 1.2.0 → 1.3.0
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/bin/super-release-darwin-aarch64.tar.gz.sha256 +1 -0
- package/bin/super-release-darwin-x86_64.tar.gz.sha256 +1 -0
- package/bin/super-release-linux-aarch64.tar.gz.sha256 +1 -0
- package/bin/super-release-linux-x86_64-musl.tar.gz.sha256 +1 -0
- package/bin/super-release-linux-x86_64.tar.gz.sha256 +1 -0
- package/bin/super-release-windows-x86_64.zip.sha256 +1 -0
- package/bin/super-release.js +65 -0
- package/package.json +14 -6
- package/npm/bin/super-release-darwin-aarch64.tar.gz.sha256 +0 -1
- package/npm/bin/super-release-darwin-x86_64.tar.gz.sha256 +0 -1
- package/npm/bin/super-release-linux-aarch64.tar.gz.sha256 +0 -1
- package/npm/bin/super-release-linux-x86_64-musl.tar.gz.sha256 +0 -1
- package/npm/bin/super-release-linux-x86_64.tar.gz.sha256 +0 -1
- package/npm/bin/super-release-windows-x86_64.zip.sha256 +0 -1
- package/npm/bin/super-release.js +0 -151
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4a15f2b8c8846cab4a45549b130e8c379dd8760b687dbc9f5b19b1bde25ab0f4 super-release-darwin-aarch64.tar.gz
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5b52f0897b00898f2fd08e1db7f6675f60ad07a6ed3b6d747e5d712fcecfc5ec super-release-darwin-x86_64.tar.gz
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4963b48938a98bb09840e77f111dfbc09abda826d9bc0284ae5d93ccc602920a super-release-linux-aarch64.tar.gz
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b05bf073a81174f082fa4e98e2b99ace3ba40c2b69f45b44d348fd8816660698 super-release-linux-x86_64-musl.tar.gz
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
432e3ff9052838a964db9fa4f592af88a35a855f00e0477fefe4f1f94bffc8e1 super-release-linux-x86_64.tar.gz
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
E29B818C77CAF5B893758B54A1D9581BF536F269B72C21BFF1C2F13383D1CFE7
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from "node:child_process";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
import { arch, platform } from "node:os";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import pkg from "../../package.json" with { type: "json" };
|
|
8
|
+
|
|
9
|
+
function isMusl() {
|
|
10
|
+
try {
|
|
11
|
+
const result = execFileSync("ldd", ["--version"], {
|
|
12
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
13
|
+
});
|
|
14
|
+
return result.toString().includes("musl");
|
|
15
|
+
} catch (err) {
|
|
16
|
+
if (err.stderr && err.stderr.toString().includes("musl")) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return (
|
|
20
|
+
existsSync("/lib/ld-musl-x86_64.so.1") ||
|
|
21
|
+
existsSync("/lib/ld-musl-aarch64.so.1")
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getBinaryPath() {
|
|
27
|
+
const os = platform() === "win32" ? "windows" : platform();
|
|
28
|
+
const cpu = arch();
|
|
29
|
+
const pkg = `super-release-${os}-${cpu}`;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
if (os === "linux" && isMusl()) {
|
|
33
|
+
return fileURLToPath(import.meta.resolve(`${pkg}/musl`));
|
|
34
|
+
}
|
|
35
|
+
return fileURLToPath(import.meta.resolve(pkg));
|
|
36
|
+
} catch {
|
|
37
|
+
throw new Error(
|
|
38
|
+
`Unsupported platform: ${os}-${cpu}. Install the platform-specific package "${pkg}" manually.`
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const binPath = getBinaryPath();
|
|
44
|
+
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "super-release",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.3.0",
|
|
2
5
|
"bin": {
|
|
3
|
-
"super-release": "
|
|
6
|
+
"super-release": "bin/super-release.js"
|
|
4
7
|
},
|
|
5
8
|
"description": "A fast semantic-release alternative for monorepos, written in Rust",
|
|
6
9
|
"engines": {
|
|
7
10
|
"node": ">=20"
|
|
8
11
|
},
|
|
9
12
|
"files": [
|
|
10
|
-
"
|
|
13
|
+
"bin",
|
|
11
14
|
"README.md"
|
|
12
15
|
],
|
|
13
16
|
"keywords": [
|
|
@@ -18,7 +21,6 @@
|
|
|
18
21
|
"conventional-commits"
|
|
19
22
|
],
|
|
20
23
|
"license": "MIT",
|
|
21
|
-
"name": "super-release",
|
|
22
24
|
"publishConfig": {
|
|
23
25
|
"access": "public",
|
|
24
26
|
"provenance": true
|
|
@@ -27,9 +29,15 @@
|
|
|
27
29
|
"type": "git",
|
|
28
30
|
"url": "git+https://github.com/BowlingX/super-release.git"
|
|
29
31
|
},
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
+
"optionalDependencies": {
|
|
33
|
+
"super-release-linux-x64": "1.1.0",
|
|
34
|
+
"super-release-linux-arm64": "1.1.0",
|
|
35
|
+
"super-release-darwin-x64": "1.1.0",
|
|
36
|
+
"super-release-windows-x64": "1.1.0",
|
|
37
|
+
"super-release-darwin-arm64": "1.1.0"
|
|
38
|
+
},
|
|
32
39
|
"scripts": {
|
|
33
|
-
"
|
|
40
|
+
"prepublish": "cp ../../README.md README.md",
|
|
41
|
+
"super-release": "node bin/super-release.js"
|
|
34
42
|
}
|
|
35
43
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
71794d83631b0d1836e6890a5d0a3360085bb3e2aad37080774026d936e30d1a super-release-darwin-aarch64.tar.gz
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e853cd54e6a245b80fd8446afee4aaa81871af6ef6c415af108fee48a15979cb super-release-darwin-x86_64.tar.gz
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
455d0bb89c981360e22092d65dc2cf21011c55a827807495fd88f63ab0cb585f super-release-linux-aarch64.tar.gz
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
80c6c77119ee232a7b8138a358b86bb6317cd0ef358473d8f2e0c868f9d29511 super-release-linux-x86_64-musl.tar.gz
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b9a26668bbe4efbff75e9169afd9fd0f4f6c380d5d440a3d7f066a7bba776eb5 super-release-linux-x86_64.tar.gz
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
F2250B18DE1F400175D88C5E65A27B7CFE2CE287FF153122C8564BBA5BD0FECC
|
package/npm/bin/super-release.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execFileSync } from "node:child_process";
|
|
4
|
-
import {
|
|
5
|
-
existsSync,
|
|
6
|
-
mkdirSync,
|
|
7
|
-
createWriteStream,
|
|
8
|
-
readFileSync,
|
|
9
|
-
unlinkSync,
|
|
10
|
-
chmodSync,
|
|
11
|
-
} from "node:fs";
|
|
12
|
-
import { dirname, join } from "node:path";
|
|
13
|
-
import { platform, arch, tmpdir } from "node:os";
|
|
14
|
-
import { get } from "node:https";
|
|
15
|
-
import { pipeline } from "node:stream/promises";
|
|
16
|
-
import { fileURLToPath } from "node:url";
|
|
17
|
-
import pkg from "../../package.json" with { type: "json" };
|
|
18
|
-
|
|
19
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
20
|
-
const binPath = join(
|
|
21
|
-
__dirname,
|
|
22
|
-
platform() === "win32" ? "super-release.exe" : "super-release"
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
if (!existsSync(binPath)) {
|
|
26
|
-
await install();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
execFileSync(binPath, process.argv.slice(2), {
|
|
31
|
-
stdio: "inherit",
|
|
32
|
-
env: { ...process.env, SUPER_RELEASE_VERSION: pkg.version },
|
|
33
|
-
});
|
|
34
|
-
process.exit(0);
|
|
35
|
-
} catch (err) {
|
|
36
|
-
if (err.code === "ENOENT" || err.code === "EACCES") {
|
|
37
|
-
console.error(`super-release: binary not found or not executable at ${binPath}`);
|
|
38
|
-
console.error(err);
|
|
39
|
-
} else if (err.status === null) {
|
|
40
|
-
// No exit status = binary couldn't run at all (wrong libc, missing interpreter)
|
|
41
|
-
console.error(`super-release: failed to execute binary at ${binPath}`);
|
|
42
|
-
console.error(`If running on Alpine/musl, ensure the musl build is being downloaded.`);
|
|
43
|
-
console.error(err);
|
|
44
|
-
}
|
|
45
|
-
process.exit(err.status ?? 1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function isMusl() {
|
|
49
|
-
try {
|
|
50
|
-
// ldd --version outputs to stderr on musl and exits non-zero
|
|
51
|
-
const result = execFileSync("ldd", ["--version"], { stdio: ["pipe", "pipe", "pipe"] });
|
|
52
|
-
return result.toString().includes("musl");
|
|
53
|
-
} catch (err) {
|
|
54
|
-
// On musl, ldd exits with error but stderr contains "musl"
|
|
55
|
-
if (err.stderr && err.stderr.toString().includes("musl")) {
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
return existsSync("/lib/ld-musl-x86_64.so.1") || existsSync("/lib/ld-musl-aarch64.so.1");
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async function install() {
|
|
63
|
-
const REPO = "bowlingx/super-release";
|
|
64
|
-
const musl = platform() === "linux" && isMusl();
|
|
65
|
-
const PLATFORM_MAP = {
|
|
66
|
-
"linux-x64": musl ? "super-release-linux-x86_64-musl" : "super-release-linux-x86_64",
|
|
67
|
-
"linux-arm64": "super-release-linux-aarch64",
|
|
68
|
-
"darwin-x64": "super-release-darwin-x86_64",
|
|
69
|
-
"darwin-arm64": "super-release-darwin-aarch64",
|
|
70
|
-
"win32-x64": "super-release-windows-x86_64",
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const { version } = pkg;
|
|
74
|
-
const key = `${platform()}-${arch()}`;
|
|
75
|
-
const artifact = PLATFORM_MAP[key];
|
|
76
|
-
|
|
77
|
-
if (!artifact) {
|
|
78
|
-
console.error(
|
|
79
|
-
`Unsupported platform: ${key}. Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`
|
|
80
|
-
);
|
|
81
|
-
process.exit(1);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const isWindows = platform() === "win32";
|
|
85
|
-
const ext = isWindows ? "zip" : "tar.gz";
|
|
86
|
-
const url = `https://github.com/${REPO}/releases/download/v${version}/${artifact}.${ext}`;
|
|
87
|
-
console.error(`Downloading super-release v${version} for ${key}...`);
|
|
88
|
-
|
|
89
|
-
mkdirSync(__dirname, { recursive: true });
|
|
90
|
-
|
|
91
|
-
const tmpFile = join(tmpdir(), `super-release-${Date.now()}.${ext}`);
|
|
92
|
-
try {
|
|
93
|
-
const response = await download(url);
|
|
94
|
-
await pipeline(response, createWriteStream(tmpFile));
|
|
95
|
-
|
|
96
|
-
const hashFile = join(__dirname, `${artifact}.${ext}.sha256`);
|
|
97
|
-
if (existsSync(hashFile)) {
|
|
98
|
-
const expectedHash = readFileSync(hashFile, "utf8").trim().split(/\s+/)[0].toLowerCase();
|
|
99
|
-
const fileBuffer = readFileSync(tmpFile);
|
|
100
|
-
const hashBuffer = await crypto.subtle.digest("SHA-256", fileBuffer);
|
|
101
|
-
const actualHash = Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, "0")).join("");
|
|
102
|
-
if (actualHash !== expectedHash) {
|
|
103
|
-
console.error(`Hash mismatch for ${artifact}.${ext}!`);
|
|
104
|
-
console.error(` Expected: ${expectedHash}`);
|
|
105
|
-
console.error(` Actual: ${actualHash}`);
|
|
106
|
-
console.error(`This may indicate a tampered or corrupted download.`);
|
|
107
|
-
unlinkSync(tmpFile);
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
console.error(`Hash verified for ${artifact}.${ext}`);
|
|
111
|
-
} else {
|
|
112
|
-
console.error(`No hash file found at ${hashFile}, cannot verify download integrity.`);
|
|
113
|
-
unlinkSync(tmpFile);
|
|
114
|
-
process.exit(1);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (isWindows) {
|
|
118
|
-
execFileSync("powershell", ["-Command", `Expand-Archive -Path '${tmpFile}' -DestinationPath '${__dirname}' -Force`], { stdio: "ignore" });
|
|
119
|
-
} else {
|
|
120
|
-
execFileSync("tar", ["xzf", tmpFile, "-C", __dirname], { stdio: "ignore" });
|
|
121
|
-
chmodSync(binPath, 0o755);
|
|
122
|
-
}
|
|
123
|
-
unlinkSync(tmpFile);
|
|
124
|
-
console.error(`Installed super-release v${version}`);
|
|
125
|
-
} catch (err) {
|
|
126
|
-
console.error(`Failed to install super-release: ${err.message}`);
|
|
127
|
-
console.error(
|
|
128
|
-
`Install manually from: https://github.com/${REPO}/releases/tag/v${version}`
|
|
129
|
-
);
|
|
130
|
-
process.exit(1);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function download(url) {
|
|
135
|
-
return new Promise((resolve, reject) => {
|
|
136
|
-
get(url, (res) => {
|
|
137
|
-
if (
|
|
138
|
-
res.statusCode >= 300 &&
|
|
139
|
-
res.statusCode < 400 &&
|
|
140
|
-
res.headers.location
|
|
141
|
-
) {
|
|
142
|
-
return download(res.headers.location).then(resolve, reject);
|
|
143
|
-
}
|
|
144
|
-
if (res.statusCode !== 200) {
|
|
145
|
-
reject(new Error(`Download failed: HTTP ${res.statusCode}`));
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
resolve(res);
|
|
149
|
-
}).on("error", reject);
|
|
150
|
-
});
|
|
151
|
-
}
|