vite 2.8.0 → 2.8.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,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('postcss');
4
- var build$2 = require('./dep-c9c9d3e5.js');
4
+ var build$2 = require('./dep-1412e872.js');
5
5
  var path$2 = require('path');
6
6
  var require$$1 = require('crypto');
7
7
  var fs = require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var build = require('./dep-c9c9d3e5.js');
3
+ var build = require('./dep-1412e872.js');
4
4
  var require$$1 = require('crypto');
5
5
  require('fs');
6
6
  require('path');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var build = require('./dep-c9c9d3e5.js');
3
+ var build = require('./dep-1412e872.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
@@ -456,13 +456,15 @@ function looseIndexOf(arr, val) {
456
456
  * @private
457
457
  */
458
458
  const toDisplayString = (val) => {
459
- return val == null
460
- ? ''
461
- : isArray(val) ||
462
- (isObject(val) &&
463
- (val.toString === objectToString || !isFunction(val.toString)))
464
- ? JSON.stringify(val, replacer, 2)
465
- : String(val);
459
+ return isString(val)
460
+ ? val
461
+ : val == null
462
+ ? ''
463
+ : isArray(val) ||
464
+ (isObject(val) &&
465
+ (val.toString === objectToString || !isFunction(val.toString)))
466
+ ? JSON.stringify(val, replacer, 2)
467
+ : String(val);
466
468
  };
467
469
  const replacer = (_key, val) => {
468
470
  // can't use isRef here since @vue/shared has no deps
@@ -537,6 +539,7 @@ const isReservedProp = /*#__PURE__*/ makeMap(
537
539
  'onVnodeBeforeMount,onVnodeMounted,' +
538
540
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
539
541
  'onVnodeBeforeUnmount,onVnodeUnmounted');
542
+ const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
540
543
  const cacheStringFunction$1 = (fn) => {
541
544
  const cache = Object.create(null);
542
545
  return ((str) => {
@@ -619,6 +622,7 @@ var shared_esmBundler = {
619
622
  invokeArrayFns: invokeArrayFns,
620
623
  isArray: isArray,
621
624
  isBooleanAttr: isBooleanAttr,
625
+ isBuiltInDirective: isBuiltInDirective,
622
626
  isDate: isDate,
623
627
  isFunction: isFunction,
624
628
  isGloballyWhitelisted: isGloballyWhitelisted,
@@ -1378,13 +1382,13 @@ const deprecationData = {
1378
1382
  message: `Platform-native elements with "is" prop will no longer be ` +
1379
1383
  `treated as components in Vue 3 unless the "is" value is explicitly ` +
1380
1384
  `prefixed with "vue:".`,
1381
- link: `https://v3.vuejs.org/guide/migration/custom-elements-interop.html`
1385
+ link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
1382
1386
  },
1383
1387
  ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
1384
1388
  message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
1385
1389
  `argument instead. \`v-bind:${key}.sync\` should be changed to ` +
1386
1390
  `\`v-model:${key}\`.`,
1387
- link: `https://v3.vuejs.org/guide/migration/v-model.html`
1391
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
1388
1392
  },
1389
1393
  ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
1390
1394
  message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
@@ -1396,11 +1400,11 @@ const deprecationData = {
1396
1400
  `that appears before v-bind in the case of conflict. ` +
1397
1401
  `To retain 2.x behavior, move v-bind to make it the first attribute. ` +
1398
1402
  `You can also suppress this warning if the usage is intended.`,
1399
- link: `https://v3.vuejs.org/guide/migration/v-bind.html`
1403
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
1400
1404
  },
1401
1405
  ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
1402
1406
  message: `.native modifier for v-on has been removed as is no longer necessary.`,
1403
- link: `https://v3.vuejs.org/guide/migration/v-on-native-modifier-removed.html`
1407
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
1404
1408
  },
1405
1409
  ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
1406
1410
  message: `v-if / v-for precedence when used on the same element has changed ` +
@@ -1408,7 +1412,7 @@ const deprecationData = {
1408
1412
  `access to v-for scope variables. It is best to avoid the ambiguity ` +
1409
1413
  `with <template> tags or use a computed property that filters v-for ` +
1410
1414
  `data source.`,
1411
- link: `https://v3.vuejs.org/guide/migration/v-if-v-for.html`
1415
+ link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
1412
1416
  },
1413
1417
  ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
1414
1418
  message: `<template> with no special directives will render as a native template ` +
@@ -1416,13 +1420,13 @@ const deprecationData = {
1416
1420
  },
1417
1421
  ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
1418
1422
  message: `"inline-template" has been removed in Vue 3.`,
1419
- link: `https://v3.vuejs.org/guide/migration/inline-template-attribute.html`
1423
+ link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
1420
1424
  },
1421
1425
  ["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
1422
1426
  message: `filters have been removed in Vue 3. ` +
1423
1427
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
1424
1428
  `Use method calls or computed properties instead.`,
1425
- link: `https://v3.vuejs.org/guide/migration/filters.html`
1429
+ link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
1426
1430
  }
1427
1431
  };
1428
1432
  function getCompatValue(key, context) {
@@ -4660,7 +4664,7 @@ function buildProps(node, context, props = node.props, ssr = false) {
4660
4664
  }
4661
4665
  }
4662
4666
  }
4663
- else {
4667
+ else if (!isBuiltInDirective(name)) {
4664
4668
  // no built-in transform, this is a user custom directive.
4665
4669
  runtimeDirectives.push(prop);
4666
4670
  // custom dirs may use beforeUpdate so they need to force blocks
@@ -5556,6 +5560,7 @@ var compilerCore_esmBundler = {
5556
5560
  assert: assert,
5557
5561
  baseCompile: baseCompile,
5558
5562
  baseParse: baseParse,
5563
+ buildDirectiveArgs: buildDirectiveArgs,
5559
5564
  buildProps: buildProps,
5560
5565
  buildSlots: buildSlots,
5561
5566
  checkCompatEnabled: checkCompatEnabled,
package/dist/node/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('events');
4
- var build = require('./chunks/dep-c9c9d3e5.js');
4
+ var build = require('./chunks/dep-1412e872.js');
5
5
  var perf_hooks = require('perf_hooks');
6
6
  require('fs');
7
7
  require('path');
@@ -683,7 +683,7 @@ cli
683
683
  .action(async (root, options) => {
684
684
  // output structure is preserved even after bundling so require()
685
685
  // is ok here
686
- const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-c9c9d3e5.js'); }).then(function (n) { return n.index$1; });
686
+ const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-1412e872.js'); }).then(function (n) { return n.index$1; });
687
687
  try {
688
688
  const server = await createServer({
689
689
  root,
@@ -732,7 +732,7 @@ cli
732
732
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
733
733
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
734
734
  .action(async (root, options) => {
735
- const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-c9c9d3e5.js'); }).then(function (n) { return n.build$1; });
735
+ const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-1412e872.js'); }).then(function (n) { return n.build$1; });
736
736
  const buildOptions = cleanOptions(options);
737
737
  try {
738
738
  await build$1({
@@ -755,7 +755,7 @@ cli
755
755
  .command('optimize [root]')
756
756
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
757
757
  .action(async (root, options) => {
758
- const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-c9c9d3e5.js'); }).then(function (n) { return n.index; });
758
+ const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-1412e872.js'); }).then(function (n) { return n.index; });
759
759
  try {
760
760
  const config = await build.resolveConfig({
761
761
  root,
@@ -43,8 +43,8 @@ import type * as stream from 'stream';
43
43
  import type { TransformPluginContext } from 'rollup';
44
44
  import type { TransformResult as TransformResult_2 } from 'esbuild';
45
45
  import type { TransformResult as TransformResult_3 } from 'rollup';
46
- import type { URL } from 'url';
47
46
  import type * as url from 'url';
47
+ import type { URL as URL_2 } from 'url';
48
48
  import type { WatcherOptions } from 'rollup';
49
49
  import type { ZlibOptions } from 'zlib';
50
50
 
@@ -2262,11 +2262,11 @@ export declare class WebSocket extends EventEmitter {
2262
2262
  onmessage: (event: WebSocket.MessageEvent) => void
2263
2263
 
2264
2264
  constructor(
2265
- address: string | URL,
2265
+ address: string | URL_2,
2266
2266
  options?: WebSocket.ClientOptions | ClientRequestArgs
2267
2267
  )
2268
2268
  constructor(
2269
- address: string | URL,
2269
+ address: string | URL_2,
2270
2270
  protocols?: string | string[],
2271
2271
  options?: WebSocket.ClientOptions | ClientRequestArgs
2272
2272
  )
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var build = require('./chunks/dep-c9c9d3e5.js');
5
+ var build = require('./chunks/dep-1412e872.js');
6
6
  require('fs');
7
7
  require('path');
8
8
  require('tty');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",
@@ -45,7 +45,7 @@
45
45
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
46
46
  "dependencies": {
47
47
  "esbuild": "^0.14.14",
48
- "postcss": "^8.4.5",
48
+ "postcss": "^8.4.6",
49
49
  "resolve": "^1.22.0",
50
50
  "rollup": "^2.59.0"
51
51
  },
@@ -53,9 +53,9 @@
53
53
  "fsevents": "~2.3.2"
54
54
  },
55
55
  "devDependencies": {
56
- "@ampproject/remapping": "^1.1.1",
57
- "@babel/parser": "^7.16.12",
58
- "@babel/types": "^7.16.8",
56
+ "@ampproject/remapping": "^2.1.0",
57
+ "@babel/parser": "^7.17.0",
58
+ "@babel/types": "^7.17.0",
59
59
  "@rollup/plugin-alias": "^3.1.9",
60
60
  "@rollup/plugin-commonjs": "^21.0.1",
61
61
  "@rollup/plugin-dynamic-import-vars": "^1.4.2",
@@ -66,17 +66,17 @@
66
66
  "@types/convert-source-map": "^1.5.2",
67
67
  "@types/cross-spawn": "^6.0.2",
68
68
  "@types/debug": "^4.1.7",
69
- "@types/estree": "^0.0.50",
69
+ "@types/estree": "^0.0.51",
70
70
  "@types/etag": "^1.8.1",
71
71
  "@types/less": "^3.0.3",
72
72
  "@types/micromatch": "^4.0.2",
73
73
  "@types/mime": "^2.0.3",
74
- "@types/node": "^16.11.21",
74
+ "@types/node": "^16.11.22",
75
75
  "@types/resolve": "^1.20.1",
76
76
  "@types/sass": "~1.43.1",
77
77
  "@types/stylus": "^0.48.36",
78
78
  "@types/ws": "^8.2.2",
79
- "@vue/compiler-dom": "^3.2.29",
79
+ "@vue/compiler-dom": "^3.2.30",
80
80
  "acorn": "^8.7.0",
81
81
  "cac": "6.7.9",
82
82
  "chokidar": "^3.5.3",
@@ -117,7 +117,7 @@
117
117
  "tsconfck": "1.1.2",
118
118
  "tslib": "^2.3.1",
119
119
  "types": "link:./types",
120
- "ws": "^8.4.2"
120
+ "ws": "^8.5.0"
121
121
  },
122
122
  "peerDependencies": {
123
123
  "less": "*",