vite 5.0.0-beta.0 → 5.0.0-beta.10
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.
- package/LICENSE.md +74 -3
- package/client.d.ts +8 -56
- package/dist/client/client.mjs +17 -0
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-4033fb3a.js → dep-RTfXXG9P.js} +3583 -4035
- package/dist/node/chunks/{dep-3d0847ee.js → dep-pNoMh5ox.js} +145 -145
- package/dist/node/chunks/{dep-1d1f72b4.js → dep-s3v9f2KI.js} +2 -2
- package/dist/node/cli.js +29 -13
- package/dist/node/index.d.ts +3261 -3405
- package/dist/node/index.js +8 -6
- package/dist/node-cjs/publicUtils.cjs +807 -513
- package/index.cjs +13 -9
- package/index.d.cts +6 -0
- package/package.json +43 -37
- package/types/hot.d.ts +4 -0
- package/types/import-meta.d.ts +5 -0
- /package/dist/node/chunks/{dep-c423598f.js → dep-8a-6Quh6.js} +0 -0
- /package/dist/node/chunks/{dep-f0c7dae0.js → dep-kjUoH5nk.js} +0 -0
package/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-restricted-globals */
|
|
2
2
|
|
|
3
|
+
warnCjsUsage()
|
|
4
|
+
|
|
3
5
|
// type utils
|
|
4
6
|
module.exports.defineConfig = (config) => config
|
|
5
7
|
|
|
@@ -23,12 +25,14 @@ asyncFunctions.forEach((name) => {
|
|
|
23
25
|
import('./dist/node/index.js').then((i) => i[name](...args))
|
|
24
26
|
})
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
function warnCjsUsage() {
|
|
29
|
+
if (process.env.VITE_CJS_IGNORE_WARNING) return
|
|
30
|
+
globalThis.__vite_cjs_skip_clear_screen = true
|
|
31
|
+
const yellow = (str) => `\u001b[33m${str}\u001b[39m`
|
|
32
|
+
const log = process.env.VITE_CJS_TRACE ? console.trace : console.warn
|
|
33
|
+
log(
|
|
34
|
+
yellow(
|
|
35
|
+
`The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,
|
|
36
|
+
),
|
|
37
|
+
)
|
|
38
|
+
}
|
package/index.d.cts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -20,14 +20,22 @@
|
|
|
20
20
|
"types": "./dist/node/index.d.ts",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"import": {
|
|
24
|
+
"types": "./dist/node/index.d.ts",
|
|
25
|
+
"default": "./dist/node/index.js"
|
|
26
|
+
},
|
|
27
|
+
"require": {
|
|
28
|
+
"types": "./index.d.cts",
|
|
29
|
+
"default": "./index.cjs"
|
|
30
|
+
}
|
|
26
31
|
},
|
|
27
32
|
"./client": {
|
|
28
33
|
"types": "./client.d.ts"
|
|
29
34
|
},
|
|
30
35
|
"./dist/client/*": "./dist/client/*",
|
|
36
|
+
"./types/*": {
|
|
37
|
+
"types": "./types/*"
|
|
38
|
+
},
|
|
31
39
|
"./package.json": "./package.json"
|
|
32
40
|
},
|
|
33
41
|
"files": [
|
|
@@ -35,6 +43,7 @@
|
|
|
35
43
|
"dist",
|
|
36
44
|
"client.d.ts",
|
|
37
45
|
"index.cjs",
|
|
46
|
+
"index.d.cts",
|
|
38
47
|
"types"
|
|
39
48
|
],
|
|
40
49
|
"engines": {
|
|
@@ -52,27 +61,25 @@
|
|
|
52
61
|
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
|
53
62
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
54
63
|
"dependencies": {
|
|
55
|
-
"esbuild": "^0.
|
|
56
|
-
"postcss": "^8.4.
|
|
57
|
-
"rollup": "^
|
|
64
|
+
"esbuild": "^0.19.3",
|
|
65
|
+
"postcss": "^8.4.31",
|
|
66
|
+
"rollup": "^4.1.4"
|
|
58
67
|
},
|
|
59
68
|
"optionalDependencies": {
|
|
60
|
-
"fsevents": "~2.3.
|
|
69
|
+
"fsevents": "~2.3.3"
|
|
61
70
|
},
|
|
62
71
|
"devDependencies": {
|
|
63
72
|
"@ampproject/remapping": "^2.2.1",
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@rollup/plugin-
|
|
68
|
-
"@rollup/plugin-
|
|
69
|
-
"@rollup/plugin-
|
|
70
|
-
"@rollup/plugin-
|
|
71
|
-
"@rollup/
|
|
72
|
-
"@rollup/plugin-typescript": "^11.1.2",
|
|
73
|
-
"@rollup/pluginutils": "^5.0.2",
|
|
73
|
+
"@jridgewell/trace-mapping": "^0.3.19",
|
|
74
|
+
"@rollup/plugin-alias": "^5.0.1",
|
|
75
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
76
|
+
"@rollup/plugin-dynamic-import-vars": "^2.0.7",
|
|
77
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
78
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
79
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
80
|
+
"@rollup/pluginutils": "^5.0.5",
|
|
74
81
|
"@types/escape-html": "^1.0.2",
|
|
75
|
-
"@types/pnpapi": "^0.0.
|
|
82
|
+
"@types/pnpapi": "^0.0.3",
|
|
76
83
|
"acorn": "^8.10.0",
|
|
77
84
|
"acorn-walk": "^8.2.0",
|
|
78
85
|
"cac": "^6.7.14",
|
|
@@ -85,43 +92,44 @@
|
|
|
85
92
|
"debug": "^4.3.4",
|
|
86
93
|
"dep-types": "link:./src/types",
|
|
87
94
|
"dotenv": "^16.3.1",
|
|
88
|
-
"dotenv-expand": "^
|
|
89
|
-
"es-module-lexer": "^1.3.
|
|
95
|
+
"dotenv-expand": "^10.0.0",
|
|
96
|
+
"es-module-lexer": "^1.3.1",
|
|
90
97
|
"escape-html": "^1.0.3",
|
|
91
98
|
"estree-walker": "^3.0.3",
|
|
92
99
|
"etag": "^1.8.1",
|
|
93
100
|
"fast-glob": "^3.3.1",
|
|
94
101
|
"http-proxy": "^1.18.1",
|
|
95
102
|
"json-stable-stringify": "^1.0.2",
|
|
96
|
-
"launch-editor-middleware": "^2.6.
|
|
97
|
-
"lightningcss": "^1.
|
|
98
|
-
"magic-string": "^0.30.
|
|
103
|
+
"launch-editor-middleware": "^2.6.1",
|
|
104
|
+
"lightningcss": "^1.22.0",
|
|
105
|
+
"magic-string": "^0.30.5",
|
|
99
106
|
"micromatch": "^4.0.5",
|
|
100
|
-
"mlly": "^1.4.
|
|
107
|
+
"mlly": "^1.4.2",
|
|
101
108
|
"mrmime": "^1.0.1",
|
|
102
109
|
"okie": "^1.0.1",
|
|
103
110
|
"open": "^8.4.2",
|
|
104
111
|
"parse5": "^7.1.2",
|
|
105
|
-
"periscopic": "^
|
|
112
|
+
"periscopic": "^4.0.2",
|
|
106
113
|
"picocolors": "^1.0.0",
|
|
107
114
|
"picomatch": "^2.3.1",
|
|
108
115
|
"postcss-import": "^15.1.0",
|
|
109
116
|
"postcss-load-config": "^4.0.1",
|
|
110
117
|
"postcss-modules": "^6.0.0",
|
|
111
118
|
"resolve.exports": "^2.0.2",
|
|
112
|
-
"rollup-plugin-
|
|
119
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
120
|
+
"rollup-plugin-license": "^3.2.0",
|
|
113
121
|
"sirv": "^2.0.3",
|
|
114
122
|
"source-map-support": "^0.5.21",
|
|
115
123
|
"strip-ansi": "^7.1.0",
|
|
116
124
|
"strip-literal": "^1.3.0",
|
|
117
|
-
"tsconfck": "^
|
|
118
|
-
"tslib": "^2.6.
|
|
125
|
+
"tsconfck": "^3.0.0",
|
|
126
|
+
"tslib": "^2.6.2",
|
|
119
127
|
"types": "link:./types",
|
|
120
|
-
"ufo": "^1.
|
|
121
|
-
"ws": "^8.
|
|
128
|
+
"ufo": "^1.3.1",
|
|
129
|
+
"ws": "^8.14.2"
|
|
122
130
|
},
|
|
123
131
|
"peerDependencies": {
|
|
124
|
-
"@types/node": ">=
|
|
132
|
+
"@types/node": "^18.0.0 || >=20.0.0",
|
|
125
133
|
"less": "*",
|
|
126
134
|
"lightningcss": "^1.21.0",
|
|
127
135
|
"sass": "*",
|
|
@@ -156,12 +164,10 @@
|
|
|
156
164
|
"dev": "rimraf dist && pnpm run build-bundle -w",
|
|
157
165
|
"build": "rimraf dist && run-s build-bundle build-types",
|
|
158
166
|
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
|
|
159
|
-
"build-types": "run-s build-types-temp build-types-
|
|
167
|
+
"build-types": "run-s build-types-temp build-types-roll build-types-check",
|
|
160
168
|
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
|
|
161
|
-
"build-types-
|
|
162
|
-
"build-types-
|
|
163
|
-
"build-types-post-patch": "tsx scripts/postPatchTypes.ts",
|
|
164
|
-
"build-types-check": "tsx scripts/checkBuiltTypes.ts && tsc --project tsconfig.check.json",
|
|
169
|
+
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
|
|
170
|
+
"build-types-check": "tsc --project tsconfig.check.json",
|
|
165
171
|
"typecheck": "tsc --noEmit",
|
|
166
172
|
"lint": "eslint --cache --ext .ts src/**",
|
|
167
173
|
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\""
|
package/types/hot.d.ts
CHANGED
|
@@ -28,5 +28,9 @@ export interface ViteHotContext {
|
|
|
28
28
|
event: T,
|
|
29
29
|
cb: (payload: InferCustomEventPayload<T>) => void,
|
|
30
30
|
): void
|
|
31
|
+
off<T extends string>(
|
|
32
|
+
event: T,
|
|
33
|
+
cb: (payload: InferCustomEventPayload<T>) => void,
|
|
34
|
+
): void
|
|
31
35
|
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
|
|
32
36
|
}
|
|
File without changes
|
|
File without changes
|