@rolldown/binding-wasm32-wasi 1.2.15 → 1.3.0
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,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolldown/binding-wasm32-wasi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"cpu": [
|
|
5
|
+
"wasm32"
|
|
6
|
+
],
|
|
4
7
|
"main": "rolldown-binding.wasi.cjs",
|
|
5
8
|
"files": [
|
|
6
9
|
"rolldown-binding.wasm32-wasi.wasm",
|
|
@@ -40,8 +43,8 @@
|
|
|
40
43
|
"browser": "rolldown-binding.wasi-browser.js",
|
|
41
44
|
"type": "module",
|
|
42
45
|
"dependencies": {
|
|
43
|
-
"@napi-rs/wasm-runtime": "
|
|
44
|
-
"@emnapi/core": "2.0.0-
|
|
45
|
-
"@emnapi/runtime": "2.0.0-
|
|
46
|
+
"@napi-rs/wasm-runtime": "1.2.6",
|
|
47
|
+
"@emnapi/core": "2.0.0-beta.2",
|
|
48
|
+
"@emnapi/runtime": "2.0.0-beta.2"
|
|
46
49
|
}
|
|
47
50
|
}
|
|
@@ -1529,3 +1529,4 @@ export const resetNativeMemoryStats = __napiModule.exports.resetNativeMemoryStat
|
|
|
1529
1529
|
export const resolveTsconfig = __napiModule.exports.resolveTsconfig
|
|
1530
1530
|
export const shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
1531
1531
|
export const startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
1532
|
+
export const Watcher = __napiModule.exports.Watcher
|
|
@@ -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","getNativeMemoryStats","initTraceSubscriber","registerPlugins","resetNativeMemoryStats","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","Watcher"],"managedRootEntries":["browser.js","binding.cjs","rolldown-binding.wasm","rolldown-binding.debug.wasm"]}
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/* auto-generated by NAPI-RS */
|
|
4
4
|
|
|
@@ -2366,3 +2366,4 @@ module.exports.resetNativeMemoryStats = __napiModule.exports.resetNativeMemorySt
|
|
|
2366
2366
|
module.exports.resolveTsconfig = __napiModule.exports.resolveTsconfig
|
|
2367
2367
|
module.exports.shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
2368
2368
|
module.exports.startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
2369
|
+
module.exports.Watcher = __napiModule.exports.Watcher
|
|
@@ -1629,8 +1629,13 @@ export declare class BindingDevEngine {
|
|
|
1629
1629
|
* This is called when a dynamically imported module is first requested at runtime.
|
|
1630
1630
|
* The module was previously stubbed with a proxy, and now we need to compile the
|
|
1631
1631
|
* actual module and its dependencies.
|
|
1632
|
+
* Failures come back as `BindingErrors`, the same shape the build and HMR callbacks
|
|
1633
|
+
* use, rather than as a napi error carrying a formatted string. A lazy compile runs the
|
|
1634
|
+
* full plugin pipeline, so what fails here is usually a user plugin - and `to_binding_error`
|
|
1635
|
+
* hands its thrown JS error back untouched, keeping the stack and the diagnostic's module
|
|
1636
|
+
* id instead of flattening both into a message.
|
|
1632
1637
|
*/
|
|
1633
|
-
compileEntry(moduleId: string, clientId: string): Promise<BindingLazyChunkOutput
|
|
1638
|
+
compileEntry(moduleId: string, clientId: string): Promise<BindingResult<BindingLazyChunkOutput>>
|
|
1634
1639
|
/**
|
|
1635
1640
|
* Same data the plugin-context `getModuleInfo` returns, readable from the engine
|
|
1636
1641
|
* handle at any time (no hook context needed).
|
|
@@ -1809,6 +1814,12 @@ export declare class BindingOutputChunk {
|
|
|
1809
1814
|
getImports(): Array<string>
|
|
1810
1815
|
getDynamicImports(): Array<string>
|
|
1811
1816
|
getCode(): string
|
|
1817
|
+
/**
|
|
1818
|
+
* Identity of the shared chunk data behind this object. Two `BindingOutputChunk` objects with the same
|
|
1819
|
+
* identity share the same data, so a JavaScript string made from `getCode()` of one is valid for the other.
|
|
1820
|
+
* The identity is the address of that data. It stays unique while a `BindingOutputChunk` keeps the data alive.
|
|
1821
|
+
*/
|
|
1822
|
+
getCodeIdentity(): number
|
|
1812
1823
|
getMap(): string | null
|
|
1813
1824
|
getSourcemapFileName(): string | null
|
|
1814
1825
|
getPreliminaryFileName(): string
|
|
@@ -1816,7 +1827,7 @@ export declare class BindingOutputChunk {
|
|
|
1816
1827
|
}
|
|
1817
1828
|
|
|
1818
1829
|
export declare class BindingPluginContext {
|
|
1819
|
-
load(
|
|
1830
|
+
load(rawId: string, attributes: Record<string, string>, sideEffects: boolean | 'no-treeshake' | undefined, packageJsonPath?: string): Promise<void>
|
|
1820
1831
|
resolve(specifier: string, importer?: string | undefined | null, extraOptions?: BindingPluginContextResolveOptions | undefined | null): Promise<BindingPluginContextResolvedId | null>
|
|
1821
1832
|
emitFile(file: BindingEmittedAsset, assetFilename?: string | undefined | null, fnSanitizedFileName?: string | undefined | null): string
|
|
1822
1833
|
emitChunk(file: BindingEmittedChunk): string
|
|
@@ -1846,6 +1857,8 @@ export declare class BindingRenderedChunkMeta {
|
|
|
1846
1857
|
|
|
1847
1858
|
export declare class BindingRenderedModule {
|
|
1848
1859
|
get code(): string | null
|
|
1860
|
+
/** `code.length` without materializing `code`. */
|
|
1861
|
+
get renderedLength(): number
|
|
1849
1862
|
get renderedExports(): Array<string>
|
|
1850
1863
|
}
|
|
1851
1864
|
|
|
@@ -2011,6 +2024,8 @@ export interface BindingChecksOptions {
|
|
|
2011
2024
|
sourcemapBroken?: boolean
|
|
2012
2025
|
namespaceConflict?: boolean
|
|
2013
2026
|
shimmedExport?: boolean
|
|
2027
|
+
deprecatedImportAssertion?: boolean
|
|
2028
|
+
invalidImportAttribute?: boolean
|
|
2014
2029
|
}
|
|
2015
2030
|
|
|
2016
2031
|
export interface BindingChunkImportMap {
|
|
@@ -2081,17 +2096,18 @@ export interface BindingDevOptions {
|
|
|
2081
2096
|
|
|
2082
2097
|
export interface BindingDevtoolsOptions {
|
|
2083
2098
|
sessionId?: string
|
|
2099
|
+
/**
|
|
2100
|
+
* `"full"` (default): write JSON-lines devtools logs. `"report"`: aggregate the same
|
|
2101
|
+
* event stream in-memory and emit an agent-readable report (`metrics.json` + markdown)
|
|
2102
|
+
* under `node_modules/.rolldown/report/<output dir>` instead.
|
|
2103
|
+
*/
|
|
2104
|
+
mode?: 'full' | 'report'
|
|
2084
2105
|
}
|
|
2085
2106
|
|
|
2086
2107
|
export interface BindingDevWatchOptions {
|
|
2087
2108
|
enabled?: boolean
|
|
2088
2109
|
skipWrite?: boolean
|
|
2089
|
-
|
|
2090
|
-
pollInterval?: number
|
|
2091
|
-
useDebounce?: boolean
|
|
2092
|
-
debounceDuration?: number
|
|
2093
|
-
compareContentsForPolling?: boolean
|
|
2094
|
-
debounceTickRate?: number
|
|
2110
|
+
watcher?: BindingWatcherFileWatcherOptions
|
|
2095
2111
|
include?: Array<BindingStringOrRegex>
|
|
2096
2112
|
exclude?: Array<BindingStringOrRegex>
|
|
2097
2113
|
}
|
|
@@ -2297,6 +2313,7 @@ export interface BindingExperimentalOptions {
|
|
|
2297
2313
|
nativeMagicString?: boolean
|
|
2298
2314
|
chunkOptimization?: boolean | BindingChunkOptimizationOptions
|
|
2299
2315
|
lazyBarrel?: boolean
|
|
2316
|
+
importAttributes?: boolean
|
|
2300
2317
|
}
|
|
2301
2318
|
|
|
2302
2319
|
export interface BindingFilterToken {
|
|
@@ -2349,6 +2366,16 @@ export interface BindingHookJsResolveIdOutput {
|
|
|
2349
2366
|
id: string
|
|
2350
2367
|
external?: boolean | 'absolute' | 'relative'
|
|
2351
2368
|
moduleSideEffects?: boolean | 'no-treeshake'
|
|
2369
|
+
/**
|
|
2370
|
+
* @internal The package json path resolved by oxc resolver, so that the caller can hand it
|
|
2371
|
+
* back to rolldown instead of making it infer the module format from the id alone.
|
|
2372
|
+
*/
|
|
2373
|
+
packageJsonPath?: string
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
export interface BindingHookLoadExtraArgs {
|
|
2377
|
+
rawId: string
|
|
2378
|
+
attributes: Record<string, string>
|
|
2352
2379
|
}
|
|
2353
2380
|
|
|
2354
2381
|
export interface BindingHookLoadOutput {
|
|
@@ -2367,6 +2394,19 @@ export interface BindingHookRenderChunkOutput {
|
|
|
2367
2394
|
map?: BindingSourcemap | null
|
|
2368
2395
|
}
|
|
2369
2396
|
|
|
2397
|
+
/**
|
|
2398
|
+
* The extra arguments of `resolveDynamicImport`. Empty attributes and a raw id equal to the
|
|
2399
|
+
* importer are left out, and `bindingify-build-hooks.ts` fills them in.
|
|
2400
|
+
*/
|
|
2401
|
+
export interface BindingHookResolveDynamicImportExtraArgs {
|
|
2402
|
+
/** The import attributes of the import being resolved. Omitted when empty. */
|
|
2403
|
+
attributes?: Record<string, string>
|
|
2404
|
+
/** The importer without its import attributes. Omitted when equal to the importer. */
|
|
2405
|
+
importerRawId?: string
|
|
2406
|
+
/** The import attributes of the importer itself. Omitted when empty. */
|
|
2407
|
+
importerAttributes?: Record<string, string>
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2370
2410
|
export interface BindingHookResolveFileUrlArgs {
|
|
2371
2411
|
/** Preliminary filename of the chunk containing the reference. */
|
|
2372
2412
|
chunkId: string
|
|
@@ -2398,6 +2438,12 @@ export interface BindingHookResolveIdExtraArgs {
|
|
|
2398
2438
|
* - `hot-accept`: `import.meta.hot.accept('./lib.js', () => {})`
|
|
2399
2439
|
*/
|
|
2400
2440
|
kind: 'import-statement' | 'dynamic-import' | 'require-call' | 'import-rule' | 'url-token' | 'new-url' | 'hot-accept'
|
|
2441
|
+
/** The import attributes of the import being resolved. Omitted when empty. */
|
|
2442
|
+
attributes?: Record<string, string>
|
|
2443
|
+
/** The importer without its import attributes. Omitted when equal to the importer. */
|
|
2444
|
+
importerRawId?: string
|
|
2445
|
+
/** The import attributes of the importer itself. Omitted when empty. */
|
|
2446
|
+
importerAttributes?: Record<string, string>
|
|
2401
2447
|
}
|
|
2402
2448
|
|
|
2403
2449
|
export interface BindingHookResolveIdOutput {
|
|
@@ -2410,6 +2456,11 @@ export interface BindingHookResolveIdOutput {
|
|
|
2410
2456
|
* we could get the related package json object via the path string.
|
|
2411
2457
|
*/
|
|
2412
2458
|
packageJsonPath?: string | null
|
|
2459
|
+
/**
|
|
2460
|
+
* Replaces the import attributes of the import. `{}` removes them. Ignored without
|
|
2461
|
+
* `experimental.importAttributes`.
|
|
2462
|
+
*/
|
|
2463
|
+
attributes?: Record<string, string>
|
|
2413
2464
|
}
|
|
2414
2465
|
|
|
2415
2466
|
export type BindingHookSideEffects = boolean | string
|
|
@@ -2706,7 +2757,9 @@ export interface BindingOverwriteOptions {
|
|
|
2706
2757
|
}
|
|
2707
2758
|
|
|
2708
2759
|
export interface BindingPluginContextResolvedId {
|
|
2760
|
+
/** The resolved id without its import attributes. */
|
|
2709
2761
|
id: string
|
|
2762
|
+
attributes: Record<string, string>
|
|
2710
2763
|
packageJsonPath?: string
|
|
2711
2764
|
external: boolean | 'absolute' | 'relative'
|
|
2712
2765
|
moduleSideEffects?: boolean | 'no-treeshake'
|
|
@@ -2727,6 +2780,7 @@ export interface BindingPluginContextResolveOptions {
|
|
|
2727
2780
|
skipSelf?: boolean
|
|
2728
2781
|
custom?: number
|
|
2729
2782
|
vitePluginCustom?: BindingVitePluginCustom
|
|
2783
|
+
attributes?: Record<string, string>
|
|
2730
2784
|
}
|
|
2731
2785
|
|
|
2732
2786
|
export interface BindingPluginHookMeta {
|
|
@@ -2741,9 +2795,9 @@ export interface BindingPluginOptions {
|
|
|
2741
2795
|
resolveId?: (ctx: BindingPluginContext, specifier: string, importer: Nullable<string>, options: BindingHookResolveIdExtraArgs) => MaybePromise<VoidNullable<BindingHookResolveIdOutput>>
|
|
2742
2796
|
resolveIdMeta?: BindingPluginHookMeta
|
|
2743
2797
|
resolveIdFilter?: BindingHookFilter
|
|
2744
|
-
resolveDynamicImport?: (ctx: BindingPluginContext, specifier: string, importer: Nullable<string
|
|
2798
|
+
resolveDynamicImport?: (ctx: BindingPluginContext, specifier: string, importer: Nullable<string>, options: BindingHookResolveDynamicImportExtraArgs) => MaybePromise<VoidNullable<BindingHookResolveIdOutput>>
|
|
2745
2799
|
resolveDynamicImportMeta?: BindingPluginHookMeta
|
|
2746
|
-
load?: (ctx: BindingLoadPluginContext, id: string) => MaybePromise<VoidNullable<BindingHookLoadOutput>>
|
|
2800
|
+
load?: (ctx: BindingLoadPluginContext, id: string, options: Nullable<BindingHookLoadExtraArgs>) => MaybePromise<VoidNullable<BindingHookLoadOutput>>
|
|
2747
2801
|
loadMeta?: BindingPluginHookMeta
|
|
2748
2802
|
loadFilter?: BindingHookFilter
|
|
2749
2803
|
transform?: (ctx: BindingTransformPluginContext, id: string, code: string, module_type: BindingTransformHookExtraArgs) => MaybePromise<VoidNullable<BindingHookTransformOutput>>
|
|
@@ -2895,6 +2949,8 @@ export interface BindingSourceMapOptions {
|
|
|
2895
2949
|
|
|
2896
2950
|
export interface BindingTransformHookExtraArgs {
|
|
2897
2951
|
moduleType: string
|
|
2952
|
+
rawId?: string
|
|
2953
|
+
attributes?: Record<string, string>
|
|
2898
2954
|
}
|
|
2899
2955
|
|
|
2900
2956
|
export interface BindingTreeshake {
|
|
@@ -3098,17 +3154,21 @@ export interface BindingViteTransformPluginConfig {
|
|
|
3098
3154
|
yarnPnp?: boolean
|
|
3099
3155
|
}
|
|
3100
3156
|
|
|
3101
|
-
export interface
|
|
3102
|
-
skipWrite?: boolean
|
|
3103
|
-
include?: Array<BindingStringOrRegex>
|
|
3104
|
-
exclude?: Array<BindingStringOrRegex>
|
|
3105
|
-
buildDelay?: number
|
|
3157
|
+
export interface BindingWatcherFileWatcherOptions {
|
|
3106
3158
|
usePolling?: boolean
|
|
3107
3159
|
pollInterval?: number
|
|
3108
3160
|
compareContentsForPolling?: boolean
|
|
3109
3161
|
useDebounce?: boolean
|
|
3110
3162
|
debounceDelay?: number
|
|
3111
3163
|
debounceTickRate?: number
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
export interface BindingWatchOption {
|
|
3167
|
+
skipWrite?: boolean
|
|
3168
|
+
include?: Array<BindingStringOrRegex>
|
|
3169
|
+
exclude?: Array<BindingStringOrRegex>
|
|
3170
|
+
buildDelay?: number
|
|
3171
|
+
watcher?: BindingWatcherFileWatcherOptions
|
|
3112
3172
|
onInvalidate?: ((id: string) => void) | undefined
|
|
3113
3173
|
}
|
|
3114
3174
|
|
|
@@ -3174,6 +3234,10 @@ export interface NativeError {
|
|
|
3174
3234
|
message: string
|
|
3175
3235
|
/** The id of the file associated with the error */
|
|
3176
3236
|
id?: string
|
|
3237
|
+
/** The name of the plugin that threw the error */
|
|
3238
|
+
plugin?: string
|
|
3239
|
+
/** Code frame around the error location */
|
|
3240
|
+
frame?: string
|
|
3177
3241
|
/** The exporter associated with the error (for import/export errors) */
|
|
3178
3242
|
exporter?: string
|
|
3179
3243
|
/** Location information (line, column, file) */
|
|
@@ -3222,3 +3286,31 @@ export declare function startAsyncRuntime(): void
|
|
|
3222
3286
|
export interface ViteImportGlobMeta {
|
|
3223
3287
|
isSubImportsPattern?: boolean
|
|
3224
3288
|
}
|
|
3289
|
+
|
|
3290
|
+
export declare class Watcher {
|
|
3291
|
+
constructor(callback: (arg0: WatcherEvent) => void, options?: WatcherOptions | undefined | null)
|
|
3292
|
+
add(paths: Array<string>): void
|
|
3293
|
+
remove(paths: Array<string>): void
|
|
3294
|
+
isWatched(path: string, isIgnored?: ((arg: string) => boolean) | undefined | null): boolean
|
|
3295
|
+
close(): void
|
|
3296
|
+
ref(): void
|
|
3297
|
+
unref(): void
|
|
3298
|
+
}
|
|
3299
|
+
|
|
3300
|
+
export interface WatcherEvent {
|
|
3301
|
+
kind: string
|
|
3302
|
+
path?: string
|
|
3303
|
+
isDir?: boolean
|
|
3304
|
+
error?: string
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
export interface WatcherOptions {
|
|
3308
|
+
usePolling?: boolean
|
|
3309
|
+
pollInterval?: number
|
|
3310
|
+
compareContentsForPolling?: boolean
|
|
3311
|
+
useDebounce?: boolean
|
|
3312
|
+
debounceDelay?: number
|
|
3313
|
+
debounceTickRate?: number
|
|
3314
|
+
followSymlinks?: boolean
|
|
3315
|
+
ignored?: Array<string>
|
|
3316
|
+
}
|
|
Binary file
|