@rspack/binding 1.2.3 → 1.2.4
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.
- package/binding.d.ts +32 -14
- package/package.json +14 -28
package/binding.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ export declare class JsChunkGraph {
|
|
|
78
78
|
getChunkModulesIterableBySourceType(chunk: JsChunk, sourceType: string): JsModule[]
|
|
79
79
|
getModuleChunks(module: JsModule): JsChunk[]
|
|
80
80
|
getModuleId(jsModule: JsModule): string | null
|
|
81
|
+
getModuleHash(module: JsModule, runtime: string | string[] | undefined): string | null
|
|
81
82
|
getBlockChunkGroup(jsBlock: JsDependenciesBlock): JsChunkGroup | null
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -148,6 +149,15 @@ export declare class JsCompilation {
|
|
|
148
149
|
addInclude(args: [string, RawDependency, JsEntryOptions | undefined][], callback: (errMsg: Error | null, results: [string | null, JsModule][]) => void): void
|
|
149
150
|
}
|
|
150
151
|
|
|
152
|
+
export declare class JsCompiler {
|
|
153
|
+
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory)
|
|
154
|
+
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
155
|
+
/** Build with the given option passed to the constructor */
|
|
156
|
+
build(callback: (err: null | Error) => void): void
|
|
157
|
+
/** Rebuild with the given option passed to the constructor */
|
|
158
|
+
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
159
|
+
}
|
|
160
|
+
|
|
151
161
|
export declare class JsContextModuleFactoryAfterResolveData {
|
|
152
162
|
get resource(): string
|
|
153
163
|
set resource(resource: string)
|
|
@@ -287,15 +297,6 @@ export declare class RawExternalItemFnCtx {
|
|
|
287
297
|
getResolver(): JsResolver
|
|
288
298
|
}
|
|
289
299
|
|
|
290
|
-
export declare class Rspack {
|
|
291
|
-
constructor(compilerPath: string, options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, intermediateFilesystem: ThreadsafeNodeFS | undefined | null, resolverFactoryReference: JsResolverFactory)
|
|
292
|
-
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
293
|
-
/** Build with the given option passed to the constructor */
|
|
294
|
-
build(callback: (err: null | Error) => void): void
|
|
295
|
-
/** Rebuild with the given option passed to the constructor */
|
|
296
|
-
rebuild(changed_files: string[], removed_files: string[], callback: (err: null | Error) => void): void
|
|
297
|
-
}
|
|
298
|
-
|
|
299
300
|
export interface BuiltinPlugin {
|
|
300
301
|
name: BuiltinPluginName
|
|
301
302
|
options: unknown
|
|
@@ -380,7 +381,8 @@ export declare enum BuiltinPluginName {
|
|
|
380
381
|
CssExtractRspackPlugin = 'CssExtractRspackPlugin',
|
|
381
382
|
RsdoctorPlugin = 'RsdoctorPlugin',
|
|
382
383
|
JsLoaderRspackPlugin = 'JsLoaderRspackPlugin',
|
|
383
|
-
LazyCompilationPlugin = 'LazyCompilationPlugin'
|
|
384
|
+
LazyCompilationPlugin = 'LazyCompilationPlugin',
|
|
385
|
+
SubresourceIntegrityPlugin = 'SubresourceIntegrityPlugin'
|
|
384
386
|
}
|
|
385
387
|
|
|
386
388
|
export declare function cleanupGlobalTrace(): void
|
|
@@ -534,8 +536,6 @@ export interface JsBuildMeta {
|
|
|
534
536
|
esm: boolean
|
|
535
537
|
exportsType: 'unset' | 'default' | 'namespace' | 'flagged' | 'dynamic'
|
|
536
538
|
defaultObject: 'false' | 'redirect' | JsBuildMetaDefaultObjectRedirectWarn
|
|
537
|
-
moduleArgument: 'module' | 'webpackModule'
|
|
538
|
-
exportsArgument: 'exports' | 'webpackExports'
|
|
539
539
|
sideEffectFree?: boolean
|
|
540
540
|
exportsFinalName?: Array<[string, string]> | undefined
|
|
541
541
|
}
|
|
@@ -1669,8 +1669,10 @@ export interface RawFlagAllModulesAsUsedPluginOptions {
|
|
|
1669
1669
|
export interface RawFuncUseCtx {
|
|
1670
1670
|
resource?: string
|
|
1671
1671
|
realResource?: string
|
|
1672
|
-
resourceQuery
|
|
1673
|
-
|
|
1672
|
+
resourceQuery: string
|
|
1673
|
+
resourceFragment: string
|
|
1674
|
+
issuer: string
|
|
1675
|
+
issuerLayer: string
|
|
1674
1676
|
}
|
|
1675
1677
|
|
|
1676
1678
|
export interface RawGeneratorOptions {
|
|
@@ -1755,6 +1757,15 @@ export interface RawInfo {
|
|
|
1755
1757
|
version?: string
|
|
1756
1758
|
}
|
|
1757
1759
|
|
|
1760
|
+
export interface RawIntegrityData {
|
|
1761
|
+
integerities: Array<RawIntegrityItem>
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
export interface RawIntegrityItem {
|
|
1765
|
+
asset: string
|
|
1766
|
+
integrity: string
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1758
1769
|
export interface RawJavascriptParserOptions {
|
|
1759
1770
|
dynamicImportMode?: string
|
|
1760
1771
|
dynamicImportPreload?: string
|
|
@@ -2211,6 +2222,7 @@ export interface RawSplitChunkSizes {
|
|
|
2211
2222
|
export interface RawSplitChunksOptions {
|
|
2212
2223
|
fallbackCacheGroup?: RawFallbackCacheGroupOptions
|
|
2213
2224
|
name?: string | false | Function
|
|
2225
|
+
filename?: JsFilename
|
|
2214
2226
|
cacheGroups?: Array<RawCacheGroupOptions>
|
|
2215
2227
|
/** What kind of chunks should be selected. */
|
|
2216
2228
|
chunks?: RegExp | 'async' | 'initial' | 'all' | Function
|
|
@@ -2238,6 +2250,12 @@ export interface RawStorageOptions {
|
|
|
2238
2250
|
directory: string
|
|
2239
2251
|
}
|
|
2240
2252
|
|
|
2253
|
+
export interface RawSubresourceIntegrityPluginOptions {
|
|
2254
|
+
integrityCallback?: (data: RawIntegrityData) => void
|
|
2255
|
+
hashFuncNames: Array<string>
|
|
2256
|
+
htmlPlugin: "JavaScript" | "Native" | "Disabled"
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2241
2259
|
export interface RawSwcJsMinimizerOptions {
|
|
2242
2260
|
compress: any
|
|
2243
2261
|
mangle: any
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -24,35 +24,21 @@
|
|
|
24
24
|
"binaryName": "rspack"
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@rspack/binding-darwin-arm64": "1.2.
|
|
28
|
-
"@rspack/binding-
|
|
29
|
-
"@rspack/binding-
|
|
30
|
-
"@rspack/binding-
|
|
31
|
-
"@rspack/binding-
|
|
32
|
-
"@rspack/binding-darwin-x64": "1.2.
|
|
33
|
-
"@rspack/binding-
|
|
34
|
-
"@rspack/binding-
|
|
35
|
-
"@rspack/binding-linux-x64-musl": "1.2.
|
|
27
|
+
"@rspack/binding-darwin-arm64": "1.2.4",
|
|
28
|
+
"@rspack/binding-win32-arm64-msvc": "1.2.4",
|
|
29
|
+
"@rspack/binding-linux-arm64-gnu": "1.2.4",
|
|
30
|
+
"@rspack/binding-linux-arm64-musl": "1.2.4",
|
|
31
|
+
"@rspack/binding-win32-ia32-msvc": "1.2.4",
|
|
32
|
+
"@rspack/binding-darwin-x64": "1.2.4",
|
|
33
|
+
"@rspack/binding-linux-x64-gnu": "1.2.4",
|
|
34
|
+
"@rspack/binding-win32-x64-msvc": "1.2.4",
|
|
35
|
+
"@rspack/binding-linux-x64-musl": "1.2.4"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
|
-
"build:
|
|
39
|
-
"
|
|
40
|
-
"build:
|
|
41
|
-
"build:
|
|
42
|
-
"build:release": "node scripts/build.js --release",
|
|
43
|
-
"watch:release": "node scripts/build.js --release --watch",
|
|
44
|
-
"build:release:arm64": "cross-env RUST_TARGET=aarch64-apple-darwin node scripts/build.js --release",
|
|
45
|
-
"build:release:x64": "cross-env RUST_TARGET=x86_64-apple-darwin node scripts/build.js --release",
|
|
46
|
-
"build:release:linux": "cross-env RUST_TARGET=x86_64-unknown-linux-gnu node scripts/build.js --release",
|
|
47
|
-
"build:release:musl": "cross-env RUST_TARGET=aarch64-unknown-linux-musl node scripts/build.js --release",
|
|
48
|
-
"build:release:win": "cross-env RUST_TARGET=x86_64-pc-windows-msvc node scripts/build.js --release",
|
|
49
|
-
"build:release-prod": "node scripts/build.js --release-prod",
|
|
50
|
-
"watch:release-prod": "node scripts/build.js --release-prod --watch",
|
|
51
|
-
"build:release-prod:arm64": "cross-env RUST_TARGET=aarch64-apple-darwin node scripts/build.js --release-prod",
|
|
52
|
-
"build:release-prod:x64": "cross-env RUST_TARGET=x86_64-apple-darwin node scripts/build.js --release-prod",
|
|
53
|
-
"build:release-prod:linux": "cross-env RUST_TARGET=x86_64-unknown-linux-gnu node scripts/build.js --release-prod",
|
|
54
|
-
"build:release-prod:win": "cross-env RUST_TARGET=x86_64-pc-windows-msvc node scripts/build.js --release-prod",
|
|
55
|
-
"build:release-debug": "node scripts/build.js --release-debug",
|
|
38
|
+
"build:dev": "node scripts/build.js",
|
|
39
|
+
"build:ci": "node scripts/build.js --profile ci",
|
|
40
|
+
"build:profiling": "node scripts/build.js --profile profiling",
|
|
41
|
+
"build:release": "node scripts/build.js --profile release",
|
|
56
42
|
"move-binding": "node scripts/move-binding",
|
|
57
43
|
"test": "tsc -p tsconfig.type-test.json"
|
|
58
44
|
}
|