vite 2.8.0-beta.4 → 2.8.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/CHANGELOG.md +9 -0
- package/LICENSE.md +31 -3
- package/dist/node/chunks/{dep-778bed46.js → dep-6c133e83.js} +1 -1
- package/dist/node/chunks/{dep-4ef300ce.js → dep-ae5bfd1c.js} +1 -1
- package/dist/node/chunks/{dep-7b4d034a.js → dep-aff09a4c.js} +509 -490
- package/dist/node/chunks/{dep-2451c479.js → dep-ba706304.js} +16 -4
- package/dist/node/cli.js +4 -4
- package/dist/node/index.d.ts +18 -18
- package/dist/node/index.js +1 -1
- package/package.json +18 -18
- package/types/chokidar.d.ts +27 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var build = require('./dep-
|
|
3
|
+
var build = require('./dep-aff09a4c.js');
|
|
4
4
|
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
6
6
|
for (var i = 0; i < m.length; i++) {
|
|
@@ -340,8 +340,20 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
|
|
|
340
340
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
341
341
|
'text,textPath,title,tspan,unknown,use,view';
|
|
342
342
|
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
|
|
343
|
+
/**
|
|
344
|
+
* Compiler only.
|
|
345
|
+
* Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
|
|
346
|
+
*/
|
|
343
347
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
348
|
+
/**
|
|
349
|
+
* Compiler only.
|
|
350
|
+
* Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
|
|
351
|
+
*/
|
|
344
352
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
353
|
+
/**
|
|
354
|
+
* Compiler only.
|
|
355
|
+
* Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
|
|
356
|
+
*/
|
|
345
357
|
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
|
|
346
358
|
|
|
347
359
|
const escapeRE = /["'&<>]/;
|
|
@@ -1942,7 +1954,7 @@ function parseAttributes(context, type) {
|
|
|
1942
1954
|
}
|
|
1943
1955
|
const attr = parseAttribute(context, attributeNames);
|
|
1944
1956
|
// Trim whitespace between class
|
|
1945
|
-
// https://github.com/vuejs/
|
|
1957
|
+
// https://github.com/vuejs/core/issues/4251
|
|
1946
1958
|
if (attr.type === 6 /* ATTRIBUTE */ &&
|
|
1947
1959
|
attr.value &&
|
|
1948
1960
|
attr.name === 'class') {
|
|
@@ -2178,7 +2190,7 @@ function parseTextData(context, length, mode) {
|
|
|
2178
2190
|
advanceBy(context, length);
|
|
2179
2191
|
if (mode === 2 /* RAWTEXT */ ||
|
|
2180
2192
|
mode === 3 /* CDATA */ ||
|
|
2181
|
-
rawText.
|
|
2193
|
+
!rawText.includes('&')) {
|
|
2182
2194
|
return rawText;
|
|
2183
2195
|
}
|
|
2184
2196
|
else {
|
|
@@ -3802,6 +3814,7 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
|
|
|
3802
3814
|
const renderExp = createCallExpression(helper(RENDER_LIST), [
|
|
3803
3815
|
forNode.source
|
|
3804
3816
|
]);
|
|
3817
|
+
const isTemplate = isTemplateNode(node);
|
|
3805
3818
|
const memo = findDir(node, 'memo');
|
|
3806
3819
|
const keyProp = findProp(node, `key`);
|
|
3807
3820
|
const keyExp = keyProp &&
|
|
@@ -3821,7 +3834,6 @@ const transformFor = createStructuralDirectiveTransform('for', (node, dir, conte
|
|
|
3821
3834
|
return () => {
|
|
3822
3835
|
// finish the codegen now that all children have been traversed
|
|
3823
3836
|
let childBlock;
|
|
3824
|
-
const isTemplate = isTemplateNode(node);
|
|
3825
3837
|
const { children } = forNode;
|
|
3826
3838
|
// check <template v-for> key placement
|
|
3827
3839
|
if (((process.env.NODE_ENV !== 'production') || !true) && isTemplate) {
|
package/dist/node/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$0 = require('events');
|
|
4
|
-
var build = require('./chunks/dep-
|
|
4
|
+
var build = require('./chunks/dep-aff09a4c.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -683,7 +683,7 @@ cli
|
|
|
683
683
|
.action(async (root, options) => {
|
|
684
684
|
// output structure is preserved even after bundling so require()
|
|
685
685
|
// is ok here
|
|
686
|
-
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
686
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-aff09a4c.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -732,7 +732,7 @@ cli
|
|
|
732
732
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
733
733
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
734
734
|
.action(async (root, options) => {
|
|
735
|
-
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-aff09a4c.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build$1({
|
|
@@ -755,7 +755,7 @@ cli
|
|
|
755
755
|
.command('optimize [root]')
|
|
756
756
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
757
757
|
.action(async (root, options) => {
|
|
758
|
-
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
758
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-aff09a4c.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await build.resolveConfig({
|
|
761
761
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -74,6 +74,18 @@ export declare type AnymatchFn = (testString: string) => boolean
|
|
|
74
74
|
|
|
75
75
|
export declare type AnymatchPattern = string | RegExp | AnymatchFn
|
|
76
76
|
|
|
77
|
+
export declare interface AwaitWriteFinishOptions {
|
|
78
|
+
/**
|
|
79
|
+
* Amount of time in milliseconds for a file size to remain constant before emitting its event.
|
|
80
|
+
*/
|
|
81
|
+
stabilityThreshold?: number
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* File size polling interval.
|
|
85
|
+
*/
|
|
86
|
+
pollInterval?: number
|
|
87
|
+
}
|
|
88
|
+
|
|
77
89
|
/**
|
|
78
90
|
* Bundles the app for production.
|
|
79
91
|
* Returns a Promise containing the build result.
|
|
@@ -601,25 +613,25 @@ export declare interface FileSystemServeOptions {
|
|
|
601
613
|
deny?: string[];
|
|
602
614
|
}
|
|
603
615
|
|
|
604
|
-
export declare
|
|
616
|
+
export declare class FSWatcher extends EventEmitter implements fs.FSWatcher {
|
|
605
617
|
options: WatchOptions
|
|
606
618
|
|
|
607
619
|
/**
|
|
608
620
|
* Constructs a new FSWatcher instance with optional WatchOptions parameter.
|
|
609
621
|
*/
|
|
610
|
-
(options?: WatchOptions)
|
|
622
|
+
constructor(options?: WatchOptions)
|
|
611
623
|
|
|
612
624
|
/**
|
|
613
625
|
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
|
|
614
626
|
* string.
|
|
615
627
|
*/
|
|
616
|
-
add(paths: string | ReadonlyArray<string>):
|
|
628
|
+
add(paths: string | ReadonlyArray<string>): this
|
|
617
629
|
|
|
618
630
|
/**
|
|
619
631
|
* Stop watching files, directories, or glob patterns. Takes an array of strings or just one
|
|
620
632
|
* string.
|
|
621
633
|
*/
|
|
622
|
-
unwatch(paths: string | ReadonlyArray<string>):
|
|
634
|
+
unwatch(paths: string | ReadonlyArray<string>): this
|
|
623
635
|
|
|
624
636
|
/**
|
|
625
637
|
* Returns an object representing all the paths on the file system being watched by this
|
|
@@ -2163,7 +2175,7 @@ export declare interface WatchOptions {
|
|
|
2163
2175
|
|
|
2164
2176
|
/**
|
|
2165
2177
|
* Whether to use the `fsevents` watching interface if available. When set to `true` explicitly
|
|
2166
|
-
* and `fsevents` is available this
|
|
2178
|
+
* and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on
|
|
2167
2179
|
* OS X, `usePolling: true` becomes the default.
|
|
2168
2180
|
*/
|
|
2169
2181
|
useFsEvents?: boolean
|
|
@@ -2210,19 +2222,7 @@ export declare interface WatchOptions {
|
|
|
2210
2222
|
/**
|
|
2211
2223
|
* can be set to an object in order to adjust timing params:
|
|
2212
2224
|
*/
|
|
2213
|
-
awaitWriteFinish?:
|
|
2214
|
-
| {
|
|
2215
|
-
/**
|
|
2216
|
-
* Amount of time in milliseconds for a file size to remain constant before emitting its event.
|
|
2217
|
-
*/
|
|
2218
|
-
stabilityThreshold?: number
|
|
2219
|
-
|
|
2220
|
-
/**
|
|
2221
|
-
* File size polling interval.
|
|
2222
|
-
*/
|
|
2223
|
-
pollInterval?: number
|
|
2224
|
-
}
|
|
2225
|
-
| boolean
|
|
2225
|
+
awaitWriteFinish?: AwaitWriteFinishOptions | boolean
|
|
2226
2226
|
}
|
|
2227
2227
|
|
|
2228
2228
|
export declare class WebSocket extends EventEmitter {
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.8.0-beta.
|
|
3
|
+
"version": "2.8.0-beta.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -44,23 +44,23 @@
|
|
|
44
44
|
},
|
|
45
45
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"esbuild": "0.14.
|
|
47
|
+
"esbuild": "^0.14.14",
|
|
48
48
|
"postcss": "^8.4.5",
|
|
49
|
-
"resolve": "^1.
|
|
49
|
+
"resolve": "^1.22.0",
|
|
50
50
|
"rollup": "^2.59.0"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
53
|
"fsevents": "~2.3.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@ampproject/remapping": "^1.
|
|
57
|
-
"@babel/parser": "^7.16.
|
|
58
|
-
"@babel/types": "^7.16.
|
|
59
|
-
"@rollup/plugin-alias": "^3.1.
|
|
56
|
+
"@ampproject/remapping": "^1.1.1",
|
|
57
|
+
"@babel/parser": "^7.16.12",
|
|
58
|
+
"@babel/types": "^7.16.8",
|
|
59
|
+
"@rollup/plugin-alias": "^3.1.9",
|
|
60
60
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
61
61
|
"@rollup/plugin-dynamic-import-vars": "^1.4.2",
|
|
62
62
|
"@rollup/plugin-json": "^4.1.0",
|
|
63
|
-
"@rollup/plugin-node-resolve": "13.1.
|
|
63
|
+
"@rollup/plugin-node-resolve": "13.1.3",
|
|
64
64
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
65
65
|
"@rollup/pluginutils": "^4.1.2",
|
|
66
66
|
"@types/convert-source-map": "^1.5.2",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
"@types/less": "^3.0.3",
|
|
72
72
|
"@types/micromatch": "^4.0.2",
|
|
73
73
|
"@types/mime": "^2.0.3",
|
|
74
|
-
"@types/node": "^16.11.
|
|
74
|
+
"@types/node": "^16.11.21",
|
|
75
75
|
"@types/resolve": "^1.20.1",
|
|
76
76
|
"@types/sass": "~1.43.1",
|
|
77
77
|
"@types/stylus": "^0.48.36",
|
|
78
78
|
"@types/ws": "^8.2.2",
|
|
79
|
-
"@vue/compiler-dom": "^3.2.
|
|
79
|
+
"@vue/compiler-dom": "^3.2.29",
|
|
80
80
|
"acorn": "^8.7.0",
|
|
81
81
|
"cac": "6.7.9",
|
|
82
|
-
"chokidar": "^3.5.
|
|
82
|
+
"chokidar": "^3.5.3",
|
|
83
83
|
"compression": "^1.7.4",
|
|
84
84
|
"connect": "^3.7.0",
|
|
85
85
|
"connect-history-api-fallback": "^1.6.0",
|
|
@@ -88,18 +88,18 @@
|
|
|
88
88
|
"cross-spawn": "^7.0.3",
|
|
89
89
|
"debug": "^4.3.3",
|
|
90
90
|
"dotenv": "^14.3.2",
|
|
91
|
-
"dotenv-expand": "^
|
|
91
|
+
"dotenv-expand": "^6.0.1",
|
|
92
92
|
"es-module-lexer": "^0.9.3",
|
|
93
93
|
"estree-walker": "^2.0.2",
|
|
94
94
|
"etag": "^1.8.1",
|
|
95
|
-
"fast-glob": "^3.2.
|
|
95
|
+
"fast-glob": "^3.2.11",
|
|
96
96
|
"http-proxy": "^1.18.1",
|
|
97
97
|
"json5": "^2.2.0",
|
|
98
98
|
"launch-editor-middleware": "^2.3.0",
|
|
99
99
|
"magic-string": "^0.25.7",
|
|
100
100
|
"micromatch": "^4.0.4",
|
|
101
101
|
"mrmime": "^1.0.0",
|
|
102
|
-
"node-forge": "^1.2.
|
|
102
|
+
"node-forge": "^1.2.1",
|
|
103
103
|
"okie": "^1.0.1",
|
|
104
104
|
"open": "^8.4.0",
|
|
105
105
|
"periscopic": "^2.0.3",
|
|
@@ -108,16 +108,16 @@
|
|
|
108
108
|
"postcss-load-config": "^3.1.1",
|
|
109
109
|
"postcss-modules": "^4.3.0",
|
|
110
110
|
"resolve.exports": "^1.1.0",
|
|
111
|
-
"rollup-plugin-license": "^2.6.
|
|
112
|
-
"sirv": "^2.0.
|
|
111
|
+
"rollup-plugin-license": "^2.6.1",
|
|
112
|
+
"sirv": "^2.0.2",
|
|
113
113
|
"source-map-js": "^1.0.2",
|
|
114
114
|
"source-map-support": "^0.5.21",
|
|
115
115
|
"strip-ansi": "^6.0.1",
|
|
116
116
|
"terser": "^5.10.0",
|
|
117
|
-
"tsconfck": "1.1.
|
|
117
|
+
"tsconfck": "1.1.2",
|
|
118
118
|
"tslib": "^2.3.1",
|
|
119
119
|
"types": "link:./types",
|
|
120
|
-
"ws": "^8.4.
|
|
120
|
+
"ws": "^8.4.2"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
123
|
"less": "*",
|
package/types/chokidar.d.ts
CHANGED
|
@@ -29,27 +29,28 @@ THE SOFTWARE.
|
|
|
29
29
|
/// <reference types="node" />
|
|
30
30
|
|
|
31
31
|
import type * as fs from 'fs'
|
|
32
|
+
import { EventEmitter } from 'events'
|
|
32
33
|
import type { Matcher } from './anymatch'
|
|
33
34
|
|
|
34
|
-
export
|
|
35
|
+
export class FSWatcher extends EventEmitter implements fs.FSWatcher {
|
|
35
36
|
options: WatchOptions
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Constructs a new FSWatcher instance with optional WatchOptions parameter.
|
|
39
40
|
*/
|
|
40
|
-
(options?: WatchOptions)
|
|
41
|
+
constructor(options?: WatchOptions)
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
|
|
44
45
|
* string.
|
|
45
46
|
*/
|
|
46
|
-
add(paths: string | ReadonlyArray<string>):
|
|
47
|
+
add(paths: string | ReadonlyArray<string>): this
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
50
|
* Stop watching files, directories, or glob patterns. Takes an array of strings or just one
|
|
50
51
|
* string.
|
|
51
52
|
*/
|
|
52
|
-
unwatch(paths: string | ReadonlyArray<string>):
|
|
53
|
+
unwatch(paths: string | ReadonlyArray<string>): this
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* Returns an object representing all the paths on the file system being watched by this
|
|
@@ -155,7 +156,7 @@ export interface WatchOptions {
|
|
|
155
156
|
|
|
156
157
|
/**
|
|
157
158
|
* Whether to use the `fsevents` watching interface if available. When set to `true` explicitly
|
|
158
|
-
* and `fsevents` is available this
|
|
159
|
+
* and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on
|
|
159
160
|
* OS X, `usePolling: true` becomes the default.
|
|
160
161
|
*/
|
|
161
162
|
useFsEvents?: boolean
|
|
@@ -202,17 +203,25 @@ export interface WatchOptions {
|
|
|
202
203
|
/**
|
|
203
204
|
* can be set to an object in order to adjust timing params:
|
|
204
205
|
*/
|
|
205
|
-
awaitWriteFinish?:
|
|
206
|
-
| {
|
|
207
|
-
/**
|
|
208
|
-
* Amount of time in milliseconds for a file size to remain constant before emitting its event.
|
|
209
|
-
*/
|
|
210
|
-
stabilityThreshold?: number
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* File size polling interval.
|
|
214
|
-
*/
|
|
215
|
-
pollInterval?: number
|
|
216
|
-
}
|
|
217
|
-
| boolean
|
|
206
|
+
awaitWriteFinish?: AwaitWriteFinishOptions | boolean
|
|
218
207
|
}
|
|
208
|
+
|
|
209
|
+
export interface AwaitWriteFinishOptions {
|
|
210
|
+
/**
|
|
211
|
+
* Amount of time in milliseconds for a file size to remain constant before emitting its event.
|
|
212
|
+
*/
|
|
213
|
+
stabilityThreshold?: number
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* File size polling interval.
|
|
217
|
+
*/
|
|
218
|
+
pollInterval?: number
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* produces an instance of `FSWatcher`.
|
|
223
|
+
*/
|
|
224
|
+
export function watch(
|
|
225
|
+
paths: string | ReadonlyArray<string>,
|
|
226
|
+
options?: WatchOptions
|
|
227
|
+
): FSWatcher
|