vite 2.7.0-beta.0 → 2.7.0-beta.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.

Potentially problematic release.


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

@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var build = require('./dep-f2dce443.js');
3
+ var build = require('./dep-966eddc9.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
7
7
  var e = m[i];
8
- for (var k in e) {
8
+ if (typeof e !== 'string' && !Array.isArray(e)) { for (var k in e) {
9
9
  if (k !== 'default' && !(k in n)) {
10
10
  n[k] = e[k];
11
11
  }
12
- }
12
+ } }
13
13
  }
14
14
  return n;
15
15
  }
@@ -376,12 +376,12 @@ function escapeHtml(string) {
376
376
  continue;
377
377
  }
378
378
  if (lastIndex !== index) {
379
- html += str.substring(lastIndex, index);
379
+ html += str.slice(lastIndex, index);
380
380
  }
381
381
  lastIndex = index + 1;
382
382
  html += escaped;
383
383
  }
384
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
384
+ return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
385
385
  }
386
386
  // https://www.w3.org/TR/html52/syntax.html#comments
387
387
  const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
@@ -476,17 +476,6 @@ const replacer = (_key, val) => {
476
476
  return val;
477
477
  };
478
478
 
479
- /**
480
- * List of @babel/parser plugins that are used for template expression
481
- * transforms and SFC script transforms. By default we enable proposals slated
482
- * for ES2020. This will need to be updated as the spec moves forward.
483
- * Full list at https://babeljs.io/docs/en/next/babel-parser#plugins
484
- */
485
- const babelParserDefaultPlugins = [
486
- 'bigInt',
487
- 'optionalChaining',
488
- 'nullishCoalescingOperator'
489
- ];
490
479
  const EMPTY_OBJ = (process.env.NODE_ENV !== 'production')
491
480
  ? Object.freeze({})
492
481
  : {};
@@ -603,7 +592,6 @@ var shared_esmBundler = {
603
592
  NO: NO,
604
593
  NOOP: NOOP,
605
594
  PatchFlagNames: PatchFlagNames,
606
- babelParserDefaultPlugins: babelParserDefaultPlugins,
607
595
  camelize: camelize$1,
608
596
  capitalize: capitalize,
609
597
  def: def,
@@ -1110,7 +1098,7 @@ const isMemberExpressionNode = NOOP
1110
1098
  const isMemberExpression = isMemberExpressionBrowser
1111
1099
  ;
1112
1100
  function getInnerRange(loc, offset, length) {
1113
- const source = loc.source.substr(offset, length);
1101
+ const source = loc.source.slice(offset, offset + length);
1114
1102
  const newLoc = {
1115
1103
  source,
1116
1104
  start: advancePositionWithClone(loc.start, loc.source, offset),
@@ -2027,10 +2015,10 @@ function parseAttribute(context, nameSet) {
2027
2015
  isStatic = false;
2028
2016
  if (!content.endsWith(']')) {
2029
2017
  emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */);
2030
- content = content.substr(1);
2018
+ content = content.slice(1);
2031
2019
  }
2032
2020
  else {
2033
- content = content.substr(1, content.length - 2);
2021
+ content = content.slice(1, content.length - 1);
2034
2022
  }
2035
2023
  }
2036
2024
  else if (isSlot) {
@@ -2056,7 +2044,7 @@ function parseAttribute(context, nameSet) {
2056
2044
  valueLoc.end = advancePositionWithClone(valueLoc.start, value.content);
2057
2045
  valueLoc.source = valueLoc.source.slice(1, -1);
2058
2046
  }
2059
- const modifiers = match[3] ? match[3].substr(1).split('.') : [];
2047
+ const modifiers = match[3] ? match[3].slice(1).split('.') : [];
2060
2048
  if (isPropShorthand)
2061
2049
  modifiers.push('prop');
2062
2050
  // 2.x compat v-bind:foo.sync -> v-model:foo
@@ -2277,7 +2265,7 @@ function isEnd(context, mode, ancestors) {
2277
2265
  }
2278
2266
  function startsWithEndTagOpen(source, tag) {
2279
2267
  return (startsWith(source, '</') &&
2280
- source.substr(2, tag.length).toLowerCase() === tag.toLowerCase() &&
2268
+ source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() &&
2281
2269
  /[\t\r\n\f />]/.test(source[2 + tag.length] || '>'));
2282
2270
  }
2283
2271
 
@@ -7933,7 +7921,7 @@ const decodeHtml = (rawText, asAttr) => {
7933
7921
  maxCRNameLength = Object.keys(namedCharacterReferences).reduce((max, name) => Math.max(max, name.length), 0);
7934
7922
  }
7935
7923
  for (let length = maxCRNameLength; !value && length > 0; --length) {
7936
- name = rawText.substr(1, length);
7924
+ name = rawText.slice(1, 1 + length);
7937
7925
  value = namedCharacterReferences[name];
7938
7926
  }
7939
7927
  if (value) {
@@ -8731,4 +8719,4 @@ var compilerDom_cjs$1 = /*#__PURE__*/_mergeNamespaces({
8731
8719
  }, [compilerDom_cjs$2]);
8732
8720
 
8733
8721
  exports.compilerDom_cjs = compilerDom_cjs$1;
8734
- //# sourceMappingURL=dep-e51889c1.js.map
8722
+ //# sourceMappingURL=dep-deef6691.js.map