@rolldown/binding-wasm32-wasi 1.2.4 → 1.2.6
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/package.json
CHANGED
|
@@ -683,8 +683,10 @@ export const collapseSourcemaps = __napiModule.exports.collapseSourcemaps
|
|
|
683
683
|
export const enhancedTransform = __napiModule.exports.enhancedTransform
|
|
684
684
|
export const enhancedTransformSync = __napiModule.exports.enhancedTransformSync
|
|
685
685
|
export const FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
686
|
+
export const getNativeMemoryStats = __napiModule.exports.getNativeMemoryStats
|
|
686
687
|
export const initTraceSubscriber = __napiModule.exports.initTraceSubscriber
|
|
687
688
|
export const registerPlugins = __napiModule.exports.registerPlugins
|
|
689
|
+
export const resetNativeMemoryStats = __napiModule.exports.resetNativeMemoryStats
|
|
688
690
|
export const resolveTsconfig = __napiModule.exports.resolveTsconfig
|
|
689
691
|
export const shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
690
692
|
export const startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// napi-rs-artifact-metadata:{"version":2,"rootEntry":"binding.cjs","exports":["LegalCommentsMode","minify","minifySync","Severity","ParseResult","ExportExportNameKind","ExportImportNameKind","ExportLocalNameKind","ImportNameKind","parse","parseSync","rawTransferSupported","ResolverFactory","EnforceExtension","ModuleType","sync","HelperMode","isolatedDeclaration","isolatedDeclarationSync","moduleRunnerTransform","moduleRunnerTransformSync","transform","transformSync","BindingBundleEndEventData","BindingBundleErrorEventData","BindingBundler","BindingCallableBuiltinPlugin","BindingChunkingContext","BindingDecodedMap","BindingDevEngine","BindingLoadPluginContext","BindingMagicString","BindingModuleInfo","BindingNormalizedOptions","BindingOutputAsset","BindingOutputChunk","BindingPluginContext","BindingRenderedChunk","BindingRenderedChunkMeta","BindingRenderedModule","BindingSourceMap","BindingTransformPluginContext","BindingWatcher","BindingWatcherBundler","BindingWatcherChangeData","BindingWatcherEvent","ParallelJsPluginRegistry","TraceSubscriberGuard","TsconfigCache","BindingAttachDebugInfo","BindingBuiltinPluginName","BindingChunkModuleOrderBy","BindingErrorStage","BindingLogLevel","BindingPluginOrder","BindingPropertyReadSideEffects","BindingPropertyWriteSideEffects","BindingRebuildStrategy","collapseSourcemaps","enhancedTransform","enhancedTransformSync","FilterTokenKind","initTraceSubscriber","registerPlugins","resolveTsconfig","shutdownAsyncRuntime","startAsyncRuntime"],"managedRootEntries":["browser.js","binding.cjs","rolldown-binding.wasm","rolldown-binding.debug.wasm"]}
|
|
1
|
+
// napi-rs-artifact-metadata:{"version":2,"rootEntry":"binding.cjs","exports":["LegalCommentsMode","minify","minifySync","Severity","ParseResult","ExportExportNameKind","ExportImportNameKind","ExportLocalNameKind","ImportNameKind","parse","parseSync","rawTransferSupported","ResolverFactory","EnforceExtension","ModuleType","sync","HelperMode","isolatedDeclaration","isolatedDeclarationSync","moduleRunnerTransform","moduleRunnerTransformSync","transform","transformSync","BindingBundleEndEventData","BindingBundleErrorEventData","BindingBundler","BindingCallableBuiltinPlugin","BindingChunkingContext","BindingDecodedMap","BindingDevEngine","BindingLoadPluginContext","BindingMagicString","BindingModuleInfo","BindingNormalizedOptions","BindingOutputAsset","BindingOutputChunk","BindingPluginContext","BindingRenderedChunk","BindingRenderedChunkMeta","BindingRenderedModule","BindingSourceMap","BindingTransformPluginContext","BindingWatcher","BindingWatcherBundler","BindingWatcherChangeData","BindingWatcherEvent","ParallelJsPluginRegistry","TraceSubscriberGuard","TsconfigCache","BindingAttachDebugInfo","BindingBuiltinPluginName","BindingChunkModuleOrderBy","BindingErrorStage","BindingLogLevel","BindingPluginOrder","BindingPropertyReadSideEffects","BindingPropertyWriteSideEffects","BindingRebuildStrategy","collapseSourcemaps","enhancedTransform","enhancedTransformSync","FilterTokenKind","getNativeMemoryStats","initTraceSubscriber","registerPlugins","resetNativeMemoryStats","resolveTsconfig","shutdownAsyncRuntime","startAsyncRuntime"],"managedRootEntries":["browser.js","binding.cjs","rolldown-binding.wasm","rolldown-binding.debug.wasm"]}
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/* prettier-ignore */
|
|
4
4
|
|
|
@@ -983,8 +983,10 @@ module.exports.collapseSourcemaps = __napiModule.exports.collapseSourcemaps
|
|
|
983
983
|
module.exports.enhancedTransform = __napiModule.exports.enhancedTransform
|
|
984
984
|
module.exports.enhancedTransformSync = __napiModule.exports.enhancedTransformSync
|
|
985
985
|
module.exports.FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
986
|
+
module.exports.getNativeMemoryStats = __napiModule.exports.getNativeMemoryStats
|
|
986
987
|
module.exports.initTraceSubscriber = __napiModule.exports.initTraceSubscriber
|
|
987
988
|
module.exports.registerPlugins = __napiModule.exports.registerPlugins
|
|
989
|
+
module.exports.resetNativeMemoryStats = __napiModule.exports.resetNativeMemoryStats
|
|
988
990
|
module.exports.resolveTsconfig = __napiModule.exports.resolveTsconfig
|
|
989
991
|
module.exports.shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
990
992
|
module.exports.startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
@@ -169,6 +169,38 @@ export interface MangleOptionsKeepNames {
|
|
|
169
169
|
class: boolean
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
export interface ManglePropertiesOptions {
|
|
173
|
+
/**
|
|
174
|
+
* JavaScript `RegExp` selecting property names to mangle. The source and flags are compiled
|
|
175
|
+
* with Rust's regex engine. Flags `i`, `m`, `s`, and `u` are supported.
|
|
176
|
+
*/
|
|
177
|
+
include: RegExp
|
|
178
|
+
/** JavaScript `RegExp` excluding property names selected by `include`. */
|
|
179
|
+
exclude?: RegExp
|
|
180
|
+
/** Exact names that are neither mangled nor emitted as automatic output names. */
|
|
181
|
+
reserved?: Array<string>
|
|
182
|
+
/**
|
|
183
|
+
* Mangle quoted property occurrences in addition to unquoted occurrences.
|
|
184
|
+
*
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
quoted?: boolean
|
|
188
|
+
/**
|
|
189
|
+
* Generate readable `_$name$_`-style output names.
|
|
190
|
+
*
|
|
191
|
+
* @default false
|
|
192
|
+
*/
|
|
193
|
+
debug?: boolean
|
|
194
|
+
/**
|
|
195
|
+
* Stable mappings from original names to output names. `false` reserves an original name.
|
|
196
|
+
* Entries that do not match `include`, or that match `exclude`, remain inert but are
|
|
197
|
+
* preserved in the returned `mangleCache`. String targets must be `IdentifierName` values
|
|
198
|
+
* other than `__proto__`, `constructor`, or `prototype`. The original name `__proto__` is
|
|
199
|
+
* always reserved and cannot be used as a cache key.
|
|
200
|
+
*/
|
|
201
|
+
cache?: Record<string, string | false>
|
|
202
|
+
}
|
|
203
|
+
|
|
172
204
|
/**
|
|
173
205
|
* Minify asynchronously.
|
|
174
206
|
*
|
|
@@ -181,6 +213,12 @@ export interface MinifyOptions {
|
|
|
181
213
|
module?: boolean
|
|
182
214
|
compress?: boolean | CompressOptions
|
|
183
215
|
mangle?: boolean | MangleOptions
|
|
216
|
+
/**
|
|
217
|
+
* Mangle matching property names independently of identifier mangling. Properties owned by
|
|
218
|
+
* unminified code, imported module namespaces, globals, or host APIs must be excluded or
|
|
219
|
+
* reserved.
|
|
220
|
+
*/
|
|
221
|
+
mangleProps?: ManglePropertiesOptions
|
|
184
222
|
codegen?: boolean | CodegenOptions
|
|
185
223
|
sourcemap?: boolean
|
|
186
224
|
}
|
|
@@ -194,6 +232,11 @@ export interface MinifyResult {
|
|
|
194
232
|
* Only populated when `codegen.legalComments` is `"linked"` or `"external"`.
|
|
195
233
|
*/
|
|
196
234
|
legalComments: Array<string>
|
|
235
|
+
/**
|
|
236
|
+
* Updated property-name cache sorted by original name. Present when `mangleProps` ran on a
|
|
237
|
+
* parse without errors.
|
|
238
|
+
*/
|
|
239
|
+
mangleCache?: Record<string, string | false>
|
|
197
240
|
}
|
|
198
241
|
|
|
199
242
|
/** Minify synchronously. */
|
|
@@ -1584,6 +1627,12 @@ export declare class BindingDevEngine {
|
|
|
1584
1627
|
* actual module and its dependencies.
|
|
1585
1628
|
*/
|
|
1586
1629
|
compileEntry(moduleId: string, clientId: string): Promise<BindingLazyChunkOutput>
|
|
1630
|
+
/**
|
|
1631
|
+
* Same data the plugin-context `getModuleInfo` returns, readable from the engine
|
|
1632
|
+
* handle at any time (no hook context needed).
|
|
1633
|
+
*/
|
|
1634
|
+
getModuleInfo(moduleId: string): BindingModuleInfo | null
|
|
1635
|
+
getModuleIds(): Array<string>
|
|
1587
1636
|
}
|
|
1588
1637
|
|
|
1589
1638
|
export declare class BindingLoadPluginContext {
|
|
@@ -1867,8 +1916,8 @@ export declare class TraceSubscriberGuard {
|
|
|
1867
1916
|
}
|
|
1868
1917
|
|
|
1869
1918
|
export declare class TsconfigCache {
|
|
1870
|
-
/** Create a new transform cache with auto tsconfig discovery enabled. */
|
|
1871
|
-
constructor(yarnPnp: boolean)
|
|
1919
|
+
/** Create a new transform cache with auto or manual tsconfig discovery enabled. */
|
|
1920
|
+
constructor(yarnPnp: boolean, pathToTsconfig?: string | undefined | null)
|
|
1872
1921
|
/**
|
|
1873
1922
|
* Clear the cache.
|
|
1874
1923
|
*
|
|
@@ -1969,6 +2018,7 @@ export interface BindingChecksOptions {
|
|
|
1969
2018
|
ineffectiveDynamicImport?: boolean
|
|
1970
2019
|
largeBarrelModules?: boolean
|
|
1971
2020
|
sourcemapBroken?: boolean
|
|
2021
|
+
namespaceConflict?: boolean
|
|
1972
2022
|
}
|
|
1973
2023
|
|
|
1974
2024
|
export interface BindingChunkImportMap {
|
|
@@ -2148,9 +2198,10 @@ export interface BindingEnhancedTransformOptions {
|
|
|
2148
2198
|
/**
|
|
2149
2199
|
* Configure tsconfig handling.
|
|
2150
2200
|
* - true: Auto-discover and load the nearest tsconfig.json
|
|
2201
|
+
* - string: Use the tsconfig at the provided path
|
|
2151
2202
|
* - TsconfigRawOptions: Use the provided inline tsconfig options
|
|
2152
2203
|
*/
|
|
2153
|
-
tsconfig?: boolean | BindingTsconfigRawOptions
|
|
2204
|
+
tsconfig?: boolean | string | BindingTsconfigRawOptions
|
|
2154
2205
|
/** An input source map to collapse with the output source map. */
|
|
2155
2206
|
inputMap?: SourceMap
|
|
2156
2207
|
}
|
|
@@ -2539,8 +2590,8 @@ export interface BindingManualCodeSplittingOptions {
|
|
|
2539
2590
|
}
|
|
2540
2591
|
|
|
2541
2592
|
export interface BindingMatchGroup {
|
|
2542
|
-
name: string | ((
|
|
2543
|
-
test?: string | RegExp | ((
|
|
2593
|
+
name: string | ((ids: Array<string>, ctx: BindingChunkingContext) => Array<VoidNullable<string>>)
|
|
2594
|
+
test?: string | RegExp | ((ids: Array<string>) => Uint8Array)
|
|
2544
2595
|
priority?: number
|
|
2545
2596
|
minSize?: number
|
|
2546
2597
|
minShareCount?: number
|
|
@@ -2564,6 +2615,22 @@ export interface BindingModuleSideEffectsRule {
|
|
|
2564
2615
|
external?: boolean
|
|
2565
2616
|
}
|
|
2566
2617
|
|
|
2618
|
+
/**
|
|
2619
|
+
* Counters of the Rust-side tracking allocator. V8 never allocates through
|
|
2620
|
+
* the Rust global allocator, so these numbers exclude the JS heap and GC
|
|
2621
|
+
* noise completely, unlike `process.memoryUsage()`.
|
|
2622
|
+
*/
|
|
2623
|
+
export interface BindingNativeMemoryStats {
|
|
2624
|
+
/** Bytes currently allocated and not yet freed, since process start. */
|
|
2625
|
+
liveBytes: number
|
|
2626
|
+
/** Highest `live_bytes` seen since process start or the last reset. */
|
|
2627
|
+
peakBytes: number
|
|
2628
|
+
/** Successful `alloc` calls since the last reset. */
|
|
2629
|
+
allocCount: number
|
|
2630
|
+
/** Successful `realloc` calls since the last reset. */
|
|
2631
|
+
reallocCount: number
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2567
2634
|
export interface BindingOptimization {
|
|
2568
2635
|
inlineConst?: boolean | BindingInlineConstConfig
|
|
2569
2636
|
pifeForModuleWrappers?: boolean
|
|
@@ -2620,6 +2687,7 @@ export interface BindingOutputOptions {
|
|
|
2620
2687
|
export interface BindingOutputs {
|
|
2621
2688
|
chunks: Array<BindingOutputChunk>
|
|
2622
2689
|
assets: Array<BindingOutputAsset>
|
|
2690
|
+
mangleCache?: Record<string, string | false>
|
|
2623
2691
|
}
|
|
2624
2692
|
|
|
2625
2693
|
export interface BindingOverwriteOptions {
|
|
@@ -2687,9 +2755,9 @@ export interface BindingPluginOptions {
|
|
|
2687
2755
|
renderStartMeta?: BindingPluginHookMeta
|
|
2688
2756
|
renderError?: (ctx: BindingPluginContext, error: BindingError[]) => void
|
|
2689
2757
|
renderErrorMeta?: BindingPluginHookMeta
|
|
2690
|
-
generateBundle?: (ctx: BindingPluginContext, bundle:
|
|
2758
|
+
generateBundle?: (ctx: BindingPluginContext, bundle: BindingResult<BindingOutputs>, isWrite: boolean, opts: BindingNormalizedOptions) => MaybePromise<VoidNullable<JsChangedOutputs>>
|
|
2691
2759
|
generateBundleMeta?: BindingPluginHookMeta
|
|
2692
|
-
writeBundle?: (ctx: BindingPluginContext, bundle:
|
|
2760
|
+
writeBundle?: (ctx: BindingPluginContext, bundle: BindingResult<BindingOutputs>, opts: BindingNormalizedOptions) => MaybePromise<VoidNullable<JsChangedOutputs>>
|
|
2693
2761
|
writeBundleMeta?: BindingPluginHookMeta
|
|
2694
2762
|
closeBundle?: (ctx: BindingPluginContext, error?: BindingError[]) => MaybePromise<VoidNullable>
|
|
2695
2763
|
closeBundleMeta?: BindingPluginHookMeta
|
|
@@ -2972,6 +3040,7 @@ export interface BindingViteReporterPluginConfig {
|
|
|
2972
3040
|
|
|
2973
3041
|
export interface BindingViteResolvePluginConfig {
|
|
2974
3042
|
resolveOptions: BindingViteResolvePluginResolveOptions
|
|
3043
|
+
tsconfig?: string
|
|
2975
3044
|
environmentConsumer: string
|
|
2976
3045
|
environmentName: string
|
|
2977
3046
|
builtins: Array<BindingStringOrRegex>
|
|
@@ -3008,6 +3077,7 @@ export interface BindingViteResolvePluginResolveOptions {
|
|
|
3008
3077
|
|
|
3009
3078
|
export interface BindingViteTransformPluginConfig {
|
|
3010
3079
|
root: string
|
|
3080
|
+
tsconfig?: string
|
|
3011
3081
|
include?: Array<BindingStringOrRegex>
|
|
3012
3082
|
exclude?: Array<BindingStringOrRegex>
|
|
3013
3083
|
jsxRefreshInclude?: Array<BindingStringOrRegex>
|
|
@@ -3061,6 +3131,13 @@ export type FilterTokenKind = 'Id'|
|
|
|
3061
3131
|
'QueryKey'|
|
|
3062
3132
|
'QueryValue';
|
|
3063
3133
|
|
|
3134
|
+
/**
|
|
3135
|
+
* Returns the Rust-side allocator counters, or `None` when this binding was
|
|
3136
|
+
* built without the `tracking_allocator` cargo feature (the default —
|
|
3137
|
+
* tracking costs a few atomic operations per allocation).
|
|
3138
|
+
*/
|
|
3139
|
+
export declare function getNativeMemoryStats(): BindingNativeMemoryStats | null
|
|
3140
|
+
|
|
3064
3141
|
export declare function initTraceSubscriber(): TraceSubscriberGuard | null
|
|
3065
3142
|
|
|
3066
3143
|
export interface JsChangedOutputs {
|
|
@@ -3123,6 +3200,13 @@ export interface PreRenderedChunk {
|
|
|
3123
3200
|
|
|
3124
3201
|
export declare function registerPlugins(id: number, plugins: Array<BindingPluginWithIndex>): void
|
|
3125
3202
|
|
|
3203
|
+
/**
|
|
3204
|
+
* Starts a new measuring window: the peak restarts from the current live
|
|
3205
|
+
* bytes and the counts restart from zero. No-op when the binding was built
|
|
3206
|
+
* without the `tracking_allocator` cargo feature.
|
|
3207
|
+
*/
|
|
3208
|
+
export declare function resetNativeMemoryStats(): void
|
|
3209
|
+
|
|
3126
3210
|
export declare function resolveTsconfig(filename: string, cache: TsconfigCache | undefined | null, yarnPnp: boolean): BindingTsconfigResult | null
|
|
3127
3211
|
|
|
3128
3212
|
/**
|
|
Binary file
|