@rspack/core 1.3.9 → 1.3.11

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.
@@ -1,2 +1,8 @@
1
+ import * as binding from "@rspack/binding";
1
2
  import type { CreatePartialRegisters } from "./types";
3
+ export declare class CodeGenerationResult {
4
+ #private;
5
+ constructor(result: binding.JsCodegenerationResult);
6
+ get(sourceType: string): string;
7
+ }
2
8
  export declare const createCompilationHooksRegisters: CreatePartialRegisters<`Compilation`>;
@@ -1,12 +1,11 @@
1
- import inspector from "node:inspector";
2
1
  export interface ChromeEvent {
3
2
  name: string;
4
3
  ph?: string;
5
4
  cat?: string;
6
5
  ts?: number;
7
- pid?: number;
8
- tid?: number;
9
- id?: number;
6
+ pid?: number | string;
7
+ tid?: number | string;
8
+ id?: number | string;
10
9
  args?: {
11
10
  [key: string]: any;
12
11
  };
@@ -20,8 +19,9 @@ export declare class JavaScriptTracer {
20
19
  static events: ChromeEvent[];
21
20
  static layer: string;
22
21
  static output: string;
23
- static session: inspector.Session;
24
- static initJavaScriptTrace(layer: string, output: string): void;
22
+ static session: import("node:inspector").Session;
23
+ static counter: number;
24
+ static initJavaScriptTrace(layer: string, output: string): Promise<void>;
25
25
  static initCpuProfiler(): void;
26
26
  static cleanupJavaScriptTrace(): Promise<void>;
27
27
  static getTs(): number;
@@ -0,0 +1,5 @@
1
+ import type { Compiler } from "../exports";
2
+ export declare class TraceHookPlugin {
3
+ name: string;
4
+ apply(compiler: Compiler): void;
5
+ }
package/dist/worker.js CHANGED
@@ -853,7 +853,7 @@ for(var __webpack_i__ in (()=>{
853
853
  await loadLoaderAsync(currentLoaderObject);
854
854
  let fn = currentLoaderObject.normal;
855
855
  currentLoaderObject.normalExecuted = !0, fn && (args1 = args, !(raw = !!currentLoaderObject.raw) && args1[0] instanceof Uint8Array ? args1[0] = function(buf) {
856
- let str = decoder.decode(buf);
856
+ let str = decoder.decode(buf.buffer instanceof SharedArrayBuffer ? Buffer.from(buf) : buf);
857
857
  return 0xfeff === str.charCodeAt(0) ? str.slice(1) : str;
858
858
  }(args1[0]) : raw && "string" == typeof args1[0] && (args1[0] = Buffer.from(args1[0], "utf-8")), raw && args1[0] instanceof Uint8Array && !Buffer.isBuffer(args1[0]) && (args1[0] = Buffer.from(args1[0].buffer)), args = await utils_runSyncOrAsync(fn, loaderContext, args) || []);
859
859
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "1.3.9",
3
+ "version": "1.3.11",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "@swc/core": "1.11.24",
41
41
  "@swc/types": "0.1.21",
42
- "@rslib/core": "0.6.8",
42
+ "@rslib/core": "0.7.0",
43
43
  "@types/graceful-fs": "4.1.9",
44
44
  "@types/watchpack": "^2.4.4",
45
45
  "@types/webpack-sources": "3.2.3",
@@ -58,8 +58,8 @@
58
58
  "dependencies": {
59
59
  "@module-federation/runtime-tools": "0.13.1",
60
60
  "@rspack/lite-tapable": "1.0.1",
61
- "caniuse-lite": "^1.0.30001717",
62
- "@rspack/binding": "1.3.9"
61
+ "caniuse-lite": "^1.0.30001718",
62
+ "@rspack/binding": "1.3.11"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@swc/helpers": ">=0.5.1"