diff --git a/packages/next-swc/crates/napi/npm/linux-arm64-gnu/install.js b/packages/next-swc/crates/napi/npm/linux-arm64-gnu/install.js new file mode 100644 index 0000000000000..296ba2215f890 --- /dev/null +++ b/packages/next-swc/crates/napi/npm/linux-arm64-gnu/install.js @@ -0,0 +1,2 @@ +const { glibcVersionRuntime } = process.report.getReport().header; +process.exit(glibcVersionRuntime ? 0 : 1); \ No newline at end of file diff --git a/packages/next-swc/crates/napi/npm/linux-arm64-gnu/package.json b/packages/next-swc/crates/napi/npm/linux-arm64-gnu/package.json index eb097c5a75d50..ef8c28f7a8c65 100644 --- a/packages/next-swc/crates/napi/npm/linux-arm64-gnu/package.json +++ b/packages/next-swc/crates/napi/npm/linux-arm64-gnu/package.json @@ -9,8 +9,12 @@ ], "main": "next-swc.linux-arm64-gnu.node", "files": [ - "next-swc.linux-arm64-gnu.node" + "next-swc.linux-arm64-gnu.node", + "install.js" ], + "scripts": { + "install": "node install.js" + }, "license": "MIT", "engines": { "node": ">= 10" diff --git a/packages/next-swc/crates/napi/npm/linux-arm64-musl/install.js b/packages/next-swc/crates/napi/npm/linux-arm64-musl/install.js new file mode 100644 index 0000000000000..3cc50b7e18eda --- /dev/null +++ b/packages/next-swc/crates/napi/npm/linux-arm64-musl/install.js @@ -0,0 +1,2 @@ +const { glibcVersionRuntime } = process.report.getReport().header; +process.exit(glibcVersionRuntime ? 1 : 0); \ No newline at end of file diff --git a/packages/next-swc/crates/napi/npm/linux-arm64-musl/package.json b/packages/next-swc/crates/napi/npm/linux-arm64-musl/package.json index ac0d638a6e482..e27020587cea4 100644 --- a/packages/next-swc/crates/napi/npm/linux-arm64-musl/package.json +++ b/packages/next-swc/crates/napi/npm/linux-arm64-musl/package.json @@ -9,8 +9,12 @@ ], "main": "next-swc.linux-arm64-musl.node", "files": [ - "next-swc.linux-arm64-musl.node" + "next-swc.linux-arm64-musl.node", + "install.js" ], + "scripts": { + "install": "node install.js" + }, "license": "MIT", "engines": { "node": ">= 10" diff --git a/packages/next-swc/crates/napi/npm/linux-x64-gnu/install.js b/packages/next-swc/crates/napi/npm/linux-x64-gnu/install.js new file mode 100644 index 0000000000000..296ba2215f890 --- /dev/null +++ b/packages/next-swc/crates/napi/npm/linux-x64-gnu/install.js @@ -0,0 +1,2 @@ +const { glibcVersionRuntime } = process.report.getReport().header; +process.exit(glibcVersionRuntime ? 0 : 1); \ No newline at end of file diff --git a/packages/next-swc/crates/napi/npm/linux-x64-gnu/package.json b/packages/next-swc/crates/napi/npm/linux-x64-gnu/package.json index 07f4f9f039d19..70fb20fa9bd6e 100644 --- a/packages/next-swc/crates/napi/npm/linux-x64-gnu/package.json +++ b/packages/next-swc/crates/napi/npm/linux-x64-gnu/package.json @@ -9,8 +9,12 @@ ], "main": "next-swc.linux-x64-gnu.node", "files": [ - "next-swc.linux-x64-gnu.node" + "next-swc.linux-x64-gnu.node", + "install.js" ], + "scripts": { + "install": "node install.js" + }, "license": "MIT", "engines": { "node": ">= 10" diff --git a/packages/next-swc/crates/napi/npm/linux-x64-musl/install.js b/packages/next-swc/crates/napi/npm/linux-x64-musl/install.js new file mode 100644 index 0000000000000..3cc50b7e18eda --- /dev/null +++ b/packages/next-swc/crates/napi/npm/linux-x64-musl/install.js @@ -0,0 +1,2 @@ +const { glibcVersionRuntime } = process.report.getReport().header; +process.exit(glibcVersionRuntime ? 1 : 0); \ No newline at end of file diff --git a/packages/next-swc/crates/napi/npm/linux-x64-musl/package.json b/packages/next-swc/crates/napi/npm/linux-x64-musl/package.json index 031a573ed3f9f..e4cfdba4ee1a7 100644 --- a/packages/next-swc/crates/napi/npm/linux-x64-musl/package.json +++ b/packages/next-swc/crates/napi/npm/linux-x64-musl/package.json @@ -9,8 +9,12 @@ ], "main": "next-swc.linux-x64-musl.node", "files": [ - "next-swc.linux-x64-musl.node" + "next-swc.linux-x64-musl.node", + "install.js" ], + "scripts": { + "install": "node install.js" + }, "license": "MIT", "engines": { "node": ">= 10"