rollup 3.2.0 → 3.2.2
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/dist/bin/rollup +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +49 -30
- package/dist/es/shared/watch.js +6 -6
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.d.ts +21 -20
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +6 -6
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +49 -30
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
package/dist/bin/rollup
CHANGED
package/dist/es/rollup.js
CHANGED
package/dist/es/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.2.2
|
|
4
|
+
Sun, 16 Oct 2022 19:13:40 GMT - commit 9cb38d2e72b88341e0e70938eaeb97f47c2b8c67
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ import { promises } from 'node:fs';
|
|
|
16
16
|
import { EventEmitter } from 'node:events';
|
|
17
17
|
import * as tty from 'tty';
|
|
18
18
|
|
|
19
|
-
var version$1 = "3.2.
|
|
19
|
+
var version$1 = "3.2.2";
|
|
20
20
|
|
|
21
21
|
var charToInteger = {};
|
|
22
22
|
var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -154,7 +154,7 @@ class BitSet {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
let Chunk$1 = class Chunk {
|
|
158
158
|
constructor(start, end, content) {
|
|
159
159
|
this.start = start;
|
|
160
160
|
this.end = end;
|
|
@@ -306,7 +306,7 @@ class Chunk$1 {
|
|
|
306
306
|
if (this.outro.length) return true;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
}
|
|
309
|
+
};
|
|
310
310
|
|
|
311
311
|
function getBtoa () {
|
|
312
312
|
if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
|
|
@@ -1281,7 +1281,7 @@ class MagicString {
|
|
|
1281
1281
|
|
|
1282
1282
|
const hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1283
1283
|
|
|
1284
|
-
|
|
1284
|
+
let Bundle$1 = class Bundle {
|
|
1285
1285
|
constructor(options = {}) {
|
|
1286
1286
|
this.intro = options.intro || '';
|
|
1287
1287
|
this.separator = options.separator !== undefined ? options.separator : '\n';
|
|
@@ -1559,7 +1559,7 @@ class Bundle$1 {
|
|
|
1559
1559
|
|
|
1560
1560
|
return this;
|
|
1561
1561
|
}
|
|
1562
|
-
}
|
|
1562
|
+
};
|
|
1563
1563
|
|
|
1564
1564
|
const ANY_SLASH_REGEX = /[/\\]/;
|
|
1565
1565
|
function relative(from, to) {
|
|
@@ -6572,7 +6572,7 @@ function getSafeName(baseName, usedNames) {
|
|
|
6572
6572
|
return safeName;
|
|
6573
6573
|
}
|
|
6574
6574
|
|
|
6575
|
-
|
|
6575
|
+
let Scope$1 = class Scope {
|
|
6576
6576
|
constructor() {
|
|
6577
6577
|
this.children = [];
|
|
6578
6578
|
this.variables = new Map();
|
|
@@ -6595,7 +6595,7 @@ class Scope$1 {
|
|
|
6595
6595
|
findVariable(_name) {
|
|
6596
6596
|
throw new Error('Internal Error: findVariable needs to be implemented by a subclass');
|
|
6597
6597
|
}
|
|
6598
|
-
}
|
|
6598
|
+
};
|
|
6599
6599
|
|
|
6600
6600
|
class ChildScope extends Scope$1 {
|
|
6601
6601
|
constructor(parent) {
|
|
@@ -9617,9 +9617,20 @@ class ClassDeclaration extends ClassNode {
|
|
|
9617
9617
|
super.parseNode(esTreeNode);
|
|
9618
9618
|
}
|
|
9619
9619
|
render(code, options) {
|
|
9620
|
-
const { exportNamesByVariable, format, snippets: { _ } } = options;
|
|
9621
|
-
if (
|
|
9622
|
-
|
|
9620
|
+
const { exportNamesByVariable, format, snippets: { _, getPropertyAccess } } = options;
|
|
9621
|
+
if (this.id) {
|
|
9622
|
+
const { variable, name } = this.id;
|
|
9623
|
+
if (format === 'system' && exportNamesByVariable.has(variable)) {
|
|
9624
|
+
code.appendLeft(this.end, `${_}${getSystemExportStatement([variable], options)};`);
|
|
9625
|
+
}
|
|
9626
|
+
const renderedVariable = variable.getName(getPropertyAccess);
|
|
9627
|
+
if (renderedVariable !== name) {
|
|
9628
|
+
this.superClass?.render(code, options);
|
|
9629
|
+
this.body.render(code, options);
|
|
9630
|
+
code.prependRight(this.start, `let ${renderedVariable}${_}=${_}`);
|
|
9631
|
+
code.prependLeft(this.end, ';');
|
|
9632
|
+
return;
|
|
9633
|
+
}
|
|
9623
9634
|
}
|
|
9624
9635
|
super.render(code, options);
|
|
9625
9636
|
}
|
|
@@ -11187,8 +11198,13 @@ class Program extends NodeBase {
|
|
|
11187
11198
|
}
|
|
11188
11199
|
}
|
|
11189
11200
|
render(code, options) {
|
|
11201
|
+
let start = this.start;
|
|
11202
|
+
if (code.original.startsWith('#!')) {
|
|
11203
|
+
start = Math.min(code.original.indexOf('\n') + 1, this.end);
|
|
11204
|
+
code.remove(0, start);
|
|
11205
|
+
}
|
|
11190
11206
|
if (this.body.length > 0) {
|
|
11191
|
-
renderStatementList(this.body, code,
|
|
11207
|
+
renderStatementList(this.body, code, start, this.end, options);
|
|
11192
11208
|
}
|
|
11193
11209
|
else {
|
|
11194
11210
|
super.render(code, options);
|
|
@@ -12118,21 +12134,28 @@ class VariableDeclarator extends NodeBase {
|
|
|
12118
12134
|
}
|
|
12119
12135
|
}
|
|
12120
12136
|
render(code, options) {
|
|
12121
|
-
const { exportNamesByVariable, snippets: { _ } } = options;
|
|
12122
|
-
const
|
|
12137
|
+
const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
|
|
12138
|
+
const { end, id, init, start } = this;
|
|
12139
|
+
const renderId = id.included;
|
|
12123
12140
|
if (renderId) {
|
|
12124
|
-
|
|
12141
|
+
id.render(code, options);
|
|
12125
12142
|
}
|
|
12126
12143
|
else {
|
|
12127
|
-
const operatorPos = findFirstOccurrenceOutsideComment(code.original, '=',
|
|
12128
|
-
code.remove(
|
|
12129
|
-
}
|
|
12130
|
-
if (
|
|
12131
|
-
|
|
12144
|
+
const operatorPos = findFirstOccurrenceOutsideComment(code.original, '=', id.end);
|
|
12145
|
+
code.remove(start, findNonWhiteSpace(code.original, operatorPos + 1));
|
|
12146
|
+
}
|
|
12147
|
+
if (init) {
|
|
12148
|
+
if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
|
|
12149
|
+
const renderedVariable = id.variable.getName(getPropertyAccess);
|
|
12150
|
+
if (renderedVariable !== id.name) {
|
|
12151
|
+
code.appendLeft(init.start + 5, ` ${id.name}`);
|
|
12152
|
+
}
|
|
12153
|
+
}
|
|
12154
|
+
init.render(code, options, renderId ? BLANK : { renderedSurroundingElement: ExpressionStatement$1 });
|
|
12132
12155
|
}
|
|
12133
|
-
else if (
|
|
12134
|
-
isReassignedExportsMember(
|
|
12135
|
-
code.appendLeft(
|
|
12156
|
+
else if (id instanceof Identifier &&
|
|
12157
|
+
isReassignedExportsMember(id.variable, exportNamesByVariable)) {
|
|
12158
|
+
code.appendLeft(end, `${_}=${_}void 0`);
|
|
12136
12159
|
}
|
|
12137
12160
|
}
|
|
12138
12161
|
applyDeoptimizations() { }
|
|
@@ -15006,9 +15029,7 @@ class Chunk {
|
|
|
15006
15029
|
const map = module.getExportNamesByVariable();
|
|
15007
15030
|
for (const exportedVariable of map.keys()) {
|
|
15008
15031
|
const isSynthetic = exportedVariable instanceof SyntheticNamedExportVariable;
|
|
15009
|
-
const importedVariable = isSynthetic
|
|
15010
|
-
? exportedVariable.getBaseVariable()
|
|
15011
|
-
: exportedVariable;
|
|
15032
|
+
const importedVariable = isSynthetic ? exportedVariable.getBaseVariable() : exportedVariable;
|
|
15012
15033
|
if (!(importedVariable instanceof NamespaceVariable && this.outputOptions.preserveModules)) {
|
|
15013
15034
|
this.checkCircularDependencyImport(importedVariable, module);
|
|
15014
15035
|
const exportingModule = importedVariable.module;
|
|
@@ -24749,9 +24770,7 @@ const getExternal = (config, overrides) => {
|
|
|
24749
24770
|
? (source, importer, isResolved) => configExternal(source, importer, isResolved) || overrides.external.includes(source)
|
|
24750
24771
|
: [...ensureArray(configExternal), ...overrides.external];
|
|
24751
24772
|
};
|
|
24752
|
-
const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn
|
|
24753
|
-
? warning => config.onwarn(warning, defaultOnWarnHandler)
|
|
24754
|
-
: defaultOnWarnHandler;
|
|
24773
|
+
const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn ? warning => config.onwarn(warning, defaultOnWarnHandler) : defaultOnWarnHandler;
|
|
24755
24774
|
const getObjectOption = (config, overrides, name, objectifyValue = objectifyOption) => {
|
|
24756
24775
|
const commandOption = normalizeObjectOptionValue(overrides[name], objectifyValue);
|
|
24757
24776
|
const configOption = normalizeObjectOptionValue(config[name], objectifyValue);
|
package/dist/es/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.2.2
|
|
4
|
+
Sun, 16 Oct 2022 19:13:40 GMT - commit 9cb38d2e72b88341e0e70938eaeb97f47c2b8c67
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -2711,7 +2711,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
2711
2711
|
/**
|
|
2712
2712
|
* @mixin
|
|
2713
2713
|
*/
|
|
2714
|
-
|
|
2714
|
+
let NodeFsHandler$1 = class NodeFsHandler {
|
|
2715
2715
|
|
|
2716
2716
|
/**
|
|
2717
2717
|
* @param {import("../index").FSWatcher} fsW
|
|
@@ -3067,7 +3067,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
|
|
|
3067
3067
|
}
|
|
3068
3068
|
}
|
|
3069
3069
|
|
|
3070
|
-
}
|
|
3070
|
+
};
|
|
3071
3071
|
|
|
3072
3072
|
var nodefsHandler = NodeFsHandler$1;
|
|
3073
3073
|
|
|
@@ -3287,7 +3287,7 @@ const sameTypes = (info, stats) => (
|
|
|
3287
3287
|
/**
|
|
3288
3288
|
* @mixin
|
|
3289
3289
|
*/
|
|
3290
|
-
|
|
3290
|
+
let FsEventsHandler$1 = class FsEventsHandler {
|
|
3291
3291
|
|
|
3292
3292
|
/**
|
|
3293
3293
|
* @param {import('../index').FSWatcher} fsw
|
|
@@ -3593,7 +3593,7 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
|
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
3595
|
|
|
3596
|
-
}
|
|
3596
|
+
};
|
|
3597
3597
|
|
|
3598
3598
|
fseventsHandler.exports = FsEventsHandler$1;
|
|
3599
3599
|
fseventsHandler.exports.canUse = canUse;
|
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export const VERSION: string;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// utils
|
|
4
|
+
type NullValue = null | undefined | void;
|
|
4
5
|
type MaybeArray<T> = T | T[];
|
|
5
6
|
type MaybePromise<T> = T | Promise<T>;
|
|
6
7
|
|
|
8
|
+
type PartialNull<T> = {
|
|
9
|
+
[P in keyof T]: T[P] | null;
|
|
10
|
+
};
|
|
11
|
+
|
|
7
12
|
export interface RollupError extends RollupLog {
|
|
8
13
|
name?: string;
|
|
9
14
|
stack?: string;
|
|
@@ -82,10 +87,6 @@ export interface SourceMap {
|
|
|
82
87
|
|
|
83
88
|
export type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' };
|
|
84
89
|
|
|
85
|
-
type PartialNull<T> = {
|
|
86
|
-
[P in keyof T]: T[P] | null;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
90
|
interface ModuleOptions {
|
|
90
91
|
assertions: Record<string, string>;
|
|
91
92
|
meta: CustomPluginOptions;
|
|
@@ -224,7 +225,7 @@ interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
|
|
224
225
|
id: string;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
|
-
export type ResolveIdResult = string |
|
|
228
|
+
export type ResolveIdResult = string | NullValue | false | PartialResolvedId;
|
|
228
229
|
|
|
229
230
|
export type ResolveIdHook = (
|
|
230
231
|
this: PluginContext,
|
|
@@ -252,11 +253,11 @@ export type IsExternal = (
|
|
|
252
253
|
isResolved: boolean
|
|
253
254
|
) => boolean;
|
|
254
255
|
|
|
255
|
-
export type IsPureModule = (id: string) => boolean |
|
|
256
|
+
export type IsPureModule = (id: string) => boolean | NullValue;
|
|
256
257
|
|
|
257
258
|
export type HasModuleSideEffects = (id: string, external: boolean) => boolean;
|
|
258
259
|
|
|
259
|
-
export type LoadResult = SourceDescription | string |
|
|
260
|
+
export type LoadResult = SourceDescription | string | NullValue;
|
|
260
261
|
|
|
261
262
|
export type LoadHook = (this: PluginContext, id: string) => LoadResult;
|
|
262
263
|
|
|
@@ -264,7 +265,7 @@ export interface TransformPluginContext extends PluginContext {
|
|
|
264
265
|
getCombinedSourcemap: () => SourceMap;
|
|
265
266
|
}
|
|
266
267
|
|
|
267
|
-
export type TransformResult = string |
|
|
268
|
+
export type TransformResult = string | NullValue | Partial<SourceDescription>;
|
|
268
269
|
|
|
269
270
|
export type TransformHook = (
|
|
270
271
|
this: TransformPluginContext,
|
|
@@ -280,7 +281,7 @@ export type RenderChunkHook = (
|
|
|
280
281
|
chunk: RenderedChunk,
|
|
281
282
|
options: NormalizedOutputOptions,
|
|
282
283
|
meta: { chunks: Record<string, RenderedChunk> }
|
|
283
|
-
) => { code: string; map?: SourceMapInput } | string |
|
|
284
|
+
) => { code: string; map?: SourceMapInput } | string | NullValue;
|
|
284
285
|
|
|
285
286
|
export type ResolveDynamicImportHook = (
|
|
286
287
|
this: PluginContext,
|
|
@@ -293,7 +294,7 @@ export type ResolveImportMetaHook = (
|
|
|
293
294
|
this: PluginContext,
|
|
294
295
|
property: string | null,
|
|
295
296
|
options: { chunkId: string; format: InternalModuleFormat; moduleId: string }
|
|
296
|
-
) => string |
|
|
297
|
+
) => string | NullValue;
|
|
297
298
|
|
|
298
299
|
export type ResolveFileUrlHook = (
|
|
299
300
|
this: PluginContext,
|
|
@@ -305,7 +306,7 @@ export type ResolveFileUrlHook = (
|
|
|
305
306
|
referenceId: string;
|
|
306
307
|
relativePath: string;
|
|
307
308
|
}
|
|
308
|
-
) => string |
|
|
309
|
+
) => string | NullValue;
|
|
309
310
|
|
|
310
311
|
export type AddonHookFunction = (
|
|
311
312
|
this: PluginContext,
|
|
@@ -351,8 +352,8 @@ export interface FunctionPluginHooks {
|
|
|
351
352
|
) => void;
|
|
352
353
|
load: LoadHook;
|
|
353
354
|
moduleParsed: ModuleParsedHook;
|
|
354
|
-
options: (this: MinimalPluginContext, options: InputOptions) => InputOptions |
|
|
355
|
-
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions |
|
|
355
|
+
options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | NullValue;
|
|
356
|
+
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | NullValue;
|
|
356
357
|
renderChunk: RenderChunkHook;
|
|
357
358
|
renderDynamicImport: (
|
|
358
359
|
this: PluginContext,
|
|
@@ -362,7 +363,7 @@ export interface FunctionPluginHooks {
|
|
|
362
363
|
moduleId: string;
|
|
363
364
|
targetModuleId: string | null;
|
|
364
365
|
}
|
|
365
|
-
) => { left: string; right: string } |
|
|
366
|
+
) => { left: string; right: string } | NullValue;
|
|
366
367
|
renderError: (this: PluginContext, error?: Error) => void;
|
|
367
368
|
renderStart: (
|
|
368
369
|
this: PluginContext,
|
|
@@ -481,13 +482,13 @@ interface ManualChunkMeta {
|
|
|
481
482
|
getModuleIds: () => IterableIterator<string>;
|
|
482
483
|
getModuleInfo: GetModuleInfo;
|
|
483
484
|
}
|
|
484
|
-
export type GetManualChunk = (id: string, meta: ManualChunkMeta) => string |
|
|
485
|
+
export type GetManualChunk = (id: string, meta: ManualChunkMeta) => string | NullValue;
|
|
485
486
|
|
|
486
487
|
export type ExternalOption =
|
|
487
488
|
| (string | RegExp)[]
|
|
488
489
|
| string
|
|
489
490
|
| RegExp
|
|
490
|
-
| ((source: string, importer: string | undefined, isResolved: boolean) => boolean |
|
|
491
|
+
| ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
|
|
491
492
|
export type PureModulesOption = boolean | string[] | IsPureModule;
|
|
492
493
|
export type GlobalsOption = { [name: string]: string } | ((name: string) => string);
|
|
493
494
|
export type InputOption = string | string[] | { [entryAlias: string]: string };
|
|
@@ -499,7 +500,7 @@ export type SourcemapPathTransformOption = (
|
|
|
499
500
|
sourcemapPath: string
|
|
500
501
|
) => string;
|
|
501
502
|
|
|
502
|
-
export type InputPluginOption = MaybePromise<Plugin |
|
|
503
|
+
export type InputPluginOption = MaybePromise<Plugin | NullValue | false | InputPluginOption[]>;
|
|
503
504
|
|
|
504
505
|
export interface InputOptions {
|
|
505
506
|
acorn?: Record<string, unknown>;
|
|
@@ -517,7 +518,7 @@ export interface InputOptions {
|
|
|
517
518
|
maxParallelFileOps?: number;
|
|
518
519
|
/** @deprecated Use the "maxParallelFileOps" option instead. */
|
|
519
520
|
maxParallelFileReads?: number;
|
|
520
|
-
moduleContext?: ((id: string) => string |
|
|
521
|
+
moduleContext?: ((id: string) => string | NullValue) | { [id: string]: string };
|
|
521
522
|
onwarn?: WarningHandlerWithDefault;
|
|
522
523
|
perf?: boolean;
|
|
523
524
|
plugins?: InputPluginOption;
|
|
@@ -623,7 +624,7 @@ export type NormalizedAmdOptions = (
|
|
|
623
624
|
|
|
624
625
|
type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
|
|
625
626
|
|
|
626
|
-
type OutputPluginOption = MaybePromise<OutputPlugin |
|
|
627
|
+
type OutputPluginOption = MaybePromise<OutputPlugin | NullValue | false | OutputPluginOption[]>;
|
|
627
628
|
|
|
628
629
|
export interface OutputOptions {
|
|
629
630
|
amd?: AmdOptions;
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.2.2
|
|
4
|
+
Sun, 16 Oct 2022 19:13:40 GMT - commit 9cb38d2e72b88341e0e70938eaeb97f47c2b8c67
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -2705,7 +2705,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
2705
2705
|
/**
|
|
2706
2706
|
* @mixin
|
|
2707
2707
|
*/
|
|
2708
|
-
|
|
2708
|
+
let NodeFsHandler$1 = class NodeFsHandler {
|
|
2709
2709
|
|
|
2710
2710
|
/**
|
|
2711
2711
|
* @param {import("../index").FSWatcher} fsW
|
|
@@ -3061,7 +3061,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
|
|
|
3061
3061
|
}
|
|
3062
3062
|
}
|
|
3063
3063
|
|
|
3064
|
-
}
|
|
3064
|
+
};
|
|
3065
3065
|
|
|
3066
3066
|
var nodefsHandler = NodeFsHandler$1;
|
|
3067
3067
|
|
|
@@ -3281,7 +3281,7 @@ const sameTypes = (info, stats) => (
|
|
|
3281
3281
|
/**
|
|
3282
3282
|
* @mixin
|
|
3283
3283
|
*/
|
|
3284
|
-
|
|
3284
|
+
let FsEventsHandler$1 = class FsEventsHandler {
|
|
3285
3285
|
|
|
3286
3286
|
/**
|
|
3287
3287
|
* @param {import('../index').FSWatcher} fsw
|
|
@@ -3587,7 +3587,7 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
|
|
|
3587
3587
|
}
|
|
3588
3588
|
}
|
|
3589
3589
|
|
|
3590
|
-
}
|
|
3590
|
+
};
|
|
3591
3591
|
|
|
3592
3592
|
fseventsHandler.exports = FsEventsHandler$1;
|
|
3593
3593
|
fseventsHandler.exports.canUse = canUse;
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.2.
|
|
4
|
-
|
|
3
|
+
Rollup.js v3.2.2
|
|
4
|
+
Sun, 16 Oct 2022 19:13:40 GMT - commit 9cb38d2e72b88341e0e70938eaeb97f47c2b8c67
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
|
|
32
32
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
33
33
|
|
|
34
|
-
var version$1 = "3.2.
|
|
34
|
+
var version$1 = "3.2.2";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -978,9 +978,7 @@ const getExternal = (config, overrides) => {
|
|
|
978
978
|
? (source, importer, isResolved) => configExternal(source, importer, isResolved) || overrides.external.includes(source)
|
|
979
979
|
: [...ensureArray$1(configExternal), ...overrides.external];
|
|
980
980
|
};
|
|
981
|
-
const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn
|
|
982
|
-
? warning => config.onwarn(warning, defaultOnWarnHandler)
|
|
983
|
-
: defaultOnWarnHandler;
|
|
981
|
+
const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn ? warning => config.onwarn(warning, defaultOnWarnHandler) : defaultOnWarnHandler;
|
|
984
982
|
const getObjectOption = (config, overrides, name, objectifyValue = objectifyOption) => {
|
|
985
983
|
const commandOption = normalizeObjectOptionValue(overrides[name], objectifyValue);
|
|
986
984
|
const configOption = normalizeObjectOptionValue(config[name], objectifyValue);
|
|
@@ -1359,7 +1357,7 @@ class BitSet {
|
|
|
1359
1357
|
}
|
|
1360
1358
|
}
|
|
1361
1359
|
|
|
1362
|
-
|
|
1360
|
+
let Chunk$1 = class Chunk {
|
|
1363
1361
|
constructor(start, end, content) {
|
|
1364
1362
|
this.start = start;
|
|
1365
1363
|
this.end = end;
|
|
@@ -1511,7 +1509,7 @@ class Chunk$1 {
|
|
|
1511
1509
|
if (this.outro.length) return true;
|
|
1512
1510
|
}
|
|
1513
1511
|
}
|
|
1514
|
-
}
|
|
1512
|
+
};
|
|
1515
1513
|
|
|
1516
1514
|
function getBtoa () {
|
|
1517
1515
|
if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
|
|
@@ -2486,7 +2484,7 @@ class MagicString {
|
|
|
2486
2484
|
|
|
2487
2485
|
const hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2488
2486
|
|
|
2489
|
-
|
|
2487
|
+
let Bundle$1 = class Bundle {
|
|
2490
2488
|
constructor(options = {}) {
|
|
2491
2489
|
this.intro = options.intro || '';
|
|
2492
2490
|
this.separator = options.separator !== undefined ? options.separator : '\n';
|
|
@@ -2764,7 +2762,7 @@ class Bundle$1 {
|
|
|
2764
2762
|
|
|
2765
2763
|
return this;
|
|
2766
2764
|
}
|
|
2767
|
-
}
|
|
2765
|
+
};
|
|
2768
2766
|
|
|
2769
2767
|
const needsEscapeRegEx = /[\n\r'\\\u2028\u2029]/;
|
|
2770
2768
|
const quoteNewlineRegEx = /([\n\r'\u2028\u2029])/g;
|
|
@@ -7085,7 +7083,7 @@ function getSafeName(baseName, usedNames) {
|
|
|
7085
7083
|
return safeName;
|
|
7086
7084
|
}
|
|
7087
7085
|
|
|
7088
|
-
|
|
7086
|
+
let Scope$1 = class Scope {
|
|
7089
7087
|
constructor() {
|
|
7090
7088
|
this.children = [];
|
|
7091
7089
|
this.variables = new Map();
|
|
@@ -7108,7 +7106,7 @@ class Scope$1 {
|
|
|
7108
7106
|
findVariable(_name) {
|
|
7109
7107
|
throw new Error('Internal Error: findVariable needs to be implemented by a subclass');
|
|
7110
7108
|
}
|
|
7111
|
-
}
|
|
7109
|
+
};
|
|
7112
7110
|
|
|
7113
7111
|
class ChildScope extends Scope$1 {
|
|
7114
7112
|
constructor(parent) {
|
|
@@ -10130,9 +10128,20 @@ class ClassDeclaration extends ClassNode {
|
|
|
10130
10128
|
super.parseNode(esTreeNode);
|
|
10131
10129
|
}
|
|
10132
10130
|
render(code, options) {
|
|
10133
|
-
const { exportNamesByVariable, format, snippets: { _ } } = options;
|
|
10134
|
-
if (
|
|
10135
|
-
|
|
10131
|
+
const { exportNamesByVariable, format, snippets: { _, getPropertyAccess } } = options;
|
|
10132
|
+
if (this.id) {
|
|
10133
|
+
const { variable, name } = this.id;
|
|
10134
|
+
if (format === 'system' && exportNamesByVariable.has(variable)) {
|
|
10135
|
+
code.appendLeft(this.end, `${_}${getSystemExportStatement([variable], options)};`);
|
|
10136
|
+
}
|
|
10137
|
+
const renderedVariable = variable.getName(getPropertyAccess);
|
|
10138
|
+
if (renderedVariable !== name) {
|
|
10139
|
+
this.superClass?.render(code, options);
|
|
10140
|
+
this.body.render(code, options);
|
|
10141
|
+
code.prependRight(this.start, `let ${renderedVariable}${_}=${_}`);
|
|
10142
|
+
code.prependLeft(this.end, ';');
|
|
10143
|
+
return;
|
|
10144
|
+
}
|
|
10136
10145
|
}
|
|
10137
10146
|
super.render(code, options);
|
|
10138
10147
|
}
|
|
@@ -11700,8 +11709,13 @@ class Program extends NodeBase {
|
|
|
11700
11709
|
}
|
|
11701
11710
|
}
|
|
11702
11711
|
render(code, options) {
|
|
11712
|
+
let start = this.start;
|
|
11713
|
+
if (code.original.startsWith('#!')) {
|
|
11714
|
+
start = Math.min(code.original.indexOf('\n') + 1, this.end);
|
|
11715
|
+
code.remove(0, start);
|
|
11716
|
+
}
|
|
11703
11717
|
if (this.body.length > 0) {
|
|
11704
|
-
renderStatementList(this.body, code,
|
|
11718
|
+
renderStatementList(this.body, code, start, this.end, options);
|
|
11705
11719
|
}
|
|
11706
11720
|
else {
|
|
11707
11721
|
super.render(code, options);
|
|
@@ -12631,21 +12645,28 @@ class VariableDeclarator extends NodeBase {
|
|
|
12631
12645
|
}
|
|
12632
12646
|
}
|
|
12633
12647
|
render(code, options) {
|
|
12634
|
-
const { exportNamesByVariable, snippets: { _ } } = options;
|
|
12635
|
-
const
|
|
12648
|
+
const { exportNamesByVariable, snippets: { _, getPropertyAccess } } = options;
|
|
12649
|
+
const { end, id, init, start } = this;
|
|
12650
|
+
const renderId = id.included;
|
|
12636
12651
|
if (renderId) {
|
|
12637
|
-
|
|
12652
|
+
id.render(code, options);
|
|
12638
12653
|
}
|
|
12639
12654
|
else {
|
|
12640
|
-
const operatorPos = findFirstOccurrenceOutsideComment(code.original, '=',
|
|
12641
|
-
code.remove(
|
|
12642
|
-
}
|
|
12643
|
-
if (
|
|
12644
|
-
|
|
12655
|
+
const operatorPos = findFirstOccurrenceOutsideComment(code.original, '=', id.end);
|
|
12656
|
+
code.remove(start, findNonWhiteSpace(code.original, operatorPos + 1));
|
|
12657
|
+
}
|
|
12658
|
+
if (init) {
|
|
12659
|
+
if (id instanceof Identifier && init instanceof ClassExpression && !init.id) {
|
|
12660
|
+
const renderedVariable = id.variable.getName(getPropertyAccess);
|
|
12661
|
+
if (renderedVariable !== id.name) {
|
|
12662
|
+
code.appendLeft(init.start + 5, ` ${id.name}`);
|
|
12663
|
+
}
|
|
12664
|
+
}
|
|
12665
|
+
init.render(code, options, renderId ? BLANK : { renderedSurroundingElement: ExpressionStatement$1 });
|
|
12645
12666
|
}
|
|
12646
|
-
else if (
|
|
12647
|
-
isReassignedExportsMember(
|
|
12648
|
-
code.appendLeft(
|
|
12667
|
+
else if (id instanceof Identifier &&
|
|
12668
|
+
isReassignedExportsMember(id.variable, exportNamesByVariable)) {
|
|
12669
|
+
code.appendLeft(end, `${_}=${_}void 0`);
|
|
12649
12670
|
}
|
|
12650
12671
|
}
|
|
12651
12672
|
applyDeoptimizations() { }
|
|
@@ -15519,9 +15540,7 @@ class Chunk {
|
|
|
15519
15540
|
const map = module.getExportNamesByVariable();
|
|
15520
15541
|
for (const exportedVariable of map.keys()) {
|
|
15521
15542
|
const isSynthetic = exportedVariable instanceof SyntheticNamedExportVariable;
|
|
15522
|
-
const importedVariable = isSynthetic
|
|
15523
|
-
? exportedVariable.getBaseVariable()
|
|
15524
|
-
: exportedVariable;
|
|
15543
|
+
const importedVariable = isSynthetic ? exportedVariable.getBaseVariable() : exportedVariable;
|
|
15525
15544
|
if (!(importedVariable instanceof NamespaceVariable && this.outputOptions.preserveModules)) {
|
|
15526
15545
|
this.checkCircularDependencyImport(importedVariable, module);
|
|
15527
15546
|
const exportingModule = importedVariable.module;
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED