@rolldown/binding-wasm32-wasi 1.2.4 → 1.2.5

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/binding-wasm32-wasi",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "main": "rolldown-binding.wasi.cjs",
5
5
  "files": [
6
6
  "rolldown-binding.wasm32-wasi.wasm",
@@ -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. */
@@ -1969,6 +2012,7 @@ export interface BindingChecksOptions {
1969
2012
  ineffectiveDynamicImport?: boolean
1970
2013
  largeBarrelModules?: boolean
1971
2014
  sourcemapBroken?: boolean
2015
+ namespaceConflict?: boolean
1972
2016
  }
1973
2017
 
1974
2018
  export interface BindingChunkImportMap {
@@ -2564,6 +2608,22 @@ export interface BindingModuleSideEffectsRule {
2564
2608
  external?: boolean
2565
2609
  }
2566
2610
 
2611
+ /**
2612
+ * Counters of the Rust-side tracking allocator. V8 never allocates through
2613
+ * the Rust global allocator, so these numbers exclude the JS heap and GC
2614
+ * noise completely, unlike `process.memoryUsage()`.
2615
+ */
2616
+ export interface BindingNativeMemoryStats {
2617
+ /** Bytes currently allocated and not yet freed, since process start. */
2618
+ liveBytes: number
2619
+ /** Highest `live_bytes` seen since process start or the last reset. */
2620
+ peakBytes: number
2621
+ /** Successful `alloc` calls since the last reset. */
2622
+ allocCount: number
2623
+ /** Successful `realloc` calls since the last reset. */
2624
+ reallocCount: number
2625
+ }
2626
+
2567
2627
  export interface BindingOptimization {
2568
2628
  inlineConst?: boolean | BindingInlineConstConfig
2569
2629
  pifeForModuleWrappers?: boolean
@@ -3061,6 +3121,13 @@ export type FilterTokenKind = 'Id'|
3061
3121
  'QueryKey'|
3062
3122
  'QueryValue';
3063
3123
 
3124
+ /**
3125
+ * Returns the Rust-side allocator counters, or `None` when this binding was
3126
+ * built without the `tracking_allocator` cargo feature (the default —
3127
+ * tracking costs a few atomic operations per allocation).
3128
+ */
3129
+ export declare function getNativeMemoryStats(): BindingNativeMemoryStats | null
3130
+
3064
3131
  export declare function initTraceSubscriber(): TraceSubscriberGuard | null
3065
3132
 
3066
3133
  export interface JsChangedOutputs {
@@ -3123,6 +3190,13 @@ export interface PreRenderedChunk {
3123
3190
 
3124
3191
  export declare function registerPlugins(id: number, plugins: Array<BindingPluginWithIndex>): void
3125
3192
 
3193
+ /**
3194
+ * Starts a new measuring window: the peak restarts from the current live
3195
+ * bytes and the counts restart from zero. No-op when the binding was built
3196
+ * without the `tracking_allocator` cargo feature.
3197
+ */
3198
+ export declare function resetNativeMemoryStats(): void
3199
+
3126
3200
  export declare function resolveTsconfig(filename: string, cache: TsconfigCache | undefined | null, yarnPnp: boolean): BindingTsconfigResult | null
3127
3201
 
3128
3202
  /**
Binary file