vite 4.2.0 → 4.3.0-beta.0

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,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-c167897e.js';
3
+ import { C as commonjsGlobal } from './dep-7f82b32e.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 picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-c167897e.js';
5
+ import { A as picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-7f82b32e.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:url';
8
8
  import 'node:module';
@@ -729,7 +729,7 @@ cli
729
729
  filterDuplicateOptions(options);
730
730
  // output structure is preserved even after bundling so require()
731
731
  // is ok here
732
- const { createServer } = await import('./chunks/dep-c167897e.js').then(function (n) { return n.F; });
732
+ const { createServer } = await import('./chunks/dep-7f82b32e.js').then(function (n) { return n.F; });
733
733
  try {
734
734
  const server = await createServer({
735
735
  root,
@@ -807,7 +807,7 @@ cli
807
807
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
808
808
  .action(async (root, options) => {
809
809
  filterDuplicateOptions(options);
810
- const { build } = await import('./chunks/dep-c167897e.js').then(function (n) { return n.E; });
810
+ const { build } = await import('./chunks/dep-7f82b32e.js').then(function (n) { return n.E; });
811
811
  const buildOptions = cleanOptions(options);
812
812
  try {
813
813
  await build({
@@ -835,7 +835,7 @@ cli
835
835
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
836
836
  .action(async (root, options) => {
837
837
  filterDuplicateOptions(options);
838
- const { optimizeDeps } = await import('./chunks/dep-c167897e.js').then(function (n) { return n.D; });
838
+ const { optimizeDeps } = await import('./chunks/dep-7f82b32e.js').then(function (n) { return n.D; });
839
839
  try {
840
840
  const config = await resolveConfig({
841
841
  root,
@@ -860,7 +860,7 @@ cli
860
860
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
861
861
  .action(async (root, options) => {
862
862
  filterDuplicateOptions(options);
863
- const { preview } = await import('./chunks/dep-c167897e.js').then(function (n) { return n.G; });
863
+ const { preview } = await import('./chunks/dep-7f82b32e.js').then(function (n) { return n.G; });
864
864
  try {
865
865
  const server = await preview({
866
866
  root,
@@ -94,6 +94,7 @@ const KNOWN_ASSET_TYPES = [
94
94
  'wav',
95
95
  'flac',
96
96
  'aac',
97
+ 'opus',
97
98
  // fonts
98
99
  'woff2?',
99
100
  'eot',
@@ -1184,7 +1184,6 @@ export declare interface InternalResolveOptions extends Required<ResolveOptions>
1184
1184
  asSrc?: boolean;
1185
1185
  tryIndex?: boolean;
1186
1186
  tryPrefix?: string;
1187
- skipPackageJson?: boolean;
1188
1187
  preferRelative?: boolean;
1189
1188
  isRequire?: boolean;
1190
1189
  isFromTsImporter?: boolean;
@@ -1762,7 +1761,7 @@ export declare interface ResolveOptions {
1762
1761
  preserveSymlinks?: boolean;
1763
1762
  }
1764
1763
 
1765
- export declare function resolvePackageData(id: string, basedir: string, preserveSymlinks?: boolean, packageCache?: PackageCache): PackageData | null;
1764
+ export declare function resolvePackageData(pkgName: string, basedir: string, preserveSymlinks?: boolean, packageCache?: PackageCache): PackageData | null;
1766
1765
 
1767
1766
  export declare function resolvePackageEntry(id: string, { dir, data, setResolvedCache, getResolvedCache }: PackageData, targetWeb: boolean, options: InternalResolveOptions): string | undefined;
1768
1767
 
@@ -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-c167897e.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-7f82b32e.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';
@@ -3404,15 +3404,12 @@ const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
3404
3404
  forbiddenIdentifiers.add('');
3405
3405
 
3406
3406
  const createFilter = createFilter$1;
3407
+ const windowsSlashRE = /\\/g;
3407
3408
  function slash(p) {
3408
- return p.replace(/\\/g, '/');
3409
+ return p.replace(windowsSlashRE, '/');
3409
3410
  }
3410
3411
  // TODO: use import()
3411
3412
  const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)));
3412
- try {
3413
- Boolean(_require('pnpapi'));
3414
- }
3415
- catch { }
3416
3413
  // set in bin/vite.js
3417
3414
  const filter = process.env.VITE_DEBUG_FILTER;
3418
3415
  const DEBUG = process.env.DEBUG;
@@ -3626,8 +3623,8 @@ function normalizeAlias(o = []) {
3626
3623
  // work around https://github.com/rollup/plugins/issues/759
3627
3624
  function normalizeSingleAlias({ find, replacement, customResolver, }) {
3628
3625
  if (typeof find === 'string' &&
3629
- find.endsWith('/') &&
3630
- replacement.endsWith('/')) {
3626
+ find[find.length - 1] === '/' &&
3627
+ replacement[replacement.length - 1] === '/') {
3631
3628
  find = find.slice(0, find.length - 1);
3632
3629
  replacement = replacement.slice(0, replacement.length - 1);
3633
3630
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.2.0",
3
+ "version": "4.3.0-beta.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -69,15 +69,15 @@
69
69
  "esbuild": "^0.17.5",
70
70
  "postcss": "^8.4.21",
71
71
  "resolve": "^1.22.1",
72
- "rollup": "^3.18.0"
72
+ "rollup": "^3.20.0"
73
73
  },
74
74
  "optionalDependencies": {
75
75
  "fsevents": "~2.3.2"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@ampproject/remapping": "^2.2.0",
79
- "@babel/parser": "^7.21.2",
80
- "@babel/types": "^7.21.2",
79
+ "@babel/parser": "^7.21.3",
80
+ "@babel/types": "^7.21.3",
81
81
  "@jridgewell/trace-mapping": "^0.3.17",
82
82
  "@rollup/plugin-alias": "^4.0.3",
83
83
  "@rollup/plugin-commonjs": "^24.0.1",
@@ -86,6 +86,7 @@
86
86
  "@rollup/plugin-node-resolve": "15.0.1",
87
87
  "@rollup/plugin-typescript": "^11.0.0",
88
88
  "@rollup/pluginutils": "^5.0.2",
89
+ "@types/pnpapi": "^0.0.2",
89
90
  "acorn": "^8.8.2",
90
91
  "acorn-walk": "^8.2.0",
91
92
  "cac": "^6.7.14",
@@ -108,7 +109,7 @@
108
109
  "launch-editor-middleware": "^2.6.0",
109
110
  "magic-string": "^0.30.0",
110
111
  "micromatch": "^4.0.5",
111
- "mlly": "^1.1.1",
112
+ "mlly": "^1.2.0",
112
113
  "mrmime": "^1.0.1",
113
114
  "okie": "^1.0.1",
114
115
  "open": "^8.4.2",
@@ -126,11 +127,11 @@
126
127
  "source-map-support": "^0.5.21",
127
128
  "strip-ansi": "^7.0.1",
128
129
  "strip-literal": "^1.0.1",
129
- "tsconfck": "^2.1.0",
130
+ "tsconfck": "^2.1.1",
130
131
  "tslib": "^2.5.0",
131
132
  "types": "link:./types",
132
133
  "ufo": "^1.1.1",
133
- "ws": "^8.12.1"
134
+ "ws": "^8.13.0"
134
135
  },
135
136
  "peerDependencies": {
136
137
  "@types/node": ">= 14",