vite 4.0.1 → 4.0.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.

package/LICENSE.md CHANGED
@@ -3163,7 +3163,7 @@ Repository: unjs/ufo
3163
3163
 
3164
3164
  > MIT License
3165
3165
  >
3166
- > Copyright (c) 2020 Nuxt Contrib
3166
+ > Copyright (c) Pooya Parsa <pooya@pi0.io>
3167
3167
  >
3168
3168
  > Permission is hereby granted, free of charge, to any person obtaining a copy
3169
3169
  > of this software and associated documentation files (the "Software"), to deal
@@ -21612,6 +21612,43 @@ var acorn = {
21612
21612
  version: version$2
21613
21613
  };
21614
21614
 
21615
+ const HASH_RE = /#/g;
21616
+ const AMPERSAND_RE = /&/g;
21617
+ const EQUAL_RE = /=/g;
21618
+ const PLUS_RE = /\+/g;
21619
+ const ENC_BRACKET_OPEN_RE = /%5b/gi;
21620
+ const ENC_BRACKET_CLOSE_RE = /%5d/gi;
21621
+ const ENC_CARET_RE = /%5e/gi;
21622
+ const ENC_BACKTICK_RE = /%60/gi;
21623
+ const ENC_CURLY_OPEN_RE = /%7b/gi;
21624
+ const ENC_PIPE_RE = /%7c/gi;
21625
+ const ENC_CURLY_CLOSE_RE = /%7d/gi;
21626
+ const ENC_SPACE_RE = /%20/gi;
21627
+ function encode(text) {
21628
+ return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]");
21629
+ }
21630
+ function encodeQueryValue(text) {
21631
+ return encode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
21632
+ }
21633
+ function encodeQueryKey(text) {
21634
+ return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
21635
+ }
21636
+ function encodeQueryItem(key, value) {
21637
+ if (typeof value === "number" || typeof value === "boolean") {
21638
+ value = String(value);
21639
+ }
21640
+ if (!value) {
21641
+ return encodeQueryKey(key);
21642
+ }
21643
+ if (Array.isArray(value)) {
21644
+ return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&");
21645
+ }
21646
+ return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`;
21647
+ }
21648
+ function stringifyQuery(query) {
21649
+ return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).join("&");
21650
+ }
21651
+
21615
21652
  function matchAll(regex, string, addition) {
21616
21653
  const matches = [];
21617
21654
  for (const match of string.matchAll(regex)) {
@@ -22800,14 +22837,12 @@ async function tryOptimizedResolve(depsOptimizer, id, importer) {
22800
22837
  // We should be able to remove this in the future
22801
22838
  await depsOptimizer.scanProcessing;
22802
22839
  const metadata = depsOptimizer.metadata;
22803
- if (!importer) {
22804
- // no importer. try our best to find an optimized dep
22805
- const depInfo = optimizedDepInfoFromId(metadata, id);
22806
- if (depInfo) {
22807
- return depsOptimizer.getOptimizedDepId(depInfo);
22808
- }
22809
- return;
22840
+ const depInfo = optimizedDepInfoFromId(metadata, id);
22841
+ if (depInfo) {
22842
+ return depsOptimizer.getOptimizedDepId(depInfo);
22810
22843
  }
22844
+ if (!importer)
22845
+ return;
22811
22846
  // further check if id is imported by nested dependency
22812
22847
  let resolvedSrc;
22813
22848
  for (const optimizedData of metadata.depInfoList) {
@@ -37612,7 +37647,7 @@ async function compileCSS(id, code, config, urlReplacer) {
37612
37647
  }));
37613
37648
  }
37614
37649
  if (isModule) {
37615
- postcssPlugins.unshift((await import('./dep-ec9f7a0d.js').then(function (n) { return n.i; })).default({
37650
+ postcssPlugins.unshift((await import('./dep-e4585742.js').then(function (n) { return n.i; })).default({
37616
37651
  ...modulesOptions,
37617
37652
  localsConvention: modulesOptions?.localsConvention,
37618
37653
  getJSON(cssFileName, _modules, outputFileName) {
@@ -38644,43 +38679,6 @@ base.MethodDefinition = base.PropertyDefinition = base.Property = function (node
38644
38679
  if (node.value) { c(node.value, st, "Expression"); }
38645
38680
  };
38646
38681
 
38647
- const HASH_RE = /#/g;
38648
- const AMPERSAND_RE = /&/g;
38649
- const EQUAL_RE = /=/g;
38650
- const PLUS_RE = /\+/g;
38651
- const ENC_BRACKET_OPEN_RE = /%5B/gi;
38652
- const ENC_BRACKET_CLOSE_RE = /%5D/gi;
38653
- const ENC_CARET_RE = /%5E/gi;
38654
- const ENC_BACKTICK_RE = /%60/gi;
38655
- const ENC_CURLY_OPEN_RE = /%7B/gi;
38656
- const ENC_PIPE_RE = /%7C/gi;
38657
- const ENC_CURLY_CLOSE_RE = /%7D/gi;
38658
- const ENC_SPACE_RE = /%20/gi;
38659
- function encode(text) {
38660
- return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]");
38661
- }
38662
- function encodeQueryValue(text) {
38663
- return encode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
38664
- }
38665
- function encodeQueryKey(text) {
38666
- return encodeQueryValue(text).replace(EQUAL_RE, "%3D");
38667
- }
38668
- function encodeQueryItem(key, val) {
38669
- if (typeof val === "number" || typeof val === "boolean") {
38670
- val = String(val);
38671
- }
38672
- if (!val) {
38673
- return encodeQueryKey(key);
38674
- }
38675
- if (Array.isArray(val)) {
38676
- return val.map((_val) => `${encodeQueryKey(key)}=${encodeQueryValue(_val)}`).join("&");
38677
- }
38678
- return `${encodeQueryKey(key)}=${encodeQueryValue(val)}`;
38679
- }
38680
- function stringifyQuery(query) {
38681
- return Object.keys(query).map((k) => encodeQueryItem(k, query[k])).join("&");
38682
- }
38683
-
38684
38682
  const { isMatch: isMatch$1, scan } = micromatch_1;
38685
38683
  function getAffectedGlobModules(file, server) {
38686
38684
  const modules = [];
@@ -39634,19 +39632,19 @@ function stattag (stat) {
39634
39632
  var convertSourceMap = {};
39635
39633
 
39636
39634
  (function (exports) {
39637
- var fs = require$$0__default;
39638
- var path = require$$0$4;
39639
39635
 
39640
39636
  Object.defineProperty(exports, 'commentRegex', {
39641
39637
  get: function getCommentRegex () {
39642
- return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
39638
+ // Groups: 1: media type, 2: MIME type, 3: charset, 4: encoding, 5: data.
39639
+ return /^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/mg;
39643
39640
  }
39644
39641
  });
39645
39642
 
39643
+
39646
39644
  Object.defineProperty(exports, 'mapFileCommentRegex', {
39647
39645
  get: function getMapFileCommentRegex () {
39648
39646
  // Matches sourceMappingURL in either // or /* comment styles.
39649
- return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
39647
+ return /(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/mg;
39650
39648
  }
39651
39649
  });
39652
39650
 
@@ -39680,29 +39678,43 @@ var convertSourceMap = {};
39680
39678
  return sm.split(',').pop();
39681
39679
  }
39682
39680
 
39683
- function readFromFileMap(sm, dir) {
39684
- // NOTE: this will only work on the server since it attempts to read the map file
39685
-
39681
+ function readFromFileMap(sm, read) {
39686
39682
  var r = exports.mapFileCommentRegex.exec(sm);
39687
-
39688
39683
  // for some odd reason //# .. captures in 1 and /* .. */ in 2
39689
39684
  var filename = r[1] || r[2];
39690
- var filepath = path.resolve(dir, filename);
39691
39685
 
39692
39686
  try {
39693
- return fs.readFileSync(filepath, 'utf8');
39687
+ var sm = read(filename);
39688
+ if (sm != null && typeof sm.catch === 'function') {
39689
+ return sm.catch(throwError);
39690
+ } else {
39691
+ return sm;
39692
+ }
39694
39693
  } catch (e) {
39695
- throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
39694
+ throwError(e);
39695
+ }
39696
+
39697
+ function throwError(e) {
39698
+ throw new Error('An error occurred while trying to read the map file at ' + filename + '\n' + e.stack);
39696
39699
  }
39697
39700
  }
39698
39701
 
39699
39702
  function Converter (sm, opts) {
39700
39703
  opts = opts || {};
39701
39704
 
39702
- if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
39703
- if (opts.hasComment) sm = stripComment(sm);
39704
- if (opts.isEncoded) sm = decodeBase64(sm);
39705
- if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
39705
+ if (opts.hasComment) {
39706
+ sm = stripComment(sm);
39707
+ }
39708
+
39709
+ if (opts.encoding === 'base64') {
39710
+ sm = decodeBase64(sm);
39711
+ } else if (opts.encoding === 'uri') {
39712
+ sm = decodeURIComponent(sm);
39713
+ }
39714
+
39715
+ if (opts.isJSON || opts.encoding) {
39716
+ sm = JSON.parse(sm);
39717
+ }
39706
39718
 
39707
39719
  this.sourcemap = sm;
39708
39720
  }
@@ -39739,10 +39751,22 @@ var convertSourceMap = {};
39739
39751
  return btoa(unescape(encodeURIComponent(json)));
39740
39752
  }
39741
39753
 
39754
+ Converter.prototype.toURI = function () {
39755
+ var json = this.toJSON();
39756
+ return encodeURIComponent(json);
39757
+ };
39758
+
39742
39759
  Converter.prototype.toComment = function (options) {
39743
- var base64 = this.toBase64();
39744
- var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
39745
- return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
39760
+ var encoding, content, data;
39761
+ if (options != null && options.encoding === 'uri') {
39762
+ encoding = '';
39763
+ content = this.toURI();
39764
+ } else {
39765
+ encoding = ';base64';
39766
+ content = this.toBase64();
39767
+ }
39768
+ data = 'sourceMappingURL=data:application/json;charset=utf-8' + encoding + ',' + content;
39769
+ return options != null && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
39746
39770
  };
39747
39771
 
39748
39772
  // returns copy instead of original
@@ -39772,20 +39796,42 @@ var convertSourceMap = {};
39772
39796
  return new Converter(json, { isJSON: true });
39773
39797
  };
39774
39798
 
39799
+ exports.fromURI = function (uri) {
39800
+ return new Converter(uri, { encoding: 'uri' });
39801
+ };
39802
+
39775
39803
  exports.fromBase64 = function (base64) {
39776
- return new Converter(base64, { isEncoded: true });
39804
+ return new Converter(base64, { encoding: 'base64' });
39777
39805
  };
39778
39806
 
39779
39807
  exports.fromComment = function (comment) {
39808
+ var m, encoding;
39780
39809
  comment = comment
39781
39810
  .replace(/^\/\*/g, '//')
39782
39811
  .replace(/\*\/$/g, '');
39783
-
39784
- return new Converter(comment, { isEncoded: true, hasComment: true });
39812
+ m = exports.commentRegex.exec(comment);
39813
+ encoding = m && m[4] || 'uri';
39814
+ return new Converter(comment, { encoding: encoding, hasComment: true });
39785
39815
  };
39786
39816
 
39787
- exports.fromMapFileComment = function (comment, dir) {
39788
- return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true });
39817
+ function makeConverter(sm) {
39818
+ return new Converter(sm, { isJSON: true });
39819
+ }
39820
+
39821
+ exports.fromMapFileComment = function (comment, read) {
39822
+ if (typeof read === 'string') {
39823
+ throw new Error(
39824
+ 'String directory paths are no longer supported with `fromMapFileComment`\n' +
39825
+ 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading'
39826
+ )
39827
+ }
39828
+
39829
+ var sm = readFromFileMap(comment, read);
39830
+ if (sm != null && typeof sm.then === 'function') {
39831
+ return sm.then(makeConverter);
39832
+ } else {
39833
+ return makeConverter(sm);
39834
+ }
39789
39835
  };
39790
39836
 
39791
39837
  // Finds last sourcemap comment in file or returns null if none was found
@@ -39795,9 +39841,15 @@ var convertSourceMap = {};
39795
39841
  };
39796
39842
 
39797
39843
  // Finds last sourcemap comment in file or returns null if none was found
39798
- exports.fromMapFileSource = function (content, dir) {
39844
+ exports.fromMapFileSource = function (content, read) {
39845
+ if (typeof read === 'string') {
39846
+ throw new Error(
39847
+ 'String directory paths are no longer supported with `fromMapFileSource`\n' +
39848
+ 'Please review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading'
39849
+ )
39850
+ }
39799
39851
  var m = content.match(exports.mapFileCommentRegex);
39800
- return m ? exports.fromMapFileComment(m.pop(), dir) : null;
39852
+ return m ? exports.fromMapFileComment(m.pop(), read) : null;
39801
39853
  };
39802
39854
 
39803
39855
  exports.removeComments = function (src) {
@@ -40343,7 +40395,7 @@ async function loadAndTransform(id, url, server, options, timestamp) {
40343
40395
  if (code) {
40344
40396
  try {
40345
40397
  map = (convertSourceMap.fromSource(code) ||
40346
- convertSourceMap.fromMapFileSource(code, path$o.dirname(file)))?.toObject();
40398
+ (await convertSourceMap.fromMapFileSource(code, createConvertSourceMapReadMap(file))))?.toObject();
40347
40399
  code = code.replace(convertSourceMap.mapFileCommentRegex, blankReplacer);
40348
40400
  }
40349
40401
  catch (e) {
@@ -40418,6 +40470,11 @@ async function loadAndTransform(id, url, server, options, timestamp) {
40418
40470
  }
40419
40471
  return result;
40420
40472
  }
40473
+ function createConvertSourceMapReadMap(originalFileName) {
40474
+ return (filename) => {
40475
+ return promises$2.readFile(path$o.resolve(path$o.dirname(originalFileName), filename), 'utf-8');
40476
+ };
40477
+ }
40421
40478
 
40422
40479
  const isDebug$1 = !!process.env.DEBUG;
40423
40480
  const debug$9 = createDebugger('vite:import-analysis');
@@ -45894,7 +45951,7 @@ function toOutputFilePathWithoutRuntime(filename, type, hostId, hostType, config
45894
45951
  });
45895
45952
  if (typeof result === 'object') {
45896
45953
  if (result.runtime) {
45897
- throw new Error(`{ runtime: "${result.runtime} }" is not supported for assets in ${hostType} files: ${filename}`);
45954
+ throw new Error(`{ runtime: "${result.runtime}" } is not supported for assets in ${hostType} files: ${filename}`);
45898
45955
  }
45899
45956
  if (typeof result.relative === 'boolean') {
45900
45957
  relative = result.relative;
@@ -54389,12 +54446,14 @@ function startBrowserProcess(browser, url) {
54389
54446
  const openedBrowser = preferredOSXBrowser && ps.includes(preferredOSXBrowser)
54390
54447
  ? preferredOSXBrowser
54391
54448
  : supportedChromiumBrowsers.find((b) => ps.includes(b));
54392
- // Try our best to reuse existing tab with AppleScript
54393
- execSync(`osascript openChrome.applescript "${encodeURI(url)}" "${openedBrowser}"`, {
54394
- cwd: join$2(VITE_PACKAGE_DIR, 'bin'),
54395
- stdio: 'ignore',
54396
- });
54397
- return true;
54449
+ if (openedBrowser) {
54450
+ // Try our best to reuse existing tab with AppleScript
54451
+ execSync(`osascript openChrome.applescript "${encodeURI(url)}" "${openedBrowser}"`, {
54452
+ cwd: join$2(VITE_PACKAGE_DIR, 'bin'),
54453
+ stdio: 'ignore',
54454
+ });
54455
+ return true;
54456
+ }
54398
54457
  }
54399
54458
  catch (err) {
54400
54459
  // Ignore errors
@@ -59834,7 +59893,7 @@ var debug_1 = function () {
59834
59893
  if (!debug$3) {
59835
59894
  try {
59836
59895
  /* eslint global-require: off */
59837
- debug$3 = src$2.exports("follow-redirects");
59896
+ debug$3 = require("debug")("follow-redirects");
59838
59897
  }
59839
59898
  catch (error) { /* */ }
59840
59899
  if (typeof debug$3 !== "function") {
@@ -62162,7 +62221,7 @@ async function startServer(server, inlinePort, isRestart = false) {
62162
62221
  const path = typeof options.open === 'string' ? options.open : server.config.base;
62163
62222
  openBrowser(path.startsWith('http')
62164
62223
  ? path
62165
- : `${protocol}://${hostname.name}:${serverPort}${path}`, true, server.config.logger);
62224
+ : new URL(path, `${protocol}://${hostname.name}:${serverPort}`).href, true, server.config.logger);
62166
62225
  }
