vite 2.7.0 → 2.7.1

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 CHANGED
@@ -1,5 +1,46 @@
1
+ ## [2.7.1](https://github.com/vitejs/vite/compare/v2.7.0...v2.7.1) (2021-12-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ssr:** `ssrTransform` handling for empty ArrayPattern ([#5988](https://github.com/vitejs/vite/issues/5988)) ([79aa687](https://github.com/vitejs/vite/commit/79aa68744cf17553448bce5c175a25f785e4a743))
7
+
8
+
9
+
1
10
  # [2.7.0](https://github.com/vitejs/vite/compare/v2.7.0-beta.11...v2.7.0) (2021-12-07)
2
11
 
12
+ - 🎉 Revamped SSR dependency handling
13
+ - 🧩 API consolidation
14
+ - 🛑 server.fs.strict by default
15
+
16
+ ### BREAKING CHANGES
17
+
18
+ - `server.fs.strict` is `true` by default ([#5341](https://github.com/vitejs/vite/pull/5341))
19
+ See [server filesystem restriction docs](https://vitejs.dev/config/#server-fs-strict) for more details.
20
+ - Plugin hooks `ssr` param to object in `resolveId`, `load`, and `transform` ([#5253](https://github.com/vitejs/vite/pull/5253))
21
+ Previous to this release, the `ssr` param was passed as a `boolean` in the last parameter of each hook. The new interface for these hooks is now:
22
+ ```ts
23
+ export interface Plugin extends RollupPlugin {
24
+ // ... other hooks
25
+ resolveId?(this: PluginContext, source: string, importer: string | undefined, options: {
26
+ custom?: CustomPluginOptions;
27
+ ssr?: boolean;
28
+ }): Promise<ResolveIdResult> | ResolveIdResult;
29
+ load?(this: PluginContext, id: string, options?: {
30
+ ssr?: boolean;
31
+ }): Promise<LoadResult> | LoadResult;
32
+ transform?(this: TransformPluginContext, code: string, id: string, options?: {
33
+ ssr?: boolean;
34
+ }): Promise<TransformResult> | TransformResult;
35
+ }
36
+ ```
37
+ In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7.
38
+ - `server.pluginContainer` options object for `resolveId`, `load`, and `transform` ([#5294](https://github.com/vitejs/vite/pull/5294))
39
+ - Normalize scripts and commands naming ([#5207](https://github.com/vitejs/vite/pull/5207))
40
+ Adds a new `vite dev` command alias for `vite serve`, preparing for the new release of create-vite where package scripts are renamed to `dev`, `build`, and `preview`.
41
+ - Align experimental `preview` api ([#5407](https://github.com/vitejs/vite/pull/5407))
42
+ This API was first introduced in 2.6 and it is still in flux.
43
+ - resolve `rollupOptions.input` paths ([#5601](https://github.com/vitejs/vite/pull/5601))
3
44
 
4
45
  ### Features
5
46
 
@@ -160,35 +201,6 @@
160
201
 
161
202
  # [2.7.0-beta.0](https://github.com/vitejs/vite/compare/v2.6.13...v2.7.0-beta.0) (2021-10-28)
162
203
 
163
-
164
- ### BREAKING CHANGES
165
-
166
- - `server.fs.strict` is `true` by default ([#5341](https://github.com/vitejs/vite/pull/5341))
167
- See [server filesystem restriction docs](https://vitejs.dev/config/#server-fs-strict) for more details.
168
- - Plugin hooks `ssr` param to object in `resolveId`, `load`, and `transform` ([#5253](https://github.com/vitejs/vite/pull/5253))
169
- Previous to this release, the `ssr` param was passed as a `boolean` in the last parameter of each hook. The new interface for these hooks is now:
170
- ```ts
171
- export interface Plugin extends RollupPlugin {
172
- // ... other hooks
173
- resolveId?(this: PluginContext, source: string, importer: string | undefined, options: {
174
- custom?: CustomPluginOptions;
175
- ssr?: boolean;
176
- }): Promise<ResolveIdResult> | ResolveIdResult;
177
- load?(this: PluginContext, id: string, options?: {
178
- ssr?: boolean;
179
- }): Promise<LoadResult> | LoadResult;
180
- transform?(this: TransformPluginContext, code: string, id: string, options?: {
181
- ssr?: boolean;
182
- }): Promise<TransformResult> | TransformResult;
183
- }
184
- ```
185
- In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7.
186
- - `server.pluginContainer` options object for `resolveId`, `load`, and `transform` ([#5294](https://github.com/vitejs/vite/pull/5294))
187
- - Normalize scripts and commands naming ([#5207](https://github.com/vitejs/vite/pull/5207))
188
- Adds a new `vite dev` command alias for `vite serve`, preparing for the new release of create-vite where package scripts are renamed to `dev`, `build`, and `preview`.
189
- - Align experimental `preview` api ([#5407](https://github.com/vitejs/vite/pull/5407))
190
- This API was first introduced in 2.6 and it is still in flux.
191
-
192
204
  ### Bug Fixes
193
205
 
194
206
  * add `import` support to `ssrModuleLoader` ([#5197](https://github.com/vitejs/vite/issues/5197)) ([baba1f9](https://github.com/vitejs/vite/commit/baba1f9e8fb22254b3858bcc1ffe89b334736068))
@@ -20396,7 +20396,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
20396
20396
  replacer: urlReplacer
20397
20397
  }));
20398
20398
  if (isModule) {
20399
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-4619561c.js'); }).then(function (n) { return n.index; })).default({
20399
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-76c973d0.js'); }).then(function (n) { return n.index; })).default({
20400
20400
  ...modulesOptions,
20401
20401
  getJSON(cssFileName, _modules, outputFileName) {
20402
20402
  modules = _modules;
@@ -21374,7 +21374,7 @@ const assetAttrsConfig = {
21374
21374
  const isAsyncScriptMap = new WeakMap();
21375
21375
  async function traverseHtml(html, filePath, visitor) {
21376
21376
  // lazy load compiler
21377
- const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-1ce37657.js'); }).then(function (n) { return n.compilerDom_cjs; });
21377
+ const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-8ff556de.js'); }).then(function (n) { return n.compilerDom_cjs; });
21378
21378
  // @vue/compiler-core doesn't like lowercase doctypes
21379
21379
  html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
21380
21380
  try {
@@ -49533,7 +49533,7 @@ function readFileIfExists(value) {
49533
49533
  * https://github.com/webpack/webpack-dev-server/blob/master/LICENSE
49534
49534
  */
49535
49535
  async function createCertificate() {
49536
- const { generate } = await Promise.resolve().then(function () { return require('./dep-4dd87a09.js'); }).then(function (n) { return n.index; });
49536
+ const { generate } = await Promise.resolve().then(function () { return require('./dep-51488e9f.js'); }).then(function (n) { return n.index; });
49537
49537
  const pems = generate(null, {
49538
49538
  algorithm: 'sha256',
49539
49539
  days: 30,
@@ -56748,7 +56748,7 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport }) {
56748
56748
  });
56749
56749
  }
56750
56750
  else if (node.id.type === 'ArrayPattern') {
56751
- node.id.elements.forEach((element) => {
56751
+ node.id.elements.filter(Boolean).forEach((element) => {
56752
56752
  setScope(parentFunction, element.name);
56753
56753
  });
56754
56754
  }
@@ -82457,4 +82457,4 @@ exports.send = send$1;
82457
82457
  exports.sortUserPlugins = sortUserPlugins;
82458
82458
  exports.source = source;
82459
82459
  exports.transformWithEsbuild = transformWithEsbuild;
82460
- //# sourceMappingURL=dep-7e125991.js.map
82460
+ //# sourceMappingURL=dep-3daf770c.js.map