vite 4.3.1 → 4.3.3

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.

@@ -53,11 +53,7 @@ function getDefaultExportFromCjs (x) {
53
53
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
54
54
  }
55
55
 
56
- var picocolorsExports = {};
57
- var picocolors = {
58
- get exports(){ return picocolorsExports; },
59
- set exports(v){ picocolorsExports = v; },
60
- };
56
+ var picocolors = {exports: {}};
61
57
 
62
58
  let tty = require$$0;
63
59
 
@@ -116,19 +112,14 @@ let createColors = (enabled = isColorSupported) => ({
116
112
  });
117
113
 
118
114
  picocolors.exports = createColors();
119
- picocolorsExports.createColors = createColors;
115
+ picocolors.exports.createColors = createColors;
120
116
 
121
- var srcExports = {};
122
- var src = {
123
- get exports(){ return srcExports; },
124
- set exports(v){ srcExports = v; },
125
- };
117
+ var picocolorsExports = picocolors.exports;
118
+ var colors = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
126
119
 
127
- var browserExports = {};
128
- var browser = {
129
- get exports(){ return browserExports; },
130
- set exports(v){ browserExports = v; },
131
- };
120
+ var src = {exports: {}};
121
+
122
+ var browser = {exports: {}};
132
123
 
133
124
  /**
134
125
  * Helpers.
@@ -588,7 +579,7 @@ function requireCommon () {
588
579
  var hasRequiredBrowser;
589
580
 
590
581
  function requireBrowser () {
591
- if (hasRequiredBrowser) return browserExports;
582
+ if (hasRequiredBrowser) return browser.exports;
592
583
  hasRequiredBrowser = 1;
593
584
  (function (module, exports) {
594
585
  /**
@@ -857,16 +848,12 @@ function requireBrowser () {
857
848
  } catch (error) {
858
849
  return '[UnexpectedJSONParseError]: ' + error.message;
859
850
  }
860
- };
861
- } (browser, browserExports));
862
- return browserExports;
851
+ };
852
+ } (browser, browser.exports));
853
+ return browser.exports;
863
854
  }
864
855
 
865
- var nodeExports = {};
866
- var node = {
867
- get exports(){ return nodeExports; },
868
- set exports(v){ nodeExports = v; },
869
- };
856
+ var node = {exports: {}};
870
857
 
871
858
  /**
872
859
  * Module dependencies.
@@ -875,7 +862,7 @@ var node = {
875
862
  var hasRequiredNode;
876
863
 
877
864
  function requireNode () {
878
- if (hasRequiredNode) return nodeExports;
865
+ if (hasRequiredNode) return node.exports;
879
866
  hasRequiredNode = 1;
880
867
  (function (module, exports) {
881
868
  const tty = require$$0;
@@ -1136,9 +1123,9 @@ function requireNode () {
1136
1123
  formatters.O = function (v) {
1137
1124
  this.inspectOpts.colors = this.useColors;
1138
1125
  return util.inspect(v, this.inspectOpts);
1139
- };
1140
- } (node, nodeExports));
1141
- return nodeExports;
1126
+ };
1127
+ } (node, node.exports));
1128
+ return node.exports;
1142
1129
  }
1143
1130
 
1144
1131
  /**
@@ -1146,22 +1133,15 @@ function requireNode () {
1146
1133
  * treat as a browser.
1147
1134
  */
1148
1135
 
1149
- (function (module) {
1150
- if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
1151
- module.exports = requireBrowser();
1152
- } else {
1153
- module.exports = requireNode();
1154
- }
1155
- } (src));
1136
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
1137
+ src.exports = requireBrowser();
1138
+ } else {
1139
+ src.exports = requireNode();
1140
+ }
1156
1141
 
1142
+ var srcExports = src.exports;
1157
1143
  var debug$1 = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
1158
1144
 
1159
- var picomatchExports = {};
1160
- var picomatch$1 = {
1161
- get exports(){ return picomatchExports; },
1162
- set exports(v){ picomatchExports = v; },
1163
- };
1164
-
1165
1145
  var utils$3 = {};
1166
1146
 
1167
1147
  const path$2 = require$$0$1;
@@ -1405,7 +1385,7 @@ var constants$2 = {
1405
1385
  output = `(?:^(?!${output}).*$)`;
1406
1386
  }
1407
1387
  return output;