62167
62226
  }
62168
62227
  function createServerCloseFn(server) {
@@ -62481,7 +62540,7 @@ async function preview(inlineConfig = {}) {
62481
62540
  const path = typeof options.open === 'string' ? options.open : previewBase;
62482
62541
  openBrowser(path.startsWith('http')
62483
62542
  ? path
62484
- : `${protocol}://${hostname.name}:${serverPort}${path}`, true, logger);
62543
+ : new URL(path, `${protocol}://${hostname.name}:${serverPort}`).href, true, logger);
62485
62544
  }
62486
62545
  return {
62487
62546
  config,
@@ -1,6 +1,6 @@
1
1
  import require$$0__default from 'fs';
2
2
  import require$$0 from 'postcss';
3
- import { C as commonjsGlobal } from './dep-2285ba4f.js';
3
+ import { C as commonjsGlobal } from './dep-6305614c.js';
4
4
  import require$$0$1 from 'path';
5
5
  import require$$5 from 'crypto';
6
6
  import require$$0$2 from 'util';
package/dist/node/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import fs from 'node:fs';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { EventEmitter } from 'events';
5
- import { A as picocolors, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-2285ba4f.js';
5
+ import { A as picocolors, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-6305614c.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:url';
8
8
  import 'node:module';
@@ -724,7 +724,7 @@ cli
724
724
  filterDuplicateOptions(options);
725
725
  // output structure is preserved even after bundling so require()
726
726
  // is ok here
727
- const { createServer } = await import('./chunks/dep-2285ba4f.js').then(function (n) { return n.F; });
727
+ const { createServer } = await import('./chunks/dep-6305614c.js').then(function (n) { return n.F; });
728
728
  try {
729
729
  const server = await createServer({
730
730
  root,
@@ -802,7 +802,7 @@ cli
802
802
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
803
803
  .action(async (root, options) => {
804
804
  filterDuplicateOptions(options);
805
- const { build } = await import('./chunks/dep-2285ba4f.js').then(function (n) { return n.E; });
805
+ const { build } = await import('./chunks/dep-6305614c.js').then(function (n) { return n.E; });
806
806
  const buildOptions = cleanOptions(options);
807
807
  try {
808
808
  await build({
@@ -830,14 +830,14 @@ cli
830
830
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
831
831
  .action(async (root, options) => {
832
832
  filterDuplicateOptions(options);
833
- const { optimizeDeps } = await import('./chunks/dep-2285ba4f.js').then(function (n) { return n.D; });
833
+ const { optimizeDeps } = await import('./chunks/dep-6305614c.js').then(function (n) { return n.D; });
834
834
  try {
835
835
  const config = await resolveConfig({
836
836
  root,
837
837
  base: options.base,
838
838
  configFile: options.config,
839
839
  logLevel: options.logLevel,
840
- }, 'build');
840
+ }, 'serve');
841
841
  await optimizeDeps(config, options.force, true);
842
842
  }
843
843
  catch (e) {
@@ -855,7 +855,7 @@ cli
855
855
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
856
856
  .action(async (root, options) => {
857
857
  filterDuplicateOptions(options);
858
- const { preview } = await import('./chunks/dep-2285ba4f.js').then(function (n) { return n.G; });
858
+ const { preview } = await import('./chunks/dep-6305614c.js').then(function (n) { return n.G; });
859
859
  try {
860
860
  const server = await preview({
861
861
  root,
@@ -1,4 +1,4 @@
1
- export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-2285ba4f.js';
1
+ export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-6305614c.js';
2
2
  export { VERSION as version } from './constants.js';
3
3
  export { version as esbuildVersion } from 'esbuild';
4
4
  export { VERSION as rollupVersion } from 'rollup';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -52,6 +52,7 @@
52
52
  "build-types-roll": "api-extractor run && rimraf temp",
53
53
  "build-types-post-patch": "tsx scripts/postPatchTypes.ts",
54
54
  "build-types-check": "tsx scripts/checkBuiltTypes.ts && tsc --project tsconfig.check.json",
55
+ "typecheck": "tsc --noEmit",
55
56
  "lint": "eslint --cache --ext .ts src/**",
56
57
  "format": "prettier --write --cache --parser typescript \"src/**/*.ts\"",
57
58
  "prepublishOnly": "npm run build"
@@ -84,7 +85,7 @@
84
85
  "chokidar": "^3.5.3",
85
86
  "connect": "^3.7.0",
86
87
  "connect-history-api-fallback": "^2.0.0",
87
- "convert-source-map": "^1.9.0",
88
+ "convert-source-map": "^2.0.0",
88
89
  "cors": "^2.8.5",
89
90
  "cross-spawn": "^7.0.3",
90
91
  "debug": "^4.3.4",
@@ -99,7 +100,7 @@
99
100
  "launch-editor-middleware": "^2.6.0",
100
101
  "magic-string": "^0.27.0",
101
102
  "micromatch": "^4.0.5",
102
- "mlly": "^0.5.17",
103
+ "mlly": "^1.0.0",
103
104
  "mrmime": "^1.0.1",
104
105
  "okie": "^1.0.1",
105
106
  "open": "^8.4.0",
@@ -111,6 +112,7 @@
111
112
  "postcss-load-config": "^4.0.1",
112
113
  "postcss-modules": "^6.0.0",
113
114
  "resolve.exports": "^1.1.0",
115
+ "rollup-plugin-license": "^3.0.1",
114
116
  "sirv": "^2.0.2",
115
117
  "source-map-js": "^1.0.2",
116
118
  "source-map-support": "^0.5.21",
@@ -119,7 +121,7 @@
119
121
  "tsconfck": "^2.0.1",
120
122
  "tslib": "^2.4.1",
121
123
  "types": "link:./types",
122
- "ufo": "^0.8.6",
124
+ "ufo": "^1.0.1",
123
125
  "ws": "^8.11.0"
124
126
  },
125
127
  "peerDependencies": {