vite 2.0.4 → 2.1.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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

@@ -42,7 +42,7 @@ const intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345
42
42
  /**
43
43
  * Encode an integer in the range of 0 to 63 to a single base 64 digit.
44
44
  */
45
- var encode = function(number) {
45
+ var encode$1 = function(number) {
46
46
  if (0 <= number && number < intToCharMap.length) {
47
47
  return intToCharMap[number];
48
48
  }
@@ -50,7 +50,7 @@ var encode = function(number) {
50
50
  };
51
51
 
52
52
  var base64 = {
53
- encode: encode
53
+ encode: encode$1
54
54
  };
55
55
 
56
56
  /* -*- Mode: js; js-indent-level: 2; -*- */
@@ -131,7 +131,7 @@ function toVLQSigned(aValue) {
131
131
  /**
132
132
  * Returns the base 64 VLQ encoded value.
133
133
  */
134
- var encode$1 = function base64VLQ_encode(aValue) {
134
+ var encode = function base64VLQ_encode(aValue) {
135
135
  let encoded = "";
136
136
  let digit;
137
137
 
@@ -152,7 +152,7 @@ var encode$1 = function base64VLQ_encode(aValue) {
152
152
  };
153
153
 
154
154
  var base64Vlq = {
155
- encode: encode$1
155
+ encode: encode
156
156
  };
157
157
 
158
158
  /* -*- Mode: js; js-indent-level: 2; -*- */
@@ -718,7 +718,7 @@ exports.computeSourceURL = computeSourceURL;
718
718
  * element is O(1). Removing elements from the set is not supported. Only
719
719
  * strings are supported for membership.
720
720
  */
721
- class ArraySet {
721
+ class ArraySet$2 {
722
722
  constructor() {
723
723
  this._array = [];
724
724
  this._set = new Map();
@@ -728,7 +728,7 @@ class ArraySet {
728
728
  * Static method for creating ArraySet instances from an existing array.
729
729
  */
730
730
  static fromArray(aArray, aAllowDuplicates) {
731
- const set = new ArraySet();
731
+ const set = new ArraySet$2();
732
732
  for (let i = 0, len = aArray.length; i < len; i++) {
733
733
  set.add(aArray[i], aAllowDuplicates);
734
734
  }
@@ -804,7 +804,7 @@ class ArraySet {
804
804
  return this._array.slice();
805
805
  }
806
806
  }
807
- var ArraySet_1 = ArraySet;
807
+ var ArraySet_1 = ArraySet$2;
808
808
 
809
809
  var arraySet = {
810
810
  ArraySet: ArraySet_1
@@ -839,7 +839,7 @@ function generatedPositionAfter(mappingA, mappingB) {
839
839
  * performance conscious manner. It trades a negligible overhead in general
840
840
  * case for a large speedup in case of mappings being added in order.
841
841
  */
842
- class MappingList {
842
+ class MappingList$1 {
843
843
  constructor() {
844
844
  this._array = [];
845
845
  this._sorted = true;
@@ -890,7 +890,7 @@ class MappingList {
890
890
  }
891
891
  }
892
892
 
893
- var MappingList_1 = MappingList;
893
+ var MappingList_1 = MappingList$1;
894
894
 
895
895
  var mappingList = {
896
896
  MappingList: MappingList_1
@@ -907,7 +907,7 @@ var mappingList = {
907
907
 
908
908
 
909
909
  const ArraySet$1 = arraySet.ArraySet;
910
- const MappingList$1 = mappingList.MappingList;
910
+ const MappingList = mappingList.MappingList;
911
911
 
912
912
  /**
913
913
  * An instance of the SourceMapGenerator represents a source map which is
@@ -917,7 +917,7 @@ const MappingList$1 = mappingList.MappingList;
917
917
  * - file: The filename of the generated source.
918
918
  * - sourceRoot: A root for all relative URLs in this source map.
919
919
  */
920
- class SourceMapGenerator {
920
+ class SourceMapGenerator$2 {
921
921
  constructor(aArgs) {
922
922
  if (!aArgs) {
923
923
  aArgs = {};
@@ -927,7 +927,7 @@ class SourceMapGenerator {
927
927
  this._skipValidation = util.getArg(aArgs, "skipValidation", false);
928
928
  this._sources = new ArraySet$1();
929
929
  this._names = new ArraySet$1();
930
- this._mappings = new MappingList$1();
930
+ this._mappings = new MappingList();
931
931
  this._sourcesContents = null;
932
932
  }
933
933
 
@@ -938,7 +938,7 @@ class SourceMapGenerator {
938
938
  */
939
939
  static fromSourceMap(aSourceMapConsumer) {
940
940
  const sourceRoot = aSourceMapConsumer.sourceRoot;
941
- const generator = new SourceMapGenerator({
941
+ const generator = new SourceMapGenerator$2({
942
942
  file: aSourceMapConsumer.file,
943
943
  sourceRoot
944
944
  });
@@ -1302,8 +1302,8 @@ class SourceMapGenerator {
1302
1302
  }
1303
1303
  }
1304
1304
 
1305
- SourceMapGenerator.prototype._version = 3;
1306
- var SourceMapGenerator_1 = SourceMapGenerator;
1305
+ SourceMapGenerator$2.prototype._version = 3;
1306
+ var SourceMapGenerator_1 = SourceMapGenerator$2;
1307
1307
 
1308
1308
  var sourceMapGenerator = {
1309
1309
  SourceMapGenerator: SourceMapGenerator_1
@@ -1579,14 +1579,14 @@ var wasm = function wasm() {
1579
1579
 
1580
1580
 
1581
1581
 
1582
- const ArraySet$2 = arraySet.ArraySet;
1582
+ const ArraySet = arraySet.ArraySet;
1583
1583
  // eslint-disable-line no-unused-vars
1584
1584
 
1585
1585
 
1586
1586
 
1587
1587
  const INTERNAL = Symbol("smcInternal");
1588
1588
 
1589
- class SourceMapConsumer {
1589
+ class SourceMapConsumer$1 {
1590
1590
  constructor(aSourceMap, aSourceMapURL) {
1591
1591
  // If the constructor was called by super(), just return Promise<this>.
1592
1592
  // Yes, this is a hack to retain the pre-existing API of the base-class
@@ -1643,7 +1643,7 @@ class SourceMapConsumer {
1643
1643
  // should really be.
1644
1644
 
1645
1645
  let consumer = null;
1646
- const promise = new SourceMapConsumer(rawSourceMap, sourceMapUrl);
1646
+ const promise = new SourceMapConsumer$1(rawSourceMap, sourceMapUrl);
1647
1647
  return promise
1648
1648
  .then(c => {
1649
1649
  consumer = c;
@@ -1725,14 +1725,14 @@ class SourceMapConsumer {
1725
1725
  /**
1726
1726
  * The version of the source mapping spec that we are consuming.
1727
1727
  */
1728
- SourceMapConsumer.prototype._version = 3;
1729
- SourceMapConsumer.GENERATED_ORDER = 1;
1730
- SourceMapConsumer.ORIGINAL_ORDER = 2;
1728
+ SourceMapConsumer$1.prototype._version = 3;
1729
+ SourceMapConsumer$1.GENERATED_ORDER = 1;
1730
+ SourceMapConsumer$1.ORIGINAL_ORDER = 2;
1731
1731
 
1732
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
1733
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
1732
+ SourceMapConsumer$1.GREATEST_LOWER_BOUND = 1;
1733
+ SourceMapConsumer$1.LEAST_UPPER_BOUND = 2;
1734
1734
 
1735
- var SourceMapConsumer_1 = SourceMapConsumer;
1735
+ var SourceMapConsumer_1 = SourceMapConsumer$1;
1736
1736
 
1737
1737
  /**
1738
1738
  * A BasicSourceMapConsumer instance represents a parsed source map which we can
@@ -1768,7 +1768,7 @@ var SourceMapConsumer_1 = SourceMapConsumer;
1768
1768
  *
1769
1769
  * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
1770
1770
  */
1771
- class BasicSourceMapConsumer extends SourceMapConsumer {
1771
+ class BasicSourceMapConsumer extends SourceMapConsumer$1 {
1772
1772
  constructor(aSourceMap, aSourceMapURL) {
1773
1773
  return super(INTERNAL).then(that => {
1774
1774
  let sourceMap = aSourceMap;
@@ -1816,8 +1816,8 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
1816
1816
  // are intended to be compressed and deduplicated, the TypeScript compiler
1817
1817
  // sometimes generates source maps with duplicates in them. See Github issue
1818
1818
  // #72 and bugzil.la/889492.
1819
- that._names = ArraySet$2.fromArray(names.map(String), true);
1820
- that._sources = ArraySet$2.fromArray(sources, true);
1819
+ that._names = ArraySet.fromArray(names.map(String), true);
1820
+ that._sources = ArraySet.fromArray(sources, true);
1821
1821
 
1822
1822
  that._absoluteSources = that._sources.toArray().map(function(s) {
1823
1823
  return util.computeSourceURL(sourceRoot, s, aSourceMapURL);
@@ -1937,7 +1937,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
1937
1937
 
1938
1938
  eachMapping(aCallback, aContext, aOrder) {
1939
1939
  const context = aContext || null;
1940
- const order = aOrder || SourceMapConsumer.GENERATED_ORDER;
1940
+ const order = aOrder || SourceMapConsumer$1.GENERATED_ORDER;
1941
1941
  const sourceRoot = this.sourceRoot;
1942
1942
 
1943
1943
  this._wasm.withMappingCallback(
@@ -1955,10 +1955,10 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
1955
1955
  },
1956
1956
  () => {
1957
1957
  switch (order) {
1958
- case SourceMapConsumer.GENERATED_ORDER:
1958
+ case SourceMapConsumer$1.GENERATED_ORDER:
1959
1959
  this._wasm.exports.by_generated_location(this._getMappingsPtr());
1960
1960
  break;
1961
- case SourceMapConsumer.ORIGINAL_ORDER:
1961
+ case SourceMapConsumer$1.ORIGINAL_ORDER:
1962
1962
  this._wasm.exports.by_original_location(this._getMappingsPtr());
1963
1963
  break;
1964
1964
  default:
@@ -2071,9 +2071,9 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
2071
2071
  throw new Error("Column numbers must be >= 0");
2072
2072
  }
2073
2073
 
2074
- let bias = util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND);
2074
+ let bias = util.getArg(aArgs, "bias", SourceMapConsumer$1.GREATEST_LOWER_BOUND);
2075
2075
  if (bias == null) {
2076
- bias = SourceMapConsumer.GREATEST_LOWER_BOUND;
2076
+ bias = SourceMapConsumer$1.GREATEST_LOWER_BOUND;
2077
2077
  }
2078
2078
 
2079
2079
  let mapping;
@@ -2226,9 +2226,9 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
2226
2226
  throw new Error("Column numbers must be >= 0");
2227
2227
  }
2228
2228
 
2229
- let bias = util.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND);
2229
+ let bias = util.getArg(aArgs, "bias", SourceMapConsumer$1.GREATEST_LOWER_BOUND);
2230
2230
  if (bias == null) {
2231
- bias = SourceMapConsumer.GREATEST_LOWER_BOUND;
2231
+ bias = SourceMapConsumer$1.GREATEST_LOWER_BOUND;
2232
2232
  }
2233
2233
 
2234
2234
  let mapping;
@@ -2264,7 +2264,7 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
2264
2264
  }
2265
2265
  }
2266
2266
 
2267
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
2267
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1;
2268
2268
  var BasicSourceMapConsumer_1 = BasicSourceMapConsumer;
2269
2269
 
2270
2270
  /**
@@ -2316,7 +2316,7 @@ var BasicSourceMapConsumer_1 = BasicSourceMapConsumer;
2316
2316
  *
2317
2317
  * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
2318
2318
  */
2319
- class IndexedSourceMapConsumer extends SourceMapConsumer {
2319
+ class IndexedSourceMapConsumer extends SourceMapConsumer$1 {
2320
2320
  constructor(aSourceMap, aSourceMapURL) {
2321
2321
  return super(INTERNAL).then(that => {
2322
2322
  let sourceMap = aSourceMap;
@@ -2331,8 +2331,8 @@ class IndexedSourceMapConsumer extends SourceMapConsumer {
2331
2331
  throw new Error("Unsupported version: " + version);
2332
2332
  }
2333
2333
 
2334
- that._sources = new ArraySet$2();
2335
- that._names = new ArraySet$2();
2334
+ that._sources = new ArraySet();
2335
+ that._names = new ArraySet();
2336
2336
  that.__generatedMappings = null;
2337
2337
  that.__originalMappings = null;
2338
2338
  that.__generatedMappingsUnsorted = null;
@@ -2358,7 +2358,7 @@ class IndexedSourceMapConsumer extends SourceMapConsumer {
2358
2358
  }
2359
2359
  lastOffset = offset;
2360
2360
 
2361
- const cons = new SourceMapConsumer(util.getArg(s, "map"), aSourceMapURL);
2361
+ const cons = new SourceMapConsumer$1(util.getArg(s, "map"), aSourceMapURL);
2362
2362
  return cons.then(consumer => {
2363
2363
  return {
2364
2364
  generatedOffset: {
@@ -2657,14 +2657,14 @@ class IndexedSourceMapConsumer extends SourceMapConsumer {
2657
2657
 
2658
2658
  eachMapping(aCallback, aContext, aOrder) {
2659
2659
  const context = aContext || null;
2660
- const order = aOrder || SourceMapConsumer.GENERATED_ORDER;
2660
+ const order = aOrder || SourceMapConsumer$1.GENERATED_ORDER;
2661
2661
 
2662
2662
  let mappings;
2663
2663
  switch (order) {
2664
- case SourceMapConsumer.GENERATED_ORDER:
2664
+ case SourceMapConsumer$1.GENERATED_ORDER:
2665
2665
  mappings = this._generatedMappings;
2666
2666
  break;
2667
- case SourceMapConsumer.ORIGINAL_ORDER:
2667
+ case SourceMapConsumer$1.ORIGINAL_ORDER:
2668
2668
  mappings = this._originalMappings;
2669
2669
  break;
2670
2670
  default:
@@ -2866,7 +2866,7 @@ const isSourceNode = "$$$isSourceNode$$$";
2866
2866
  * generated JS, or other SourceNodes.
2867
2867
  * @param aName The original identifier.
2868
2868
  */
2869
- class SourceNode {
2869
+ class SourceNode$1 {
2870
2870
  constructor(aLine, aColumn, aSource, aChunks, aName) {
2871
2871
  this.children = [];
2872
2872
  this.sourceContents = {};
@@ -2889,7 +2889,7 @@ class SourceNode {
2889
2889
  static fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
2890
2890
  // The SourceNode we want to fill with the generated code
2891
2891
  // and the SourceMap
2892
- const node = new SourceNode();
2892
+ const node = new SourceNode$1();
2893
2893
 
2894
2894
  // All even indices of this array are one line of the generated code,
2895
2895
  // while all odd indices are the newlines between two adjacent lines
@@ -2989,7 +2989,7 @@ class SourceNode {
2989
2989
  const source = aRelativePath
2990
2990
  ? util.join(aRelativePath, mapping.source)
2991
2991
  : mapping.source;
2992
- node.add(new SourceNode(mapping.originalLine,
2992
+ node.add(new SourceNode$1(mapping.originalLine,
2993
2993
  mapping.originalColumn,
2994
2994
  source,
2995
2995
  code,
@@ -3235,7 +3235,7 @@ class SourceNode {
3235
3235
  }
3236
3236
  }
3237
3237
 
3238
- var SourceNode_1 = SourceNode;
3238
+ var SourceNode_1 = SourceNode$1;
3239
3239
 
3240
3240
  var sourceNode = {
3241
3241
  SourceNode: SourceNode_1
@@ -3247,14 +3247,14 @@ var sourceNode = {
3247
3247
  * http://opensource.org/licenses/BSD-3-Clause
3248
3248
  */
3249
3249
 
3250
- var SourceMapGenerator$2 = sourceMapGenerator.SourceMapGenerator;
3251
- var SourceMapConsumer$1 = sourceMapConsumer.SourceMapConsumer;
3252
- var SourceNode$1 = sourceNode.SourceNode;
3250
+ var SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
3251
+ var SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;
3252
+ var SourceNode = sourceNode.SourceNode;
3253
3253
 
3254
3254
  var sourceMap = {
3255
- SourceMapGenerator: SourceMapGenerator$2,
3256
- SourceMapConsumer: SourceMapConsumer$1,
3257
- SourceNode: SourceNode$1
3255
+ SourceMapGenerator: SourceMapGenerator,
3256
+ SourceMapConsumer: SourceMapConsumer,
3257
+ SourceNode: SourceNode
3258
3258
  };
3259
3259
 
3260
3260
  // Reserved word lists for various dialects of the language
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "2.0.4",
3
+ "version": "2.1.2",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "//": "READ .github/contributing.md to understand what to put under deps vs. devDeps!",
46
46
  "dependencies": {
47
- "esbuild": "^0.8.52",
47
+ "esbuild": "^0.9.3",
48
48
  "postcss": "^8.2.1",
49
49
  "resolve": "^1.19.0",
50
50
  "rollup": "^2.38.5"
@@ -53,6 +53,7 @@
53
53
  "fsevents": "~2.3.1"
54
54
  },
55
55
  "devDependencies": {
56
+ "@ampproject/remapping": "^1.0.1",
56
57
  "@rollup/plugin-alias": "^3.1.1",
57
58
  "@rollup/plugin-commonjs": "^17.0.0",
58
59
  "@rollup/plugin-dynamic-import-vars": "^1.1.1",
@@ -100,7 +101,6 @@
100
101
  "http-proxy": "^1.18.1",
101
102
  "launch-editor-middleware": "^2.2.1",
102
103
  "magic-string": "^0.25.7",
103
- "merge-source-map": "^1.1.0",
104
104
  "mime": "^2.4.7",
105
105
  "minimatch": "^3.0.4",
106
106
  "okie": "^1.0.1",