@rspack/binding 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +48 -38
- package/package.json +17 -10
package/binding.d.ts
CHANGED
|
@@ -60,6 +60,16 @@ export class JsCompilation {
|
|
|
60
60
|
importModule(request: string, publicPath: string | undefined | null, baseUri: string | undefined | null, originalModule: string | undefined | null, originalModuleContext: string | undefined | null, callback: (...args: any[]) => any): void
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
export class JsResolver {
|
|
64
|
+
resolveSync(path: string, request: string): string | false
|
|
65
|
+
withOptions(raw?: RawResolveOptionsWithDependencyType | undefined | null): this
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class JsResolverFactory {
|
|
69
|
+
constructor()
|
|
70
|
+
get(type: string, options?: RawResolveOptionsWithDependencyType): JsResolver
|
|
71
|
+
}
|
|
72
|
+
|
|
63
73
|
export class JsStats {
|
|
64
74
|
getAssets(): JsStatsGetAssets
|
|
65
75
|
getModules(reasons: boolean, moduleAssets: boolean, nestedModules: boolean, source: boolean, usedExports: boolean, providedExports: boolean): Array<JsStatsModule>
|
|
@@ -73,7 +83,7 @@ export class JsStats {
|
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
export class Rspack {
|
|
76
|
-
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS)
|
|
86
|
+
constructor(options: RawOptions, builtinPlugins: Array<BuiltinPlugin>, registerJsTaps: RegisterJsTaps, outputFilesystem: ThreadsafeNodeFS, resolverFactoryReference: JsResolverFactory)
|
|
77
87
|
setNonSkippableRegisters(kinds: Array<RegisterJsTapKind>): void
|
|
78
88
|
/** Build with the given option passed to the constructor */
|
|
79
89
|
build(callback: (err: null | Error) => void): void
|
|
@@ -418,6 +428,7 @@ export interface JsModule {
|
|
|
418
428
|
userRequest?: string
|
|
419
429
|
rawRequest?: string
|
|
420
430
|
factoryMeta?: JsFactoryMeta
|
|
431
|
+
type: string
|
|
421
432
|
}
|
|
422
433
|
|
|
423
434
|
export interface JsNormalModuleFactoryCreateModuleArgs {
|
|
@@ -474,6 +485,8 @@ export interface JsRspackError {
|
|
|
474
485
|
message: string
|
|
475
486
|
moduleIdentifier?: string
|
|
476
487
|
file?: string
|
|
488
|
+
stack?: string
|
|
489
|
+
hideStack?: boolean
|
|
477
490
|
}
|
|
478
491
|
|
|
479
492
|
export enum JsRspackSeverity {
|
|
@@ -574,10 +587,16 @@ export interface JsStatsChunkGroupChildren {
|
|
|
574
587
|
|
|
575
588
|
export interface JsStatsError {
|
|
576
589
|
message: string
|
|
590
|
+
chunkName?: string
|
|
591
|
+
chunkEntry?: boolean
|
|
592
|
+
chunkInitial?: boolean
|
|
593
|
+
file?: string
|
|
577
594
|
moduleIdentifier?: string
|
|
578
595
|
moduleName?: string
|
|
579
596
|
moduleId?: string
|
|
580
|
-
|
|
597
|
+
chunkId?: string
|
|
598
|
+
details?: string
|
|
599
|
+
stack?: string
|
|
581
600
|
}
|
|
582
601
|
|
|
583
602
|
export interface JsStatsGetAssets {
|
|
@@ -750,10 +769,6 @@ export interface RawBannerPluginOptions {
|
|
|
750
769
|
exclude?: string | RegExp | (string | RegExp)[]
|
|
751
770
|
}
|
|
752
771
|
|
|
753
|
-
export interface RawBuiltins {
|
|
754
|
-
treeShaking: string
|
|
755
|
-
}
|
|
756
|
-
|
|
757
772
|
export interface RawBundlerInfoPluginOptions {
|
|
758
773
|
version: string
|
|
759
774
|
bundler: string
|
|
@@ -845,7 +860,7 @@ export interface RawCopyGlobOptions {
|
|
|
845
860
|
|
|
846
861
|
export interface RawCopyPattern {
|
|
847
862
|
from: string
|
|
848
|
-
to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string)
|
|
863
|
+
to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string | Promise<string>)
|
|
849
864
|
context?: string
|
|
850
865
|
toType?: string
|
|
851
866
|
noErrorOnMissing: boolean
|
|
@@ -1297,18 +1312,6 @@ export interface RawPathData {
|
|
|
1297
1312
|
url?: string
|
|
1298
1313
|
}
|
|
1299
1314
|
|
|
1300
|
-
export interface RawPluginImportConfig {
|
|
1301
|
-
libraryName: string
|
|
1302
|
-
libraryDirectory?: string
|
|
1303
|
-
customName?: string
|
|
1304
|
-
customStyleName?: string
|
|
1305
|
-
style?: RawStyleConfig
|
|
1306
|
-
camelToDashComponentName?: boolean
|
|
1307
|
-
transformToDefaultImport?: boolean
|
|
1308
|
-
ignoreEsComponent?: Array<string>
|
|
1309
|
-
ignoreStyleComponent?: Array<string>
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
1315
|
export interface RawProgressPluginOptions {
|
|
1313
1316
|
prefix: string
|
|
1314
1317
|
profile: boolean
|
|
@@ -1325,18 +1328,6 @@ export interface RawProvideOptions {
|
|
|
1325
1328
|
eager: boolean
|
|
1326
1329
|
}
|
|
1327
1330
|
|
|
1328
|
-
export interface RawReactOptions {
|
|
1329
|
-
runtime?: "automatic" | "classic"
|
|
1330
|
-
importSource?: string
|
|
1331
|
-
pragma?: string
|
|
1332
|
-
pragmaFrag?: string
|
|
1333
|
-
throwIfNamespace?: boolean
|
|
1334
|
-
development?: boolean
|
|
1335
|
-
useBuiltins?: boolean
|
|
1336
|
-
useSpread?: boolean
|
|
1337
|
-
refresh?: boolean
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
1331
|
export interface RawRegex {
|
|
1341
1332
|
source: string
|
|
1342
1333
|
flags: string
|
|
@@ -1376,6 +1367,32 @@ export interface RawResolveOptions {
|
|
|
1376
1367
|
roots?: Array<string>
|
|
1377
1368
|
}
|
|
1378
1369
|
|
|
1370
|
+
export interface RawResolveOptionsWithDependencyType {
|
|
1371
|
+
preferRelative?: boolean
|
|
1372
|
+
preferAbsolute?: boolean
|
|
1373
|
+
extensions?: Array<string>
|
|
1374
|
+
mainFiles?: Array<string>
|
|
1375
|
+
mainFields?: Array<string>
|
|
1376
|
+
conditionNames?: Array<string>
|
|
1377
|
+
alias?: Array<RawAliasOptionItem>
|
|
1378
|
+
fallback?: Array<RawAliasOptionItem>
|
|
1379
|
+
symlinks?: boolean
|
|
1380
|
+
tsconfig?: RawResolveTsconfigOptions
|
|
1381
|
+
modules?: Array<string>
|
|
1382
|
+
byDependency?: Record<string, RawResolveOptions>
|
|
1383
|
+
fullySpecified?: boolean
|
|
1384
|
+
exportsFields?: Array<string>
|
|
1385
|
+
descriptionFiles?: Array<string>
|
|
1386
|
+
enforceExtension?: boolean
|
|
1387
|
+
importsFields?: Array<string>
|
|
1388
|
+
extensionAlias?: Record<string, Array<string>>
|
|
1389
|
+
aliasFields?: Array<string>
|
|
1390
|
+
restrictions?: Array<string>
|
|
1391
|
+
roots?: Array<string>
|
|
1392
|
+
dependencyCategory?: string
|
|
1393
|
+
resolveToContext?: boolean
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1379
1396
|
export interface RawResolveTsconfigOptions {
|
|
1380
1397
|
configFile: string
|
|
1381
1398
|
referencesType: "auto" | "manual" | "disabled"
|
|
@@ -1463,13 +1480,6 @@ export interface RawStatsOptions {
|
|
|
1463
1480
|
colors: boolean
|
|
1464
1481
|
}
|
|
1465
1482
|
|
|
1466
|
-
export interface RawStyleConfig {
|
|
1467
|
-
styleLibraryDirectory?: string
|
|
1468
|
-
custom?: string
|
|
1469
|
-
css?: string
|
|
1470
|
-
bool?: boolean
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
1483
|
export interface RawSwcJsMinimizerRspackPluginOptions {
|
|
1474
1484
|
extractComments?: RawExtractComments
|
|
1475
1485
|
compress: any
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Node binding for rspack",
|
|
6
6
|
"main": "binding.js",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"binaryName": "rspack"
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@rspack/binding-darwin-arm64": "1.0.0-alpha.
|
|
27
|
-
"@rspack/binding-win32-arm64-msvc": "1.0.0-alpha.
|
|
28
|
-
"@rspack/binding-linux-arm64-
|
|
29
|
-
"@rspack/binding-linux-arm64-
|
|
30
|
-
"@rspack/binding-win32-ia32-msvc": "1.0.0-alpha.
|
|
31
|
-
"@rspack/binding-darwin-x64": "1.0.0-alpha.
|
|
32
|
-
"@rspack/binding-win32-x64-msvc": "1.0.0-alpha.
|
|
33
|
-
"@rspack/binding-linux-x64-
|
|
34
|
-
"@rspack/binding-linux-x64-
|
|
26
|
+
"@rspack/binding-darwin-arm64": "1.0.0-alpha.3",
|
|
27
|
+
"@rspack/binding-win32-arm64-msvc": "1.0.0-alpha.3",
|
|
28
|
+
"@rspack/binding-linux-arm64-gnu": "1.0.0-alpha.3",
|
|
29
|
+
"@rspack/binding-linux-arm64-musl": "1.0.0-alpha.3",
|
|
30
|
+
"@rspack/binding-win32-ia32-msvc": "1.0.0-alpha.3",
|
|
31
|
+
"@rspack/binding-darwin-x64": "1.0.0-alpha.3",
|
|
32
|
+
"@rspack/binding-win32-x64-msvc": "1.0.0-alpha.3",
|
|
33
|
+
"@rspack/binding-linux-x64-musl": "1.0.0-alpha.3",
|
|
34
|
+
"@rspack/binding-linux-x64-gnu": "1.0.0-alpha.3"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build:debug": "node scripts/build.js",
|
|
@@ -45,6 +45,13 @@
|
|
|
45
45
|
"build:release:x64": "cross-env RUST_TARGET=x86_64-apple-darwin node scripts/build.js --release",
|
|
46
46
|
"build:release:linux": "cross-env RUST_TARGET=x86_64-unknown-linux-gnu node scripts/build.js --release",
|
|
47
47
|
"build:release:win": "cross-env RUST_TARGET=x86_64-pc-windows-msvc node scripts/build.js --release",
|
|
48
|
+
"build:release-prod:all": "run-p build:release-prod:arm64 build:release-prod:x64 build:release-prod:linux && pnpm move-binding",
|
|
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",
|
|
48
55
|
"move-binding": "node scripts/move-binding",
|
|
49
56
|
"test": "tsc -p tsconfig.type-test.json"
|
|
50
57
|
}
|