From 445398c85b08bb70878285f7ff51354f8ce9a143 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 20 Dec 2024 17:27:40 +0800 Subject: [PATCH] chore(napi/build): disable dts cache of napi build (#8795) chore: disable dts cache of napi build --- crates/node_binding/package.json | 4 ++-- crates/node_binding/scripts/build.js | 9 +++++---- pnpm-lock.yaml | 14 +++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/crates/node_binding/package.json b/crates/node_binding/package.json index 8f1b5861ad8..1cf4e1970da 100644 --- a/crates/node_binding/package.json +++ b/crates/node_binding/package.json @@ -39,7 +39,7 @@ "bugs": "https://github.com/web-infra-dev/rspack/issues", "repository": "web-infra-dev/rspack", "devDependencies": { - "@napi-rs/cli": "3.0.0-alpha.64", + "@napi-rs/cli": "3.0.0-alpha.65", "typescript": "^5.7.2" }, "napi": { @@ -51,4 +51,4 @@ "@rspack/binding-linux-x64-gnu": "workspace:*", "@rspack/binding-win32-x64-msvc": "workspace:*" } -} \ No newline at end of file +} diff --git a/crates/node_binding/scripts/build.js b/crates/node_binding/scripts/build.js index d93e2f4950b..ca8d733962a 100644 --- a/crates/node_binding/scripts/build.js +++ b/crates/node_binding/scripts/build.js @@ -13,10 +13,10 @@ let releaseDebug = process.argv.includes("--release-debug"); let watch = process.argv.includes("--watch"); build().then((value) => { - // Regarding cargo's non-zero exit code as an error. - if (value !== CARGO_SAFELY_EXIT_CODE) { - process.exit(value) - } + // Regarding cargo's non-zero exit code as an error. + if (value !== CARGO_SAFELY_EXIT_CODE) { + process.exit(value) + } }).catch(err => { console.error(err); process.exit(1); @@ -32,6 +32,7 @@ async function build() { "--no-js", // "--no-const-enum", "--no-dts-header", + "--no-dts-cache", "--pipe", `"node ./scripts/dts-header.js"` ]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 113c2043d23..721ca9c108e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -111,8 +111,8 @@ importers: version: link:../../npm/win32-x64-msvc devDependencies: '@napi-rs/cli': - specifier: 3.0.0-alpha.64 - version: 3.0.0-alpha.64(@emnapi/runtime@1.3.1)(@types/node@20.12.7) + specifier: 3.0.0-alpha.65 + version: 3.0.0-alpha.65(@emnapi/runtime@1.3.1)(@types/node@20.12.7) typescript: specifier: ^5.7.2 version: 5.7.2 @@ -2156,8 +2156,8 @@ packages: engines: {node: '>= 10'} hasBin: true - '@napi-rs/cli@3.0.0-alpha.64': - resolution: {integrity: sha512-IYkNvh+SjFd4StEIJVsXa4paAeKakYG80GWTfX3PwpFlrX4fQZ7BkPR1IGWI17x5psz9MQvuEyicwjGWiHxI4A==} + '@napi-rs/cli@3.0.0-alpha.65': + resolution: {integrity: sha512-Ka6TnnqUt9kI+slxe91GCSzuvoDAtqXMkcQfpMdpdHrUWI4LaWiSsG2ChyTHJmN0Tu/fC1ISv8dFpfEDdqSjOg==} engines: {node: '>= 16'} hasBin: true peerDependencies: @@ -11177,7 +11177,7 @@ snapshots: '@napi-rs/cli@2.18.4': {} - '@napi-rs/cli@3.0.0-alpha.64(@emnapi/runtime@1.3.1)(@types/node@20.12.7)': + '@napi-rs/cli@3.0.0-alpha.65(@emnapi/runtime@1.3.1)(@types/node@20.12.7)': dependencies: '@inquirer/prompts': 7.0.1(@types/node@20.12.7) '@napi-rs/cross-toolchain': 0.0.16 @@ -11185,7 +11185,7 @@ snapshots: '@octokit/rest': 21.0.2 clipanion: 3.2.1(typanion@3.14.0) colorette: 2.0.20 - debug: 4.3.7 + debug: 4.4.0 js-yaml: 4.1.0 lodash-es: 4.17.21 semver: 7.6.3 @@ -11208,7 +11208,7 @@ snapshots: dependencies: '@napi-rs/lzma': 1.4.1 '@napi-rs/tar': 0.1.4 - debug: 4.3.7 + debug: 4.4.0 transitivePeerDependencies: - supports-color