rollup 3.22.1 → 3.23.1
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/node-entry.js +83 -12
- package/dist/es/shared/watch.js +2 -6
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.d.ts +9 -1
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +2 -6
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +83 -12
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch-proxy.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +17 -17
package/dist/bin/rollup
CHANGED
package/dist/es/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
Sun,
|
|
3
|
+
Rollup.js v3.23.1
|
|
4
|
+
Sun, 04 Jun 2023 18:41:19 GMT - commit d83684788ef0e8bf0fc4449680960c3783a37def
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ import { createHash as createHash$1 } from 'node:crypto';
|
|
|
15
15
|
import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
16
16
|
import * as tty from 'tty';
|
|
17
17
|
|
|
18
|
-
var version$1 = "3.
|
|
18
|
+
var version$1 = "3.23.1";
|
|
19
19
|
|
|
20
20
|
const comma = ','.charCodeAt(0);
|
|
21
21
|
const semicolon = ';'.charCodeAt(0);
|
|
@@ -2083,6 +2083,12 @@ function isValidUrl(url) {
|
|
|
2083
2083
|
function getRollupUrl(snippet) {
|
|
2084
2084
|
return `https://rollupjs.org/${snippet}`;
|
|
2085
2085
|
}
|
|
2086
|
+
function addTrailingSlashIfMissed(url) {
|
|
2087
|
+
if (!url.endsWith('/')) {
|
|
2088
|
+
return url + '/';
|
|
2089
|
+
}
|
|
2090
|
+
return url;
|
|
2091
|
+
}
|
|
2086
2092
|
|
|
2087
2093
|
// troubleshooting
|
|
2088
2094
|
const URL_AVOIDING_EVAL = 'troubleshooting/#avoiding-eval';
|
|
@@ -7149,6 +7155,13 @@ const IMPURE = {
|
|
|
7149
7155
|
getLiteralValue: getTruthyLiteralValue,
|
|
7150
7156
|
hasEffectsWhenCalled: returnTrue
|
|
7151
7157
|
};
|
|
7158
|
+
const PURE_WITH_ARRAY = {
|
|
7159
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
7160
|
+
getLiteralValue: getTruthyLiteralValue,
|
|
7161
|
+
hasEffectsWhenCalled({ args }) {
|
|
7162
|
+
return args.length > 1 && !(args[1] instanceof ArrayExpression);
|
|
7163
|
+
}
|
|
7164
|
+
};
|
|
7152
7165
|
// We use shortened variables to reduce file size here
|
|
7153
7166
|
/* OBJECT */
|
|
7154
7167
|
const O = {
|
|
@@ -7186,6 +7199,11 @@ const PC = {
|
|
|
7186
7199
|
[ValueProperties]: PURE,
|
|
7187
7200
|
prototype: O
|
|
7188
7201
|
};
|
|
7202
|
+
const PC_WITH_ARRAY = {
|
|
7203
|
+
__proto__: null,
|
|
7204
|
+
[ValueProperties]: PURE_WITH_ARRAY,
|
|
7205
|
+
prototype: O
|
|
7206
|
+
};
|
|
7189
7207
|
const ARRAY_TYPE = {
|
|
7190
7208
|
__proto__: null,
|
|
7191
7209
|
[ValueProperties]: PURE,
|
|
@@ -7256,7 +7274,7 @@ const knownGlobals = {
|
|
|
7256
7274
|
isNaN: PF,
|
|
7257
7275
|
isPrototypeOf: O,
|
|
7258
7276
|
JSON: O,
|
|
7259
|
-
Map:
|
|
7277
|
+
Map: PC_WITH_ARRAY,
|
|
7260
7278
|
Math: {
|
|
7261
7279
|
__proto__: null,
|
|
7262
7280
|
[ValueProperties]: IMPURE,
|
|
@@ -7352,7 +7370,7 @@ const knownGlobals = {
|
|
|
7352
7370
|
ReferenceError: PC,
|
|
7353
7371
|
Reflect: O,
|
|
7354
7372
|
RegExp: PC,
|
|
7355
|
-
Set:
|
|
7373
|
+
Set: PC_WITH_ARRAY,
|
|
7356
7374
|
SharedArrayBuffer: C,
|
|
7357
7375
|
String: {
|
|
7358
7376
|
__proto__: null,
|
|
@@ -7392,8 +7410,8 @@ const knownGlobals = {
|
|
|
7392
7410
|
unescape: PF,
|
|
7393
7411
|
URIError: PC,
|
|
7394
7412
|
valueOf: O,
|
|
7395
|
-
WeakMap:
|
|
7396
|
-
WeakSet:
|
|
7413
|
+
WeakMap: PC_WITH_ARRAY,
|
|
7414
|
+
WeakSet: PC_WITH_ARRAY,
|
|
7397
7415
|
// Additional globals shared by Node and Browser that are not strictly part of the language
|
|
7398
7416
|
clearInterval: C,
|
|
7399
7417
|
clearTimeout: C,
|
|
@@ -24105,10 +24123,10 @@ function reserveFileNameInBundle(fileName, { bundle }, warn) {
|
|
|
24105
24123
|
bundle[fileName] = FILE_PLACEHOLDER;
|
|
24106
24124
|
}
|
|
24107
24125
|
}
|
|
24126
|
+
const emittedFileTypes = new Set(['chunk', 'asset', 'prebuilt-chunk']);
|
|
24108
24127
|
function hasValidType(emittedFile) {
|
|
24109
24128
|
return Boolean(emittedFile &&
|
|
24110
|
-
(emittedFile.type
|
|
24111
|
-
emittedFile.type === 'chunk'));
|
|
24129
|
+
emittedFileTypes.has(emittedFile.type));
|
|
24112
24130
|
}
|
|
24113
24131
|
function hasValidName(emittedFile) {
|
|
24114
24132
|
const validatedName = emittedFile.fileName || emittedFile.name;
|
|
@@ -24146,10 +24164,13 @@ class FileEmitter {
|
|
|
24146
24164
|
this.outputFileEmitters = [];
|
|
24147
24165
|
this.emitFile = (emittedFile) => {
|
|
24148
24166
|
if (!hasValidType(emittedFile)) {
|
|
24149
|
-
return error(errorFailedValidation(`Emitted files must be of type "asset" or "chunk", received "${emittedFile && emittedFile.type}".`));
|
|
24167
|
+
return error(errorFailedValidation(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${emittedFile && emittedFile.type}".`));
|
|
24168
|
+
}
|
|
24169
|
+
if (emittedFile.type === 'prebuilt-chunk') {
|
|
24170
|
+
return this.emitPrebuiltChunk(emittedFile);
|
|
24150
24171
|
}
|
|
24151
24172
|
if (!hasValidName(emittedFile)) {
|
|
24152
|
-
return error(errorFailedValidation(`The "fileName" or "name" properties of emitted
|
|
24173
|
+
return error(errorFailedValidation(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${emittedFile.fileName || emittedFile.name}".`));
|
|
24153
24174
|
}
|
|
24154
24175
|
if (emittedFile.type === 'chunk') {
|
|
24155
24176
|
return this.emitChunk(emittedFile);
|
|
@@ -24169,6 +24190,9 @@ class FileEmitter {
|
|
|
24169
24190
|
if (emittedFile.type === 'chunk') {
|
|
24170
24191
|
return getChunkFileName(emittedFile, this.facadeChunkByModule);
|
|
24171
24192
|
}
|
|
24193
|
+
if (emittedFile.type === 'prebuilt-chunk') {
|
|
24194
|
+
return emittedFile.fileName;
|
|
24195
|
+
}
|
|
24172
24196
|
return getAssetFileName(emittedFile, fileReferenceId);
|
|
24173
24197
|
};
|
|
24174
24198
|
this.setAssetSource = (referenceId, requestedSource) => {
|
|
@@ -24217,6 +24241,9 @@ class FileEmitter {
|
|
|
24217
24241
|
getOrCreate(consumedAssetsByHash, sourceHash, () => []).push(consumedFile);
|
|
24218
24242
|
}
|
|
24219
24243
|
}
|
|
24244
|
+
else if (consumedFile.type === 'prebuilt-chunk') {
|
|
24245
|
+
this.output.bundle[consumedFile.fileName] = this.createPrebuiltChunk(consumedFile);
|
|
24246
|
+
}
|
|
24220
24247
|
}
|
|
24221
24248
|
for (const [sourceHash, consumedFiles] of consumedAssetsByHash) {
|
|
24222
24249
|
this.finalizeAssetsWithSameSource(consumedFiles, sourceHash, output);
|
|
@@ -24243,6 +24270,27 @@ class FileEmitter {
|
|
|
24243
24270
|
}
|
|
24244
24271
|
return referenceId;
|
|
24245
24272
|
}
|
|
24273
|
+
createPrebuiltChunk(prebuiltChunk) {
|
|
24274
|
+
return {
|
|
24275
|
+
code: prebuiltChunk.code,
|
|
24276
|
+
dynamicImports: [],
|
|
24277
|
+
exports: prebuiltChunk.exports || [],
|
|
24278
|
+
facadeModuleId: null,
|
|
24279
|
+
fileName: prebuiltChunk.fileName,
|
|
24280
|
+
implicitlyLoadedBefore: [],
|
|
24281
|
+
importedBindings: {},
|
|
24282
|
+
imports: [],
|
|
24283
|
+
isDynamicEntry: false,
|
|
24284
|
+
isEntry: false,
|
|
24285
|
+
isImplicitEntry: false,
|
|
24286
|
+
map: prebuiltChunk.map || null,
|
|
24287
|
+
moduleIds: [],
|
|
24288
|
+
modules: {},
|
|
24289
|
+
name: prebuiltChunk.fileName,
|
|
24290
|
+
referencedFiles: [],
|
|
24291
|
+
type: 'chunk'
|
|
24292
|
+
};
|
|
24293
|
+
}
|
|
24246
24294
|
emitAsset(emittedAsset) {
|
|
24247
24295
|
const source = emittedAsset.source === undefined
|
|
24248
24296
|
? undefined
|
|
@@ -24298,6 +24346,29 @@ class FileEmitter {
|
|
|
24298
24346
|
});
|
|
24299
24347
|
return this.assignReferenceId(consumedChunk, emittedChunk.id);
|
|
24300
24348
|
}
|
|
24349
|
+
emitPrebuiltChunk(emitPrebuiltChunk) {
|
|
24350
|
+
if (typeof emitPrebuiltChunk.code !== 'string') {
|
|
24351
|
+
return error(errorFailedValidation(`Emitted prebuilt chunks need to have a valid string code, received "${emitPrebuiltChunk.code}".`));
|
|
24352
|
+
}
|
|
24353
|
+
if (typeof emitPrebuiltChunk.fileName !== 'string' ||
|
|
24354
|
+
isPathFragment(emitPrebuiltChunk.fileName)) {
|
|
24355
|
+
return error(errorFailedValidation(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${emitPrebuiltChunk.fileName}".`));
|
|
24356
|
+
}
|
|
24357
|
+
const consumedPrebuiltChunk = {
|
|
24358
|
+
code: emitPrebuiltChunk.code,
|
|
24359
|
+
exports: emitPrebuiltChunk.exports,
|
|
24360
|
+
fileName: emitPrebuiltChunk.fileName,
|
|
24361
|
+
map: emitPrebuiltChunk.map,
|
|
24362
|
+
referenceId: '',
|
|
24363
|
+
type: 'prebuilt-chunk'
|
|
24364
|
+
};
|
|
24365
|
+
const referenceId = this.assignReferenceId(consumedPrebuiltChunk, consumedPrebuiltChunk.fileName);
|
|
24366
|
+
if (this.output) {
|
|
24367
|
+
this.output.bundle[consumedPrebuiltChunk.fileName] =
|
|
24368
|
+
this.createPrebuiltChunk(consumedPrebuiltChunk);
|
|
24369
|
+
}
|
|
24370
|
+
return referenceId;
|
|
24371
|
+
}
|
|
24301
24372
|
finalizeAdditionalAsset(consumedFile, source, { bundle, fileNamesBySource, outputOptions }) {
|
|
24302
24373
|
let { fileName, needsCodeReference, referenceId } = consumedFile;
|
|
24303
24374
|
// Deduplicate assets if an explicit fileName is not provided
|
|
@@ -25782,7 +25853,7 @@ const getSourcemapBaseUrl = (config) => {
|
|
|
25782
25853
|
const { sourcemapBaseUrl } = config;
|
|
25783
25854
|
if (sourcemapBaseUrl) {
|
|
25784
25855
|
if (isValidUrl(sourcemapBaseUrl)) {
|
|
25785
|
-
return sourcemapBaseUrl;
|
|
25856
|
+
return addTrailingSlashIfMissed(sourcemapBaseUrl);
|
|
25786
25857
|
}
|
|
25787
25858
|
return error(errorInvalidOption('output.sourcemapBaseUrl', URL_OUTPUT_SOURCEMAPBASEURL, `must be a valid URL, received ${JSON.stringify(sourcemapBaseUrl)}`));
|
|
25788
25859
|
}
|
package/dist/es/shared/watch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
Sun,
|
|
3
|
+
Rollup.js v3.23.1
|
|
4
|
+
Sun, 04 Jun 2023 18:41:19 GMT - commit d83684788ef0e8bf0fc4449680960c3783a37def
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -2660,10 +2660,6 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
2660
2660
|
const {listener, rawEmitter} = handlers;
|
|
2661
2661
|
let cont = FsWatchFileInstances.get(fullPath);
|
|
2662
2662
|
|
|
2663
|
-
/* eslint-disable no-unused-vars, prefer-destructuring */
|
|
2664
|
-
new Set();
|
|
2665
|
-
new Set();
|
|
2666
|
-
|
|
2667
2663
|
const copts = cont && cont.options;
|
|
2668
2664
|
if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
|
|
2669
2665
|
fs$2.unwatchFile(fullPath);
|
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.d.ts
CHANGED
|
@@ -150,7 +150,15 @@ export interface EmittedChunk {
|
|
|
150
150
|
type: 'chunk';
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
export
|
|
153
|
+
export interface EmittedPrebuiltChunk {
|
|
154
|
+
code: string;
|
|
155
|
+
exports?: string[];
|
|
156
|
+
fileName: string;
|
|
157
|
+
map?: SourceMap;
|
|
158
|
+
type: 'prebuilt-chunk';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
|
|
154
162
|
|
|
155
163
|
export type EmitFile = (emittedFile: EmittedFile) => string;
|
|
156
164
|
|
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
Sun,
|
|
3
|
+
Rollup.js v3.23.1
|
|
4
|
+
Sun, 04 Jun 2023 18:41:19 GMT - commit d83684788ef0e8bf0fc4449680960c3783a37def
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -2656,10 +2656,6 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
2656
2656
|
const {listener, rawEmitter} = handlers;
|
|
2657
2657
|
let cont = FsWatchFileInstances.get(fullPath);
|
|
2658
2658
|
|
|
2659
|
-
/* eslint-disable no-unused-vars, prefer-destructuring */
|
|
2660
|
-
new Set();
|
|
2661
|
-
new Set();
|
|
2662
|
-
|
|
2663
2659
|
const copts = cont && cont.options;
|
|
2664
2660
|
if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
|
|
2665
2661
|
fs$2.unwatchFile(fullPath);
|
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v3.
|
|
4
|
-
Sun,
|
|
3
|
+
Rollup.js v3.23.1
|
|
4
|
+
Sun, 04 Jun 2023 18:41:19 GMT - commit d83684788ef0e8bf0fc4449680960c3783a37def
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@ function _interopNamespaceDefault(e) {
|
|
|
30
30
|
|
|
31
31
|
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
|
32
32
|
|
|
33
|
-
var version$1 = "3.
|
|
33
|
+
var version$1 = "3.23.1";
|
|
34
34
|
|
|
35
35
|
function ensureArray$1(items) {
|
|
36
36
|
if (Array.isArray(items)) {
|
|
@@ -272,6 +272,12 @@ function isValidUrl(url) {
|
|
|
272
272
|
function getRollupUrl(snippet) {
|
|
273
273
|
return `https://rollupjs.org/${snippet}`;
|
|
274
274
|
}
|
|
275
|
+
function addTrailingSlashIfMissed(url) {
|
|
276
|
+
if (!url.endsWith('/')) {
|
|
277
|
+
return url + '/';
|
|
278
|
+
}
|
|
279
|
+
return url;
|
|
280
|
+
}
|
|
275
281
|
|
|
276
282
|
function error(base) {
|
|
277
283
|
if (!(base instanceof Error)) {
|
|
@@ -7644,6 +7650,13 @@ const IMPURE = {
|
|
|
7644
7650
|
getLiteralValue: getTruthyLiteralValue,
|
|
7645
7651
|
hasEffectsWhenCalled: returnTrue
|
|
7646
7652
|
};
|
|
7653
|
+
const PURE_WITH_ARRAY = {
|
|
7654
|
+
deoptimizeArgumentsOnCall: doNothing,
|
|
7655
|
+
getLiteralValue: getTruthyLiteralValue,
|
|
7656
|
+
hasEffectsWhenCalled({ args }) {
|
|
7657
|
+
return args.length > 1 && !(args[1] instanceof ArrayExpression);
|
|
7658
|
+
}
|
|
7659
|
+
};
|
|
7647
7660
|
// We use shortened variables to reduce file size here
|
|
7648
7661
|
/* OBJECT */
|
|
7649
7662
|
const O = {
|
|
@@ -7681,6 +7694,11 @@ const PC = {
|
|
|
7681
7694
|
[ValueProperties]: PURE,
|
|
7682
7695
|
prototype: O
|
|
7683
7696
|
};
|
|
7697
|
+
const PC_WITH_ARRAY = {
|
|
7698
|
+
__proto__: null,
|
|
7699
|
+
[ValueProperties]: PURE_WITH_ARRAY,
|
|
7700
|
+
prototype: O
|
|
7701
|
+
};
|
|
7684
7702
|
const ARRAY_TYPE = {
|
|
7685
7703
|
__proto__: null,
|
|
7686
7704
|
[ValueProperties]: PURE,
|
|
@@ -7751,7 +7769,7 @@ const knownGlobals = {
|
|
|
7751
7769
|
isNaN: PF,
|
|
7752
7770
|
isPrototypeOf: O,
|
|
7753
7771
|
JSON: O,
|
|
7754
|
-
Map:
|
|
7772
|
+
Map: PC_WITH_ARRAY,
|
|
7755
7773
|
Math: {
|
|
7756
7774
|
__proto__: null,
|
|
7757
7775
|
[ValueProperties]: IMPURE,
|
|
@@ -7847,7 +7865,7 @@ const knownGlobals = {
|
|
|
7847
7865
|
ReferenceError: PC,
|
|
7848
7866
|
Reflect: O,
|
|
7849
7867
|
RegExp: PC,
|
|
7850
|
-
Set:
|
|
7868
|
+
Set: PC_WITH_ARRAY,
|
|
7851
7869
|
SharedArrayBuffer: C,
|
|
7852
7870
|
String: {
|
|
7853
7871
|
__proto__: null,
|
|
@@ -7887,8 +7905,8 @@ const knownGlobals = {
|
|
|
7887
7905
|
unescape: PF,
|
|
7888
7906
|
URIError: PC,
|
|
7889
7907
|
valueOf: O,
|
|
7890
|
-
WeakMap:
|
|
7891
|
-
WeakSet:
|
|
7908
|
+
WeakMap: PC_WITH_ARRAY,
|
|
7909
|
+
WeakSet: PC_WITH_ARRAY,
|
|
7892
7910
|
// Additional globals shared by Node and Browser that are not strictly part of the language
|
|
7893
7911
|
clearInterval: C,
|
|
7894
7912
|
clearTimeout: C,
|
|
@@ -24600,10 +24618,10 @@ function reserveFileNameInBundle(fileName, { bundle }, warn) {
|
|
|
24600
24618
|
bundle[fileName] = FILE_PLACEHOLDER;
|
|
24601
24619
|
}
|
|
24602
24620
|
}
|
|
24621
|
+
const emittedFileTypes = new Set(['chunk', 'asset', 'prebuilt-chunk']);
|
|
24603
24622
|
function hasValidType(emittedFile) {
|
|
24604
24623
|
return Boolean(emittedFile &&
|
|
24605
|
-
(emittedFile.type
|
|
24606
|
-
emittedFile.type === 'chunk'));
|
|
24624
|
+
emittedFileTypes.has(emittedFile.type));
|
|
24607
24625
|
}
|
|
24608
24626
|
function hasValidName(emittedFile) {
|
|
24609
24627
|
const validatedName = emittedFile.fileName || emittedFile.name;
|
|
@@ -24641,10 +24659,13 @@ class FileEmitter {
|
|
|
24641
24659
|
this.outputFileEmitters = [];
|
|
24642
24660
|
this.emitFile = (emittedFile) => {
|
|
24643
24661
|
if (!hasValidType(emittedFile)) {
|
|
24644
|
-
return error(errorFailedValidation(`Emitted files must be of type "asset" or "chunk", received "${emittedFile && emittedFile.type}".`));
|
|
24662
|
+
return error(errorFailedValidation(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${emittedFile && emittedFile.type}".`));
|
|
24663
|
+
}
|
|
24664
|
+
if (emittedFile.type === 'prebuilt-chunk') {
|
|
24665
|
+
return this.emitPrebuiltChunk(emittedFile);
|
|
24645
24666
|
}
|
|
24646
24667
|
if (!hasValidName(emittedFile)) {
|
|
24647
|
-
return error(errorFailedValidation(`The "fileName" or "name" properties of emitted
|
|
24668
|
+
return error(errorFailedValidation(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${emittedFile.fileName || emittedFile.name}".`));
|
|
24648
24669
|
}
|
|
24649
24670
|
if (emittedFile.type === 'chunk') {
|
|
24650
24671
|
return this.emitChunk(emittedFile);
|
|
@@ -24664,6 +24685,9 @@ class FileEmitter {
|
|
|
24664
24685
|
if (emittedFile.type === 'chunk') {
|
|
24665
24686
|
return getChunkFileName(emittedFile, this.facadeChunkByModule);
|
|
24666
24687
|
}
|
|
24688
|
+
if (emittedFile.type === 'prebuilt-chunk') {
|
|
24689
|
+
return emittedFile.fileName;
|
|
24690
|
+
}
|
|
24667
24691
|
return getAssetFileName(emittedFile, fileReferenceId);
|
|
24668
24692
|
};
|
|
24669
24693
|
this.setAssetSource = (referenceId, requestedSource) => {
|
|
@@ -24712,6 +24736,9 @@ class FileEmitter {
|
|
|
24712
24736
|
getOrCreate(consumedAssetsByHash, sourceHash, () => []).push(consumedFile);
|
|
24713
24737
|
}
|
|
24714
24738
|
}
|
|
24739
|
+
else if (consumedFile.type === 'prebuilt-chunk') {
|
|
24740
|
+
this.output.bundle[consumedFile.fileName] = this.createPrebuiltChunk(consumedFile);
|
|
24741
|
+
}
|
|
24715
24742
|
}
|
|
24716
24743
|
for (const [sourceHash, consumedFiles] of consumedAssetsByHash) {
|
|
24717
24744
|
this.finalizeAssetsWithSameSource(consumedFiles, sourceHash, output);
|
|
@@ -24738,6 +24765,27 @@ class FileEmitter {
|
|
|
24738
24765
|
}
|
|
24739
24766
|
return referenceId;
|
|
24740
24767
|
}
|
|
24768
|
+
createPrebuiltChunk(prebuiltChunk) {
|
|
24769
|
+
return {
|
|
24770
|
+
code: prebuiltChunk.code,
|
|
24771
|
+
dynamicImports: [],
|
|
24772
|
+
exports: prebuiltChunk.exports || [],
|
|
24773
|
+
facadeModuleId: null,
|
|
24774
|
+
fileName: prebuiltChunk.fileName,
|
|
24775
|
+
implicitlyLoadedBefore: [],
|
|
24776
|
+
importedBindings: {},
|
|
24777
|
+
imports: [],
|
|
24778
|
+
isDynamicEntry: false,
|
|
24779
|
+
isEntry: false,
|
|
24780
|
+
isImplicitEntry: false,
|
|
24781
|
+
map: prebuiltChunk.map || null,
|
|
24782
|
+
moduleIds: [],
|
|
24783
|
+
modules: {},
|
|
24784
|
+
name: prebuiltChunk.fileName,
|
|
24785
|
+
referencedFiles: [],
|
|
24786
|
+
type: 'chunk'
|
|
24787
|
+
};
|
|
24788
|
+
}
|
|
24741
24789
|
emitAsset(emittedAsset) {
|
|
24742
24790
|
const source = emittedAsset.source === undefined
|
|
24743
24791
|
? undefined
|
|
@@ -24793,6 +24841,29 @@ class FileEmitter {
|
|
|
24793
24841
|
});
|
|
24794
24842
|
return this.assignReferenceId(consumedChunk, emittedChunk.id);
|
|
24795
24843
|
}
|
|
24844
|
+
emitPrebuiltChunk(emitPrebuiltChunk) {
|
|
24845
|
+
if (typeof emitPrebuiltChunk.code !== 'string') {
|
|
24846
|
+
return error(errorFailedValidation(`Emitted prebuilt chunks need to have a valid string code, received "${emitPrebuiltChunk.code}".`));
|
|
24847
|
+
}
|
|
24848
|
+
if (typeof emitPrebuiltChunk.fileName !== 'string' ||
|
|
24849
|
+
isPathFragment(emitPrebuiltChunk.fileName)) {
|
|
24850
|
+
return error(errorFailedValidation(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${emitPrebuiltChunk.fileName}".`));
|
|
24851
|
+
}
|
|
24852
|
+
const consumedPrebuiltChunk = {
|
|
24853
|
+
code: emitPrebuiltChunk.code,
|
|
24854
|
+
exports: emitPrebuiltChunk.exports,
|
|
24855
|
+
fileName: emitPrebuiltChunk.fileName,
|
|
24856
|
+
map: emitPrebuiltChunk.map,
|
|
24857
|
+
referenceId: '',
|
|
24858
|
+
type: 'prebuilt-chunk'
|
|
24859
|
+
};
|
|
24860
|
+
const referenceId = this.assignReferenceId(consumedPrebuiltChunk, consumedPrebuiltChunk.fileName);
|
|
24861
|
+
if (this.output) {
|
|
24862
|
+
this.output.bundle[consumedPrebuiltChunk.fileName] =
|
|
24863
|
+
this.createPrebuiltChunk(consumedPrebuiltChunk);
|
|
24864
|
+
}
|
|
24865
|
+
return referenceId;
|
|
24866
|
+
}
|
|
24796
24867
|
finalizeAdditionalAsset(consumedFile, source, { bundle, fileNamesBySource, outputOptions }) {
|
|
24797
24868
|
let { fileName, needsCodeReference, referenceId } = consumedFile;
|
|
24798
24869
|
// Deduplicate assets if an explicit fileName is not provided
|
|
@@ -26181,7 +26252,7 @@ const getSourcemapBaseUrl = (config) => {
|
|
|
26181
26252
|
const { sourcemapBaseUrl } = config;
|
|
26182
26253
|
if (sourcemapBaseUrl) {
|
|
26183
26254
|
if (isValidUrl(sourcemapBaseUrl)) {
|
|
26184
|
-
return sourcemapBaseUrl;
|
|
26255
|
+
return addTrailingSlashIfMissed(sourcemapBaseUrl);
|
|
26185
26256
|
}
|
|
26186
26257
|
return error(errorInvalidOption('output.sourcemapBaseUrl', URL_OUTPUT_SOURCEMAPBASEURL, `must be a valid URL, received ${JSON.stringify(sourcemapBaseUrl)}`));
|
|
26187
26258
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.23.1",
|
|
4
4
|
"description": "Next-generation ES module bundler",
|
|
5
5
|
"main": "dist/rollup.js",
|
|
6
6
|
"module": "dist/es/rollup.js",
|
|
@@ -65,27 +65,27 @@
|
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@codemirror/commands": "^6.2.4",
|
|
67
67
|
"@codemirror/lang-javascript": "^6.1.8",
|
|
68
|
-
"@codemirror/language": "^6.
|
|
68
|
+
"@codemirror/language": "^6.7.0",
|
|
69
69
|
"@codemirror/search": "^6.4.0",
|
|
70
|
-
"@codemirror/state": "^6.2.
|
|
71
|
-
"@codemirror/view": "^6.
|
|
70
|
+
"@codemirror/state": "^6.2.1",
|
|
71
|
+
"@codemirror/view": "^6.12.0",
|
|
72
72
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
73
73
|
"@mermaid-js/mermaid-cli": "^10.1.0",
|
|
74
74
|
"@rollup/plugin-alias": "^5.0.0",
|
|
75
75
|
"@rollup/plugin-buble": "^1.0.2",
|
|
76
76
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
77
77
|
"@rollup/plugin-json": "^6.0.0",
|
|
78
|
-
"@rollup/plugin-node-resolve": "^15.0
|
|
78
|
+
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
79
79
|
"@rollup/plugin-replace": "^5.0.2",
|
|
80
80
|
"@rollup/plugin-terser": "^0.4.3",
|
|
81
81
|
"@rollup/plugin-typescript": "^11.1.1",
|
|
82
82
|
"@rollup/pluginutils": "^5.0.2",
|
|
83
83
|
"@types/estree": "1.0.1",
|
|
84
84
|
"@types/mocha": "^10.0.1",
|
|
85
|
-
"@types/node": "~14.18.
|
|
85
|
+
"@types/node": "~14.18.48",
|
|
86
86
|
"@types/yargs-parser": "^21.0.0",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
88
|
-
"@typescript-eslint/parser": "^5.59.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
|
88
|
+
"@typescript-eslint/parser": "^5.59.8",
|
|
89
89
|
"@vue/eslint-config-prettier": "^7.1.0",
|
|
90
90
|
"@vue/eslint-config-typescript": "^11.0.3",
|
|
91
91
|
"acorn": "^8.8.2",
|
|
@@ -101,31 +101,31 @@
|
|
|
101
101
|
"date-time": "^4.0.0",
|
|
102
102
|
"es5-shim": "^4.6.7",
|
|
103
103
|
"es6-shim": "^0.35.8",
|
|
104
|
-
"eslint": "^8.
|
|
104
|
+
"eslint": "^8.41.0",
|
|
105
105
|
"eslint-config-prettier": "^8.8.0",
|
|
106
106
|
"eslint-plugin-import": "^2.27.5",
|
|
107
107
|
"eslint-plugin-prettier": "^4.2.1",
|
|
108
108
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
109
|
-
"eslint-plugin-vue": "^9.
|
|
109
|
+
"eslint-plugin-vue": "^9.14.1",
|
|
110
110
|
"fixturify": "^3.0.0",
|
|
111
111
|
"flru": "^1.0.2",
|
|
112
112
|
"fs-extra": "^11.1.1",
|
|
113
113
|
"github-api": "^3.4.0",
|
|
114
114
|
"hash.js": "^1.1.7",
|
|
115
115
|
"husky": "^8.0.3",
|
|
116
|
-
"inquirer": "^9.2.
|
|
116
|
+
"inquirer": "^9.2.6",
|
|
117
117
|
"is-reference": "^3.0.1",
|
|
118
118
|
"lint-staged": "^13.2.2",
|
|
119
119
|
"locate-character": "^2.0.5",
|
|
120
120
|
"magic-string": "^0.30.0",
|
|
121
121
|
"mocha": "^10.2.0",
|
|
122
122
|
"nyc": "^15.1.0",
|
|
123
|
-
"pinia": "^2.1.
|
|
123
|
+
"pinia": "^2.1.3",
|
|
124
124
|
"prettier": "^2.8.8",
|
|
125
125
|
"pretty-bytes": "^6.1.0",
|
|
126
126
|
"pretty-ms": "^8.0.0",
|
|
127
127
|
"requirejs": "^2.3.6",
|
|
128
|
-
"rollup": "^3.
|
|
128
|
+
"rollup": "^3.23.0",
|
|
129
129
|
"rollup-plugin-license": "^3.0.1",
|
|
130
130
|
"rollup-plugin-string": "^3.0.0",
|
|
131
131
|
"rollup-plugin-thatworks": "^1.0.4",
|
|
@@ -135,11 +135,11 @@
|
|
|
135
135
|
"source-map": "^0.7.4",
|
|
136
136
|
"source-map-support": "^0.5.21",
|
|
137
137
|
"systemjs": "^6.14.1",
|
|
138
|
-
"terser": "^5.17.
|
|
139
|
-
"tslib": "^2.5.
|
|
138
|
+
"terser": "^5.17.6",
|
|
139
|
+
"tslib": "^2.5.2",
|
|
140
140
|
"typescript": "^5.0.4",
|
|
141
|
-
"vitepress": "^1.0.0-
|
|
142
|
-
"vue": "^3.3.
|
|
141
|
+
"vitepress": "^1.0.0-beta.1",
|
|
142
|
+
"vue": "^3.3.4",
|
|
143
143
|
"weak-napi": "^2.0.2",
|
|
144
144
|
"yargs-parser": "^21.1.1"
|
|
145
145
|
},
|