rollup 2.69.0 → 2.69.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/CHANGELOG.md +12 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +38 -45
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +38 -45
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +1 -1
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 v2.69.
|
|
4
|
-
|
|
3
|
+
Rollup.js v2.69.1
|
|
4
|
+
Fri, 04 Mar 2022 13:38:38 GMT - commit 994c1eccf4d53e416a010f47e54a2086f1a0f4e9
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
@@ -28,7 +28,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
28
|
return n;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var version$1 = "2.69.
|
|
31
|
+
var version$1 = "2.69.1";
|
|
32
32
|
|
|
33
33
|
function ensureArray$1(items) {
|
|
34
34
|
if (Array.isArray(items)) {
|
|
@@ -12151,29 +12151,23 @@ function getId(m) {
|
|
|
12151
12151
|
|
|
12152
12152
|
function getOriginalLocation(sourcemapChain, location) {
|
|
12153
12153
|
const filteredSourcemapChain = sourcemapChain.filter((sourcemap) => !!sourcemap.mappings);
|
|
12154
|
-
while (filteredSourcemapChain.length > 0) {
|
|
12154
|
+
traceSourcemap: while (filteredSourcemapChain.length > 0) {
|
|
12155
12155
|
const sourcemap = filteredSourcemapChain.pop();
|
|
12156
12156
|
const line = sourcemap.mappings[location.line - 1];
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
break;
|
|
12157
|
+
if (line) {
|
|
12158
|
+
const filteredLine = line.filter((segment) => segment.length > 1);
|
|
12159
|
+
const lastSegment = filteredLine[filteredLine.length - 1];
|
|
12160
|
+
for (const segment of filteredLine) {
|
|
12161
|
+
if (segment[0] >= location.column || segment === lastSegment) {
|
|
12163
12162
|
location = {
|
|
12164
12163
|
column: segment[3],
|
|
12165
|
-
line: segment[2] + 1
|
|
12166
|
-
name: segment.length === 5 ? sourcemap.names[segment[4]] : undefined,
|
|
12167
|
-
source: sourcemap.sources[segment[1]]
|
|
12164
|
+
line: segment[2] + 1
|
|
12168
12165
|
};
|
|
12169
|
-
|
|
12170
|
-
break;
|
|
12166
|
+
continue traceSourcemap;
|
|
12171
12167
|
}
|
|
12172
12168
|
}
|
|
12173
12169
|
}
|
|
12174
|
-
|
|
12175
|
-
throw new Error("Can't resolve original location of error.");
|
|
12176
|
-
}
|
|
12170
|
+
throw new Error("Can't resolve original location of error.");
|
|
12177
12171
|
}
|
|
12178
12172
|
return location;
|
|
12179
12173
|
}
|
|
@@ -13927,6 +13921,7 @@ class Link {
|
|
|
13927
13921
|
}
|
|
13928
13922
|
traceMappings() {
|
|
13929
13923
|
const sources = [];
|
|
13924
|
+
const sourceIndexMap = new Map();
|
|
13930
13925
|
const sourcesContent = [];
|
|
13931
13926
|
const names = [];
|
|
13932
13927
|
const nameIndexMap = new Map();
|
|
@@ -13934,41 +13929,36 @@ class Link {
|
|
|
13934
13929
|
for (const line of this.mappings) {
|
|
13935
13930
|
const tracedLine = [];
|
|
13936
13931
|
for (const segment of line) {
|
|
13937
|
-
if (segment.length
|
|
13932
|
+
if (segment.length === 1)
|
|
13938
13933
|
continue;
|
|
13939
13934
|
const source = this.sources[segment[1]];
|
|
13940
13935
|
if (!source)
|
|
13941
13936
|
continue;
|
|
13942
13937
|
const traced = source.traceSegment(segment[2], segment[3], segment.length === 5 ? this.names[segment[4]] : '');
|
|
13943
13938
|
if (traced) {
|
|
13944
|
-
|
|
13945
|
-
let sourceIndex =
|
|
13946
|
-
if (sourceIndex ===
|
|
13939
|
+
const { column, line, name, source: { content, filename } } = traced;
|
|
13940
|
+
let sourceIndex = sourceIndexMap.get(filename);
|
|
13941
|
+
if (sourceIndex === undefined) {
|
|
13947
13942
|
sourceIndex = sources.length;
|
|
13948
|
-
sources.push(
|
|
13949
|
-
|
|
13943
|
+
sources.push(filename);
|
|
13944
|
+
sourceIndexMap.set(filename, sourceIndex);
|
|
13945
|
+
sourcesContent[sourceIndex] = content;
|
|
13950
13946
|
}
|
|
13951
13947
|
else if (sourcesContent[sourceIndex] == null) {
|
|
13952
|
-
sourcesContent[sourceIndex] =
|
|
13948
|
+
sourcesContent[sourceIndex] = content;
|
|
13953
13949
|
}
|
|
13954
|
-
else if (
|
|
13955
|
-
sourcesContent[sourceIndex] !== traced.source.content) {
|
|
13950
|
+
else if (content != null && sourcesContent[sourceIndex] !== content) {
|
|
13956
13951
|
return error({
|
|
13957
|
-
message: `Multiple conflicting contents for sourcemap source ${
|
|
13952
|
+
message: `Multiple conflicting contents for sourcemap source ${filename}`
|
|
13958
13953
|
});
|
|
13959
13954
|
}
|
|
13960
|
-
const tracedSegment = [
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
traced.line,
|
|
13964
|
-
traced.column
|
|
13965
|
-
];
|
|
13966
|
-
if (traced.name) {
|
|
13967
|
-
let nameIndex = nameIndexMap.get(traced.name);
|
|
13955
|
+
const tracedSegment = [segment[0], sourceIndex, line, column];
|
|
13956
|
+
if (name) {
|
|
13957
|
+
let nameIndex = nameIndexMap.get(name);
|
|
13968
13958
|
if (nameIndex === undefined) {
|
|
13969
13959
|
nameIndex = names.length;
|
|
13970
|
-
names.push(
|
|
13971
|
-
nameIndexMap.set(
|
|
13960
|
+
names.push(name);
|
|
13961
|
+
nameIndexMap.set(name, nameIndex);
|
|
13972
13962
|
}
|
|
13973
13963
|
tracedSegment[4] = nameIndex;
|
|
13974
13964
|
}
|
|
@@ -13984,12 +13974,15 @@ class Link {
|
|
|
13984
13974
|
if (!segments)
|
|
13985
13975
|
return null;
|
|
13986
13976
|
// binary search through segments for the given column
|
|
13987
|
-
let
|
|
13988
|
-
let
|
|
13989
|
-
while (
|
|
13990
|
-
const m = (
|
|
13977
|
+
let searchStart = 0;
|
|
13978
|
+
let searchEnd = segments.length - 1;
|
|
13979
|
+
while (searchStart <= searchEnd) {
|
|
13980
|
+
const m = (searchStart + searchEnd) >> 1;
|
|
13991
13981
|
const segment = segments[m];
|
|
13992
|
-
|
|
13982
|
+
// If a sourcemap does not have sufficient resolution to contain a
|
|
13983
|
+
// necessary mapping, e.g. because it only contains line information, we
|
|
13984
|
+
// use the best approximation we could find
|
|
13985
|
+
if (segment[0] === column || searchStart === searchEnd) {
|
|
13993
13986
|
if (segment.length == 1)
|
|
13994
13987
|
return null;
|
|
13995
13988
|
const source = this.sources[segment[1]];
|
|
@@ -13998,10 +13991,10 @@ class Link {
|
|
|
13998
13991
|
return source.traceSegment(segment[2], segment[3], segment.length === 5 ? this.names[segment[4]] : name);
|
|
13999
13992
|
}
|
|
14000
13993
|
if (segment[0] > column) {
|
|
14001
|
-
|
|
13994
|
+
searchEnd = m - 1;
|
|
14002
13995
|
}
|
|
14003
13996
|
else {
|
|
14004
|
-
|
|
13997
|
+
searchStart = m + 1;
|
|
14005
13998
|
}
|
|
14006
13999
|
}
|
|
14007
14000
|
return null;
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED