@rspack/binding 0.0.22 → 0.0.24
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/LICENSE +2 -1
- package/README.md +16 -0
- package/binding.d.ts +176 -120
- package/binding.js +2 -1
- package/package.json +9 -8
package/LICENSE
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022-present
|
|
3
|
+
Copyright (c) 2022-present Bytedance, Inc. and its affiliates.
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://lf3-static.bytednsdoc.com/obj/eden-cn/rjhwzy/ljhwZthlaukjlkulzlp/rspack-banner-1610-dark.png">
|
|
3
|
+
<img alt="Rspack Banner" src="https://lf3-static.bytednsdoc.com/obj/eden-cn/rjhwzy/ljhwZthlaukjlkulzlp/rspack-banner-1610.png">
|
|
4
|
+
</picture>
|
|
5
|
+
|
|
6
|
+
# @rspack/binding
|
|
7
|
+
|
|
8
|
+
Node binding for rspack.
|
|
9
|
+
|
|
10
|
+
## Documentation
|
|
11
|
+
|
|
12
|
+
See [https://rspack.org](https://rspack.org) for details.
|
|
13
|
+
|
|
14
|
+
## License
|
|
15
|
+
|
|
16
|
+
Rspack is [MIT licensed](https://github.com/modern-js-dev/rspack/blob/main/LICENSE).
|
package/binding.d.ts
CHANGED
|
@@ -3,53 +3,73 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
+
export interface RawPattern {
|
|
7
|
+
from: string
|
|
8
|
+
to?: string
|
|
9
|
+
context?: string
|
|
10
|
+
toType?: string
|
|
11
|
+
noErrorOnMissing: boolean
|
|
12
|
+
force: boolean
|
|
13
|
+
priority: number
|
|
14
|
+
globOptions: RawGlobOptions
|
|
15
|
+
}
|
|
16
|
+
export interface RawGlobOptions {
|
|
17
|
+
caseSensitiveMatch?: boolean
|
|
18
|
+
dot?: boolean
|
|
19
|
+
}
|
|
20
|
+
export interface RawCopyConfig {
|
|
21
|
+
patterns: Array<RawPattern>
|
|
22
|
+
}
|
|
6
23
|
export interface RawCssPluginConfig {
|
|
7
|
-
|
|
8
|
-
* ## Example
|
|
9
|
-
* ```rust,ignore
|
|
10
|
-
* RawCssOptions {
|
|
11
|
-
* preset_env: vec!["Firefox > 10".into(), "chrome >=20".into()],
|
|
12
|
-
* }
|
|
13
|
-
* ```
|
|
14
|
-
* The preset_env will finally pass into [`browserslist::resolve`](https://docs.rs/browserslist-rs/latest/browserslist/fn.resolve.html).
|
|
15
|
-
* For detailed configuration, see https://docs.rs/browserslist-rs/latest/browserslist/
|
|
16
|
-
*/
|
|
17
|
-
presetEnv?: Array<string>
|
|
18
|
-
modules?: RawCssModulesConfig
|
|
24
|
+
modules: RawCssModulesConfig
|
|
19
25
|
}
|
|
20
26
|
export interface RawCssModulesConfig {
|
|
21
|
-
localsConvention
|
|
22
|
-
localIdentName
|
|
23
|
-
exportsOnly
|
|
27
|
+
localsConvention: "asIs" | "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly"
|
|
28
|
+
localIdentName: string
|
|
29
|
+
exportsOnly: boolean
|
|
24
30
|
}
|
|
25
31
|
export interface RawDecoratorOptions {
|
|
26
32
|
legacy: boolean
|
|
27
33
|
emitMetadata: boolean
|
|
28
34
|
}
|
|
29
|
-
/**
|
|
30
|
-
* It seems napi not support enum well
|
|
31
|
-
*/
|
|
32
35
|
export interface RawHtmlPluginConfig {
|
|
33
36
|
/** emitted file name in output path */
|
|
34
|
-
filename?: string
|
|
37
|
+
filename?: string
|
|
35
38
|
/** template html file */
|
|
36
39
|
template?: string
|
|
37
40
|
templateParameters?: Record<string, string>
|
|
38
41
|
/** `head`, `body` or None */
|
|
39
|
-
inject?:
|
|
42
|
+
inject?: "head" | "body"
|
|
40
43
|
/** path or `auto` */
|
|
41
44
|
publicPath?: string
|
|
42
45
|
/** `blocking`, `defer`, or `module` */
|
|
43
|
-
scriptLoading?:
|
|
46
|
+
scriptLoading?: "blocking" | "defer" | "module"
|
|
44
47
|
/** entry_chunk_name (only entry chunks are supported) */
|
|
45
48
|
chunks?: Array<string>
|
|
46
49
|
excludedChunks?: Array<string>
|
|
47
|
-
sri?:
|
|
50
|
+
sri?: "sha256" | "sha384" | "sha512"
|
|
48
51
|
minify?: boolean
|
|
49
52
|
title?: string
|
|
50
53
|
favicon?: string
|
|
51
54
|
meta?: Record<string, Record<string, string>>
|
|
52
55
|
}
|
|
56
|
+
export interface RawStyleConfig {
|
|
57
|
+
styleLibraryDirectory?: string
|
|
58
|
+
custom?: string
|
|
59
|
+
css?: string
|
|
60
|
+
bool?: boolean
|
|
61
|
+
}
|
|
62
|
+
export interface RawPluginImportConfig {
|
|
63
|
+
libraryName: string
|
|
64
|
+
libraryDirectory?: string
|
|
65
|
+
customName?: string
|
|
66
|
+
customStyleName?: string
|
|
67
|
+
style?: RawStyleConfig
|
|
68
|
+
camelToDashComponentName?: boolean
|
|
69
|
+
transformToDefaultImport?: boolean
|
|
70
|
+
ignoreEsComponent?: Array<string>
|
|
71
|
+
ignoreStyleComponent?: Array<string>
|
|
72
|
+
}
|
|
53
73
|
export interface RawPostCssConfig {
|
|
54
74
|
pxtorem?: RawPxToRemConfig
|
|
55
75
|
}
|
|
@@ -66,7 +86,7 @@ export interface RawProgressPluginConfig {
|
|
|
66
86
|
prefix?: string
|
|
67
87
|
}
|
|
68
88
|
export interface RawReactOptions {
|
|
69
|
-
runtime?:
|
|
89
|
+
runtime?: "automatic" | "classic"
|
|
70
90
|
importSource?: string
|
|
71
91
|
pragma?: string
|
|
72
92
|
pragmaFrag?: string
|
|
@@ -76,27 +96,37 @@ export interface RawReactOptions {
|
|
|
76
96
|
useSpread?: boolean
|
|
77
97
|
refresh?: boolean
|
|
78
98
|
}
|
|
79
|
-
export interface
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
99
|
+
export interface RawRelayConfig {
|
|
100
|
+
artifactDirectory?: string
|
|
101
|
+
language: 'javascript' | 'typescript' | 'flow'
|
|
102
|
+
}
|
|
103
|
+
export interface RawMinification {
|
|
104
|
+
passes: number
|
|
105
|
+
dropConsole: boolean
|
|
106
|
+
pureFuncs: Array<string>
|
|
107
|
+
}
|
|
108
|
+
export interface RawPresetEnv {
|
|
109
|
+
targets: Array<string>
|
|
110
|
+
mode?: 'usage' | 'entry'
|
|
111
|
+
coreJs?: string
|
|
84
112
|
}
|
|
85
113
|
export interface RawBuiltins {
|
|
86
114
|
html?: Array<RawHtmlPluginConfig>
|
|
87
115
|
css?: RawCssPluginConfig
|
|
88
116
|
postcss?: RawPostCssConfig
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
treeShaking?: boolean
|
|
94
|
-
sideEffects?: boolean
|
|
117
|
+
minifyOptions?: RawMinification
|
|
118
|
+
presetEnv?: RawPresetEnv
|
|
119
|
+
define: Record<string, string>
|
|
120
|
+
treeShaking: boolean
|
|
95
121
|
progress?: RawProgressPluginConfig
|
|
96
|
-
react
|
|
122
|
+
react: RawReactOptions
|
|
97
123
|
decorator?: RawDecoratorOptions
|
|
98
|
-
noEmitAssets
|
|
124
|
+
noEmitAssets: boolean
|
|
99
125
|
emotion?: string
|
|
126
|
+
devFriendlySplitChunks: boolean
|
|
127
|
+
copy?: RawCopyConfig
|
|
128
|
+
pluginImport?: Array<RawPluginImportConfig>
|
|
129
|
+
relay?: RawRelayConfig
|
|
100
130
|
}
|
|
101
131
|
export interface RawCacheOptions {
|
|
102
132
|
type: string
|
|
@@ -110,7 +140,7 @@ export interface RawCacheOptions {
|
|
|
110
140
|
version: string
|
|
111
141
|
}
|
|
112
142
|
export interface RawDevServer {
|
|
113
|
-
hot
|
|
143
|
+
hot: boolean
|
|
114
144
|
}
|
|
115
145
|
export interface RawEntryItem {
|
|
116
146
|
import: Array<string>
|
|
@@ -118,7 +148,7 @@ export interface RawEntryItem {
|
|
|
118
148
|
}
|
|
119
149
|
export interface RawExperiments {
|
|
120
150
|
lazyCompilation: boolean
|
|
121
|
-
|
|
151
|
+
incrementalRebuild: boolean
|
|
122
152
|
}
|
|
123
153
|
/**
|
|
124
154
|
* `loader` is for js side loader, `builtin_loader` is for rust side loader,
|
|
@@ -132,51 +162,44 @@ export interface RawExperiments {
|
|
|
132
162
|
* `builtin_loader`.
|
|
133
163
|
*/
|
|
134
164
|
export interface RawModuleRuleUse {
|
|
135
|
-
|
|
165
|
+
jsLoader?: JsLoader
|
|
136
166
|
builtinLoader?: string
|
|
137
167
|
options?: string
|
|
138
|
-
loaderName?: string
|
|
139
168
|
}
|
|
140
|
-
export interface
|
|
141
|
-
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
* Based on the condition type, the value can be either a `string` or `Regexp`.
|
|
145
|
-
* - "string": The value will be matched against the string.
|
|
146
|
-
* - "regexp": The value will be matched against the raw regexp source from JS side.
|
|
147
|
-
*/
|
|
148
|
-
matcher?: string
|
|
169
|
+
export interface JsLoader {
|
|
170
|
+
/** composed loader name, xx-loader!yy-loader!zz-loader */
|
|
171
|
+
name: string
|
|
172
|
+
func: (...args: any[]) => any
|
|
149
173
|
}
|
|
150
|
-
export interface
|
|
151
|
-
|
|
174
|
+
export interface RawRuleSetCondition {
|
|
175
|
+
type: "string" | "regexp" | "logical" | "array"
|
|
176
|
+
stringMatcher?: string
|
|
177
|
+
regexpMatcher?: string
|
|
178
|
+
logicalMatcher?: Array<RawRuleSetLogicalConditions>
|
|
179
|
+
arrayMatcher?: Array<RawRuleSetCondition>
|
|
180
|
+
}
|
|
181
|
+
export interface RawRuleSetLogicalConditions {
|
|
182
|
+
and?: Array<RawRuleSetCondition>
|
|
183
|
+
or?: Array<RawRuleSetCondition>
|
|
184
|
+
not?: RawRuleSetCondition
|
|
152
185
|
}
|
|
153
186
|
export interface RawModuleRule {
|
|
154
|
-
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* A condition matcher matching an absolute path.
|
|
164
|
-
* See `test` above
|
|
165
|
-
*/
|
|
166
|
-
resource?: RawModuleRuleCondition
|
|
167
|
-
/**
|
|
168
|
-
* A condition matcher against the resource query.
|
|
169
|
-
* TODO: align with webpack's `?` prefixed `resourceQuery`
|
|
170
|
-
*/
|
|
171
|
-
resourceQuery?: RawModuleRuleCondition
|
|
187
|
+
/** A condition matcher matching an absolute path. */
|
|
188
|
+
test?: RawRuleSetCondition
|
|
189
|
+
include?: RawRuleSetCondition
|
|
190
|
+
exclude?: RawRuleSetCondition
|
|
191
|
+
/** A condition matcher matching an absolute path. */
|
|
192
|
+
resource?: RawRuleSetCondition
|
|
193
|
+
/** A condition matcher against the resource query. */
|
|
194
|
+
resourceQuery?: RawRuleSetCondition
|
|
172
195
|
sideEffects?: boolean
|
|
173
196
|
use?: Array<RawModuleRuleUse>
|
|
174
|
-
type?:
|
|
197
|
+
type?: string
|
|
175
198
|
parser?: RawModuleRuleParser
|
|
176
199
|
generator?: RawModuleRuleGenerator
|
|
177
200
|
resolve?: RawResolveOptions
|
|
178
|
-
issuer?:
|
|
179
|
-
|
|
201
|
+
issuer?: RawRuleSetCondition
|
|
202
|
+
oneOf?: Array<RawModuleRule>
|
|
180
203
|
}
|
|
181
204
|
export interface RawModuleRuleGenerator {
|
|
182
205
|
filename?: string
|
|
@@ -222,24 +245,38 @@ export interface JsLoaderResult {
|
|
|
222
245
|
cacheable: boolean
|
|
223
246
|
}
|
|
224
247
|
export interface RawNodeOption {
|
|
225
|
-
dirname
|
|
248
|
+
dirname: string
|
|
249
|
+
global: string
|
|
226
250
|
}
|
|
227
251
|
export interface RawOptimizationOptions {
|
|
228
252
|
splitChunks?: RawSplitChunksOptions
|
|
229
|
-
moduleIds
|
|
230
|
-
removeAvailableModules
|
|
253
|
+
moduleIds: string
|
|
254
|
+
removeAvailableModules: boolean
|
|
255
|
+
sideEffects: string
|
|
256
|
+
}
|
|
257
|
+
export interface RawLibraryName {
|
|
258
|
+
amd?: string
|
|
259
|
+
commonjs?: string
|
|
260
|
+
root?: Array<string>
|
|
261
|
+
}
|
|
262
|
+
export interface RawLibraryOptions {
|
|
263
|
+
name?: RawLibraryName
|
|
264
|
+
export?: Array<string>
|
|
265
|
+
libraryType: string
|
|
266
|
+
umdNamedDefine?: boolean
|
|
231
267
|
}
|
|
232
268
|
export interface RawOutputOptions {
|
|
233
|
-
path
|
|
234
|
-
publicPath
|
|
235
|
-
assetModuleFilename
|
|
236
|
-
filename
|
|
237
|
-
chunkFilename
|
|
238
|
-
cssFilename
|
|
239
|
-
cssChunkFilename
|
|
240
|
-
uniqueName
|
|
241
|
-
library?:
|
|
242
|
-
strictModuleErrorHandling
|
|
269
|
+
path: string
|
|
270
|
+
publicPath: string
|
|
271
|
+
assetModuleFilename: string
|
|
272
|
+
filename: string
|
|
273
|
+
chunkFilename: string
|
|
274
|
+
cssFilename: string
|
|
275
|
+
cssChunkFilename: string
|
|
276
|
+
uniqueName: string
|
|
277
|
+
library?: RawLibraryOptions
|
|
278
|
+
strictModuleErrorHandling: boolean
|
|
279
|
+
enabledLibraryTypes?: Array<string>
|
|
243
280
|
}
|
|
244
281
|
export interface RawResolveOptions {
|
|
245
282
|
preferRelative?: boolean
|
|
@@ -259,8 +296,6 @@ export interface RawSnapshotStrategy {
|
|
|
259
296
|
timestamp: boolean
|
|
260
297
|
}
|
|
261
298
|
export interface RawSnapshotOptions {
|
|
262
|
-
resolveBuildDependencies: RawSnapshotStrategy
|
|
263
|
-
buildDependencies: RawSnapshotStrategy
|
|
264
299
|
resolve: RawSnapshotStrategy
|
|
265
300
|
module: RawSnapshotStrategy
|
|
266
301
|
}
|
|
@@ -288,24 +323,34 @@ export interface RawStatsOptions {
|
|
|
288
323
|
colors: boolean
|
|
289
324
|
}
|
|
290
325
|
export interface RawOptions {
|
|
291
|
-
entry
|
|
292
|
-
mode?:
|
|
293
|
-
target
|
|
294
|
-
context
|
|
295
|
-
output
|
|
296
|
-
resolve
|
|
297
|
-
module
|
|
298
|
-
builtins
|
|
299
|
-
externals
|
|
300
|
-
externalsType
|
|
301
|
-
devtool
|
|
302
|
-
optimization
|
|
303
|
-
stats
|
|
304
|
-
devServer
|
|
305
|
-
snapshot
|
|
306
|
-
cache
|
|
307
|
-
experiments
|
|
308
|
-
node
|
|
326
|
+
entry: Record<string, RawEntryItem>
|
|
327
|
+
mode?: undefined | 'production' | 'development' | 'none'
|
|
328
|
+
target: Array<string>
|
|
329
|
+
context: string
|
|
330
|
+
output: RawOutputOptions
|
|
331
|
+
resolve: RawResolveOptions
|
|
332
|
+
module: RawModuleOptions
|
|
333
|
+
builtins: RawBuiltins
|
|
334
|
+
externals: Record<string, string>
|
|
335
|
+
externalsType: '' | 'node-commonjs' | 'window'
|
|
336
|
+
devtool: string
|
|
337
|
+
optimization: RawOptimizationOptions
|
|
338
|
+
stats: RawStatsOptions
|
|
339
|
+
devServer: RawDevServer
|
|
340
|
+
snapshot: RawSnapshotOptions
|
|
341
|
+
cache: RawCacheOptions
|
|
342
|
+
experiments: RawExperiments
|
|
343
|
+
node: RawNodeOption
|
|
344
|
+
}
|
|
345
|
+
export interface ThreadsafeNodeFs {
|
|
346
|
+
writeFile: (...args: any[]) => any
|
|
347
|
+
mkdir: (...args: any[]) => any
|
|
348
|
+
mkdirp: (...args: any[]) => any
|
|
349
|
+
}
|
|
350
|
+
export interface NodeFs {
|
|
351
|
+
writeFile: (...args: any[]) => any
|
|
352
|
+
mkdir: (...args: any[]) => any
|
|
353
|
+
mkdirp: (...args: any[]) => any
|
|
309
354
|
}
|
|
310
355
|
export interface JsAssetInfoRelated {
|
|
311
356
|
sourceMap?: string
|
|
@@ -357,6 +402,12 @@ export interface JsHooks {
|
|
|
357
402
|
emit: (...args: any[]) => any
|
|
358
403
|
afterEmit: (...args: any[]) => any
|
|
359
404
|
make: (...args: any[]) => any
|
|
405
|
+
optimizeChunkModule: (...args: any[]) => any
|
|
406
|
+
}
|
|
407
|
+
export interface JsModule {
|
|
408
|
+
originalSource?: JsCompatSource
|
|
409
|
+
resource: string
|
|
410
|
+
moduleIdentifier: string
|
|
360
411
|
}
|
|
361
412
|
export interface JsCompatSource {
|
|
362
413
|
/** Whether the underlying data structure is a `RawSource` */
|
|
@@ -420,26 +471,23 @@ export interface JsStatsChunk {
|
|
|
420
471
|
names: Array<string>
|
|
421
472
|
size: number
|
|
422
473
|
}
|
|
423
|
-
export interface
|
|
474
|
+
export interface JsStatsChunkGroupAsset {
|
|
424
475
|
name: string
|
|
425
476
|
size: number
|
|
426
477
|
}
|
|
427
|
-
export interface
|
|
478
|
+
export interface JsStatsChunkGroup {
|
|
428
479
|
name: string
|
|
429
|
-
assets: Array<
|
|
480
|
+
assets: Array<JsStatsChunkGroupAsset>
|
|
430
481
|
chunks: Array<string>
|
|
431
482
|
assetsSize: number
|
|
432
483
|
}
|
|
433
|
-
export interface
|
|
484
|
+
export interface JsStatsAssetsByChunkName {
|
|
485
|
+
name: string
|
|
486
|
+
files: Array<string>
|
|
487
|
+
}
|
|
488
|
+
export interface JsStatsGetAssets {
|
|
434
489
|
assets: Array<JsStatsAsset>
|
|
435
|
-
|
|
436
|
-
chunks: Array<JsStatsChunk>
|
|
437
|
-
entrypoints: Array<JsStatsEntrypoint>
|
|
438
|
-
errors: Array<JsStatsError>
|
|
439
|
-
errorsCount: number
|
|
440
|
-
warnings: Array<JsStatsWarning>
|
|
441
|
-
warningsCount: number
|
|
442
|
-
hash: string
|
|
490
|
+
assetsByChunkName: Array<JsStatsAssetsByChunkName>
|
|
443
491
|
}
|
|
444
492
|
export function initCustomTraceSubscriber(): void
|
|
445
493
|
export class JsCompilation {
|
|
@@ -447,6 +495,12 @@ export class JsCompilation {
|
|
|
447
495
|
getAssets(): Readonly<JsAsset>[]
|
|
448
496
|
getAsset(name: string): JsAsset | null
|
|
449
497
|
getAssetSource(name: string): JsCompatSource | null
|
|
498
|
+
getModules(): Array<JsModule>
|
|
499
|
+
/**
|
|
500
|
+
* Only available for those none Js and Css source,
|
|
501
|
+
* return true if set module source successfully, false if failed.
|
|
502
|
+
*/
|
|
503
|
+
setNoneAstModuleSource(moduleIdentifier: string, source: JsCompatSource): boolean
|
|
450
504
|
setAssetSource(name: string, source: JsCompatSource): void
|
|
451
505
|
deleteAssetSource(name: string): void
|
|
452
506
|
getAssetFilenames(): Array<string>
|
|
@@ -467,16 +521,18 @@ export class JsCompilation {
|
|
|
467
521
|
addBuildDependencies(deps: Array<string>): void
|
|
468
522
|
}
|
|
469
523
|
export class JsStats {
|
|
470
|
-
getAssets():
|
|
524
|
+
getAssets(): JsStatsGetAssets
|
|
471
525
|
getModules(showReasons: boolean): Array<JsStatsModule>
|
|
472
526
|
getChunks(): Array<JsStatsChunk>
|
|
473
|
-
getEntrypoints(): Array<
|
|
527
|
+
getEntrypoints(): Array<JsStatsChunkGroup>
|
|
528
|
+
getNamedChunkGroups(): Array<JsStatsChunkGroup>
|
|
474
529
|
getErrors(): Array<JsStatsError>
|
|
475
530
|
getWarnings(): Array<JsStatsWarning>
|
|
476
531
|
getHash(): string
|
|
477
532
|
}
|
|
478
533
|
export class Rspack {
|
|
479
|
-
constructor(options: RawOptions, jsHooks
|
|
534
|
+
constructor(options: RawOptions, jsHooks: JsHooks | undefined | null, outputFilesystem: ThreadsafeNodeFS)
|
|
535
|
+
unsafe_set_disabled_hooks(hooks: Array<string>): void
|
|
480
536
|
/**
|
|
481
537
|
* Build with the given option passed to the constructor
|
|
482
538
|
*
|
package/binding.js
CHANGED
|
@@ -11,7 +11,8 @@ function isMusl() {
|
|
|
11
11
|
// For Node 10
|
|
12
12
|
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
13
13
|
try {
|
|
14
|
-
|
|
14
|
+
const lddPath = require('child_process').execSync('which ldd').toString().trim();
|
|
15
|
+
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
15
16
|
} catch (e) {
|
|
16
17
|
return true
|
|
17
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/binding",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"description": "Node binding for rspack",
|
|
5
6
|
"main": "binding.js",
|
|
6
7
|
"types": "binding.d.ts",
|
|
@@ -11,19 +12,19 @@
|
|
|
11
12
|
"binding.js",
|
|
12
13
|
"binding.d.ts"
|
|
13
14
|
],
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"homepage": "https://rspack.org",
|
|
16
|
+
"bugs": "https://github.com/modern-js-dev/rspack/issues",
|
|
17
|
+
"repository": "modern-js-dev/rspack",
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"@napi-rs/cli": "2.14.2",
|
|
19
20
|
"why-is-node-running": "2.2.1",
|
|
20
21
|
"npm-run-all": "4.1.5"
|
|
21
22
|
},
|
|
22
23
|
"optionalDependencies": {
|
|
23
|
-
"@rspack/binding-darwin-
|
|
24
|
-
"@rspack/binding-darwin-
|
|
25
|
-
"@rspack/binding-win32-x64-msvc": "0.0.
|
|
26
|
-
"@rspack/binding-linux-x64-gnu": "0.0.
|
|
24
|
+
"@rspack/binding-darwin-arm64": "0.0.24",
|
|
25
|
+
"@rspack/binding-darwin-x64": "0.0.24",
|
|
26
|
+
"@rspack/binding-win32-x64-msvc": "0.0.24",
|
|
27
|
+
"@rspack/binding-linux-x64-gnu": "0.0.24"
|
|
27
28
|
},
|
|
28
29
|
"scripts": {
|
|
29
30
|
"build:debug": "napi build --platform --js false --dts binding.d.ts --config napirs.rc.json",
|