@rollup/wasm-node 4.0.0-12 → 4.0.0-14
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.md +0 -36
- package/dist/bin/rollup +3 -3
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +423 -6622
- package/dist/es/shared/watch.js +2 -2
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.d.ts +23 -20
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +417 -6616
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/dist/wasm-node/bindings_wasm.js +28 -28
- package/dist/wasm-node/bindings_wasm_bg.wasm +0 -0
- package/package.json +25 -34
package/dist/es/shared/watch.js
CHANGED
package/dist/getLogFilter.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -93,20 +93,20 @@ export interface SourceMap {
|
|
|
93
93
|
export type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' };
|
|
94
94
|
|
|
95
95
|
interface ModuleOptions {
|
|
96
|
-
|
|
96
|
+
attributes: Record<string, string>;
|
|
97
97
|
meta: CustomPluginOptions;
|
|
98
98
|
moduleSideEffects: boolean | 'no-treeshake';
|
|
99
99
|
syntheticNamedExports: boolean | string;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
|
103
|
-
ast?:
|
|
103
|
+
ast?: AstNode;
|
|
104
104
|
code: string;
|
|
105
105
|
map?: SourceMapInput;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export interface TransformModuleJSON {
|
|
109
|
-
ast?:
|
|
109
|
+
ast?: AstNode;
|
|
110
110
|
code: string;
|
|
111
111
|
// note if plugins use new this.cache to opt-out auto transform cache
|
|
112
112
|
customTransformCache: boolean;
|
|
@@ -117,7 +117,7 @@ export interface TransformModuleJSON {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
|
|
120
|
-
ast:
|
|
120
|
+
ast: AstNode;
|
|
121
121
|
dependencies: string[];
|
|
122
122
|
id: string;
|
|
123
123
|
resolvedIds: ResolvedIdMap;
|
|
@@ -164,6 +164,7 @@ export interface EmittedPrebuiltChunk {
|
|
|
164
164
|
exports?: string[];
|
|
165
165
|
fileName: string;
|
|
166
166
|
map?: SourceMap;
|
|
167
|
+
sourcemapFileName?: string;
|
|
167
168
|
type: 'prebuilt-chunk';
|
|
168
169
|
}
|
|
169
170
|
|
|
@@ -172,7 +173,7 @@ export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
|
|
|
172
173
|
export type EmitFile = (emittedFile: EmittedFile) => string;
|
|
173
174
|
|
|
174
175
|
interface ModuleInfo extends ModuleOptions {
|
|
175
|
-
ast:
|
|
176
|
+
ast: AstNode | null;
|
|
176
177
|
code: string | null;
|
|
177
178
|
dynamicImporters: readonly string[];
|
|
178
179
|
dynamicallyImportedIdResolutions: readonly ResolvedId[];
|
|
@@ -220,13 +221,12 @@ export interface PluginContext extends MinimalPluginContext {
|
|
|
220
221
|
) => Promise<ModuleInfo>;
|
|
221
222
|
/** @deprecated Use `this.getModuleIds` instead */
|
|
222
223
|
moduleIds: IterableIterator<string>;
|
|
223
|
-
|
|
224
|
-
parse: (input: string, options?: any) => AcornNode;
|
|
224
|
+
parse: (input: string) => AstNode;
|
|
225
225
|
resolve: (
|
|
226
226
|
source: string,
|
|
227
227
|
importer?: string,
|
|
228
228
|
options?: {
|
|
229
|
-
|
|
229
|
+
attributes?: Record<string, string>;
|
|
230
230
|
custom?: CustomPluginOptions;
|
|
231
231
|
isEntry?: boolean;
|
|
232
232
|
skipSelf?: boolean;
|
|
@@ -265,13 +265,13 @@ export type ResolveIdHook = (
|
|
|
265
265
|
this: PluginContext,
|
|
266
266
|
source: string,
|
|
267
267
|
importer: string | undefined,
|
|
268
|
-
options: {
|
|
268
|
+
options: { attributes: Record<string, string>; custom?: CustomPluginOptions; isEntry: boolean }
|
|
269
269
|
) => ResolveIdResult;
|
|
270
270
|
|
|
271
271
|
export type ShouldTransformCachedModuleHook = (
|
|
272
272
|
this: PluginContext,
|
|
273
273
|
options: {
|
|
274
|
-
ast:
|
|
274
|
+
ast: AstNode;
|
|
275
275
|
code: string;
|
|
276
276
|
id: string;
|
|
277
277
|
meta: CustomPluginOptions;
|
|
@@ -323,9 +323,9 @@ export type RenderChunkHook = (
|
|
|
323
323
|
|
|
324
324
|
export type ResolveDynamicImportHook = (
|
|
325
325
|
this: PluginContext,
|
|
326
|
-
specifier: string |
|
|
326
|
+
specifier: string | AstNode,
|
|
327
327
|
importer: string,
|
|
328
|
-
options: {
|
|
328
|
+
options: { attributes: Record<string, string> }
|
|
329
329
|
) => ResolveIdResult;
|
|
330
330
|
|
|
331
331
|
export type ResolveImportMetaHook = (
|
|
@@ -370,7 +370,7 @@ export type WatchChangeHook = (
|
|
|
370
370
|
* ```
|
|
371
371
|
*/
|
|
372
372
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
373
|
-
export type PluginImpl<O extends object = object> = (options?: O) => Plugin
|
|
373
|
+
export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
|
|
374
374
|
|
|
375
375
|
export interface OutputBundle {
|
|
376
376
|
[fileName: string]: OutputAsset | OutputChunk;
|
|
@@ -498,9 +498,9 @@ export interface OutputPlugin
|
|
|
498
498
|
version?: string;
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
-
export interface Plugin extends OutputPlugin, Partial<PluginHooks> {
|
|
501
|
+
export interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
|
|
502
502
|
// for inter-plugin communication
|
|
503
|
-
api?:
|
|
503
|
+
api?: A;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';
|
|
@@ -566,8 +566,6 @@ export type SourcemapIgnoreListOption = (
|
|
|
566
566
|
export type InputPluginOption = MaybePromise<Plugin | NullValue | false | InputPluginOption[]>;
|
|
567
567
|
|
|
568
568
|
export interface InputOptions {
|
|
569
|
-
acorn?: Record<string, unknown>;
|
|
570
|
-
acornInjectPlugins?: ((...arguments_: any[]) => unknown)[] | ((...arguments_: any[]) => unknown);
|
|
571
569
|
cache?: boolean | RollupCache;
|
|
572
570
|
context?: string;
|
|
573
571
|
experimentalCacheExpiry?: number;
|
|
@@ -603,8 +601,6 @@ export interface InputOptionsWithPlugins extends InputOptions {
|
|
|
603
601
|
}
|
|
604
602
|
|
|
605
603
|
export interface NormalizedInputOptions {
|
|
606
|
-
acorn: Record<string, unknown>;
|
|
607
|
-
acornInjectPlugins: (() => unknown)[];
|
|
608
604
|
cache: false | undefined | RollupCache;
|
|
609
605
|
context: string;
|
|
610
606
|
experimentalCacheExpiry: number;
|
|
@@ -713,7 +709,9 @@ export interface OutputOptions {
|
|
|
713
709
|
experimentalMinChunkSize?: number;
|
|
714
710
|
exports?: 'default' | 'named' | 'none' | 'auto';
|
|
715
711
|
extend?: boolean;
|
|
712
|
+
/** @deprecated Use "externalImportAttributes" instead. */
|
|
716
713
|
externalImportAssertions?: boolean;
|
|
714
|
+
externalImportAttributes?: boolean;
|
|
717
715
|
externalLiveBindings?: boolean;
|
|
718
716
|
// only required for bundle.write
|
|
719
717
|
file?: string;
|
|
@@ -745,6 +743,7 @@ export interface OutputOptions {
|
|
|
745
743
|
sourcemapBaseUrl?: string;
|
|
746
744
|
sourcemapExcludeSources?: boolean;
|
|
747
745
|
sourcemapFile?: string;
|
|
746
|
+
sourcemapFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
|
|
748
747
|
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption;
|
|
749
748
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
750
749
|
strict?: boolean;
|
|
@@ -769,7 +768,9 @@ export interface NormalizedOutputOptions {
|
|
|
769
768
|
experimentalMinChunkSize: number;
|
|
770
769
|
exports: 'default' | 'named' | 'none' | 'auto';
|
|
771
770
|
extend: boolean;
|
|
771
|
+
/** @deprecated Use "externalImportAttributes" instead. */
|
|
772
772
|
externalImportAssertions: boolean;
|
|
773
|
+
externalImportAttributes: boolean;
|
|
773
774
|
externalLiveBindings: boolean;
|
|
774
775
|
file: string | undefined;
|
|
775
776
|
footer: AddonFunction;
|
|
@@ -800,6 +801,7 @@ export interface NormalizedOutputOptions {
|
|
|
800
801
|
sourcemapBaseUrl: string | undefined;
|
|
801
802
|
sourcemapExcludeSources: boolean;
|
|
802
803
|
sourcemapFile: string | undefined;
|
|
804
|
+
sourcemapFileNames: string | ((chunkInfo: PreRenderedChunk) => string) | undefined;
|
|
803
805
|
sourcemapIgnoreList: SourcemapIgnoreListOption;
|
|
804
806
|
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
|
805
807
|
strict: boolean;
|
|
@@ -863,6 +865,7 @@ export interface RenderedChunk extends PreRenderedChunk {
|
|
|
863
865
|
export interface OutputChunk extends RenderedChunk {
|
|
864
866
|
code: string;
|
|
865
867
|
map: SourceMap | null;
|
|
868
|
+
sourcemapFileName: string | null;
|
|
866
869
|
preliminaryFileName: string;
|
|
867
870
|
}
|
|
868
871
|
|
|
@@ -994,7 +997,7 @@ export type RollupWatcher = AwaitingEventEmitter<{
|
|
|
994
997
|
|
|
995
998
|
export function watch(config: RollupWatchOptions | RollupWatchOptions[]): RollupWatcher;
|
|
996
999
|
|
|
997
|
-
interface
|
|
1000
|
+
interface AstNode {
|
|
998
1001
|
end: number;
|
|
999
1002
|
start: number;
|
|
1000
1003
|
type: string;
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED