@rspack/binding 1.5.8 → 1.6.0-beta.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.
Files changed (2) hide show
  1. package/napi-binding.d.ts +15 -2
  2. package/package.json +15 -15
package/napi-binding.d.ts CHANGED
@@ -321,7 +321,7 @@ export declare class JsCompilation {
321
321
  }
322
322
 
323
323
  export declare class JsCompiler {
324
- constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory)
324
+ constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, inputFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory, unsafeFastDrop: boolean)
325
325
  setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
326
326
  /** Build with the given option passed to the constructor */
327
327
  build(callback: (err: null | Error) => void): void
@@ -2087,6 +2087,10 @@ export interface RawEnvironment {
2087
2087
  dynamicImportInWorker?: boolean
2088
2088
  }
2089
2089
 
2090
+ export interface RawEsmLibraryPlugin {
2091
+ preserveModules?: string
2092
+ }
2093
+
2090
2094
  export interface RawEvalDevToolModulePluginOptions {
2091
2095
  namespace?: string
2092
2096
  moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string)
@@ -2101,7 +2105,6 @@ export interface RawExperimentCacheOptionsPersistent {
2101
2105
  }
2102
2106
 
2103
2107
  export interface RawExperiments {
2104
- layers: boolean
2105
2108
  topLevelAwait: boolean
2106
2109
  incremental?: false | { [key: string]: boolean }
2107
2110
  parallelCodeSplitting: boolean
@@ -2113,6 +2116,7 @@ inlineConst: boolean
2113
2116
  inlineEnum: boolean
2114
2117
  typeReexportsPresence: boolean
2115
2118
  lazyBarrel: boolean
2119
+ deferImport: boolean
2116
2120
  }
2117
2121
 
2118
2122
  export interface RawExperimentSnapshotOptions {
@@ -2349,6 +2353,7 @@ typeReexportsPresence?: string
2349
2353
  * @experimental
2350
2354
  */
2351
2355
  jsx?: boolean
2356
+ deferImport?: boolean
2352
2357
  }
2353
2358
 
2354
2359
  export interface RawJsonGeneratorOptions {
@@ -2452,6 +2457,7 @@ export interface RawModuleOptions {
2452
2457
  parser?: Record<string, RawParserOptions>
2453
2458
  generator?: Record<string, RawGeneratorOptions>
2454
2459
  noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[]
2460
+ unsafeCache?: boolean | RegExp
2455
2461
  }
2456
2462
 
2457
2463
  export interface RawModuleRule {
@@ -2489,6 +2495,8 @@ export interface RawModuleRule {
2489
2495
  rules?: Array<RawModuleRule>
2490
2496
  /** Specifies the category of the loader. No value means normal loader. */
2491
2497
  enforce?: 'pre' | 'post'
2498
+ /** Whether to extract source maps from the module. */
2499
+ extractSourceMap?: boolean
2492
2500
  }
2493
2501
 
2494
2502
  /**
@@ -2724,6 +2732,11 @@ export interface RawRslibPluginOptions {
2724
2732
  * @default `false`
2725
2733
  */
2726
2734
  compactExternalModuleDynamicImport?: boolean
2735
+ /**
2736
+ * Add shims for javascript/esm modules
2737
+ * @default `false`
2738
+ */
2739
+ forceNodeShims?: boolean
2727
2740
  }
2728
2741
 
2729
2742
  export interface RawRspackFuture {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.5.8",
3
+ "version": "1.6.0-beta.1",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -20,9 +20,9 @@
20
20
  "repository": "web-infra-dev/rspack",
21
21
  "devDependencies": {
22
22
  "@napi-rs/cli": "3.0.4",
23
- "@napi-rs/wasm-runtime": "^1.0.5",
23
+ "@napi-rs/wasm-runtime": "1.0.7",
24
24
  "emnapi": "^1.5.0",
25
- "typescript": "^5.9.2"
25
+ "typescript": "^5.9.3"
26
26
  },
27
27
  "napi": {
28
28
  "binaryName": "rspack",
@@ -51,16 +51,16 @@
51
51
  }
52
52
  },
53
53
  "optionalDependencies": {
54
- "@rspack/binding-darwin-arm64": "1.5.8",
55
- "@rspack/binding-linux-arm64-musl": "1.5.8",
56
- "@rspack/binding-win32-ia32-msvc": "1.5.8",
57
- "@rspack/binding-linux-arm64-gnu": "1.5.8",
58
- "@rspack/binding-wasm32-wasi": "1.5.8",
59
- "@rspack/binding-darwin-x64": "1.5.8",
60
- "@rspack/binding-win32-x64-msvc": "1.5.8",
61
- "@rspack/binding-win32-arm64-msvc": "1.5.8",
62
- "@rspack/binding-linux-x64-musl": "1.5.8",
63
- "@rspack/binding-linux-x64-gnu": "1.5.8"
54
+ "@rspack/binding-darwin-arm64": "1.6.0-beta.1",
55
+ "@rspack/binding-linux-arm64-musl": "1.6.0-beta.1",
56
+ "@rspack/binding-win32-ia32-msvc": "1.6.0-beta.1",
57
+ "@rspack/binding-wasm32-wasi": "1.6.0-beta.1",
58
+ "@rspack/binding-win32-arm64-msvc": "1.6.0-beta.1",
59
+ "@rspack/binding-darwin-x64": "1.6.0-beta.1",
60
+ "@rspack/binding-linux-arm64-gnu": "1.6.0-beta.1",
61
+ "@rspack/binding-win32-x64-msvc": "1.6.0-beta.1",
62
+ "@rspack/binding-linux-x64-gnu": "1.6.0-beta.1",
63
+ "@rspack/binding-linux-x64-musl": "1.6.0-beta.1"
64
64
  },
65
65
  "scripts": {
66
66
  "build:dev": "node scripts/build.js",
@@ -70,8 +70,8 @@
70
70
  "build:release": "node scripts/build.js --profile release",
71
71
  "build:dev:wasm": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads node scripts/build.js",
72
72
  "build:release:wasm": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads node scripts/build.js --profile release-wasi",
73
- "build:dev:browser": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads BROWSER=1 node scripts/build.js",
74
- "build:release:browser": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads BROWSER=1 node scripts/build.js --profile release-wasi",
73
+ "build:dev:browser": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads RSPACK_TARGET_BROWSER=1 node scripts/build.js",
74
+ "build:release:browser": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads RSPACK_TARGET_BROWSER=1 node scripts/build.js --profile release-wasi",
75
75
  "move-binding": "node scripts/move-binding",
76
76
  "test": "tsc -p tsconfig.type-test.json"
77
77
  }