vite 2.7.0-beta.1 → 2.7.0-beta.2

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.

@@ -2,31 +2,31 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var build = require('./chunks/dep-966eddc9.js');
6
- require('path');
5
+ var build = require('./chunks/dep-caa1572d.js');
7
6
  require('fs');
8
- require('querystring');
7
+ require('path');
8
+ require('os');
9
9
  require('tty');
10
10
  require('util');
11
11
  require('net');
12
12
  require('events');
13
13
  require('url');
14
14
  require('http');
15
- require('buffer');
16
- require('zlib');
17
- require('os');
15
+ require('stream');
18
16
  require('resolve');
19
17
  require('module');
20
18
  require('perf_hooks');
21
- require('readline');
22
- require('crypto');
23
- require('stream');
24
- require('esbuild');
25
- require('worker_threads');
26
- require('assert');
27
19
  require('https');
20
+ require('zlib');
21
+ require('crypto');
28
22
  require('tls');
23
+ require('assert');
24
+ require('buffer');
25
+ require('querystring');
26
+ require('esbuild');
29
27
  require('child_process');
28
+ require('worker_threads');
29
+ require('readline');
30
30
 
31
31
 
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "2.7.0-beta.1",
3
+ "version": "2.7.0-beta.2",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",
@@ -44,18 +44,18 @@
44
44
  },
45
45
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
46
46
  "dependencies": {
47
- "esbuild": "^0.13.10",
47
+ "esbuild": "^0.13.12",
48
48
  "postcss": "^8.3.11",
49
49
  "resolve": "^1.20.0",
50
- "rollup": "^2.58.3"
50
+ "rollup": "^2.59.0"
51
51
  },
52
52
  "optionalDependencies": {
53
53
  "fsevents": "~2.3.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@ampproject/remapping": "^1.0.1",
57
- "@babel/parser": "^7.15.8",
58
- "@babel/types": "^7.15.6",
57
+ "@babel/parser": "^7.16.2",
58
+ "@babel/types": "^7.16.0",
59
59
  "@rollup/plugin-alias": "^3.1.8",
60
60
  "@rollup/plugin-commonjs": "^21.0.1",
61
61
  "@rollup/plugin-dynamic-import-vars": "^1.4.1",
@@ -65,22 +65,21 @@
65
65
  "@rollup/pluginutils": "^4.1.1",
66
66
  "@types/convert-source-map": "^1.5.2",
67
67
  "@types/debug": "^4.1.7",
68
- "@types/es-module-lexer": "^0.4.1",
69
68
  "@types/estree": "^0.0.50",
70
69
  "@types/etag": "^1.8.1",
71
70
  "@types/less": "^3.0.3",
72
71
  "@types/mime": "^2.0.3",
73
- "@types/node": "^15.14.9",
72
+ "@types/node": "^16.11.6",
74
73
  "@types/resolve": "^1.20.1",
75
- "@types/sass": "~1.16.1",
74
+ "@types/sass": "~1.43.0",
76
75
  "@types/stylus": "^0.48.36",
77
- "@types/ws": "^7.4.7",
78
- "@vue/compiler-dom": "^3.2.20",
76
+ "@types/ws": "^8.2.0",
77
+ "@vue/compiler-dom": "^3.2.21",
79
78
  "acorn": "^8.5.0",
80
79
  "acorn-class-fields": "^1.0.0",
81
80
  "acorn-static-class-features": "^1.0.0",
82
81
  "builtin-modules": "^3.2.0",
83
- "cac": "6.7.3",
82
+ "cac": "6.7.9",
84
83
  "chalk": "^4.1.2",
85
84
  "chokidar": "^3.5.2",
86
85
  "compression": "^1.7.4",
@@ -99,7 +98,7 @@
99
98
  "http-proxy": "^1.18.1",
100
99
  "launch-editor-middleware": "^2.2.1",
101
100
  "magic-string": "^0.25.7",
102
- "mime": "^2.5.2",
101
+ "mime": "^3.0.0",
103
102
  "minimatch": "^3.0.4",
104
103
  "okie": "^1.0.1",
105
104
  "open": "^8.4.0",
@@ -115,10 +114,10 @@
115
114
  "source-map-support": "^0.5.20",
116
115
  "strip-ansi": "^6.0.1",
117
116
  "terser": "^5.9.0",
118
- "tsconfck": "1.0.0",
117
+ "tsconfck": "1.1.1",
119
118
  "tslib": "^2.3.1",
120
119
  "types": "link:./types",
121
- "ws": "^7.5.5"
120
+ "ws": "^8.2.3"
122
121
  },
123
122
  "peerDependencies": {
124
123
  "less": "*",
@@ -71,6 +71,26 @@ export interface RollupCommonJSOptions {
71
71
  * @default []
72
72
  */
73
73
  ignore?: ReadonlyArray<string> | ((id: string) => boolean)
74
+ /**
75
+ * In most cases, where `require` calls are inside a `try-catch` clause,
76
+ * they should be left unconverted as it requires an optional dependency
77
+ * that may or may not be installed beside the rolled up package.
78
+ * Due to the conversion of `require` to a static `import` - the call is hoisted
79
+ * to the top of the file, outside of the `try-catch` clause.
80
+ *
81
+ * - `true`: All `require` calls inside a `try` will be left unconverted.
82
+ * - `false`: All `require` calls inside a `try` will be converted as if the `try-catch` clause is not there.
83
+ * - `remove`: Remove all `require` calls from inside any `try` block.
84
+ * - `string[]`: Pass an array containing the IDs to left unconverted.
85
+ * - `((id: string) => boolean|'remove')`: Pass a function that control individual IDs.
86
+ *
87
+ * @default false
88
+ */
89
+ ignoreTryCatch?:
90
+ | boolean
91
+ | 'remove'
92
+ | ReadonlyArray<string>
93
+ | ((id: string) => boolean | 'remove')
74
94
  /**
75
95
  * Controls how to render imports from external dependencies. By default,
76
96
  * this plugin assumes that all external dependencies are CommonJS. This