@rspack/binding 1.1.3 → 1.1.5

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/binding.d.ts +17 -3
  2. package/package.json +10 -10
package/binding.d.ts CHANGED
@@ -47,7 +47,7 @@ export declare class EntryOptionsDto {
47
47
  export type EntryOptionsDTO = EntryOptionsDto
48
48
 
49
49
  export declare class JsCompilation {
50
- updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSource) => JsCompatSource), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void
50
+ updateAsset(filename: string, newSourceOrFunction: JsCompatSource | ((source: JsCompatSourceOwned) => JsCompatSourceOwned), assetInfoUpdateOrFunction?: JsAssetInfo | ((assetInfo: JsAssetInfo) => JsAssetInfo)): void
51
51
  getAssets(): Readonly<JsAsset>[]
52
52
  getAsset(name: string): JsAsset | null
53
53
  getAssetSource(name: string): JsCompatSource | null
@@ -526,11 +526,23 @@ export interface JsCodegenerationResults {
526
526
  map: Record<string, Record<string, JsCodegenerationResult>>
527
527
  }
528
528
 
529
+ /**
530
+ * Zero copy `JsCompatSource` slice shared between Rust and Node.js if buffer is used.
531
+ *
532
+ * It can only be used in non-async context and the lifetime is bound to the fn closure.
533
+ *
534
+ * If you want to use Node.js Buffer in async context or want to extend the lifetime, use `JsCompatSourceOwned` instead.
535
+ */
529
536
  export interface JsCompatSource {
530
537
  source: string | Buffer
531
538
  map?: string
532
539
  }
533
540
 
541
+ export interface JsCompatSourceOwned {
542
+ source: string | Buffer
543
+ map?: string
544
+ }
545
+
534
546
  export interface JsCreateData {
535
547
  request: string
536
548
  userRequest: string
@@ -781,7 +793,7 @@ export interface JsRuntimeGlobals {
781
793
  }
782
794
 
783
795
  export interface JsRuntimeModule {
784
- source?: JsCompatSource
796
+ source?: JsCompatSourceOwned
785
797
  moduleIdentifier: string
786
798
  constructorName: string
787
799
  name: string
@@ -1335,6 +1347,7 @@ export interface RawEntryDynamicResult {
1335
1347
  export interface RawEnvironment {
1336
1348
  const?: boolean
1337
1349
  arrowFunction?: boolean
1350
+ nodePrefixForCoreModules?: boolean
1338
1351
  }
1339
1352
 
1340
1353
  export interface RawEvalDevToolModulePluginOptions {
@@ -1456,6 +1469,7 @@ export interface RawHtmlRspackPluginOptions {
1456
1469
  /** entry_chunk_name (only entry chunks are supported) */
1457
1470
  chunks?: Array<string>
1458
1471
  excludeChunks?: Array<string>
1472
+ chunksSortMode: "auto" | "manual"
1459
1473
  sri?: "sha256" | "sha384" | "sha512"
1460
1474
  minify?: boolean
1461
1475
  title?: string
@@ -1722,6 +1736,7 @@ export interface RawOptions {
1722
1736
  experiments: RawExperiments
1723
1737
  node?: RawNodeOption
1724
1738
  profile: boolean
1739
+ amd?: string
1725
1740
  bail: boolean
1726
1741
  __references: Record<string, any>
1727
1742
  }
@@ -1740,7 +1755,6 @@ export interface RawOutputOptions {
1740
1755
  crossOriginLoading: RawCrossOriginLoading
1741
1756
  cssFilename: JsFilename
1742
1757
  cssChunkFilename: JsFilename
1743
- cssHeadDataCompression: boolean
1744
1758
  hotUpdateMainFilename: string
1745
1759
  hotUpdateChunkFilename: string
1746
1760
  hotUpdateGlobal: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -24,15 +24,15 @@
24
24
  "binaryName": "rspack"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@rspack/binding-win32-arm64-msvc": "1.1.3",
28
- "@rspack/binding-linux-arm64-gnu": "1.1.3",
29
- "@rspack/binding-darwin-arm64": "1.1.3",
30
- "@rspack/binding-linux-arm64-musl": "1.1.3",
31
- "@rspack/binding-win32-ia32-msvc": "1.1.3",
32
- "@rspack/binding-darwin-x64": "1.1.3",
33
- "@rspack/binding-win32-x64-msvc": "1.1.3",
34
- "@rspack/binding-linux-x64-gnu": "1.1.3",
35
- "@rspack/binding-linux-x64-musl": "1.1.3"
27
+ "@rspack/binding-darwin-arm64": "1.1.5",
28
+ "@rspack/binding-win32-arm64-msvc": "1.1.5",
29
+ "@rspack/binding-linux-arm64-musl": "1.1.5",
30
+ "@rspack/binding-linux-arm64-gnu": "1.1.5",
31
+ "@rspack/binding-win32-ia32-msvc": "1.1.5",
32
+ "@rspack/binding-darwin-x64": "1.1.5",
33
+ "@rspack/binding-linux-x64-gnu": "1.1.5",
34
+ "@rspack/binding-linux-x64-musl": "1.1.5",
35
+ "@rspack/binding-win32-x64-msvc": "1.1.5"
36
36
  },
37
37
  "scripts": {
38
38
  "build:debug": "node scripts/build.js",