vite 6.4.1 → 7.1.12

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.
Files changed (41) hide show
  1. package/LICENSE.md +76 -338
  2. package/README.md +1 -1
  3. package/bin/openChrome.js +68 -0
  4. package/bin/vite.js +7 -7
  5. package/dist/client/client.mjs +893 -921
  6. package/dist/client/env.mjs +14 -19
  7. package/dist/node/chunks/build.js +4 -0
  8. package/dist/node/chunks/build2.js +5523 -0
  9. package/dist/node/chunks/chunk.js +31 -0
  10. package/dist/node/chunks/config.js +36197 -0
  11. package/dist/node/chunks/config2.js +4 -0
  12. package/dist/node/chunks/dist.js +6758 -0
  13. package/dist/node/chunks/lib.js +377 -0
  14. package/dist/node/chunks/logger.js +320 -0
  15. package/dist/node/chunks/moduleRunnerTransport.d.ts +88 -0
  16. package/dist/node/chunks/optimizer.js +4 -0
  17. package/dist/node/chunks/postcss-import.js +479 -0
  18. package/dist/node/chunks/preview.js +4 -0
  19. package/dist/node/chunks/server.js +4 -0
  20. package/dist/node/cli.js +614 -865
  21. package/dist/node/index.d.ts +2692 -3282
  22. package/dist/node/index.js +24 -188
  23. package/dist/node/module-runner.d.ts +251 -234
  24. package/dist/node/module-runner.js +992 -1177
  25. package/package.json +56 -61
  26. package/types/importGlob.d.ts +14 -0
  27. package/types/importMeta.d.ts +1 -2
  28. package/types/internal/cssPreprocessorOptions.d.ts +3 -22
  29. package/types/internal/terserOptions.d.ts +11 -0
  30. package/types/metadata.d.ts +0 -2
  31. package/bin/openChrome.applescript +0 -95
  32. package/dist/node/chunks/dep-3RmXg9uo.js +0 -553
  33. package/dist/node/chunks/dep-C9BXG1mU.js +0 -822
  34. package/dist/node/chunks/dep-CvfTChi5.js +0 -8218
  35. package/dist/node/chunks/dep-D4NMHUTW.js +0 -49531
  36. package/dist/node/chunks/dep-DWMUTS1A.js +0 -7113
  37. package/dist/node/constants.js +0 -149
  38. package/dist/node/moduleRunnerTransport.d-DJ_mE5sf.d.ts +0 -87
  39. package/dist/node-cjs/publicUtils.cjs +0 -3987
  40. package/index.cjs +0 -96
  41. package/index.d.cts +0 -6
package/index.cjs DELETED
@@ -1,96 +0,0 @@
1
- const description =
2
- ' See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.'
3
-
4
- warnCjsUsage()
5
-
6
- // type utils
7
- module.exports.defineConfig = (config) => config
8
-
9
- // proxy cjs utils (sync functions)
10
- Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
11
-
12
- // async functions, can be redirect from ESM build
13
- const asyncFunctions = [
14
- 'build',
15
- 'createServer',
16
- 'preview',
17
- 'transformWithEsbuild',
18
- 'resolveConfig',
19
- 'optimizeDeps',
20
- 'formatPostcssSourceMap',
21
- 'loadConfigFromFile',
22
- 'preprocessCSS',
23
- 'createBuilder',
24
- 'runnerImport',
25
- ]
26
- asyncFunctions.forEach((name) => {
27
- module.exports[name] = (...args) =>
28
- import('./dist/node/index.js').then((i) => i[name](...args))
29
- })
30
-
31
- // variables and sync functions that cannot be used from cjs build
32
- const disallowedVariables = [
33
- // was not exposed in cjs from the beginning
34
- 'parseAst',
35
- 'parseAstAsync',
36
- 'buildErrorMessage',
37
- 'sortUserPlugins',
38
- // Environment API related variables that are too big to include in the cjs build
39
- 'DevEnvironment',
40
- 'BuildEnvironment',
41
- 'createIdResolver',
42
- 'createRunnableDevEnvironment',
43
- // can be redirected from ESM, but doesn't make sense as it's Environment API related
44
- 'fetchModule',
45
- 'moduleRunnerTransform',
46
- // can be exposed, but doesn't make sense as it's Environment API related
47
- 'createServerHotChannel',
48
- 'createServerModuleRunner',
49
- 'createServerModuleRunnerTransport',
50
- 'isRunnableDevEnvironment',
51
- 'createFetchableDevEnvironment',
52
- 'isFetchableDevEnvironment',
53
- ]
54
- disallowedVariables.forEach((name) => {
55
- Object.defineProperty(module.exports, name, {
56
- get() {
57
- throw new Error(
58
- `${name} is not available in the CJS build of Vite.` + description,
59
- )
60
- },
61
- })
62
- })
63
-
64
- function warnCjsUsage() {
65
- if (process.env.VITE_CJS_IGNORE_WARNING) return
66
- const logLevelIndex = process.argv.findIndex((arg) =>
67
- /^(?:-l|--logLevel)/.test(arg),
68
- )
69
- if (logLevelIndex > 0) {
70
- const logLevelValue = process.argv[logLevelIndex + 1]
71
- if (logLevelValue === 'silent' || logLevelValue === 'error') {
72
- return
73
- }
74
- if (/silent|error/.test(process.argv[logLevelIndex])) {
75
- return
76
- }
77
- }
78
- const yellow = (str) => `\u001b[33m${str}\u001b[39m`
79
- console.warn(
80
- yellow("The CJS build of Vite's Node API is deprecated." + description),
81
- )
82
- if (process.env.VITE_CJS_TRACE) {
83
- const e = {}
84
- const stackTraceLimit = Error.stackTraceLimit
85
- Error.stackTraceLimit = 100
86
- Error.captureStackTrace(e)
87
- Error.stackTraceLimit = stackTraceLimit
88
- console.log(
89
- e.stack
90
- .split('\n')
91
- .slice(1)
92
- .filter((line) => !line.includes('(node:'))
93
- .join('\n'),
94
- )
95
- }
96
- }
package/index.d.cts DELETED
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
3
- */
4
- declare const module: any
5
-
6
- export = module