1408
- };
1388
+ };
1409
1389
  } (utils$3));
1410
1390
 
1411
1391
  const utils$2 = utils$3;
@@ -2910,9 +2890,9 @@ const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
2910
2890
  * @api public
2911
2891
  */
2912
2892
 
2913
- const picomatch = (glob, options, returnState = false) => {
2893
+ const picomatch$1 = (glob, options, returnState = false) => {
2914
2894
  if (Array.isArray(glob)) {
2915
- const fns = glob.map(input => picomatch(input, options, returnState));
2895
+ const fns = glob.map(input => picomatch$1(input, options, returnState));
2916
2896
  const arrayMatcher = str => {
2917
2897
  for (const isMatch of fns) {
2918
2898
  const state = isMatch(str);
@@ -2932,8 +2912,8 @@ const picomatch = (glob, options, returnState = false) => {
2932
2912
  const opts = options || {};
2933
2913
  const posix = utils.isWindows(options);
2934
2914
  const regex = isState
2935
- ? picomatch.compileRe(glob, options)
2936
- : picomatch.makeRe(glob, options, false, true);
2915
+ ? picomatch$1.compileRe(glob, options)
2916
+ : picomatch$1.makeRe(glob, options, false, true);
2937
2917
 
2938
2918
  const state = regex.state;
2939
2919
  delete regex.state;
@@ -2941,11 +2921,11 @@ const picomatch = (glob, options, returnState = false) => {
2941
2921
  let isIgnored = () => false;
2942
2922
  if (opts.ignore) {
2943
2923
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
2944
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2924
+ isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
2945
2925
  }
2946
2926
 
2947
2927
  const matcher = (input, returnObject = false) => {
2948
- const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
2928
+ const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
2949
2929
  const result = { glob, state, regex, posix, input, output, match, isMatch };
2950
2930
 
2951
2931
  if (typeof opts.onResult === 'function') {
@@ -2995,7 +2975,7 @@ const picomatch = (glob, options, returnState = false) => {
2995
2975
  * @api public
2996
2976
  */
2997
2977
 
2998
- picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2978
+ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
2999
2979
  if (typeof input !== 'string') {
3000
2980
  throw new TypeError('Expected input to be a string');
3001
2981
  }
@@ -3016,7 +2996,7 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3016
2996
 
3017
2997
  if (match === false || opts.capture === true) {
3018
2998
  if (opts.matchBase === true || opts.basename === true) {
3019
- match = picomatch.matchBase(input, regex, options, posix);
2999
+ match = picomatch$1.matchBase(input, regex, options, posix);
3020
3000
  } else {
3021
3001
  match = regex.exec(output);
3022
3002
  }
@@ -3039,8 +3019,8 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3039
3019
  * @api public
3040
3020
  */
3041
3021
 
3042
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3043
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
3022
+ picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3023
+ const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
3044
3024
  return regex.test(path$1.basename(input));
3045
3025
  };
3046
3026
 
@@ -3061,7 +3041,7 @@ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) =
3061
3041
  * @api public
3062
3042
  */
3063
3043
 
3064
- picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
3044
+ picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
3065
3045
 
3066
3046
  /**
3067
3047
  * Parse a glob pattern to create the source string for a regular
@@ -3077,8 +3057,8 @@ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str
3077
3057
  * @api public
3078
3058
  */
3079
3059
 
3080
- picomatch.parse = (pattern, options) => {
3081
- if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
3060
+ picomatch$1.parse = (pattern, options) => {
3061
+ if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
3082
3062
  return parse$1(pattern, { ...options, fastpaths: false });
3083
3063
  };
3084
3064
 
@@ -3109,7 +3089,7 @@ picomatch.parse = (pattern, options) => {
3109
3089
  * @api public
3110
3090
  */
3111
3091
 
3112
- picomatch.scan = (input, options) => scan(input, options);
3092
+ picomatch$1.scan = (input, options) => scan(input, options);
3113
3093
 
3114
3094
  /**
3115
3095
  * Compile a regular expression from the `state` object returned by the
@@ -3123,7 +3103,7 @@ picomatch.scan = (input, options) => scan(input, options);
3123
3103
  * @api public
3124
3104
  */
3125
3105
 
3126
- picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
3106
+ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
3127
3107
  if (returnOutput === true) {
3128
3108
  return state.output;
3129
3109
  }
@@ -3137,7 +3117,7 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
3137
3117
  source = `^(?!${source}).*$`;
3138
3118
  }
3139
3119
 
3140
- const regex = picomatch.toRegex(source, options);
3120
+ const regex = picomatch$1.toRegex(source, options);
3141
3121
  if (returnState === true) {
3142
3122
  regex.state = state;
3143
3123
  }
@@ -3164,7 +3144,7 @@ picomatch.compileRe = (state, options, returnOutput = false, returnState = false
3164
3144
  * @api public
3165
3145
  */
3166
3146
 
3167
- picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
3147
+ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
3168
3148
  if (!input || typeof input !== 'string') {
3169
3149
  throw new TypeError('Expected a non-empty string');
3170
3150
  }
@@ -3179,7 +3159,7 @@ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = fal
3179
3159
  parsed = parse$1(input, options);
3180
3160
  }
3181
3161
 
3182
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
3162
+ return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
3183
3163
  };
3184
3164
 
3185
3165
  /**
@@ -3199,7 +3179,7 @@ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = fal
3199
3179
  * @api public
3200
3180
  */
3201
3181
 
3202
- picomatch.toRegex = (source, options) => {
3182
+ picomatch$1.toRegex = (source, options) => {
3203
3183
  try {
3204
3184
  const opts = options || {};
3205
3185
  return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
@@ -3214,20 +3194,17 @@ picomatch.toRegex = (source, options) => {
3214
3194
  * @return {Object}
3215
3195
  */
3216
3196
 
3217
- picomatch.constants = constants;
3197
+ picomatch$1.constants = constants;
3218
3198
 
3219
3199
  /**
3220
3200
  * Expose "picomatch"
3221
3201
  */
3222
3202
 
3223
- var picomatch_1 = picomatch;
3203
+ var picomatch_1 = picomatch$1;
3224
3204
 
3225
- (function (module) {
3205
+ var picomatch = picomatch_1;
3226
3206
 
3227
- module.exports = picomatch_1;
3228
- } (picomatch$1));
3229
-
3230
- var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
3207
+ var pm = /*@__PURE__*/getDefaultExportFromCjs(picomatch);
3231
3208
 
3232
3209
  // Helper since Typescript can't detect readonly arrays with Array.isArray
3233
3210
  function isArray(arg) {
@@ -3739,6 +3716,8 @@ function stattag (stat) {
3739
3716
  return '"' + size + '-' + mtime + '"'
3740
3717
  }
3741
3718
 
3719
+ var getEtag = /*@__PURE__*/getDefaultExportFromCjs(etag_1);
3720
+
3742
3721
  const debug = createDebugger('vite:sourcemap', {
3743
3722
  onlyWhenFocused: true,
3744
3723
  });
@@ -3768,7 +3747,7 @@ const alias = {
3768
3747
  json: 'application/json',
3769
3748
  };
3770
3749
  function send(req, res, content, type, options) {
3771
- const { etag = etag_1(content, { weak: true }), cacheControl = 'no-cache', headers, map, } = options;
3750
+ const { etag = getEtag(content, { weak: true }), cacheControl = 'no-cache', headers, map, } = options;
3772
3751
  if (res.writableEnded) {
3773
3752
  return;
3774
3753
  }
@@ -3828,11 +3807,11 @@ function createLogger(level = 'info', options = {}) {
3828
3807
  const format = () => {
3829
3808
  if (options.timestamp) {
3830
3809
  const tag = type === 'info'
3831
- ? picocolorsExports.cyan(picocolorsExports.bold(prefix))
3810
+ ? colors.cyan(colors.bold(prefix))
3832
3811
  : type === 'warn'
3833
- ? picocolorsExports.yellow(picocolorsExports.bold(prefix))
3834
- : picocolorsExports.red(picocolorsExports.bold(prefix));
3835
- return `${picocolorsExports.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
3812
+ ? colors.yellow(colors.bold(prefix))
3813
+ : colors.red(colors.bold(prefix));
3814
+ return `${colors.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
3836
3815
  }
3837
3816
  else {
3838
3817
  return msg;
@@ -3845,7 +3824,7 @@ function createLogger(level = 'info', options = {}) {
3845
3824
  if (type === lastType && msg === lastMsg) {
3846
3825
  sameCount++;
3847
3826
  clear();
3848
- console[method](format(), picocolorsExports.yellow(`(x${sameCount + 1})`));
3827
+ console[method](format(), colors.yellow(`(x${sameCount + 1})`));
3849
3828
  }
3850
3829
  else {
3851
3830
  sameCount = 0;
@@ -3968,11 +3947,7 @@ function isFileServingAllowed(url, server) {
3968
3947
  return false;
3969
3948
  }
3970
3949
 
3971
- var mainExports = {};
3972
- var main$1 = {
3973
- get exports(){ return mainExports; },
3974
- set exports(v){ mainExports = v; },
3975
- };
3950
+ var main$1 = {exports: {}};
3976
3951
 
3977
3952
  var name = "dotenv";
3978
3953
  var version$1 = "16.0.3";
@@ -4157,8 +4132,8 @@ const DotenvModule = {
4157
4132
  parse
4158
4133
  };
4159
4134
 
4160
- mainExports.config = DotenvModule.config;
4161
- var parse_1 = mainExports.parse = DotenvModule.parse;
4135
+ main$1.exports.config = DotenvModule.config;
4136
+ var parse_1 = main$1.exports.parse = DotenvModule.parse;
4162
4137
  main$1.exports = DotenvModule;
4163
4138
 
4164
4139
  function _interpolate (envValue, environment, config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.3.1",
3
+ "version": "4.3.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -67,26 +67,26 @@
67
67
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
68
68
  "dependencies": {
69
69
  "esbuild": "^0.17.5",
70
- "postcss": "^8.4.21",
71
- "rollup": "^3.20.2"
70
+ "postcss": "^8.4.23",
71
+ "rollup": "^3.21.0"
72
72
  },
73
73
  "optionalDependencies": {
74
74
  "fsevents": "~2.3.2"
75
75
  },
76
76
  "devDependencies": {
77
- "@ampproject/remapping": "^2.2.0",
78
- "@babel/parser": "^7.21.3",
79
- "@babel/types": "^7.21.3",
80
- "@jridgewell/trace-mapping": "^0.3.17",
81
- "@rollup/plugin-alias": "^4.0.3",
82
- "@rollup/plugin-commonjs": "^24.0.1",
77
+ "@ampproject/remapping": "^2.2.1",
78
+ "@babel/parser": "^7.21.4",
79
+ "@babel/types": "^7.21.4",
80
+ "@jridgewell/trace-mapping": "^0.3.18",
81
+ "@rollup/plugin-alias": "^4.0.4",
82
+ "@rollup/plugin-commonjs": "^24.1.0",
83
83
  "@rollup/plugin-dynamic-import-vars": "^2.0.3",
84
84
  "@rollup/plugin-json": "^6.0.0",
85
- "@rollup/plugin-node-resolve": "15.0.1",
86
- "@rollup/plugin-typescript": "^11.0.0",
85
+ "@rollup/plugin-node-resolve": "15.0.2",
86
+ "@rollup/plugin-typescript": "^11.1.0",
87
87
  "@rollup/pluginutils": "^5.0.2",
88
88
  "@types/pnpapi": "^0.0.2",
89
- "@types/escape-html": "^1.0.0",
89
+ "@types/escape-html": "^1.0.2",
90
90
  "acorn": "^8.8.2",
91
91
  "acorn-walk": "^8.2.0",
92
92
  "cac": "^6.7.14",
@@ -100,7 +100,7 @@
100
100
  "dep-types": "link:./src/types",
101
101
  "dotenv": "^16.0.3",
102
102
  "dotenv-expand": "^9.0.0",
103
- "es-module-lexer": "^1.2.0",
103
+ "es-module-lexer": "^1.2.1",
104
104
  "escape-html": "^1.0.3",
105
105
  "estree-walker": "^3.0.3",
106
106
  "etag": "^1.8.1",
@@ -121,7 +121,7 @@
121
121
  "postcss-import": "^15.1.0",
122
122
  "postcss-load-config": "^4.0.1",
123
123
  "postcss-modules": "^6.0.0",
124
- "resolve.exports": "^2.0.1",
124
+ "resolve.exports": "^2.0.2",
125
125
  "rollup-plugin-license": "^3.0.1",
126
126
  "sirv": "^2.0.2",
127
127
  "source-map-js": "^1.0.2",