rollup 3.2.2 → 3.2.4
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 +18 -13
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/rollup.js +18 -13
- 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.4
|
|
4
|
+
Mon, 31 Oct 2022 19:14:16 GMT - commit bac9826579aff66109b29c48aa4f0731792f6a26
|
|
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.4";
|
|
20
20
|
|
|
21
21
|
var charToInteger = {};
|
|
22
22
|
var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -10925,6 +10925,7 @@ class LogicalExpression extends NodeBase {
|
|
|
10925
10925
|
}
|
|
10926
10926
|
|
|
10927
10927
|
const FILE_PREFIX = 'ROLLUP_FILE_URL_';
|
|
10928
|
+
const IMPORT = 'import';
|
|
10928
10929
|
class MetaProperty extends NodeBase {
|
|
10929
10930
|
constructor() {
|
|
10930
10931
|
super(...arguments);
|
|
@@ -10933,8 +10934,8 @@ class MetaProperty extends NodeBase {
|
|
|
10933
10934
|
this.referenceId = null;
|
|
10934
10935
|
}
|
|
10935
10936
|
getReferencedFileName(outputPluginDriver) {
|
|
10936
|
-
const { metaProperty } = this;
|
|
10937
|
-
if (metaProperty?.startsWith(FILE_PREFIX)) {
|
|
10937
|
+
const { meta: { name }, metaProperty } = this;
|
|
10938
|
+
if (name === IMPORT && metaProperty?.startsWith(FILE_PREFIX)) {
|
|
10938
10939
|
return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
|
|
10939
10940
|
}
|
|
10940
10941
|
return null;
|
|
@@ -10948,7 +10949,7 @@ class MetaProperty extends NodeBase {
|
|
|
10948
10949
|
include() {
|
|
10949
10950
|
if (!this.included) {
|
|
10950
10951
|
this.included = true;
|
|
10951
|
-
if (this.meta.name ===
|
|
10952
|
+
if (this.meta.name === IMPORT) {
|
|
10952
10953
|
this.context.addImportMeta(this);
|
|
10953
10954
|
const parent = this.parent;
|
|
10954
10955
|
const metaProperty = (this.metaProperty =
|
|
@@ -10962,7 +10963,9 @@ class MetaProperty extends NodeBase {
|
|
|
10962
10963
|
}
|
|
10963
10964
|
}
|
|
10964
10965
|
render(code, { format, pluginDriver, snippets }) {
|
|
10965
|
-
const { context: { module: { id: moduleId } }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
|
|
10966
|
+
const { context: { module: { id: moduleId } }, meta: { name }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
|
|
10967
|
+
if (name !== IMPORT)
|
|
10968
|
+
return;
|
|
10966
10969
|
const chunkId = preliminaryChunkId;
|
|
10967
10970
|
if (referenceId) {
|
|
10968
10971
|
const fileName = pluginDriver.getFileName(referenceId);
|
|
@@ -11011,7 +11014,7 @@ const accessedFileUrlGlobals = {
|
|
|
11011
11014
|
umd: ['document', 'require', 'URL']
|
|
11012
11015
|
};
|
|
11013
11016
|
const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
|
|
11014
|
-
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${relativePath}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
|
|
11017
|
+
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
|
|
11015
11018
|
const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
11016
11019
|
const urlMechanism = getUrl(chunkId);
|
|
11017
11020
|
return property === null
|
|
@@ -11020,7 +11023,7 @@ const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
|
11020
11023
|
? urlMechanism
|
|
11021
11024
|
: 'undefined';
|
|
11022
11025
|
};
|
|
11023
|
-
const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.src || new URL('${chunkId}', document.baseURI).href)`;
|
|
11026
|
+
const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
|
|
11024
11027
|
const relativeUrlMechanisms = {
|
|
11025
11028
|
amd: relativePath => {
|
|
11026
11029
|
if (relativePath[0] !== '.')
|
|
@@ -12302,9 +12305,11 @@ class NamespaceVariable extends Variable {
|
|
|
12302
12305
|
this.references.push(identifier);
|
|
12303
12306
|
this.name = identifier.name;
|
|
12304
12307
|
}
|
|
12305
|
-
getLiteralValueAtPath() {
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
+
getLiteralValueAtPath(path) {
|
|
12309
|
+
if (path[0] === SymbolToStringTag) {
|
|
12310
|
+
return 'Module';
|
|
12311
|
+
}
|
|
12312
|
+
return UnknownValue;
|
|
12308
12313
|
}
|
|
12309
12314
|
getMemberVariables() {
|
|
12310
12315
|
if (this.memberVariables) {
|
|
@@ -15251,7 +15256,7 @@ class Chunk {
|
|
|
15251
15256
|
if (predefinedChunkName)
|
|
15252
15257
|
return predefinedChunkName;
|
|
15253
15258
|
const { preserveModulesRoot, sanitizeFileName } = this.outputOptions;
|
|
15254
|
-
const sanitizedId = sanitizeFileName(module.id.split(QUERY_HASH_REGEX, 1)[0]);
|
|
15259
|
+
const sanitizedId = sanitizeFileName(normalize(module.id.split(QUERY_HASH_REGEX, 1)[0]));
|
|
15255
15260
|
const extensionName = extname(sanitizedId);
|
|
15256
15261
|
const idWithoutExtension = NON_ASSET_EXTENSIONS.has(extensionName)
|
|
15257
15262
|
? sanitizedId.slice(0, -extensionName.length)
|
package/dist/es/shared/watch.js
CHANGED
package/dist/loadConfigFile.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
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.4
|
|
4
|
+
Mon, 31 Oct 2022 19:14:16 GMT - commit bac9826579aff66109b29c48aa4f0731792f6a26
|
|
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.4";
|
|
35
35
|
|
|
36
36
|
function ensureArray$1(items) {
|
|
37
37
|
if (Array.isArray(items)) {
|
|
@@ -11436,6 +11436,7 @@ class LogicalExpression extends NodeBase {
|
|
|
11436
11436
|
}
|
|
11437
11437
|
|
|
11438
11438
|
const FILE_PREFIX = 'ROLLUP_FILE_URL_';
|
|
11439
|
+
const IMPORT = 'import';
|
|
11439
11440
|
class MetaProperty extends NodeBase {
|
|
11440
11441
|
constructor() {
|
|
11441
11442
|
super(...arguments);
|
|
@@ -11444,8 +11445,8 @@ class MetaProperty extends NodeBase {
|
|
|
11444
11445
|
this.referenceId = null;
|
|
11445
11446
|
}
|
|
11446
11447
|
getReferencedFileName(outputPluginDriver) {
|
|
11447
|
-
const { metaProperty } = this;
|
|
11448
|
-
if (metaProperty?.startsWith(FILE_PREFIX)) {
|
|
11448
|
+
const { meta: { name }, metaProperty } = this;
|
|
11449
|
+
if (name === IMPORT && metaProperty?.startsWith(FILE_PREFIX)) {
|
|
11449
11450
|
return outputPluginDriver.getFileName(metaProperty.slice(FILE_PREFIX.length));
|
|
11450
11451
|
}
|
|
11451
11452
|
return null;
|
|
@@ -11459,7 +11460,7 @@ class MetaProperty extends NodeBase {
|
|
|
11459
11460
|
include() {
|
|
11460
11461
|
if (!this.included) {
|
|
11461
11462
|
this.included = true;
|
|
11462
|
-
if (this.meta.name ===
|
|
11463
|
+
if (this.meta.name === IMPORT) {
|
|
11463
11464
|
this.context.addImportMeta(this);
|
|
11464
11465
|
const parent = this.parent;
|
|
11465
11466
|
const metaProperty = (this.metaProperty =
|
|
@@ -11473,7 +11474,9 @@ class MetaProperty extends NodeBase {
|
|
|
11473
11474
|
}
|
|
11474
11475
|
}
|
|
11475
11476
|
render(code, { format, pluginDriver, snippets }) {
|
|
11476
|
-
const { context: { module: { id: moduleId } }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
|
|
11477
|
+
const { context: { module: { id: moduleId } }, meta: { name }, metaProperty, parent, preliminaryChunkId, referenceId, start, end } = this;
|
|
11478
|
+
if (name !== IMPORT)
|
|
11479
|
+
return;
|
|
11477
11480
|
const chunkId = preliminaryChunkId;
|
|
11478
11481
|
if (referenceId) {
|
|
11479
11482
|
const fileName = pluginDriver.getFileName(referenceId);
|
|
@@ -11522,7 +11525,7 @@ const accessedFileUrlGlobals = {
|
|
|
11522
11525
|
umd: ['document', 'require', 'URL']
|
|
11523
11526
|
};
|
|
11524
11527
|
const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
|
|
11525
|
-
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${relativePath}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
|
|
11528
|
+
const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
|
|
11526
11529
|
const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
11527
11530
|
const urlMechanism = getUrl(chunkId);
|
|
11528
11531
|
return property === null
|
|
@@ -11531,7 +11534,7 @@ const getGenericImportMetaMechanism = (getUrl) => (property, { chunkId }) => {
|
|
|
11531
11534
|
? urlMechanism
|
|
11532
11535
|
: 'undefined';
|
|
11533
11536
|
};
|
|
11534
|
-
const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.src || new URL('${chunkId}', document.baseURI).href)`;
|
|
11537
|
+
const getUrlFromDocument = (chunkId, umd = false) => `${umd ? `typeof document === 'undefined' ? location.href : ` : ''}(document.currentScript && document.currentScript.src || new URL('${escapeId(chunkId)}', document.baseURI).href)`;
|
|
11535
11538
|
const relativeUrlMechanisms = {
|
|
11536
11539
|
amd: relativePath => {
|
|
11537
11540
|
if (relativePath[0] !== '.')
|
|
@@ -12813,9 +12816,11 @@ class NamespaceVariable extends Variable {
|
|
|
12813
12816
|
this.references.push(identifier);
|
|
12814
12817
|
this.name = identifier.name;
|
|
12815
12818
|
}
|
|
12816
|
-
getLiteralValueAtPath() {
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
+
getLiteralValueAtPath(path) {
|
|
12820
|
+
if (path[0] === SymbolToStringTag) {
|
|
12821
|
+
return 'Module';
|
|
12822
|
+
}
|
|
12823
|
+
return UnknownValue;
|
|
12819
12824
|
}
|
|
12820
12825
|
getMemberVariables() {
|
|
12821
12826
|
if (this.memberVariables) {
|
|
@@ -15762,7 +15767,7 @@ class Chunk {
|
|
|
15762
15767
|
if (predefinedChunkName)
|
|
15763
15768
|
return predefinedChunkName;
|
|
15764
15769
|
const { preserveModulesRoot, sanitizeFileName } = this.outputOptions;
|
|
15765
|
-
const sanitizedId = sanitizeFileName(module.id.split(QUERY_HASH_REGEX, 1)[0]);
|
|
15770
|
+
const sanitizedId = sanitizeFileName(normalize(module.id.split(QUERY_HASH_REGEX, 1)[0]));
|
|
15766
15771
|
const extensionName = node_path.extname(sanitizedId);
|
|
15767
15772
|
const idWithoutExtension = NON_ASSET_EXTENSIONS.has(extensionName)
|
|
15768
15773
|
? sanitizedId.slice(0, -extensionName.length)
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED