vite 5.1.0-beta.4 → 5.1.0-beta.5

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.
@@ -1,4 +1,4 @@
1
- import { B as commonjsGlobal, A as getDefaultExportFromCjs } from './dep-2l_yqaZo.js';
1
+ import { B as commonjsGlobal, A as getDefaultExportFromCjs } from './dep-Y86Adl1p.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -1,4 +1,4 @@
1
- import { A as getDefaultExportFromCjs } from './dep-2l_yqaZo.js';
1
+ import { A as getDefaultExportFromCjs } from './dep-Y86Adl1p.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-8a-6Quh6.js';
@@ -29558,7 +29558,7 @@ function stripLiteralDetailed(code, options) {
29558
29558
  var main$1 = {exports: {}};
29559
29559
 
29560
29560
  var name = "dotenv";
29561
- var version$2 = "16.3.1";
29561
+ var version$2 = "16.3.2";
29562
29562
  var description = "Loads environment variables from .env file";
29563
29563
  var main = "lib/main.js";
29564
29564
  var types$2 = "lib/main.d.ts";
@@ -29829,6 +29829,10 @@ function configDotenv (options) {
29829
29829
  }
29830
29830
  if (options.encoding != null) {
29831
29831
  encoding = options.encoding;
29832
+ } else {
29833
+ if (debug) {
29834
+ _debug('No encoding is specified. UTF-8 is used by default');
29835
+ }
29832
29836
  }
29833
29837
  }
29834
29838
 
@@ -29876,9 +29880,9 @@ function decrypt (encrypted, keyStr) {
29876
29880
  const key = Buffer.from(keyStr.slice(-64), 'hex');
29877
29881
  let ciphertext = Buffer.from(encrypted, 'base64');
29878
29882
 
29879
- const nonce = ciphertext.slice(0, 12);
29880
- const authTag = ciphertext.slice(-16);
29881
- ciphertext = ciphertext.slice(12, -16);
29883
+ const nonce = ciphertext.subarray(0, 12);
29884
+ const authTag = ciphertext.subarray(-16);
29885
+ ciphertext = ciphertext.subarray(12, -16);
29882
29886
 
29883
29887
  try {
29884
29888
  const aesgcm = crypto$1.createDecipheriv('aes-256-gcm', key, nonce);
@@ -31998,8 +32002,8 @@ function createCachedImport(imp) {
31998
32002
  return cached;
31999
32003
  };
32000
32004
  }
32001
- const importPostcssImport = createCachedImport(() => import('./dep-y3MfcbcG.js').then(function (n) { return n.i; }));
32002
- const importPostcssModules = createCachedImport(() => import('./dep-0RU5--AQ.js').then(function (n) { return n.i; }));
32005
+ const importPostcssImport = createCachedImport(() => import('./dep-JW1Wr5se.js').then(function (n) { return n.i; }));
32006
+ const importPostcssModules = createCachedImport(() => import('./dep-AgYU8wIQ.js').then(function (n) { return n.i; }));
32003
32007
  const importPostcss = createCachedImport(() => import('postcss'));
32004
32008
  const preprocessorWorkerControllerCache = new WeakMap();
32005
32009
  let alwaysFakeWorkerWorkerControllerCache;
@@ -66492,9 +66496,6 @@ async function build(inlineConfig = {}) {
66492
66496
  const outDir = resolve(options.outDir);
66493
66497
  // inject ssr arg to plugin load/transform hooks
66494
66498
  const plugins = (ssr ? config.plugins.map((p) => injectSsrFlagToHooks(p)) : config.plugins);
66495
- if (isDepsOptimizerEnabled(config, ssr)) {
66496
- await initDepsOptimizer(config);
66497
- }
66498
66499
  const rollupOptions = {
66499
66500
  preserveEntrySignatures: ssr
66500
66501
  ? 'allow-extension'
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 { z as colors, u as createLogger, r as resolveConfig } from './chunks/dep-2l_yqaZo.js';
5
+ import { z as colors, u as createLogger, r as resolveConfig } from './chunks/dep-Y86Adl1p.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -757,7 +757,7 @@ cli
757
757
  filterDuplicateOptions(options);
758
758
  // output structure is preserved even after bundling so require()
759
759
  // is ok here
760
- const { createServer } = await import('./chunks/dep-2l_yqaZo.js').then(function (n) { return n.D; });
760
+ const { createServer } = await import('./chunks/dep-Y86Adl1p.js').then(function (n) { return n.D; });
761
761
  try {
762
762
  const server = await createServer({
763
763
  root,
@@ -837,7 +837,7 @@ cli
837
837
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
838
838
  .action(async (root, options) => {
839
839
  filterDuplicateOptions(options);
840
- const { build } = await import('./chunks/dep-2l_yqaZo.js').then(function (n) { return n.E; });
840
+ const { build } = await import('./chunks/dep-Y86Adl1p.js').then(function (n) { return n.E; });
841
841
  const buildOptions = cleanOptions(options);
842
842
  try {
843
843
  await build({
@@ -865,7 +865,7 @@ cli
865
865
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
866
866
  .action(async (root, options) => {
867
867
  filterDuplicateOptions(options);
868
- const { optimizeDeps } = await import('./chunks/dep-2l_yqaZo.js').then(function (n) { return n.C; });
868
+ const { optimizeDeps } = await import('./chunks/dep-Y86Adl1p.js').then(function (n) { return n.C; });
869
869
  try {
870
870
  const config = await resolveConfig({
871
871
  root,
@@ -891,7 +891,7 @@ cli
891
891
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
892
892
  .action(async (root, options) => {
893
893
  filterDuplicateOptions(options);
894
- const { preview } = await import('./chunks/dep-2l_yqaZo.js').then(function (n) { return n.F; });
894
+ const { preview } = await import('./chunks/dep-Y86Adl1p.js').then(function (n) { return n.F; });
895
895
  try {
896
896
  const server = await preview({
897
897
  root,
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-2l_yqaZo.js';
3
- export { b as build, g as buildErrorMessage, j as createFilter, u as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, w as isFileServingAllowed, l as loadConfigFromFile, x as loadEnv, h as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, y as resolveEnvPrefix, k as rollupVersion, v as searchForWorkspaceRoot, q as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-2l_yqaZo.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-Y86Adl1p.js';
3
+ export { b as build, g as buildErrorMessage, j as createFilter, u as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, w as isFileServingAllowed, l as loadConfigFromFile, x as loadEnv, h as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, y as resolveEnvPrefix, k as rollupVersion, v as searchForWorkspaceRoot, q as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-Y86Adl1p.js';
4
4
  export { VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  import 'node:fs';
@@ -5545,7 +5545,7 @@ function isFileServingAllowed(url, server) {
5545
5545
  var main$1 = {exports: {}};
5546
5546
 
5547
5547
  var name = "dotenv";
5548
- var version$1 = "16.3.1";
5548
+ var version$1 = "16.3.2";
5549
5549
  var description = "Loads environment variables from .env file";
5550
5550
  var main = "lib/main.js";
5551
5551
  var types = "lib/main.d.ts";
@@ -5816,6 +5816,10 @@ function configDotenv (options) {
5816
5816
  }
5817
5817
  if (options.encoding != null) {
5818
5818
  encoding = options.encoding;
5819
+ } else {
5820
+ if (debug) {
5821
+ _debug('No encoding is specified. UTF-8 is used by default');
5822
+ }
5819
5823
  }
5820
5824
  }
5821
5825
 
@@ -5863,9 +5867,9 @@ function decrypt (encrypted, keyStr) {
5863
5867
  const key = Buffer.from(keyStr.slice(-64), 'hex');
5864
5868
  let ciphertext = Buffer.from(encrypted, 'base64');
5865
5869
 
5866
- const nonce = ciphertext.slice(0, 12);
5867
- const authTag = ciphertext.slice(-16);
5868
- ciphertext = ciphertext.slice(12, -16);
5870
+ const nonce = ciphertext.subarray(0, 12);
5871
+ const authTag = ciphertext.subarray(-16);
5872
+ ciphertext = ciphertext.subarray(12, -16);
5869
5873
 
5870
5874
  try {
5871
5875
  const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.1.0-beta.4",
3
+ "version": "5.1.0-beta.5",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@ampproject/remapping": "^2.2.1",
73
73
  "@babel/parser": "^7.23.6",
74
- "@jridgewell/trace-mapping": "^0.3.21",
74
+ "@jridgewell/trace-mapping": "^0.3.22",
75
75
  "@rollup/plugin-alias": "^5.1.0",
76
76
  "@rollup/plugin-commonjs": "^25.0.7",
77
77
  "@rollup/plugin-dynamic-import-vars": "^2.1.2",
@@ -92,7 +92,7 @@
92
92
  "cross-spawn": "^7.0.3",
93
93
  "debug": "^4.3.4",
94
94
  "dep-types": "link:./src/types",
95
- "dotenv": "^16.3.1",
95
+ "dotenv": "^16.3.2",
96
96
  "dotenv-expand": "^10.0.0",
97
97
  "es-module-lexer": "^1.4.1",
98
98
  "escape-html": "^1.0.3",