From 9c5846502379be7ae16e525d62009d36aef402bd Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 Aug 2022 09:19:07 +0800 Subject: [PATCH 001/311] docs: give docs-check.sh execution permission --- scripts/docs-check.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/docs-check.sh diff --git a/scripts/docs-check.sh b/scripts/docs-check.sh old mode 100644 new mode 100755 From d764aa0047d5d5f930978ed74cb14a7bbd4e4583 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 Aug 2022 09:25:48 +0800 Subject: [PATCH 002/311] docs: echo info in ignore script --- scripts/docs-check.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/docs-check.sh b/scripts/docs-check.sh index 891eb7da1b7185..470164e73a35fc 100755 --- a/scripts/docs-check.sh +++ b/scripts/docs-check.sh @@ -1 +1,6 @@ +echo "prev commit: $CACHED_COMMIT_REF" +echo "current commit: $COMMIT_REF" git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF docs package.json pnpm-lock.yaml netlify.toml scripts/docs-check.sh +status=$? +echo "diff exit code: $status" +exit $status From 77e258fe2caa17f3101932f4de7fb724268d5600 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 12:19:48 +0800 Subject: [PATCH 003/311] chore(deps): update dependency @types/mime to v3 (#9479) --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e9a3576f9b4462..968d1ecd503156 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@types/hash-sum": "^1.0.0", "@types/less": "^3.0.3", "@types/micromatch": "^4.0.2", - "@types/mime": "^2.0.3", + "@types/mime": "^3.0.0", "@types/minimist": "^1.2.2", "@types/node": "^17.0.42", "@types/prompts": "^2.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c9742082efe58..20e4e0479fdabf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: '@types/hash-sum': ^1.0.0 '@types/less': ^3.0.3 '@types/micromatch': ^4.0.2 - '@types/mime': ^2.0.3 + '@types/mime': ^3.0.0 '@types/minimist': ^1.2.2 '@types/node': ^17.0.42 '@types/prompts': ^2.4.0 @@ -82,7 +82,7 @@ importers: '@types/hash-sum': 1.0.0 '@types/less': 3.0.3 '@types/micromatch': 4.0.2 - '@types/mime': 2.0.3 + '@types/mime': 3.0.0 '@types/minimist': 1.2.2 '@types/node': 17.0.42 '@types/prompts': 2.4.0 @@ -2702,8 +2702,8 @@ packages: '@types/braces': 3.0.1 dev: true - /@types/mime/2.0.3: - resolution: {integrity: sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==} + /@types/mime/3.0.0: + resolution: {integrity: sha512-fccbsHKqFDXClBZTDLA43zl0+TbxyIwyzIzwwhvoJvhNjOErCdeX2xJbURimv2EbSVUGav001PaCJg4mZxMl4w==} dev: true /@types/minimist/1.2.2: From c5e789512a78f903c11f3029186fc90b124e48b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 1 Aug 2022 14:06:03 +0900 Subject: [PATCH 004/311] fix: ignore tsconfig target when bundling config (#9457) --- packages/vite/src/node/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 55374774da6ecc..c3baff8e4f7661 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -932,6 +932,7 @@ async function bundleConfigFile( entryPoints: [fileName], outfile: 'out.js', write: false, + target: ['node14.18', 'node16'], platform: 'node', bundle: true, format: isESM ? 'esm' : 'cjs', From 22084a64264e84bcbb97eb9ccaa2d7672f0bee71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 1 Aug 2022 14:17:26 +0900 Subject: [PATCH 005/311] fix(config): use file url for import path (fixes #9471) (#9473) --- packages/vite/src/node/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index c3baff8e4f7661..c2a60cb674b5be 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -976,7 +976,7 @@ async function bundleConfigFile( if (path.relative(idPkgDir, fileName).startsWith('..')) { return { // normalize actual import after bundled as a single vite config - path: idFsPath, + path: pathToFileURL(idFsPath).href, external: true } } From f4addcfc24b1668b906411ff8f8fc394ce5c3643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 1 Aug 2022 14:39:26 +0900 Subject: [PATCH 006/311] chore: tidy up eslint config (#9468) --- .eslintrc.cjs | 62 +++++++++++-------- package.json | 4 +- .../template-lit-ts/src/my-element.ts | 2 +- .../template-lit/src/my-element.js | 2 +- packages/vite/rollup.config.ts | 4 +- playground/css/main.js | 1 + playground/css/postcss.config.js | 2 +- playground/json/server.js | 3 +- playground/resolve/browser-field/relative.js | 1 + playground/tailwind/__test__/tailwind.spec.ts | 10 +-- playground/tailwind/src/router.ts | 2 +- playground/wasm/worker.js | 1 - playground/worker/my-worker.ts | 2 +- pnpm-lock.yaml | 8 +-- 14 files changed, 58 insertions(+), 46 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ba8d46f3c26f97..904873b07043cc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -42,18 +42,6 @@ module.exports = defineConfig({ tryExtensions: ['.ts', '.js', '.jsx', '.tsx', '.d.ts'] } ], - 'node/no-restricted-require': [ - 'error', - Object.keys(require('./packages/vite/package.json').devDependencies).map( - (d) => ({ - name: d, - message: - `devDependencies can only be imported using ESM syntax so ` + - `that they are included in the rollup bundle. If you are trying to ` + - `lazy load a dependency, use (await import('dependency')).default instead.` - }) - ) - ], 'node/no-extraneous-import': [ 'error', { @@ -107,6 +95,30 @@ module.exports = defineConfig({ ] }, overrides: [ + { + files: ['packages/**'], + excludedFiles: '**/__tests__/**', + rules: { + 'no-restricted-globals': ['error', 'require', '__dirname', '__filename'] + } + }, + { + files: 'packages/vite/**/*.*', + rules: { + 'node/no-restricted-require': [ + 'error', + Object.keys( + require('./packages/vite/package.json').devDependencies + ).map((d) => ({ + name: d, + message: + `devDependencies can only be imported using ESM syntax so ` + + `that they are included in the rollup bundle. If you are trying to ` + + `lazy load a dependency, use (await import('dependency')).default instead.` + })) + ] + } + }, { files: ['packages/vite/src/node/**'], rules: { @@ -120,9 +132,11 @@ module.exports = defineConfig({ } }, { - files: ['packages/plugin-*/**/*'], + files: ['packages/create-vite/template-*/**', '**/build.config.ts'], rules: { - 'no-restricted-globals': ['error', 'require', '__dirname', '__filename'] + 'no-undef': 'off', + 'node/no-missing-import': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off' } }, { @@ -132,7 +146,6 @@ module.exports = defineConfig({ 'node/no-extraneous-require': 'off', 'node/no-missing-import': 'off', 'node/no-missing-require': 'off', - 'no-undef': 'off', // engine field doesn't exist in playgrounds 'node/no-unsupported-features/es-builtins': [ 'error', @@ -145,17 +158,22 @@ module.exports = defineConfig({ { version: '^14.18.0 || >=16.0.0' } - ] + ], + '@typescript-eslint/explicit-module-boundary-types': 'off' } }, { - files: ['packages/create-vite/template-*/**', '**/build.config.ts'], + files: ['playground/**'], + excludedFiles: '**/__tests__/**', rules: { - 'node/no-missing-import': 'off' + 'no-undef': 'off', + 'no-empty': 'off', + 'no-constant-condition': 'off', + '@typescript-eslint/no-empty-function': 'off' } }, { - files: ['playground/**', '*.js'], + files: ['*.js'], rules: { '@typescript-eslint/explicit-module-boundary-types': 'off' } @@ -165,12 +183,6 @@ module.exports = defineConfig({ rules: { '@typescript-eslint/triple-slash-reference': 'off' } - }, - { - files: 'packages/vite/**/*.*', - rules: { - 'no-restricted-globals': ['error', 'require', '__dirname', '__filename'] - } } ], reportUnusedDisableDirectives: true diff --git a/package.json b/package.json index 968d1ecd503156..40c1e68a6e06e3 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "preinstall": "npx only-allow pnpm", "postinstall": "simple-git-hooks", "format": "prettier --write --cache .", - "lint": "eslint --cache packages/*/{src,types,__tests__}/** playground/**/__tests__/**/*.ts scripts/**/*.ts", + "lint": "eslint --cache .", "typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit", "test": "run-s test-unit test-serve test-build", "test-serve": "vitest run -c vitest.config.e2e.ts", @@ -65,7 +65,7 @@ "cross-env": "^7.0.3", "esbuild": "^0.14.47", "eslint": "^8.20.0", - "eslint-define-config": "^1.5.1", + "eslint-define-config": "^1.6.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", "execa": "^6.1.0", diff --git a/packages/create-vite/template-lit-ts/src/my-element.ts b/packages/create-vite/template-lit-ts/src/my-element.ts index da680eb1d0f19c..dde5d8cd50de89 100644 --- a/packages/create-vite/template-lit-ts/src/my-element.ts +++ b/packages/create-vite/template-lit-ts/src/my-element.ts @@ -1,4 +1,4 @@ -import { html, css, LitElement } from 'lit' +import { LitElement, css, html } from 'lit' import { customElement, property } from 'lit/decorators.js' import litLogo from './assets/lit.svg' diff --git a/packages/create-vite/template-lit/src/my-element.js b/packages/create-vite/template-lit/src/my-element.js index 411701454b89de..7c0c0426e49116 100644 --- a/packages/create-vite/template-lit/src/my-element.js +++ b/packages/create-vite/template-lit/src/my-element.js @@ -1,4 +1,4 @@ -import { html, css, LitElement } from 'lit' +import { LitElement, css, html } from 'lit' import litLogo from './assets/lit.svg' /** diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index a630c2a813198c..a271d4f3562906 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -11,7 +11,7 @@ import MagicString from 'magic-string' import colors from 'picocolors' import fg from 'fast-glob' import { sync as resolve } from 'resolve' -import type { Plugin } from 'rollup' +import type { Plugin, RollupOptions } from 'rollup' import { defineConfig } from 'rollup' import pkg from './package.json' @@ -185,7 +185,7 @@ function createCjsConfig(isProduction: boolean) { }) } -export default (commandLineArgs: any) => { +export default (commandLineArgs: any): RollupOptions[] => { const isDev = commandLineArgs.watch const isProduction = !isDev diff --git a/playground/css/main.js b/playground/css/main.js index 45e7730b868eb1..f767a3d9b9674d 100644 --- a/playground/css/main.js +++ b/playground/css/main.js @@ -47,6 +47,7 @@ text('.charset-css', charset) import './dep.css' import './glob-dep.css' +// eslint-disable-next-line import/order import { barModuleClasses } from 'css-js-dep' document .querySelector('.css-js-dep-module') diff --git a/playground/css/postcss.config.js b/playground/css/postcss.config.js index b30209bff42097..48d5dd23d5a8f1 100644 --- a/playground/css/postcss.config.js +++ b/playground/css/postcss.config.js @@ -3,8 +3,8 @@ module.exports = { } const fs = require('fs') -const glob = require('fast-glob') const path = require('path') +const glob = require('fast-glob') const { normalizePath } = require('vite') /** diff --git a/playground/json/server.js b/playground/json/server.js index b0c0dd18dc43ae..d78c7f6246d540 100644 --- a/playground/json/server.js +++ b/playground/json/server.js @@ -15,8 +15,7 @@ async function createServer( /** * @type {import('vite').ViteDevServer} */ - let vite - vite = await require('vite').createServer({ + const vite = await require('vite').createServer({ root, logLevel: isTest ? 'error' : 'info', server: { diff --git a/playground/resolve/browser-field/relative.js b/playground/resolve/browser-field/relative.js index bbf6a2c74a10b5..492be3e96738eb 100644 --- a/playground/resolve/browser-field/relative.js +++ b/playground/resolve/browser-field/relative.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-duplicates */ import ra from './no-ext' import rb from './no-ext.js' // no substitution import rc from './ext' diff --git a/playground/tailwind/__test__/tailwind.spec.ts b/playground/tailwind/__test__/tailwind.spec.ts index 4483aabf6f6597..d72680cc522f64 100644 --- a/playground/tailwind/__test__/tailwind.spec.ts +++ b/playground/tailwind/__test__/tailwind.spec.ts @@ -1,11 +1,11 @@ import { - isBuild, + browserLogs, editFile, - untilUpdated, - getColor, getBgColor, - browserLogs, - page + getColor, + isBuild, + page, + untilUpdated } from '~utils' test('should render', async () => { diff --git a/playground/tailwind/src/router.ts b/playground/tailwind/src/router.ts index cfcf2a29b637e2..2a8c3cd0dd966f 100644 --- a/playground/tailwind/src/router.ts +++ b/playground/tailwind/src/router.ts @@ -1,4 +1,4 @@ -import { createWebHistory, createRouter } from 'vue-router' +import { createRouter, createWebHistory } from 'vue-router' import Page from './views/Page.vue' const history = createWebHistory() diff --git a/playground/wasm/worker.js b/playground/wasm/worker.js index dbbc0640226406..7e7ee8c331f917 100644 --- a/playground/wasm/worker.js +++ b/playground/wasm/worker.js @@ -1,5 +1,4 @@ import init from './add.wasm?init' init().then(({ exports }) => { - // eslint-disable-next-line no-undef self.postMessage({ result: exports.add(1, 2) }) }) diff --git a/playground/worker/my-worker.ts b/playground/worker/my-worker.ts index 8c91d49d70ba5c..9a5203711d3375 100644 --- a/playground/worker/my-worker.ts +++ b/playground/worker/my-worker.ts @@ -1,6 +1,6 @@ +import { msg as msgFromDep } from 'dep-to-optimize' import { mode, msg } from './modules/workerImport' import { bundleWithPlugin } from './modules/test-plugin' -import { msg as msgFromDep } from 'dep-to-optimize' self.onmessage = (e) => { if (e.data === 'ping') { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20e4e0479fdabf..401c275a44de8e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,7 +39,7 @@ importers: cross-env: ^7.0.3 esbuild: ^0.14.47 eslint: ^8.20.0 - eslint-define-config: ^1.5.1 + eslint-define-config: ^1.6.0 eslint-plugin-import: ^2.26.0 eslint-plugin-node: ^11.1.0 execa: ^6.1.0 @@ -97,7 +97,7 @@ importers: cross-env: 7.0.3 esbuild: 0.14.47 eslint: 8.20.0 - eslint-define-config: 1.5.1 + eslint-define-config: 1.6.0 eslint-plugin-import: 2.26.0_xconv27bia2733zao6ipggqv2i eslint-plugin-node: 11.1.0_eslint@8.20.0 execa: 6.1.0 @@ -4766,8 +4766,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-define-config/1.5.1: - resolution: {integrity: sha512-6gxrmN7aKGffaO8dCtMMKyo3IxbWymMQ248p4lf8GbaFRcLsqOXHFdUhhM0Hcy1NudvnpwHcfbDf7Nh9pIm1TA==} + /eslint-define-config/1.6.0: + resolution: {integrity: sha512-3qulYnwDRGYQHXHGdXBSRcfpI7m37ilBoERzTUYI8fBUoK/46yfUVNkGwM9cF/aoBrGgIDcBSz/HyPQJTHI/+w==} engines: {node: '>= 14.6.0', npm: '>= 6.0.0', pnpm: '>= 7.0.0'} dev: true From cecc366614042e54744a1e3ef7aada0ca5f7c491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 1 Aug 2022 19:10:21 +0900 Subject: [PATCH 007/311] chore: remove unused deps (#9480) --- package.json | 5 ----- playground/package.json | 5 ++++- pnpm-lock.yaml | 30 +++++++++--------------------- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 40c1e68a6e06e3..4826123b8f2230 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,8 @@ "@types/estree": "^1.0.0", "@types/etag": "^1.8.1", "@types/fs-extra": "^9.0.13", - "@types/hash-sum": "^1.0.0", "@types/less": "^3.0.3", "@types/micromatch": "^4.0.2", - "@types/mime": "^3.0.0", "@types/minimist": "^1.2.2", "@types/node": "^17.0.42", "@types/prompts": "^2.4.0", @@ -70,10 +68,8 @@ "eslint-plugin-node": "^11.1.0", "execa": "^6.1.0", "fs-extra": "^10.1.0", - "kill-port": "^1.6.1", "lint-staged": "^13.0.3", "minimist": "^1.2.6", - "node-fetch": "^3.2.9", "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", "playwright-chromium": "^1.24.0", @@ -84,7 +80,6 @@ "rollup": "^2.75.6", "semver": "^7.3.7", "simple-git-hooks": "^2.8.0", - "sirv": "^2.0.2", "tslib": "^2.4.0", "tsx": "^3.8.0", "typescript": "^4.6.4", diff --git a/playground/package.json b/playground/package.json index 75b1d15d299319..fc420746346cd1 100644 --- a/playground/package.json +++ b/playground/package.json @@ -4,6 +4,9 @@ "version": "1.0.0", "devDependencies": { "convert-source-map": "^1.8.0", - "css-color-names": "^1.0.1" + "css-color-names": "^1.0.1", + "kill-port": "^1.6.1", + "node-fetch": "^3.2.10", + "sirv": "^2.0.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 401c275a44de8e..eb4b329bc518c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,10 +21,8 @@ importers: '@types/estree': ^1.0.0 '@types/etag': ^1.8.1 '@types/fs-extra': ^9.0.13 - '@types/hash-sum': ^1.0.0 '@types/less': ^3.0.3 '@types/micromatch': ^4.0.2 - '@types/mime': ^3.0.0 '@types/minimist': ^1.2.2 '@types/node': ^17.0.42 '@types/prompts': ^2.4.0 @@ -44,10 +42,8 @@ importers: eslint-plugin-node: ^11.1.0 execa: ^6.1.0 fs-extra: ^10.1.0 - kill-port: ^1.6.1 lint-staged: ^13.0.3 minimist: ^1.2.6 - node-fetch: ^3.2.9 npm-run-all: ^4.1.5 picocolors: ^1.0.0 playwright-chromium: ^1.24.0 @@ -58,7 +54,6 @@ importers: rollup: ^2.75.6 semver: ^7.3.7 simple-git-hooks: ^2.8.0 - sirv: ^2.0.2 tslib: ^2.4.0 tsx: ^3.8.0 typescript: ^4.6.4 @@ -79,10 +74,8 @@ importers: '@types/estree': 1.0.0 '@types/etag': 1.8.1 '@types/fs-extra': 9.0.13 - '@types/hash-sum': 1.0.0 '@types/less': 3.0.3 '@types/micromatch': 4.0.2 - '@types/mime': 3.0.0 '@types/minimist': 1.2.2 '@types/node': 17.0.42 '@types/prompts': 2.4.0 @@ -102,10 +95,8 @@ importers: eslint-plugin-node: 11.1.0_eslint@8.20.0 execa: 6.1.0 fs-extra: 10.1.0 - kill-port: 1.6.1 lint-staged: 13.0.3 minimist: 1.2.6 - node-fetch: 3.2.9 npm-run-all: 4.1.5 picocolors: 1.0.0 playwright-chromium: 1.24.0 @@ -116,7 +107,6 @@ importers: rollup: 2.75.6 semver: 7.3.7 simple-git-hooks: 2.8.0 - sirv: 2.0.2 tslib: 2.4.0 tsx: 3.8.0 typescript: 4.6.4 @@ -337,9 +327,15 @@ importers: specifiers: convert-source-map: ^1.8.0 css-color-names: ^1.0.1 + kill-port: ^1.6.1 + node-fetch: ^3.2.10 + sirv: ^2.0.2 devDependencies: convert-source-map: 1.8.0 css-color-names: 1.0.1 + kill-port: 1.6.1 + node-fetch: 3.2.10 + sirv: 2.0.2 playground/alias: specifiers: @@ -2680,10 +2676,6 @@ packages: '@types/node': 17.0.42 dev: true - /@types/hash-sum/1.0.0: - resolution: {integrity: sha512-FdLBT93h3kcZ586Aee66HPCVJ6qvxVjBlDWNmxSGSbCZe9hTsjRKdSsl4y1T+3zfujxo9auykQMnFsfyHWD7wg==} - dev: true - /@types/json-schema/7.0.11: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true @@ -2702,10 +2694,6 @@ packages: '@types/braces': 3.0.1 dev: true - /@types/mime/3.0.0: - resolution: {integrity: sha512-fccbsHKqFDXClBZTDLA43zl0+TbxyIwyzIzwwhvoJvhNjOErCdeX2xJbURimv2EbSVUGav001PaCJg4mZxMl4w==} - dev: true - /@types/minimist/1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true @@ -5355,7 +5343,7 @@ packages: dev: true /get-them-args/1.3.2: - resolution: {integrity: sha1-dKILqKSr7OWuGZrQPyvMaP38m6U=} + resolution: {integrity: sha512-LRn8Jlk+DwZE4GTlDbT3Hikd1wSHgLMme/+7ddlqKd7ldwR6LjJgTVWzBnR01wnYGe4KgrXjg287RaI22UHmAw==} dev: true /get-tsconfig/4.1.0: @@ -6554,8 +6542,8 @@ packages: whatwg-url: 5.0.0 dev: false - /node-fetch/3.2.9: - resolution: {integrity: sha512-/2lI+DBecVvVm9tDhjziTVjo2wmTsSxSk58saUYP0P/fRJ3xxtfMDY24+CKTkfm0Dlhyn3CSXNL0SoRiCZ8Rzg==} + /node-fetch/3.2.10: + resolution: {integrity: sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: data-uri-to-buffer: 4.0.0 From c530d168309557c7a254128364f07f7b4f017e14 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 21:48:58 +0800 Subject: [PATCH 008/311] chore(deps): update all non-major dependencies (#9478) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 18 +- .../create-vite/template-lit-ts/package.json | 2 +- .../create-vite/template-lit/package.json | 2 +- .../template-preact-ts/package.json | 2 +- .../create-vite/template-preact/package.json | 2 +- .../template-react-ts/package.json | 2 +- .../create-vite/template-react/package.json | 2 +- .../template-svelte-ts/package.json | 2 +- .../create-vite/template-svelte/package.json | 2 +- .../template-vanilla-ts/package.json | 2 +- .../create-vite/template-vanilla/package.json | 2 +- .../create-vite/template-vue-ts/package.json | 4 +- .../create-vite/template-vue/package.json | 2 +- packages/plugin-legacy/package.json | 2 +- packages/vite/package.json | 2 +- playground/backend-integration/package.json | 2 +- playground/preload/package.json | 2 +- playground/react-emotion/package.json | 4 +- playground/ssr-vue/package.json | 2 +- playground/tailwind-sourcemap/package.json | 2 +- playground/tailwind/package.json | 6 +- pnpm-lock.yaml | 513 ++++++++++-------- 22 files changed, 325 insertions(+), 254 deletions(-) diff --git a/package.json b/package.json index 4826123b8f2230..d5e656455da117 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ }, "devDependencies": { "@babel/types": "^7.18.9", - "@microsoft/api-extractor": "^7.28.6", - "@rollup/plugin-typescript": "^8.3.3", + "@microsoft/api-extractor": "^7.28.7", + "@rollup/plugin-typescript": "^8.3.4", "@types/babel__core": "^7.1.19", "@types/babel__standalone": "^7.1.4", "@types/convert-source-map": "^1.5.2", @@ -57,12 +57,12 @@ "@types/semver": "^7.3.10", "@types/stylus": "^0.48.38", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.30.7", - "@typescript-eslint/parser": "^5.30.7", + "@typescript-eslint/eslint-plugin": "^5.31.0", + "@typescript-eslint/parser": "^5.31.0", "conventional-changelog-cli": "^2.2.2", "cross-env": "^7.0.3", "esbuild": "^0.14.47", - "eslint": "^8.20.0", + "eslint": "^8.21.0", "eslint-define-config": "^1.6.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -72,8 +72,8 @@ "minimist": "^1.2.6", "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", - "playwright-chromium": "^1.24.0", - "pnpm": "^7.6.0", + "playwright-chromium": "^1.24.2", + "pnpm": "^7.8.0", "prettier": "2.7.1", "prompts": "^2.4.2", "rimraf": "^3.0.2", @@ -86,7 +86,7 @@ "unbuild": "^0.7.6", "vite": "workspace:*", "vitepress": "^1.0.0-alpha.4", - "vitest": "^0.19.0", + "vitest": "^0.20.2", "vue": "^3.2.37" }, "simple-git-hooks": { @@ -107,7 +107,7 @@ "eslint --cache --fix" ] }, - "packageManager": "pnpm@7.6.0", + "packageManager": "pnpm@7.8.0", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-lit-ts/package.json b/packages/create-vite/template-lit-ts/package.json index ad26e218ecde13..729be0dd364b97 100644 --- a/packages/create-vite/template-lit-ts/package.json +++ b/packages/create-vite/template-lit-ts/package.json @@ -21,6 +21,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-lit/package.json b/packages/create-vite/template-lit/package.json index 125f1a4c00f527..12780ad0d630e1 100644 --- a/packages/create-vite/template-lit/package.json +++ b/packages/create-vite/template-lit/package.json @@ -18,6 +18,6 @@ "lit": "^2.2.8" }, "devDependencies": { - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index 08cc2ee8862a30..736219910d9c1e 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -14,6 +14,6 @@ "devDependencies": { "@preact/preset-vite": "^2.3.0", "typescript": "^4.6.4", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index 305161e05cd1de..43d5b2d1b8c6bc 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -13,6 +13,6 @@ }, "devDependencies": { "@preact/preset-vite": "^2.3.0", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 5f5431e58c7150..8d421e08a5619a 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -17,6 +17,6 @@ "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.0.0", "typescript": "^4.6.4", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index 06f85bc71db5e5..bcdf162cbc9b9b 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -16,6 +16,6 @@ "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.0.0", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index cdb7ed7c39f0ae..14243db0d2324a 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -17,6 +17,6 @@ "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index 3e401fc3cd673d..df1cab80439178 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -11,6 +11,6 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.1", "svelte": "^3.49.0", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-vanilla-ts/package.json b/packages/create-vite/template-vanilla-ts/package.json index 89881abdc58079..285215effd5ba9 100644 --- a/packages/create-vite/template-vanilla-ts/package.json +++ b/packages/create-vite/template-vanilla-ts/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-vanilla/package.json b/packages/create-vite/template-vanilla/package.json index e3053d7fe79533..6007b392afb44a 100644 --- a/packages/create-vite/template-vanilla/package.json +++ b/packages/create-vite/template-vanilla/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "devDependencies": { - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index 35526e650e6bc3..ec71916a963033 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@vitejs/plugin-vue": "^3.0.1", "typescript": "^4.6.4", - "vite": "^3.0.2", - "vue-tsc": "^0.39.0" + "vite": "^3.0.4", + "vue-tsc": "^0.39.4" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index 5bf8423ad99da6..5fef1df56df96e 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -13,6 +13,6 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^3.0.1", - "vite": "^3.0.2" + "vite": "^3.0.4" } } diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 6d416fe5e96474..145a79e5574e86 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -36,7 +36,7 @@ "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", "dependencies": { "@babel/standalone": "^7.18.9", - "core-js": "^3.24.0", + "core-js": "^3.24.1", "magic-string": "^0.26.2", "regenerator-runtime": "^0.13.9", "systemjs": "^6.12.1" diff --git a/packages/vite/package.json b/packages/vite/package.json index 4306f77257915c..199b53d81ce30a 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -76,7 +76,7 @@ "@rollup/plugin-dynamic-import-vars": "^1.4.3", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "13.3.0", - "@rollup/plugin-typescript": "^8.3.3", + "@rollup/plugin-typescript": "^8.3.4", "@rollup/pluginutils": "^4.2.1", "@vue/compiler-dom": "^3.2.37", "acorn": "^8.8.0", diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json index ff6b79bd924158..cc4a5f4aad5df7 100644 --- a/playground/backend-integration/package.json +++ b/playground/backend-integration/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "sass": "^1.54.0", - "tailwindcss": "^3.1.6", + "tailwindcss": "^3.1.7", "fast-glob": "^3.2.11" } } diff --git a/playground/preload/package.json b/playground/preload/package.json index a42f414575cd22..39c4f9893978ef 100644 --- a/playground/preload/package.json +++ b/playground/preload/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "vue": "^3.2.37", - "vue-router": "^4.1.2" + "vue-router": "^4.1.3" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/react-emotion/package.json b/playground/react-emotion/package.json index c9b77a7374df8d..b0a91b34f83cf4 100644 --- a/playground/react-emotion/package.json +++ b/playground/react-emotion/package.json @@ -9,14 +9,14 @@ "preview": "vite preview" }, "dependencies": { - "@emotion/react": "^11.9.3", + "@emotion/react": "^11.10.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-switch": "^7.0.0" }, "devDependencies": { "@babel/plugin-proposal-pipeline-operator": "^7.18.9", - "@emotion/babel-plugin": "^11.9.2", + "@emotion/babel-plugin": "^11.10.0", "@vitejs/plugin-react": "workspace:*" }, "babel": { diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index 6565324fc37fe5..260e02f0fc5ff1 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -17,7 +17,7 @@ "dependencies": { "example-external-component": "file:example-external-component", "vue": "^3.2.37", - "vue-router": "^4.1.2", + "vue-router": "^4.1.3", "vuex": "^4.0.2" }, "devDependencies": { diff --git a/playground/tailwind-sourcemap/package.json b/playground/tailwind-sourcemap/package.json index 747bd8acecd76d..648b657482e5d5 100644 --- a/playground/tailwind-sourcemap/package.json +++ b/playground/tailwind-sourcemap/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "tailwindcss": "^3.1.6" + "tailwindcss": "^3.1.7" } } diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json index 42b6c098e5e106..b3d50a6df45515 100644 --- a/playground/tailwind/package.json +++ b/playground/tailwind/package.json @@ -9,10 +9,10 @@ "preview": "vite preview" }, "dependencies": { - "autoprefixer": "^10.4.7", - "tailwindcss": "^3.1.6", + "autoprefixer": "^10.4.8", + "tailwindcss": "^3.1.7", "vue": "^3.2.37", - "vue-router": "^4.1.2" + "vue-router": "^4.1.3" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb4b329bc518c2..3b00d19680be01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,8 +11,8 @@ importers: .: specifiers: '@babel/types': ^7.18.9 - '@microsoft/api-extractor': ^7.28.6 - '@rollup/plugin-typescript': ^8.3.3 + '@microsoft/api-extractor': ^7.28.7 + '@rollup/plugin-typescript': ^8.3.4 '@types/babel__core': ^7.1.19 '@types/babel__standalone': ^7.1.4 '@types/convert-source-map': ^1.5.2 @@ -31,12 +31,12 @@ importers: '@types/semver': ^7.3.10 '@types/stylus': ^0.48.38 '@types/ws': ^8.5.3 - '@typescript-eslint/eslint-plugin': ^5.30.7 - '@typescript-eslint/parser': ^5.30.7 + '@typescript-eslint/eslint-plugin': ^5.31.0 + '@typescript-eslint/parser': ^5.31.0 conventional-changelog-cli: ^2.2.2 cross-env: ^7.0.3 esbuild: ^0.14.47 - eslint: ^8.20.0 + eslint: ^8.21.0 eslint-define-config: ^1.6.0 eslint-plugin-import: ^2.26.0 eslint-plugin-node: ^11.1.0 @@ -46,8 +46,8 @@ importers: minimist: ^1.2.6 npm-run-all: ^4.1.5 picocolors: ^1.0.0 - playwright-chromium: ^1.24.0 - pnpm: ^7.6.0 + playwright-chromium: ^1.24.2 + pnpm: ^7.8.0 prettier: 2.7.1 prompts: ^2.4.2 rimraf: ^3.0.2 @@ -60,12 +60,12 @@ importers: unbuild: ^0.7.6 vite: workspace:* vitepress: ^1.0.0-alpha.4 - vitest: ^0.19.0 + vitest: ^0.20.2 vue: ^3.2.37 devDependencies: '@babel/types': 7.18.9 - '@microsoft/api-extractor': 7.28.6 - '@rollup/plugin-typescript': 8.3.3_uct5nfewsakxkk4livyn3qaf3e + '@microsoft/api-extractor': 7.28.7 + '@rollup/plugin-typescript': 8.3.4_uct5nfewsakxkk4livyn3qaf3e '@types/babel__core': 7.1.19 '@types/babel__standalone': 7.1.4 '@types/convert-source-map': 1.5.2 @@ -84,23 +84,23 @@ importers: '@types/semver': 7.3.10 '@types/stylus': 0.48.38 '@types/ws': 8.5.3 - '@typescript-eslint/eslint-plugin': 5.30.7_cedektzxz37523qbpytbckztui - '@typescript-eslint/parser': 5.30.7_sxmbcirybhoxa24uzkr344oiiy + '@typescript-eslint/eslint-plugin': 5.31.0_47ooyv4whyi5jcher5bzfc7xvi + '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 esbuild: 0.14.47 - eslint: 8.20.0 + eslint: 8.21.0 eslint-define-config: 1.6.0 - eslint-plugin-import: 2.26.0_xconv27bia2733zao6ipggqv2i - eslint-plugin-node: 11.1.0_eslint@8.20.0 + eslint-plugin-import: 2.26.0_eygs4xj346vriqwkjbwjuyviaa + eslint-plugin-node: 11.1.0_eslint@8.21.0 execa: 6.1.0 fs-extra: 10.1.0 lint-staged: 13.0.3 minimist: 1.2.6 npm-run-all: 4.1.5 picocolors: 1.0.0 - playwright-chromium: 1.24.0 - pnpm: 7.6.0 + playwright-chromium: 1.24.2 + pnpm: 7.8.0 prettier: 2.7.1 prompts: 2.4.2 rimraf: 3.0.2 @@ -113,7 +113,7 @@ importers: unbuild: 0.7.6 vite: link:packages/vite vitepress: 1.0.0-alpha.4 - vitest: 0.19.0 + vitest: 0.20.2 vue: 3.2.37 packages/create-vite: @@ -130,14 +130,14 @@ importers: specifiers: '@babel/core': ^7.18.9 '@babel/standalone': ^7.18.9 - core-js: ^3.24.0 + core-js: ^3.24.1 magic-string: ^0.26.2 regenerator-runtime: ^0.13.9 systemjs: ^6.12.1 vite: workspace:* dependencies: '@babel/standalone': 7.18.9 - core-js: 3.24.0 + core-js: 3.24.1 magic-string: 0.26.2 regenerator-runtime: 0.13.9 systemjs: 6.12.1 @@ -212,7 +212,7 @@ importers: '@rollup/plugin-dynamic-import-vars': ^1.4.3 '@rollup/plugin-json': ^4.1.0 '@rollup/plugin-node-resolve': 13.3.0 - '@rollup/plugin-typescript': ^8.3.3 + '@rollup/plugin-typescript': ^8.3.4 '@rollup/pluginutils': ^4.2.1 '@vue/compiler-dom': ^3.2.37 acorn: ^8.8.0 @@ -278,7 +278,7 @@ importers: '@rollup/plugin-dynamic-import-vars': 1.4.3_rollup@2.75.6 '@rollup/plugin-json': 4.1.0_rollup@2.75.6 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.75.6 - '@rollup/plugin-typescript': 8.3.3_rollup@2.75.6+tslib@2.4.0 + '@rollup/plugin-typescript': 8.3.4_rollup@2.75.6+tslib@2.4.0 '@rollup/pluginutils': 4.2.1 '@vue/compiler-dom': 3.2.37 acorn: 8.8.0 @@ -360,11 +360,11 @@ importers: specifiers: fast-glob: ^3.2.11 sass: ^1.54.0 - tailwindcss: ^3.1.6 + tailwindcss: ^3.1.7 devDependencies: fast-glob: 3.2.11 sass: 1.54.0 - tailwindcss: 3.1.6 + tailwindcss: 3.1.7 playground/build-old: specifiers: {} @@ -751,10 +751,10 @@ importers: dep-including-a: file:./dep-including-a terser: ^5.14.2 vue: ^3.2.37 - vue-router: ^4.1.2 + vue-router: ^4.1.3 dependencies: vue: 3.2.37 - vue-router: 4.1.2_vue@3.2.37 + vue-router: 4.1.3_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue dep-a: file:playground/preload/dep-a @@ -806,20 +806,20 @@ importers: playground/react-emotion: specifiers: '@babel/plugin-proposal-pipeline-operator': ^7.18.9 - '@emotion/babel-plugin': ^11.9.2 - '@emotion/react': ^11.9.3 + '@emotion/babel-plugin': ^11.10.0 + '@emotion/react': ^11.10.0 '@vitejs/plugin-react': workspace:* react: ^18.2.0 react-dom: ^18.2.0 react-switch: ^7.0.0 dependencies: - '@emotion/react': 11.9.3_react@18.2.0 + '@emotion/react': 11.10.0_react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 react-switch: 7.0.0_biqbaboplfbrettd7655fr4n2y devDependencies: '@babel/plugin-proposal-pipeline-operator': 7.18.9 - '@emotion/babel-plugin': 11.9.2 + '@emotion/babel-plugin': 11.10.0 '@vitejs/plugin-react': link:../../packages/plugin-react playground/react-sourcemap: @@ -1066,12 +1066,12 @@ importers: express: ^4.18.1 serve-static: ^1.15.0 vue: ^3.2.37 - vue-router: ^4.1.2 + vue-router: ^4.1.3 vuex: ^4.0.2 dependencies: example-external-component: file:playground/ssr-vue/example-external-component vue: 3.2.37 - vue-router: 4.1.2_vue@3.2.37 + vue-router: 4.1.3_vue@3.2.37 vuex: 4.0.2_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1102,25 +1102,25 @@ importers: playground/tailwind: specifiers: '@vitejs/plugin-vue': workspace:* - autoprefixer: ^10.4.7 - tailwindcss: ^3.1.6 + autoprefixer: ^10.4.8 + tailwindcss: ^3.1.7 ts-node: ^10.9.1 vue: ^3.2.37 - vue-router: ^4.1.2 + vue-router: ^4.1.3 dependencies: - autoprefixer: 10.4.7 - tailwindcss: 3.1.6_ts-node@10.9.1 + autoprefixer: 10.4.8 + tailwindcss: 3.1.7_ts-node@10.9.1 vue: 3.2.37 - vue-router: 4.1.2_vue@3.2.37 + vue-router: 4.1.3_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue ts-node: 10.9.1 playground/tailwind-sourcemap: specifiers: - tailwindcss: ^3.1.6 + tailwindcss: ^3.1.7 dependencies: - tailwindcss: 3.1.6 + tailwindcss: 3.1.7 playground/tsconfig-json: specifiers: {} @@ -1541,7 +1541,7 @@ packages: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.7 + '@babel/types': 7.18.9 /@babel/helper-module-transforms/7.18.0: resolution: {integrity: sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==} @@ -1589,11 +1589,11 @@ packages: /@babel/helper-plugin-utils/7.18.6: resolution: {integrity: sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==} engines: {node: '>=6.9.0'} + dev: false /@babel/helper-plugin-utils/7.18.9: resolution: {integrity: sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==} engines: {node: '>=6.9.0'} - dev: true /@babel/helper-replace-supers/7.18.6: resolution: {integrity: sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==} @@ -1729,23 +1729,23 @@ packages: '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-syntax-jsx/7.16.7: + /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.18.9: resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: + '@babel/core': 7.18.9 '@babel/helper-plugin-utils': 7.18.6 + dev: false - /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.18.9: - resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} + /@babel/plugin-syntax-jsx/7.18.6: + resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 - '@babel/helper-plugin-utils': 7.18.6 - dev: false + '@babel/helper-plugin-utils': 7.18.9 /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.9: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} @@ -1754,7 +1754,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.9 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.18.9 dev: false /@babel/plugin-syntax-pipeline-operator/7.18.6: @@ -1834,12 +1834,6 @@ packages: - supports-color dev: false - /@babel/runtime/7.17.9: - resolution: {integrity: sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.9 - /@babel/runtime/7.18.3: resolution: {integrity: sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==} engines: {node: '>=6.9.0'} @@ -1852,7 +1846,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 - dev: false /@babel/standalone/7.18.9: resolution: {integrity: sha512-6E+p5azHMHcMkHzGFnA7Pqhtgfwx1cClwjMqomMHhdFupCLZDDpVQUctRGYE7p7nn7cXJZSI/L9en+tt30AP3w==} @@ -1965,6 +1958,7 @@ packages: dependencies: '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 + dev: false /@babel/types/7.18.8: resolution: {integrity: sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==} @@ -2017,42 +2011,42 @@ packages: algoliasearch: 4.13.1 dev: true - /@emotion/babel-plugin/11.9.2: - resolution: {integrity: sha512-Pr/7HGH6H6yKgnVFNEj2MVlreu3ADqftqjqwUvDy/OJzKFgxKeTQ+eeUf20FOTuHVkDON2iNa25rAXVYtWJCjw==} + /@emotion/babel-plugin/11.10.0: + resolution: {integrity: sha512-xVnpDAAbtxL1dsuSelU5A7BnY/lftws0wUexNJZTPsvX/1tM4GZJbclgODhvW4E+NH7E5VFcH0bBn30NvniPJA==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/helper-module-imports': 7.16.7 - '@babel/plugin-syntax-jsx': 7.16.7 - '@babel/runtime': 7.17.9 - '@emotion/hash': 0.8.0 - '@emotion/memoize': 0.7.5 - '@emotion/serialize': 1.0.3 - babel-plugin-macros: 2.8.0 + '@babel/helper-module-imports': 7.18.6 + '@babel/plugin-syntax-jsx': 7.18.6 + '@babel/runtime': 7.18.9 + '@emotion/hash': 0.9.0 + '@emotion/memoize': 0.8.0 + '@emotion/serialize': 1.1.0 + babel-plugin-macros: 3.1.0 convert-source-map: 1.8.0 escape-string-regexp: 4.0.0 find-root: 1.1.0 source-map: 0.5.7 stylis: 4.0.13 - /@emotion/cache/11.9.3: - resolution: {integrity: sha512-0dgkI/JKlCXa+lEXviaMtGBL0ynpx4osh7rjOXE71q9bIF8G+XhJgvi+wDu0B0IdCVx37BffiwXlN9I3UuzFvg==} + /@emotion/cache/11.10.0: + resolution: {integrity: sha512-3FoUWnDbHWg/pXGCvL46jvpOSJP0xvRZLY8khUcUHGOBcp0S/MCIk+osp84/dby2Ctahw/Ev4KTHWkY3i0g39g==} dependencies: - '@emotion/memoize': 0.7.5 - '@emotion/sheet': 1.1.1 - '@emotion/utils': 1.1.0 - '@emotion/weak-memoize': 0.2.5 + '@emotion/memoize': 0.8.0 + '@emotion/sheet': 1.2.0 + '@emotion/utils': 1.2.0 + '@emotion/weak-memoize': 0.3.0 stylis: 4.0.13 dev: false - /@emotion/hash/0.8.0: - resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} + /@emotion/hash/0.9.0: + resolution: {integrity: sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ==} - /@emotion/memoize/0.7.5: - resolution: {integrity: sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==} + /@emotion/memoize/0.8.0: + resolution: {integrity: sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==} - /@emotion/react/11.9.3_react@18.2.0: - resolution: {integrity: sha512-g9Q1GcTOlzOEjqwuLF/Zd9LC+4FljjPjDfxSM7KmEakm+hsHXk+bYZ2q+/hTJzr0OUNkujo72pXLQvXj6H+GJQ==} + /@emotion/react/11.10.0_react@18.2.0: + resolution: {integrity: sha512-K6z9zlHxxBXwN8TcpwBKcEsBsOw4JWCCmR+BeeOWgqp8GIU1yA2Odd41bwdAAr0ssbQrbJbVnndvv7oiv1bZeQ==} peerDependencies: '@babel/core': ^7.0.0 '@types/react': '*' @@ -2063,47 +2057,37 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.18.3 - '@emotion/babel-plugin': 11.9.2 - '@emotion/cache': 11.9.3 - '@emotion/serialize': 1.0.4 - '@emotion/utils': 1.1.0 - '@emotion/weak-memoize': 0.2.5 + '@babel/runtime': 7.18.9 + '@emotion/babel-plugin': 11.10.0 + '@emotion/cache': 11.10.0 + '@emotion/serialize': 1.1.0 + '@emotion/utils': 1.2.0 + '@emotion/weak-memoize': 0.3.0 hoist-non-react-statics: 3.3.2 react: 18.2.0 dev: false - /@emotion/serialize/1.0.3: - resolution: {integrity: sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA==} - dependencies: - '@emotion/hash': 0.8.0 - '@emotion/memoize': 0.7.5 - '@emotion/unitless': 0.7.5 - '@emotion/utils': 1.1.0 - csstype: 3.0.11 - - /@emotion/serialize/1.0.4: - resolution: {integrity: sha512-1JHamSpH8PIfFwAMryO2bNka+y8+KA5yga5Ocf2d7ZEiJjb7xlLW7aknBGZqJLajuLOvJ+72vN+IBSwPlXD1Pg==} + /@emotion/serialize/1.1.0: + resolution: {integrity: sha512-F1ZZZW51T/fx+wKbVlwsfchr5q97iW8brAnXmsskz4d0hVB4O3M/SiA3SaeH06x02lSNzkkQv+n3AX3kCXKSFA==} dependencies: - '@emotion/hash': 0.8.0 - '@emotion/memoize': 0.7.5 - '@emotion/unitless': 0.7.5 - '@emotion/utils': 1.1.0 + '@emotion/hash': 0.9.0 + '@emotion/memoize': 0.8.0 + '@emotion/unitless': 0.8.0 + '@emotion/utils': 1.2.0 csstype: 3.0.11 - dev: false - /@emotion/sheet/1.1.1: - resolution: {integrity: sha512-J3YPccVRMiTZxYAY0IOq3kd+hUP8idY8Kz6B/Cyo+JuXq52Ek+zbPbSQUrVQp95aJ+lsAW7DPL1P2Z+U1jGkKA==} + /@emotion/sheet/1.2.0: + resolution: {integrity: sha512-OiTkRgpxescko+M51tZsMq7Puu/KP55wMT8BgpcXVG2hqXc0Vo0mfymJ/Uj24Hp0i083ji/o0aLddh08UEjq8w==} dev: false - /@emotion/unitless/0.7.5: - resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==} + /@emotion/unitless/0.8.0: + resolution: {integrity: sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==} - /@emotion/utils/1.1.0: - resolution: {integrity: sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ==} + /@emotion/utils/1.2.0: + resolution: {integrity: sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==} - /@emotion/weak-memoize/0.2.5: - resolution: {integrity: sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==} + /@emotion/weak-memoize/0.3.0: + resolution: {integrity: sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==} dev: false /@esbuild-kit/cjs-loader/2.3.1: @@ -2133,7 +2117,7 @@ packages: dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.3.2 + espree: 9.3.3 globals: 13.15.0 ignore: 5.2.0 import-fresh: 3.3.0 @@ -2144,8 +2128,8 @@ packages: - supports-color dev: true - /@humanwhocodes/config-array/0.9.5: - resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==} + /@humanwhocodes/config-array/0.10.4: + resolution: {integrity: sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -2155,6 +2139,10 @@ packages: - supports-color dev: true + /@humanwhocodes/gitignore-to-minimatch/1.0.2: + resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} + dev: true + /@humanwhocodes/object-schema/1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true @@ -2247,22 +2235,22 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model/7.22.1: - resolution: {integrity: sha512-3Bx6VC8F4ti8XlhaOCynCpwGvdXGwHD2dGBpo2xpJT9gEmPQvpAL3Ni+5gaEX0eQ27zGILVTUZDqZSRYskk/Rw==} + /@microsoft/api-extractor-model/7.22.2: + resolution: {integrity: sha512-fqb7std1sRfg7tvXkJwB7zrgIyzty7iIJXxpqA2/bEdct36jhkgIhKpgYr2yoi+Jhqbinjmhyf9tPKJ2E3TdwA==} dependencies: '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.49.0 + '@rushstack/node-core-library': 3.50.0 dev: true - /@microsoft/api-extractor/7.28.6: - resolution: {integrity: sha512-RNUokJTlBGD0ax/Jo8xLPWv4s6IboqrYrcabEEh6rFadO/tVPoV/R5YHtEeZ2q4ubvwhHTtX3sRm+p4fJo/3Sg==} + /@microsoft/api-extractor/7.28.7: + resolution: {integrity: sha512-hDVYSbqGsY4gioHMi/NkIarAJ2qoE5cKEZ6V5HqLcUl0+hNV0Auk/5VbBmU2UO2le6MFgO69EJsrfszwzC6QBA==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.22.1 + '@microsoft/api-extractor-model': 7.22.2 '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.49.0 + '@rushstack/node-core-library': 3.50.0 '@rushstack/rig-package': 0.3.13 '@rushstack/ts-command-line': 4.12.1 colors: 1.2.5 @@ -2468,8 +2456,8 @@ packages: rollup: 2.77.0 dev: true - /@rollup/plugin-typescript/8.3.3_rollup@2.75.6+tslib@2.4.0: - resolution: {integrity: sha512-55L9SyiYu3r/JtqdjhwcwaECXP7JeJ9h1Sg1VWRJKIutla2MdZQodTgcCNybXLMCnqpNLEhS2vGENww98L1npg==} + /@rollup/plugin-typescript/8.3.4_rollup@2.75.6+tslib@2.4.0: + resolution: {integrity: sha512-wt7JnYE9antX6BOXtsxGoeVSu4dZfw0dU3xykfOQ4hC3EddxRbVG/K0xiY1Wup7QOHJcjLYXWAn0Kx9Z1SBHHg==} engines: {node: '>=8.0.0'} peerDependencies: rollup: ^2.14.0 @@ -2485,8 +2473,8 @@ packages: tslib: 2.4.0 dev: true - /@rollup/plugin-typescript/8.3.3_uct5nfewsakxkk4livyn3qaf3e: - resolution: {integrity: sha512-55L9SyiYu3r/JtqdjhwcwaECXP7JeJ9h1Sg1VWRJKIutla2MdZQodTgcCNybXLMCnqpNLEhS2vGENww98L1npg==} + /@rollup/plugin-typescript/8.3.4_uct5nfewsakxkk4livyn3qaf3e: + resolution: {integrity: sha512-wt7JnYE9antX6BOXtsxGoeVSu4dZfw0dU3xykfOQ4hC3EddxRbVG/K0xiY1Wup7QOHJcjLYXWAn0Kx9Z1SBHHg==} engines: {node: '>=8.0.0'} peerDependencies: rollup: ^2.14.0 @@ -2535,8 +2523,8 @@ packages: picomatch: 2.3.1 dev: true - /@rushstack/node-core-library/3.49.0: - resolution: {integrity: sha512-yBJRzGgUNFwulVrwwBARhbGaHsxVMjsZ9JwU1uSBbqPYCdac+t2HYdzi4f4q/Zpgb0eNbwYj2yxgHYpJORNEaw==} + /@rushstack/node-core-library/3.50.0: + resolution: {integrity: sha512-FFEZhgu6iN1MVjpQWmLcz46pSa4r2Oe2JYPo7mtnl3uYfwDaSXUSZuRN3JQgKkXu10TBcffJ7AGKcIt/k+qE/Q==} dependencies: '@types/node': 12.20.24 colors: 1.2.5 @@ -2761,8 +2749,8 @@ packages: '@types/node': 17.0.42 dev: true - /@typescript-eslint/eslint-plugin/5.30.7_cedektzxz37523qbpytbckztui: - resolution: {integrity: sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==} + /@typescript-eslint/eslint-plugin/5.31.0_47ooyv4whyi5jcher5bzfc7xvi: + resolution: {integrity: sha512-VKW4JPHzG5yhYQrQ1AzXgVgX8ZAJEvCz0QI6mLRX4tf7rnFfh5D8SKm0Pq6w5PyNfAWJk6sv313+nEt3ohWMBQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2772,12 +2760,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.30.7_sxmbcirybhoxa24uzkr344oiiy - '@typescript-eslint/scope-manager': 5.30.7 - '@typescript-eslint/type-utils': 5.30.7_sxmbcirybhoxa24uzkr344oiiy - '@typescript-eslint/utils': 5.30.7_sxmbcirybhoxa24uzkr344oiiy + '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/scope-manager': 5.31.0 + '@typescript-eslint/type-utils': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/utils': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im debug: 4.3.4 - eslint: 8.20.0 + eslint: 8.21.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 @@ -2788,8 +2776,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.30.7_sxmbcirybhoxa24uzkr344oiiy: - resolution: {integrity: sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==} + /@typescript-eslint/parser/5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im: + resolution: {integrity: sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2798,26 +2786,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.30.7 - '@typescript-eslint/types': 5.30.7 - '@typescript-eslint/typescript-estree': 5.30.7_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.31.0 + '@typescript-eslint/types': 5.31.0 + '@typescript-eslint/typescript-estree': 5.31.0_typescript@4.6.4 debug: 4.3.4 - eslint: 8.20.0 + eslint: 8.21.0 typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.30.7: - resolution: {integrity: sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==} + /@typescript-eslint/scope-manager/5.31.0: + resolution: {integrity: sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.30.7 - '@typescript-eslint/visitor-keys': 5.30.7 + '@typescript-eslint/types': 5.31.0 + '@typescript-eslint/visitor-keys': 5.31.0 dev: true - /@typescript-eslint/type-utils/5.30.7_sxmbcirybhoxa24uzkr344oiiy: - resolution: {integrity: sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==} + /@typescript-eslint/type-utils/5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im: + resolution: {integrity: sha512-7ZYqFbvEvYXFn9ax02GsPcEOmuWNg+14HIf4q+oUuLnMbpJ6eHAivCg7tZMVwzrIuzX3QCeAOqKoyMZCv5xe+w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2826,22 +2814,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.30.7_sxmbcirybhoxa24uzkr344oiiy + '@typescript-eslint/utils': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im debug: 4.3.4 - eslint: 8.20.0 + eslint: 8.21.0 tsutils: 3.21.0_typescript@4.6.4 typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.30.7: - resolution: {integrity: sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==} + /@typescript-eslint/types/5.31.0: + resolution: {integrity: sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.30.7_typescript@4.6.4: - resolution: {integrity: sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==} + /@typescript-eslint/typescript-estree/5.31.0_typescript@4.6.4: + resolution: {integrity: sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2849,8 +2837,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.30.7 - '@typescript-eslint/visitor-keys': 5.30.7 + '@typescript-eslint/types': 5.31.0 + '@typescript-eslint/visitor-keys': 5.31.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -2861,29 +2849,29 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.30.7_sxmbcirybhoxa24uzkr344oiiy: - resolution: {integrity: sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==} + /@typescript-eslint/utils/5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im: + resolution: {integrity: sha512-kcVPdQS6VIpVTQ7QnGNKMFtdJdvnStkqS5LeALr4rcwx11G6OWb2HB17NMPnlRHvaZP38hL9iK8DdE9Fne7NYg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.30.7 - '@typescript-eslint/types': 5.30.7 - '@typescript-eslint/typescript-estree': 5.30.7_typescript@4.6.4 - eslint: 8.20.0 + '@typescript-eslint/scope-manager': 5.31.0 + '@typescript-eslint/types': 5.31.0 + '@typescript-eslint/typescript-estree': 5.31.0_typescript@4.6.4 + eslint: 8.21.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.20.0 + eslint-utils: 3.0.0_eslint@8.21.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.30.7: - resolution: {integrity: sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==} + /@typescript-eslint/visitor-keys/5.31.0: + resolution: {integrity: sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.30.7 + '@typescript-eslint/types': 5.31.0 eslint-visitor-keys: 3.3.0 dev: true @@ -3045,12 +3033,12 @@ packages: negotiator: 0.6.3 dev: true - /acorn-jsx/5.3.2_acorn@8.7.1: + /acorn-jsx/5.3.2_acorn@8.8.0: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.7.1 + acorn: 8.8.0 dev: true /acorn-node/1.8.2: @@ -3280,15 +3268,15 @@ packages: hasBin: true dev: true - /autoprefixer/10.4.7: - resolution: {integrity: sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==} + /autoprefixer/10.4.8: + resolution: {integrity: sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.20.3 - caniuse-lite: 1.0.30001339 + browserslist: 4.21.3 + caniuse-lite: 1.0.30001373 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -3304,12 +3292,13 @@ packages: - debug dev: false - /babel-plugin-macros/2.8.0: - resolution: {integrity: sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==} + /babel-plugin-macros/3.1.0: + resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} + engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.17.9 - cosmiconfig: 6.0.0 - resolve: 1.22.0 + '@babel/runtime': 7.18.9 + cosmiconfig: 7.0.1 + resolve: 1.22.1 /babel-walk/3.0.0-canary-5: resolution: {integrity: sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==} @@ -3393,6 +3382,17 @@ packages: node-releases: 2.0.4 picocolors: 1.0.0 + /browserslist/4.21.3: + resolution: {integrity: sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001373 + electron-to-chromium: 1.4.206 + node-releases: 2.0.6 + update-browserslist-db: 1.0.5_browserslist@4.21.3 + dev: false + /buffer-from/1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true @@ -3461,6 +3461,10 @@ packages: /caniuse-lite/1.0.30001339: resolution: {integrity: sha512-Es8PiVqCe+uXdms0Gu5xP5PF2bxLR7OBp3wUzUnuO7OHzhOfCyg3hdiGWVPVxhiuniOzng+hTc1u3fEQ0TlkSQ==} + /caniuse-lite/1.0.30001373: + resolution: {integrity: sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==} + dev: false + /chai/4.3.6: resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} engines: {node: '>=4'} @@ -3923,8 +3927,8 @@ packages: is-what: 3.14.1 dev: true - /core-js/3.24.0: - resolution: {integrity: sha512-IeOyT8A6iK37Ep4kZDD423mpi6JfPRoPUdQwEWYiGolvn4o6j2diaRzNfDfpTdu3a5qMbrGUzKUpYpRY8jXCkQ==} + /core-js/3.24.1: + resolution: {integrity: sha512-0QTBSYSUZ6Gq21utGzkfITDylE8jWC9Ne1D2MrhvlsZBI1x39OdDIVbzSqtgMndIy6BlHxBXpMGqzZmnztg2rg==} requiresBuild: true dev: false @@ -3940,9 +3944,9 @@ packages: vary: 1.1.2 dev: true - /cosmiconfig/6.0.0: - resolution: {integrity: sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==} - engines: {node: '>=8'} + /cosmiconfig/7.0.1: + resolution: {integrity: sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==} + engines: {node: '>=10'} dependencies: '@types/parse-json': 4.0.0 import-fresh: 3.3.0 @@ -4235,6 +4239,10 @@ packages: /electron-to-chromium/1.4.137: resolution: {integrity: sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==} + /electron-to-chromium/1.4.206: + resolution: {integrity: sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA==} + dev: false + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -4768,7 +4776,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.3_f7rggfnq2itgt2uu6gnhkpzzne: + /eslint-module-utils/2.7.3_vozeh3qpn3prlhg65r4uuu3jv4: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -4786,7 +4794,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.30.7_sxmbcirybhoxa24uzkr344oiiy + '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -4794,18 +4802,18 @@ packages: - supports-color dev: true - /eslint-plugin-es/3.0.1_eslint@8.20.0: + /eslint-plugin-es/3.0.1_eslint@8.21.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.20.0 + eslint: 8.21.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_xconv27bia2733zao6ipggqv2i: + /eslint-plugin-import/2.26.0_eygs4xj346vriqwkjbwjuyviaa: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4815,14 +4823,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.30.7_sxmbcirybhoxa24uzkr344oiiy + '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.20.0 + eslint: 8.21.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_f7rggfnq2itgt2uu6gnhkpzzne + eslint-module-utils: 2.7.3_vozeh3qpn3prlhg65r4uuu3jv4 has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -4836,14 +4844,14 @@ packages: - supports-color dev: true - /eslint-plugin-node/11.1.0_eslint@8.20.0: + /eslint-plugin-node/11.1.0_eslint@8.21.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.20.0 - eslint-plugin-es: 3.0.1_eslint@8.20.0 + eslint: 8.21.0 + eslint-plugin-es: 3.0.1_eslint@8.21.0 eslint-utils: 2.1.0 ignore: 5.2.0 minimatch: 3.1.2 @@ -4874,13 +4882,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.20.0: + /eslint-utils/3.0.0_eslint@8.21.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.20.0 + eslint: 8.21.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4899,13 +4907,14 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.20.0: - resolution: {integrity: sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==} + /eslint/8.21.0: + resolution: {integrity: sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: '@eslint/eslintrc': 1.3.0 - '@humanwhocodes/config-array': 0.9.5 + '@humanwhocodes/config-array': 0.10.4 + '@humanwhocodes/gitignore-to-minimatch': 1.0.2 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -4913,16 +4922,19 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.20.0 + eslint-utils: 3.0.0_eslint@8.21.0 eslint-visitor-keys: 3.3.0 - espree: 9.3.2 + espree: 9.3.3 esquery: 1.4.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 + find-up: 5.0.0 functional-red-black-tree: 1.0.1 glob-parent: 6.0.2 globals: 13.15.0 + globby: 11.1.0 + grapheme-splitter: 1.0.4 ignore: 5.2.0 import-fresh: 3.3.0 imurmurhash: 0.1.4 @@ -4943,12 +4955,12 @@ packages: - supports-color dev: true - /espree/9.3.2: - resolution: {integrity: sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==} + /espree/9.3.3: + resolution: {integrity: sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.7.1 - acorn-jsx: 5.3.2_acorn@8.7.1 + acorn: 8.8.0 + acorn-jsx: 5.3.2_acorn@8.8.0 eslint-visitor-keys: 3.3.0 dev: true @@ -5162,6 +5174,14 @@ packages: path-exists: 4.0.0 dev: true + /find-up/5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + /flat-cache/3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -5440,6 +5460,10 @@ packages: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true + /grapheme-splitter/1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + dev: true + /handlebars/4.7.7: resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} engines: {node: '>=0.4.7'} @@ -5695,7 +5719,7 @@ packages: dev: true /is-arrayish/0.2.1: - resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} /is-bigint/1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} @@ -6048,6 +6072,11 @@ packages: /lilconfig/2.0.5: resolution: {integrity: sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==} engines: {node: '>=10'} + dev: true + + /lilconfig/2.0.6: + resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} + engines: {node: '>=10'} /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -6129,6 +6158,13 @@ packages: p-locate: 4.1.0 dev: true + /locate-path/6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + /lodash-es/4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} dev: false @@ -6559,6 +6595,10 @@ packages: /node-releases/2.0.4: resolution: {integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==} + /node-releases/2.0.6: + resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} + dev: false + /nopt/5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} engines: {node: '>=6'} @@ -6591,7 +6631,7 @@ packages: engines: {node: '>=0.10.0'} /normalize-range/0.1.2: - resolution: {integrity: sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=} + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} dev: false @@ -6750,6 +6790,13 @@ packages: p-try: 2.2.0 dev: true + /p-limit/3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + /p-locate/2.0.0: resolution: {integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=} engines: {node: '>=4'} @@ -6764,6 +6811,13 @@ packages: p-limit: 2.3.0 dev: true + /p-locate/5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + /p-map/2.1.0: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} @@ -6809,7 +6863,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.16.7 + '@babel/code-frame': 7.18.6 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -6936,23 +6990,23 @@ packages: pathe: 0.3.2 dev: true - /playwright-chromium/1.24.0: - resolution: {integrity: sha512-m8XhbyiD1AuKzEp/9sghtSWPPF8jKgOPwXzEvcuBWgGCfGRDY56pedEa8QmIonqgxU+GPX3TpK25gIeYjxwNww==} + /playwright-chromium/1.24.2: + resolution: {integrity: sha512-L9U/T7GC0dmuHH1xUdS9tOmpOy2Pg2VF/BwkhXCwNnRJ9P9Ah+N5k659cobXfSj8CjKOHPMNTCpgM4X6ZdiDbw==} engines: {node: '>=14'} hasBin: true requiresBuild: true dependencies: - playwright-core: 1.24.0 + playwright-core: 1.24.2 dev: true - /playwright-core/1.24.0: - resolution: {integrity: sha512-BkDWdVsoEEC8m2glQlfNu1EN2qvjBsLIg5bD0wjrfwv9zVHktIsp80yYFObAcWreLNYhfRP4PlXE04lr5R4DFQ==} + /playwright-core/1.24.2: + resolution: {integrity: sha512-zfAoDoPY/0sDLsgSgLZwWmSCevIg1ym7CppBwllguVBNiHeixZkc1AdMuYUPZC6AdEYc4CxWEyLMBTw2YcmRrA==} engines: {node: '>=14'} hasBin: true dev: true - /pnpm/7.6.0: - resolution: {integrity: sha512-pCFZ4OSM3M7JUHShnmk4Hlt9A8QDxLx+i+9kkK4g60YuYhhhD3oqBfWrHax0/XMDvr7GwK0fqFjA8iD8HlZ8Kw==} + /pnpm/7.8.0: + resolution: {integrity: sha512-jzb9/gto4nwuVA2itTRk0PJhuaZcA1NBRB298UzXhqKZQMjtHCS+KLzh7RWk5n3g+KnMg5FHr6Mwg1L62dBz1A==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -6989,7 +7043,7 @@ packages: ts-node: optional: true dependencies: - lilconfig: 2.0.5 + lilconfig: 2.0.6 postcss: 8.4.14 ts-node: 10.9.1 yaml: 1.10.2 @@ -7007,7 +7061,7 @@ packages: ts-node: optional: true dependencies: - lilconfig: 2.0.5 + lilconfig: 2.0.6 postcss: 8.4.14 yaml: 1.10.2 @@ -7543,6 +7597,7 @@ packages: is-core-module: 2.9.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + dev: true /resolve/1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} @@ -7887,7 +7942,7 @@ packages: dev: true /source-map/0.5.7: - resolution: {integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=} + resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} /source-map/0.6.1: @@ -8133,8 +8188,8 @@ packages: resolution: {integrity: sha512-hqTN6kW+pN6/qro6G9OZ7ceDQOcYno020zBQKpZQLsJhYTDMCMNfXi/Y8duF5iW+4WWZr42ry0MMkcRGpbwG2A==} dev: false - /tailwindcss/3.1.6: - resolution: {integrity: sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg==} + /tailwindcss/3.1.7: + resolution: {integrity: sha512-r7mgumZ3k0InfVPpGWcX8X/Ut4xBfv+1O/+C73ar/m01LxGVzWvPxF/w6xIUPEztrCoz7axfx0SMdh8FH8ZvRQ==} engines: {node: '>=12.13.0'} hasBin: true dependencies: @@ -8147,7 +8202,7 @@ packages: fast-glob: 3.2.11 glob-parent: 6.0.2 is-glob: 4.0.3 - lilconfig: 2.0.5 + lilconfig: 2.0.6 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 @@ -8163,8 +8218,8 @@ packages: transitivePeerDependencies: - ts-node - /tailwindcss/3.1.6_ts-node@10.9.1: - resolution: {integrity: sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg==} + /tailwindcss/3.1.7_ts-node@10.9.1: + resolution: {integrity: sha512-r7mgumZ3k0InfVPpGWcX8X/Ut4xBfv+1O/+C73ar/m01LxGVzWvPxF/w6xIUPEztrCoz7axfx0SMdh8FH8ZvRQ==} engines: {node: '>=12.13.0'} hasBin: true dependencies: @@ -8177,7 +8232,7 @@ packages: fast-glob: 3.2.11 glob-parent: 6.0.2 is-glob: 4.0.3 - lilconfig: 2.0.5 + lilconfig: 2.0.6 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 @@ -8562,6 +8617,17 @@ packages: - supports-color dev: true + /update-browserslist-db/1.0.5_browserslist@4.21.3: + resolution: {integrity: sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.3 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: false + /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -8638,8 +8704,8 @@ packages: - react-dom dev: true - /vitest/0.19.0: - resolution: {integrity: sha512-nU80Gm95tMchigHpAMukxv1LoWbBGgknX/1MqrXCOoJoJL7/wfq4h2aow61o2jwf5szQrahoNqBqaGb+fYdYrQ==} + /vitest/0.20.2: + resolution: {integrity: sha512-AFXTHrwG4d2OO6SAL8WP5ZkOwLtgeF4tlrHfXFqrHc+5chNegeR53pge0lv/C4316SqJ2DbYaUBH8vh3CdF+BQ==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -8704,8 +8770,8 @@ packages: vue: 3.2.37 dev: true - /vue-router/4.1.2_vue@3.2.37: - resolution: {integrity: sha512-5BP1qXFncVRwgV/XnqzsKApdMjQPqWIpoUBdL1ynz8HyLxIX/UDAx7Ql2BjmA5CXT/p61JfZvkpiFWFpaqcfag==} + /vue-router/4.1.3_vue@3.2.37: + resolution: {integrity: sha512-XvK81bcYglKiayT7/vYAg/f36ExPC4t90R/HIpzrZ5x+17BOWptXLCrEPufGgZeuq68ww4ekSIMBZY1qdUdfjA==} peerDependencies: vue: ^3.2.0 dependencies: @@ -8911,6 +8977,11 @@ packages: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} + /yocto-queue/0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true + /youch/2.2.2: resolution: {integrity: sha512-/FaCeG3GkuJwaMR34GHVg0l8jCbafZLHiFowSjqLlqhC6OMyf2tPJBu8UirF7/NI9X/R5ai4QfEKUCOxMAGxZQ==} dependencies: From 937cecc7d89194d8672ab62beb92827f45764c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 2 Aug 2022 14:58:53 +0900 Subject: [PATCH 009/311] fix: update dep types (fixes #9475) (#9489) --- packages/vite/types/commonjs.d.ts | 74 ++++++++++++++++++++++++----- packages/vite/types/connect.d.ts | 2 +- packages/vite/types/http-proxy.d.ts | 74 ++++++++++++++++------------- packages/vite/types/terser.d.ts | 43 +++++++++++++++++ 4 files changed, 146 insertions(+), 47 deletions(-) diff --git a/packages/vite/types/commonjs.d.ts b/packages/vite/types/commonjs.d.ts index 5891a7573112a5..01948156deb1cd 100644 --- a/packages/vite/types/commonjs.d.ts +++ b/packages/vite/types/commonjs.d.ts @@ -7,17 +7,17 @@ */ export interface RollupCommonJSOptions { /** - * A picomatch pattern, or array of patterns, which specifies the files in + * A minimatch pattern, or array of patterns, which specifies the files in * the build the plugin should operate on. By default, all files with - * extension `".cjs"` or those in `extensions` are included, but you can narrow - * this list by only including specific files. These files will be analyzed - * and transpiled if either the analysis does not find ES module specific - * statements or `transformMixedEsModules` is `true`. + * extension `".cjs"` or those in `extensions` are included, but you can + * narrow this list by only including specific files. These files will be + * analyzed and transpiled if either the analysis does not find ES module + * specific statements or `transformMixedEsModules` is `true`. * @default undefined */ include?: string | RegExp | readonly (string | RegExp)[] /** - * A picomatch pattern, or array of patterns, which specifies the files in + * A minimatch pattern, or array of patterns, which specifies the files in * the build the plugin should _ignore_. By default, all files with * extensions other than those in `extensions` or `".cjs"` are ignored, but you * can exclude additional files. See also the `include` option. @@ -37,7 +37,8 @@ export interface RollupCommonJSOptions { */ ignoreGlobal?: boolean /** - * If false, skips source map generation for CommonJS modules. This will improve performance. + * If false, skips source map generation for CommonJS modules. This will + * improve performance. * @default true */ sourceMap?: boolean @@ -65,6 +66,39 @@ export interface RollupCommonJSOptions { * @default false */ transformMixedEsModules?: boolean + /** + * By default, this plugin will try to hoist `require` statements as imports + * to the top of each file. While this works well for many code bases and + * allows for very efficient ESM output, it does not perfectly capture + * CommonJS semantics as the order of side effects like log statements may + * change. But it is especially problematic when there are circular `require` + * calls between CommonJS modules as those often rely on the lazy execution of + * nested `require` calls. + * + * Setting this option to `true` will wrap all CommonJS files in functions + * which are executed when they are required for the first time, preserving + * NodeJS semantics. Note that this can have an impact on the size and + * performance of the generated code. + * + * The default value of `"auto"` will only wrap CommonJS files when they are + * part of a CommonJS dependency cycle, e.g. an index file that is required by + * many of its dependencies. All other CommonJS files are hoisted. This is the + * recommended setting for most code bases. + * + * `false` will entirely prevent wrapping and hoist all files. This may still + * work depending on the nature of cyclic dependencies but will often cause + * problems. + * + * You can also provide a minimatch pattern, or array of patterns, to only + * specify a subset of files which should be wrapped in functions for proper + * `require` semantics. + * + * `"debug"` works like `"auto"` but after bundling, it will display a warning + * containing a list of ids that have been wrapped which can be used as + * minimatch pattern for fine-tuning. + * @default "auto" + */ + strictRequires?: boolean | string | RegExp | readonly (string | RegExp)[] /** * Sometimes you have to leave require statements unconverted. Pass an array * containing the IDs or a `id => boolean` function. @@ -75,14 +109,16 @@ export interface RollupCommonJSOptions { * In most cases, where `require` calls are inside a `try-catch` clause, * they should be left unconverted as it requires an optional dependency * that may or may not be installed beside the rolled up package. - * Due to the conversion of `require` to a static `import` - the call is hoisted - * to the top of the file, outside of the `try-catch` clause. + * Due to the conversion of `require` to a static `import` - the call is + * hoisted to the top of the file, outside of the `try-catch` clause. * * - `true`: All `require` calls inside a `try` will be left unconverted. - * - `false`: All `require` calls inside a `try` will be converted as if the `try-catch` clause is not there. + * - `false`: All `require` calls inside a `try` will be converted as if the + * `try-catch` clause is not there. * - `remove`: Remove all `require` calls from inside any `try` block. * - `string[]`: Pass an array containing the IDs to left unconverted. - * - `((id: string) => boolean|'remove')`: Pass a function that control individual IDs. + * - `((id: string) => boolean|'remove')`: Pass a function that control + * individual IDs. * * @default false */ @@ -165,12 +201,17 @@ export interface RollupCommonJSOptions { | 'preferred' | 'namespace' | ((id: string) => boolean | 'auto' | 'preferred' | 'namespace') + + /** + * @default "auto" + */ + defaultIsModuleExports?: boolean | 'auto' | ((id: string) => boolean | 'auto') /** * Some modules contain dynamic `require` calls, or require modules that * contain circular dependencies, which are not handled well by static * imports. Including those modules as `dynamicRequireTargets` will simulate a - * CommonJS (NodeJS-like) environment for them with support for dynamic and - * circular dependencies. + * CommonJS (NodeJS-like) environment for them with support for dynamic + * dependencies. It also enables `strictRequires` for those modules. * * Note: In extreme cases, this feature may result in some paths being * rendered as absolute in the final bundle. The plugin tries to avoid @@ -179,4 +220,11 @@ export interface RollupCommonJSOptions { * replacing strings like `"/Users/John/Desktop/foo-project/"` -\> `"/"`. */ dynamicRequireTargets?: string | ReadonlyArray + /** + * To avoid long paths when using the `dynamicRequireTargets` option, you can use this option to specify a directory + * that is a common parent for all files that use dynamic require statements. Using a directory higher up such as `/` + * may lead to unnecessarily long paths in the generated code and may expose directory names on your machine like your + * home directory name. By default it uses the current working directory. + */ + dynamicRequireRoot?: string } diff --git a/packages/vite/types/connect.d.ts b/packages/vite/types/connect.d.ts index 2fb97ebeb494ab..74c559b6a436f5 100644 --- a/packages/vite/types/connect.d.ts +++ b/packages/vite/types/connect.d.ts @@ -14,7 +14,7 @@ export namespace Connect { export type ServerHandle = HandleFunction | http.Server export class IncomingMessage extends http.IncomingMessage { - originalUrl?: http.IncomingMessage['url'] + originalUrl?: http.IncomingMessage['url'] | undefined } export type NextFunction = (err?: any) => void diff --git a/packages/vite/types/http-proxy.d.ts b/packages/vite/types/http-proxy.d.ts index 81b9226a4db669..5e2717eaa0fcbd 100644 --- a/packages/vite/types/http-proxy.d.ts +++ b/packages/vite/types/http-proxy.d.ts @@ -27,16 +27,16 @@ export namespace HttpProxy { export interface ProxyTargetDetailed { host: string port: number - protocol?: string - hostname?: string - socketPath?: string - key?: string - passphrase?: string - pfx?: Buffer | string - cert?: string - ca?: string - ciphers?: string - secureProtocol?: string + protocol?: string | undefined + hostname?: string | undefined + socketPath?: string | undefined + key?: string | undefined + passphrase?: string | undefined + pfx?: Buffer | string | undefined + cert?: string | undefined + ca?: string | undefined + ciphers?: string | undefined + secureProtocol?: string | undefined } export type ErrorCallback = ( @@ -189,54 +189,62 @@ export namespace HttpProxy { export interface ServerOptions { /** URL string to be parsed with the url module. */ - target?: ProxyTarget + target?: ProxyTarget | undefined /** URL string to be parsed with the url module. */ - forward?: ProxyTargetUrl + forward?: ProxyTargetUrl | undefined /** Object to be passed to http(s).request. */ agent?: any /** Object to be passed to https.createServer(). */ ssl?: any /** If you want to proxy websockets. */ - ws?: boolean + ws?: boolean | undefined /** Adds x- forward headers. */ - xfwd?: boolean + xfwd?: boolean | undefined /** Verify SSL certificate. */ - secure?: boolean + secure?: boolean | undefined /** Explicitly specify if we are proxying to another proxy. */ - toProxy?: boolean + toProxy?: boolean | undefined /** Specify whether you want to prepend the target's path to the proxy path. */ - prependPath?: boolean + prependPath?: boolean | undefined /** Specify whether you want to ignore the proxy path of the incoming request. */ - ignorePath?: boolean + ignorePath?: boolean | undefined /** Local interface string to bind for outgoing connections. */ - localAddress?: string + localAddress?: string | undefined /** Changes the origin of the host header to the target URL. */ - changeOrigin?: boolean + changeOrigin?: boolean | undefined /** specify whether you want to keep letter case of response header key */ - preserveHeaderKeyCase?: boolean + preserveHeaderKeyCase?: boolean | undefined /** Basic authentication i.e. 'user:password' to compute an Authorization header. */ - auth?: string + auth?: string | undefined /** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */ - hostRewrite?: string + hostRewrite?: string | undefined /** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */ - autoRewrite?: boolean + autoRewrite?: boolean | undefined /** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */ - protocolRewrite?: string + protocolRewrite?: string | undefined /** rewrites domain of set-cookie headers. */ - cookieDomainRewrite?: false | string | { [oldDomain: string]: string } + cookieDomainRewrite?: + | false + | string + | { [oldDomain: string]: string } + | undefined /** rewrites path of set-cookie headers. Default: false */ - cookiePathRewrite?: false | string | { [oldPath: string]: string } + cookiePathRewrite?: + | false + | string + | { [oldPath: string]: string } + | undefined /** object with extra headers to be added to target requests. */ - headers?: { [header: string]: string } + headers?: { [header: string]: string } | undefined /** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */ - proxyTimeout?: number + proxyTimeout?: number | undefined /** Timeout (in milliseconds) for incoming requests */ - timeout?: number + timeout?: number | undefined /** Specify whether you want to follow redirects. Default: false */ - followRedirects?: boolean + followRedirects?: boolean | undefined /** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */ - selfHandleResponse?: boolean + selfHandleResponse?: boolean | undefined /** Buffer */ - buffer?: stream.Stream + buffer?: stream.Stream | undefined } } diff --git a/packages/vite/types/terser.d.ts b/packages/vite/types/terser.d.ts index 5c24660eb98781..a704a20cdc71ae 100644 --- a/packages/vite/types/terser.d.ts +++ b/packages/vite/types/terser.d.ts @@ -39,6 +39,7 @@ export namespace Terser { export interface ParseOptions { bare_returns?: boolean + /** @deprecated legacy option. Currently, all supported EcmaScript is valid to parse. */ ecma?: ECMA html5_comments?: boolean shebang?: boolean @@ -113,22 +114,59 @@ export namespace Terser { keep_classnames?: boolean | RegExp keep_fnames?: boolean | RegExp module?: boolean + nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler properties?: boolean | ManglePropertiesOptions reserved?: string[] safari10?: boolean toplevel?: boolean } + /** + * An identifier mangler for which the output is invariant with respect to the source code. + */ + export interface SimpleIdentifierMangler { + /** + * Obtains the nth most favored (usually shortest) identifier to rename a variable to. + * The mangler will increment n and retry until the return value is not in use in scope, and is not a reserved word. + * This function is expected to be stable; Evaluating get(n) === get(n) should always return true. + * @param n - The ordinal of the identifier. + */ + get(n: number): string + } + + /** + * An identifier mangler that leverages character frequency analysis to determine identifier precedence. + */ + export interface WeightedIdentifierMangler extends SimpleIdentifierMangler { + /** + * Modifies the internal weighting of the input characters by the specified delta. + * Will be invoked on the entire printed AST, and then deduct mangleable identifiers. + * @param chars - The characters to modify the weighting of. + * @param delta - The numeric weight to add to the characters. + */ + consider(chars: string, delta: number): number + /** + * Resets character weights. + */ + reset(): void + /** + * Sorts identifiers by character frequency, in preparation for calls to get(n). + */ + sort(): void + } + export interface ManglePropertiesOptions { builtins?: boolean debug?: boolean keep_quoted?: boolean | 'strict' + nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler regex?: RegExp | string reserved?: string[] } export interface FormatOptions { ascii_only?: boolean + /** @deprecated Not implemented anymore */ beautify?: boolean braces?: boolean comments?: @@ -148,6 +186,7 @@ export namespace Terser { ) => boolean) ecma?: ECMA ie8?: boolean + keep_numbers?: boolean indent_level?: number indent_start?: number inline_script?: boolean @@ -178,6 +217,7 @@ export namespace Terser { export interface MinifyOptions { compress?: boolean | CompressOptions ecma?: ECMA + enclose?: boolean | string ie8?: boolean keep_classnames?: boolean | RegExp keep_fnames?: boolean | RegExp @@ -185,6 +225,8 @@ export namespace Terser { module?: boolean nameCache?: object format?: FormatOptions + /** @deprecated deprecated */ + output?: FormatOptions parse?: ParseOptions safari10?: boolean sourceMap?: boolean | SourceMapOptions @@ -194,6 +236,7 @@ export namespace Terser { export interface MinifyOutput { code?: string map?: object | string + decoded_map?: object | null } export interface SourceMapOptions { From 1983cf43d4da92d40b1f96dff0a44def044f9130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 2 Aug 2022 15:54:53 +0900 Subject: [PATCH 010/311] docs: override `vite/client` type (#9488) Co-authored-by: Bjorn Lu --- docs/guide/features.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/guide/features.md b/docs/guide/features.md index db1f45b4ddeb99..2d72adb787ce99 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -102,6 +102,20 @@ This will provide the following type shims: - Types for the Vite-injected [env variables](./env-and-mode#env-variables) on `import.meta.env` - Types for the [HMR API](./api-hmr) on `import.meta.hot` +::: tip +To override the default typing, declare it before the triple-slash reference. For example, to make the default import of `*.svg` a React component: + +```ts +declare module '*.svg' { + const content: React.FC> + export default content +} + +/// +``` + +::: + ## Vue Vite provides first-class Vue support: From 9e9cd23763c96020cdf1807334368e038f61ad01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 3 Aug 2022 22:57:50 +0900 Subject: [PATCH 011/311] chore: node prefix lint (#9514) --- .eslintrc.cjs | 5 +++++ packages/vite/bin/vite.js | 2 +- packages/vite/src/node/http.ts | 6 +++--- packages/vite/src/node/logger.ts | 2 +- packages/vite/src/node/plugins/ssrRequireHook.ts | 4 +++- packages/vite/types/ws.d.ts | 2 +- playground/alias/vite.config.js | 2 +- playground/assets/vite.config-runtime-base.js | 2 +- playground/assets/vite.config.js | 2 +- playground/backend-integration/vite.config.js | 2 +- playground/css-codesplit-cjs/vite.config.js | 2 +- playground/css-codesplit/vite.config.js | 2 +- playground/css/postcss.config.js | 4 ++-- playground/css/vite.config.js | 2 +- playground/dynamic-import/vite.config.js | 4 ++-- playground/fs-serve/root/vite.config.js | 2 +- playground/html/vite.config.js | 2 +- playground/json/server.js | 4 ++-- playground/legacy/vite.config.js | 4 ++-- playground/lib/vite.config.js | 4 ++-- playground/lib/vite.dyimport.config.js | 4 ++-- playground/multiple-entrypoints/vite.config.js | 4 ++-- .../optimize-deps/dep-with-builtin-module-cjs/index.js | 2 ++ .../optimize-deps/dep-with-builtin-module-esm/index.js | 2 ++ playground/optimize-deps/vite.config.js | 2 +- playground/optimize-missing-deps/multi-entry-dep/index.js | 2 +- playground/optimize-missing-deps/server.js | 4 ++-- playground/resolve/browser-field/multiple.dot.path.js | 2 +- playground/resolve/browser-field/not-browser.js | 2 +- playground/ssr-deps/import-builtin-cjs/index.js | 2 +- playground/ssr-deps/read-file-content/index.js | 6 +++--- playground/ssr-deps/require-absolute/index.js | 2 +- playground/ssr-deps/server.js | 2 +- playground/ssr-html/server.js | 2 +- playground/ssr-pug/server.js | 2 +- playground/ssr-react/prerender.js | 2 +- playground/ssr-react/server.js | 2 +- playground/ssr-vue/server.js | 2 +- playground/ssr-vue/vite.config.js | 2 +- playground/ssr-webworker/worker.js | 2 +- playground/worker/vite.config-relative-base.js | 2 +- 41 files changed, 61 insertions(+), 50 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 904873b07043cc..12ae8a255406d4 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,4 +1,5 @@ // @ts-check +const { builtinModules } = require('node:module') const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ @@ -81,6 +82,10 @@ module.exports = defineConfig({ { prefer: 'type-imports' } ], + 'import/no-nodejs-modules': [ + 'error', + { allow: builtinModules.map((mod) => `node:${mod}`) } + ], 'import/no-duplicates': 'error', 'import/order': 'error', 'sort-imports': [ diff --git a/packages/vite/bin/vite.js b/packages/vite/bin/vite.js index 5814f260dc427c..13e9529510e4a3 100755 --- a/packages/vite/bin/vite.js +++ b/packages/vite/bin/vite.js @@ -50,7 +50,7 @@ if (profileIndex > 0) { if (next && !next.startsWith('-')) { process.argv.splice(profileIndex, 1) } - const inspector = await import('inspector').then((r) => r.default) + const inspector = await import('node:inspector').then((r) => r.default) const session = (global.__vite_profile_session = new inspector.Session()) session.connect() session.post('Profiler.enable', () => { diff --git a/packages/vite/src/node/http.ts b/packages/vite/src/node/http.ts index 18ce37f6a327e1..f0f53f1d686fd6 100644 --- a/packages/vite/src/node/http.ts +++ b/packages/vite/src/node/http.ts @@ -95,16 +95,16 @@ export async function resolveHttpServer( httpsOptions?: HttpsServerOptions ): Promise { if (!httpsOptions) { - const { createServer } = await import('http') + const { createServer } = await import('node:http') return createServer(app) } // #484 fallback to http1 when proxy is needed. if (proxy) { - const { createServer } = await import('https') + const { createServer } = await import('node:https') return createServer(httpsOptions, app) } else { - const { createSecureServer } = await import('http2') + const { createSecureServer } = await import('node:http2') return createSecureServer( { // Manually increase the session memory to prevent 502 ENHANCE_YOUR_CALM diff --git a/packages/vite/src/node/logger.ts b/packages/vite/src/node/logger.ts index d0c5d29334c023..326fa0e6dfd778 100644 --- a/packages/vite/src/node/logger.ts +++ b/packages/vite/src/node/logger.ts @@ -1,6 +1,6 @@ /* eslint no-console: 0 */ -import readline from 'readline' +import readline from 'node:readline' import colors from 'picocolors' import type { RollupError } from 'rollup' import type { ResolvedServerUrls } from './server' diff --git a/packages/vite/src/node/plugins/ssrRequireHook.ts b/packages/vite/src/node/plugins/ssrRequireHook.ts index dc51f9114c5ef2..d1173b211ff836 100644 --- a/packages/vite/src/node/plugins/ssrRequireHook.ts +++ b/packages/vite/src/node/plugins/ssrRequireHook.ts @@ -53,7 +53,9 @@ type NodeResolveFilename = ( /** Respect the `resolve.dedupe` option in production SSR. */ function dedupeRequire(dedupe: string[]) { // eslint-disable-next-line no-restricted-globals - const Module = require('module') as { _resolveFilename: NodeResolveFilename } + const Module = require('node:module') as { + _resolveFilename: NodeResolveFilename + } const resolveFilename = Module._resolveFilename Module._resolveFilename = function (request, parent, isMain, options) { if (request[0] !== '.' && request[0] !== '/') { diff --git a/packages/vite/types/ws.d.ts b/packages/vite/types/ws.d.ts index 4a03058d0eeaa2..a06341fca9eeb9 100644 --- a/packages/vite/types/ws.d.ts +++ b/packages/vite/types/ws.d.ts @@ -26,7 +26,7 @@ import type { } from 'node:http' import type { Server as HTTPSServer } from 'node:https' import type { Duplex, DuplexOptions } from 'node:stream' -import type { SecureContextOptions } from 'tls' +import type { SecureContextOptions } from 'node:tls' import type { URL } from 'node:url' import type { ZlibOptions } from 'node:zlib' diff --git a/playground/alias/vite.config.js b/playground/alias/vite.config.js index 634871877a0f56..16c33dd859aa66 100644 --- a/playground/alias/vite.config.js +++ b/playground/alias/vite.config.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/assets/vite.config-runtime-base.js b/playground/assets/vite.config-runtime-base.js index 0d643a6cf6058a..1752e974b8abcd 100644 --- a/playground/assets/vite.config-runtime-base.js +++ b/playground/assets/vite.config-runtime-base.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') const dynamicBaseAssetsCode = ` globalThis.__toAssetUrl = url => '/' + url diff --git a/playground/assets/vite.config.js b/playground/assets/vite.config.js index c9d821ae3d73ee..700896cc13d50b 100644 --- a/playground/assets/vite.config.js +++ b/playground/assets/vite.config.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/backend-integration/vite.config.js b/playground/backend-integration/vite.config.js index ce3f3361fc70d1..ff5d2c43c3ed04 100644 --- a/playground/backend-integration/vite.config.js +++ b/playground/backend-integration/vite.config.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') const glob = require('fast-glob') const normalizePath = require('vite').normalizePath diff --git a/playground/css-codesplit-cjs/vite.config.js b/playground/css-codesplit-cjs/vite.config.js index 7cd8967121f021..85a7a0f07eff14 100644 --- a/playground/css-codesplit-cjs/vite.config.js +++ b/playground/css-codesplit-cjs/vite.config.js @@ -1,4 +1,4 @@ -const { resolve } = require('path') +const { resolve } = require('node:path') module.exports = { build: { diff --git a/playground/css-codesplit/vite.config.js b/playground/css-codesplit/vite.config.js index 528a3c7d7f19fe..0bc9cab5d025df 100644 --- a/playground/css-codesplit/vite.config.js +++ b/playground/css-codesplit/vite.config.js @@ -1,4 +1,4 @@ -const { resolve } = require('path') +const { resolve } = require('node:path') module.exports = { build: { diff --git a/playground/css/postcss.config.js b/playground/css/postcss.config.js index 48d5dd23d5a8f1..a9bbd0f2b4e09e 100644 --- a/playground/css/postcss.config.js +++ b/playground/css/postcss.config.js @@ -2,8 +2,8 @@ module.exports = { plugins: [require('postcss-nested'), testDirDep, testSourceInput] } -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const glob = require('fast-glob') const { normalizePath } = require('vite') diff --git a/playground/css/vite.config.js b/playground/css/vite.config.js index 704eb134e25880..d8333b07fb4d63 100644 --- a/playground/css/vite.config.js +++ b/playground/css/vite.config.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/dynamic-import/vite.config.js b/playground/dynamic-import/vite.config.js index 96baaa74798686..f3b7cb1dd049ce 100644 --- a/playground/dynamic-import/vite.config.js +++ b/playground/dynamic-import/vite.config.js @@ -1,5 +1,5 @@ -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const vite = require('vite') module.exports = vite.defineConfig({ diff --git a/playground/fs-serve/root/vite.config.js b/playground/fs-serve/root/vite.config.js index 585a91f9d6346d..5712ad5acb3438 100644 --- a/playground/fs-serve/root/vite.config.js +++ b/playground/fs-serve/root/vite.config.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/html/vite.config.js b/playground/html/vite.config.js index 31cc1656d2f19e..8c117aaaa663e7 100644 --- a/playground/html/vite.config.js +++ b/playground/html/vite.config.js @@ -1,4 +1,4 @@ -const { resolve } = require('path') +const { resolve } = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/json/server.js b/playground/json/server.js index d78c7f6246d540..01f7e1482aa9e8 100644 --- a/playground/json/server.js +++ b/playground/json/server.js @@ -1,6 +1,6 @@ // @ts-check -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const express = require('express') const isTest = process.env.NODE_ENV === 'test' || !!process.env.VITE_TEST_BUILD diff --git a/playground/legacy/vite.config.js b/playground/legacy/vite.config.js index f793980f365887..bdf89639d57e37 100644 --- a/playground/legacy/vite.config.js +++ b/playground/legacy/vite.config.js @@ -1,5 +1,5 @@ -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const legacy = require('@vitejs/plugin-legacy').default module.exports = { diff --git a/playground/lib/vite.config.js b/playground/lib/vite.config.js index d9fb932f535ebb..3e5187b68c55ee 100644 --- a/playground/lib/vite.config.js +++ b/playground/lib/vite.config.js @@ -1,5 +1,5 @@ -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/lib/vite.dyimport.config.js b/playground/lib/vite.dyimport.config.js index 54a84dbe76c24a..c621c90fb2ed8a 100644 --- a/playground/lib/vite.dyimport.config.js +++ b/playground/lib/vite.dyimport.config.js @@ -1,5 +1,5 @@ -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') /** * @type {import('vite').UserConfig} diff --git a/playground/multiple-entrypoints/vite.config.js b/playground/multiple-entrypoints/vite.config.js index c2a44858a3ce6b..e1289dbf5a0078 100644 --- a/playground/multiple-entrypoints/vite.config.js +++ b/playground/multiple-entrypoints/vite.config.js @@ -1,5 +1,5 @@ -const { resolve } = require('path') -const fs = require('fs') +const { resolve } = require('node:path') +const fs = require('node:fs') module.exports = { build: { diff --git a/playground/optimize-deps/dep-with-builtin-module-cjs/index.js b/playground/optimize-deps/dep-with-builtin-module-cjs/index.js index 7cff6a9e9dac8e..82766ff59a3e8c 100644 --- a/playground/optimize-deps/dep-with-builtin-module-cjs/index.js +++ b/playground/optimize-deps/dep-with-builtin-module-cjs/index.js @@ -1,5 +1,7 @@ // no node: protocol intentionally +// eslint-disable-next-line import/no-nodejs-modules const fs = require('fs') +// eslint-disable-next-line import/no-nodejs-modules const path = require('path') // NOTE: require destructure would error immediately because of how esbuild diff --git a/playground/optimize-deps/dep-with-builtin-module-esm/index.js b/playground/optimize-deps/dep-with-builtin-module-esm/index.js index 5b5df60fad9e15..b7b710ffaab58f 100644 --- a/playground/optimize-deps/dep-with-builtin-module-esm/index.js +++ b/playground/optimize-deps/dep-with-builtin-module-esm/index.js @@ -1,5 +1,7 @@ // no node: protocol intentionally +// eslint-disable-next-line import/no-nodejs-modules import { readFileSync } from 'fs' +// eslint-disable-next-line import/no-nodejs-modules import path from 'path' // access from named import diff --git a/playground/optimize-deps/vite.config.js b/playground/optimize-deps/vite.config.js index 091f994e2c6aec..a44ca2ef2449d6 100644 --- a/playground/optimize-deps/vite.config.js +++ b/playground/optimize-deps/vite.config.js @@ -1,4 +1,4 @@ -const fs = require('fs') +const fs = require('node:fs') const vue = require('@vitejs/plugin-vue') // Overriding the NODE_ENV set by vitest diff --git a/playground/optimize-missing-deps/multi-entry-dep/index.js b/playground/optimize-missing-deps/multi-entry-dep/index.js index 0717b87c27c2d8..4b214df5d30765 100644 --- a/playground/optimize-missing-deps/multi-entry-dep/index.js +++ b/playground/optimize-missing-deps/multi-entry-dep/index.js @@ -1,3 +1,3 @@ -const path = require('path') +const path = require('node:path') exports.name = path.normalize('./Server') diff --git a/playground/optimize-missing-deps/server.js b/playground/optimize-missing-deps/server.js index ace9ca52c6f2b3..641c128afbbe26 100644 --- a/playground/optimize-missing-deps/server.js +++ b/playground/optimize-missing-deps/server.js @@ -1,6 +1,6 @@ // @ts-check -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const express = require('express') const isTest = process.env.NODE_ENV === 'test' || !!process.env.VITE_TEST_BUILD diff --git a/playground/resolve/browser-field/multiple.dot.path.js b/playground/resolve/browser-field/multiple.dot.path.js index b4022f73daaf6e..37bd1099aecc0e 100644 --- a/playground/resolve/browser-field/multiple.dot.path.js +++ b/playground/resolve/browser-field/multiple.dot.path.js @@ -1,2 +1,2 @@ -const fs = require('fs') +const fs = require('node:fs') console.log('this should not run in the browser') diff --git a/playground/resolve/browser-field/not-browser.js b/playground/resolve/browser-field/not-browser.js index b4022f73daaf6e..37bd1099aecc0e 100644 --- a/playground/resolve/browser-field/not-browser.js +++ b/playground/resolve/browser-field/not-browser.js @@ -1,2 +1,2 @@ -const fs = require('fs') +const fs = require('node:fs') console.log('this should not run in the browser') diff --git a/playground/ssr-deps/import-builtin-cjs/index.js b/playground/ssr-deps/import-builtin-cjs/index.js index 149be9e9ed53b8..f3e8d6a4b9031f 100644 --- a/playground/ssr-deps/import-builtin-cjs/index.js +++ b/playground/ssr-deps/import-builtin-cjs/index.js @@ -1,4 +1,4 @@ -exports.stream = require('stream') +exports.stream = require('node:stream') exports.hello = function () { return 'Hello World!' diff --git a/playground/ssr-deps/read-file-content/index.js b/playground/ssr-deps/read-file-content/index.js index c8761b3b4734c1..4cc6c34972defa 100644 --- a/playground/ssr-deps/read-file-content/index.js +++ b/playground/ssr-deps/read-file-content/index.js @@ -1,9 +1,9 @@ -const path = require('path') +const path = require('node:path') module.exports = async function readFileContent(filePath) { const fs = process.versions.node.split('.')[0] >= '14' - ? require('fs/promises') - : require('fs').promises + ? require('node:fs/promises') + : require('node:fs').promises return await fs.readFile(path.resolve(filePath), 'utf-8') } diff --git a/playground/ssr-deps/require-absolute/index.js b/playground/ssr-deps/require-absolute/index.js index c2f844f3e2f6ed..18b3aa936629dc 100644 --- a/playground/ssr-deps/require-absolute/index.js +++ b/playground/ssr-deps/require-absolute/index.js @@ -1,3 +1,3 @@ -const path = require('path') +const path = require('node:path') module.exports.hello = () => require(path.resolve(__dirname, './foo.js')).hello diff --git a/playground/ssr-deps/server.js b/playground/ssr-deps/server.js index aa47a6055321ac..d82f80c599583b 100644 --- a/playground/ssr-deps/server.js +++ b/playground/ssr-deps/server.js @@ -1,7 +1,7 @@ // @ts-check import fs from 'node:fs' import path from 'node:path' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' import express from 'express' const __dirname = path.dirname(fileURLToPath(import.meta.url)) diff --git a/playground/ssr-html/server.js b/playground/ssr-html/server.js index d1f0ad1a3e0a7e..6c6ddca9addc1d 100644 --- a/playground/ssr-html/server.js +++ b/playground/ssr-html/server.js @@ -1,6 +1,6 @@ import fs from 'node:fs' import path from 'node:path' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' import express from 'express' const __dirname = path.dirname(fileURLToPath(import.meta.url)) diff --git a/playground/ssr-pug/server.js b/playground/ssr-pug/server.js index d5fe58ee47dbdf..b5d4f340b79b32 100644 --- a/playground/ssr-pug/server.js +++ b/playground/ssr-pug/server.js @@ -1,6 +1,6 @@ // @ts-check import path from 'node:path' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' import pug from 'pug' import express from 'express' diff --git a/playground/ssr-react/prerender.js b/playground/ssr-react/prerender.js index 38412028a7fccb..8a18a492ab138c 100644 --- a/playground/ssr-react/prerender.js +++ b/playground/ssr-react/prerender.js @@ -3,7 +3,7 @@ import fs from 'node:fs' import path from 'node:path' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const toAbsolute = (p) => path.resolve(__dirname, p) diff --git a/playground/ssr-react/server.js b/playground/ssr-react/server.js index 3b7f7045f6c95a..1a8d245f8e2d80 100644 --- a/playground/ssr-react/server.js +++ b/playground/ssr-react/server.js @@ -1,6 +1,6 @@ import fs from 'node:fs' import path from 'node:path' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' import express from 'express' const __dirname = path.dirname(fileURLToPath(import.meta.url)) diff --git a/playground/ssr-vue/server.js b/playground/ssr-vue/server.js index 56961faa40769e..55605387c481f9 100644 --- a/playground/ssr-vue/server.js +++ b/playground/ssr-vue/server.js @@ -1,7 +1,7 @@ // @ts-check import fs from 'node:fs' import path from 'node:path' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' import express from 'express' const isTest = process.env.NODE_ENV === 'test' || !!process.env.VITE_TEST_BUILD diff --git a/playground/ssr-vue/vite.config.js b/playground/ssr-vue/vite.config.js index a313ea7dd479b2..c8be7320c8a9b0 100644 --- a/playground/ssr-vue/vite.config.js +++ b/playground/ssr-vue/vite.config.js @@ -1,4 +1,4 @@ -import path from 'path' +import path from 'node:path' import { defineConfig } from 'vite' import vuePlugin from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' diff --git a/playground/ssr-webworker/worker.js b/playground/ssr-webworker/worker.js index 9904d5994a1319..d353688b0575eb 100644 --- a/playground/ssr-webworker/worker.js +++ b/playground/ssr-webworker/worker.js @@ -1,4 +1,4 @@ -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' import path from 'node:path' import { Miniflare } from 'miniflare' diff --git a/playground/worker/vite.config-relative-base.js b/playground/worker/vite.config-relative-base.js index 8002883ca4abf1..4c20940749eacc 100644 --- a/playground/worker/vite.config-relative-base.js +++ b/playground/worker/vite.config-relative-base.js @@ -1,4 +1,4 @@ -const path = require('path') +const path = require('node:path') const vueJsx = require('@vitejs/plugin-vue-jsx') const vite = require('vite') From 145801e715e42b28e896fe8cb2ae454c211a5627 Mon Sep 17 00:00:00 2001 From: OBE Rocks! <33532265+oberocks@users.noreply.github.com> Date: Thu, 4 Aug 2022 23:51:13 -0400 Subject: [PATCH 012/311] docs(env): update copy issues (#9546) --- docs/guide/env-and-mode.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guide/env-and-mode.md b/docs/guide/env-and-mode.md index c91a53dc6f1a2b..c69badcda5db2e 100644 --- a/docs/guide/env-and-mode.md +++ b/docs/guide/env-and-mode.md @@ -46,7 +46,7 @@ In addition, environment variables that already exist when Vite is executed have Loaded env variables are also exposed to your client source code via `import.meta.env` as strings. -To prevent accidentally leaking env variables to the client, only variables prefixed with `VITE_` are exposed to your Vite-processed code. e.g. the following file: +To prevent accidentally leaking env variables to the client, only variables prefixed with `VITE_` are exposed to your Vite-processed code. e.g. for the following env variables: ``` VITE_SOME_KEY=123 @@ -60,7 +60,7 @@ console.log(import.meta.env.VITE_SOME_KEY) // 123 console.log(import.meta.env.DB_PASSWORD) // undefined ``` -If you want to customize env variables prefix, see [envPrefix](/config/shared-options.html#envprefix) option. +If you want to customize the env variables prefix, see the [envPrefix](/config/shared-options.html#envprefix) option. :::warning SECURITY NOTES @@ -71,9 +71,9 @@ If you want to customize env variables prefix, see [envPrefix](/config/shared-op ### IntelliSense for TypeScript -By default, Vite provides type definition for `import.meta.env` in [`vite/client.d.ts`](https://github.com/vitejs/vite/blob/main/packages/vite/client.d.ts). While you can define more custom env variables in `.env.[mode]` files, you may want to get TypeScript IntelliSense for user-defined env variables which prefixed with `VITE_`. +By default, Vite provides type definitions for `import.meta.env` in [`vite/client.d.ts`](https://github.com/vitejs/vite/blob/main/packages/vite/client.d.ts). While you can define more custom env variables in `.env.[mode]` files, you may want to get TypeScript IntelliSense for user-defined env variables that are prefixed with `VITE_`. -To achieve, you can create an `env.d.ts` in `src` directory, then augment `ImportMetaEnv` like this: +To achieve this, you can create an `env.d.ts` in `src` directory, then augment `ImportMetaEnv` like this: ```typescript /// @@ -98,7 +98,7 @@ If your code relies on types from browser environments such as [DOM](https://git ## Modes -By default, the dev server (`dev` command) runs in `development` mode and the `build` command run in `production` mode. +By default, the dev server (`dev` command) runs in `development` mode and the `build` command runs in `production` mode. This means when running `vite build`, it will load the env variables from `.env.production` if there is one: From 89dd31cfe228caee358f4032b31fdf943599c842 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Thu, 4 Aug 2022 23:48:32 -0500 Subject: [PATCH 013/311] docs(preview): replace dev server references (#9540) --- docs/config/preview-options.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config/preview-options.md b/docs/config/preview-options.md index 10ec82f38e3848..32589a5091d12b 100644 --- a/docs/config/preview-options.md +++ b/docs/config/preview-options.md @@ -65,7 +65,7 @@ Automatically open the app in the browser on server start. When the value is a s - **Type:** `Record` - **Default:** [`server.proxy`](./server-options#server-proxy) -Configure custom proxy rules for the dev server. Expects an object of `{ key: options }` pairs. If the key starts with `^`, it will be interpreted as a `RegExp`. The `configure` option can be used to access the proxy instance. +Configure custom proxy rules for the preview server. Expects an object of `{ key: options }` pairs. If the key starts with `^`, it will be interpreted as a `RegExp`. The `configure` option can be used to access the proxy instance. Uses [`http-proxy`](https://github.com/http-party/node-http-proxy). Full options [here](https://github.com/http-party/node-http-proxy#options). @@ -74,4 +74,4 @@ Uses [`http-proxy`](https://github.com/http-party/node-http-proxy). Full options - **Type:** `boolean | CorsOptions` - **Default:** [`server.cors`](./server-options#server-cors) -Configure CORS for the dev server. This is enabled by default and allows any origin. Pass an [options object](https://github.com/expressjs/cors) to fine tune the behavior or `false` to disable. +Configure CORS for the preview server. This is enabled by default and allows any origin. Pass an [options object](https://github.com/expressjs/cors) to fine tune the behavior or `false` to disable. From a206f16912c5dfd2c92b5ca35fd641fc4f2506e3 Mon Sep 17 00:00:00 2001 From: Tony Trinh Date: Sat, 6 Aug 2022 03:41:27 -0500 Subject: [PATCH 014/311] docs: set browser meta theme-color (#9556) --- docs/.vitepress/config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index e61c9cc00d6262..3578621b2a0331 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -65,7 +65,8 @@ export default defineConfig({ ['meta', { property: 'og:url', content: ogUrl }], ['meta', { property: 'og:description', content: ogDescription }], ['meta', { name: 'twitter:card', content: 'summary_large_image' }], - ['meta', { name: 'twitter:site', content: '@vite_js' }] + ['meta', { name: 'twitter:site', content: '@vite_js' }], + ['meta', { name: 'theme-color', content: '#646cff' }] ], vue: { From 905b8ebbed1f7616d12018ce451920dc57342cef Mon Sep 17 00:00:00 2001 From: yoho Date: Sun, 7 Aug 2022 15:05:44 +0800 Subject: [PATCH 015/311] chore: init imports var before use (#9569) --- packages/vite/src/node/plugins/importAnalysisBuild.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts index f392cfda538584..dee652387bff3b 100644 --- a/packages/vite/src/node/plugins/importAnalysisBuild.ts +++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts @@ -380,7 +380,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { // dynamic import to constant json may get inlined. if (chunk.type === 'chunk' && chunk.code.indexOf(preloadMarker) > -1) { const code = chunk.code - let imports: ImportSpecifier[] + let imports: ImportSpecifier[] = [] try { imports = parseImports(code)[0].filter((i) => i.d > -1) } catch (e: any) { From c1fa219f7da09d8fca0140c79e62dbce6d54b0e5 Mon Sep 17 00:00:00 2001 From: hemengke <49073282+hemengke1997@users.noreply.github.com> Date: Sun, 7 Aug 2022 20:00:45 +0800 Subject: [PATCH 016/311] fix: log worker plugins in debug mode (#9553) --- packages/vite/src/node/config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index c2a60cb674b5be..ef6f95a487ac14 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -734,7 +734,11 @@ export async function resolveConfig( if (process.env.DEBUG) { debug(`using resolved config: %O`, { ...resolved, - plugins: resolved.plugins.map((p) => p.name) + plugins: resolved.plugins.map((p) => p.name), + worker: { + ...resolved.worker, + plugins: resolved.worker.plugins.map((p) => p.name) + } }) } From d35a1e2b828dfe2ef89bd235b3594b797d9ee7a1 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 8 Aug 2022 20:15:05 +0800 Subject: [PATCH 017/311] fix(config): try catch unlink after load (#9577) --- packages/vite/src/node/config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index ef6f95a487ac14..fa0a25e463b811 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -1039,7 +1039,11 @@ async function loadConfigFromBundledFile( try { return (await dynamicImport(fileUrl)).default } finally { - fs.unlinkSync(fileNameTmp) + try { + fs.unlinkSync(fileNameTmp) + } catch { + // already removed if this function is called twice simultaneously + } } } // for cjs, we can register a custom loader via `_require.extensions` From 65cf7fb70da2cd164bbea4bcc947f07eb2487b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 8 Aug 2022 22:51:15 +0900 Subject: [PATCH 018/311] docs: miscellaneous fixes (#9560) Co-authored-by: Bjorn Lu --- docs/guide/build.md | 6 +++--- docs/guide/features.md | 4 ++-- docs/guide/ssr.md | 4 ++-- docs/guide/troubleshooting.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/guide/build.md b/docs/guide/build.md index 72a4562a25ce2e..bcc840d40cb56a 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -208,7 +208,7 @@ A user may choose to deploy in three different paths: A single static [base](#public-base-path) isn't enough in these scenarios. Vite provides experimental support for advanced base options during build, using `experimental.renderBuiltUrl`. -```js +```ts experimental: { renderBuiltUrl: (filename: string, { hostType: 'js' | 'css' | 'html' }) => { if (hostType === 'js') { @@ -220,9 +220,9 @@ experimental: { } ``` -If the hashed assets and public files aren't deployed together, options for each group can be defined independently using asset `type` included in the third `context` param given to the function. +If the hashed assets and public files aren't deployed together, options for each group can be defined independently using asset `type` included in the second `context` param given to the function. -```js +```ts experimental: { renderBuiltUrl(filename: string, { hostType: 'js' | 'css' | 'html', type: 'public' | 'asset' }) { if (type === 'public') { diff --git a/docs/guide/features.md b/docs/guide/features.md index 2d72adb787ce99..0f69035a71dea5 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -122,8 +122,8 @@ Vite provides first-class Vue support: - Vue 3 SFC support via [@vitejs/plugin-vue](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) - Vue 3 JSX support via [@vitejs/plugin-vue-jsx](https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx) -- Vue 2.7 support via [vitejs/vite-plugin-vue2](https://github.com/vitejs/vite-plugin-vue2) -- Vue <2.7 support via [underfin/vite-plugin-vue2](https://github.com/underfin/vite-plugin-vue2) +- Vue 2.7 support via [@vitejs/plugin-vue2](https://github.com/vitejs/vite-plugin-vue2) +- Vue <2.7 support via [vite-plugin-vue2](https://github.com/underfin/vite-plugin-vue2) ## JSX diff --git a/docs/guide/ssr.md b/docs/guide/ssr.md index 3ff4337aaf4b9f..e0e97ebde0f336 100644 --- a/docs/guide/ssr.md +++ b/docs/guide/ssr.md @@ -211,7 +211,7 @@ If the routes and the data needed for certain routes are known ahead of time, we Dependencies are "externalized" from Vite's SSR transform module system by default when running SSR. This speeds up both dev and build. -If a dependency needs to be transformed by Vite's pipeline, for example, because Vite features are used untranspiled in them, they can be added to [`ssr.noExternal`](../config/ssr-options.md#ssrnoexternal). +If a dependency needs to be transformed by Vite's pipeline, for example, because Vite features are used untranspiled in them, they can be added to [`ssr.noExternal`](../config/ssr-options.md#ssr-noexternal). :::warning Working with Aliases If you have configured aliases that redirects one package to another, you may want to alias the actual `node_modules` packages instead to make it work for SSR externalized dependencies. Both [Yarn](https://classic.yarnpkg.com/en/docs/cli/add/#toc-yarn-add-alias) and [pnpm](https://pnpm.js.org/en/aliases) support aliasing via the `npm:` prefix. @@ -267,4 +267,4 @@ Use a post hook so that your SSR middleware runs _after_ Vite's middlewares. ## SSR Format -By default, Vite generates the SSR bundle in ESM. There is experimental support for configuring `ssr.format`, but it isn't recommended. Future efforts around SSR development will be based on ESM, and commonjs remain available for backward compatibility. If using ESM for SSR isn't possible in your project, you can set `legacy.buildSsrCjsExternalHeuristics: true` to generate a CJS bundle using the same [externalization heuristics of Vite v2](https://v2.vitejs.dev/guide/ssr.html#ssr-externals). +By default, Vite generates the SSR bundle in ESM. There is experimental support for configuring `ssr.format`, but it isn't recommended. Future efforts around SSR development will be based on ESM, and CommonJS remain available for backward compatibility. If using ESM for SSR isn't possible in your project, you can set `legacy.buildSsrCjsExternalHeuristics: true` to generate a CJS bundle using the same [externalization heuristics of Vite v2](https://v2.vitejs.dev/guide/ssr.html#ssr-externals). diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 1021d9e41f04b1..d3587c375411b0 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -8,12 +8,12 @@ If the suggestions here don't work, please try posting questions on [GitHub Disc ### `Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'` -The path to your project folder may include `?`, which doesn't work with `npm` on Windows ([npm/cmd-shim#45](https://github.com/npm/cmd-shim/issues/45)). +The path to your project folder may include `&`, which doesn't work with `npm` on Windows ([npm/cmd-shim#45](https://github.com/npm/cmd-shim/issues/45)). You will need to either: - Switch to another package manager (e.g. `pnpm`, `yarn`) -- Remove `?` from the path to your project +- Remove `&` from the path to your project ## Dev Server From 1f11a70f29de0ca9a88234b4548b73df7e57bc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Mon, 8 Aug 2022 21:58:12 +0800 Subject: [PATCH 019/311] fix: tree-shake modulepreload polyfill (#9531) --- packages/vite/src/node/plugins/modulePreloadPolyfill.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vite/src/node/plugins/modulePreloadPolyfill.ts b/packages/vite/src/node/plugins/modulePreloadPolyfill.ts index 4f0b3389fcc2c3..1799db26c8a9d1 100644 --- a/packages/vite/src/node/plugins/modulePreloadPolyfill.ts +++ b/packages/vite/src/node/plugins/modulePreloadPolyfill.ts @@ -22,8 +22,7 @@ export function modulePreloadPolyfillPlugin(config: ResolvedConfig): Plugin { return '' } if (!polyfillString) { - polyfillString = - `const p = ${polyfill.toString()};` + `${isModernFlag}&&p();` + polyfillString = `${isModernFlag}&&(${polyfill.toString()}());` } return polyfillString } From a6b12f8c4608e945ca21811dce6d94c26cb4d7b6 Mon Sep 17 00:00:00 2001 From: ashish <68690233+asrvd@users.noreply.github.com> Date: Tue, 9 Aug 2022 00:50:54 +0530 Subject: [PATCH 020/311] docs: add git option for netlify deployment (#9526) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tony Trinh Co-authored-by: 翠 / green --- docs/guide/static-deploy.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index 534e77639c5f29..a4bc93178c0884 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -131,6 +131,8 @@ You can also run the above script in your CI setup to enable automatic deploymen ## Netlify +### Netlify CLI + 1. Install the [Netlify CLI](https://cli.netlify.com/). 2. Create a new site using `ntl init`. 3. Deploy using `ntl deploy`. @@ -153,6 +155,16 @@ The Netlify CLI will share with you a preview URL to inspect. When you are ready $ ntl deploy --prod ``` +### Netlify with Git + +1. Push your code to a git repository (GitHub, GitLab, BitBucket, Azure DevOps). +2. [Import the project](https://app.netlify.com/start) to Netlify. +3. Choose the branch, output directory, and set up environment variables if applicable. +4. Click on **Deploy**. +5. Your Vite app is deployed! + +After your project has been imported and deployed, all subsequent pushes to branches other than the production branch along with pull requests will generate [Preview Deployments](https://docs.netlify.com/site-deploys/deploy-previews/), and all changes made to the Production Branch (commonly “main”) will result in a [Production Deployment](https://docs.netlify.com/site-deploys/overview/#definitions). + ## Vercel ### Vercel CLI From dfec6ca71a44098337008f93c5bf5c2f678ed03e Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 9 Aug 2022 03:27:46 +0800 Subject: [PATCH 021/311] fix(ssr): use appendRight for import (#9554) --- .../vite/src/node/ssr/__tests__/ssrTransform.spec.ts | 12 ++++++++++++ packages/vite/src/node/ssr/ssrTransform.ts | 10 ++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts index cc5b19522ef9a5..a4e74390d3d3c2 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -125,6 +125,18 @@ test('export default', async () => { ).toMatchInlineSnapshot(`"__vite_ssr_exports__.default = {}"`) }) +test('export then import minified', async () => { + expect( + await ssrTransformSimpleCode( + `export * from 'vue';import {createApp} from 'vue';` + ) + ).toMatchInlineSnapshot(` + "const __vite_ssr_import_1__ = await __vite_ssr_import__(\\"vue\\"); + __vite_ssr_exportAll__(__vite_ssr_import_1__);const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"vue\\"); + " + `) +}) + test('import.meta', async () => { expect( await ssrTransformSimpleCode(`console.log(import.meta.url)`) diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index 2c38c53e74714e..bf1633395ae992 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -94,7 +94,7 @@ async function ssrTransformScript( function defineImport(node: Node, source: string) { deps.add(source) const importId = `__vite_ssr_import_${uid++}__` - s.appendLeft( + s.appendRight( node.start, `const ${importId} = await ${ssrImportKey}(${JSON.stringify(source)});\n` ) @@ -115,6 +115,7 @@ async function ssrTransformScript( // import { baz } from 'foo' --> baz -> __import_foo__.baz // import * as ok from 'foo' --> ok -> __import_foo__ if (node.type === 'ImportDeclaration') { + s.remove(node.start, node.end) const importId = defineImport(node, node.source.value as string) for (const spec of node.specifiers) { if (spec.type === 'ImportSpecifier') { @@ -129,7 +130,6 @@ async function ssrTransformScript( idToImportMap.set(spec.local.name, importId) } } - s.remove(node.start, node.end) } } @@ -207,13 +207,11 @@ async function ssrTransformScript( // export * from './foo' if (node.type === 'ExportAllDeclaration') { + s.remove(node.start, node.end) + const importId = defineImport(node, node.source.value as string) if (node.exported) { - const importId = defineImport(node, node.source.value as string) - s.remove(node.start, node.end) defineExport(node.end, node.exported.name, `${importId}`) } else { - const importId = defineImport(node, node.source.value as string) - s.remove(node.start, node.end) s.appendLeft(node.end, `${ssrExportAllKey}(${importId});`) } } From 27a20a5fd07c352c2f56b9f1e7a9955f349f0d2f Mon Sep 17 00:00:00 2001 From: metonym Date: Mon, 8 Aug 2022 12:34:47 -0700 Subject: [PATCH 022/311] docs: add Render deployment instructions (#9517) --- docs/guide/static-deploy.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index a4bc93178c0884..138a58b0319dec 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -343,3 +343,26 @@ Install the extension in VS Code and navigate to your app root. Open the Static Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually `/`) and built file location `/dist`. The wizard will run and will create a GitHub action in your repo in a `.github` folder. The action will work to deploy your app (watch its progress in your repo's Actions tab) and, when successfully completed, you can view your app in the address provided in the extension's progress window by clicking the 'Browse Website' button that appears when the GitHub action has run. + +## Render + +You can deploy your Vite app as a Static Site on [Render](https://render.com/). + +1. Create a [Render account](https://dashboard.render.com/register). + +2. In the [Dashboard](https://dashboard.render.com/), click the **New** button and select **Static Site**. + +3. Connect your GitHub/GitLab account or use a public repository. + +4. Specify a project name and branch. + + - **Build Command**: `npm run build` + - **Publish Directory**: `dist` + +5. Click **Create Static Site**. + + Your app should be deployed at `https://.onrender.com/`. + +By default, any new commit pushed to the specified branch will automatically trigger a new deploy. [Auto-Deploy](https://render.com/docs/deploys#toggling-auto-deploy-for-a-service) can be configured in the project settings. + +You can also add a [custom domain](https://render.com/docs/custom-domains) to your project. From 2e309d6dfe742356f434e628f09d9ef8f8c554ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 9 Aug 2022 05:46:31 +0900 Subject: [PATCH 023/311] fix: allow tree-shake glob eager css in js (#9547) --- .../__snapshots__/fixture.test.ts.snap | 60 +++++++++---------- .../vite/src/node/plugins/importMetaGlob.ts | 4 +- .../glob-import/__tests__/glob-import.spec.ts | 24 +++++++- playground/glob-import/index.html | 11 ++++ playground/glob-import/no-tree-shake.css | 3 + playground/glob-import/tree-shake.css | 3 + 6 files changed, 73 insertions(+), 32 deletions(-) create mode 100644 playground/glob-import/no-tree-shake.css create mode 100644 playground/glob-import/tree-shake.css diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap b/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap index 3efbb7a0306f86..6eeb763c4117bd 100644 --- a/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap +++ b/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap @@ -2,43 +2,43 @@ exports[`fixture > transform 1`] = ` "import * as __vite_glob_1_0 from \\"./modules/a.ts\\";import * as __vite_glob_1_1 from \\"./modules/b.ts\\";import * as __vite_glob_1_2 from \\"./modules/index.ts\\";import { name as __vite_glob_3_0 } from \\"./modules/a.ts\\";import { name as __vite_glob_3_1 } from \\"./modules/b.ts\\";import { name as __vite_glob_3_2 } from \\"./modules/index.ts\\";import { default as __vite_glob_5_0 } from \\"./modules/a.ts?raw\\";import { default as __vite_glob_5_1 } from \\"./modules/b.ts?raw\\";import \\"../../../../../../types/importMeta\\"; -export const basic = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); -export const basicEager = Object.assign({\\"./modules/a.ts\\": __vite_glob_1_0,\\"./modules/b.ts\\": __vite_glob_1_1,\\"./modules/index.ts\\": __vite_glob_1_2}); -export const ignore = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\")}); -export const namedEager = Object.assign({\\"./modules/a.ts\\": __vite_glob_3_0,\\"./modules/b.ts\\": __vite_glob_3_1,\\"./modules/index.ts\\": __vite_glob_3_2}); -export const namedDefault = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\").then(m => m[\\"default\\"]),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\").then(m => m[\\"default\\"]),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\").then(m => m[\\"default\\"])}); -export const eagerAs = Object.assign({\\"./modules/a.ts\\": __vite_glob_5_0,\\"./modules/b.ts\\": __vite_glob_5_1}); -export const rawImportModule = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts?raw\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts?raw\\")}); -export const excludeSelf = Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts\\")}); -export const customQueryString = Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?custom\\")}); -export const customQueryObject = Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?foo=bar&raw=true\\")}); -export const parent = Object.assign({}); -export const rootMixedRelative = Object.assign({\\"/css.spec.ts\\": () => import(\\"../../css.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/define.spec.ts\\": () => import(\\"../../define.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/esbuild.spec.ts\\": () => import(\\"../../esbuild.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/import.spec.ts\\": () => import(\\"../../import.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts?url\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts?url\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/index.ts\\": () => import(\\"../fixture-b/index.ts?url\\").then(m => m[\\"default\\"])}); -export const cleverCwd1 = Object.assign({\\"./node_modules/framework/pages/hello.page.js\\": () => import(\\"./node_modules/framework/pages/hello.page.js\\")}); -export const cleverCwd2 = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"../fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts\\"),\\"../fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts\\")}); +export const basic = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); +export const basicEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_1_0,\\"./modules/b.ts\\": __vite_glob_1_1,\\"./modules/index.ts\\": __vite_glob_1_2}); +export const ignore = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\")}); +export const namedEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_3_0,\\"./modules/b.ts\\": __vite_glob_3_1,\\"./modules/index.ts\\": __vite_glob_3_2}); +export const namedDefault = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\").then(m => m[\\"default\\"]),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\").then(m => m[\\"default\\"]),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\").then(m => m[\\"default\\"])}); +export const eagerAs = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_5_0,\\"./modules/b.ts\\": __vite_glob_5_1}); +export const rawImportModule = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts?raw\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts?raw\\")}); +export const excludeSelf = /* #__PURE__ */ Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts\\")}); +export const customQueryString = /* #__PURE__ */ Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?custom\\")}); +export const customQueryObject = /* #__PURE__ */ Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?foo=bar&raw=true\\")}); +export const parent = /* #__PURE__ */ Object.assign({}); +export const rootMixedRelative = /* #__PURE__ */ Object.assign({\\"/css.spec.ts\\": () => import(\\"../../css.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/define.spec.ts\\": () => import(\\"../../define.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/esbuild.spec.ts\\": () => import(\\"../../esbuild.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/import.spec.ts\\": () => import(\\"../../import.spec.ts?url\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts?url\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts?url\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/index.ts\\": () => import(\\"../fixture-b/index.ts?url\\").then(m => m[\\"default\\"])}); +export const cleverCwd1 = /* #__PURE__ */ Object.assign({\\"./node_modules/framework/pages/hello.page.js\\": () => import(\\"./node_modules/framework/pages/hello.page.js\\")}); +export const cleverCwd2 = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"../fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts\\"),\\"../fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts\\")}); " `; exports[`fixture > transform with restoreQueryExtension 1`] = ` "import * as __vite_glob_1_0 from \\"./modules/a.ts\\";import * as __vite_glob_1_1 from \\"./modules/b.ts\\";import * as __vite_glob_1_2 from \\"./modules/index.ts\\";import { name as __vite_glob_3_0 } from \\"./modules/a.ts\\";import { name as __vite_glob_3_1 } from \\"./modules/b.ts\\";import { name as __vite_glob_3_2 } from \\"./modules/index.ts\\";import { default as __vite_glob_5_0 } from \\"./modules/a.ts?raw\\";import { default as __vite_glob_5_1 } from \\"./modules/b.ts?raw\\";import \\"../../../../../../types/importMeta\\"; -export const basic = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); -export const basicEager = Object.assign({\\"./modules/a.ts\\": __vite_glob_1_0,\\"./modules/b.ts\\": __vite_glob_1_1,\\"./modules/index.ts\\": __vite_glob_1_2}); -export const ignore = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\")}); -export const namedEager = Object.assign({\\"./modules/a.ts\\": __vite_glob_3_0,\\"./modules/b.ts\\": __vite_glob_3_1,\\"./modules/index.ts\\": __vite_glob_3_2}); -export const namedDefault = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\").then(m => m[\\"default\\"]),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\").then(m => m[\\"default\\"]),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\").then(m => m[\\"default\\"])}); -export const eagerAs = Object.assign({\\"./modules/a.ts\\": __vite_glob_5_0,\\"./modules/b.ts\\": __vite_glob_5_1}); -export const rawImportModule = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts?raw\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts?raw\\")}); -export const excludeSelf = Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts\\")}); -export const customQueryString = Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?custom&lang.ts\\")}); -export const customQueryObject = Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?foo=bar&raw=true&lang.ts\\")}); -export const parent = Object.assign({}); -export const rootMixedRelative = Object.assign({\\"/css.spec.ts\\": () => import(\\"../../css.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/define.spec.ts\\": () => import(\\"../../define.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/esbuild.spec.ts\\": () => import(\\"../../esbuild.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/import.spec.ts\\": () => import(\\"../../import.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/index.ts\\": () => import(\\"../fixture-b/index.ts?url&lang.ts\\").then(m => m[\\"default\\"])}); -export const cleverCwd1 = Object.assign({\\"./node_modules/framework/pages/hello.page.js\\": () => import(\\"./node_modules/framework/pages/hello.page.js\\")}); -export const cleverCwd2 = Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"../fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts\\"),\\"../fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts\\")}); +export const basic = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); +export const basicEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_1_0,\\"./modules/b.ts\\": __vite_glob_1_1,\\"./modules/index.ts\\": __vite_glob_1_2}); +export const ignore = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\")}); +export const namedEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_3_0,\\"./modules/b.ts\\": __vite_glob_3_1,\\"./modules/index.ts\\": __vite_glob_3_2}); +export const namedDefault = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\").then(m => m[\\"default\\"]),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\").then(m => m[\\"default\\"]),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\").then(m => m[\\"default\\"])}); +export const eagerAs = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_5_0,\\"./modules/b.ts\\": __vite_glob_5_1}); +export const rawImportModule = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts?raw\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts?raw\\")}); +export const excludeSelf = /* #__PURE__ */ Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts\\")}); +export const customQueryString = /* #__PURE__ */ Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?custom&lang.ts\\")}); +export const customQueryObject = /* #__PURE__ */ Object.assign({\\"./sibling.ts\\": () => import(\\"./sibling.ts?foo=bar&raw=true&lang.ts\\")}); +export const parent = /* #__PURE__ */ Object.assign({}); +export const rootMixedRelative = /* #__PURE__ */ Object.assign({\\"/css.spec.ts\\": () => import(\\"../../css.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/define.spec.ts\\": () => import(\\"../../define.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/esbuild.spec.ts\\": () => import(\\"../../esbuild.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/import.spec.ts\\": () => import(\\"../../import.spec.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts?url&lang.ts\\").then(m => m[\\"default\\"]),\\"/importGlob/fixture-b/index.ts\\": () => import(\\"../fixture-b/index.ts?url&lang.ts\\").then(m => m[\\"default\\"])}); +export const cleverCwd1 = /* #__PURE__ */ Object.assign({\\"./node_modules/framework/pages/hello.page.js\\": () => import(\\"./node_modules/framework/pages/hello.page.js\\")}); +export const cleverCwd2 = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"../fixture-b/a.ts\\": () => import(\\"../fixture-b/a.ts\\"),\\"../fixture-b/b.ts\\": () => import(\\"../fixture-b/b.ts\\")}); " `; exports[`fixture > virtual modules 1`] = ` -"Object.assign({\\"/modules/a.ts\\": () => import(\\"/modules/a.ts\\"),\\"/modules/b.ts\\": () => import(\\"/modules/b.ts\\"),\\"/modules/index.ts\\": () => import(\\"/modules/index.ts\\")}) -Object.assign({\\"/../fixture-b/a.ts\\": () => import(\\"/../fixture-b/a.ts\\"),\\"/../fixture-b/b.ts\\": () => import(\\"/../fixture-b/b.ts\\"),\\"/../fixture-b/index.ts\\": () => import(\\"/../fixture-b/index.ts\\")})" +"/* #__PURE__ */ Object.assign({\\"/modules/a.ts\\": () => import(\\"/modules/a.ts\\"),\\"/modules/b.ts\\": () => import(\\"/modules/b.ts\\"),\\"/modules/index.ts\\": () => import(\\"/modules/index.ts\\")}) +/* #__PURE__ */ Object.assign({\\"/../fixture-b/a.ts\\": () => import(\\"/../fixture-b/a.ts\\"),\\"/../fixture-b/b.ts\\": () => import(\\"/../fixture-b/b.ts\\"),\\"/../fixture-b/index.ts\\": () => import(\\"/../fixture-b/index.ts\\")})" `; diff --git a/packages/vite/src/node/plugins/importMetaGlob.ts b/packages/vite/src/node/plugins/importMetaGlob.ts index aef833e3879888..f5b81005e446fa 100644 --- a/packages/vite/src/node/plugins/importMetaGlob.ts +++ b/packages/vite/src/node/plugins/importMetaGlob.ts @@ -438,7 +438,9 @@ export async function transformGlobImport( files.forEach((i) => matchedFiles.add(i)) - const replacement = `Object.assign({${objectProps.join(',')}})` + const replacement = `/* #__PURE__ */ Object.assign({${objectProps.join( + ',' + )}})` s.overwrite(start, end, replacement) return staticImports diff --git a/playground/glob-import/__tests__/glob-import.spec.ts b/playground/glob-import/__tests__/glob-import.spec.ts index 27c8dd716d0358..fb1cb867358549 100644 --- a/playground/glob-import/__tests__/glob-import.spec.ts +++ b/playground/glob-import/__tests__/glob-import.spec.ts @@ -1,4 +1,13 @@ -import { addFile, editFile, isBuild, page, removeFile, withRetry } from '~utils' +import { + addFile, + editFile, + findAssetFile, + getColor, + isBuild, + page, + removeFile, + withRetry +} from '~utils' const filteredResult = { './alias.js': { @@ -158,3 +167,16 @@ if (!isBuild) { }) }) } + +test('tree-shake eager css', async () => { + expect(await getColor('.tree-shake-eager-css')).toBe('orange') + expect(await getColor('.no-tree-shake-eager-css')).toBe('orange') + expect(await page.textContent('.no-tree-shake-eager-css-result')).toMatch( + '.no-tree-shake-eager-css' + ) + + if (isBuild) { + const content = findAssetFile(/index\.\w+\.js/) + expect(content).not.toMatch('.tree-shake-eager-css') + } +}) diff --git a/playground/glob-import/index.html b/playground/glob-import/index.html index a0ac2d866699ae..85e9e98d2c5ae7 100644 --- a/playground/glob-import/index.html +++ b/playground/glob-import/index.html @@ -13,6 +13,10 @@

Relative raw


 

Side effect


+

Tree shake Eager CSS

+

Should be orange

+

Should be orange

+

 
 
 
+
+
diff --git a/playground/glob-import/no-tree-shake.css b/playground/glob-import/no-tree-shake.css
new file mode 100644
index 00000000000000..9075733e138c5a
--- /dev/null
+++ b/playground/glob-import/no-tree-shake.css
@@ -0,0 +1,3 @@
+.no-tree-shake-eager-css {
+  color: orange;
+}
diff --git a/playground/glob-import/tree-shake.css b/playground/glob-import/tree-shake.css
new file mode 100644
index 00000000000000..84f24297e4efce
--- /dev/null
+++ b/playground/glob-import/tree-shake.css
@@ -0,0 +1,3 @@
+.tree-shake-eager-css {
+  color: orange;
+}

From 4e9bdd4fb3654a9d43917e1cb682d3d2bad25115 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0=20/=20green?= 
Date: Tue, 9 Aug 2022 06:43:26 +0900
Subject: [PATCH 024/311] test: mix tests refactoring (#9516)

---
 playground/ssr-deps/read-file-content/index.js | 5 +----
 playground/ssr-webworker/package.json          | 3 ++-
 playground/ssr-webworker/src/entry-worker.jsx  | 4 +++-
 pnpm-lock.yaml                                 | 2 ++
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/playground/ssr-deps/read-file-content/index.js b/playground/ssr-deps/read-file-content/index.js
index 4cc6c34972defa..03b2e199b61f52 100644
--- a/playground/ssr-deps/read-file-content/index.js
+++ b/playground/ssr-deps/read-file-content/index.js
@@ -1,9 +1,6 @@
 const path = require('node:path')
 
 module.exports = async function readFileContent(filePath) {
-  const fs =
-    process.versions.node.split('.')[0] >= '14'
-      ? require('node:fs/promises')
-      : require('node:fs').promises
+  const fs = require('node:fs/promises')
   return await fs.readFile(path.resolve(filePath), 'utf-8')
 }
diff --git a/playground/ssr-webworker/package.json b/playground/ssr-webworker/package.json
index 66fdc8b7afaa99..9f6c8c00534eab 100644
--- a/playground/ssr-webworker/package.json
+++ b/playground/ssr-webworker/package.json
@@ -4,13 +4,14 @@
   "version": "0.0.0",
   "type": "module",
   "scripts": {
-    "dev": "DEV=1 node worker",
+    "dev": "cross-env DEV=1 node worker",
     "build:worker": "vite build --ssr src/entry-worker.jsx --outDir dist/worker"
   },
   "dependencies": {
     "react": "^18.2.0"
   },
   "devDependencies": {
+    "cross-env": "^7.0.3",
     "miniflare": "^1.4.1",
     "resolve-linked": "workspace:*"
   }
diff --git a/playground/ssr-webworker/src/entry-worker.jsx b/playground/ssr-webworker/src/entry-worker.jsx
index 940d0d2943d632..750926653f9e31 100644
--- a/playground/ssr-webworker/src/entry-worker.jsx
+++ b/playground/ssr-webworker/src/entry-worker.jsx
@@ -1,8 +1,9 @@
 import { msg as linkedMsg } from 'resolve-linked'
 import React from 'react'
 
+let loaded = false
 import('./dynamic').then(({ foo }) => {
-  console.log(foo)
+  loaded = !!foo
 })
 
 addEventListener('fetch', function (event) {
@@ -12,6 +13,7 @@ addEventListener('fetch', function (event) {
     

hello from webworker

${linkedMsg}

${typeof React}

+

dynamic: ${loaded}

`, { headers: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b00d19680be01..9204c91c20f944 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1090,12 +1090,14 @@ importers: playground/ssr-webworker: specifiers: + cross-env: ^7.0.3 miniflare: ^1.4.1 react: ^18.2.0 resolve-linked: workspace:* dependencies: react: 18.2.0 devDependencies: + cross-env: 7.0.3 miniflare: 1.4.1 resolve-linked: link:../resolve-linked From 2042b91d7c8125ce39e2f140bbf06032272ee072 Mon Sep 17 00:00:00 2001 From: sagargurtu Date: Mon, 8 Aug 2022 20:58:11 -0700 Subject: [PATCH 025/311] refactor(resolve): remove commonjs plugin handling (#9460) --- packages/vite/src/node/plugins/resolve.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index 5363e6a4c246eb..16601297f85dac 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -115,11 +115,6 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { return id } - // fast path for commonjs proxy modules - if (/\?commonjs/.test(id) || id === 'commonjsHelpers.js') { - return - } - const targetWeb = !ssr || ssrTarget === 'webworker' // this is passed by @rollup/plugin-commonjs From 80713256d0dd5716e42086fb617e96e9e92c3675 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 07:05:21 +0200 Subject: [PATCH 026/311] fix(deps): update all non-major dependencies (#9575) --- package.json | 16 +- .../template-preact-ts/package.json | 2 +- .../create-vite/template-preact/package.json | 2 +- .../template-react-ts/package.json | 2 +- .../create-vite/template-react/package.json | 2 +- .../create-vite/template-vue-ts/package.json | 2 +- packages/plugin-legacy/package.json | 4 +- packages/plugin-react/package.json | 4 +- packages/plugin-vue-jsx/package.json | 4 +- packages/vite/package.json | 14 +- playground/backend-integration/package.json | 4 +- playground/css-sourcemap/package.json | 2 +- playground/css/package.json | 2 +- playground/multiple-entrypoints/package.json | 2 +- playground/resolve/package.json | 2 +- .../package.json | 2 +- playground/tailwind-sourcemap/package.json | 2 +- playground/tailwind/package.json | 2 +- playground/vue-sourcemap/package.json | 2 +- playground/vue/package.json | 2 +- pnpm-lock.yaml | 765 ++++++++++-------- 21 files changed, 444 insertions(+), 395 deletions(-) diff --git a/package.json b/package.json index d5e656455da117..8c0f9a07e76a9a 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "ci-docs": "run-s build docs-build" }, "devDependencies": { - "@babel/types": "^7.18.9", - "@microsoft/api-extractor": "^7.28.7", + "@babel/types": "^7.18.10", + "@microsoft/api-extractor": "^7.29.0", "@rollup/plugin-typescript": "^8.3.4", "@types/babel__core": "^7.1.19", "@types/babel__standalone": "^7.1.4", @@ -57,8 +57,8 @@ "@types/semver": "^7.3.10", "@types/stylus": "^0.48.38", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.31.0", - "@typescript-eslint/parser": "^5.31.0", + "@typescript-eslint/eslint-plugin": "^5.33.0", + "@typescript-eslint/parser": "^5.33.0", "conventional-changelog-cli": "^2.2.2", "cross-env": "^7.0.3", "esbuild": "^0.14.47", @@ -73,7 +73,7 @@ "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", "playwright-chromium": "^1.24.2", - "pnpm": "^7.8.0", + "pnpm": "^7.9.0", "prettier": "2.7.1", "prompts": "^2.4.2", "rimraf": "^3.0.2", @@ -81,12 +81,12 @@ "semver": "^7.3.7", "simple-git-hooks": "^2.8.0", "tslib": "^2.4.0", - "tsx": "^3.8.0", + "tsx": "^3.8.1", "typescript": "^4.6.4", "unbuild": "^0.7.6", "vite": "workspace:*", "vitepress": "^1.0.0-alpha.4", - "vitest": "^0.20.2", + "vitest": "^0.21.0", "vue": "^3.2.37" }, "simple-git-hooks": { @@ -107,7 +107,7 @@ "eslint --cache --fix" ] }, - "packageManager": "pnpm@7.8.0", + "packageManager": "pnpm@7.9.0", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index 736219910d9c1e..e1ae15f916a043 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.10.0" + "preact": "^10.10.1" }, "devDependencies": { "@preact/preset-vite": "^2.3.0", diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index 43d5b2d1b8c6bc..12c3ce5fecf886 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.10.0" + "preact": "^10.10.1" }, "devDependencies": { "@preact/preset-vite": "^2.3.0", diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 8d421e08a5619a..351b52bf625d6f 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.0.15", + "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.0.0", "typescript": "^4.6.4", diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index bcdf162cbc9b9b..b7768fa54c5a11 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.0.15", + "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.0.0", "vite": "^3.0.4" diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index ec71916a963033..b3f1796eef7d4f 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -15,6 +15,6 @@ "@vitejs/plugin-vue": "^3.0.1", "typescript": "^4.6.4", "vite": "^3.0.4", - "vue-tsc": "^0.39.4" + "vue-tsc": "^0.39.5" } } diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 145a79e5574e86..c56fa3ff806c93 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", "dependencies": { - "@babel/standalone": "^7.18.9", + "@babel/standalone": "^7.18.12", "core-js": "^3.24.1", "magic-string": "^0.26.2", "regenerator-runtime": "^0.13.9", @@ -46,7 +46,7 @@ "vite": "^3.0.0" }, "devDependencies": { - "@babel/core": "^7.18.9", + "@babel/core": "^7.18.10", "vite": "workspace:*" } } diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index 47a97b5ef612a9..331ad2ee1bdedd 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -39,8 +39,8 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-react#readme", "dependencies": { - "@babel/core": "^7.18.9", - "@babel/plugin-transform-react-jsx": "^7.18.6", + "@babel/core": "^7.18.10", + "@babel/plugin-transform-react-jsx": "^7.18.10", "@babel/plugin-transform-react-jsx-development": "^7.18.6", "@babel/plugin-transform-react-jsx-self": "^7.18.6", "@babel/plugin-transform-react-jsx-source": "^7.18.6", diff --git a/packages/plugin-vue-jsx/package.json b/packages/plugin-vue-jsx/package.json index aadc2f5aa25e7c..39eba505c6d54e 100644 --- a/packages/plugin-vue-jsx/package.json +++ b/packages/plugin-vue-jsx/package.json @@ -35,9 +35,9 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx#readme", "dependencies": { - "@babel/core": "^7.18.9", + "@babel/core": "^7.18.10", "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-transform-typescript": "^7.18.8", + "@babel/plugin-transform-typescript": "^7.18.12", "@vue/babel-plugin-jsx": "^1.1.1" }, "devDependencies": { diff --git a/packages/vite/package.json b/packages/vite/package.json index 199b53d81ce30a..fa53fc2c44efc0 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -59,7 +59,7 @@ "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!", "dependencies": { "esbuild": "^0.14.47", - "postcss": "^8.4.14", + "postcss": "^8.4.16", "resolve": "^1.22.1", "rollup": "^2.75.6" }, @@ -68,12 +68,12 @@ }, "devDependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/parser": "^7.18.9", - "@babel/types": "^7.18.9", + "@babel/parser": "^7.18.11", + "@babel/types": "^7.18.10", "@jridgewell/trace-mapping": "^0.3.14", "@rollup/plugin-alias": "^3.1.9", - "@rollup/plugin-commonjs": "^22.0.1", - "@rollup/plugin-dynamic-import-vars": "^1.4.3", + "@rollup/plugin-commonjs": "^22.0.2", + "@rollup/plugin-dynamic-import-vars": "^1.4.4", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "13.3.0", "@rollup/plugin-typescript": "^8.3.4", @@ -96,10 +96,10 @@ "fast-glob": "^3.2.11", "http-proxy": "^1.18.1", "json5": "^2.2.1", - "launch-editor-middleware": "^2.4.0", + "launch-editor-middleware": "^2.5.0", "magic-string": "^0.26.2", "micromatch": "^4.0.5", - "mlly": "^0.5.5", + "mlly": "^0.5.7", "mrmime": "^1.0.1", "okie": "^1.0.1", "open": "^8.4.0", diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json index cc4a5f4aad5df7..3866167c21d833 100644 --- a/playground/backend-integration/package.json +++ b/playground/backend-integration/package.json @@ -9,8 +9,8 @@ "preview": "vite preview" }, "devDependencies": { - "sass": "^1.54.0", - "tailwindcss": "^3.1.7", + "sass": "^1.54.3", + "tailwindcss": "^3.1.8", "fast-glob": "^3.2.11" } } diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index 6e348c6e1e1e49..ca7a97598326fd 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -11,7 +11,7 @@ "devDependencies": { "less": "^4.1.3", "magic-string": "^0.26.2", - "sass": "^1.54.0", + "sass": "^1.54.3", "stylus": "^0.58.1" } } diff --git a/playground/css/package.json b/playground/css/package.json index 69314f8867c9c8..ab2a5e119d48f2 100644 --- a/playground/css/package.json +++ b/playground/css/package.json @@ -17,7 +17,7 @@ "fast-glob": "^3.2.11", "less": "^4.1.3", "postcss-nested": "^5.0.6", - "sass": "^1.54.0", + "sass": "^1.54.3", "stylus": "^0.58.1" } } diff --git a/playground/multiple-entrypoints/package.json b/playground/multiple-entrypoints/package.json index 4167908e596aed..6ff2132e5d4f48 100644 --- a/playground/multiple-entrypoints/package.json +++ b/playground/multiple-entrypoints/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "fast-glob": "^3.2.11", - "sass": "^1.54.0" + "sass": "^1.54.3" } } diff --git a/playground/resolve/package.json b/playground/resolve/package.json index 7e23450bf63ee8..6bdf7544a99c8d 100644 --- a/playground/resolve/package.json +++ b/playground/resolve/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@babel/runtime": "^7.18.9", - "es5-ext": "0.10.61", + "es5-ext": "0.10.62", "normalize.css": "^8.0.1", "require-pkg-with-module-field": "link:./require-pkg-with-module-field", "resolve-browser-field": "link:./browser-field", diff --git a/playground/resolve/require-pkg-with-module-field/package.json b/playground/resolve/require-pkg-with-module-field/package.json index e409343a7567d5..855e5cca61f37d 100644 --- a/playground/resolve/require-pkg-with-module-field/package.json +++ b/playground/resolve/require-pkg-with-module-field/package.json @@ -4,6 +4,6 @@ "version": "1.0.0", "main": "./index.cjs", "dependencies": { - "bignumber.js": "9.0.2" + "bignumber.js": "9.1.0" } } diff --git a/playground/tailwind-sourcemap/package.json b/playground/tailwind-sourcemap/package.json index 648b657482e5d5..5a4ca8bb2ac748 100644 --- a/playground/tailwind-sourcemap/package.json +++ b/playground/tailwind-sourcemap/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "tailwindcss": "^3.1.7" + "tailwindcss": "^3.1.8" } } diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json index b3d50a6df45515..6b8de729f2effc 100644 --- a/playground/tailwind/package.json +++ b/playground/tailwind/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "autoprefixer": "^10.4.8", - "tailwindcss": "^3.1.7", + "tailwindcss": "^3.1.8", "vue": "^3.2.37", "vue-router": "^4.1.3" }, diff --git a/playground/vue-sourcemap/package.json b/playground/vue-sourcemap/package.json index 5d5e5b24bfb111..b6d8d451301499 100644 --- a/playground/vue-sourcemap/package.json +++ b/playground/vue-sourcemap/package.json @@ -12,7 +12,7 @@ "@vitejs/plugin-vue": "workspace:*", "less": "^4.1.3", "postcss-nested": "^5.0.6", - "sass": "^1.54.0" + "sass": "^1.54.3" }, "dependencies": { "vue": "^3.2.37" diff --git a/playground/vue/package.json b/playground/vue/package.json index c6c4f5b2b39abc..d3d089b379f295 100644 --- a/playground/vue/package.json +++ b/playground/vue/package.json @@ -17,7 +17,7 @@ "js-yaml": "^4.1.0", "less": "^4.1.3", "pug": "^3.0.2", - "sass": "^1.54.0", + "sass": "^1.54.3", "stylus": "^0.58.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9204c91c20f944..72a73e224d09ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,8 +10,8 @@ importers: .: specifiers: - '@babel/types': ^7.18.9 - '@microsoft/api-extractor': ^7.28.7 + '@babel/types': ^7.18.10 + '@microsoft/api-extractor': ^7.29.0 '@rollup/plugin-typescript': ^8.3.4 '@types/babel__core': ^7.1.19 '@types/babel__standalone': ^7.1.4 @@ -31,8 +31,8 @@ importers: '@types/semver': ^7.3.10 '@types/stylus': ^0.48.38 '@types/ws': ^8.5.3 - '@typescript-eslint/eslint-plugin': ^5.31.0 - '@typescript-eslint/parser': ^5.31.0 + '@typescript-eslint/eslint-plugin': ^5.33.0 + '@typescript-eslint/parser': ^5.33.0 conventional-changelog-cli: ^2.2.2 cross-env: ^7.0.3 esbuild: ^0.14.47 @@ -47,7 +47,7 @@ importers: npm-run-all: ^4.1.5 picocolors: ^1.0.0 playwright-chromium: ^1.24.2 - pnpm: ^7.8.0 + pnpm: ^7.9.0 prettier: 2.7.1 prompts: ^2.4.2 rimraf: ^3.0.2 @@ -55,16 +55,16 @@ importers: semver: ^7.3.7 simple-git-hooks: ^2.8.0 tslib: ^2.4.0 - tsx: ^3.8.0 + tsx: ^3.8.1 typescript: ^4.6.4 unbuild: ^0.7.6 vite: workspace:* vitepress: ^1.0.0-alpha.4 - vitest: ^0.20.2 + vitest: ^0.21.0 vue: ^3.2.37 devDependencies: - '@babel/types': 7.18.9 - '@microsoft/api-extractor': 7.28.7 + '@babel/types': 7.18.10 + '@microsoft/api-extractor': 7.29.0 '@rollup/plugin-typescript': 8.3.4_uct5nfewsakxkk4livyn3qaf3e '@types/babel__core': 7.1.19 '@types/babel__standalone': 7.1.4 @@ -84,14 +84,14 @@ importers: '@types/semver': 7.3.10 '@types/stylus': 0.48.38 '@types/ws': 8.5.3 - '@typescript-eslint/eslint-plugin': 5.31.0_47ooyv4whyi5jcher5bzfc7xvi - '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/eslint-plugin': 5.33.0_y4zvvqz4rccbgvlojt5544lsha + '@typescript-eslint/parser': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 esbuild: 0.14.47 eslint: 8.21.0 eslint-define-config: 1.6.0 - eslint-plugin-import: 2.26.0_eygs4xj346vriqwkjbwjuyviaa + eslint-plugin-import: 2.26.0_qfqnhzzittf54udqwes54xx65q eslint-plugin-node: 11.1.0_eslint@8.21.0 execa: 6.1.0 fs-extra: 10.1.0 @@ -100,7 +100,7 @@ importers: npm-run-all: 4.1.5 picocolors: 1.0.0 playwright-chromium: 1.24.2 - pnpm: 7.8.0 + pnpm: 7.9.0 prettier: 2.7.1 prompts: 2.4.2 rimraf: 3.0.2 @@ -108,12 +108,12 @@ importers: semver: 7.3.7 simple-git-hooks: 2.8.0 tslib: 2.4.0 - tsx: 3.8.0 + tsx: 3.8.1 typescript: 4.6.4 unbuild: 0.7.6 vite: link:packages/vite vitepress: 1.0.0-alpha.4 - vitest: 0.20.2 + vitest: 0.21.0 vue: 3.2.37 packages/create-vite: @@ -128,27 +128,27 @@ importers: packages/plugin-legacy: specifiers: - '@babel/core': ^7.18.9 - '@babel/standalone': ^7.18.9 + '@babel/core': ^7.18.10 + '@babel/standalone': ^7.18.12 core-js: ^3.24.1 magic-string: ^0.26.2 regenerator-runtime: ^0.13.9 systemjs: ^6.12.1 vite: workspace:* dependencies: - '@babel/standalone': 7.18.9 + '@babel/standalone': 7.18.12 core-js: 3.24.1 magic-string: 0.26.2 regenerator-runtime: 0.13.9 systemjs: 6.12.1 devDependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 vite: link:../vite packages/plugin-react: specifiers: - '@babel/core': ^7.18.9 - '@babel/plugin-transform-react-jsx': ^7.18.6 + '@babel/core': ^7.18.10 + '@babel/plugin-transform-react-jsx': ^7.18.10 '@babel/plugin-transform-react-jsx-development': ^7.18.6 '@babel/plugin-transform-react-jsx-self': ^7.18.6 '@babel/plugin-transform-react-jsx-source': ^7.18.6 @@ -156,11 +156,11 @@ importers: react-refresh: ^0.14.0 vite: workspace:* dependencies: - '@babel/core': 7.18.9 - '@babel/plugin-transform-react-jsx': 7.18.6_@babel+core@7.18.9 - '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.18.9 - '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.18.9 - '@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.18.9 + '@babel/core': 7.18.10 + '@babel/plugin-transform-react-jsx': 7.18.10_@babel+core@7.18.10 + '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.18.10 + '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.18.10 + '@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.18.10 magic-string: 0.26.2 react-refresh: 0.14.0 devDependencies: @@ -188,28 +188,28 @@ importers: packages/plugin-vue-jsx: specifiers: - '@babel/core': ^7.18.9 + '@babel/core': ^7.18.10 '@babel/plugin-syntax-import-meta': ^7.10.4 - '@babel/plugin-transform-typescript': ^7.18.8 + '@babel/plugin-transform-typescript': ^7.18.12 '@vue/babel-plugin-jsx': ^1.1.1 vite: workspace:* dependencies: - '@babel/core': 7.18.9 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.18.9 - '@babel/plugin-transform-typescript': 7.18.8_@babel+core@7.18.9 - '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.18.9 + '@babel/core': 7.18.10 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.18.10 + '@babel/plugin-transform-typescript': 7.18.12_@babel+core@7.18.10 + '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.18.10 devDependencies: vite: link:../vite packages/vite: specifiers: '@ampproject/remapping': ^2.2.0 - '@babel/parser': ^7.18.9 - '@babel/types': ^7.18.9 + '@babel/parser': ^7.18.11 + '@babel/types': ^7.18.10 '@jridgewell/trace-mapping': ^0.3.14 '@rollup/plugin-alias': ^3.1.9 - '@rollup/plugin-commonjs': ^22.0.1 - '@rollup/plugin-dynamic-import-vars': ^1.4.3 + '@rollup/plugin-commonjs': ^22.0.2 + '@rollup/plugin-dynamic-import-vars': ^1.4.4 '@rollup/plugin-json': ^4.1.0 '@rollup/plugin-node-resolve': 13.3.0 '@rollup/plugin-typescript': ^8.3.4 @@ -234,16 +234,16 @@ importers: fsevents: ~2.3.2 http-proxy: ^1.18.1 json5: ^2.2.1 - launch-editor-middleware: ^2.4.0 + launch-editor-middleware: ^2.5.0 magic-string: ^0.26.2 micromatch: ^4.0.5 - mlly: ^0.5.5 + mlly: ^0.5.7 mrmime: ^1.0.1 okie: ^1.0.1 open: ^8.4.0 periscopic: ^3.0.4 picocolors: ^1.0.0 - postcss: ^8.4.14 + postcss: ^8.4.16 postcss-import: ^14.1.0 postcss-load-config: ^4.0.1 postcss-modules: ^4.3.1 @@ -263,19 +263,19 @@ importers: ws: ^8.8.1 dependencies: esbuild: 0.14.47 - postcss: 8.4.14 + postcss: 8.4.16 resolve: 1.22.1 rollup: 2.75.6 optionalDependencies: fsevents: 2.3.2 devDependencies: '@ampproject/remapping': 2.2.0 - '@babel/parser': 7.18.9 - '@babel/types': 7.18.9 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 '@jridgewell/trace-mapping': 0.3.14 '@rollup/plugin-alias': 3.1.9_rollup@2.75.6 - '@rollup/plugin-commonjs': 22.0.1_rollup@2.75.6 - '@rollup/plugin-dynamic-import-vars': 1.4.3_rollup@2.75.6 + '@rollup/plugin-commonjs': 22.0.2_rollup@2.75.6 + '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.75.6 '@rollup/plugin-json': 4.1.0_rollup@2.75.6 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.75.6 '@rollup/plugin-typescript': 8.3.4_rollup@2.75.6+tslib@2.4.0 @@ -298,18 +298,18 @@ importers: fast-glob: 3.2.11 http-proxy: 1.18.1_debug@4.3.4 json5: 2.2.1 - launch-editor-middleware: 2.4.0 + launch-editor-middleware: 2.5.0 magic-string: 0.26.2 micromatch: 4.0.5 - mlly: 0.5.5 + mlly: 0.5.7 mrmime: 1.0.1 okie: 1.0.1 open: 8.4.0 periscopic: 3.0.4 picocolors: 1.0.0 - postcss-import: 14.1.0_postcss@8.4.14 - postcss-load-config: 4.0.1_postcss@8.4.14 - postcss-modules: 4.3.1_postcss@8.4.14 + postcss-import: 14.1.0_postcss@8.4.16 + postcss-load-config: 4.0.1_postcss@8.4.16 + postcss-modules: 4.3.1_postcss@8.4.16 resolve.exports: 1.1.0 rollup-plugin-license: 2.8.1_rollup@2.75.6 sirv: 2.0.2 @@ -359,12 +359,12 @@ importers: playground/backend-integration: specifiers: fast-glob: ^3.2.11 - sass: ^1.54.0 - tailwindcss: ^3.1.7 + sass: ^1.54.3 + tailwindcss: ^3.1.8 devDependencies: fast-glob: 3.2.11 - sass: 1.54.0 - tailwindcss: 3.1.7 + sass: 1.54.3 + tailwindcss: 3.1.8 playground/build-old: specifiers: {} @@ -382,7 +382,7 @@ importers: fast-glob: ^3.2.11 less: ^4.1.3 postcss-nested: ^5.0.6 - sass: ^1.54.0 + sass: ^1.54.3 stylus: ^0.58.1 devDependencies: css-dep: link:css-dep @@ -390,7 +390,7 @@ importers: fast-glob: 3.2.11 less: 4.1.3 postcss-nested: 5.0.6 - sass: 1.54.0 + sass: 1.54.3 stylus: 0.58.1 playground/css-codesplit: @@ -403,12 +403,12 @@ importers: specifiers: less: ^4.1.3 magic-string: ^0.26.2 - sass: ^1.54.0 + sass: ^1.54.3 stylus: ^0.58.1 devDependencies: less: 4.1.3 magic-string: 0.26.2 - sass: 1.54.0 + sass: 1.54.3 stylus: 0.58.1 playground/css/css-dep: @@ -556,10 +556,10 @@ importers: playground/multiple-entrypoints: specifiers: fast-glob: ^3.2.11 - sass: ^1.54.0 + sass: ^1.54.3 devDependencies: fast-glob: 3.2.11 - sass: 1.54.0 + sass: 1.54.3 playground/nested-deps: specifiers: @@ -841,7 +841,7 @@ importers: playground/resolve: specifiers: '@babel/runtime': ^7.18.9 - es5-ext: 0.10.61 + es5-ext: 0.10.62 normalize.css: ^8.0.1 require-pkg-with-module-field: link:./require-pkg-with-module-field resolve-browser-field: link:./browser-field @@ -852,7 +852,7 @@ importers: resolve-linked: workspace:* dependencies: '@babel/runtime': 7.18.9 - es5-ext: 0.10.61 + es5-ext: 0.10.62 normalize.css: 8.0.1 require-pkg-with-module-field: link:require-pkg-with-module-field resolve-browser-field: link:browser-field @@ -888,9 +888,9 @@ importers: playground/resolve/require-pkg-with-module-field: specifiers: - bignumber.js: 9.0.2 + bignumber.js: 9.1.0 dependencies: - bignumber.js: 9.0.2 + bignumber.js: 9.1.0 playground/ssr-deps: specifiers: @@ -1105,13 +1105,13 @@ importers: specifiers: '@vitejs/plugin-vue': workspace:* autoprefixer: ^10.4.8 - tailwindcss: ^3.1.7 + tailwindcss: ^3.1.8 ts-node: ^10.9.1 vue: ^3.2.37 vue-router: ^4.1.3 dependencies: autoprefixer: 10.4.8 - tailwindcss: 3.1.7_ts-node@10.9.1 + tailwindcss: 3.1.8_ts-node@10.9.1 vue: 3.2.37 vue-router: 4.1.3_vue@3.2.37 devDependencies: @@ -1120,9 +1120,9 @@ importers: playground/tailwind-sourcemap: specifiers: - tailwindcss: ^3.1.7 + tailwindcss: ^3.1.8 dependencies: - tailwindcss: 3.1.7 + tailwindcss: 3.1.8 playground/tsconfig-json: specifiers: {} @@ -1137,7 +1137,7 @@ importers: less: ^4.1.3 lodash-es: ^4.17.21 pug: ^3.0.2 - sass: ^1.54.0 + sass: ^1.54.3 stylus: ^0.58.1 vue: ^3.2.37 dependencies: @@ -1148,7 +1148,7 @@ importers: js-yaml: 4.1.0 less: 4.1.3 pug: 3.0.2 - sass: 1.54.0 + sass: 1.54.3 stylus: 0.58.1 playground/vue-jsx: @@ -1185,7 +1185,7 @@ importers: '@vitejs/plugin-vue': workspace:* less: ^4.1.3 postcss-nested: ^5.0.6 - sass: ^1.54.0 + sass: ^1.54.3 vue: ^3.2.37 dependencies: vue: 3.2.37 @@ -1193,7 +1193,7 @@ importers: '@vitejs/plugin-vue': link:../../packages/plugin-vue less: 4.1.3 postcss-nested: 5.0.6 - sass: 1.54.0 + sass: 1.54.3 playground/wasm: specifiers: {} @@ -1324,6 +1324,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.17.9 + dev: true /@babel/code-frame/7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} @@ -1340,6 +1341,28 @@ packages: resolution: {integrity: sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==} engines: {node: '>=6.9.0'} + /@babel/core/7.18.10: + resolution: {integrity: sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.0 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.12 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 + '@babel/helper-module-transforms': 7.18.9 + '@babel/helpers': 7.18.9 + '@babel/parser': 7.18.11 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.11 + '@babel/types': 7.18.10 + convert-source-map: 1.8.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.1 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + /@babel/core/7.18.5: resolution: {integrity: sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ==} engines: {node: '>=6.9.0'} @@ -1353,7 +1376,7 @@ packages: '@babel/parser': 7.18.5 '@babel/template': 7.16.7 '@babel/traverse': 7.18.5 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 convert-source-map: 1.8.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -1376,7 +1399,7 @@ packages: '@babel/parser': 7.18.9 '@babel/template': 7.18.6 '@babel/traverse': 7.18.9 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 convert-source-map: 1.8.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -1384,39 +1407,30 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color + dev: true - /@babel/generator/7.17.10: - resolution: {integrity: sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg==} + /@babel/generator/7.18.12: + resolution: {integrity: sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 - '@jridgewell/gen-mapping': 0.1.1 + '@babel/types': 7.18.10 + '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 - dev: false /@babel/generator/7.18.2: resolution: {integrity: sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 '@jridgewell/gen-mapping': 0.3.1 jsesc: 2.5.2 dev: true - /@babel/generator/7.18.7: - resolution: {integrity: sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.18.7 - '@jridgewell/gen-mapping': 0.3.2 - jsesc: 2.5.2 - dev: false - /@babel/generator/7.18.9: resolution: {integrity: sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 @@ -1424,7 +1438,7 @@ packages: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.7 + '@babel/types': 7.18.10 dev: false /@babel/helper-compilation-targets/7.18.2_@babel+core@7.18.5: @@ -1440,6 +1454,18 @@ packages: semver: 6.3.0 dev: true + /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.10: + resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.18.8 + '@babel/core': 7.18.10 + '@babel/helper-validator-option': 7.18.6 + browserslist: 4.21.3 + semver: 6.3.0 + /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.9: resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} engines: {node: '>=6.9.0'} @@ -1449,22 +1475,23 @@ packages: '@babel/compat-data': 7.18.8 '@babel/core': 7.18.9 '@babel/helper-validator-option': 7.18.6 - browserslist: 4.20.3 + browserslist: 4.21.3 semver: 6.3.0 + dev: true - /@babel/helper-create-class-features-plugin/7.18.6_@babel+core@7.18.9: - resolution: {integrity: sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==} + /@babel/helper-create-class-features-plugin/7.18.9_@babel+core@7.18.10: + resolution: {integrity: sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.18.6 - '@babel/helper-function-name': 7.18.6 - '@babel/helper-member-expression-to-functions': 7.18.6 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-member-expression-to-functions': 7.18.9 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/helper-replace-supers': 7.18.6 + '@babel/helper-replace-supers': 7.18.9 '@babel/helper-split-export-declaration': 7.18.6 transitivePeerDependencies: - supports-color @@ -1474,7 +1501,7 @@ packages: resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true /@babel/helper-environment-visitor/7.18.2: @@ -1482,11 +1509,6 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-environment-visitor/7.18.6: - resolution: {integrity: sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==} - engines: {node: '>=6.9.0'} - dev: false - /@babel/helper-environment-visitor/7.18.9: resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} engines: {node: '>=6.9.0'} @@ -1496,54 +1518,47 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.16.7 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true - /@babel/helper-function-name/7.18.6: - resolution: {integrity: sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.18.6 - '@babel/types': 7.18.8 - dev: false - /@babel/helper-function-name/7.18.9: resolution: {integrity: sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.6 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 /@babel/helper-hoist-variables/7.16.7: resolution: {integrity: sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.18.10 + dev: true /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 - /@babel/helper-member-expression-to-functions/7.18.6: - resolution: {integrity: sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==} + /@babel/helper-member-expression-to-functions/7.18.9: + resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.18.10 dev: false /@babel/helper-module-imports/7.16.7: resolution: {integrity: sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.18.10 /@babel/helper-module-imports/7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 /@babel/helper-module-transforms/7.18.0: resolution: {integrity: sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==} @@ -1556,7 +1571,7 @@ packages: '@babel/helper-validator-identifier': 7.16.7 '@babel/template': 7.16.7 '@babel/traverse': 7.18.5 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 transitivePeerDependencies: - supports-color dev: true @@ -1570,9 +1585,9 @@ packages: '@babel/helper-simple-access': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.18.6 - '@babel/template': 7.18.6 - '@babel/traverse': 7.18.9 - '@babel/types': 7.18.9 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.11 + '@babel/types': 7.18.10 transitivePeerDependencies: - supports-color @@ -1580,7 +1595,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.18.10 dev: false /@babel/helper-plugin-utils/7.16.7: @@ -1597,15 +1612,15 @@ packages: resolution: {integrity: sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==} engines: {node: '>=6.9.0'} - /@babel/helper-replace-supers/7.18.6: - resolution: {integrity: sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==} + /@babel/helper-replace-supers/7.18.9: + resolution: {integrity: sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.18.6 - '@babel/helper-member-expression-to-functions': 7.18.6 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-member-expression-to-functions': 7.18.9 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/traverse': 7.18.6 - '@babel/types': 7.18.8 + '@babel/traverse': 7.18.9 + '@babel/types': 7.18.10 transitivePeerDependencies: - supports-color dev: false @@ -1614,27 +1629,31 @@ packages: resolution: {integrity: sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true /@babel/helper-simple-access/7.18.6: resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 /@babel/helper-split-export-declaration/7.16.7: resolution: {integrity: sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true /@babel/helper-split-export-declaration/7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 + + /@babel/helper-string-parser/7.18.10: + resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} + engines: {node: '>=6.9.0'} /@babel/helper-validator-identifier/7.16.7: resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==} @@ -1659,7 +1678,7 @@ packages: dependencies: '@babel/template': 7.16.7 '@babel/traverse': 7.18.5 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 transitivePeerDependencies: - supports-color dev: true @@ -1668,9 +1687,9 @@ packages: resolution: {integrity: sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.18.6 - '@babel/traverse': 7.18.9 - '@babel/types': 7.18.9 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.11 + '@babel/types': 7.18.10 transitivePeerDependencies: - supports-color @@ -1681,6 +1700,7 @@ packages: '@babel/helper-validator-identifier': 7.16.7 chalk: 2.4.2 js-tokens: 4.0.0 + dev: true /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} @@ -1690,27 +1710,26 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser/7.18.5: - resolution: {integrity: sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==} + /@babel/parser/7.18.11: + resolution: {integrity: sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.4 + '@babel/types': 7.18.10 - /@babel/parser/7.18.6: - resolution: {integrity: sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==} + /@babel/parser/7.18.5: + resolution: {integrity: sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.7 - dev: false + '@babel/types': 7.18.4 /@babel/parser/7.18.9: resolution: {integrity: sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 /@babel/plugin-proposal-pipeline-operator/7.18.9: resolution: {integrity: sha512-Pc33e6m8f4MJhRXVCUwiKZNtEm+W2CUPHIL0lyJNtkp+w6d75CLw3gsBKQ81VAMUgT9jVPIEU8gwJ5nJgmJ1Ag==} @@ -1722,23 +1741,23 @@ packages: '@babel/plugin-syntax-pipeline-operator': 7.18.6 dev: true - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.18.9: + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.18.10: resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 '@babel/helper-plugin-utils': 7.16.7 dev: false - /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.18.9: + /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.18.10: resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/core': 7.18.10 + '@babel/helper-plugin-utils': 7.18.9 dev: false /@babel/plugin-syntax-jsx/7.18.6: @@ -1749,13 +1768,13 @@ packages: dependencies: '@babel/helper-plugin-utils': 7.18.9 - /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.9: + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.10: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 '@babel/helper-plugin-utils': 7.18.9 dev: false @@ -1768,70 +1787,70 @@ packages: '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.9: + /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.10: resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/core': 7.18.10 + '@babel/helper-plugin-utils': 7.18.9 dev: false - /@babel/plugin-transform-react-jsx-development/7.18.6_@babel+core@7.18.9: + /@babel/plugin-transform-react-jsx-development/7.18.6_@babel+core@7.18.10: resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 - '@babel/plugin-transform-react-jsx': 7.18.6_@babel+core@7.18.9 + '@babel/core': 7.18.10 + '@babel/plugin-transform-react-jsx': 7.18.10_@babel+core@7.18.10 dev: false - /@babel/plugin-transform-react-jsx-self/7.18.6_@babel+core@7.18.9: + /@babel/plugin-transform-react-jsx-self/7.18.6_@babel+core@7.18.10: resolution: {integrity: sha512-A0LQGx4+4Jv7u/tWzoJF7alZwnBDQd6cGLh9P+Ttk4dpiL+J5p7NSNv/9tlEFFJDq3kjxOavWmbm6t0Gk+A3Ig==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 '@babel/helper-plugin-utils': 7.18.6 dev: false - /@babel/plugin-transform-react-jsx-source/7.18.6_@babel+core@7.18.9: + /@babel/plugin-transform-react-jsx-source/7.18.6_@babel+core@7.18.10: resolution: {integrity: sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 '@babel/helper-plugin-utils': 7.18.6 dev: false - /@babel/plugin-transform-react-jsx/7.18.6_@babel+core@7.18.9: - resolution: {integrity: sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw==} + /@babel/plugin-transform-react-jsx/7.18.10_@babel+core@7.18.10: + resolution: {integrity: sha512-gCy7Iikrpu3IZjYZolFE4M1Sm+nrh1/6za2Ewj77Z+XirT4TsbJcvOFOyF+fRPwU6AKKK136CZxx6L8AbSFG6A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 + '@babel/core': 7.18.10 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-module-imports': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.9 - '@babel/types': 7.18.7 + '@babel/helper-plugin-utils': 7.18.9 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.10 + '@babel/types': 7.18.10 dev: false - /@babel/plugin-transform-typescript/7.18.8_@babel+core@7.18.9: - resolution: {integrity: sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA==} + /@babel/plugin-transform-typescript/7.18.12_@babel+core@7.18.10: + resolution: {integrity: sha512-2vjjam0cum0miPkenUbQswKowuxs/NjMwIKEq0zwegRxXk12C9YOF9STXnaUptITOtOJHKHpzvvWYOjbm6tc0w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.9 - '@babel/helper-create-class-features-plugin': 7.18.6_@babel+core@7.18.9 - '@babel/helper-plugin-utils': 7.18.6 - '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.9 + '@babel/core': 7.18.10 + '@babel/helper-create-class-features-plugin': 7.18.9_@babel+core@7.18.10 + '@babel/helper-plugin-utils': 7.18.9 + '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.10 transitivePeerDependencies: - supports-color dev: false @@ -1849,17 +1868,31 @@ packages: dependencies: regenerator-runtime: 0.13.9 + /@babel/standalone/7.18.12: + resolution: {integrity: sha512-wDh3K5IUJiSMAY0MLYBFoCaj2RCZwvDz5BHn2uHat9KOsGWEVDFgFQFIOO+81Js2phFKNppLC45iOCsZVfJniw==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/standalone/7.18.9: resolution: {integrity: sha512-6E+p5azHMHcMkHzGFnA7Pqhtgfwx1cClwjMqomMHhdFupCLZDDpVQUctRGYE7p7nn7cXJZSI/L9en+tt30AP3w==} engines: {node: '>=6.9.0'} + dev: true /@babel/template/7.16.7: resolution: {integrity: sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.16.7 - '@babel/parser': 7.18.5 - '@babel/types': 7.18.8 + '@babel/code-frame': 7.18.6 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 + + /@babel/template/7.18.10: + resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 /@babel/template/7.18.6: resolution: {integrity: sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==} @@ -1867,26 +1900,43 @@ packages: dependencies: '@babel/code-frame': 7.18.6 '@babel/parser': 7.18.9 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 /@babel/traverse/7.17.10: resolution: {integrity: sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.16.7 - '@babel/generator': 7.17.10 - '@babel/helper-environment-visitor': 7.18.6 - '@babel/helper-function-name': 7.18.6 - '@babel/helper-hoist-variables': 7.16.7 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.9 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.18.5 - '@babel/types': 7.18.8 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false + /@babel/traverse/7.18.11: + resolution: {integrity: sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.12 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + /@babel/traverse/7.18.5: resolution: {integrity: sha512-aKXj1KT66sBj0vVzk6rEeAO6Z9aiiQ68wfDgge3nHhA/my6xMM/7HGQUNumKZaoa2qUPQ5whJG9aAifsxUKfLA==} engines: {node: '>=6.9.0'} @@ -1898,31 +1948,13 @@ packages: '@babel/helper-hoist-variables': 7.16.7 '@babel/helper-split-export-declaration': 7.16.7 '@babel/parser': 7.18.5 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/traverse/7.18.6: - resolution: {integrity: sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.7 - '@babel/helper-environment-visitor': 7.18.6 - '@babel/helper-function-name': 7.18.6 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.18.6 - '@babel/types': 7.18.8 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: false - /@babel/traverse/7.18.9: resolution: {integrity: sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg==} engines: {node: '>=6.9.0'} @@ -1934,7 +1966,7 @@ packages: '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.18.9 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: @@ -1943,37 +1975,23 @@ packages: /@babel/types/7.17.10: resolution: {integrity: sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.16.7 - to-fast-properties: 2.0.0 - - /@babel/types/7.18.4: - resolution: {integrity: sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.16.7 - to-fast-properties: 2.0.0 - - /@babel/types/7.18.7: - resolution: {integrity: sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==} - engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 - dev: false - /@babel/types/7.18.8: - resolution: {integrity: sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==} + /@babel/types/7.18.10: + resolution: {integrity: sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==} engines: {node: '>=6.9.0'} dependencies: + '@babel/helper-string-parser': 7.18.10 '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 - /@babel/types/7.18.9: - resolution: {integrity: sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg==} + /@babel/types/7.18.4: + resolution: {integrity: sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.16.7 to-fast-properties: 2.0.0 /@cloudflare/workers-types/2.2.2: @@ -2092,8 +2110,8 @@ packages: resolution: {integrity: sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==} dev: false - /@esbuild-kit/cjs-loader/2.3.1: - resolution: {integrity: sha512-ov6ALYD9xZSPoo5mmGOQtEC/b0xXeUlPy65p8aHMHLF4DfBEe8Y+iquH2lTDsy6Iskc1uMTadF+SVADTSTNJMA==} + /@esbuild-kit/cjs-loader/2.3.3: + resolution: {integrity: sha512-Rt4O1mXlPEDVxvjsHLgbtHVdUXYK9C1/6ThpQnt7FaXIjUOsI6qhHYMgALhNnlIMZffag44lXd6Dqgx3xALbpQ==} dependencies: '@esbuild-kit/core-utils': 2.1.0 get-tsconfig: 4.1.0 @@ -2102,12 +2120,12 @@ packages: /@esbuild-kit/core-utils/2.1.0: resolution: {integrity: sha512-fZirrc2KjeTumVjE4bpleWOk2gD83b7WuGeQqOceKFQL+heNKKkNB5G5pekOUTLzfSBc0hP7hCSBoD9TuR0hLw==} dependencies: - esbuild: 0.14.47 + esbuild: 0.14.50 source-map-support: 0.5.21 dev: true - /@esbuild-kit/esm-loader/2.4.1: - resolution: {integrity: sha512-6x44rygVfNODm27v0RW3wX5y61mqSrXDvB39G0nomgWWqxG3mjiKtPSwrFppdkrA39QIqDgVlD4gJmPOxnleSw==} + /@esbuild-kit/esm-loader/2.4.2: + resolution: {integrity: sha512-N9dPKAj8WOx6djVnStgILWXip4fjDcBk9L7azO0/uQDpu8Ee0eaL78mkN4Acid9BzvNAKWwdYXFJZnsVahNEew==} dependencies: '@esbuild-kit/core-utils': 2.1.0 get-tsconfig: 4.1.0 @@ -2237,30 +2255,30 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model/7.22.2: - resolution: {integrity: sha512-fqb7std1sRfg7tvXkJwB7zrgIyzty7iIJXxpqA2/bEdct36jhkgIhKpgYr2yoi+Jhqbinjmhyf9tPKJ2E3TdwA==} + /@microsoft/api-extractor-model/7.23.0: + resolution: {integrity: sha512-h+2aVyf8IYidPZp+N+yIc/LY/aBwRZ1Vxlsx7rU31807bba5ScJ94bj7OjsPMje0vRYALf+yjZToYT0HdP6omA==} dependencies: '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.50.0 + '@rushstack/node-core-library': 3.50.1 dev: true - /@microsoft/api-extractor/7.28.7: - resolution: {integrity: sha512-hDVYSbqGsY4gioHMi/NkIarAJ2qoE5cKEZ6V5HqLcUl0+hNV0Auk/5VbBmU2UO2le6MFgO69EJsrfszwzC6QBA==} + /@microsoft/api-extractor/7.29.0: + resolution: {integrity: sha512-tGU5DiwQ7/gN9Chi7cuAdspTuVY8hNcq5hBtvwAvb1H85tbiIHuqgoneHI60rkqlud7szkHJLiCkv75kQ0JLjw==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.22.2 + '@microsoft/api-extractor-model': 7.23.0 '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.50.0 - '@rushstack/rig-package': 0.3.13 - '@rushstack/ts-command-line': 4.12.1 + '@rushstack/node-core-library': 3.50.1 + '@rushstack/rig-package': 0.3.14 + '@rushstack/ts-command-line': 4.12.2 colors: 1.2.5 lodash: 4.17.21 resolve: 1.17.0 semver: 7.3.7 source-map: 0.6.1 - typescript: 4.6.4 + typescript: 4.7.4 dev: true /@microsoft/tsdoc-config/0.16.1: @@ -2355,40 +2373,40 @@ packages: slash: 3.0.0 dev: true - /@rollup/plugin-commonjs/22.0.1_rollup@2.75.6: + /@rollup/plugin-commonjs/22.0.1_rollup@2.77.0: resolution: {integrity: sha512-dGfEZvdjDHObBiP5IvwTKMVeq/tBZGMBHZFMdIV1ClMM/YoWS34xrHFGfag9SN2ZtMgNZRFruqvxZQEa70O6nQ==} engines: {node: '>= 12.0.0'} peerDependencies: rollup: ^2.68.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.75.6 + '@rollup/pluginutils': 3.1.0_rollup@2.77.0 commondir: 1.0.1 estree-walker: 2.0.2 glob: 7.2.0 is-reference: 1.2.1 magic-string: 0.25.9 resolve: 1.22.1 - rollup: 2.75.6 + rollup: 2.77.0 dev: true - /@rollup/plugin-commonjs/22.0.1_rollup@2.77.0: - resolution: {integrity: sha512-dGfEZvdjDHObBiP5IvwTKMVeq/tBZGMBHZFMdIV1ClMM/YoWS34xrHFGfag9SN2ZtMgNZRFruqvxZQEa70O6nQ==} + /@rollup/plugin-commonjs/22.0.2_rollup@2.75.6: + resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} engines: {node: '>= 12.0.0'} peerDependencies: rollup: ^2.68.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.77.0 + '@rollup/pluginutils': 3.1.0_rollup@2.75.6 commondir: 1.0.1 estree-walker: 2.0.2 glob: 7.2.0 is-reference: 1.2.1 magic-string: 0.25.9 resolve: 1.22.1 - rollup: 2.77.0 + rollup: 2.75.6 dev: true - /@rollup/plugin-dynamic-import-vars/1.4.3_rollup@2.75.6: - resolution: {integrity: sha512-VYP9BBVI0pcYpLp/DkFT8YP+EmqmWFMmWXoTObDH6OouERxJyPsIj0tC3HxhjNBOKgcRc7eV75IQItzELt7QSg==} + /@rollup/plugin-dynamic-import-vars/1.4.4_rollup@2.75.6: + resolution: {integrity: sha512-51BcU6ag9EeF09CtEsa5D/IHYo7KI42TR1Jc4doNzV1nHAiH7TvUi5vsLERFMjs9Gzy9K0otbZH/2wb0hpBhRA==} engines: {node: '>= 10.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0 @@ -2525,8 +2543,8 @@ packages: picomatch: 2.3.1 dev: true - /@rushstack/node-core-library/3.50.0: - resolution: {integrity: sha512-FFEZhgu6iN1MVjpQWmLcz46pSa4r2Oe2JYPo7mtnl3uYfwDaSXUSZuRN3JQgKkXu10TBcffJ7AGKcIt/k+qE/Q==} + /@rushstack/node-core-library/3.50.1: + resolution: {integrity: sha512-9d2xE7E9yQEBS6brTptdP8cslt6iL5+UnkY2lRxQQ4Q/jlXtsrWCCJCxwr56W/eJEe9YT/yHR4mMn5QY64Ps2w==} dependencies: '@types/node': 12.20.24 colors: 1.2.5 @@ -2539,15 +2557,15 @@ packages: z-schema: 5.0.3 dev: true - /@rushstack/rig-package/0.3.13: - resolution: {integrity: sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA==} + /@rushstack/rig-package/0.3.14: + resolution: {integrity: sha512-Ic9EN3kWJCK6iOxEDtwED9nrM146zCDrQaUxbeGOF+q/VLZ/HNHPw+aLqrqmTl0ZT66Sf75Qk6OG+rySjTorvQ==} dependencies: resolve: 1.17.0 strip-json-comments: 3.1.1 dev: true - /@rushstack/ts-command-line/4.12.1: - resolution: {integrity: sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ==} + /@rushstack/ts-command-line/4.12.2: + resolution: {integrity: sha512-poBtnumLuWmwmhCEkVAgynWgtnF9Kygekxyp4qtQUSbBrkuyPQTL85c8Cva1YfoUpOdOXxezMAkUt0n5SNKGqw==} dependencies: '@types/argparse': 1.0.38 argparse: 1.0.10 @@ -2579,7 +2597,7 @@ packages: resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} dependencies: '@babel/parser': 7.18.5 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.17.1 @@ -2588,7 +2606,7 @@ packages: /@types/babel__generator/7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true /@types/babel__standalone/7.1.4: @@ -2603,13 +2621,13 @@ packages: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: '@babel/parser': 7.18.5 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true /@types/babel__traverse/7.17.1: resolution: {integrity: sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==} dependencies: - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 dev: true /@types/braces/3.0.1: @@ -2751,8 +2769,8 @@ packages: '@types/node': 17.0.42 dev: true - /@typescript-eslint/eslint-plugin/5.31.0_47ooyv4whyi5jcher5bzfc7xvi: - resolution: {integrity: sha512-VKW4JPHzG5yhYQrQ1AzXgVgX8ZAJEvCz0QI6mLRX4tf7rnFfh5D8SKm0Pq6w5PyNfAWJk6sv313+nEt3ohWMBQ==} + /@typescript-eslint/eslint-plugin/5.33.0_y4zvvqz4rccbgvlojt5544lsha: + resolution: {integrity: sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2762,10 +2780,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im - '@typescript-eslint/scope-manager': 5.31.0 - '@typescript-eslint/type-utils': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im - '@typescript-eslint/utils': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/parser': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/scope-manager': 5.33.0 + '@typescript-eslint/type-utils': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/utils': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im debug: 4.3.4 eslint: 8.21.0 functional-red-black-tree: 1.0.1 @@ -2778,8 +2796,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im: - resolution: {integrity: sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw==} + /@typescript-eslint/parser/5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im: + resolution: {integrity: sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2788,9 +2806,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.31.0 - '@typescript-eslint/types': 5.31.0 - '@typescript-eslint/typescript-estree': 5.31.0_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.33.0 + '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/typescript-estree': 5.33.0_typescript@4.6.4 debug: 4.3.4 eslint: 8.21.0 typescript: 4.6.4 @@ -2798,16 +2816,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.31.0: - resolution: {integrity: sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg==} + /@typescript-eslint/scope-manager/5.33.0: + resolution: {integrity: sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.31.0 - '@typescript-eslint/visitor-keys': 5.31.0 + '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/visitor-keys': 5.33.0 dev: true - /@typescript-eslint/type-utils/5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im: - resolution: {integrity: sha512-7ZYqFbvEvYXFn9ax02GsPcEOmuWNg+14HIf4q+oUuLnMbpJ6eHAivCg7tZMVwzrIuzX3QCeAOqKoyMZCv5xe+w==} + /@typescript-eslint/type-utils/5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im: + resolution: {integrity: sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2816,7 +2834,7 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/utils': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im debug: 4.3.4 eslint: 8.21.0 tsutils: 3.21.0_typescript@4.6.4 @@ -2825,13 +2843,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.31.0: - resolution: {integrity: sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g==} + /@typescript-eslint/types/5.33.0: + resolution: {integrity: sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.31.0_typescript@4.6.4: - resolution: {integrity: sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw==} + /@typescript-eslint/typescript-estree/5.33.0_typescript@4.6.4: + resolution: {integrity: sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2839,8 +2857,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.31.0 - '@typescript-eslint/visitor-keys': 5.31.0 + '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/visitor-keys': 5.33.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -2851,16 +2869,16 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im: - resolution: {integrity: sha512-kcVPdQS6VIpVTQ7QnGNKMFtdJdvnStkqS5LeALr4rcwx11G6OWb2HB17NMPnlRHvaZP38hL9iK8DdE9Fne7NYg==} + /@typescript-eslint/utils/5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im: + resolution: {integrity: sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.31.0 - '@typescript-eslint/types': 5.31.0 - '@typescript-eslint/typescript-estree': 5.31.0_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.33.0 + '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/typescript-estree': 5.33.0_typescript@4.6.4 eslint: 8.21.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.21.0 @@ -2869,11 +2887,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.31.0: - resolution: {integrity: sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg==} + /@typescript-eslint/visitor-keys/5.33.0: + resolution: {integrity: sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.31.0 + '@typescript-eslint/types': 5.33.0 eslint-visitor-keys: 3.3.0 dev: true @@ -2881,11 +2899,11 @@ packages: resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==} dev: false - /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.18.9: + /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.18.10: resolution: {integrity: sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w==} dependencies: '@babel/helper-module-imports': 7.16.7 - '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.18.9 + '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.18.10 '@babel/template': 7.16.7 '@babel/traverse': 7.17.10 '@babel/types': 7.17.10 @@ -3329,8 +3347,8 @@ packages: - supports-color dev: false - /bignumber.js/9.0.2: - resolution: {integrity: sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==} + /bignumber.js/9.1.0: + resolution: {integrity: sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==} dev: false /binary-extensions/2.2.0: @@ -3383,6 +3401,7 @@ packages: escalade: 3.1.1 node-releases: 2.0.4 picocolors: 1.0.0 + dev: true /browserslist/4.21.3: resolution: {integrity: sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==} @@ -3393,7 +3412,6 @@ packages: electron-to-chromium: 1.4.206 node-releases: 2.0.6 update-browserslist-db: 1.0.5_browserslist@4.21.3 - dev: false /buffer-from/1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -3462,10 +3480,10 @@ packages: /caniuse-lite/1.0.30001339: resolution: {integrity: sha512-Es8PiVqCe+uXdms0Gu5xP5PF2bxLR7OBp3wUzUnuO7OHzhOfCyg3hdiGWVPVxhiuniOzng+hTc1u3fEQ0TlkSQ==} + dev: true /caniuse-lite/1.0.30001373: resolution: {integrity: sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ==} - dev: false /chai/4.3.6: resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} @@ -3896,8 +3914,8 @@ packages: engines: {node: '>=10'} hasBin: true dependencies: - is-text-path: 1.0.1 JSONStream: 1.3.5 + is-text-path: 1.0.1 lodash: 4.17.21 meow: 8.1.2 split2: 3.2.2 @@ -4020,7 +4038,7 @@ packages: /d/1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} dependencies: - es5-ext: 0.10.61 + es5-ext: 0.10.62 type: 1.2.0 dev: false @@ -4240,10 +4258,10 @@ packages: /electron-to-chromium/1.4.137: resolution: {integrity: sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==} + dev: true /electron-to-chromium/1.4.206: resolution: {integrity: sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA==} - dev: false /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -4328,8 +4346,8 @@ packages: is-symbol: 1.0.4 dev: true - /es5-ext/0.10.61: - resolution: {integrity: sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==} + /es5-ext/0.10.62: + resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==} engines: {node: '>=0.10'} requiresBuild: true dependencies: @@ -4339,10 +4357,10 @@ packages: dev: false /es6-iterator/2.0.3: - resolution: {integrity: sha1-p96IkUGgWpSwhUQDstCg+/qY87c=} + resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} dependencies: d: 1.0.1 - es5-ext: 0.10.61 + es5-ext: 0.10.62 es6-symbol: 3.1.3 dev: false @@ -4778,7 +4796,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.3_vozeh3qpn3prlhg65r4uuu3jv4: + /eslint-module-utils/2.7.3_oh3tx5uf4prsskzvqzbn7hm6ya: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -4796,7 +4814,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/parser': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -4815,7 +4833,7 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_eygs4xj346vriqwkjbwjuyviaa: + /eslint-plugin-import/2.26.0_qfqnhzzittf54udqwes54xx65q: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4825,14 +4843,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.31.0_vxmhu3tyr7cxhd2vxjkubkv7im + '@typescript-eslint/parser': 5.33.0_vxmhu3tyr7cxhd2vxjkubkv7im array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.21.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_vozeh3qpn3prlhg65r4uuu3jv4 + eslint-module-utils: 2.7.3_oh3tx5uf4prsskzvqzbn7hm6ya has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -5626,13 +5644,13 @@ packages: resolution: {integrity: sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=} dev: true - /icss-utils/5.1.0_postcss@8.4.14: + /icss-utils/5.1.0_postcss@8.4.16: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.14 + postcss: 8.4.16 dev: true /ignore/5.2.0: @@ -5836,7 +5854,7 @@ packages: /is-reference/1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: - '@types/estree': 0.0.51 + '@types/estree': 1.0.0 dev: true /is-reference/3.0.0: @@ -6030,14 +6048,14 @@ packages: resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==} dev: false - /launch-editor-middleware/2.4.0: - resolution: {integrity: sha512-/M7AX/6xktZY60KE7j71XLrj9U6H5TBoP+mJzhYB3fcdAq8rcazit/K0qWiu1jvytUPXP4lJRd1VJFwvdMQ/uw==} + /launch-editor-middleware/2.5.0: + resolution: {integrity: sha512-kv9MMO81pbYjznk9j/DBu0uBGxIpT6uYhGajq6fxdGEPb+DCRBoS96jGkhe3MJumdY3zZFkuS8CFPTZI9DaBNw==} dependencies: - launch-editor: 2.4.0 + launch-editor: 2.5.0 dev: true - /launch-editor/2.4.0: - resolution: {integrity: sha512-mZ0BHeSn/ohL+Ib+b+JnxC59vcNz6v5IR9d0CuM8f0x8ni8oK3IIG6G0vMkpxc0gFsmvINkztGOHiWTaX4BmAg==} + /launch-editor/2.5.0: + resolution: {integrity: sha512-coRiIMBJ3JF7yX8nZE4Fr+xxUy+3WTRsDSwIzHghU28gjXwkAWsvac3BpZrL/jHtbiqQ4TiRAyTJmsgErNk1jQ==} dependencies: picocolors: 1.0.0 shell-quote: 1.7.3 @@ -6475,6 +6493,14 @@ packages: pkg-types: 0.3.3 dev: true + /mlly/0.5.7: + resolution: {integrity: sha512-rz+n2i9862ymLH+UDlHpsuTVyCIAs+9WejS2De2VUlAKdpq8OJ9x/C2M7nNUMLEW1H+D6n0uZlpz8+tMGxCmyQ==} + dependencies: + acorn: 8.8.0 + pathe: 0.3.3 + pkg-types: 0.3.3 + dev: true + /modify-values/1.0.1: resolution: {integrity: sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==} engines: {node: '>=0.10.0'} @@ -6596,10 +6622,10 @@ packages: /node-releases/2.0.4: resolution: {integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==} + dev: true /node-releases/2.0.6: resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} - dev: false /nopt/5.0.0: resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} @@ -6935,6 +6961,10 @@ packages: resolution: {integrity: sha512-qhnmX0TOqlCvdWWTkoM83wh5J8fZ2yhbDEc9MlsnAEtEc+JCwxUKEwmd6pkY9hRe6JR1Uecbc14VcAKX2yFSTA==} dev: true + /pathe/0.3.3: + resolution: {integrity: sha512-x3nrPvG0HDSDzUiJ0WqtzhN4MD+h5B+dFJ3/qyxVuARlr4Y3aJv8gri2cZzp9Z8sGs2a+aG9gNbKngh3gme57A==} + dev: true + /pathval/1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true @@ -6988,8 +7018,8 @@ packages: resolution: {integrity: sha512-6AJcCMnjUQPQv/Wk960w0TOmjhdjbeaQJoSKWRQv9N3rgkessCu6J0Ydsog/nw1MbpnxHuPzYbfOn2KmlZO1FA==} dependencies: jsonc-parser: 3.0.0 - mlly: 0.5.5 - pathe: 0.3.2 + mlly: 0.5.7 + pathe: 0.3.3 dev: true /playwright-chromium/1.24.2: @@ -7007,8 +7037,8 @@ packages: hasBin: true dev: true - /pnpm/7.8.0: - resolution: {integrity: sha512-jzb9/gto4nwuVA2itTRk0PJhuaZcA1NBRB298UzXhqKZQMjtHCS+KLzh7RWk5n3g+KnMg5FHr6Mwg1L62dBz1A==} + /pnpm/7.9.0: + resolution: {integrity: sha512-xkIVw73yJm/h5M4VvFIS5Q+gQCRDrp3r92g58PtcCK86aZCa7EQ6q6ivdfTAz0KsAVgloA6Anub28n6wju5v3w==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -7024,6 +7054,18 @@ packages: read-cache: 1.0.0 resolve: 1.22.1 + /postcss-import/14.1.0_postcss@8.4.16: + resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} + engines: {node: '>=10.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.16 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.1 + dev: true + /postcss-js/4.0.0_postcss@8.4.14: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} @@ -7067,7 +7109,7 @@ packages: postcss: 8.4.14 yaml: 1.10.2 - /postcss-load-config/4.0.1_postcss@8.4.14: + /postcss-load-config/4.0.1_postcss@8.4.16: resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -7080,52 +7122,52 @@ packages: optional: true dependencies: lilconfig: 2.0.5 - postcss: 8.4.14 + postcss: 8.4.16 yaml: 2.1.1 dev: true - /postcss-modules-extract-imports/3.0.0_postcss@8.4.14: + /postcss-modules-extract-imports/3.0.0_postcss@8.4.16: resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.14 + postcss: 8.4.16 dev: true - /postcss-modules-local-by-default/4.0.0_postcss@8.4.14: + /postcss-modules-local-by-default/4.0.0_postcss@8.4.16: resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0_postcss@8.4.14 - postcss: 8.4.14 + icss-utils: 5.1.0_postcss@8.4.16 + postcss: 8.4.16 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 dev: true - /postcss-modules-scope/3.0.0_postcss@8.4.14: + /postcss-modules-scope/3.0.0_postcss@8.4.16: resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.14 + postcss: 8.4.16 postcss-selector-parser: 6.0.10 dev: true - /postcss-modules-values/4.0.0_postcss@8.4.14: + /postcss-modules-values/4.0.0_postcss@8.4.16: resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0_postcss@8.4.14 - postcss: 8.4.14 + icss-utils: 5.1.0_postcss@8.4.16 + postcss: 8.4.16 dev: true - /postcss-modules/4.3.1_postcss@8.4.14: + /postcss-modules/4.3.1_postcss@8.4.16: resolution: {integrity: sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==} peerDependencies: postcss: ^8.0.0 @@ -7133,11 +7175,11 @@ packages: generic-names: 4.0.0 icss-replace-symbols: 1.1.0 lodash.camelcase: 4.3.0 - postcss: 8.4.14 - postcss-modules-extract-imports: 3.0.0_postcss@8.4.14 - postcss-modules-local-by-default: 4.0.0_postcss@8.4.14 - postcss-modules-scope: 3.0.0_postcss@8.4.14 - postcss-modules-values: 4.0.0_postcss@8.4.14 + postcss: 8.4.16 + postcss-modules-extract-imports: 3.0.0_postcss@8.4.16 + postcss-modules-local-by-default: 4.0.0_postcss@8.4.16 + postcss-modules-scope: 3.0.0_postcss@8.4.16 + postcss-modules-values: 4.0.0_postcss@8.4.16 string-hash: 1.1.3 dev: true @@ -7177,6 +7219,14 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postcss/8.4.16: + resolution: {integrity: sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.4 + picocolors: 1.0.0 + source-map-js: 1.0.2 + /preact/10.7.3: resolution: {integrity: sha512-giqJXP8VbtA1tyGa3f1n9wiN7PrHtONrDyE3T+ifjr/tTkg+2N4d/6sjC9WyJKv8wM7rOYDveqy5ZoFmYlwo4w==} dev: true @@ -7723,8 +7773,8 @@ packages: truncate-utf8-bytes: 1.0.2 dev: true - /sass/1.54.0: - resolution: {integrity: sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==} + /sass/1.54.3: + resolution: {integrity: sha512-fLodey5Qd41Pxp/Tk7Al97sViYwF/TazRc5t6E65O7JOk4XF8pzwIW7CvCxYVOfJFFI/1x5+elDyBIixrp+zrw==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -8190,8 +8240,8 @@ packages: resolution: {integrity: sha512-hqTN6kW+pN6/qro6G9OZ7ceDQOcYno020zBQKpZQLsJhYTDMCMNfXi/Y8duF5iW+4WWZr42ry0MMkcRGpbwG2A==} dev: false - /tailwindcss/3.1.7: - resolution: {integrity: sha512-r7mgumZ3k0InfVPpGWcX8X/Ut4xBfv+1O/+C73ar/m01LxGVzWvPxF/w6xIUPEztrCoz7axfx0SMdh8FH8ZvRQ==} + /tailwindcss/3.1.8: + resolution: {integrity: sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==} engines: {node: '>=12.13.0'} hasBin: true dependencies: @@ -8220,8 +8270,8 @@ packages: transitivePeerDependencies: - ts-node - /tailwindcss/3.1.7_ts-node@10.9.1: - resolution: {integrity: sha512-r7mgumZ3k0InfVPpGWcX8X/Ut4xBfv+1O/+C73ar/m01LxGVzWvPxF/w6xIUPEztrCoz7axfx0SMdh8FH8ZvRQ==} + /tailwindcss/3.1.8_ts-node@10.9.1: + resolution: {integrity: sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==} engines: {node: '>=12.13.0'} hasBin: true dependencies: @@ -8332,7 +8382,7 @@ packages: dev: true /to-fast-properties/2.0.0: - resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} /to-regex-range/5.0.1: @@ -8443,13 +8493,13 @@ packages: typescript: 4.6.4 dev: true - /tsx/3.8.0: - resolution: {integrity: sha512-PcvTwRXTm6hDWfPihA4n5WW/9SmgFNxKaDKqvLLG+FKNEPA4crsipChzC7PVozPtdOaMfR5QctDlkC/hKoIsxw==} + /tsx/3.8.1: + resolution: {integrity: sha512-YA2fDf1V9j/6qX/QSnapMmzulbqlx7FeVL6d9ySHDJoECkslAlZO38UuyFCiNPjam74hbyHbJfUF+n2ZT14KDA==} hasBin: true dependencies: - '@esbuild-kit/cjs-loader': 2.3.1 + '@esbuild-kit/cjs-loader': 2.3.3 '@esbuild-kit/core-utils': 2.1.0 - '@esbuild-kit/esm-loader': 2.4.1 + '@esbuild-kit/esm-loader': 2.4.2 optionalDependencies: fsevents: 2.3.2 dev: true @@ -8613,7 +8663,7 @@ packages: dependencies: '@babel/core': 7.18.9 '@babel/standalone': 7.18.9 - '@babel/types': 7.18.9 + '@babel/types': 7.18.10 scule: 0.2.1 transitivePeerDependencies: - supports-color @@ -8628,7 +8678,6 @@ packages: browserslist: 4.21.3 escalade: 3.1.1 picocolors: 1.0.0 - dev: false /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -8706,8 +8755,8 @@ packages: - react-dom dev: true - /vitest/0.20.2: - resolution: {integrity: sha512-AFXTHrwG4d2OO6SAL8WP5ZkOwLtgeF4tlrHfXFqrHc+5chNegeR53pge0lv/C4316SqJ2DbYaUBH8vh3CdF+BQ==} + /vitest/0.21.0: + resolution: {integrity: sha512-+BQB2swk4wQdw5loOoL8esIYh/1ifAliuwj2HWHNE2F8SAl/jF7/aoCJBoXGSf/Ws19k3pH4NrWeVtcSwM0j2w==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: From 6ad6734ae269cedd08203320d7f914337c67c868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Tue, 9 Aug 2022 13:07:45 +0800 Subject: [PATCH 027/311] docs: fix renderBuiltUrl example (#9558) --- docs/guide/build.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/build.md b/docs/guide/build.md index bcc840d40cb56a..30dadbbb2473df 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -210,7 +210,7 @@ A single static [base](#public-base-path) isn't enough in these scenarios. Vite ```ts experimental: { - renderBuiltUrl: (filename: string, { hostType: 'js' | 'css' | 'html' }) => { + renderBuiltUrl(filename: string, { hostType }: { hostType: 'js' | 'css' | 'html' }) { if (hostType === 'js') { return { runtime: `window.__toCdnUrl(${JSON.stringify(filename)})` } } else { @@ -224,11 +224,11 @@ If the hashed assets and public files aren't deployed together, options for each ```ts experimental: { - renderBuiltUrl(filename: string, { hostType: 'js' | 'css' | 'html', type: 'public' | 'asset' }) { + renderBuiltUrl(filename: string, { hostId, hostType, type }: { hostId: string, hostType: 'js' | 'css' | 'html', type: 'public' | 'asset' }) { if (type === 'public') { return 'https://www.domain.com/' + filename } - else if (path.extname(importer) === '.js') { + else if (path.extname(hostId) === '.js') { return { runtime: `window.__assetsPath(${JSON.stringify(filename)})` } } else { From 8bae103236cf2137b1127756141b0e2c1e9c7696 Mon Sep 17 00:00:00 2001 From: haiya6 <38422259+haiya6@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:21:21 +0800 Subject: [PATCH 028/311] fix(build): normalized output log (#9594) --- packages/vite/src/node/plugins/html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index 188134d4166442..b8cd3713edfeea 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -740,7 +740,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { delete bundle[chunk.fileName] } - const shortEmitName = path.relative(config.root, id) + const shortEmitName = normalizePath(path.relative(config.root, id)) this.emitFile({ type: 'asset', fileName: shortEmitName, From ff89df5200de2d2a06474353b5b34e04249ad9d3 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 9 Aug 2022 17:15:12 +0800 Subject: [PATCH 029/311] fix(ssr): check root import extension for external (#9494) --- packages/vite/src/node/plugins/resolve.ts | 16 ++++++++++------ playground/ssr-deps/__tests__/ssr-deps.spec.ts | 7 ++++++- playground/ssr-deps/css-lib/index.css | 3 +++ playground/ssr-deps/css-lib/package.json | 6 ++++++ playground/ssr-deps/index.html | 4 ++++ playground/ssr-deps/package.json | 1 + playground/ssr-deps/src/app.js | 3 +++ pnpm-lock.yaml | 11 +++++++++++ 8 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 playground/ssr-deps/css-lib/index.css create mode 100644 playground/ssr-deps/css-lib/package.json diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index 16601297f85dac..e0297fea18e782 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -652,18 +652,22 @@ export function tryNodeResolve( if (!externalize) { return resolved } - // dont external symlink packages + // don't external symlink packages if (!allowLinkedExternal && !resolved.id.includes('node_modules')) { return resolved } const resolvedExt = path.extname(resolved.id) + // don't external non-js imports + if ( + resolvedExt && + resolvedExt !== '.js' && + resolvedExt !== '.mjs' && + resolvedExt !== '.cjs' + ) { + return resolved + } let resolvedId = id if (isDeepImport) { - // check ext before externalizing - only externalize - // extension-less imports and explicit .js imports - if (resolvedExt && !resolved.id.match(/(.js|.mjs|.cjs)$/)) { - return resolved - } if (!pkg?.data.exports && path.extname(id) !== resolvedExt) { resolvedId += resolvedExt } diff --git a/playground/ssr-deps/__tests__/ssr-deps.spec.ts b/playground/ssr-deps/__tests__/ssr-deps.spec.ts index f20dca26263f65..26bec1fe2de2c0 100644 --- a/playground/ssr-deps/__tests__/ssr-deps.spec.ts +++ b/playground/ssr-deps/__tests__/ssr-deps.spec.ts @@ -1,5 +1,5 @@ import { port } from './serve' -import { page } from '~utils' +import { getColor, page } from '~utils' const url = `http://localhost:${port}` @@ -108,3 +108,8 @@ test('msg from linked no external', async () => { await page.goto(url) expect(await page.textContent('.dep-virtual')).toMatch('[success]') }) + +test('import css library', async () => { + await page.goto(url) + expect(await getColor('.css-lib')).toBe('blue') +}) diff --git a/playground/ssr-deps/css-lib/index.css b/playground/ssr-deps/css-lib/index.css new file mode 100644 index 00000000000000..d3974e432dc451 --- /dev/null +++ b/playground/ssr-deps/css-lib/index.css @@ -0,0 +1,3 @@ +.css-lib { + color: blue; +} diff --git a/playground/ssr-deps/css-lib/package.json b/playground/ssr-deps/css-lib/package.json new file mode 100644 index 00000000000000..2314aeb4530e3e --- /dev/null +++ b/playground/ssr-deps/css-lib/package.json @@ -0,0 +1,6 @@ +{ + "name": "@vitejs/css-lib", + "private": true, + "version": "0.0.0", + "main": "./index.css" +} diff --git a/playground/ssr-deps/index.html b/playground/ssr-deps/index.html index b1e884efaab01a..bc482a33e118ae 100644 --- a/playground/ssr-deps/index.html +++ b/playground/ssr-deps/index.html @@ -8,5 +8,9 @@

SSR Dependencies

+ diff --git a/playground/ssr-deps/package.json b/playground/ssr-deps/package.json index 13e7c627a2139e..ac82dadbcead63 100644 --- a/playground/ssr-deps/package.json +++ b/playground/ssr-deps/package.json @@ -9,6 +9,7 @@ "debug": "node --inspect-brk server" }, "dependencies": { + "@vitejs/css-lib": "file:./css-lib", "bcrypt": "^5.0.1", "define-properties-exports": "file:./define-properties-exports", "define-property-exports": "file:./define-property-exports", diff --git a/playground/ssr-deps/src/app.js b/playground/ssr-deps/src/app.js index 0b0fe2d9b968ec..3afb1b00caf5ab 100644 --- a/playground/ssr-deps/src/app.js +++ b/playground/ssr-deps/src/app.js @@ -13,6 +13,7 @@ import noExternalCjs from 'no-external-cjs' import importBuiltinCjs from 'import-builtin-cjs' import { hello as linkedNoExternal } from 'linked-no-external' import virtualMessage from 'pkg-exports/virtual' +import '@vitejs/css-lib' // This import will set a 'Hello World!" message in the nested-external non-entry dependency import 'non-optimized-with-nested-external' @@ -82,5 +83,7 @@ export async function render(url, rootDir) { html += `\n

message from dep-virtual: ${virtualMessage}

` + html += `\n

I should be blue

` + return html + '\n' } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 72a73e224d09ed..3954300280e8e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -894,6 +894,7 @@ importers: playground/ssr-deps: specifiers: + '@vitejs/css-lib': file:./css-lib bcrypt: ^5.0.1 cross-env: ^7.0.3 define-properties-exports: file:./define-properties-exports @@ -917,6 +918,7 @@ importers: require-absolute: file:./require-absolute ts-transpiled-exports: file:./ts-transpiled-exports dependencies: + '@vitejs/css-lib': file:playground/ssr-deps/css-lib bcrypt: 5.0.1 define-properties-exports: file:playground/ssr-deps/define-properties-exports define-property-exports: file:playground/ssr-deps/define-property-exports @@ -941,6 +943,9 @@ importers: cross-env: 7.0.3 express: 4.18.1 + playground/ssr-deps/css-lib: + specifiers: {} + playground/ssr-deps/define-properties-exports: specifiers: {} @@ -9219,6 +9224,12 @@ packages: version: 0.0.0 dev: false + file:playground/ssr-deps/css-lib: + resolution: {directory: playground/ssr-deps/css-lib, type: directory} + name: '@vitejs/css-lib' + version: 0.0.0 + dev: false + file:playground/ssr-deps/define-properties-exports: resolution: {directory: playground/ssr-deps/define-properties-exports, type: directory} name: define-properties-exports From 10757b84009b27744b0645b75e7951bbbac6a928 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Tue, 9 Aug 2022 12:23:53 +0200 Subject: [PATCH 030/311] release: v3.0.5 --- packages/vite/CHANGELOG.md | 23 +++++++++++++++++++++++ packages/vite/package.json | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index dc92ec8e03ca97..facbc465bbab3a 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,26 @@ +## 3.0.5 (2022-08-09) + +* fix: allow tree-shake glob eager css in js (#9547) ([2e309d6](https://github.com/vitejs/vite/commit/2e309d6)), closes [#9547](https://github.com/vitejs/vite/issues/9547) +* fix: ignore tsconfig target when bundling config (#9457) ([c5e7895](https://github.com/vitejs/vite/commit/c5e7895)), closes [#9457](https://github.com/vitejs/vite/issues/9457) +* fix: log worker plugins in debug mode (#9553) ([c1fa219](https://github.com/vitejs/vite/commit/c1fa219)), closes [#9553](https://github.com/vitejs/vite/issues/9553) +* fix: tree-shake modulepreload polyfill (#9531) ([1f11a70](https://github.com/vitejs/vite/commit/1f11a70)), closes [#9531](https://github.com/vitejs/vite/issues/9531) +* fix: update dep types (fixes #9475) (#9489) ([937cecc](https://github.com/vitejs/vite/commit/937cecc)), closes [#9475](https://github.com/vitejs/vite/issues/9475) [#9489](https://github.com/vitejs/vite/issues/9489) +* fix(build): normalized output log (#9594) ([8bae103](https://github.com/vitejs/vite/commit/8bae103)), closes [#9594](https://github.com/vitejs/vite/issues/9594) +* fix(config): try catch unlink after load (#9577) ([d35a1e2](https://github.com/vitejs/vite/commit/d35a1e2)), closes [#9577](https://github.com/vitejs/vite/issues/9577) +* fix(config): use file url for import path (fixes #9471) (#9473) ([22084a6](https://github.com/vitejs/vite/commit/22084a6)), closes [#9471](https://github.com/vitejs/vite/issues/9471) [#9473](https://github.com/vitejs/vite/issues/9473) +* fix(deps): update all non-major dependencies (#9575) ([8071325](https://github.com/vitejs/vite/commit/8071325)), closes [#9575](https://github.com/vitejs/vite/issues/9575) +* fix(ssr): check root import extension for external (#9494) ([ff89df5](https://github.com/vitejs/vite/commit/ff89df5)), closes [#9494](https://github.com/vitejs/vite/issues/9494) +* fix(ssr): use appendRight for import (#9554) ([dfec6ca](https://github.com/vitejs/vite/commit/dfec6ca)), closes [#9554](https://github.com/vitejs/vite/issues/9554) +* refactor(resolve): remove commonjs plugin handling (#9460) ([2042b91](https://github.com/vitejs/vite/commit/2042b91)), closes [#9460](https://github.com/vitejs/vite/issues/9460) +* chore: init imports var before use (#9569) ([905b8eb](https://github.com/vitejs/vite/commit/905b8eb)), closes [#9569](https://github.com/vitejs/vite/issues/9569) +* chore: node prefix lint (#9514) ([9e9cd23](https://github.com/vitejs/vite/commit/9e9cd23)), closes [#9514](https://github.com/vitejs/vite/issues/9514) +* chore: tidy up eslint config (#9468) ([f4addcf](https://github.com/vitejs/vite/commit/f4addcf)), closes [#9468](https://github.com/vitejs/vite/issues/9468) +* chore(deps): update all non-major dependencies (#9478) ([c530d16](https://github.com/vitejs/vite/commit/c530d16)), closes [#9478](https://github.com/vitejs/vite/issues/9478) +* docs: fix incomplete comment (#9466) ([5169c51](https://github.com/vitejs/vite/commit/5169c51)), closes [#9466](https://github.com/vitejs/vite/issues/9466) +* feat(ssr): debug failed node resolve (#9432) ([364aae1](https://github.com/vitejs/vite/commit/364aae1)), closes [#9432](https://github.com/vitejs/vite/issues/9432) + + + ## 3.0.4 (2022-07-29) * fix: __VITE_PUBLIC_ASSET__hash__ in HTML (#9247) ([a2b24ee](https://github.com/vitejs/vite/commit/a2b24ee)), closes [#9247](https://github.com/vitejs/vite/issues/9247) diff --git a/packages/vite/package.json b/packages/vite/package.json index fa53fc2c44efc0..e08659c56f3c35 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.0.4", + "version": "3.0.5", "type": "module", "license": "MIT", "author": "Evan You", From 6d952252c7a3b92b2f82a7c78c230e0a152fd2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 10 Aug 2022 01:34:33 +0900 Subject: [PATCH 031/311] fix: avoid using `import.meta.url` for relative assets if output is not ESM (fixes #9297) (#9381) --- packages/vite/src/node/build.ts | 66 ++++++++++++++++--- packages/vite/src/node/plugins/asset.ts | 8 ++- packages/vite/src/node/plugins/worker.ts | 11 +--- playground/legacy/__tests__/legacy.spec.ts | 6 ++ playground/legacy/index.html | 1 + playground/legacy/main.js | 4 +- .../worker/__tests__/es/es-worker.spec.ts | 7 +- .../worker/__tests__/iife/iife-worker.spec.ts | 7 +- .../relative-base-worker.spec.ts | 10 ++- .../sourcemap-hidden-worker.spec.ts | 2 +- .../sourcemap-inline-worker.spec.ts | 2 +- .../sourcemap/sourcemap-worker.spec.ts | 2 +- playground/worker/index.html | 2 + playground/worker/my-worker.ts | 5 +- playground/worker/vite.svg | 1 + playground/worker/worker/main-module.js | 1 + 16 files changed, 105 insertions(+), 30 deletions(-) create mode 100644 playground/worker/vite.svg diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index 6c8e0169eeeab4..fffeae697abc8b 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -3,6 +3,7 @@ import path from 'node:path' import colors from 'picocolors' import type { ExternalOption, + InternalModuleFormat, ModuleFormat, OutputOptions, Plugin, @@ -826,6 +827,50 @@ function injectSsrFlag>( return { ...(options ?? {}), ssr: true } as T & { ssr: boolean } } +/* + The following functions are copied from rollup + https://github.com/rollup/rollup/blob/c5269747cd3dd14c4b306e8cea36f248d9c1aa01/src/ast/nodes/MetaProperty.ts#L189-L232 + + https://github.com/rollup/rollup + The MIT License (MIT) + Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors) + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +const getResolveUrl = (path: string, URL = 'URL') => `new ${URL}(${path}).href` + +const getRelativeUrlFromDocument = (relativePath: string, umd = false) => + getResolveUrl( + `'${relativePath}', ${ + umd ? `typeof document === 'undefined' ? location.href : ` : '' + }document.currentScript && document.currentScript.src || document.baseURI` + ) + +const relativeUrlMechanisms: Record< + InternalModuleFormat, + (relativePath: string) => string +> = { + amd: (relativePath) => { + if (relativePath[0] !== '.') relativePath = './' + relativePath + return getResolveUrl(`require.toUrl('${relativePath}'), document.baseURI`) + }, + cjs: (relativePath) => + `(typeof document === 'undefined' ? ${getResolveUrl( + `'file:' + __dirname + '/${relativePath}'`, + `(require('u' + 'rl').URL)` + )} : ${getRelativeUrlFromDocument(relativePath)})`, + es: (relativePath) => getResolveUrl(`'${relativePath}', import.meta.url`), + iife: (relativePath) => getRelativeUrlFromDocument(relativePath), + system: (relativePath) => getResolveUrl(`'${relativePath}', module.meta.url`), + umd: (relativePath) => + `(typeof document === 'undefined' && typeof location === 'undefined' ? ${getResolveUrl( + `'file:' + __dirname + '/${relativePath}'`, + `(require('u' + 'rl').URL)` + )} : ${getRelativeUrlFromDocument(relativePath, true)})` +} +/* end of copy */ + export type RenderBuiltAssetUrl = ( filename: string, type: { @@ -842,10 +887,13 @@ export function toOutputFilePathInString( hostId: string, hostType: 'js' | 'css' | 'html', config: ResolvedConfig, + format: InternalModuleFormat, toRelative: ( filename: string, hostType: string - ) => string | { runtime: string } = toImportMetaURLBasedRelativePath + ) => string | { runtime: string } = getToImportMetaURLBasedRelativePath( + format + ) ): string | { runtime: string } { const { renderBuiltUrl } = config.experimental let relative = config.base === '' || config.base === './' @@ -873,15 +921,15 @@ export function toOutputFilePathInString( return config.base + filename } -function toImportMetaURLBasedRelativePath( - filename: string, - importer: string -): { runtime: string } { - return { - runtime: `new URL(${JSON.stringify( +function getToImportMetaURLBasedRelativePath( + format: InternalModuleFormat +): (filename: string, importer: string) => { runtime: string } { + const toRelativePath = relativeUrlMechanisms[format] + return (filename, importer) => ({ + runtime: toRelativePath( path.posix.relative(path.dirname(importer), filename) - )},import.meta.url).href` - } + ) + }) } export function toOutputFilePathWithoutRuntime( diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts index 719269c5934290..0db1301a876fdb 100644 --- a/packages/vite/src/node/plugins/asset.ts +++ b/packages/vite/src/node/plugins/asset.ts @@ -90,7 +90,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin { return `export default ${JSON.stringify(url)}` }, - renderChunk(code, chunk) { + renderChunk(code, chunk, outputOptions) { let match: RegExpExecArray | null let s: MagicString | undefined @@ -115,7 +115,8 @@ export function assetPlugin(config: ResolvedConfig): Plugin { 'asset', chunk.fileName, 'js', - config + config, + outputOptions.format ) const replacementString = typeof replacement === 'string' @@ -138,7 +139,8 @@ export function assetPlugin(config: ResolvedConfig): Plugin { 'public', chunk.fileName, 'js', - config + config, + outputOptions.format ) const replacementString = typeof replacement === 'string' diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index fe2f209b915b60..162a7c2f0f58da 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -308,7 +308,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { } }, - renderChunk(code, chunk) { + renderChunk(code, chunk, outputOptions) { let s: MagicString const result = () => { return ( @@ -334,7 +334,8 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { 'asset', chunk.fileName, 'js', - config + config, + outputOptions.format ) const replacementString = typeof replacement === 'string' @@ -349,12 +350,6 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { } ) } - - // TODO: check if this should be removed - if (config.isWorker) { - s = s.replace('import.meta.url', 'self.location.href') - return result() - } } if (!isWorker) { const workerMap = workerCache.get(config)! diff --git a/playground/legacy/__tests__/legacy.spec.ts b/playground/legacy/__tests__/legacy.spec.ts index e9375e051efa6d..ac9b3d524cf9d5 100644 --- a/playground/legacy/__tests__/legacy.spec.ts +++ b/playground/legacy/__tests__/legacy.spec.ts @@ -63,6 +63,12 @@ test('should load dynamic import with css', async () => { await untilUpdated(() => getColor('#dynamic-css'), 'red', true) }) +test('asset url', async () => { + expect(await page.textContent('#asset-path')).toMatch( + isBuild ? /\/assets\/vite\.\w+\.svg/ : '/vite.svg' + ) +}) + describe.runIf(isBuild)('build', () => { test('should generate correct manifest', async () => { const manifest = readManifest() diff --git a/playground/legacy/index.html b/playground/legacy/index.html index cbf6242fad756b..e2bf74c7d4efaa 100644 --- a/playground/legacy/index.html +++ b/playground/legacy/index.html @@ -6,4 +6,5 @@

+
diff --git a/playground/legacy/main.js b/playground/legacy/main.js index 24959b129f28f2..3a9714cadfea72 100644 --- a/playground/legacy/main.js +++ b/playground/legacy/main.js @@ -1,5 +1,5 @@ import './style.css' -import './vite.svg' +import viteSvgPath from './vite.svg' async function run() { const { fn } = await import('./async.js') @@ -51,6 +51,8 @@ document text('#dynamic-css', 'dynamic import css') }) +text('#asset-path', viteSvgPath) + function text(el, text) { document.querySelector(el).textContent = text } diff --git a/playground/worker/__tests__/es/es-worker.spec.ts b/playground/worker/__tests__/es/es-worker.spec.ts index f65d10a3dbcc05..2bffbb69df6502 100644 --- a/playground/worker/__tests__/es/es-worker.spec.ts +++ b/playground/worker/__tests__/es/es-worker.spec.ts @@ -14,6 +14,11 @@ test('normal', async () => { 'worker bundle with plugin success!', true ) + await untilUpdated( + () => page.textContent('.asset-url'), + isBuild ? '/es/assets/vite.svg' : '/es/vite.svg', + true + ) }) test('TS output', async () => { @@ -51,7 +56,7 @@ describe.runIf(isBuild)('build', () => { test('inlined code generation', async () => { const assetsDir = path.resolve(testDir, 'dist/es/assets') const files = fs.readdirSync(assetsDir) - expect(files.length).toBe(27) + expect(files.length).toBe(28) const index = files.find((f) => f.includes('main-module')) const content = fs.readFileSync(path.resolve(assetsDir, index), 'utf-8') const worker = files.find((f) => f.includes('my-worker')) diff --git a/playground/worker/__tests__/iife/iife-worker.spec.ts b/playground/worker/__tests__/iife/iife-worker.spec.ts index 553159f79bd41a..6a97c8b2023194 100644 --- a/playground/worker/__tests__/iife/iife-worker.spec.ts +++ b/playground/worker/__tests__/iife/iife-worker.spec.ts @@ -10,6 +10,11 @@ test('normal', async () => { () => page.textContent('.bundle-with-plugin'), 'worker bundle with plugin success!' ) + await untilUpdated( + () => page.textContent('.asset-url'), + isBuild ? '/iife/assets/vite.svg' : '/iife/vite.svg', + true + ) }) test('TS output', async () => { @@ -41,7 +46,7 @@ describe.runIf(isBuild)('build', () => { test('inlined code generation', async () => { const assetsDir = path.resolve(testDir, 'dist/iife/assets') const files = fs.readdirSync(assetsDir) - expect(files.length).toBe(15) + expect(files.length).toBe(16) const index = files.find((f) => f.includes('main-module')) const content = fs.readFileSync(path.resolve(assetsDir, index), 'utf-8') const worker = files.find((f) => f.includes('my-worker')) diff --git a/playground/worker/__tests__/relative-base/relative-base-worker.spec.ts b/playground/worker/__tests__/relative-base/relative-base-worker.spec.ts index 89c042ba322b27..11d1c185324fa2 100644 --- a/playground/worker/__tests__/relative-base/relative-base-worker.spec.ts +++ b/playground/worker/__tests__/relative-base/relative-base-worker.spec.ts @@ -14,13 +14,19 @@ test('normal', async () => { 'worker bundle with plugin success!', true ) + await untilUpdated( + () => page.textContent('.asset-url'), + isBuild ? '/other-assets/vite' : '/vite.svg', + true + ) }) test('TS output', async () => { await untilUpdated(() => page.textContent('.pong-ts-output'), 'pong', true) }) -test('inlined', async () => { +// TODO: inline worker should inline assets +test.skip('inlined', async () => { await untilUpdated(() => page.textContent('.pong-inline'), 'pong', true) }) @@ -65,7 +71,7 @@ describe.runIf(isBuild)('build', () => { ) // worker should have all imports resolved and no exports - expect(workerContent).not.toMatch(`import`) + expect(workerContent).not.toMatch(/import(?!\.)/) // accept import.meta.url expect(workerContent).not.toMatch(`export`) // chunk expect(content).toMatch(`new Worker(""+new URL("../worker-entries/`) diff --git a/playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts b/playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts index adb86d4130f25e..80cc7fa63ee900 100644 --- a/playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts +++ b/playground/worker/__tests__/sourcemap-hidden/sourcemap-hidden-worker.spec.ts @@ -9,7 +9,7 @@ describe.runIf(isBuild)('build', () => { const files = fs.readdirSync(assetsDir) // should have 2 worker chunk - expect(files.length).toBe(30) + expect(files.length).toBe(31) const index = files.find((f) => f.includes('main-module')) const content = fs.readFileSync(path.resolve(assetsDir, index), 'utf-8') const indexSourcemap = getSourceMapUrl(content) diff --git a/playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts b/playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts index a80b0d9c3f0708..b56bf23f2b3892 100644 --- a/playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts +++ b/playground/worker/__tests__/sourcemap-inline/sourcemap-inline-worker.spec.ts @@ -9,7 +9,7 @@ describe.runIf(isBuild)('build', () => { const files = fs.readdirSync(assetsDir) // should have 2 worker chunk - expect(files.length).toBe(15) + expect(files.length).toBe(16) const index = files.find((f) => f.includes('main-module')) const content = fs.readFileSync(path.resolve(assetsDir, index), 'utf-8') const indexSourcemap = getSourceMapUrl(content) diff --git a/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts b/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts index a0ad8e7a355b8b..955bf22803ac33 100644 --- a/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts +++ b/playground/worker/__tests__/sourcemap/sourcemap-worker.spec.ts @@ -8,7 +8,7 @@ describe.runIf(isBuild)('build', () => { const assetsDir = path.resolve(testDir, 'dist/iife-sourcemap/assets') const files = fs.readdirSync(assetsDir) // should have 2 worker chunk - expect(files.length).toBe(30) + expect(files.length).toBe(31) const index = files.find((f) => f.includes('main-module')) const content = fs.readFileSync(path.resolve(assetsDir, index), 'utf-8') const indexSourcemap = getSourceMapUrl(content) diff --git a/playground/worker/index.html b/playground/worker/index.html index d444f2ab878b98..1b196e074d0678 100644 --- a/playground/worker/index.html +++ b/playground/worker/index.html @@ -11,11 +11,13 @@

format iife:

.pong .mode .bundle-with-plugin + .asset-url

Response from worker:
mode:
bundle-with-plugin:
+
asset-url:

diff --git a/playground/worker/my-worker.ts b/playground/worker/my-worker.ts index 9a5203711d3375..f31f081e64d15a 100644 --- a/playground/worker/my-worker.ts +++ b/playground/worker/my-worker.ts @@ -1,13 +1,14 @@ import { msg as msgFromDep } from 'dep-to-optimize' import { mode, msg } from './modules/workerImport' import { bundleWithPlugin } from './modules/test-plugin' +import viteSvg from './vite.svg' self.onmessage = (e) => { if (e.data === 'ping') { - self.postMessage({ msg, mode, bundleWithPlugin }) + self.postMessage({ msg, mode, bundleWithPlugin, viteSvg }) } } -self.postMessage({ msg, mode, bundleWithPlugin, msgFromDep }) +self.postMessage({ msg, mode, bundleWithPlugin, msgFromDep, viteSvg }) // for sourcemap console.log('my-worker.js') diff --git a/playground/worker/vite.svg b/playground/worker/vite.svg new file mode 100644 index 00000000000000..e7b8dfb1b2a60b --- /dev/null +++ b/playground/worker/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/playground/worker/worker/main-module.js b/playground/worker/worker/main-module.js index 4f6fa8dd7b6334..a1205a4a7e46b8 100644 --- a/playground/worker/worker/main-module.js +++ b/playground/worker/worker/main-module.js @@ -17,6 +17,7 @@ worker.addEventListener('message', (e) => { text('.pong', e.data.msg) text('.mode', e.data.mode) text('.bundle-with-plugin', e.data.bundleWithPlugin) + text('.asset-url', e.data.viteSvg) }) const inlineWorker = new InlineWorker() From 9d0b18b1cb157f28305fc841f6d98b55b68a7fda Mon Sep 17 00:00:00 2001 From: yoho Date: Wed, 10 Aug 2022 18:14:44 +0800 Subject: [PATCH 032/311] fix: legacy no emit worker (#9500) --- packages/vite/src/node/plugins/worker.ts | 19 ++++++++++++------- playground/legacy/__tests__/legacy.spec.ts | 20 +++++++++++++++----- playground/legacy/index.html | 2 ++ playground/legacy/main.js | 7 +++++++ playground/legacy/module.js | 1 + playground/legacy/worker.js | 5 +++++ 6 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 playground/legacy/module.js create mode 100644 playground/legacy/worker.js diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index 162a7c2f0f58da..25aa49d38a966a 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -351,14 +351,19 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { ) } } - if (!isWorker) { - const workerMap = workerCache.get(config)! - workerMap.assets.forEach((asset) => { - this.emitFile(asset) - workerMap.assets.delete(asset.fileName!) - }) - } return result() + }, + + generateBundle(opts) { + // @ts-ignore asset emits are skipped in legacy bundle + if (opts.__vite_skip_asset_emit__ || isWorker) { + return + } + const workerMap = workerCache.get(config)! + workerMap.assets.forEach((asset) => { + this.emitFile(asset) + workerMap.assets.delete(asset.fileName!) + }) } } } diff --git a/playground/legacy/__tests__/legacy.spec.ts b/playground/legacy/__tests__/legacy.spec.ts index ac9b3d524cf9d5..2a2a0698d65b04 100644 --- a/playground/legacy/__tests__/legacy.spec.ts +++ b/playground/legacy/__tests__/legacy.spec.ts @@ -8,22 +8,32 @@ import { untilUpdated } from '~utils' +test('should load the worker', async () => { + await untilUpdated(() => page.textContent('.worker-message'), 'module', true) +}) + test('should work', async () => { - expect(await page.textContent('#app')).toMatch('Hello') + await untilUpdated(() => page.textContent('#app'), 'Hello', true) }) test('import.meta.env.LEGACY', async () => { - expect(await page.textContent('#env')).toMatch(isBuild ? 'true' : 'false') + await untilUpdated( + () => page.textContent('#env'), + isBuild ? 'true' : 'false', + true + ) }) // https://github.com/vitejs/vite/issues/3400 test('transpiles down iterators correctly', async () => { - expect(await page.textContent('#iterators')).toMatch('hello') + await untilUpdated(() => page.textContent('#iterators'), 'hello', true) }) test('wraps with iife', async () => { - expect(await page.textContent('#babel-helpers')).toMatch( - 'exposed babel helpers: false' + await untilUpdated( + () => page.textContent('#babel-helpers'), + 'exposed babel helpers: false', + true ) }) diff --git a/playground/legacy/index.html b/playground/legacy/index.html index e2bf74c7d4efaa..42b31af83bacdf 100644 --- a/playground/legacy/index.html +++ b/playground/legacy/index.html @@ -6,5 +6,7 @@

+

## worker message:

+
diff --git a/playground/legacy/main.js b/playground/legacy/main.js index 3a9714cadfea72..84b731227425eb 100644 --- a/playground/legacy/main.js +++ b/playground/legacy/main.js @@ -1,5 +1,6 @@ import './style.css' import viteSvgPath from './vite.svg' +import MyWorker from './worker?worker' async function run() { const { fn } = await import('./async.js') @@ -56,3 +57,9 @@ text('#asset-path', viteSvgPath) function text(el, text) { document.querySelector(el).textContent = text } + +const worker = new MyWorker() +worker.postMessage('ping') +worker.addEventListener('message', (ev) => { + text('.worker-message', JSON.stringify(ev.data)) +}) diff --git a/playground/legacy/module.js b/playground/legacy/module.js new file mode 100644 index 00000000000000..8080ab24c9a7f6 --- /dev/null +++ b/playground/legacy/module.js @@ -0,0 +1 @@ +export const module = 'module' diff --git a/playground/legacy/worker.js b/playground/legacy/worker.js new file mode 100644 index 00000000000000..d19cc6c52b9613 --- /dev/null +++ b/playground/legacy/worker.js @@ -0,0 +1,5 @@ +import { module } from './module' + +self.onmessage = () => { + self.postMessage(module) +} From ee7f78faa1ea06fc4d32acc87757006683f46c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 10 Aug 2022 21:13:02 +0900 Subject: [PATCH 033/311] fix(ssr): rename objectPattern dynamic key (fixes #9585) (#9609) --- .../node/ssr/__tests__/ssrTransform.spec.ts | 63 +++++++++++++++++++ packages/vite/src/node/ssr/ssrTransform.ts | 17 +++-- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts index a4e74390d3d3c2..e70a3e30c948cc 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -400,6 +400,30 @@ const a = () => { } " `) + + // #9585 + expect( + await ssrTransformSimpleCode( + ` +import { n, m } from 'foo' +const foo = {} + +{ + const { [n]: m } = foo +} +` + ) + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"foo\\"); + + const foo = {} + + { + const { [__vite_ssr_import_0__.n]: m } = foo + } + " + `) }) test('nested object destructure alias', async () => { @@ -463,6 +487,45 @@ objRest() `) }) +test('object props and methods', async () => { + expect( + await ssrTransformSimpleCode( + ` +import foo from 'foo' + +const bar = 'bar' + +const obj = { + foo() {}, + [foo]() {}, + [bar]() {}, + foo: () => {}, + [foo]: () => {}, + [bar]: () => {}, + bar(foo) {} +} +` + ) + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"foo\\"); + + + const bar = 'bar' + + const obj = { + foo() {}, + [__vite_ssr_import_0__.default]() {}, + [bar]() {}, + foo: () => {}, + [__vite_ssr_import_0__.default]: () => {}, + [bar]: () => {}, + bar(foo) {} + } + " + `) +}) + test('class props', async () => { expect( await ssrTransformSimpleCode( diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index bf1633395ae992..0798d674547fb3 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -230,7 +230,7 @@ async function ssrTransformScript( // { foo } -> { foo: __import_x__.foo } // skip for destructuring patterns if ( - !isNodeInPatternWeakMap.get(parent) || + !isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack) ) { s.appendLeft(id.end, `: ${binding}`) @@ -305,7 +305,10 @@ interface Visitors { onDynamicImport: (node: Node) => void } -const isNodeInPatternWeakMap = new WeakMap<_Node, boolean>() +const isNodeInPatternWeakSet = new WeakSet<_Node>() +const setIsNodeInPattern = (node: Property) => isNodeInPatternWeakSet.add(node) +const isNodeInPattern = (node: _Node): node is Property => + isNodeInPatternWeakSet.has(node) /** * Same logic from \@vue/compiler-core & \@vue/compiler-sfc @@ -425,7 +428,7 @@ function walk( }) } else if (node.type === 'Property' && parent!.type === 'ObjectPattern') { // mark property in destructuring pattern - isNodeInPatternWeakMap.set(node, true) + setIsNodeInPattern(node) } else if (node.type === 'VariableDeclarator') { const parentFunction = findParentFunction(parentStack) if (parentFunction) { @@ -474,8 +477,12 @@ function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _Node[]) { } // property key - // this also covers object destructuring pattern - if (isStaticPropertyKey(id, parent) || isNodeInPatternWeakMap.get(parent)) { + if (isStaticPropertyKey(id, parent)) { + return false + } + + // object destructuring pattern + if (isNodeInPattern(parent) && parent.value === id) { return false } From e45d95f864c76a00408b5f7d7e49a7503d78400f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 10 Aug 2022 22:32:50 +0900 Subject: [PATCH 034/311] fix: json HMR (fixes #9521) (#9610) --- packages/vite/src/node/plugins/importAnalysis.ts | 2 +- packages/vite/src/node/server/hmr.ts | 5 +++++ playground/json/__tests__/json.spec.ts | 16 +++++++++++++++- playground/json/hmr.json | 3 +++ playground/json/index.html | 6 ++++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 playground/json/hmr.json diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index f04cb8625f864b..5041812a96f98e 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -69,7 +69,7 @@ const debug = createDebugger('vite:import-analysis') const clientDir = normalizePath(CLIENT_DIR) -const skipRE = /\.(map|json)$/ +const skipRE = /\.(map|json)($|\?)/ export const canSkipImportAnalysis = (id: string): boolean => skipRE.test(id) || isDirectCSSRequest(id) diff --git a/packages/vite/src/node/server/hmr.ts b/packages/vite/src/node/server/hmr.ts index f96e9353ce0450..a4de1284a7e050 100644 --- a/packages/vite/src/node/server/hmr.ts +++ b/packages/vite/src/node/server/hmr.ts @@ -231,6 +231,11 @@ function propagateUpdate( // if the imports of `node` have not been analyzed, then `node` has not // been loaded in the browser and we should stop propagation. if (node.id && node.isSelfAccepting === undefined) { + debugHmr( + `[propagate update] stop propagation because not analyzed: ${colors.dim( + node.id + )}` + ) return false } diff --git a/playground/json/__tests__/json.spec.ts b/playground/json/__tests__/json.spec.ts index fb55d363a077c5..09530627a580f0 100644 --- a/playground/json/__tests__/json.spec.ts +++ b/playground/json/__tests__/json.spec.ts @@ -1,10 +1,12 @@ import { readFileSync } from 'node:fs' import testJson from '../test.json' -import { isBuild, page } from '~utils' +import hmrJson from '../hmr.json' +import { editFile, isBuild, isServe, page, untilUpdated } from '~utils' const deepJson = require('vue/package.json') const stringified = JSON.stringify(testJson) const deepStringified = JSON.stringify(deepJson) +const hmrStringified = JSON.stringify(hmrJson) test('default import', async () => { expect(await page.textContent('.full')).toBe(stringified) @@ -45,3 +47,15 @@ test('?raw', async () => { readFileSync(require.resolve('../test.json'), 'utf-8') ) }) + +test.runIf(isServe)('should full reload', async () => { + expect(await page.textContent('.hmr')).toBe(hmrStringified) + + editFile('hmr.json', (code) => + code.replace('"this is hmr json"', '"this is hmr update json"') + ) + await untilUpdated( + () => page.textContent('.hmr'), + '"this is hmr update json"' + ) +}) diff --git a/playground/json/hmr.json b/playground/json/hmr.json new file mode 100644 index 00000000000000..2dc497c5321ac4 --- /dev/null +++ b/playground/json/hmr.json @@ -0,0 +1,3 @@ +{ + "hmr": "this is hmr json" +} diff --git a/playground/json/index.html b/playground/json/index.html index 4c93436522e6c8..46ed94ab0463f7 100644 --- a/playground/json/index.html +++ b/playground/json/index.html @@ -25,6 +25,9 @@

JSON Module

Has BOM Tag


 
+

HMR

+

+
 
 
diff --git a/playground/vue-legacy/__tests__/vue-legacy.spec.ts b/playground/vue-legacy/__tests__/vue-legacy.spec.ts
new file mode 100644
index 00000000000000..908e04567ca35b
--- /dev/null
+++ b/playground/vue-legacy/__tests__/vue-legacy.spec.ts
@@ -0,0 +1,10 @@
+import { test } from 'vitest'
+import { getBg, untilUpdated } from '~utils'
+
+test('vue legacy assets', async () => {
+  await untilUpdated(() => getBg('.main'), 'assets/asset', true)
+})
+
+test('async vue legacy assets', async () => {
+  await untilUpdated(() => getBg('.module'), 'assets/asset', true)
+})
diff --git a/playground/vue-legacy/assets/asset.png b/playground/vue-legacy/assets/asset.png
new file mode 100644
index 0000000000000000000000000000000000000000..1b3356a746b8bb5510aaee51f7df5aea4378ee8d
GIT binary patch
literal 12772
zcmch82T)Ym)-H$&N*olL90vnANET3%3IdXIY@%ek$x$T;2*MyJ*+y~(p$Scr3=&#V
zauARp&>%U(zmMb0?|pUet@~cpyH;6pHhZnL_ln2ZQ@20&bcI#;
zRb1q(Z0+v)xLIlXsA|D|?BU{;Y%QIg6L0gA+o+ON#9WUkUItw9LoG
z@?#6qUW)C{L+PnJV3BinvtkkE73P8S3*2B473UQY7PuiMz|A7aFCfInFT^Jx#3LXm
z!7nZ$Ak6af4;zr?W@#;0kvqd6ZB>4C|Jw16ng?OFaZ1@Dk#l`vf1^EO8
zdB6@HgtrsY+>6Hv!TuKqc`F3m&CUgB=j_A+aWuDZc1KFFfs_7u1xFVZmA@G~A$}?f
zsEp6c+=Wkom!Hqk5xUop-3X+H)&CyjpYBFzdAnHgX;>kg-QD289@gxC5d+=*dqL1f
za2g4DXSlngl@s!wyc8Q);kC50l(;P_D#|Y+&o3r=TUJ0oK}c4VUtU3hUkF;26A%>o
zi}s!q0%`69xB83L?r&N-#eYjHA?Idgj&yd@a&~t3%X$xNosrH6TW1#*IXRYVD&}xI
zC+PV)q}!iIwQ{rbu(DKib9Q9;p&SXje{uj3VUgPcf}-N0BI1J3;l%~S#Kq*r`DGQw
z

g*im?5pwfrX+|4DoMU()h{!|*|t{l(IMEdlp|e*D{S!NcF4Z{-Bs-3|CP!Zr*9 z8L#d=`P*7vqbn1>&n!RtU;S=qT#~jM$vQmzE;@a9c-rnezm%%pNUCL4Z?Ol5^T|`4 zavjWJM`*UqD*=L#ruSwfkpg`dg+WwAgBG)AJMJnzGINiKeO4G0eE->l82+&`B7#WJ+>uienjpS%Cf@_)wnS8@Lt-(ODwuJ9`ZNaR1c#{VzAzli%c zdieFczi910Q_uf9Ump#H3qJ49?XDdJEVgU0^-nuX>)vnly30Cxol4=jV*B(2W#5Q= zZoyqw)~|Z99vkShEvcZ%Gul9NJXmfqlB33(l=X+jS8v;gb!7^)K4G4vKK&sm{RpAY zXa|RLM59D+?B_$C1m;mhzR|W9s)a8;N9a~BS?g4pNK%w~aZQtaEyGUaQzjA|;I=b% zPAV^cc(RIern)a4 zhI(|wR30|9!CyKW7Euzj4~l&9N>-|XEj&zlYZ+NWMQTM+Dn>Sa|7#Z3UzI};wxS)M z5iocG$XR&=j~^L|KB-jVe&BB^c~JCVHeabiS7tMKFok0*ep-0e3Ze}V4cW;Q{F;|i zS$nM{@47r;N7}?`S6OPDO>XN^gfMC4@e4?t?VN*ih6ihdqMrioS?+n3lvoDhiA<%h z#p78S=zV$jMN1#_jm?eU)+~D8>Zr&$YG>4s?$aA0;vM3?Ri43*6b~&tl=Uo8va~MT z<>ks>Gs>e#6&&0ooD@PIXPo9!ZnA&c5Gu>&{9rQ2$Q7}1n7}39u$DbUbe3Dtk+hdq zDSK)7{F|d{*}-@89lT@N8WW)f4_Y3)=PQt3&`leqPLEq@F54On3Q{O`3Ek*NVbnPU z3HRC!)K5#DyF3No?si6u5Okc#a@1b3r+N6zae!OadVQefsha>mB{P0x2xXtyPVg#Sd}jsP;8~gz zYK^AUM8?3mAz{VD%2h0EqGie+}5cS z>3_AuW9^jOkayxhI^GLWCW2BtRp*eX>kO{Zk+g}I{px$AXrD-ryTauP;u;cGAfLT- zSD?0wa8lBaDV0a%bnCmP)=Y2PXe(WwysvAq@G|dvY)E8FQlK92Q))iT3C3DNZ8pT0 z^xBNvl&{jZjB>4M1k9s#@C})~){+R}@JjXYof(EmM3e)0b|n*jq=LwAqt8G<_*=l$ zy-rc})-+~(40YP90onyuio3BUUB~A!jMgE_o8VAUF4miGu-@zM8IP`hju<5zye^-k zeG=bdFRG?$R6^-YRJk`*b_GQE*?9u{$k?j=qd=I`1^c7fZWgmLBpnK;9ohqXv^hkb zm1KwQ+FCun1mc|jpv1JDF4(}xQXT}J7S8V~pYc=sgE@#MxS6((3x$#85G*RZy#4l= z_D$T#lY#h=bjIUB>=5fGmcizywk5(jI-HuY;=A^eXQ-7|3Q$rg5^qkMVqV3;15L#r z`WA&tUhStHJSIO3&?$Tri=9^B=*bex>D-yE$OcCG)STFdTs#_K)2-3^B#Lp6yEE{% zttT?<)JM-#X610Il@4oS&l~UWn@J4I5@y7YWV)bF9=ysF-`S(Lrmv$F=$j>r?AAMV z`~IQ~2Rq(1A6u*LH=mlaIty;}AVt{{bG2}8N)veY{ON#G| zpCH<$CHM1gPc&9Ln={MI->rfzD5VHlM%r%=#e?)i9xR0NdRcKHzH@*(KBAU<*+aze z@&F$b-7qY4u%U)i?v875tGFCGyuzB@?88-7t~9C%6lLP2+0-`*xO)4`8BY>llBHIA zFSj;Le1vbJ!xhIx?^M@|-I+0B9W%|Uq{EMtz9bVlw|0=2pF9N1%D?`xYb%W)s_Z?Q zw5Muirs2MfXOsUIiKmDb;NInp-@WzmBTp{(Jxk;B6XG~MXQ`5vo8EAnRpQlzXQ9a9 z!3Rk~>%iuQR)06kG5g-AN+{?GTIg`}Q)j6CSCmmTXr=6K@q)-$Z4-Hk!~l=eM*6Xu zZMowHW>@B!2C)oA6S3x$r-&yGYB`m(_>loreKFC&PRUA^`O%lRRiq;Z?rjb`*v;pJ zt*!1J6CHjRbv0%9u(Ombf}TG=g3g9$q{;QCE~FkBT5$%tc&mFKUJO|@JJ=^+9tWYV zcHn;4f)12eX~~PW^mXNZA!93zoPJb#1>;;8)P`4cE$uaz+&t~!@CAiw|EQfL^B}3f zF9jg>mND)ePKe>1#%q514fPsH#9t%qzh?rglEk>QZ_Q#S3MmsyxInBQwrxZ*1USKb)hd<8YTnSfa_5l-8xQ*+|7iP4f1;m58I6Nje@ z!&YMl^N!J_Ma#1yl5UKug3ZIv5kU?mnZh*qk+(1PrR;?b)S+&<0enT%apJ5 zFK^?Xjd`uq9H+aqjz+>8{MtD~I$=ZOhM?wI1ceCYe#08)QhFz`XJtsE)mbGH?Wl$L z7*BNiovp{)?b03AGKJ^gH_UwqA#NF6R#rSiEk{w#L^3hK87po#Sznl&R;~ej;^gI% zH3rOHhRpJ3T;v#a)rZ)Je9_xt^IaaE28iEEX(-3!BnwHr9~!E08R{0!6!W&V+>ZAmd&NGX)_GdboJJOVB122jrQcpF>VkQf(3Jxylq^JlpORzG5QuFIt@&2KB@ zJ(O@4thYJs1F_F@pwK#lXkYL+E0Mw-EWpqqII@#fdHF2&Bt>7f3CV;uXY77+MXkoC zK4krCRqI{Gg1!citzw11$)V@~A?Yf1tjX~+(xS5a=+pQ?4T{n|DpNAtb>N9o_U`H? zxTM>u_tz#*!{9HSq#VoA_@s5c`eZcrcV>o*QtAy@H`*#U`{VKPBc~|(>Y_uP3Y5NH zDU8hsXm~Gz{CHEuFv&vli0+?0^Lwi4IRkjY%4SG~_2VD~-|71+UD%0CN^hmBgAt=) zewPa366^2i2$M4ymby|i9rn*6a*<(|9%~L&wsVi1s2K>|ZknlXU8bsse4g3V@Y%E4 z-n$)|rxS!HW5DlKQ`S17p3^cN2Ijhi!Gib|3z7kDXm~kbaN!Jf$JLbBV{RlV09AEH zpZeBqUaDG?tGu)^O+6*A>*#p)yr`K`_3R9daq)d)+u+I#VXIqB7R3$JqwwyS9Jhn~ zjJipxGN|G_+U(#>92Ycw4rAt$&hAFTI;o$leDtaOy+aI?|P%Z*CS zB}?tO5t#@h?;VSBwK0+Kv+=t>TF_A@KC?t+T+I*B#8Q)2uX(Ju zt7e{|IKArp0#W`xSZCnr$%P-R9p{qyFtO4Awwo4xEpA4X3lN zdb=ZLd;C%Vb7M5mp|;G4lOIX^%4^CgeRsng-quQ&FhLfx50x(2I}VG*n&CIIwm)Z_ z{KjXS+EW*Rtf*NVcC2Y+4iuFRRRUMCV2HEC@D_!GEAbVRI#z+In~JHW(Vtc*ii7vB z9&RNlS2fraH^KrICe}T*OIsc@x0^9UT8^a-%2JfRVxE4+)47e_ps(nN0;Xw4GM-Vei=p_ z%18j{E+aje{#=GW@Xj2_v?UwnyIm{Ia;!!ZStJ1XV@j)A*BVUqF0Za86rimDv`o*c z=dZOk5!-v&aX4F)F3dK@RWGoU#PNhLPzyaMO;M^>8bifb>{*~>sajn%6ghf0#3@fW zAR|>5usIlRFL7*il(_enbC7j7OaRuwG~%RU&kP`G?t3|e@6-FAH;1UQlJbTGEOFAM zjw|Jk&immjd(P`NTKV;2gEOz#$L#HT2>^(v>icTKIsWCw={aX@P~+za)>3?Yt&%`Flm`>GwnnfRwZA4mCH0QH?>inQ6e#or?<}UtLS9g z!{aKumsX3J!tLGNpF+AS1|J2rW&F}I^6>p1Eo1-D(P_si<7sktg|2r;#2^j(SiN1; z6YebQf!*XT&v(a|N#@$Xi@i4Hf;|m>6=Hk6r?8VSg9_3&%S(iuYX+YW42QOa4o%WW zd|S_@N~B2eo%ZKkW~V=u~H>S$Fw2t>iEi6CblqEt7CkUl4B`YEIKDFpY zz#|;^vV=*`awq7B4fskysB)m(Ok(uAjb}2vG9t7M?nf|A%)Dr ztE%yxDbI4AQGcFtRlmE@T6U>}Vr2EcJq?hM$%taq3ca~qwymHpz?1lf-`W5kW<)qJ zdJeF^o`S!6VL}-6w~m!GQWL}+2$FfImGkKIP%*%OK}C+gK!pvcv~zI#h}d`&Zt*^a zo6q7$#S1R8nHm)o>w?JlF%i3T^KxyZHk+nZ35dFhK?GYXt%U*MI9MfAAF%{E35Z zX5|IIU{qJmR~C#2`izX96>jISe9T~Mmu0wQ>C0Ah52UQA=END~BCkgH{W%Twsg-il zI+QSVcf&Dcj4QyMZv__;%6dNkF#+M`%5SXKU=1~5AaLc5!KIZ_`>WAXl+xTVl#|RS z@t)D$P@b%zF<2kQ{Mq_|G01skF@&E4QZ!e7o_Hnnp}J(RXh*1sSs0wT18>CXt~~|7 zsG0p?JCC7R4hDUV2VwXEMLab9O1Gu#>KL&d4qWlw|>3KC=>ab>^T*Vw@5Dvyf*0YD0(l5oL(wz-)k2H=yMsg79uKt zwHCpIPUd7CH<%2|rBVl}0Tb0}lFhq|=sajhpgx7nkRW+=kR4S7S4KP9IRXWs$bR$; zPyV-OprKgTOORRg@|b>9ksTCt?wtav7j%jTP-l>QbX@WxnxkfhPB0JnX-u$CA9L8M zHGp5n(s??c)V8DEHjsBu)3n3yp_2y;&YYn>`h!c>R~z_+uY5hVRtPw2Q#Yw8C%p#%icDkL6PMXS?@wH)LTUh(4_hS`{p- zr4&sq1`Itk8h!QErL3}Kx5B*&X9U>CChU5_q&T`|2TKMlF`96xj{PHfvp{}S&4fCP zET{6!S#B|=>1SJ4QHL2yU#}OHP`_c;FQKSs3T_eLbac@VJp?a<|;Qqe0 zjJ@bL7PH%-&cQpSkh7vQuB9&$e5%i`bJbrSj=@b=hyX)~H`6|R>or?Ws`B|2=5Lr> zpLw}4xU|gOp_6_Pb*yhdf2-*+uk0W@3ZudyXxgt<46EEdC{!zX+L3WY277{Qb~IP< z(gOZv7GOj-Dh;(_bq&|FRdzYZG1D}y@Y`sAJ075tc{wq-zW`Dfz#HPjB_(yqf$f9@ z0|?uKEd?J9@Xk>8yx|Mmc>&!Snv{C8W4bko+HwqBAxIDz0>qmV_j~_$_8E}&tTorqq&Q*YYqIn zYYq2|tXxpHW^=%fKq(ItBYoLoZ}+V;`T zC-{zURz5G`QB<7Bwt5E}elWX~?S3(quWy|T#9`V3o^m-(6#>S6 zi|3}FiJs`2W0bzy4Zc@6zWLH|QK!(nkOP3Y8j>^ATQPg)yO8w#ig<;&s)XzE*?Jf~ zxpJw?&7Y0Cf%8dS;qL3j8q*kP3U7QuJ8)l2_e{rVk$V&FHBD>YcfWgWJcHD$rbNk3$AQj`y23cVG zWrV2Hc@k*X^!t7)5c71@_|4TMD4bq#nVd0QPmceU-5e}}= z0SdsCU#kTR&A?H~TH)hgA8^K{ zup*pP0%LUpfHCXsqM;qO_O^X7LfW%Z+l7?QwQhsxy%YmjUCXnebI05%tfz=YC#~?F za~ANT+(55-*`p-AI6eCE37YwNO-Mb*j=HuDSugSq)+^gObH^HwmNRG{{$?+We)%!w zEI#ppzL;jfKLDJ-V(mz)Gd3`fY;n-zkOch$uwguqXr*g4h{46)fC1&+rs#WRL%b`o zY>{>C2db%j$Ujp~V*KhZ;v^eB$%!VoxS7)!J*Z4U9e%@HzN?F6v;-$rdL$ zQhX0V4w##nlHh1TlGqG6{n-(N=^BOVCkDG&D?C~^_zGv9#?f6b3F;!!AEmgXs!|!eW&kmK)gabz4456L! zwqX99vlAYrAkeAHeXVB7?4|Wb2IyD!#NM8$FFI+5_q5Gs8mJ#O)xIN*F`oi3#`E>& z#2@njvhfH1IW?wmgJ2AOoz?HFn&YD7ZQ|}VP~gT~v>7f5UcCs~$8wEN{Y-T-Zz^}L zuh5Sa-$f9E3tE_x;x7D{6uAqOd$^pupx)(Jy)=?`7Xcs=jrH_>UkM}(lux(3TxX_~ z_aYTLSt|igAl-xCgYm;Z4tcGn*6xglRr7&yZcop!bOR9AG{v~GgcpFf4!Sd_T$#&Dw*QoqaeotqG2jp+=t)vim+_bDcQPGES4UZ5Bzk_Esy>HLT<&-M#?VfembeX2e*SJT z4^`E5C;E{zRRjTGu-Z&}5Q}xx48Q+5HlrbLmv;<1nw>vaLOk|y9K6r%{1dtqK+r`2 zj5{OJM$)QzT$4L@ZY5m;$1}!UtAJdWSrT>4XIhCUtAgii1j0;%7Wkz1Z+*jo47JJN zwbW3G7S~b^@3H^IS&>#p*0EkYUZ}Pu|BYK*G)-&AKC~`GkKID+4ln@8uVkis{GERk z422pRDc^4=H-~&ysa8dYLllz;fauNDK`fIlNLNC-RCDgzU^=vyvR>0g-EqXz4VZI3 zbvZA?SWB$UriRGW`qV*vT28tyK8uLMHS_QIcM*V^hmF}bTU^x%?@?HocptHJoePHh zG4=T!AeJ5iz@i$5VuaFt8L5K0NwDXOW<*6=q*2&_9wDIintpcj6R|kvQUS!WN6*u- z@U&k6z5M5f8$-e9JJ1_dL(LZneB-?dv+#}u7DI+H09AnI)kB01e;NHvHv4~(lJ7A zSr%KD=ofaSL#E4S;O!k()=GnSZ0sDMYv_0S{En>3lecF2F~5@xOplLvPQ@JOP!%F@ zoGS=)S^wpiN!{qN+ht~UX=*T(D}##SRx|BsBnqR%A^7A204XwW4wtptI-WjP01!nF zV24H8pW`=iUod`44eZU|!>kK*?r71qK&;tQ_L)g1bmBX;7_ToaESREE+Zb(S1K5=T z8i=?iW_toVkwckC{PFN5EIw`_z&m75avi*vHl@MrazZgOuy!_Bq=>|O$x!vxSoe)T z0>X?2?0Nw3-73yoZ;wM^?tyx(T1d66Im8&qLJWo>VGg2M0>prHvzP>D1>vuXVj5bU zUvl!E(7H|6jvHM8bTsFOb?XLyW0HaW{(z!%{Z){8Y%|L)0&3A;CtN2*C7n#CJSQY0 zOv>=fpdbd`j}o<(6Gc(h6lmtj*lKtm|ibroh%QL_Ev>4=NQL-!n@YWXFnB7j_AG#{>=QMhW zdA|*W&uR2&l*7=U8+LykKB+ra?lpFyC8HDo;}cQg$)|w{BgH@F%IY#}!8(zr$qr)! zdS|Ki@F&DfOBrNc>fDY3IalT{22uDc)){or1ZJpGbExdW6#KGe`Vc|)yJeMcN)cx^xJrGGfNNBMK zM$rOD;KKY!l$`@aP-KkSPk?RCW!=bzwhw*sn%&0Yz=p2AKUXGkD5(q*sP!ucps3V{^8cW7WfI#v`F+z_MpS<8|i^b{}<`S*bHs(-P zteX+(HkOcJeSr$=xlGXJinLzDLLth&Kz>gzI4~F$C~$ZYS7i#EA<}DNFlHJxvHCK! zq5=m=IH)Fx&bf}VmP_lgDMEpc9?)1GJhWB2M$mQ1?moz6F+e8*#(Vrijr_6gXIaef zjYA99Lcohp8lTQ0DCHLZK&}9QuE%0ZjtlGNzY*{%S{#TVwt86i+ZuMYoU{eb z#)trlq877k^Auiv5dO&Xj>I5f!u`jde&KO9f9VcP+L`bSb!j#5*!5&9-GbJpS_wut zL^JYI7U7urZWAeihA7ZL?2mHu=q(SU;cK<{Bo$NDM*+~}>_i%wt`+|1`z<2fbdB?i z&XeyRzvHI`FU7a&6Or7|2_I_CM*V1o7kx!@;2=b9J+Ee~(2Ykq*C$1TMi#%`0(>wd z3dY!rhEYfoK(Z)M6}(d|xRu&5PzEyo>mi_*nXpVgt?&kfxr7He(Uxte4?ohgKz^!P zl2Hhp*k}Alo7yj#5={lMbOP=ehczytlv+DL76R{ByktrQy3nmcsc$sEJF$G=(uA^A zavVN`(a2}e2B9e;oVnGaIC&17faIE}Zzw)=zrKqTGVS}tbW*ImwF}@JOxhP|jKC%F zUz&6}Ylf$}CcA+77e5Uzsbjhzca8ryJz#n48sN?sy2=@^=cbzl#|Nek+HwY#Ij|6{;EtnMn>5~^3_?j|usez*SXjmlq*%sG1+l z-hh_67df3O2b|)a2nb$5q-b7iM$Prl3}6M{)5?~QtL3q;_-8uscpKyqFCL&!J(nmg zdmt^ebx79tJ}q?*Jg*&Sk0cV<(_!(7mc_gKnRKAm@LRGjAEGeI9P<;#d630P^1!f9 zBh(vl?K8-kLFQ1p5J3**wbs?}{#ar4bhO39qwF!7JiuTy9>B(XHbpqj50$vQgr*n- zpX?V?W0%w7y>}}D@tqqFh;$8K;6DXnc2rI*hZq$0?A4M4O5f84gkG*ahT0Z=PAZj9 zREa{FYR&D)L|OR9BXk##sb*@b1wWI3yNn(v*{Xqe+-lhdK(Dua0fQg?P4pGbA`nDh zz-K@HD2y)0fV@Y!^WgU4D#Hxr zc;Z7muz&O69b3XMmqzkze*iOs_JQh#K^qb3GE{Q!kPK`fo;kp#(PkX`U%?3h2Hekp zF{ZJ`H{~&YuA??VvpNq&lJoI;MxYPT!m!7aL2L6*SdESw-jMdhdzJ1*Qn#{!s9)h~as!ad0K%@fDpf90I<4(3eq`@}GcpOMwk}t)^u{)$dg$b=- zI%yHKvk+dP2C=vSSPZn8`P2BZ;UIX(ZP$5VvbahcWL$FDIzR z8<0Yy1G!mmU4gIHr4rRKBA`tFIc3!LOl4M@>ezYkcns2?>+i@hAD01imLq{41sL(a zvEi|en^K}cQ6veV@*c(PhbVvl z1j}B4%FrVcee%%NRRzCp%m4zaBDcnvMyD0L(ptXNKrBmvLj_RQF2kntiq-nh0iJTx z#3-D8Q^!>V2NiTdD;@jyvx%_*|kRtWKpG%IZ+;g${P-g=xg>)s zMpIibKaDC@dJf4y3xHuBZ@_8Z77eh}ts9_>($#kHGFb>pop1VMlSlS-ju8m$M&b$P zp7o(s;^`%FZSqB`$#-XbR6wTkA(N3YM(*~(AbmiU13*1HvPL(}14f|H*HK(@zWZVU zt8-g#A?}jEq(ibpV$sZwnd#@iC!WzQAXgRkHp(OfoCmiTV*(q%0I6a>HhfD6P&6^f z4(`f%4kaHA7=N1r8Vn+ll$G34K0SSK;0$q$1|q>UX!YgEfcv*bkR$Mnt3@g%@{9`@ zZj~Sk7+&*1r&sF;0Iu@#A)vr(idnxZ`=5Lk`(OBc6{zU{@~dH>r2pV+-dUp^217t6nVH5`QcetM1u@7n`oi#fYSDd_)Q+*44MFP1fX{69{$*5UvF literal 0 HcmV?d00001 diff --git a/playground/vue-legacy/env.d.ts b/playground/vue-legacy/env.d.ts new file mode 100644 index 00000000000000..31dca6bb40c906 --- /dev/null +++ b/playground/vue-legacy/env.d.ts @@ -0,0 +1 @@ +declare module '*.png' diff --git a/playground/vue-legacy/index.html b/playground/vue-legacy/index.html new file mode 100644 index 00000000000000..0f7b79435ed47d --- /dev/null +++ b/playground/vue-legacy/index.html @@ -0,0 +1,7 @@ +

+ diff --git a/playground/vue-legacy/inline.css b/playground/vue-legacy/inline.css new file mode 100644 index 00000000000000..2207a25763ca6d --- /dev/null +++ b/playground/vue-legacy/inline.css @@ -0,0 +1,3 @@ +.inline-css { + color: #0088ff; +} diff --git a/playground/vue-legacy/module.vue b/playground/vue-legacy/module.vue new file mode 100644 index 00000000000000..10c7b42e4c4215 --- /dev/null +++ b/playground/vue-legacy/module.vue @@ -0,0 +1,13 @@ + + diff --git a/playground/vue-legacy/package.json b/playground/vue-legacy/package.json new file mode 100644 index 00000000000000..201a5ae47bb293 --- /dev/null +++ b/playground/vue-legacy/package.json @@ -0,0 +1,18 @@ +{ + "name": "test-vue-legacy", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../packages/vite/bin/vite", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.2.37" + }, + "devDependencies": { + "@vitejs/plugin-vue": "workspace:*", + "@vitejs/plugin-legacy": "workspace:*" + } +} diff --git a/playground/vue-legacy/vite.config.ts b/playground/vue-legacy/vite.config.ts new file mode 100644 index 00000000000000..5bb2f0efa06f53 --- /dev/null +++ b/playground/vue-legacy/vite.config.ts @@ -0,0 +1,35 @@ +import path from 'node:path' +import fs from 'node:fs' +import { defineConfig } from 'vite' +import vuePlugin from '@vitejs/plugin-vue' +import legacyPlugin from '@vitejs/plugin-legacy' + +export default defineConfig({ + base: '', + resolve: { + alias: { + '@': __dirname + } + }, + plugins: [ + legacyPlugin({ + targets: ['defaults', 'not IE 11', 'chrome > 48'] + }), + vuePlugin() + ], + build: { + minify: false + }, + // special test only hook + // for tests, remove ` + +

test elements below should show circles and their url

+
+
diff --git a/playground/assets-sanitize/index.js b/playground/assets-sanitize/index.js new file mode 100644 index 00000000000000..bac3b3b83e6b1d --- /dev/null +++ b/playground/assets-sanitize/index.js @@ -0,0 +1,9 @@ +import plusCircle from './+circle.svg' +import underscoreCircle from './_circle.svg' +function setData(classname, file) { + const el = document.body.querySelector(classname) + el.style.backgroundImage = `url(${file})` + el.textContent = file +} +setData('.plus-circle', plusCircle) +setData('.underscore-circle', underscoreCircle) diff --git a/playground/assets-sanitize/package.json b/playground/assets-sanitize/package.json new file mode 100644 index 00000000000000..3ade78a2bd33fe --- /dev/null +++ b/playground/assets-sanitize/package.json @@ -0,0 +1,11 @@ +{ + "name": "test-assets-sanitize", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../packages/vite/bin/vite", + "preview": "vite preview" + } +} diff --git a/playground/assets-sanitize/vite.config.js b/playground/assets-sanitize/vite.config.js new file mode 100644 index 00000000000000..0e365a95383833 --- /dev/null +++ b/playground/assets-sanitize/vite.config.js @@ -0,0 +1,11 @@ +const { defineConfig } = require('vite') + +module.exports = defineConfig({ + build: { + //speed up build + minify: false, + target: 'esnext', + assetsInlineLimit: 0, + manifest: true + } +}) From eec38860670a84b17d839500d812b27f61ebdf79 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Fri, 19 Aug 2022 20:55:04 +0800 Subject: [PATCH 080/311] fix: handle resolve optional peer deps (#9321) --- .../src/node/optimizer/esbuildDepPlugin.ts | 24 ++++++++++++- packages/vite/src/node/plugins/resolve.ts | 35 +++++++++++++++++++ packages/vite/src/node/utils.ts | 8 ++++- .../__tests__/optimize-deps.spec.ts | 13 +++++++ .../dep-with-optional-peer-dep/index.js | 7 ++++ .../dep-with-optional-peer-dep/package.json | 15 ++++++++ playground/optimize-deps/index.html | 10 ++++++ playground/optimize-deps/package.json | 1 + pnpm-lock.yaml | 20 +++++++++++ 9 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 playground/optimize-deps/dep-with-optional-peer-dep/index.js create mode 100644 playground/optimize-deps/dep-with-optional-peer-dep/package.json diff --git a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts index 57e67c2b47a166..04c978130f256c 100644 --- a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts +++ b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts @@ -12,7 +12,7 @@ import { moduleListContains, normalizePath } from '../utils' -import { browserExternalId } from '../plugins/resolve' +import { browserExternalId, optionalPeerDepId } from '../plugins/resolve' import type { ExportsData } from '.' const externalWithConversionNamespace = @@ -93,6 +93,12 @@ export function esbuildDepPlugin( namespace: 'browser-external' } } + if (resolved.startsWith(optionalPeerDepId)) { + return { + path: resolved, + namespace: 'optional-peer-dep' + } + } if (ssr && isBuiltin(resolved)) { return } @@ -279,6 +285,22 @@ module.exports = Object.create(new Proxy({}, { } ) + build.onLoad( + { filter: /.*/, namespace: 'optional-peer-dep' }, + ({ path }) => { + if (config.isProduction) { + return { + contents: 'module.exports = {}' + } + } else { + const [, peerDep, parentDep] = path.split(':') + return { + contents: `throw new Error(\`Could not resolve "${peerDep}" imported by "${parentDep}". Is it installed?\`)` + } + } + } + ) + // yarn 2 pnp compat if (isRunningWithYarnPnp) { build.onResolve( diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index 13ac18ae384371..f33105d265a27a 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -30,6 +30,7 @@ import { isPossibleTsOutput, isTsRequest, isWindows, + lookupFile, nestedResolveFrom, normalizePath, resolveFrom, @@ -44,6 +45,8 @@ import { loadPackageData, resolvePackageData } from '../packages' // special id for paths marked with browser: false // https://github.com/defunctzombie/package-browser-field-spec#ignore-a-module export const browserExternalId = '__vite-browser-external' +// special id for packages that are optional peer deps +export const optionalPeerDepId = '__vite-optional-peer-dep' const isDebug = process.env.DEBUG const debug = createDebugger('vite:resolve-details', { @@ -365,6 +368,14 @@ export default new Proxy({}, { })` } } + if (id.startsWith(optionalPeerDepId)) { + if (isProduction) { + return `export default {}` + } else { + const [, peerDep, parentDep] = id.split(':') + return `throw new Error(\`Could not resolve "${peerDep}" imported by "${parentDep}". Is it installed?\`)` + } + } } } } @@ -618,6 +629,30 @@ export function tryNodeResolve( })! if (!pkg) { + // if import can't be found, check if it's an optional peer dep. + // if so, we can resolve to a special id that errors only when imported. + if ( + basedir !== root && // root has no peer dep + !isBuiltin(id) && + !id.includes('\0') && + bareImportRE.test(id) + ) { + // find package.json with `name` as main + const mainPackageJson = lookupFile(basedir, ['package.json'], { + predicate: (content) => !!JSON.parse(content).name + }) + if (mainPackageJson) { + const mainPkg = JSON.parse(mainPackageJson) + if ( + mainPkg.peerDependencies?.[id] && + mainPkg.peerDependenciesMeta?.[id]?.optional + ) { + return { + id: `${optionalPeerDepId}:${id}:${mainPkg.name}` + } + } + } + } return } diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 85f85adf3cf550..0f681ec8f7378f 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -390,6 +390,7 @@ export function isDefined(value: T | undefined | null): value is T { interface LookupFileOptions { pathOnly?: boolean rootDir?: string + predicate?: (file: string) => boolean } export function lookupFile( @@ -400,7 +401,12 @@ export function lookupFile( for (const format of formats) { const fullPath = path.join(dir, format) if (fs.existsSync(fullPath) && fs.statSync(fullPath).isFile()) { - return options?.pathOnly ? fullPath : fs.readFileSync(fullPath, 'utf-8') + const result = options?.pathOnly + ? fullPath + : fs.readFileSync(fullPath, 'utf-8') + if (!options?.predicate || options.predicate(result)) { + return result + } } } const parentDir = path.dirname(dir) diff --git a/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/playground/optimize-deps/__tests__/optimize-deps.spec.ts index df0c080f09ab47..fd717b0401499b 100644 --- a/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -88,6 +88,19 @@ test('dep with dynamic import', async () => { ) }) +test('dep with optional peer dep', async () => { + expect(await page.textContent('.dep-with-optional-peer-dep')).toMatch( + `[success]` + ) + if (isServe) { + expect(browserErrors.map((error) => error.message)).toEqual( + expect.arrayContaining([ + 'Could not resolve "foobar" imported by "dep-with-optional-peer-dep". Is it installed?' + ]) + ) + } +}) + test('dep with css import', async () => { expect(await getColor('.dep-linked-include')).toBe('red') }) diff --git a/playground/optimize-deps/dep-with-optional-peer-dep/index.js b/playground/optimize-deps/dep-with-optional-peer-dep/index.js new file mode 100644 index 00000000000000..bce89ca18f3ad7 --- /dev/null +++ b/playground/optimize-deps/dep-with-optional-peer-dep/index.js @@ -0,0 +1,7 @@ +export function callItself() { + return '[success]' +} + +export async function callPeerDep() { + return await import('foobar') +} diff --git a/playground/optimize-deps/dep-with-optional-peer-dep/package.json b/playground/optimize-deps/dep-with-optional-peer-dep/package.json new file mode 100644 index 00000000000000..bf43db6b7919d9 --- /dev/null +++ b/playground/optimize-deps/dep-with-optional-peer-dep/package.json @@ -0,0 +1,15 @@ +{ + "name": "dep-with-optional-peer-dep", + "private": true, + "version": "0.0.0", + "main": "index.js", + "type": "module", + "peerDependencies": { + "foobar": "0.0.0" + }, + "peerDependenciesMeta": { + "foobar": { + "optional": true + } + } +} diff --git a/playground/optimize-deps/index.html b/playground/optimize-deps/index.html index 7b0c43e82fdcbc..fe507e9ba568f4 100644 --- a/playground/optimize-deps/index.html +++ b/playground/optimize-deps/index.html @@ -59,6 +59,9 @@

Import from dependency with dynamic import

+

Import from dependency with optional peer dep

+
+

Dep w/ special file format supported via plugins

@@ -152,6 +155,13 @@

Flatten Id

text('.reused-variable-names', reusedName) + + diff --git a/playground/object-hooks/main.ts b/playground/object-hooks/main.ts new file mode 100644 index 00000000000000..8e4878d209bf9e --- /dev/null +++ b/playground/object-hooks/main.ts @@ -0,0 +1,2 @@ +const app = document.getElementById('transform') +app.innerText = '__TRANSFORM__' diff --git a/playground/object-hooks/package.json b/playground/object-hooks/package.json new file mode 100644 index 00000000000000..380aaa142fd0c4 --- /dev/null +++ b/playground/object-hooks/package.json @@ -0,0 +1,14 @@ +{ + "name": "test-extensions", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "debug": "node --inspect-brk ../../packages/vite/bin/vite", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.2.37" + } +} diff --git a/playground/object-hooks/vite.config.ts b/playground/object-hooks/vite.config.ts new file mode 100644 index 00000000000000..554462dc730df3 --- /dev/null +++ b/playground/object-hooks/vite.config.ts @@ -0,0 +1,69 @@ +/* eslint-disable import/no-nodejs-modules */ +import assert from 'assert' +import { defineConfig } from 'vite' + +let count = 0 +export default defineConfig({ + plugins: [ + { + name: 'plugin1', + buildStart: { + async handler() { + await new Promise((r) => setTimeout(r, 100)) + count += 1 + } + }, + transform: { + order: 'post', + handler(code) { + return code.replace('__TRANSFORM3__', 'ok') + } + } + }, + { + name: 'plugin2', + buildStart: { + sequential: true, + async handler() { + assert(count === 1) + await new Promise((r) => setTimeout(r, 100)) + count += 1 + } + }, + transform: { + handler(code) { + return code.replace('__TRANSFORM1__', '__TRANSFORM2__') + } + } + }, + { + name: 'plugin3', + buildStart: { + async handler() { + assert(count === 2) + await new Promise((r) => setTimeout(r, 100)) + count += 1 + } + }, + transform: { + order: 'pre', + handler(code) { + return code.replace('__TRANSFORM__', '__TRANSFORM1__') + } + } + }, + { + name: 'plugin4', + buildStart: { + async handler() { + assert(count === 2) + } + }, + transform: { + handler(code) { + return code.replace('__TRANSFORM2__', '__TRANSFORM3__') + } + } + } + ] +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a0a8309eddca4..a424c935ca9be2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,7 +51,7 @@ importers: prettier: 2.7.1 prompts: ^2.4.2 rimraf: ^3.0.2 - rollup: '>=2.75.6 <2.77.0 || ~2.77.0' + rollup: ~2.78.0 semver: ^7.3.7 simple-git-hooks: ^2.8.0 tslib: ^2.4.0 @@ -65,7 +65,7 @@ importers: devDependencies: '@babel/types': 7.18.10 '@microsoft/api-extractor': 7.29.2 - '@rollup/plugin-typescript': 8.3.4_nzsoit4cp576bo3qoi6msb73em + '@rollup/plugin-typescript': 8.3.4_7emp2e44zzc74lnyjhc37gdv4y '@types/babel__core': 7.1.19 '@types/babel__standalone': 7.1.4 '@types/convert-source-map': 1.5.2 @@ -104,7 +104,7 @@ importers: prettier: 2.7.1 prompts: 2.4.2 rimraf: 3.0.2 - rollup: 2.77.0 + rollup: 2.78.0 semver: 7.3.7 simple-git-hooks: 2.8.0 tslib: 2.4.0 @@ -171,7 +171,7 @@ importers: '@jridgewell/gen-mapping': ^0.3.2 '@jridgewell/trace-mapping': ^0.3.15 debug: ^4.3.4 - rollup: '>=2.75.6 <2.77.0 || ~2.77.0' + rollup: ~2.78.0 slash: ^4.0.0 source-map: ^0.6.1 vite: workspace:* @@ -180,7 +180,7 @@ importers: '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.15 debug: 4.3.4 - rollup: 2.77.0 + rollup: 2.78.0 slash: 4.0.0 source-map: 0.6.1 vite: link:../vite @@ -249,7 +249,7 @@ importers: postcss-modules: ^5.0.0 resolve: ^1.22.1 resolve.exports: ^1.1.0 - rollup: '>=2.75.6 <2.77.0 || ~2.77.0' + rollup: ~2.78.0 rollup-plugin-license: ^2.8.1 sirv: ^2.0.2 source-map-js: ^1.0.2 @@ -265,7 +265,7 @@ importers: esbuild: 0.14.47 postcss: 8.4.16 resolve: 1.22.1 - rollup: 2.77.0 + rollup: 2.78.0 optionalDependencies: fsevents: 2.3.2 devDependencies: @@ -273,12 +273,12 @@ importers: '@babel/parser': 7.18.11 '@babel/types': 7.18.10 '@jridgewell/trace-mapping': 0.3.15 - '@rollup/plugin-alias': 3.1.9_rollup@2.77.0 - '@rollup/plugin-commonjs': 22.0.2_rollup@2.77.0 - '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.77.0 - '@rollup/plugin-json': 4.1.0_rollup@2.77.0 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.77.0 - '@rollup/plugin-typescript': 8.3.4_rollup@2.77.0+tslib@2.4.0 + '@rollup/plugin-alias': 3.1.9_rollup@2.78.0 + '@rollup/plugin-commonjs': 22.0.2_rollup@2.78.0 + '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.78.0 + '@rollup/plugin-json': 4.1.0_rollup@2.78.0 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.78.0 + '@rollup/plugin-typescript': 8.3.4_rollup@2.78.0+tslib@2.4.0 '@rollup/pluginutils': 4.2.1 '@vue/compiler-dom': 3.2.37 acorn: 8.8.0 @@ -311,7 +311,7 @@ importers: postcss-load-config: 4.0.1_postcss@8.4.16 postcss-modules: 5.0.0_postcss@8.4.16 resolve.exports: 1.1.0 - rollup-plugin-license: 2.8.1_rollup@2.77.0 + rollup-plugin-license: 2.8.1_rollup@2.78.0 sirv: 2.0.2 source-map-js: 1.0.2 source-map-support: 0.5.21 @@ -613,6 +613,12 @@ importers: dependencies: test-package-e-excluded: link:../test-package-e-excluded + playground/object-hooks: + specifiers: + vue: ^3.2.37 + dependencies: + vue: 3.2.37 + playground/optimize-deps: specifiers: '@vitejs/plugin-vue': workspace:* @@ -2372,16 +2378,6 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rollup/plugin-alias/3.1.9_rollup@2.77.0: - resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} - engines: {node: '>=8.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - dependencies: - rollup: 2.77.0 - slash: 3.0.0 - dev: true - /@rollup/plugin-alias/3.1.9_rollup@2.78.0: resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} engines: {node: '>=8.0.0'} @@ -2392,22 +2388,6 @@ packages: slash: 3.0.0 dev: true - /@rollup/plugin-commonjs/22.0.2_rollup@2.77.0: - resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} - engines: {node: '>= 12.0.0'} - peerDependencies: - rollup: ^2.68.0 - dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.77.0 - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 7.2.0 - is-reference: 1.2.1 - magic-string: 0.25.9 - resolve: 1.22.1 - rollup: 2.77.0 - dev: true - /@rollup/plugin-commonjs/22.0.2_rollup@2.78.0: resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} engines: {node: '>= 12.0.0'} @@ -2424,7 +2404,7 @@ packages: rollup: 2.78.0 dev: true - /@rollup/plugin-dynamic-import-vars/1.4.4_rollup@2.77.0: + /@rollup/plugin-dynamic-import-vars/1.4.4_rollup@2.78.0: resolution: {integrity: sha512-51BcU6ag9EeF09CtEsa5D/IHYo7KI42TR1Jc4doNzV1nHAiH7TvUi5vsLERFMjs9Gzy9K0otbZH/2wb0hpBhRA==} engines: {node: '>= 10.0.0'} peerDependencies: @@ -2434,16 +2414,7 @@ packages: estree-walker: 2.0.2 fast-glob: 3.2.11 magic-string: 0.25.9 - rollup: 2.77.0 - dev: true - - /@rollup/plugin-json/4.1.0_rollup@2.77.0: - resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.77.0 - rollup: 2.77.0 + rollup: 2.78.0 dev: true /@rollup/plugin-json/4.1.0_rollup@2.78.0: @@ -2455,21 +2426,6 @@ packages: rollup: 2.78.0 dev: true - /@rollup/plugin-node-resolve/13.3.0_rollup@2.77.0: - resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} - engines: {node: '>= 10.0.0'} - peerDependencies: - rollup: ^2.42.0 - dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.77.0 - '@types/resolve': 1.17.1 - deepmerge: 4.2.2 - is-builtin-module: 3.1.0 - is-module: 1.0.0 - resolve: 1.22.1 - rollup: 2.77.0 - dev: true - /@rollup/plugin-node-resolve/13.3.0_rollup@2.78.0: resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} engines: {node: '>= 10.0.0'} @@ -2495,7 +2451,7 @@ packages: rollup: 2.78.0 dev: true - /@rollup/plugin-typescript/8.3.4_nzsoit4cp576bo3qoi6msb73em: + /@rollup/plugin-typescript/8.3.4_7emp2e44zzc74lnyjhc37gdv4y: resolution: {integrity: sha512-wt7JnYE9antX6BOXtsxGoeVSu4dZfw0dU3xykfOQ4hC3EddxRbVG/K0xiY1Wup7QOHJcjLYXWAn0Kx9Z1SBHHg==} engines: {node: '>=8.0.0'} peerDependencies: @@ -2506,14 +2462,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.77.0 + '@rollup/pluginutils': 3.1.0_rollup@2.78.0 resolve: 1.22.1 - rollup: 2.77.0 + rollup: 2.78.0 tslib: 2.4.0 typescript: 4.6.4 dev: true - /@rollup/plugin-typescript/8.3.4_rollup@2.77.0+tslib@2.4.0: + /@rollup/plugin-typescript/8.3.4_rollup@2.78.0+tslib@2.4.0: resolution: {integrity: sha512-wt7JnYE9antX6BOXtsxGoeVSu4dZfw0dU3xykfOQ4hC3EddxRbVG/K0xiY1Wup7QOHJcjLYXWAn0Kx9Z1SBHHg==} engines: {node: '>=8.0.0'} peerDependencies: @@ -2524,24 +2480,12 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.77.0 + '@rollup/pluginutils': 3.1.0_rollup@2.78.0 resolve: 1.22.1 - rollup: 2.77.0 + rollup: 2.78.0 tslib: 2.4.0 dev: true - /@rollup/pluginutils/3.1.0_rollup@2.77.0: - resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} - engines: {node: '>= 8.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - dependencies: - '@types/estree': 0.0.39 - estree-walker: 1.0.1 - picomatch: 2.3.1 - rollup: 2.77.0 - dev: true - /@rollup/pluginutils/3.1.0_rollup@2.78.0: resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} engines: {node: '>= 8.0.0'} @@ -7923,7 +7867,7 @@ packages: - supports-color dev: true - /rollup-plugin-license/2.8.1_rollup@2.77.0: + /rollup-plugin-license/2.8.1_rollup@2.78.0: resolution: {integrity: sha512-VYd9pzaNL7NN6xQp93XiiCV2UoduXgSmTcz6rl9bHPdiifT6yH3Zw/omEr73Rq8TIyN4nqJACBbKIT/2eE66wg==} engines: {node: '>=10.0.0'} peerDependencies: @@ -7936,25 +7880,17 @@ packages: mkdirp: 1.0.4 moment: 2.29.3 package-name-regex: 2.0.6 - rollup: 2.77.0 + rollup: 2.78.0 spdx-expression-validate: 2.0.0 spdx-satisfies: 5.0.1 dev: true - /rollup/2.77.0: - resolution: {integrity: sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - /rollup/2.78.0: resolution: {integrity: sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 - dev: true /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} From aceaefc19eaa05c76b8a7adec035a0e4b33694c6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 17:55:12 +0200 Subject: [PATCH 093/311] chore(deps): update all non-major dependencies (#9778) --- package.json | 12 +- .../create-vite/template-lit-ts/package.json | 4 +- .../create-vite/template-lit/package.json | 4 +- .../template-preact-ts/package.json | 4 +- .../create-vite/template-preact/package.json | 4 +- .../template-react-ts/package.json | 2 +- .../create-vite/template-react/package.json | 2 +- .../template-svelte-ts/package.json | 6 +- .../create-vite/template-svelte/package.json | 4 +- .../template-vanilla-ts/package.json | 2 +- .../create-vite/template-vanilla/package.json | 2 +- .../create-vite/template-vue-ts/package.json | 2 +- .../create-vite/template-vue/package.json | 2 +- packages/plugin-legacy/package.json | 2 +- packages/vite/package.json | 4 +- playground/backend-integration/package.json | 2 +- playground/css-sourcemap/package.json | 2 +- playground/css/package.json | 2 +- playground/multiple-entrypoints/package.json | 2 +- playground/preload/package.json | 2 +- playground/react-emotion/package.json | 2 +- playground/ssr-vue/package.json | 2 +- playground/tailwind/package.json | 2 +- playground/vue-sourcemap/package.json | 2 +- playground/vue/package.json | 2 +- pnpm-lock.yaml | 445 +++++++++--------- 26 files changed, 270 insertions(+), 251 deletions(-) diff --git a/package.json b/package.json index f86b7e62058542..04df3123ff8c6d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@babel/types": "^7.18.10", - "@microsoft/api-extractor": "^7.29.2", + "@microsoft/api-extractor": "^7.29.3", "@rollup/plugin-typescript": "^8.3.4", "@types/babel__core": "^7.1.19", "@types/babel__standalone": "^7.1.4", @@ -73,7 +73,7 @@ "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", "playwright-chromium": "^1.25.0", - "pnpm": "^7.9.0", + "pnpm": "^7.9.3", "prettier": "2.7.1", "prompts": "^2.4.2", "rimraf": "^3.0.2", @@ -83,10 +83,10 @@ "tslib": "^2.4.0", "tsx": "^3.8.2", "typescript": "^4.6.4", - "unbuild": "^0.8.8", + "unbuild": "^0.8.9", "vite": "workspace:*", - "vitepress": "^1.0.0-alpha.5", - "vitest": "^0.22.0", + "vitepress": "^1.0.0-alpha.10", + "vitest": "^0.22.1", "vue": "^3.2.37" }, "simple-git-hooks": { @@ -107,7 +107,7 @@ "eslint --cache --fix" ] }, - "packageManager": "pnpm@7.9.0", + "packageManager": "pnpm@7.9.3", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-lit-ts/package.json b/packages/create-vite/template-lit-ts/package.json index 020f7f70b4df6e..463ed0a92f15e8 100644 --- a/packages/create-vite/template-lit-ts/package.json +++ b/packages/create-vite/template-lit-ts/package.json @@ -17,10 +17,10 @@ "build": "tsc && vite build" }, "dependencies": { - "lit": "^2.3.0" + "lit": "^2.3.1" }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-lit/package.json b/packages/create-vite/template-lit/package.json index 1503519a2a9d41..d9a968e653d1dd 100644 --- a/packages/create-vite/template-lit/package.json +++ b/packages/create-vite/template-lit/package.json @@ -15,9 +15,9 @@ "build": "vite build" }, "dependencies": { - "lit": "^2.3.0" + "lit": "^2.3.1" }, "devDependencies": { - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index 2aefe702a28e7d..67d72178f4e826 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -9,11 +9,11 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.10.3" + "preact": "^10.10.6" }, "devDependencies": { "@preact/preset-vite": "^2.3.0", "typescript": "^4.6.4", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index bd44628e058723..f20f9c0e8c5a1f 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -9,10 +9,10 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.10.3" + "preact": "^10.10.6" }, "devDependencies": { "@preact/preset-vite": "^2.3.0", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 1f23457e867afe..954ab1b6c35af8 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -17,6 +17,6 @@ "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.0.1", "typescript": "^4.6.4", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index b163c19f3a82e4..ae854711e08149 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -16,6 +16,6 @@ "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.0.1", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index f107b19a49fea6..4b2b573519f698 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -10,13 +10,13 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.1", + "@sveltejs/vite-plugin-svelte": "^1.0.2", "@tsconfig/svelte": "^3.0.0", "svelte": "^3.49.0", - "svelte-check": "^2.8.0", + "svelte-check": "^2.8.1", "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index 3eaa9fdbed6beb..8b1554b6107eb0 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -9,8 +9,8 @@ "preview": "vite preview" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.1", + "@sveltejs/vite-plugin-svelte": "^1.0.2", "svelte": "^3.49.0", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-vanilla-ts/package.json b/packages/create-vite/template-vanilla-ts/package.json index 23014e5b402be9..d35e6a2f5051a2 100644 --- a/packages/create-vite/template-vanilla-ts/package.json +++ b/packages/create-vite/template-vanilla-ts/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-vanilla/package.json b/packages/create-vite/template-vanilla/package.json index 2bde1c3bfd2ca0..95543d260c4650 100644 --- a/packages/create-vite/template-vanilla/package.json +++ b/packages/create-vite/template-vanilla/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "devDependencies": { - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index fc1bf650245be4..def20368c44bec 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@vitejs/plugin-vue": "^3.0.3", "typescript": "^4.6.4", - "vite": "^3.0.8", + "vite": "^3.0.9", "vue-tsc": "^0.40.1" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index e073986193cce9..e6bc9a293283c0 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -13,6 +13,6 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^3.0.3", - "vite": "^3.0.8" + "vite": "^3.0.9" } } diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 356c525d04b883..5f8eb73278d8c0 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -39,7 +39,7 @@ "core-js": "^3.24.1", "magic-string": "^0.26.2", "regenerator-runtime": "^0.13.9", - "systemjs": "^6.12.2" + "systemjs": "^6.12.3" }, "peerDependencies": { "terser": "^5.4.0", diff --git a/packages/vite/package.json b/packages/vite/package.json index 8ef093c103f8f1..8372deeb483512 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -96,10 +96,10 @@ "fast-glob": "^3.2.11", "http-proxy": "^1.18.1", "json5": "^2.2.1", - "launch-editor-middleware": "^2.5.0", + "launch-editor-middleware": "^2.6.0", "magic-string": "^0.26.2", "micromatch": "^4.0.5", - "mlly": "^0.5.12", + "mlly": "^0.5.14", "mrmime": "^1.0.1", "okie": "^1.0.1", "open": "^8.4.0", diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json index cf7a8b752604d4..299ffe9d9920dd 100644 --- a/playground/backend-integration/package.json +++ b/playground/backend-integration/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "devDependencies": { - "sass": "^1.54.4", + "sass": "^1.54.5", "tailwindcss": "^3.1.8", "fast-glob": "^3.2.11" } diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index 42b9d0d9fbca3b..cdc1d168f2d448 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -11,7 +11,7 @@ "devDependencies": { "less": "^4.1.3", "magic-string": "^0.26.2", - "sass": "^1.54.4", + "sass": "^1.54.5", "stylus": "^0.59.0" } } diff --git a/playground/css/package.json b/playground/css/package.json index 356274a8f29f38..87e768f5938630 100644 --- a/playground/css/package.json +++ b/playground/css/package.json @@ -17,7 +17,7 @@ "fast-glob": "^3.2.11", "less": "^4.1.3", "postcss-nested": "^5.0.6", - "sass": "^1.54.4", + "sass": "^1.54.5", "stylus": "^0.59.0" } } diff --git a/playground/multiple-entrypoints/package.json b/playground/multiple-entrypoints/package.json index e6c1aa44ebc1dc..88896854311469 100644 --- a/playground/multiple-entrypoints/package.json +++ b/playground/multiple-entrypoints/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "fast-glob": "^3.2.11", - "sass": "^1.54.4" + "sass": "^1.54.5" } } diff --git a/playground/preload/package.json b/playground/preload/package.json index 39c4f9893978ef..6602c10501118e 100644 --- a/playground/preload/package.json +++ b/playground/preload/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "vue": "^3.2.37", - "vue-router": "^4.1.3" + "vue-router": "^4.1.4" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/react-emotion/package.json b/playground/react-emotion/package.json index b0a91b34f83cf4..bca5d25bc6a3e9 100644 --- a/playground/react-emotion/package.json +++ b/playground/react-emotion/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@babel/plugin-proposal-pipeline-operator": "^7.18.9", - "@emotion/babel-plugin": "^11.10.0", + "@emotion/babel-plugin": "^11.10.2", "@vitejs/plugin-react": "workspace:*" }, "babel": { diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index 260e02f0fc5ff1..e9f06cdeccce66 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -17,7 +17,7 @@ "dependencies": { "example-external-component": "file:example-external-component", "vue": "^3.2.37", - "vue-router": "^4.1.3", + "vue-router": "^4.1.4", "vuex": "^4.0.2" }, "devDependencies": { diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json index 6b8de729f2effc..bc9cf0a9aeb6ce 100644 --- a/playground/tailwind/package.json +++ b/playground/tailwind/package.json @@ -12,7 +12,7 @@ "autoprefixer": "^10.4.8", "tailwindcss": "^3.1.8", "vue": "^3.2.37", - "vue-router": "^4.1.3" + "vue-router": "^4.1.4" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/vue-sourcemap/package.json b/playground/vue-sourcemap/package.json index 53e11a7835e71a..db8ae355815d52 100644 --- a/playground/vue-sourcemap/package.json +++ b/playground/vue-sourcemap/package.json @@ -12,7 +12,7 @@ "@vitejs/plugin-vue": "workspace:*", "less": "^4.1.3", "postcss-nested": "^5.0.6", - "sass": "^1.54.4" + "sass": "^1.54.5" }, "dependencies": { "vue": "^3.2.37" diff --git a/playground/vue/package.json b/playground/vue/package.json index 66728083e55e52..ae3f05e966bfdc 100644 --- a/playground/vue/package.json +++ b/playground/vue/package.json @@ -17,7 +17,7 @@ "js-yaml": "^4.1.0", "less": "^4.1.3", "pug": "^3.0.2", - "sass": "^1.54.4", + "sass": "^1.54.5", "stylus": "^0.59.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a424c935ca9be2..7ad729f221ec36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,7 +11,7 @@ importers: .: specifiers: '@babel/types': ^7.18.10 - '@microsoft/api-extractor': ^7.29.2 + '@microsoft/api-extractor': ^7.29.3 '@rollup/plugin-typescript': ^8.3.4 '@types/babel__core': ^7.1.19 '@types/babel__standalone': ^7.1.4 @@ -47,7 +47,7 @@ importers: npm-run-all: ^4.1.5 picocolors: ^1.0.0 playwright-chromium: ^1.25.0 - pnpm: ^7.9.0 + pnpm: ^7.9.3 prettier: 2.7.1 prompts: ^2.4.2 rimraf: ^3.0.2 @@ -57,14 +57,14 @@ importers: tslib: ^2.4.0 tsx: ^3.8.2 typescript: ^4.6.4 - unbuild: ^0.8.8 + unbuild: ^0.8.9 vite: workspace:* - vitepress: ^1.0.0-alpha.5 - vitest: ^0.22.0 + vitepress: ^1.0.0-alpha.10 + vitest: ^0.22.1 vue: ^3.2.37 devDependencies: '@babel/types': 7.18.10 - '@microsoft/api-extractor': 7.29.2 + '@microsoft/api-extractor': 7.29.3 '@rollup/plugin-typescript': 8.3.4_7emp2e44zzc74lnyjhc37gdv4y '@types/babel__core': 7.1.19 '@types/babel__standalone': 7.1.4 @@ -100,7 +100,7 @@ importers: npm-run-all: 4.1.5 picocolors: 1.0.0 playwright-chromium: 1.25.0 - pnpm: 7.9.0 + pnpm: 7.9.3 prettier: 2.7.1 prompts: 2.4.2 rimraf: 3.0.2 @@ -110,10 +110,10 @@ importers: tslib: 2.4.0 tsx: 3.8.2 typescript: 4.6.4 - unbuild: 0.8.8 + unbuild: 0.8.9 vite: link:packages/vite - vitepress: 1.0.0-alpha.5 - vitest: 0.22.0 + vitepress: 1.0.0-alpha.10 + vitest: 0.22.1 vue: 3.2.37 packages/create-vite: @@ -133,14 +133,14 @@ importers: core-js: ^3.24.1 magic-string: ^0.26.2 regenerator-runtime: ^0.13.9 - systemjs: ^6.12.2 + systemjs: ^6.12.3 vite: workspace:* dependencies: '@babel/standalone': 7.18.12 core-js: 3.24.1 magic-string: 0.26.2 regenerator-runtime: 0.13.9 - systemjs: 6.12.2 + systemjs: 6.12.3 devDependencies: '@babel/core': 7.18.10 vite: link:../vite @@ -234,10 +234,10 @@ importers: fsevents: ~2.3.2 http-proxy: ^1.18.1 json5: ^2.2.1 - launch-editor-middleware: ^2.5.0 + launch-editor-middleware: ^2.6.0 magic-string: ^0.26.2 micromatch: ^4.0.5 - mlly: ^0.5.12 + mlly: ^0.5.14 mrmime: ^1.0.1 okie: ^1.0.1 open: ^8.4.0 @@ -298,10 +298,10 @@ importers: fast-glob: 3.2.11 http-proxy: 1.18.1_debug@4.3.4 json5: 2.2.1 - launch-editor-middleware: 2.5.0 + launch-editor-middleware: 2.6.0 magic-string: 0.26.2 micromatch: 4.0.5 - mlly: 0.5.12 + mlly: 0.5.14 mrmime: 1.0.1 okie: 1.0.1 open: 8.4.0 @@ -362,11 +362,11 @@ importers: playground/backend-integration: specifiers: fast-glob: ^3.2.11 - sass: ^1.54.4 + sass: ^1.54.5 tailwindcss: ^3.1.8 devDependencies: fast-glob: 3.2.11 - sass: 1.54.4 + sass: 1.54.5 tailwindcss: 3.1.8 playground/build-old: @@ -385,7 +385,7 @@ importers: fast-glob: ^3.2.11 less: ^4.1.3 postcss-nested: ^5.0.6 - sass: ^1.54.4 + sass: ^1.54.5 stylus: ^0.59.0 devDependencies: css-dep: link:css-dep @@ -393,7 +393,7 @@ importers: fast-glob: 3.2.11 less: 4.1.3 postcss-nested: 5.0.6 - sass: 1.54.4 + sass: 1.54.5 stylus: 0.59.0 playground/css-codesplit: @@ -406,12 +406,12 @@ importers: specifiers: less: ^4.1.3 magic-string: ^0.26.2 - sass: ^1.54.4 + sass: ^1.54.5 stylus: ^0.59.0 devDependencies: less: 4.1.3 magic-string: 0.26.2 - sass: 1.54.4 + sass: 1.54.5 stylus: 0.59.0 playground/css/css-dep: @@ -559,10 +559,10 @@ importers: playground/multiple-entrypoints: specifiers: fast-glob: ^3.2.11 - sass: ^1.54.4 + sass: ^1.54.5 devDependencies: fast-glob: 3.2.11 - sass: 1.54.4 + sass: 1.54.5 playground/nested-deps: specifiers: @@ -765,10 +765,10 @@ importers: dep-including-a: file:./dep-including-a terser: ^5.14.2 vue: ^3.2.37 - vue-router: ^4.1.3 + vue-router: ^4.1.4 dependencies: vue: 3.2.37 - vue-router: 4.1.3_vue@3.2.37 + vue-router: 4.1.4_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue dep-a: file:playground/preload/dep-a @@ -820,7 +820,7 @@ importers: playground/react-emotion: specifiers: '@babel/plugin-proposal-pipeline-operator': ^7.18.9 - '@emotion/babel-plugin': ^11.10.0 + '@emotion/babel-plugin': ^11.10.2 '@emotion/react': ^11.10.0 '@vitejs/plugin-react': workspace:* react: ^18.2.0 @@ -833,7 +833,7 @@ importers: react-switch: 7.0.0_biqbaboplfbrettd7655fr4n2y devDependencies: '@babel/plugin-proposal-pipeline-operator': 7.18.9 - '@emotion/babel-plugin': 11.10.0 + '@emotion/babel-plugin': 11.10.2 '@vitejs/plugin-react': link:../../packages/plugin-react playground/react-sourcemap: @@ -1100,12 +1100,12 @@ importers: express: ^4.18.1 serve-static: ^1.15.0 vue: ^3.2.37 - vue-router: ^4.1.3 + vue-router: ^4.1.4 vuex: ^4.0.2 dependencies: example-external-component: file:playground/ssr-vue/example-external-component vue: 3.2.37 - vue-router: 4.1.3_vue@3.2.37 + vue-router: 4.1.4_vue@3.2.37 vuex: 4.0.2_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1142,12 +1142,12 @@ importers: tailwindcss: ^3.1.8 ts-node: ^10.9.1 vue: ^3.2.37 - vue-router: ^4.1.3 + vue-router: ^4.1.4 dependencies: autoprefixer: 10.4.8 tailwindcss: 3.1.8_ts-node@10.9.1 vue: 3.2.37 - vue-router: 4.1.3_vue@3.2.37 + vue-router: 4.1.4_vue@3.2.37 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue ts-node: 10.9.1 @@ -1171,7 +1171,7 @@ importers: less: ^4.1.3 lodash-es: ^4.17.21 pug: ^3.0.2 - sass: ^1.54.4 + sass: ^1.54.5 stylus: ^0.59.0 vue: ^3.2.37 dependencies: @@ -1182,7 +1182,7 @@ importers: js-yaml: 4.1.0 less: 4.1.3 pug: 3.0.2 - sass: 1.54.4 + sass: 1.54.5 stylus: 0.59.0 playground/vue-jsx: @@ -1230,7 +1230,7 @@ importers: '@vitejs/plugin-vue': workspace:* less: ^4.1.3 postcss-nested: ^5.0.6 - sass: ^1.54.4 + sass: ^1.54.5 vue: ^3.2.37 dependencies: vue: 3.2.37 @@ -1238,7 +1238,7 @@ importers: '@vitejs/plugin-vue': link:../../packages/plugin-vue less: 4.1.3 postcss-nested: 5.0.6 - sass: 1.54.4 + sass: 1.54.5 playground/wasm: specifiers: {} @@ -1261,14 +1261,24 @@ packages: resolution: {integrity: sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==} dev: true - /@algolia/autocomplete-core/1.6.3: - resolution: {integrity: sha512-dqQqRt01fX3YuVFrkceHsoCnzX0bLhrrg8itJI1NM68KjrPYQPYsE+kY8EZTCM4y8VDnhqJErR73xe/ZsV+qAA==} + /@algolia/autocomplete-core/1.7.1: + resolution: {integrity: sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==} dependencies: - '@algolia/autocomplete-shared': 1.6.3 + '@algolia/autocomplete-shared': 1.7.1 dev: true - /@algolia/autocomplete-shared/1.6.3: - resolution: {integrity: sha512-UV46bnkTztyADFaETfzFC5ryIdGVb2zpAoYgu0tfcuYWjhg1KbLXveFffZIrGVoboqmAk1b+jMrl6iCja1i3lg==} + /@algolia/autocomplete-preset-algolia/1.7.1_algoliasearch@4.13.1: + resolution: {integrity: sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==} + peerDependencies: + '@algolia/client-search': ^4.9.1 + algoliasearch: ^4.9.1 + dependencies: + '@algolia/autocomplete-shared': 1.7.1 + algoliasearch: 4.13.1 + dev: true + + /@algolia/autocomplete-shared/1.7.1: + resolution: {integrity: sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==} dev: true /@algolia/cache-browser-local-storage/4.13.1: @@ -2013,35 +2023,46 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.9 - /@docsearch/css/3.1.0: - resolution: {integrity: sha512-bh5IskwkkodbvC0FzSg1AxMykfDl95hebEKwxNoq4e5QaGzOXSBgW8+jnMFZ7JU4sTBiB04vZWoUSzNrPboLZA==} + /@docsearch/css/3.2.1: + resolution: {integrity: sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==} dev: true - /@docsearch/js/3.1.0: - resolution: {integrity: sha512-5XSK+xbP0hcTIp54MECqxkWLs6kf7Ug4nWdxWNtx8cUpLiFNFnKXDxCb35wnyNpjukmrx7Q9DkO5tFFsmNVxng==} + /@docsearch/js/3.2.1: + resolution: {integrity: sha512-H1PekEtSeS0msetR2YGGey2w7jQ2wAKfGODJvQTygSwMgUZ+2DHpzUgeDyEBIXRIfaBcoQneqrzsljM62pm6Xg==} dependencies: - '@docsearch/react': 3.1.0 + '@docsearch/react': 3.2.1 preact: 10.7.3 transitivePeerDependencies: + - '@algolia/client-search' - '@types/react' - react - react-dom dev: true - /@docsearch/react/3.1.0: - resolution: {integrity: sha512-bjB6ExnZzf++5B7Tfoi6UXgNwoUnNOfZ1NyvnvPhWgCMy5V/biAtLL4o7owmZSYdAKeFSvZ5Lxm0is4su/dBWg==} + /@docsearch/react/3.2.1: + resolution: {integrity: sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' react-dom: '>= 16.8.0 < 19.0.0' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true dependencies: - '@algolia/autocomplete-core': 1.6.3 - '@docsearch/css': 3.1.0 + '@algolia/autocomplete-core': 1.7.1 + '@algolia/autocomplete-preset-algolia': 1.7.1_algoliasearch@4.13.1 + '@docsearch/css': 3.2.1 algoliasearch: 4.13.1 + transitivePeerDependencies: + - '@algolia/client-search' dev: true - /@emotion/babel-plugin/11.10.0: - resolution: {integrity: sha512-xVnpDAAbtxL1dsuSelU5A7BnY/lftws0wUexNJZTPsvX/1tM4GZJbclgODhvW4E+NH7E5VFcH0bBn30NvniPJA==} + /@emotion/babel-plugin/11.10.2: + resolution: {integrity: sha512-xNQ57njWTFVfPAc3cjfuaPdsgLp5QOSuRsj9MA6ndEhH/AzuZM86qIQzt6rq+aGBwj3n5/TkLmU5lhAfdRmogA==} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -2087,7 +2108,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.18.9 - '@emotion/babel-plugin': 11.10.0 + '@emotion/babel-plugin': 11.10.2 '@emotion/cache': 11.10.0 '@emotion/serialize': 1.1.0 '@emotion/utils': 1.2.0 @@ -2140,8 +2161,8 @@ packages: get-tsconfig: 4.1.0 dev: true - /@esbuild/linux-loong64/0.15.3: - resolution: {integrity: sha512-pe7L+LnITFHUSUnuhSQRyYN2E5Anl0r7x/jW+ufc+4fBcaK3Q51b/3ufFWWhmIiuCkr7oKtmVSpaJ1DxbtSfuw==} + /@esbuild/linux-loong64/0.15.5: + resolution: {integrity: sha512-UHkDFCfSGTuXq08oQltXxSZmH1TXyWsL+4QhZDWvvLl6mEJQqk3u7/wq1LjhrrAXYIllaTtRSzUXl4Olkf2J8A==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -2280,22 +2301,22 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model/7.23.0: - resolution: {integrity: sha512-h+2aVyf8IYidPZp+N+yIc/LY/aBwRZ1Vxlsx7rU31807bba5ScJ94bj7OjsPMje0vRYALf+yjZToYT0HdP6omA==} + /@microsoft/api-extractor-model/7.23.1: + resolution: {integrity: sha512-axlZ33H2LfYX7goAaWpzABWZl3JtX/EUkfVBsI4SuMn3AZYBJsP5MVpMCq7jt0PCefWGwwO+Rv+lCmmJIjFhlQ==} dependencies: '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.50.1 + '@rushstack/node-core-library': 3.50.2 dev: true - /@microsoft/api-extractor/7.29.2: - resolution: {integrity: sha512-MwT/Xi1DperfrBO+SU3f/xKdyR6bMvk59/WN6w7g1rHmDBMegan3Ya6npMo+abJAgQOtp6uExY/elHXcYE/Ofw==} + /@microsoft/api-extractor/7.29.3: + resolution: {integrity: sha512-PHq+Oo8yiXhwi11VQ1Nz36s+aZwgFqjtkd41udWHtSpyMv2slJ74m1cHdpWbs2ovGUCfldayzdpGwnexZLd2bA==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.23.0 + '@microsoft/api-extractor-model': 7.23.1 '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.50.1 + '@rushstack/node-core-library': 3.50.2 '@rushstack/rig-package': 0.3.14 '@rushstack/ts-command-line': 4.12.2 colors: 1.2.5 @@ -2506,8 +2527,8 @@ packages: picomatch: 2.3.1 dev: true - /@rushstack/node-core-library/3.50.1: - resolution: {integrity: sha512-9d2xE7E9yQEBS6brTptdP8cslt6iL5+UnkY2lRxQQ4Q/jlXtsrWCCJCxwr56W/eJEe9YT/yHR4mMn5QY64Ps2w==} + /@rushstack/node-core-library/3.50.2: + resolution: {integrity: sha512-+zpZBcaX5s+wA0avF0Lk3sd5jbGRo5SmsEJpElJbqQd3KGFvc/hcyeNSMqV5+esJ1JuTfnE1QyRt8nvxFNTaQg==} dependencies: '@types/node': 12.20.24 colors: 1.2.5 @@ -2726,6 +2747,10 @@ packages: '@types/node': 17.0.42 dev: true + /@types/web-bluetooth/0.0.15: + resolution: {integrity: sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==} + dev: true + /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: @@ -2915,6 +2940,11 @@ packages: /@vue/devtools-api/6.1.4: resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==} + dev: false + + /@vue/devtools-api/6.2.1: + resolution: {integrity: sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==} + dev: true /@vue/reactivity-transform/3.2.37: resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==} @@ -2955,40 +2985,29 @@ packages: /@vue/shared/3.2.37: resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} - /@vueuse/core/8.6.0_vue@3.2.37: - resolution: {integrity: sha512-VirzExCm/N+QdrEWT7J4uSrvJ5hquKIAU9alQ37kUvIJk9XxCLxmfRnmekYc1kz2+6BnoyuKYXVmrMV351CB4w==} - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true + /@vueuse/core/9.1.0_vue@3.2.37: + resolution: {integrity: sha512-BIroqvXEqt826aE9r3K5cox1zobuPuAzdYJ36kouC2TVhlXvFKIILgFVWrpp9HZPwB3aLzasmG3K87q7TSyXZg==} dependencies: - '@vueuse/metadata': 8.6.0 - '@vueuse/shared': 8.6.0_vue@3.2.37 - vue: 3.2.37 + '@types/web-bluetooth': 0.0.15 + '@vueuse/metadata': 9.1.0 + '@vueuse/shared': 9.1.0_vue@3.2.37 vue-demi: 0.13.1_vue@3.2.37 + transitivePeerDependencies: + - '@vue/composition-api' + - vue dev: true - /@vueuse/metadata/8.6.0: - resolution: {integrity: sha512-F+CKPvaExsm7QgRr8y+ZNJFwXasn89rs5wth/HeX9lJ1q8XEt+HJ16Q5Sxh4rfG5YSKXrStveVge8TKvPjMjFA==} + /@vueuse/metadata/9.1.0: + resolution: {integrity: sha512-8OEhlog1iaAGTD3LICZ8oBGQdYeMwByvXetOtAOZCJOzyCRSwqwdggTsmVZZ1rkgYIEqgUBk942AsAPwM21s6A==} dev: true - /@vueuse/shared/8.6.0_vue@3.2.37: - resolution: {integrity: sha512-Y/IVywZo7IfEoSSEtCYpkVEmPV7pU35mEIxV7PbD/D3ly18B3mEsBaPbtDkNM/QP3zAZ5mn4nEkOfddX4uwuIA==} - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true + /@vueuse/shared/9.1.0_vue@3.2.37: + resolution: {integrity: sha512-pB/3njQu4tfJJ78ajELNda0yMG6lKfpToQW7Soe09CprF1k3QuyoNi1tBNvo75wBDJWD+LOnr+c4B5HZ39jY/Q==} dependencies: - vue: 3.2.37 vue-demi: 0.13.1_vue@3.2.37 + transitivePeerDependencies: + - '@vue/composition-api' + - vue dev: true /@wessberg/stringutil/1.0.19: @@ -4083,8 +4102,8 @@ packages: /defined/1.0.0: resolution: {integrity: sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==} - /defu/6.0.0: - resolution: {integrity: sha512-t2MZGLf1V2rV4VBZbWIaXKdX/mUcYW0n2znQZoADBkGGxYL8EWqCuCZBmJPJ/Yy9fofJkyuuSuo5GSwo0XdEgw==} + /defu/6.1.0: + resolution: {integrity: sha512-pOFYRTIhoKujrmbTRhcW5lYQLBXw/dlTwfI8IguF1QCDJOcJzNH1w+YFjxqy6BAuJrClTy6MUE8q+oKJ2FLsIw==} dev: true /delayed-stream/1.0.0: @@ -4332,8 +4351,8 @@ packages: dev: true optional: true - /esbuild-android-64/0.15.3: - resolution: {integrity: sha512-sHGQ50Bb80ow+DZ8s6mabWn/j+vgfsNDMhipv4v410O++C6gpEcR9A5jR9bTkMsVbr46Id0MMhUGpBasq8H92A==} + /esbuild-android-64/0.15.5: + resolution: {integrity: sha512-dYPPkiGNskvZqmIK29OPxolyY3tp+c47+Fsc2WYSOVjEPWNCHNyqhtFqQadcXMJDQt8eN0NMDukbyQgFcHquXg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -4358,8 +4377,8 @@ packages: dev: true optional: true - /esbuild-android-arm64/0.15.3: - resolution: {integrity: sha512-+Oiwzgp7HTyeNkgpQySGLCq3zFmvVVyBiNz8bO+7Tc6tlnxSYf8jjQBThRTUsy6vrrjG91h9vZNlYkiikzzWUg==} + /esbuild-android-arm64/0.15.5: + resolution: {integrity: sha512-YyEkaQl08ze3cBzI/4Cm1S+rVh8HMOpCdq8B78JLbNFHhzi4NixVN93xDrHZLztlocEYqi45rHHCgA8kZFidFg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -4384,8 +4403,8 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.15.3: - resolution: {integrity: sha512-n2BkxzCPHv6OOOs9gxp4AYsccawuw9bDeW9rpSASHao0zQ/u0kP6bjD4ATf2G4A3cml8HGwp18aROl4ws+4Ytg==} + /esbuild-darwin-64/0.15.5: + resolution: {integrity: sha512-Cr0iIqnWKx3ZTvDUAzG0H/u9dWjLE4c2gTtRLz4pqOBGjfjqdcZSfAObFzKTInLLSmD0ZV1I/mshhPoYSBMMCQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -4410,8 +4429,8 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.15.3: - resolution: {integrity: sha512-fSk5M1vQ+y48csVJ4QxweT//DdDytDAb0AvU1gYITqZGA1kL1/i4C5fjKDNZMjB7dkg2a+rfkMyrpZUli+To/w==} + /esbuild-darwin-arm64/0.15.5: + resolution: {integrity: sha512-WIfQkocGtFrz7vCu44ypY5YmiFXpsxvz2xqwe688jFfSVCnUsCn2qkEVDo7gT8EpsLOz1J/OmqjExePL1dr1Kg==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -4436,8 +4455,8 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.15.3: - resolution: {integrity: sha512-b21XfM0Wrxu0CzFQN7B4xuAMGUNLT3F3J2NMeLxbUq6lcl2N3Isho1q2AF5bOCpCXVM04k1+PgoQLwNzGYtnjw==} + /esbuild-freebsd-64/0.15.5: + resolution: {integrity: sha512-M5/EfzV2RsMd/wqwR18CELcenZ8+fFxQAAEO7TJKDmP3knhWSbD72ILzrXFMMwshlPAS1ShCZ90jsxkm+8FlaA==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -4462,8 +4481,8 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.15.3: - resolution: {integrity: sha512-E0LkWSz7Ch1B2WFXbGvfN3q9uUlQCahBi3S7wTSJO2T41x0BPnIFHw79/RuGKVyA17mX/I7RVOSRnrla2D4tag==} + /esbuild-freebsd-arm64/0.15.5: + resolution: {integrity: sha512-2JQQ5Qs9J0440F/n/aUBNvY6lTo4XP/4lt1TwDfHuo0DY3w5++anw+jTjfouLzbJmFFiwmX7SmUhMnysocx96w==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -4488,8 +4507,8 @@ packages: dev: true optional: true - /esbuild-linux-32/0.15.3: - resolution: {integrity: sha512-af7BhXXKwzXL83bfJX8vkxsyDbOr9T5auxyBJnBfkd2w7VwXC1heDT2TQ1cWCWyjqVatyKudW5RCSAySDKDW2Q==} + /esbuild-linux-32/0.15.5: + resolution: {integrity: sha512-gO9vNnIN0FTUGjvTFucIXtBSr1Woymmx/aHQtuU+2OllGU6YFLs99960UD4Dib1kFovVgs59MTXwpFdVoSMZoQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -4514,8 +4533,8 @@ packages: dev: true optional: true - /esbuild-linux-64/0.15.3: - resolution: {integrity: sha512-Wwq+5ZF2IPE/6W2kJLPnh7eXqtz5XtdPBRB77nhm02my6PsZR3aa/q/fRkJhwO6ExM+t9l3kFhWL4pMwk3wREA==} + /esbuild-linux-64/0.15.5: + resolution: {integrity: sha512-ne0GFdNLsm4veXbTnYAWjbx3shpNKZJUd6XpNbKNUZaNllDZfYQt0/zRqOg0sc7O8GQ+PjSMv9IpIEULXVTVmg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -4540,8 +4559,8 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.15.3: - resolution: {integrity: sha512-88ycpH4GrbOzaZIIXIzljbeCUkzoaJ5luP6+LATa5hk/Wl+OHkAieDfjAHdH8KuHkGYTojKE1npQq9gll9efUA==} + /esbuild-linux-arm/0.15.5: + resolution: {integrity: sha512-wvAoHEN+gJ/22gnvhZnS/+2H14HyAxM07m59RSLn3iXrQsdS518jnEWRBnJz3fR6BJa+VUTo0NxYjGaNt7RA7Q==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -4566,8 +4585,8 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.15.3: - resolution: {integrity: sha512-qNvYyYjNm4JPXJcCJv7gXEnyqw2k9W+SeYMoG7RiwWHWv1cMX6xlxPLGz5yIxjH9+VBXkA1nrY/YohaiKq2O3g==} + /esbuild-linux-arm64/0.15.5: + resolution: {integrity: sha512-7EgFyP2zjO065XTfdCxiXVEk+f83RQ1JsryN1X/VSX2li9rnHAt2swRbpoz5Vlrl6qjHrCmq5b6yxD13z6RheA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -4592,8 +4611,8 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.15.3: - resolution: {integrity: sha512-t5TXW6Cw8S9Lts7SDZ8rlx/dqPJx8hndYKL6xEgA2vdlrE60eIYTAYWJqsGN0dgePtFC1RPyH6To15l7s9WdYA==} + /esbuild-linux-mips64le/0.15.5: + resolution: {integrity: sha512-KdnSkHxWrJ6Y40ABu+ipTZeRhFtc8dowGyFsZY5prsmMSr1ZTG9zQawguN4/tunJ0wy3+kD54GaGwdcpwWAvZQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -4618,8 +4637,8 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.15.3: - resolution: {integrity: sha512-TXxPgEWOPCY4F6ZMf7+915+H0eOB6AlcZBwjeBs+78ULpzvcmMzZ2ujF2IejKZXYWuMTORPNoG+MuVGBuyUysA==} + /esbuild-linux-ppc64le/0.15.5: + resolution: {integrity: sha512-QdRHGeZ2ykl5P0KRmfGBZIHmqcwIsUKWmmpZTOq573jRWwmpfRmS7xOhmDHBj9pxv+6qRMH8tLr2fe+ZKQvCYw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -4644,8 +4663,8 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.15.3: - resolution: {integrity: sha512-04tvrbHA83N+tg+qQeJmUQ3jWStUP7+rw+v/l2h3PsNGbcH3WmsgR0Tf0e1ext09asV4x2PX2b2Nm/gBIOrpqg==} + /esbuild-linux-riscv64/0.15.5: + resolution: {integrity: sha512-p+WE6RX+jNILsf+exR29DwgV6B73khEQV0qWUbzxaycxawZ8NE0wA6HnnTxbiw5f4Gx9sJDUBemh9v49lKOORA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -4670,8 +4689,8 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.15.3: - resolution: {integrity: sha512-LHxnvvFMhA/uy9CSrnlCtPZnTfWahR9NPLKwXBgfg16YqpKbRHty+mek1o7l+2G5qLeFEEvhB0a7c+hYgbW/3w==} + /esbuild-linux-s390x/0.15.5: + resolution: {integrity: sha512-J2ngOB4cNzmqLHh6TYMM/ips8aoZIuzxJnDdWutBw5482jGXiOzsPoEF4j2WJ2mGnm7FBCO4StGcwzOgic70JQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -4696,8 +4715,8 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.15.3: - resolution: {integrity: sha512-8W0UxNuNsgBBa1SLjwqbbDLJF9mf+lvytaYPt5kXbBrz0DI4mKYFlujLQrxLKh8tvs2zRdFNy9HVqmMdbZ1OIQ==} + /esbuild-netbsd-64/0.15.5: + resolution: {integrity: sha512-MmKUYGDizYjFia0Rwt8oOgmiFH7zaYlsoQ3tIOfPxOqLssAsEgG0MUdRDm5lliqjiuoog8LyDu9srQk5YwWF3w==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -4722,8 +4741,8 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.15.3: - resolution: {integrity: sha512-QL7xYQ4noukuqh8UGnsrk1m+ShPMYIXjOnAQl3siA7VV6cjuUoCxx6cThgcUDzih8iL5u2xgsGRhsviQIMsUuA==} + /esbuild-openbsd-64/0.15.5: + resolution: {integrity: sha512-2mMFfkLk3oPWfopA9Plj4hyhqHNuGyp5KQyTT9Rc8hFd8wAn5ZrbJg+gNcLMo2yzf8Uiu0RT6G9B15YN9WQyMA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -4748,8 +4767,8 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.15.3: - resolution: {integrity: sha512-vID32ZCZahWDqlEoq9W7OAZDtofAY8aW0V58V5l+kXEvaKvR0m99FLNRuGGY3IDNwjUoOkvoFiMMiy+ONnN7GA==} + /esbuild-sunos-64/0.15.5: + resolution: {integrity: sha512-2sIzhMUfLNoD+rdmV6AacilCHSxZIoGAU2oT7XmJ0lXcZWnCvCtObvO6D4puxX9YRE97GodciRGDLBaiC6x1SA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -4774,8 +4793,8 @@ packages: dev: true optional: true - /esbuild-windows-32/0.15.3: - resolution: {integrity: sha512-dnrlwu6T85QU9fO0a35HAzgAXm3vVqg+3Kr9EXkmnf5PHv9t7hT/EYW6g/8YYu91DDyGTk9JSyN32YzQ3OS9Lw==} + /esbuild-windows-32/0.15.5: + resolution: {integrity: sha512-e+duNED9UBop7Vnlap6XKedA/53lIi12xv2ebeNS4gFmu7aKyTrok7DPIZyU5w/ftHD4MUDs5PJUkQPP9xJRzg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -4800,8 +4819,8 @@ packages: dev: true optional: true - /esbuild-windows-64/0.15.3: - resolution: {integrity: sha512-HUSlVCpTtOnIKeIn05zz0McNCfZhnu5UgUypmpNrv4Ff1XTvl6vBpQwIZ49eIAkY9zI6oe1Mu6N5ZG7u6X4s7A==} + /esbuild-windows-64/0.15.5: + resolution: {integrity: sha512-v+PjvNtSASHOjPDMIai9Yi+aP+Vwox+3WVdg2JB8N9aivJ7lyhp4NVU+J0MV2OkWFPnVO8AE/7xH+72ibUUEnw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -4826,8 +4845,8 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.15.3: - resolution: {integrity: sha512-sk6fVXCzGB0uW089+8LdeanZkQUZ+3/xdbWshgLGRawV0NyjSFH4sZPIy+DJnhEnT0pPt1DabZtqrq2DT0FWNw==} + /esbuild-windows-arm64/0.15.5: + resolution: {integrity: sha512-Yz8w/D8CUPYstvVQujByu6mlf48lKmXkq6bkeSZZxTA626efQOJb26aDGLzmFWx6eg/FwrXgt6SZs9V8Pwy/aA==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -4890,33 +4909,33 @@ packages: esbuild-windows-arm64: 0.14.50 dev: true - /esbuild/0.15.3: - resolution: {integrity: sha512-D1qLizJTYlGIOK5m/1ckH8vR2U573eLMMA57qvWg/9jj8jPIhjpafv4kxb6ra2eeTlVq8tISxjsyRKbTaeF6PA==} + /esbuild/0.15.5: + resolution: {integrity: sha512-VSf6S1QVqvxfIsSKb3UKr3VhUCis7wgDbtF4Vd9z84UJr05/Sp2fRKmzC+CSPG/dNAPPJZ0BTBLTT1Fhd6N9Gg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/linux-loong64': 0.15.3 - esbuild-android-64: 0.15.3 - esbuild-android-arm64: 0.15.3 - esbuild-darwin-64: 0.15.3 - esbuild-darwin-arm64: 0.15.3 - esbuild-freebsd-64: 0.15.3 - esbuild-freebsd-arm64: 0.15.3 - esbuild-linux-32: 0.15.3 - esbuild-linux-64: 0.15.3 - esbuild-linux-arm: 0.15.3 - esbuild-linux-arm64: 0.15.3 - esbuild-linux-mips64le: 0.15.3 - esbuild-linux-ppc64le: 0.15.3 - esbuild-linux-riscv64: 0.15.3 - esbuild-linux-s390x: 0.15.3 - esbuild-netbsd-64: 0.15.3 - esbuild-openbsd-64: 0.15.3 - esbuild-sunos-64: 0.15.3 - esbuild-windows-32: 0.15.3 - esbuild-windows-64: 0.15.3 - esbuild-windows-arm64: 0.15.3 + '@esbuild/linux-loong64': 0.15.5 + esbuild-android-64: 0.15.5 + esbuild-android-arm64: 0.15.5 + esbuild-darwin-64: 0.15.5 + esbuild-darwin-arm64: 0.15.5 + esbuild-freebsd-64: 0.15.5 + esbuild-freebsd-arm64: 0.15.5 + esbuild-linux-32: 0.15.5 + esbuild-linux-64: 0.15.5 + esbuild-linux-arm: 0.15.5 + esbuild-linux-arm64: 0.15.5 + esbuild-linux-mips64le: 0.15.5 + esbuild-linux-ppc64le: 0.15.5 + esbuild-linux-riscv64: 0.15.5 + esbuild-linux-s390x: 0.15.5 + esbuild-netbsd-64: 0.15.5 + esbuild-openbsd-64: 0.15.5 + esbuild-sunos-64: 0.15.5 + esbuild-windows-32: 0.15.5 + esbuild-windows-64: 0.15.5 + esbuild-windows-arm64: 0.15.5 dev: true /escalade/3.1.1: @@ -6156,8 +6175,8 @@ packages: engines: {node: '>=6'} hasBin: true - /jsonc-parser/3.0.0: - resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} + /jsonc-parser/3.1.0: + resolution: {integrity: sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==} dev: true /jsonfile/4.0.0: @@ -6212,14 +6231,14 @@ packages: resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==} dev: false - /launch-editor-middleware/2.5.0: - resolution: {integrity: sha512-kv9MMO81pbYjznk9j/DBu0uBGxIpT6uYhGajq6fxdGEPb+DCRBoS96jGkhe3MJumdY3zZFkuS8CFPTZI9DaBNw==} + /launch-editor-middleware/2.6.0: + resolution: {integrity: sha512-K2yxgljj5TdCeRN1lBtO3/J26+AIDDDw+04y6VAiZbWcTdBwsYN6RrZBnW5DN/QiSIdKNjKdATLUUluWWFYTIA==} dependencies: - launch-editor: 2.5.0 + launch-editor: 2.6.0 dev: true - /launch-editor/2.5.0: - resolution: {integrity: sha512-coRiIMBJ3JF7yX8nZE4Fr+xxUy+3WTRsDSwIzHghU28gjXwkAWsvac3BpZrL/jHtbiqQ4TiRAyTJmsgErNk1jQ==} + /launch-editor/2.6.0: + resolution: {integrity: sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ==} dependencies: picocolors: 1.0.0 shell-quote: 1.7.3 @@ -6640,7 +6659,7 @@ packages: typescript: optional: true dependencies: - defu: 6.0.0 + defu: 6.1.0 esbuild: 0.14.50 fs-extra: 10.1.0 globby: 11.1.0 @@ -6650,12 +6669,12 @@ packages: typescript: 4.7.4 dev: true - /mlly/0.5.12: - resolution: {integrity: sha512-8moXGh6Hfy2Nmys3DDEm4CuxDBk5Y7Lk1jQ4JcwW0djO9b+SCKTpw0enIQeZIuEnPljdxHSGmcbXU9hpIIEYeQ==} + /mlly/0.5.14: + resolution: {integrity: sha512-DgRgNUSX9NIxxCxygX4Xeg9C7GX7OUx1wuQ8cXx9o9LE0e9wrH+OZ9fcnrlEedsC/rtqry3ZhUddC759XD/L0w==} dependencies: acorn: 8.8.0 - pathe: 0.3.4 - pkg-types: 0.3.3 + pathe: 0.3.5 + pkg-types: 0.3.4 ufo: 0.8.5 dev: true @@ -7115,8 +7134,8 @@ packages: resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} dev: true - /pathe/0.3.4: - resolution: {integrity: sha512-YWgqEdxf36R6vcsyj0A+yT/rDRPe0wui4J9gRR7T4whjU5Lx/jZOr75ckEgTNaLVQABAwsrlzHRpIKcCdXAQ5A==} + /pathe/0.3.5: + resolution: {integrity: sha512-grU/QeYP0ChuE5kjU2/k8VtAeODzbernHlue0gTa27+ayGIu3wqYBIPGfP9r5xSqgCgDd4nWrjKXEfxMillByg==} dev: true /pathval/1.1.1: @@ -7168,12 +7187,12 @@ packages: dev: true optional: true - /pkg-types/0.3.3: - resolution: {integrity: sha512-6AJcCMnjUQPQv/Wk960w0TOmjhdjbeaQJoSKWRQv9N3rgkessCu6J0Ydsog/nw1MbpnxHuPzYbfOn2KmlZO1FA==} + /pkg-types/0.3.4: + resolution: {integrity: sha512-s214f/xkRpwlwVBToWq9Mu0XlU3HhZMYCnr2var8+jjbavBHh/VCh4pBLsJW29rJ//B1jb4HlpMIaNIMH+W2/w==} dependencies: - jsonc-parser: 3.0.0 - mlly: 0.5.12 - pathe: 0.3.4 + jsonc-parser: 3.1.0 + mlly: 0.5.14 + pathe: 0.3.5 dev: true /playwright-chromium/1.25.0: @@ -7191,8 +7210,8 @@ packages: hasBin: true dev: true - /pnpm/7.9.0: - resolution: {integrity: sha512-xkIVw73yJm/h5M4VvFIS5Q+gQCRDrp3r92g58PtcCK86aZCa7EQ6q6ivdfTAz0KsAVgloA6Anub28n6wju5v3w==} + /pnpm/7.9.3: + resolution: {integrity: sha512-0hpAD1vtILw0i9gTN4ffagnScWMW9/avfZIKllBUd++fAvCss+hVgPPDd0HS9XcOT675gid4H9esGkbLdaFy+w==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -7849,8 +7868,8 @@ packages: '@babel/code-frame': 7.18.6 dev: true - /rollup-plugin-esbuild/4.9.1_v7ao6bhciu5nakpgwngk6v5txa: - resolution: {integrity: sha512-qn/x7Wz9p3Xnva99qcb+nopH0d2VJwVnsxJTGEg+Sh2Z3tqQl33MhOwzekVo1YTKgv+yAmosjcBRJygMfGrtLw==} + /rollup-plugin-esbuild/4.9.3_g2b53jqudjimruv6spqg4ieafm: + resolution: {integrity: sha512-bxfUNYTa9Tw/4kdFfT9gtidDtqXyRdCW11ctZM7D8houCCVqp5qHzQF7hhIr31rqMA0APbG47fgVbbCGXgM49Q==} engines: {node: '>=12'} peerDependencies: esbuild: '>=0.10.1' @@ -7859,9 +7878,9 @@ packages: '@rollup/pluginutils': 4.2.1 debug: 4.3.4 es-module-lexer: 0.9.3 - esbuild: 0.15.3 + esbuild: 0.15.5 joycon: 3.1.1 - jsonc-parser: 3.0.0 + jsonc-parser: 3.1.0 rollup: 2.78.0 transitivePeerDependencies: - supports-color @@ -7919,8 +7938,8 @@ packages: truncate-utf8-bytes: 1.0.2 dev: true - /sass/1.54.4: - resolution: {integrity: sha512-3tmF16yvnBwtlPrNBHw/H907j8MlOX8aTBnlNX1yrKx24RKcJGPyLhFUwkoKBKesR3unP93/2z14Ll8NicwQUA==} + /sass/1.54.5: + resolution: {integrity: sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -8047,12 +8066,12 @@ packages: resolution: {integrity: sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==} dev: true - /shiki/0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + /shiki/0.11.1: + resolution: {integrity: sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==} dependencies: - jsonc-parser: 3.0.0 + jsonc-parser: 3.1.0 vscode-oniguruma: 1.6.2 - vscode-textmate: 5.2.0 + vscode-textmate: 6.0.0 dev: true /side-channel/1.0.4: @@ -8374,8 +8393,8 @@ packages: resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=} dev: false - /systemjs/6.12.2: - resolution: {integrity: sha512-m8E/zVRcfwPiCVtj7iAtL5JdfewnBVvq1HfnPlg30U3SIRCCj1sH2kDLl/PJJvgGB8rSZI65ZXmeZyQshK4aYg==} + /systemjs/6.12.3: + resolution: {integrity: sha512-TtYUN86Hs8V1QGAoj9ad1xmJmZS9Lurfi8Iu8QWOKaUDDuTH0Bpfdxz9qZIdxsmvAg3WMQnZ5/pkQvloh2sr/Q==} dev: false /tailwindcss/3.1.8: @@ -8514,8 +8533,8 @@ packages: engines: {node: '>=14.0.0'} dev: true - /tinyspy/1.0.0: - resolution: {integrity: sha512-FI5B2QdODQYDRjfuLF+OrJ8bjWRMCXokQPcwKm0W3IzcbUmBNv536cQc7eXGoAuXphZwgx1DFbqImwzz08Fnhw==} + /tinyspy/1.0.2: + resolution: {integrity: sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==} engines: {node: '>=14.0.0'} dev: true @@ -8746,8 +8765,8 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unbuild/0.8.8: - resolution: {integrity: sha512-BGDDh3BmM+B0Mc1sVSeUDXKykH3h73V7LcGLM2D3v4Tv5Pr3vgxEwxCkxNw1mZlW71sQX/yxMAoBIxnpmr55Tg==} + /unbuild/0.8.9: + resolution: {integrity: sha512-LCFL/V3Y0UDxal6MNvSTGuyOnTAha467oTCRURZqj4zaW1r/kTDeVNkA9OdP8J/bnsxr0CvkdjRjlvv/K3o7Yw==} hasBin: true dependencies: '@rollup/plugin-alias': 3.1.9_rollup@2.78.0 @@ -8758,23 +8777,23 @@ packages: '@rollup/pluginutils': 4.2.1 chalk: 5.0.1 consola: 2.15.3 - defu: 6.0.0 - esbuild: 0.15.3 + defu: 6.1.0 + esbuild: 0.15.5 globby: 13.1.2 hookable: 5.1.1 jiti: 1.14.0 magic-string: 0.26.2 mkdirp: 1.0.4 mkdist: 0.3.13_typescript@4.7.4 - mlly: 0.5.12 + mlly: 0.5.14 mri: 1.2.0 - pathe: 0.3.4 - pkg-types: 0.3.3 + pathe: 0.3.5 + pkg-types: 0.3.4 pretty-bytes: 6.0.0 rimraf: 3.0.2 rollup: 2.78.0 rollup-plugin-dts: 4.2.2_nm5mlcuxlwr6samvke7b2fz27i - rollup-plugin-esbuild: 4.9.1_v7ao6bhciu5nakpgwngk6v5txa + rollup-plugin-esbuild: 4.9.3_g2b53jqudjimruv6spqg4ieafm scule: 0.3.2 typescript: 4.7.4 untyped: 0.4.5 @@ -8873,29 +8892,29 @@ packages: engines: {node: '>= 0.8'} dev: true - /vitepress/1.0.0-alpha.5: - resolution: {integrity: sha512-bhUfmTzd+i5fm2rInBR1Q/1RBhT0xTXM+vPqVWJdHmIc8XnWF/O7lT6kai38rOTNTt/KyPDk2SRRourPVhQJMA==} - engines: {node: '>=14.6.0'} + /vitepress/1.0.0-alpha.10: + resolution: {integrity: sha512-RGPU+YApj2jaYplAIJUe+2qlDks9FzPX1QGK+7NdGByeCCVZg6z9eYWjjvfvA/sgCtG3yeJE/4/jCwlv4Y8bVw==} hasBin: true dependencies: - '@docsearch/css': 3.1.0 - '@docsearch/js': 3.1.0 + '@docsearch/css': 3.2.1 + '@docsearch/js': 3.2.1 '@vitejs/plugin-vue': link:packages/plugin-vue - '@vue/devtools-api': 6.1.4 - '@vueuse/core': 8.6.0_vue@3.2.37 + '@vue/devtools-api': 6.2.1 + '@vueuse/core': 9.1.0_vue@3.2.37 body-scroll-lock: 4.0.0-beta.0 - shiki: 0.10.1 + shiki: 0.11.1 vite: link:packages/vite vue: 3.2.37 transitivePeerDependencies: + - '@algolia/client-search' - '@types/react' - '@vue/composition-api' - react - react-dom dev: true - /vitest/0.22.0: - resolution: {integrity: sha512-BSIro/QOHLaQY08FHwT6THWhqLQ+VPU+N4Rdo4pcP+16XB6oLmNNAXGcSh/MOLUhfUy+mqCwx7AyKmU7Ms5R+g==} + /vitest/0.22.1: + resolution: {integrity: sha512-+x28YTnSLth4KbXg7MCzoDAzPJlJex7YgiZbUh6YLp0/4PqVZ7q7/zyfdL0OaPtKTpNiQFPpMC8Y2MSzk8F7dw==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -8923,7 +8942,7 @@ packages: debug: 4.3.4 local-pkg: 0.4.2 tinypool: 0.2.4 - tinyspy: 1.0.0 + tinyspy: 1.0.2 vite: link:packages/vite transitivePeerDependencies: - supports-color @@ -8938,8 +8957,8 @@ packages: resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} dev: true - /vscode-textmate/5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + /vscode-textmate/6.0.0: + resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==} dev: true /vue-demi/0.13.1_vue@3.2.37: @@ -8957,8 +8976,8 @@ packages: vue: 3.2.37 dev: true - /vue-router/4.1.3_vue@3.2.37: - resolution: {integrity: sha512-XvK81bcYglKiayT7/vYAg/f36ExPC4t90R/HIpzrZ5x+17BOWptXLCrEPufGgZeuq68ww4ekSIMBZY1qdUdfjA==} + /vue-router/4.1.4_vue@3.2.37: + resolution: {integrity: sha512-UgYen33gOtwT3cOG1+yRen+Brk9py8CSlC9LEa3UjvKZ4EAoSo8NjZPDeDnmNerfazorHIJG1NC7qdi1SuQJnQ==} peerDependencies: vue: ^3.2.0 dependencies: From b2c0ee04d4db4a0ef5a084c50f49782c5f88587c Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 22 Aug 2022 21:19:40 +0200 Subject: [PATCH 094/311] chore: remove custom vitepress config (#9785) --- docs/vite.config.ts | 15 --------------- packages/vite/LICENSE.md | 29 ----------------------------- 2 files changed, 44 deletions(-) delete mode 100644 docs/vite.config.ts diff --git a/docs/vite.config.ts b/docs/vite.config.ts deleted file mode 100644 index 94f3ed69000771..00000000000000 --- a/docs/vite.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineConfig } from 'vite' - -export default defineConfig({ - ssr: { - format: 'cjs' - }, - legacy: { - buildSsrCjsExternalHeuristics: true - }, - optimizeDeps: { - // vitepress is aliased with replacement `join(DIST_CLIENT_PATH, '/index')` - // This needs to be excluded from optimization - exclude: ['vitepress'] - } -}) diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md index 41da37ad32dd33..94f3a5cd7aa509 100644 --- a/packages/vite/LICENSE.md +++ b/packages/vite/LICENSE.md @@ -1963,35 +1963,6 @@ Repository: git+https://github.com/json5/json5.git --------------------------------------- -## jsonc-parser -License: MIT -By: Microsoft Corporation -Repository: https://github.com/microsoft/node-jsonc-parser - -> The MIT License (MIT) -> -> Copyright (c) Microsoft -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - ## launch-editor License: MIT By: Evan You From 9c7e43d030f07f50f7cf5ef490e74c9425f5ce0f Mon Sep 17 00:00:00 2001 From: Josef Brandl Date: Wed, 24 Aug 2022 14:22:41 +0200 Subject: [PATCH 095/311] fix: Skip inlining Git LFS placeholders (fix #9714) (#9795) --- docs/config/build-options.md | 4 +++- docs/guide/assets.md | 2 ++ packages/vite/src/node/plugins/asset.ts | 18 +++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/config/build-options.md b/docs/config/build-options.md index b2d9bf629a02b9..291135045560ce 100644 --- a/docs/config/build-options.md +++ b/docs/config/build-options.md @@ -53,8 +53,10 @@ Specify the directory to nest generated assets under (relative to `build.outDir` Imported or referenced assets that are smaller than this threshold will be inlined as base64 URLs to avoid extra http requests. Set to `0` to disable inlining altogether. +Git LFS placeholders are automatically excluded from inlining because they do not contain the content of the file they represent. + ::: tip Note -If you specify `build.lib`, `build.assetsInlineLimit` will be ignored and assets will always be inlined, regardless of file size. +If you specify `build.lib`, `build.assetsInlineLimit` will be ignored and assets will always be inlined, regardless of file size or being a Git LFS placeholder. ::: ## build.cssCodeSplit diff --git a/docs/guide/assets.md b/docs/guide/assets.md index a8fdf5e208249a..c0dba49a604f80 100644 --- a/docs/guide/assets.md +++ b/docs/guide/assets.md @@ -26,6 +26,8 @@ The behavior is similar to webpack's `file-loader`. The difference is that the i - Assets smaller in bytes than the [`assetsInlineLimit` option](/config/build-options.md#build-assetsinlinelimit) will be inlined as base64 data URLs. +- Git LFS placeholders are automatically excluded from inlining because they do not contain the content of the file they represent. To get inlining, make sure to download the file contents via Git LFS before building. + ### Explicit URL Imports Assets that are not included in the internal list or in `assetsInclude`, can be explicitly imported as a URL using the `?url` suffix. This is useful, for example, to import [Houdini Paint Worklets](https://houdini.how/usage). diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts index c018ba56427fce..94c34a40f8d22e 100644 --- a/packages/vite/src/node/plugins/asset.ts +++ b/packages/vite/src/node/plugins/asset.ts @@ -1,6 +1,7 @@ import path from 'node:path' import { parse as parseUrl } from 'node:url' import fs, { promises as fsp } from 'node:fs' +import { Buffer } from 'node:buffer' import * as mrmime from 'mrmime' import type { NormalizedOutputOptions, @@ -10,6 +11,7 @@ import type { RenderedChunk } from 'rollup' import MagicString from 'magic-string' +import colors from 'picocolors' import { toOutputFilePathInString } from '../build' import type { Plugin } from '../plugin' import type { ResolvedConfig } from '../config' @@ -398,6 +400,13 @@ export function publicFileToBuiltUrl( return `__VITE_PUBLIC_ASSET__${hash}__` } +const GIT_LFS_PREFIX = Buffer.from('version https://git-lfs.github.com') +function isGitLfsPlaceholder(content: Buffer): boolean { + if (content.length < GIT_LFS_PREFIX.length) return false + // Check whether the content begins with the characteristic string of Git LFS placeholders + return GIT_LFS_PREFIX.compare(content, 0, GIT_LFS_PREFIX.length) === 0 +} + /** * Register an asset to be emitted as part of the bundle (if necessary) * and returns the resolved public URL @@ -426,8 +435,15 @@ async function fileToBuiltUrl( config.build.lib || (!file.endsWith('.svg') && !file.endsWith('.html') && - content.length < Number(config.build.assetsInlineLimit)) + content.length < Number(config.build.assetsInlineLimit) && + !isGitLfsPlaceholder(content)) ) { + if (config.build.lib && isGitLfsPlaceholder(content)) { + config.logger.warn( + colors.yellow(`Inlined file ${id} was not downloaded via Git LFS`) + ) + } + const mimeType = mrmime.lookup(file) ?? 'application/octet-stream' // base64 inlined as a string url = `data:${mimeType};base64,${content.toString('base64')}` From 05b3ce6aa7e837ca5f0613929fe39da3d7524bd9 Mon Sep 17 00:00:00 2001 From: patak Date: Wed, 24 Aug 2022 19:50:49 +0200 Subject: [PATCH 096/311] refactor: migrate from vue/compiler-dom to parse5 (#9678) --- .prettierignore | 1 + packages/vite/LICENSE.md | 133 +++------ packages/vite/package.json | 2 +- packages/vite/rollup.config.ts | 9 - packages/vite/src/node/plugins/html.ts | 279 ++++++++++-------- .../src/node/server/middlewares/indexHtml.ts | 95 +++--- playground/html/valid.html | 7 + playground/html/vite.config.js | 3 +- pnpm-lock.yaml | 15 +- 9 files changed, 288 insertions(+), 256 deletions(-) create mode 100644 playground/html/valid.html diff --git a/.prettierignore b/.prettierignore index 0d5487354a8c98..b1ea458b9bb9d8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,4 +7,5 @@ pnpm-lock.yaml pnpm-workspace.yaml playground/tsconfig-json-load-error/has-error/tsconfig.json playground/html/invalid.html +playground/html/valid.html playground/worker/classic-worker.js diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md index 94f3a5cd7aa509..41f21cba4cd801 100644 --- a/packages/vite/LICENSE.md +++ b/packages/vite/LICENSE.md @@ -559,93 +559,6 @@ Repository: rollup/plugins --------------------------------------- -## @vue/compiler-core -License: MIT -By: Evan You -Repository: git+https://github.com/vuejs/core.git - -> The MIT License (MIT) -> -> Copyright (c) 2018-present, Yuxi (Evan) You -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## @vue/compiler-dom -License: MIT -By: Evan You -Repository: git+https://github.com/vuejs/core.git - -> The MIT License (MIT) -> -> Copyright (c) 2018-present, Yuxi (Evan) You -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## @vue/shared -License: MIT -By: Evan You -Repository: git+https://github.com/vuejs/core.git - -> The MIT License (MIT) -> -> Copyright (c) 2018-present, Yuxi (Evan) You -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - ## acorn License: MIT By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine @@ -1278,6 +1191,25 @@ Repository: pillarjs/encodeurl --------------------------------------- +## entities +License: BSD-2-Clause +By: Felix Boehm +Repository: git://github.com/fb55/entities.git + +> Copyright (c) Felix Böhm +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +> +> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +> +> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +> +> THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +> EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------------------------------- + ## es-module-lexer License: MIT By: Guy Bedford @@ -2405,6 +2337,33 @@ Repository: sindresorhus/open --------------------------------------- +## parse5 +License: MIT +By: Ivan Nikulin, https://github.com/inikulin/parse5/graphs/contributors +Repository: git://github.com/inikulin/parse5.git + +> Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + ## parseurl License: MIT By: Douglas Christopher Wilson, Jonathan Ong diff --git a/packages/vite/package.json b/packages/vite/package.json index 8372deeb483512..5df57065f5c506 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -78,7 +78,6 @@ "@rollup/plugin-node-resolve": "13.3.0", "@rollup/plugin-typescript": "^8.3.4", "@rollup/pluginutils": "^4.2.1", - "@vue/compiler-dom": "^3.2.37", "acorn": "^8.8.0", "cac": "^6.7.12", "chokidar": "^3.5.3", @@ -103,6 +102,7 @@ "mrmime": "^1.0.1", "okie": "^1.0.1", "open": "^8.4.0", + "parse5": "^7.0.0", "periscopic": "^3.0.4", "picocolors": "^1.0.0", "postcss-import": "^14.1.0", diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index a271d4f3562906..bf5c0e9da810a2 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -5,7 +5,6 @@ import nodeResolve from '@rollup/plugin-node-resolve' import typescript from '@rollup/plugin-typescript' import commonjs from '@rollup/plugin-commonjs' import json from '@rollup/plugin-json' -import alias from '@rollup/plugin-alias' import license from 'rollup-plugin-license' import MagicString from 'magic-string' import colors from 'picocolors' @@ -79,14 +78,6 @@ function createNodePlugins( declarationDir: string | false ): Plugin[] { return [ - alias({ - // packages with "module" field that doesn't play well with cjs bundles - entries: { - '@vue/compiler-dom': require.resolve( - '@vue/compiler-dom/dist/compiler-dom.cjs.js' - ) - } - }), nodeResolve({ preferBuiltins: true }), typescript({ tsconfig: path.resolve(__dirname, 'src/node/tsconfig.json'), diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index 4c46d988890462..c0963f5f5f459f 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -8,14 +8,7 @@ import type { } from 'rollup' import MagicString from 'magic-string' import colors from 'picocolors' -import type { - AttributeNode, - CompilerError, - ElementNode, - NodeTransform, - TextNode -} from '@vue/compiler-dom' -import { NodeTypes } from '@vue/compiler-dom' +import type { DefaultTreeAdapterMap, ParserError, Token } from 'parse5' import { stripLiteral } from 'strip-literal' import type { Plugin } from '../plugin' import type { ViteDevServer } from '../server' @@ -143,83 +136,141 @@ export const isAsyncScriptMap = new WeakMap< Map >() +export function nodeIsElement( + node: DefaultTreeAdapterMap['node'] +): node is DefaultTreeAdapterMap['element'] { + return node.nodeName[0] !== '#' +} + +function traverseNodes( + node: DefaultTreeAdapterMap['node'], + visitor: (node: DefaultTreeAdapterMap['node']) => void +) { + visitor(node) + if ( + nodeIsElement(node) || + node.nodeName === '#document' || + node.nodeName === '#document-fragment' + ) { + node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor)) + } +} + export async function traverseHtml( html: string, filePath: string, - visitor: NodeTransform + visitor: (node: DefaultTreeAdapterMap['node']) => void ): Promise { // lazy load compiler - const { parse, transform } = await import('@vue/compiler-dom') - // @vue/compiler-core doesn't like lowercase doctypes - html = html.replace(/ { + handleParseError(e, html, filePath) + } + }) + traverseNodes(ast, visitor) } -export function getScriptInfo(node: ElementNode): { - src: AttributeNode | undefined +export function getScriptInfo(node: DefaultTreeAdapterMap['element']): { + src: Token.Attribute | undefined + sourceCodeLocation: Token.Location | undefined isModule: boolean isAsync: boolean } { - let src: AttributeNode | undefined + let src: Token.Attribute | undefined + let sourceCodeLocation: Token.Location | undefined let isModule = false let isAsync = false - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i] - if (p.type === NodeTypes.ATTRIBUTE) { - if (p.name === 'src') { + for (const p of node.attrs) { + if (p.name === 'src') { + if (!src) { src = p - } else if (p.name === 'type' && p.value && p.value.content === 'module') { - isModule = true - } else if (p.name === 'async') { - isAsync = true + sourceCodeLocation = node.sourceCodeLocation?.attrs!['src'] } + } else if (p.name === 'type' && p.value && p.value === 'module') { + isModule = true + } else if (p.name === 'async') { + isAsync = true } } - return { src, isModule, isAsync } + return { src, sourceCodeLocation, isModule, isAsync } +} + +const attrValueStartRE = /=[\s\t\n\r]*(["']|.)/ + +export function overwriteAttrValue( + s: MagicString, + sourceCodeLocation: Token.Location, + newValue: string +): MagicString { + const srcString = s.slice( + sourceCodeLocation.startOffset, + sourceCodeLocation.endOffset + ) + const valueStart = srcString.match(attrValueStartRE) + if (!valueStart) { + // overwrite attr value can only be called for a well-defined value + throw new Error( + `[vite:html] internal error, failed to overwrite attribute value` + ) + } + const wrapOffset = valueStart[1] ? 1 : 0 + const valueOffset = valueStart.index! + valueStart[0].length - 1 + s.overwrite( + sourceCodeLocation.startOffset + valueOffset + wrapOffset, + sourceCodeLocation.endOffset - wrapOffset, + newValue, + { contentOnly: true } + ) + return s } /** - * Format Vue @type {CompilerError} to @type {RollupError} + * Format parse5 @type {ParserError} to @type {RollupError} */ function formatParseError( - compilerError: CompilerError, + parserError: ParserError, id: string, html: string ): RollupError { - const formattedError: RollupError = { ...(compilerError as any) } - if (compilerError.loc) { - formattedError.frame = generateCodeFrame( - html, - compilerError.loc.start.offset - ) - formattedError.loc = { - file: id, - line: compilerError.loc.start.line, - column: compilerError.loc.start.column - } + const formattedError: RollupError = { + code: parserError.code, + message: `parse5 error code ${parserError.code}` + } + formattedError.frame = generateCodeFrame(html, parserError.startOffset) + formattedError.loc = { + file: id, + line: parserError.startLine, + column: parserError.startCol } return formattedError } function handleParseError( - compilerError: CompilerError, + parserError: ParserError, html: string, filePath: string ) { + switch (parserError.code) { + case 'missing-doctype': + // ignore missing DOCTYPE + return + case 'abandoned-head-element-child': + // Accept elements without closing tag in + return + case 'duplicate-attribute': + // Accept duplicate attributes #9566 + // The first attribute is used, browsers silently ignore duplicates + return + } const parseError = { loc: filePath, frame: '', - ...formatParseError(compilerError, filePath, html) + ...formatParseError(parserError, filePath, html) } throw new Error( - `Unable to parse HTML; ${compilerError.message}\n at ${JSON.stringify( + `Unable to parse HTML; ${parseError.message}\n at ${JSON.stringify( parseError.loc )}\n${parseError.frame}` ) @@ -270,7 +321,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { let js = '' const s = new MagicString(html) - const assetUrls: AttributeNode[] = [] + const assetUrls: { + attr: Token.Attribute + sourceCodeLocation: Token.Location + }[] = [] const scriptUrls: ScriptAssetsUrl[] = [] const styleUrls: ScriptAssetsUrl[] = [] let inlineModuleIndex = -1 @@ -280,25 +334,25 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { let someScriptsAreDefer = false await traverseHtml(html, id, (node) => { - if (node.type !== NodeTypes.ELEMENT) { + if (!nodeIsElement(node)) { return } let shouldRemove = false // script tags - if (node.tag === 'script') { - const { src, isModule, isAsync } = getScriptInfo(node) + if (node.nodeName === 'script') { + const { src, sourceCodeLocation, isModule, isAsync } = + getScriptInfo(node) - const url = src && src.value && src.value.content + const url = src && src.value const isPublicFile = !!(url && checkPublicFile(url, config)) if (isPublicFile) { // referencing public dir url, prefix with base - s.overwrite( - src!.value!.loc.start.offset, - src!.value!.loc.end.offset, - `"${toOutputPublicFilePath(url)}"`, - { contentOnly: true } + overwriteAttrValue( + s, + sourceCodeLocation!, + toOutputPublicFilePath(url) ) } @@ -309,10 +363,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { // add it as an import js += `\nimport ${JSON.stringify(url)}` shouldRemove = true - } else if (node.children.length) { - const contents = node.children - .map((child: any) => child.content || '') - .join('') + } else if (node.childNodes.length) { + const scriptNode = + node.childNodes.pop() as DefaultTreeAdapterMap['textNode'] + const contents = scriptNode.value // const filePath = id.replace(normalizePath(config.root), '') addToHTMLProxyCache(config, filePath, inlineModuleIndex, { @@ -331,9 +385,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { ``, { contentOnly: true } ) } await traverseHtml(html, htmlPath, (node) => { - if (node.type !== NodeTypes.ELEMENT) { + if (!nodeIsElement(node)) { return } // script tags - if (node.tag === 'script') { - const { src, isModule } = getScriptInfo(node) + if (node.nodeName === 'script') { + const { src, sourceCodeLocation, isModule } = getScriptInfo(node) if (src) { - processNodeUrl(src, s, config, htmlPath, originalUrl, moduleGraph) - } else if (isModule && node.children.length) { + processNodeUrl( + src, + sourceCodeLocation!, + s, + config, + htmlPath, + originalUrl, + moduleGraph + ) + } else if (isModule && node.childNodes.length) { addInlineModule(node, 'js') } } - if (node.tag === 'style' && node.children.length) { - const children = node.children[0] as TextNode + if (node.nodeName === 'style' && node.childNodes.length) { + const children = node.childNodes[0] as DefaultTreeAdapterMap['textNode'] styleUrl.push({ - start: children.loc.start.offset, - end: children.loc.end.offset, - code: children.content + start: children.sourceCodeLocation!.startOffset, + end: children.sourceCodeLocation!.endOffset, + code: children.value }) } // elements with [href/src] attrs - const assetAttrs = assetAttrsConfig[node.tag] + const assetAttrs = assetAttrsConfig[node.nodeName] if (assetAttrs) { - for (const p of node.props) { - if ( - p.type === NodeTypes.ATTRIBUTE && - p.value && - assetAttrs.includes(p.name) - ) { - processNodeUrl(p, s, config, htmlPath, originalUrl) + for (const p of node.attrs) { + if (p.value && assetAttrs.includes(p.name)) { + processNodeUrl( + p, + node.sourceCodeLocation!.attrs![p.name], + s, + config, + htmlPath, + originalUrl + ) } } } diff --git a/playground/html/valid.html b/playground/html/valid.html new file mode 100644 index 00000000000000..9ff48bbeafba6b --- /dev/null +++ b/playground/html/valid.html @@ -0,0 +1,7 @@ + +
Accept duplicated attribute
+ + + + diff --git a/playground/html/vite.config.js b/playground/html/vite.config.js index c294e45ad424f5..571c15811d2311 100644 --- a/playground/html/vite.config.js +++ b/playground/html/vite.config.js @@ -26,7 +26,8 @@ module.exports = { __dirname, 'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html' ), - linkProps: resolve(__dirname, 'link-props/index.html') + linkProps: resolve(__dirname, 'link-props/index.html'), + valid: resolve(__dirname, 'valid.html') } } }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ad729f221ec36..d00347c90e12fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,7 +214,6 @@ importers: '@rollup/plugin-node-resolve': 13.3.0 '@rollup/plugin-typescript': ^8.3.4 '@rollup/pluginutils': ^4.2.1 - '@vue/compiler-dom': ^3.2.37 acorn: ^8.8.0 cac: ^6.7.12 chokidar: ^3.5.3 @@ -241,6 +240,7 @@ importers: mrmime: ^1.0.1 okie: ^1.0.1 open: ^8.4.0 + parse5: ^7.0.0 periscopic: ^3.0.4 picocolors: ^1.0.0 postcss: ^8.4.16 @@ -280,7 +280,6 @@ importers: '@rollup/plugin-node-resolve': 13.3.0_rollup@2.78.0 '@rollup/plugin-typescript': 8.3.4_rollup@2.78.0+tslib@2.4.0 '@rollup/pluginutils': 4.2.1 - '@vue/compiler-dom': 3.2.37 acorn: 8.8.0 cac: 6.7.12 chokidar: 3.5.3 @@ -305,6 +304,7 @@ importers: mrmime: 1.0.1 okie: 1.0.1 open: 8.4.0 + parse5: 7.0.0 periscopic: 3.0.4 picocolors: 1.0.0 postcss-import: 14.1.0_postcss@8.4.16 @@ -4238,6 +4238,11 @@ packages: engines: {node: '>= 0.8'} dev: true + /entities/4.3.1: + resolution: {integrity: sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==} + engines: {node: '>=0.12'} + dev: true + /env-paths/2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -7078,6 +7083,12 @@ packages: engines: {node: '>= 0.10'} dev: true + /parse5/7.0.0: + resolution: {integrity: sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==} + dependencies: + entities: 4.3.1 + dev: true + /parseurl/1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} From ba62be40b4f46c98872fb10990b559fee88f4a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=B7=8D=E5=B3=B0?= Date: Thu, 25 Aug 2022 02:16:46 +0800 Subject: [PATCH 097/311] fix: close socket when client error handled (#9816) --- packages/vite/src/node/http.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/vite/src/node/http.ts b/packages/vite/src/node/http.ts index 3317814252018b..86fa792072cc2e 100644 --- a/packages/vite/src/node/http.ts +++ b/packages/vite/src/node/http.ts @@ -190,7 +190,9 @@ export function setClientErrorHandler( logger: Logger ): void { server.on('clientError', (err, socket) => { + let msg = '400 Bad Request' if ((err as any).code === 'HPE_HEADER_OVERFLOW') { + msg = '431 Request Header Fields Too Large' logger.warn( colors.yellow( 'Server responded with status code 431. ' + @@ -198,5 +200,9 @@ export function setClientErrorHandler( ) ) } + if ((err as any).code === 'ECONNRESET' || !socket.writable) { + return + } + socket.end(`HTTP/1.1 ${msg}\r\n\r\n`) }) } From a8279af608657861b64af5980942cced0b04c8ac Mon Sep 17 00:00:00 2001 From: Martin Kirilov Date: Wed, 24 Aug 2022 22:09:01 +0300 Subject: [PATCH 098/311] fix(plugin-legacy): prevent global process.env.NODE_ENV mutation (#9741) --- packages/plugin-legacy/src/index.ts | 4 ++ ...lient-legacy-ssr-sequential-builds.spec.ts | 17 +++++ .../legacy/__tests__/client-and-ssr/serve.ts | 68 +++++++++++++++++++ playground/legacy/entry-server-sequential.js | 7 ++ playground/test-utils.ts | 1 + 5 files changed, 97 insertions(+) create mode 100644 playground/legacy/__tests__/client-and-ssr/client-legacy-ssr-sequential-builds.spec.ts create mode 100644 playground/legacy/__tests__/client-and-ssr/serve.ts create mode 100644 playground/legacy/entry-server-sequential.js diff --git a/packages/plugin-legacy/src/index.ts b/packages/plugin-legacy/src/index.ts index 2d3711fd8289c6..4d51d1cecaf493 100644 --- a/packages/plugin-legacy/src/index.ts +++ b/packages/plugin-legacy/src/index.ts @@ -205,6 +205,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { modernPolyfills ) await buildPolyfillChunk( + config.mode, modernPolyfills, bundle, facadeToModernPolyfillMap, @@ -237,6 +238,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] { ) await buildPolyfillChunk( + config.mode, legacyPolyfills, bundle, facadeToLegacyPolyfillMap, @@ -615,6 +617,7 @@ function createBabelPresetEnvOptions( } async function buildPolyfillChunk( + mode: string, imports: Set, bundle: OutputBundle, facadeToChunkMap: Map, @@ -626,6 +629,7 @@ async function buildPolyfillChunk( let { minify, assetsDir } = buildOptions minify = minify ? 'terser' : false const res = await build({ + mode, // so that everything is resolved from here root: path.dirname(fileURLToPath(import.meta.url)), configFile: false, diff --git a/playground/legacy/__tests__/client-and-ssr/client-legacy-ssr-sequential-builds.spec.ts b/playground/legacy/__tests__/client-and-ssr/client-legacy-ssr-sequential-builds.spec.ts new file mode 100644 index 00000000000000..0980d722605347 --- /dev/null +++ b/playground/legacy/__tests__/client-and-ssr/client-legacy-ssr-sequential-builds.spec.ts @@ -0,0 +1,17 @@ +import { describe, expect, test } from 'vitest' +import { port } from './serve' +import { isBuild, page } from '~utils' + +const url = `http://localhost:${port}` + +describe.runIf(isBuild)('client-legacy-ssr-sequential-builds', () => { + test('should work', async () => { + await page.goto(url) + expect(await page.textContent('#app')).toMatch('Hello') + }) + + test('import.meta.env.MODE', async () => { + // SSR build is always modern + expect(await page.textContent('#mode')).toMatch('test') + }) +}) diff --git a/playground/legacy/__tests__/client-and-ssr/serve.ts b/playground/legacy/__tests__/client-and-ssr/serve.ts new file mode 100644 index 00000000000000..becca5fc123b8b --- /dev/null +++ b/playground/legacy/__tests__/client-and-ssr/serve.ts @@ -0,0 +1,68 @@ +// this is automatically detected by playground/vitestSetup.ts and will replace +// the default e2e test serve behavior +import path from 'node:path' +import { ports, rootDir } from '~utils' + +export const port = ports['legacy/client-and-ssr'] + +export async function serve(): Promise<{ close(): Promise }> { + const { build } = await import('vite') + + // In a CLI app it is possible that you may run `build` several times one after another + // For example, you may want to override an option specifically for the SSR build + // And you may have a CLI app built for that purpose to make a more concise API + // An unexpected behaviour is for the plugin-legacy to override the process.env.NODE_ENV value + // And any build after the first client build that called plugin-legacy will misbehave and + // build with process.env.NODE_ENV=production, rather than your CLI's env: NODE_ENV=myWhateverEnv my-cli-app build + // The issue is with plugin-legacy's index.ts file not explicitly passing mode: process.env.NODE_ENV to vite's build function + // This causes vite to call resolveConfig with defaultMode = 'production' and mutate process.env.NODE_ENV to 'production' + + await build({ + mode: process.env.NODE_ENV, + root: rootDir, + logLevel: 'silent', + build: { + target: 'esnext', + outDir: 'dist/client' + } + }) + + await build({ + mode: process.env.NODE_ENV, + root: rootDir, + logLevel: 'silent', + build: { + target: 'esnext', + ssr: 'entry-server-sequential.js', + outDir: 'dist/server' + } + }) + + const { default: express } = await import('express') + const app = express() + + app.use('/', async (_req, res) => { + const { render } = await import( + path.resolve(rootDir, './dist/server/entry-server-sequential.mjs') + ) + const html = await render() + res.status(200).set({ 'Content-Type': 'text/html' }).end(html) + }) + + return new Promise((resolve, reject) => { + try { + const server = app.listen(port, () => { + resolve({ + // for test teardown + async close() { + await new Promise((resolve) => { + server.close(resolve) + }) + } + }) + }) + } catch (e) { + reject(e) + } + }) +} diff --git a/playground/legacy/entry-server-sequential.js b/playground/legacy/entry-server-sequential.js new file mode 100644 index 00000000000000..718dc84b8df6b0 --- /dev/null +++ b/playground/legacy/entry-server-sequential.js @@ -0,0 +1,7 @@ +// This counts as 'server-side' rendering, yes? +export async function render() { + return /* html */ ` +
Hello
+
${import.meta.env.MODE}
+ ` +} diff --git a/playground/test-utils.ts b/playground/test-utils.ts index 1364c56e477b10..c7c3288fafe2ff 100644 --- a/playground/test-utils.ts +++ b/playground/test-utils.ts @@ -21,6 +21,7 @@ export const ports = { 'legacy/ssr': 9520, lib: 9521, 'optimize-missing-deps': 9522, + 'legacy/client-and-ssr': 9523, 'ssr-deps': 9600, 'ssr-html': 9601, 'ssr-pug': 9602, From 61273b21147d2e8b825679fbc05daf2611eb0f3e Mon Sep 17 00:00:00 2001 From: yoho Date: Thu, 25 Aug 2022 03:28:50 +0800 Subject: [PATCH 099/311] fix: `injectQuery` break relative path (#9760) --- .../vite/src/node/__tests__/utils.spec.ts | 27 +++++++++++++++++++ packages/vite/src/node/utils.ts | 8 +++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/packages/vite/src/node/__tests__/utils.spec.ts b/packages/vite/src/node/__tests__/utils.spec.ts index 51990edf709da2..858ec8437362a1 100644 --- a/packages/vite/src/node/__tests__/utils.spec.ts +++ b/packages/vite/src/node/__tests__/utils.spec.ts @@ -19,6 +19,33 @@ describe('injectQuery', () => { }) } + test('relative path', () => { + expect(injectQuery('usr/vite/%20a%20', 'direct')).toEqual( + 'usr/vite/%20a%20?direct' + ) + expect(injectQuery('./usr/vite/%20a%20', 'direct')).toEqual( + './usr/vite/%20a%20?direct' + ) + expect(injectQuery('../usr/vite/%20a%20', 'direct')).toEqual( + '../usr/vite/%20a%20?direct' + ) + }) + + test('path with hash', () => { + expect(injectQuery('/usr/vite/path with space/#1?2/', 'direct')).toEqual( + '/usr/vite/path with space/?direct#1?2/' + ) + }) + + test('path with protocol', () => { + expect(injectQuery('file:///usr/vite/%20a%20', 'direct')).toMatch( + 'file:///usr/vite/%20a%20?direct' + ) + expect(injectQuery('http://usr.vite/%20a%20', 'direct')).toMatch( + 'http://usr.vite/%20a%20?direct' + ) + }) + test('path with multiple spaces', () => { expect(injectQuery('/usr/vite/path with space', 'direct')).toEqual( '/usr/vite/path with space?direct' diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 0f681ec8f7378f..7378b080eafd0c 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -311,11 +311,9 @@ export function injectQuery(url: string, queryToInject: string): string { if (resolvedUrl.protocol !== 'relative:') { resolvedUrl = pathToFileURL(url) } - let { protocol, pathname, search, hash } = resolvedUrl - if (protocol === 'file:') { - pathname = pathname.slice(1) - } - pathname = decodeURIComponent(pathname) + const { search, hash } = resolvedUrl + let pathname = cleanUrl(url) + pathname = isWindows ? slash(pathname) : pathname return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${ hash ?? '' }` From 1ee0364c769daf069dcef829b1957714b99a0ef6 Mon Sep 17 00:00:00 2001 From: Tal500 Date: Thu, 25 Aug 2022 14:14:54 +0300 Subject: [PATCH 100/311] fix: `completeSystemWrapPlugin` captures `function ()` (fixes #9807) (#9821) --- packages/vite/src/node/plugins/completeSystemWrap.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/node/plugins/completeSystemWrap.ts b/packages/vite/src/node/plugins/completeSystemWrap.ts index 700166fc5408bf..e1bd6a41f982f5 100644 --- a/packages/vite/src/node/plugins/completeSystemWrap.ts +++ b/packages/vite/src/node/plugins/completeSystemWrap.ts @@ -4,7 +4,7 @@ import type { Plugin } from '../plugin' * make sure systemjs register wrap to had complete parameters in system format */ export function completeSystemWrapPlugin(): Plugin { - const SystemJSWrapRE = /System.register\(.*\((exports)\)/g + const SystemJSWrapRE = /System.register\(.*(\(exports\)|\(\))/g return { name: 'vite:force-systemjs-wrap-complete', @@ -13,7 +13,7 @@ export function completeSystemWrapPlugin(): Plugin { if (opts.format === 'system') { return { code: code.replace(SystemJSWrapRE, (s, s1) => - s.replace(s1, 'exports, module') + s.replace(s1, '(exports, module)') ), map: null } From 71cb3740364c6fff2ff7f39a9c44029a281b1b7c Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Thu, 25 Aug 2022 21:35:47 +0800 Subject: [PATCH 101/311] feat: relax dep browser externals as warning (#9837) --- .../src/node/optimizer/esbuildDepPlugin.ts | 2 +- .../__tests__/optimize-deps.spec.ts | 23 +++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts index 04c978130f256c..f646e3815758d1 100644 --- a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts +++ b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts @@ -276,7 +276,7 @@ module.exports = Object.create(new Proxy({}, { key !== 'constructor' && key !== 'splice' ) { - throw new Error(\`Module "${path}" has been externalized for browser compatibility. Cannot access "${path}.\${key}" in client code.\`) + console.warn(\`Module "${path}" has been externalized for browser compatibility. Cannot access "${path}.\${key}" in client code.\`) } } }))` diff --git a/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/playground/optimize-deps/__tests__/optimize-deps.spec.ts index fd717b0401499b..19e9014d7234cf 100644 --- a/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -149,16 +149,23 @@ test('flatten id should generate correctly', async () => { test.runIf(isServe)('error on builtin modules usage', () => { expect(browserLogs).toEqual( expect.arrayContaining([ - // from dep-with-builtin-module-esm top-level try-catch + // from dep-with-builtin-module-esm + expect.stringMatching(/dep-with-builtin-module-esm.*is not a function/), + // dep-with-builtin-module-esm warnings expect.stringContaining( - 'dep-with-builtin-module-esm Error: Module "fs" has been externalized for browser compatibility. Cannot access "fs.readFileSync" in client code.' + 'Module "fs" has been externalized for browser compatibility. Cannot access "fs.readFileSync" in client code.' ), expect.stringContaining( - 'dep-with-builtin-module-esm Error: Module "path" has been externalized for browser compatibility. Cannot access "path.join" in client code.' + 'Module "path" has been externalized for browser compatibility. Cannot access "path.join" in client code.' ), - // from dep-with-builtin-module-cjs top-level try-catch + // from dep-with-builtin-module-cjs + expect.stringMatching(/dep-with-builtin-module-cjs.*is not a function/), + // dep-with-builtin-module-cjs warnings expect.stringContaining( - 'dep-with-builtin-module-cjs Error: Module "path" has been externalized for browser compatibility. Cannot access "path.join" in client code.' + 'Module "fs" has been externalized for browser compatibility. Cannot access "fs.readFileSync" in client code.' + ), + expect.stringContaining( + 'Module "path" has been externalized for browser compatibility. Cannot access "path.join" in client code.' ) ]) ) @@ -167,11 +174,7 @@ test.runIf(isServe)('error on builtin modules usage', () => { expect.arrayContaining([ // from user source code 'Module "buffer" has been externalized for browser compatibility. Cannot access "buffer.Buffer" in client code.', - 'Module "child_process" has been externalized for browser compatibility. Cannot access "child_process.execSync" in client code.', - // from dep-with-builtin-module-esm read() - 'Module "fs" has been externalized for browser compatibility. Cannot access "fs.readFileSync" in client code.', - // from dep-with-builtin-module-esm read() - 'Module "fs" has been externalized for browser compatibility. Cannot access "fs.readFileSync" in client code.' + 'Module "child_process" has been externalized for browser compatibility. Cannot access "child_process.execSync" in client code.' ]) ) }) From 5df788dfe2d89e541461e166f03afb38c2f1dd7e Mon Sep 17 00:00:00 2001 From: patak-dev Date: Thu, 25 Aug 2022 16:12:54 +0200 Subject: [PATCH 102/311] release: v3.1.0-beta.0 --- packages/vite/CHANGELOG.md | 22 ++++++++++++++++++++++ packages/vite/package.json | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 9d146abe70981a..5781ca33b1eff3 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,25 @@ +## 3.1.0-beta.0 (2022-08-25) + +* feat: relax dep browser externals as warning (#9837) ([71cb374](https://github.com/vitejs/vite/commit/71cb374)), closes [#9837](https://github.com/vitejs/vite/issues/9837) +* feat: support object style hooks (#9634) ([757a92f](https://github.com/vitejs/vite/commit/757a92f)), closes [#9634](https://github.com/vitejs/vite/issues/9634) +* fix: `completeSystemWrapPlugin` captures `function ()` (fixes #9807) (#9821) ([1ee0364](https://github.com/vitejs/vite/commit/1ee0364)), closes [#9807](https://github.com/vitejs/vite/issues/9807) [#9821](https://github.com/vitejs/vite/issues/9821) +* fix: `injectQuery` break relative path (#9760) ([61273b2](https://github.com/vitejs/vite/commit/61273b2)), closes [#9760](https://github.com/vitejs/vite/issues/9760) +* fix: close socket when client error handled (#9816) ([ba62be4](https://github.com/vitejs/vite/commit/ba62be4)), closes [#9816](https://github.com/vitejs/vite/issues/9816) +* fix: handle resolve optional peer deps (#9321) ([eec3886](https://github.com/vitejs/vite/commit/eec3886)), closes [#9321](https://github.com/vitejs/vite/issues/9321) +* fix: module graph ensureEntryFromUrl based on id (#9759) ([01857af](https://github.com/vitejs/vite/commit/01857af)), closes [#9759](https://github.com/vitejs/vite/issues/9759) +* fix: sanitize asset filenames (#9737) ([2f468bb](https://github.com/vitejs/vite/commit/2f468bb)), closes [#9737](https://github.com/vitejs/vite/issues/9737) +* fix: Skip inlining Git LFS placeholders (fix #9714) (#9795) ([9c7e43d](https://github.com/vitejs/vite/commit/9c7e43d)), closes [#9714](https://github.com/vitejs/vite/issues/9714) [#9795](https://github.com/vitejs/vite/issues/9795) +* fix(html): move importmap before module scripts (#9392) ([b386fba](https://github.com/vitejs/vite/commit/b386fba)), closes [#9392](https://github.com/vitejs/vite/issues/9392) +* refactor: migrate from vue/compiler-dom to parse5 (#9678) ([05b3ce6](https://github.com/vitejs/vite/commit/05b3ce6)), closes [#9678](https://github.com/vitejs/vite/issues/9678) +* refactor: use `server.ssrTransform` (#9769) ([246a087](https://github.com/vitejs/vite/commit/246a087)), closes [#9769](https://github.com/vitejs/vite/issues/9769) +* chore: output tsconfck debug log (#9768) ([9206ad7](https://github.com/vitejs/vite/commit/9206ad7)), closes [#9768](https://github.com/vitejs/vite/issues/9768) +* chore: remove custom vitepress config (#9785) ([b2c0ee0](https://github.com/vitejs/vite/commit/b2c0ee0)), closes [#9785](https://github.com/vitejs/vite/issues/9785) +* chore(deps): update all non-major dependencies (#9778) ([aceaefc](https://github.com/vitejs/vite/commit/aceaefc)), closes [#9778](https://github.com/vitejs/vite/issues/9778) +* chore(deps): update dependency postcss-modules to v5 (#9779) ([aca6ac2](https://github.com/vitejs/vite/commit/aca6ac2)), closes [#9779](https://github.com/vitejs/vite/issues/9779) +* perf: legacy avoid insert the entry module css (#9761) ([0765ab8](https://github.com/vitejs/vite/commit/0765ab8)), closes [#9761](https://github.com/vitejs/vite/issues/9761) + + + ## 3.0.9 (2022-08-19) * feat(ssr): warn if cant analyze dynamic import (#9738) ([e0ecb80](https://github.com/vitejs/vite/commit/e0ecb80)), closes [#9738](https://github.com/vitejs/vite/issues/9738) diff --git a/packages/vite/package.json b/packages/vite/package.json index 5df57065f5c506..ceb4d2810068f4 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.0.9", + "version": "3.1.0-beta.0", "type": "module", "license": "MIT", "author": "Evan You", From 0452224e2f725138be0a79ebe052e0e87ac0e725 Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Fri, 26 Aug 2022 16:11:12 +0200 Subject: [PATCH 103/311] feat(client): use debug channel on hot updates (#8855) --- packages/vite/src/client/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index dad7c74ee2b8a0..0ea5af710c0518 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -189,7 +189,7 @@ async function handleMessage(payload: HMRPayload) { outdatedLinkTags.add(el) el.after(newLinkTag) } - console.log(`[vite] css hot updated: ${searchUrl}`) + console.debug(`[vite] css hot updated: ${searchUrl}`) } }) break @@ -445,7 +445,7 @@ async function fetchUpdate({ path, acceptedPath, timestamp }: Update) { fn(deps.map((dep) => moduleMap.get(dep))) } const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}` - console.log(`[vite] hot updated: ${loggedPath}`) + console.debug(`[vite] hot updated: ${loggedPath}`) } } From 1673f3daa0147b2afa546648ec913837402fec21 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 26 Aug 2022 22:20:43 +0800 Subject: [PATCH 104/311] feat(create-vite): add support for custom init commands (`create-vue`, Nuxt, and SvelteKit) (#9406) --- packages/create-vite/index.js | 73 ++++++++++++++++++++++++++++--- packages/create-vite/package.json | 1 + pnpm-lock.yaml | 8 +--- 3 files changed, 71 insertions(+), 11 deletions(-) diff --git a/packages/create-vite/index.js b/packages/create-vite/index.js index 6ba1214a1829bb..d602eea2b3e57a 100755 --- a/packages/create-vite/index.js +++ b/packages/create-vite/index.js @@ -4,12 +4,14 @@ import fs from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' +import spawn from 'cross-spawn' import minimist from 'minimist' import prompts from 'prompts' import { blue, cyan, green, + lightGreen, lightRed, magenta, red, @@ -25,6 +27,7 @@ const cwd = process.cwd() const FRAMEWORKS = [ { name: 'vanilla', + display: 'Vanilla', color: yellow, variants: [ { @@ -41,6 +44,7 @@ const FRAMEWORKS = [ }, { name: 'vue', + display: 'Vue', color: green, variants: [ { @@ -52,11 +56,24 @@ const FRAMEWORKS = [ name: 'vue-ts', display: 'TypeScript', color: blue + }, + { + name: 'custom-create-vue', + display: 'Customize with create-vue', + color: green, + customCommand: 'npm create vue@latest TARGET_DIR' + }, + { + name: 'custom-nuxt', + display: 'Nuxt', + color: lightGreen, + customCommand: 'npm exec nuxi init TARGET_DIR' } ] }, { name: 'react', + display: 'React', color: cyan, variants: [ { @@ -73,6 +90,7 @@ const FRAMEWORKS = [ }, { name: 'preact', + display: 'Preact', color: magenta, variants: [ { @@ -89,6 +107,7 @@ const FRAMEWORKS = [ }, { name: 'lit', + display: 'Lit', color: lightRed, variants: [ { @@ -105,6 +124,7 @@ const FRAMEWORKS = [ }, { name: 'svelte', + display: 'Svelte', color: red, variants: [ { @@ -116,6 +136,12 @@ const FRAMEWORKS = [ name: 'svelte-ts', display: 'TypeScript', color: blue + }, + { + name: 'custom-svelte-kit', + display: 'SvelteKit', + color: red, + customCommand: 'npm create svelte@latest TARGET_DIR' } ] } @@ -191,7 +217,7 @@ async function init() { choices: FRAMEWORKS.map((framework) => { const frameworkColor = framework.color return { - title: frameworkColor(framework.name), + title: frameworkColor(framework.display || framework.name), value: framework } }) @@ -206,7 +232,7 @@ async function init() { framework.variants.map((variant) => { const variantColor = variant.color return { - title: variantColor(variant.name), + title: variantColor(variant.display || variant.name), value: variant.name } }) @@ -237,6 +263,46 @@ async function init() { // determine template template = variant || framework || template + const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent) + const pkgManager = pkgInfo ? pkgInfo.name : 'npm' + const isYarn1 = pkgManager === 'yarn' && pkgInfo?.version.startsWith('1.') + + if (template.startsWith('custom-')) { + const getCustomCommand = (name) => { + for (const f of FRAMEWORKS) { + for (const v of f.variants || []) { + if (v.name === name) { + return v.customCommand + } + } + } + } + const customCommand = getCustomCommand(template) + const fullCustomCommand = customCommand + .replace('TARGET_DIR', targetDir) + .replace(/^npm create/, `${pkgManager} create`) + // Only Yarn 1.x doesn't support `@version` in the `create` command + .replace('@latest', () => (isYarn1 ? '' : '@latest')) + .replace(/^npm exec/, () => { + // Prefer `pnpm dlx` or `yarn dlx` + if (pkgManager === 'pnpm') { + return 'pnpm dlx' + } + if (pkgManager === 'yarn' && !isYarn1) { + return 'yarn dlx' + } + // Use `npm exec` in all other cases, + // including Yarn 1.x and other custom npm clients. + return 'npm exec' + }) + + const [command, ...args] = fullCustomCommand.split(' ') + const { status } = spawn.sync(command, args, { + stdio: 'inherit' + }) + process.exit(status ?? 0) + } + console.log(`\nScaffolding project in ${root}...`) const templateDir = path.resolve( @@ -269,9 +335,6 @@ async function init() { write('package.json', JSON.stringify(pkg, null, 2)) - const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent) - const pkgManager = pkgInfo ? pkgInfo.name : 'npm' - console.log(`\nDone. Now run:\n`) if (root !== cwd) { console.log(` cd ${path.relative(cwd, root)}`) diff --git a/packages/create-vite/package.json b/packages/create-vite/package.json index 7c47e2601ab124..a52fa837d977ab 100644 --- a/packages/create-vite/package.json +++ b/packages/create-vite/package.json @@ -26,6 +26,7 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/create-vite#readme", "dependencies": { + "cross-spawn": "^7.0.3", "kolorist": "^1.5.1", "minimist": "^1.2.6", "prompts": "^2.4.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d00347c90e12fd..8774b7f10651ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -118,10 +118,12 @@ importers: packages/create-vite: specifiers: + cross-spawn: ^7.0.3 kolorist: ^1.5.1 minimist: ^1.2.6 prompts: ^2.4.2 dependencies: + cross-spawn: 7.0.3 kolorist: 1.5.1 minimist: 1.2.6 prompts: 2.4.2 @@ -3979,7 +3981,6 @@ packages: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true /crosspath/0.0.8: resolution: {integrity: sha512-IKlS3MpP0fhJ50M6ltyLO7Q4NzwfhafpmolMH0EDKyyaY81HutF2mH4hLpCdm3fKZ/TSTW5qPIdTy62YnefEyQ==} @@ -6114,7 +6115,6 @@ packages: /isexe/2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true /jiti/1.14.0: resolution: {integrity: sha512-4IwstlaKQc9vCTC+qUXLM1hajy2ImiL9KnLvVYiaHOtS/v3wRjhLlGl121AmgDgx/O43uKmxownJghS5XMya2A==} @@ -7116,7 +7116,6 @@ packages: /path-key/3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - dev: true /path-key/4.0.0: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} @@ -8057,7 +8056,6 @@ packages: engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 - dev: true /shebang-regex/1.0.0: resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=} @@ -8067,7 +8065,6 @@ packages: /shebang-regex/3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - dev: true /shell-exec/1.0.2: resolution: {integrity: sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg==} @@ -9077,7 +9074,6 @@ packages: hasBin: true dependencies: isexe: 2.0.0 - dev: true /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} From c3f6731bafeadd310efa4325cb8dcc639636fe48 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Sat, 27 Aug 2022 00:53:35 +0800 Subject: [PATCH 105/311] feat: stabilize server.resolvedUrls (#9866) --- docs/guide/api-javascript.md | 5 +++++ packages/vite/src/node/preview.ts | 2 -- packages/vite/src/node/server/index.ts | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md index a2669152a7348c..55c1510898cbdb 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -91,6 +91,11 @@ interface ViteDevServer { * and hmr state. */ moduleGraph: ModuleGraph + /** + * The resolved urls Vite prints on the CLI. null in middleware mode or + * before `server.listen` is called. + */ + resolvedUrls: ResolvedServerUrls | null /** * Programmatically resolve, load and transform a URL and get the result * without going through the http request pipeline. diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index 71533111678e27..c81772a8672682 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -54,8 +54,6 @@ export interface PreviewServer { httpServer: http.Server /** * The resolved urls Vite prints on the CLI - * - * @experimental */ resolvedUrls: ResolvedServerUrls /** diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index a105e15d574812..925bd96c5661b1 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -194,8 +194,6 @@ export interface ViteDevServer { /** * The resolved urls Vite prints on the CLI. null in middleware mode or * before `server.listen` is called. - * - * @experimental */ resolvedUrls: ResolvedServerUrls | null /** From cc8800a8e7613961144a567f4024b71f218224f8 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Sat, 27 Aug 2022 13:30:43 +0800 Subject: [PATCH 106/311] fix(build): build project path error (#9793) --- packages/vite/src/node/plugins/html.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index c0963f5f5f459f..eb20b2d0af205b 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -19,8 +19,7 @@ import { isDataUrl, isExternalUrl, normalizePath, - processSrcSet, - slash + processSrcSet } from '../utils' import type { ResolvedConfig } from '../config' import { toOutputFilePathInHtml } from '../build' @@ -297,7 +296,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { async transform(html, id) { if (id.endsWith('.html')) { - const relativeUrlPath = slash(path.relative(config.root, id)) + const relativeUrlPath = path.posix.relative( + config.root, + normalizePath(id) + ) const publicPath = `/${relativeUrlPath}` const publicBase = getBaseInHTML(relativeUrlPath, config) @@ -669,7 +671,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { } for (const [id, html] of processedHtml) { - const relativeUrlPath = path.posix.relative(config.root, id) + const relativeUrlPath = path.posix.relative( + config.root, + normalizePath(id) + ) const assetsBase = getBaseInHTML(relativeUrlPath, config) const toOutputFilePath = ( filename: string, From e7712ffb68b24fc6eafb9359548cf92c15a156c1 Mon Sep 17 00:00:00 2001 From: patak Date: Sat, 27 Aug 2022 16:24:11 +0200 Subject: [PATCH 107/311] fix: ensure version query for direct node_modules imports (#9848) --- packages/vite/src/node/plugins/preAlias.ts | 9 ++- packages/vite/src/node/plugins/resolve.ts | 62 +++++++++++-------- .../__tests__/optimize-deps.spec.ts | 6 ++ .../optimize-deps/dep-non-optimized/index.js | 6 ++ .../dep-non-optimized/package.json | 6 ++ playground/optimize-deps/index.html | 15 +++++ playground/optimize-deps/package.json | 1 + playground/optimize-deps/vite.config.js | 2 +- pnpm-lock.yaml | 11 ++++ 9 files changed, 90 insertions(+), 28 deletions(-) create mode 100644 playground/optimize-deps/dep-non-optimized/index.js create mode 100644 playground/optimize-deps/dep-non-optimized/package.json diff --git a/packages/vite/src/node/plugins/preAlias.ts b/packages/vite/src/node/plugins/preAlias.ts index 9eb4cfeeffa85d..171832dbf78e3b 100644 --- a/packages/vite/src/node/plugins/preAlias.ts +++ b/packages/vite/src/node/plugins/preAlias.ts @@ -8,7 +8,12 @@ import type { } from '..' import type { Plugin } from '../plugin' import { createIsConfiguredAsSsrExternal } from '../ssr/ssrExternal' -import { bareImportRE, isOptimizable, moduleListContains } from '../utils' +import { + bareImportRE, + cleanUrl, + isOptimizable, + moduleListContains +} from '../utils' import { getDepsOptimizer } from '../optimizer' import { tryOptimizedResolve } from './resolve' @@ -48,7 +53,7 @@ export function preAliasPlugin(config: ResolvedConfig): Plugin { }) if (resolved && !depsOptimizer.isOptimizedDepFile(resolved.id)) { const optimizeDeps = depsOptimizer.options - const resolvedId = resolved.id + const resolvedId = cleanUrl(resolved.id) const isVirtual = resolvedId === id || resolvedId.includes('\0') if ( !isVirtual && diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index f33105d265a27a..371609fdf23c83 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -6,9 +6,11 @@ import { resolve as _resolveExports } from 'resolve.exports' import { hasESMSyntax } from 'mlly' import type { Plugin } from '../plugin' import { + CLIENT_ENTRY, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, DEP_VERSION_RE, + ENV_ENTRY, FS_PREFIX, OPTIMIZABLE_ENTRY_RE, SPECIAL_QUERY_RE @@ -42,12 +44,17 @@ import type { SSROptions } from '..' import type { PackageCache, PackageData } from '../packages' import { loadPackageData, resolvePackageData } from '../packages' +const normalizedClientEntry = normalizePath(CLIENT_ENTRY) +const normalizedEnvEntry = normalizePath(ENV_ENTRY) + // special id for paths marked with browser: false // https://github.com/defunctzombie/package-browser-field-spec#ignore-a-module export const browserExternalId = '__vite-browser-external' // special id for packages that are optional peer deps export const optionalPeerDepId = '__vite-optional-peer-dep' +const nodeModulesInPathRE = /(^|\/)node_modules\// + const isDebug = process.env.DEBUG const debug = createDebugger('vite:resolve-details', { onlyWhenFocused: true @@ -155,6 +162,30 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { return optimizedPath } + const ensureVersionQuery = (resolved: string): string => { + if ( + !options.isBuild && + depsOptimizer && + !( + resolved === normalizedClientEntry || + resolved === normalizedEnvEntry + ) + ) { + // Ensure that direct imports of node_modules have the same version query + // as if they would have been imported through a bare import + // Use the original id to do the check as the resolved id may be the real + // file path after symlinks resolution + const isNodeModule = !!normalizePath(id).match(nodeModulesInPathRE) + if (isNodeModule && !resolved.match(DEP_VERSION_RE)) { + const versionHash = depsOptimizer.metadata.browserHash + if (versionHash && OPTIMIZABLE_ENTRY_RE.test(resolved)) { + resolved = injectQuery(resolved, `v=${versionHash}`) + } + } + } + return resolved + } + // explicit fs paths that starts with /@fs/* if (asSrc && id.startsWith(FS_PREFIX)) { const fsPath = fsPathFromId(id) @@ -162,7 +193,7 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { isDebug && debug(`[@fs] ${colors.cyan(id)} -> ${colors.dim(res)}`) // always return here even if res doesn't exist since /@fs/ is explicit // if the file doesn't exist it should be a 404 - return res || fsPath + return ensureVersionQuery(res || fsPath) } // URL @@ -171,7 +202,7 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { const fsPath = path.resolve(root, id.slice(1)) if ((res = tryFsResolve(fsPath, options))) { isDebug && debug(`[url] ${colors.cyan(id)} -> ${colors.dim(res)}`) - return res + return ensureVersionQuery(res) } } @@ -201,26 +232,6 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { return normalizedFsPath } - const pathFromBasedir = normalizedFsPath.slice(basedir.length) - if (pathFromBasedir.startsWith('/node_modules/')) { - // normalize direct imports from node_modules to bare imports, so the - // hashing logic is shared and we avoid duplicated modules #2503 - const bareImport = pathFromBasedir.slice('/node_modules/'.length) - if ( - (res = tryNodeResolve( - bareImport, - importer, - options, - targetWeb, - depsOptimizer, - ssr - )) && - res.id.startsWith(normalizedFsPath) - ) { - return res - } - } - if ( targetWeb && (res = tryResolveBrowserMapping(fsPath, importer, options, true)) @@ -229,6 +240,7 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { } if ((res = tryFsResolve(fsPath, options))) { + res = ensureVersionQuery(res) isDebug && debug(`[relative] ${colors.cyan(id)} -> ${colors.dim(res)}`) const pkg = importer != null && idToPkgMap.get(importer) @@ -250,7 +262,7 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { if ((res = tryFsResolve(fsPath, options))) { isDebug && debug(`[drive-relative] ${colors.cyan(id)} -> ${colors.dim(res)}`) - return res + return ensureVersionQuery(res) } } @@ -260,7 +272,7 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { (res = tryFsResolve(id, options)) ) { isDebug && debug(`[fs] ${colors.cyan(id)} -> ${colors.dim(res)}`) - return res + return ensureVersionQuery(res) } // external @@ -405,7 +417,7 @@ function tryFsResolve( let res: string | undefined - // if we fould postfix exist, we should first try resolving file with postfix. details see #4703. + // if there is a postfix, try resolving it as a complete path first (#4703) if ( postfix && (res = tryResolveFile( diff --git a/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/playground/optimize-deps/__tests__/optimize-deps.spec.ts index 19e9014d7234cf..997d3bb9da1a26 100644 --- a/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -146,6 +146,12 @@ test('flatten id should generate correctly', async () => { expect(await page.textContent('.clonedeep-dot')).toBe('clonedeep-dot') }) +test('non optimized module is not duplicated', async () => { + expect( + await page.textContent('.non-optimized-module-is-not-duplicated') + ).toBe('from-absolute-path, from-relative-path') +}) + test.runIf(isServe)('error on builtin modules usage', () => { expect(browserLogs).toEqual( expect.arrayContaining([ diff --git a/playground/optimize-deps/dep-non-optimized/index.js b/playground/optimize-deps/dep-non-optimized/index.js new file mode 100644 index 00000000000000..51b048a657d5c9 --- /dev/null +++ b/playground/optimize-deps/dep-non-optimized/index.js @@ -0,0 +1,6 @@ +// Scheme check that imports from different paths are resolved to the same module +const messages = [] +export const add = (message) => { + messages.push(message) +} +export const get = () => messages diff --git a/playground/optimize-deps/dep-non-optimized/package.json b/playground/optimize-deps/dep-non-optimized/package.json new file mode 100644 index 00000000000000..fae17a384ce949 --- /dev/null +++ b/playground/optimize-deps/dep-non-optimized/package.json @@ -0,0 +1,6 @@ +{ + "name": "dep-non-optimized", + "private": true, + "version": "1.0.0", + "type": "module" +} diff --git a/playground/optimize-deps/index.html b/playground/optimize-deps/index.html index fe507e9ba568f4..f3e94ca6624dc1 100644 --- a/playground/optimize-deps/index.html +++ b/playground/optimize-deps/index.html @@ -87,6 +87,9 @@

Flatten Id

+

Non Optimized Module isn't duplicated

+
+ + + diff --git a/playground/glob-import/vite.config.ts b/playground/glob-import/vite.config.ts index a90136bb449662..298a471907cfec 100644 --- a/playground/glob-import/vite.config.ts +++ b/playground/glob-import/vite.config.ts @@ -1,9 +1,23 @@ +import fs from 'node:fs' import path from 'node:path' import { defineConfig } from 'vite' +const escapeAliases = fs + .readdirSync(path.join(__dirname, 'escape'), { withFileTypes: true }) + .filter((f) => f.isDirectory()) + .map((f) => f.name) + .reduce((aliases: Record, dir) => { + aliases[`@escape_${dir}_mod`] = path.resolve( + __dirname, + `./escape/${dir}/mod` + ) + return aliases + }, {}) + export default defineConfig({ resolve: { alias: { + ...escapeAliases, '@dir': path.resolve(__dirname, './dir/') } }, From 2d2f2e590eeeef502042a14ea9fe00627d92d256 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 29 Aug 2022 19:15:58 +0800 Subject: [PATCH 112/311] fix(types): explicitly set Vite hooks' `this` to `void` (#9885) --- packages/vite/src/node/plugin.ts | 11 +++++++++-- packages/vite/src/node/plugins/html.ts | 1 + packages/vite/src/node/preview.ts | 11 +++++++---- packages/vite/src/node/server/index.ts | 1 + 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/vite/src/node/plugin.ts b/packages/vite/src/node/plugin.ts index a30006ec7915f5..8cc78df892d7df 100644 --- a/packages/vite/src/node/plugin.ts +++ b/packages/vite/src/node/plugin.ts @@ -55,7 +55,10 @@ export interface Plugin extends RollupPlugin { /** * Apply the plugin only for serve or build, or on certain conditions. */ - apply?: 'serve' | 'build' | ((config: UserConfig, env: ConfigEnv) => boolean) + apply?: + | 'serve' + | 'build' + | ((this: void, config: UserConfig, env: ConfigEnv) => boolean) /** * Modify vite config before it's resolved. The hook can either mutate the * passed-in config directly, or return a partial config object that will be @@ -66,6 +69,7 @@ export interface Plugin extends RollupPlugin { */ config?: ObjectHook< ( + this: void, config: UserConfig, env: ConfigEnv ) => UserConfig | null | void | Promise @@ -73,7 +77,9 @@ export interface Plugin extends RollupPlugin { /** * Use this hook to read and store the final resolved vite config. */ - configResolved?: ObjectHook<(config: ResolvedConfig) => void | Promise> + configResolved?: ObjectHook< + (this: void, config: ResolvedConfig) => void | Promise + > /** * Configure the vite server. The hook receives the {@link ViteDevServer} * instance. This can also be used to store a reference to the server @@ -126,6 +132,7 @@ export interface Plugin extends RollupPlugin { */ handleHotUpdate?: ObjectHook< ( + this: void, ctx: HmrContext ) => Array | void | Promise | void> > diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index eb20b2d0af205b..a3df68ca539602 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -846,6 +846,7 @@ export interface IndexHtmlTransformContext { } export type IndexHtmlTransformHook = ( + this: void, html: string, ctx: IndexHtmlTransformContext ) => IndexHtmlTransformResult | void | Promise diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index c81772a8672682..bebd212217d384 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -62,10 +62,13 @@ export interface PreviewServer { printUrls(): void } -export type PreviewServerHook = (server: { - middlewares: Connect.Server - httpServer: http.Server -}) => (() => void) | void | Promise<(() => void) | void> +export type PreviewServerHook = ( + this: void, + server: { + middlewares: Connect.Server + httpServer: http.Server + } +) => (() => void) | void | Promise<(() => void) | void> /** * Starts the Vite server in preview mode, to simulate a production deployment diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 925bd96c5661b1..f51dfb8b19401d 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -151,6 +151,7 @@ export interface FileSystemServeOptions { } export type ServerHook = ( + this: void, server: ViteDevServer ) => (() => void) | void | Promise<(() => void) | void> From 8872aba381ff1e6358524420fa16d4c4e6f35e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 29 Aug 2022 22:17:36 +0900 Subject: [PATCH 113/311] refactor(hmr): simplify fetchUpdate (#9881) --- packages/vite/src/client/client.ts | 57 +++++++++++------------------- 1 file changed, 20 insertions(+), 37 deletions(-) diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 0ea5af710c0518..fdd28e6be42278 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -400,46 +400,29 @@ async function fetchUpdate({ path, acceptedPath, timestamp }: Update) { const moduleMap = new Map() const isSelfUpdate = path === acceptedPath - // make sure we only import each dep once - const modulesToUpdate = new Set() - if (isSelfUpdate) { - // self update - only update self - modulesToUpdate.add(path) - } else { - // dep update - for (const { deps } of mod.callbacks) { - deps.forEach((dep) => { - if (acceptedPath === dep) { - modulesToUpdate.add(dep) - } - }) - } - } - // determine the qualified callbacks before we re-import the modules - const qualifiedCallbacks = mod.callbacks.filter(({ deps }) => { - return deps.some((dep) => modulesToUpdate.has(dep)) - }) - - await Promise.all( - Array.from(modulesToUpdate).map(async (dep) => { - const disposer = disposeMap.get(dep) - if (disposer) await disposer(dataMap.get(dep)) - const [path, query] = dep.split(`?`) - try { - const newMod: ModuleNamespace = await import( - /* @vite-ignore */ - base + - path.slice(1) + - `?import&t=${timestamp}${query ? `&${query}` : ''}` - ) - moduleMap.set(dep, newMod) - } catch (e) { - warnFailedFetch(e, dep) - } - }) + const qualifiedCallbacks = mod.callbacks.filter(({ deps }) => + deps.includes(acceptedPath) ) + if (isSelfUpdate || qualifiedCallbacks.length > 0) { + const dep = acceptedPath + const disposer = disposeMap.get(dep) + if (disposer) await disposer(dataMap.get(dep)) + const [path, query] = dep.split(`?`) + try { + const newMod: ModuleNamespace = await import( + /* @vite-ignore */ + base + + path.slice(1) + + `?import&t=${timestamp}${query ? `&${query}` : ''}` + ) + moduleMap.set(dep, newMod) + } catch (e) { + warnFailedFetch(e, dep) + } + } + return () => { for (const { deps, fn } of qualifiedCallbacks) { fn(deps.map((dep) => moduleMap.get(dep))) From 583f1858c393833c5a4c9a1dfe78f040f240b538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= Date: Mon, 29 Aug 2022 21:28:59 +0800 Subject: [PATCH 114/311] docs: fix typo (#9855) --- packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts | 4 ++-- packages/plugin-vue/src/main.ts | 2 +- packages/vite/src/node/plugins/worker.ts | 4 ++-- packages/vite/src/node/server/middlewares/base.ts | 2 +- packages/vite/types/chokidar.d.ts | 2 +- playground/resolve/__tests__/resolve.spec.ts | 2 +- playground/vue/PreProcessors.vue | 2 +- playground/wasm/vite.config.ts | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts index 91b4db5411bf26..44a81e474b6c02 100644 --- a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts +++ b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts @@ -76,7 +76,7 @@ export default function ( /** * Get a JSXIdentifier or JSXMemberExpression from a Node of known type. - * Returns null if a unknown node type, null or undefined is passed. + * Returns null if an unknown node type, null or undefined is passed. */ function getJSXName(node: any): any { if (node == null) { @@ -100,7 +100,7 @@ export default function ( } /** - * Get a array of JSX(Spread)Attribute from a props ObjectExpression. + * Get an array of JSX(Spread)Attribute from a props ObjectExpression. * Handles the _extends Expression babel creates from SpreadElement nodes. * Returns null if a validation error occurs. */ diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index 37de21de004442..bdb846ab4abcfd 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -162,7 +162,7 @@ export async function transformMain( if (options.sourceMap) { if (scriptMap && templateMap) { // if the template is inlined into the main module (indicated by the presence - // of templateMap, we need to concatenate the two source maps. + // of templateMap), we need to concatenate the two source maps. const gen = fromMap( // version property of result.map is declared as string diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index 336562d4326dd2..61c9bff2a2f5fd 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -14,7 +14,7 @@ interface WorkerCache { // save worker all emit chunk avoid rollup make the same asset unique. assets: Map - // worker bundle don't deps on any more worker runtime info an id only had an result. + // worker bundle don't deps on any more worker runtime info an id only had a result. // save worker bundled file id to avoid repeated execution of bundles // bundle: Map @@ -217,7 +217,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { const ssr = options?.ssr === true const query = parseRequest(id) if (query && query[WORKER_FILE_ID] != null) { - // if import worker by worker constructor will had query.type + // if import worker by worker constructor will have query.type // other type will be import worker by esm const workerType = query['type']! as WorkerType let injectEnv = '' diff --git a/packages/vite/src/node/server/middlewares/base.ts b/packages/vite/src/node/server/middlewares/base.ts index fb41591a151efb..002ec111335128 100644 --- a/packages/vite/src/node/server/middlewares/base.ts +++ b/packages/vite/src/node/server/middlewares/base.ts @@ -15,7 +15,7 @@ export function baseMiddleware({ const path = parsed.pathname || '/' if (path.startsWith(devBase)) { - // rewrite url to remove base.. this ensures that other middleware does + // rewrite url to remove base. this ensures that other middleware does // not need to consider base being prepended or not req.url = url.replace(devBase, '/') return next() diff --git a/packages/vite/types/chokidar.d.ts b/packages/vite/types/chokidar.d.ts index 51ac89b8e98d1f..0dc4bec1013643 100644 --- a/packages/vite/types/chokidar.d.ts +++ b/packages/vite/types/chokidar.d.ts @@ -194,7 +194,7 @@ export interface WatchOptions { ignorePermissionErrors?: boolean /** - * `true` if `useFsEvents` and `usePolling` are `false`). Automatically filters out artifacts + * `true` if `useFsEvents` and `usePolling` are `false`. Automatically filters out artifacts * that occur when using editors that use "atomic writes" instead of writing directly to the * source file. If a file is re-added within 100 ms of being deleted, Chokidar emits a `change` * event rather than `unlink` then `add`. If the default of 100 ms does not work well for you, diff --git a/playground/resolve/__tests__/resolve.spec.ts b/playground/resolve/__tests__/resolve.spec.ts index 784e0a4de32cea..6d7a9b6efb1907 100644 --- a/playground/resolve/__tests__/resolve.spec.ts +++ b/playground/resolve/__tests__/resolve.spec.ts @@ -18,7 +18,7 @@ test('deep import with exports field', async () => { }) test('deep import with query with exports field', async () => { - // since it is imported with `?url` it should return a url + // since it is imported with `?url` it should return a URL expect(await page.textContent('.exports-deep-query')).toMatch( isBuild ? /base64/ : '/exports-path/deep.json' ) diff --git a/playground/vue/PreProcessors.vue b/playground/vue/PreProcessors.vue index ddb636678e8cdd..c210448d332456 100644 --- a/playground/vue/PreProcessors.vue +++ b/playground/vue/PreProcessors.vue @@ -2,7 +2,7 @@ h2.pre-processors Pre-Processors p.pug | This is rendered from <template lang="pug"> - | and styled with <style lang="sass">. It should be megenta. + | and styled with <style lang="sass">. It should be magenta. p.pug-less | This is rendered from <template lang="pug"> | and styled with <style lang="less">. It should be green. diff --git a/playground/wasm/vite.config.ts b/playground/wasm/vite.config.ts index 43833d2f95d302..e52df8dc66c386 100644 --- a/playground/wasm/vite.config.ts +++ b/playground/wasm/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' export default defineConfig({ build: { - // make can no emit light.wasm + // make cannot emit light.wasm // and emit add.wasm assetsInlineLimit: 80 } From 3b10a25e0854a9560c49f67884dc9d8d2ac5933c Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 29 Aug 2022 15:40:08 +0200 Subject: [PATCH 115/311] release: v3.1.0-beta.1 --- packages/vite/CHANGELOG.md | 14 ++++++++++++++ packages/vite/package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 5781ca33b1eff3..e58f8663156e19 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,17 @@ +## 3.1.0-beta.1 (2022-08-29) + +* docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) +* refactor(hmr): simplify fetchUpdate (#9881) ([8872aba](https://github.com/vitejs/vite/commit/8872aba)), closes [#9881](https://github.com/vitejs/vite/issues/9881) +* fix: ensure version query for direct node_modules imports (#9848) ([e7712ff](https://github.com/vitejs/vite/commit/e7712ff)), closes [#9848](https://github.com/vitejs/vite/issues/9848) +* fix: escape glob path (#9842) ([6be971e](https://github.com/vitejs/vite/commit/6be971e)), closes [#9842](https://github.com/vitejs/vite/issues/9842) +* fix(build): build project path error (#9793) ([cc8800a](https://github.com/vitejs/vite/commit/cc8800a)), closes [#9793](https://github.com/vitejs/vite/issues/9793) +* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) +* fix(types): explicitly set Vite hooks' `this` to `void` (#9885) ([2d2f2e5](https://github.com/vitejs/vite/commit/2d2f2e5)), closes [#9885](https://github.com/vitejs/vite/issues/9885) +* feat: stabilize server.resolvedUrls (#9866) ([c3f6731](https://github.com/vitejs/vite/commit/c3f6731)), closes [#9866](https://github.com/vitejs/vite/issues/9866) +* feat(client): use debug channel on hot updates (#8855) ([0452224](https://github.com/vitejs/vite/commit/0452224)), closes [#8855](https://github.com/vitejs/vite/issues/8855) + + + ## 3.1.0-beta.0 (2022-08-25) * feat: relax dep browser externals as warning (#9837) ([71cb374](https://github.com/vitejs/vite/commit/71cb374)), closes [#9837](https://github.com/vitejs/vite/issues/9837) diff --git a/packages/vite/package.json b/packages/vite/package.json index bdff4a94d2a270..af2b0ad944bcb3 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.1.0-beta.0", + "version": "3.1.0-beta.1", "type": "module", "license": "MIT", "author": "Evan You", From 6a18ef1cf537a8dc1e94bbbff457c4e97b0f68d1 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 29 Aug 2022 15:41:36 +0200 Subject: [PATCH 116/311] release: plugin-react@2.1.0-beta.0 --- packages/plugin-react/CHANGELOG.md | 8 ++++++++ packages/plugin-react/package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index 8df2a245c5f296..649e5cd9c68078 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -1,3 +1,11 @@ +## 2.1.0-beta.0 (2022-08-29) + +* docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) +* fix: add `react` to `optimizeDeps` (#9056) ([bc4a627](https://github.com/vitejs/vite/commit/bc4a627)), closes [#9056](https://github.com/vitejs/vite/issues/9056) +* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) + + + ## 2.0.1 (2022-08-11) * fix: don't count class declarations as react fast refresh boundry (fixes #3675) (#8887) ([5a18284](https://github.com/vitejs/vite/commit/5a18284)), closes [#3675](https://github.com/vitejs/vite/issues/3675) [#8887](https://github.com/vitejs/vite/issues/8887) diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index 4138b61019be29..f8e7c6265232d9 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-react", - "version": "2.0.1", + "version": "2.1.0-beta.0", "license": "MIT", "author": "Evan You", "contributors": [ From 90d452324bf9a59acd0d3ad247f91b3e46d67b6f Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 29 Aug 2022 15:43:00 +0200 Subject: [PATCH 117/311] release: plugin-vue@3.1.0-beta.0 --- packages/plugin-vue/CHANGELOG.md | 10 ++++++++++ packages/plugin-vue/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/CHANGELOG.md b/packages/plugin-vue/CHANGELOG.md index 130c3787d17a0e..afacf0f3eab86e 100644 --- a/packages/plugin-vue/CHANGELOG.md +++ b/packages/plugin-vue/CHANGELOG.md @@ -1,3 +1,13 @@ +## 3.1.0-beta.0 (2022-08-29) + +* docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) +* feat: support object style hooks (#9634) ([757a92f](https://github.com/vitejs/vite/commit/757a92f)), closes [#9634](https://github.com/vitejs/vite/issues/9634) +* chore: fix typo (#9684) ([d30f881](https://github.com/vitejs/vite/commit/d30f881)), closes [#9684](https://github.com/vitejs/vite/issues/9684) +* chore(deps): update all non-major dependencies (#9675) ([4e56e87](https://github.com/vitejs/vite/commit/4e56e87)), closes [#9675](https://github.com/vitejs/vite/issues/9675) +* chore(plugin-vue): update reactivityTransform comment docs [ci skip] ([d04784b](https://github.com/vitejs/vite/commit/d04784b)) + + + ## 3.0.3 (2022-08-12) diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 6a74e109625873..efa3397bd2be46 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "3.0.3", + "version": "3.1.0-beta.0", "license": "MIT", "author": "Evan You", "files": [ From 2a66f89855d43af265fd3ce245eccd2b3d767235 Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 29 Aug 2022 16:09:45 +0200 Subject: [PATCH 118/311] chore: fix internal plugins publish (#9897) --- scripts/releaseUtils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/releaseUtils.ts b/scripts/releaseUtils.ts index de7c8c3716cb18..daf51fc9180304 100644 --- a/scripts/releaseUtils.ts +++ b/scripts/releaseUtils.ts @@ -198,7 +198,11 @@ export async function getLatestTag(pkgName: string): Promise { } export async function getActiveVersion(pkgName: string): Promise { - return (await run('npm', ['info', pkgName, 'version'], { stdio: 'pipe' })) + const npmName = + pkgName === 'vite' || pkgName === 'create-vite' + ? pkgName + : `@vitejs/${pkgName}` + return (await run('npm', ['info', npmName, 'version'], { stdio: 'pipe' })) .stdout } From c4714c8ea5fb263bc9bdd23bf8c4fafea576e427 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 29 Aug 2022 16:10:18 +0200 Subject: [PATCH 119/311] release: plugin-legacy@2.1.0-beta.0 --- packages/plugin-legacy/CHANGELOG.md | 11 +++++++++++ packages/plugin-legacy/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/plugin-legacy/CHANGELOG.md b/packages/plugin-legacy/CHANGELOG.md index 7d38d423c5c3a6..cd34f3c6ff5845 100644 --- a/packages/plugin-legacy/CHANGELOG.md +++ b/packages/plugin-legacy/CHANGELOG.md @@ -1,3 +1,14 @@ +## 2.1.0-beta.0 (2022-08-29) + +* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) +* fix(plugin-legacy): prevent global process.env.NODE_ENV mutation (#9741) ([a8279af](https://github.com/vitejs/vite/commit/a8279af)), closes [#9741](https://github.com/vitejs/vite/issues/9741) +* chore(deps): update all non-major dependencies (#9675) ([4e56e87](https://github.com/vitejs/vite/commit/4e56e87)), closes [#9675](https://github.com/vitejs/vite/issues/9675) +* chore(deps): update all non-major dependencies (#9778) ([aceaefc](https://github.com/vitejs/vite/commit/aceaefc)), closes [#9778](https://github.com/vitejs/vite/issues/9778) +* refactor(legacy): build polyfill chunk (#9639) ([7ba0c9f](https://github.com/vitejs/vite/commit/7ba0c9f)), closes [#9639](https://github.com/vitejs/vite/issues/9639) +* refactor(legacy): remove code for Vite 2 (#9640) ([b1bbc5b](https://github.com/vitejs/vite/commit/b1bbc5b)), closes [#9640](https://github.com/vitejs/vite/issues/9640) + + + ## 2.0.1 (2022-08-11) * fix: mention that Node.js 13/15 support is dropped (fixes #9113) (#9116) ([2826303](https://github.com/vitejs/vite/commit/2826303)), closes [#9113](https://github.com/vitejs/vite/issues/9113) [#9116](https://github.com/vitejs/vite/issues/9116) diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 2e49eebc61319c..6f15399e39574c 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-legacy", - "version": "2.0.1", + "version": "2.1.0-beta.0", "license": "MIT", "author": "Evan You", "files": [ From af599ce6ee58f5a457fa4c6a1d6aa33e12187985 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 29 Aug 2022 16:12:13 +0200 Subject: [PATCH 120/311] release: plugin-vue-jsx@2.0.1 --- packages/plugin-vue-jsx/CHANGELOG.md | 10 ++++++++++ packages/plugin-vue-jsx/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue-jsx/CHANGELOG.md b/packages/plugin-vue-jsx/CHANGELOG.md index d5c54726f3e012..04b5aa102d7b09 100644 --- a/packages/plugin-vue-jsx/CHANGELOG.md +++ b/packages/plugin-vue-jsx/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.0.1 (2022-08-29) + +* fix: mention that Node.js 13/15 support is dropped (fixes #9113) (#9116) ([2826303](https://github.com/vitejs/vite/commit/2826303)), closes [#9113](https://github.com/vitejs/vite/issues/9113) [#9116](https://github.com/vitejs/vite/issues/9116) +* fix(deps): update all non-major dependencies (#9176) ([31d3b70](https://github.com/vitejs/vite/commit/31d3b70)), closes [#9176](https://github.com/vitejs/vite/issues/9176) +* fix(deps): update all non-major dependencies (#9575) ([8071325](https://github.com/vitejs/vite/commit/8071325)), closes [#9575](https://github.com/vitejs/vite/issues/9575) +* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) +* perf(plugin-vue-jsx): hoist variables (#9687) ([d9eb6b9](https://github.com/vitejs/vite/commit/d9eb6b9)), closes [#9687](https://github.com/vitejs/vite/issues/9687) + + + ## 2.0.0 (2022-07-13) * chore: 3.0 release notes and bump peer deps (#9072) ([427ba26](https://github.com/vitejs/vite/commit/427ba26)), closes [#9072](https://github.com/vitejs/vite/issues/9072) diff --git a/packages/plugin-vue-jsx/package.json b/packages/plugin-vue-jsx/package.json index 03c9449fbeb888..68bd101d2525d4 100644 --- a/packages/plugin-vue-jsx/package.json +++ b/packages/plugin-vue-jsx/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue-jsx", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "author": "Evan You", "files": [ From c89de3a67463df00de6e135c452b93a947940851 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Mon, 29 Aug 2022 22:35:37 +0800 Subject: [PATCH 121/311] fix(plugin-react): duplicate __self prop and __source prop (#9387) --- .../src/jsx-runtime/babel-restore-jsx.spec.ts | 14 ++++++++++++ .../src/jsx-runtime/babel-restore-jsx.ts | 22 ++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts index b37ef698e5f215..5590bfb9d7fa5f 100644 --- a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts +++ b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.spec.ts @@ -115,4 +115,18 @@ describe('babel-restore-jsx', () => { `"React.createElement(aaa);"` ) }) + + it('should not handle contains __self prop', () => { + expect( + jsx('React.createElement(Provider, { __self: this })') + ).toMatchInlineSnapshot('";"') + }) + + it('should not handle contains __source prop', () => { + expect( + jsx( + 'React.createElement(Provider, { __source: { fileName: _jsxFileName, lineNumber: 133 }})' + ) + ).toMatchInlineSnapshot('";"') + }) }) diff --git a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts index 44a81e474b6c02..e5ee9ce454b555 100644 --- a/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts +++ b/packages/plugin-react/src/jsx-runtime/babel-restore-jsx.ts @@ -126,14 +126,20 @@ export default function ( if (!isPlainObjectExpression(node)) { return null } - return node.properties.map((prop: any) => - t.isObjectProperty(prop) - ? t.jsxAttribute( - getJSXIdentifier(prop.key)!, - getJSXAttributeValue(prop.value) - ) - : t.jsxSpreadAttribute(prop.argument) - ) + return node.properties + .map((prop: any) => + t.isObjectProperty(prop) + ? t.jsxAttribute( + getJSXIdentifier(prop.key)!, + getJSXAttributeValue(prop.value) + ) + : t.jsxSpreadAttribute(prop.argument) + ) + .filter((prop: any) => + t.isJSXIdentifier(prop.name) + ? prop.name.name !== '__self' && prop.name.name !== '__source' + : true + ) } function getJSXChild(node: any) { From 37ac91e5f680aea56ce5ca15ce1291adc3cbe05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 30 Aug 2022 03:21:35 +0900 Subject: [PATCH 122/311] perf: bundle create-vite (#9034) --- .eslintrc.cjs | 2 +- package.json | 3 + packages/create-vite/LICENSE | 274 +++++++++++++++++ packages/create-vite/build.config.ts | 35 +++ packages/create-vite/index.js | 443 +-------------------------- packages/create-vite/package.json | 10 +- packages/create-vite/src/index.js | 442 ++++++++++++++++++++++++++ packages/vite/package.json | 1 - packages/vite/rollup.config.ts | 122 +------- pnpm-lock.yaml | 25 +- scripts/rollupLicensePlugin.mjs | 126 ++++++++ 11 files changed, 916 insertions(+), 567 deletions(-) create mode 100644 packages/create-vite/build.config.ts create mode 100755 packages/create-vite/src/index.js create mode 100644 scripts/rollupLicensePlugin.mjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 12ae8a255406d4..e14beca6015d94 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -178,7 +178,7 @@ module.exports = defineConfig({ } }, { - files: ['*.js'], + files: ['*.js', '*.mjs', '*.cjs'], rules: { '@typescript-eslint/explicit-module-boundary-types': 'off' } diff --git a/package.json b/package.json index 749f03e4e44dcf..2a41ad3a384ed9 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", "execa": "^6.1.0", + "fast-glob": "^3.2.11", "fs-extra": "^10.1.0", "lint-staged": "^13.0.3", "minimist": "^1.2.6", @@ -76,8 +77,10 @@ "pnpm": "^7.9.5", "prettier": "2.7.1", "prompts": "^2.4.2", + "resolve": "^1.22.1", "rimraf": "^3.0.2", "rollup": "~2.78.0", + "rollup-plugin-license": "^2.8.1", "semver": "^7.3.7", "simple-git-hooks": "^2.8.0", "tslib": "^2.4.0", diff --git a/packages/create-vite/LICENSE b/packages/create-vite/LICENSE index 9c1b313d7b1816..4851bee9f284f3 100644 --- a/packages/create-vite/LICENSE +++ b/packages/create-vite/LICENSE @@ -1,3 +1,6 @@ +# create-vite license +create-vite is released under the MIT license: + MIT License Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors @@ -19,3 +22,274 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# Licenses of bundled dependencies +The published create-vite artifact additionally contains code with the following licenses: +ISC, MIT + +# Bundled dependencies: +## cross-spawn +License: MIT +By: André Cruz +Repository: git@github.com:moxystudio/node-cross-spawn.git + +> The MIT License (MIT) +> +> Copyright (c) 2018 Made With MOXY Lda +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## isexe +License: ISC +By: Isaac Z. Schlueter +Repository: git+https://github.com/isaacs/isexe.git + +> The ISC License +> +> Copyright (c) Isaac Z. Schlueter and Contributors +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +--------------------------------------- + +## kleur +License: MIT +By: Luke Edwards +Repository: lukeed/kleur + +> The MIT License (MIT) +> +> Copyright (c) Luke Edwards (lukeed.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + +## kolorist +License: MIT +By: Marvin Hagemeister +Repository: https://github.com/marvinhagemeister/kolorist.git + +> The MIT License (MIT) +> +> Copyright (c) 2020-present Marvin Hagemeister +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## minimist +License: MIT +By: James Halliday +Repository: git://github.com/substack/minimist.git + +> This software is released under the MIT license: +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of +> this software and associated documentation files (the "Software"), to deal in +> the Software without restriction, including without limitation the rights to +> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +> the Software, and to permit persons to whom the Software is furnished to do so, +> subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## path-key +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/path-key + +> MIT License +> +> Copyright (c) Sindre Sorhus (sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## prompts +License: MIT +By: Terkel Gjervig +Repository: terkelg/prompts + +> MIT License +> +> Copyright (c) 2018 Terkel Gjervig Nielsen +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## shebang-command +License: MIT +By: Kevin Mårtensson +Repository: kevva/shebang-command + +> MIT License +> +> Copyright (c) Kevin Mårtensson (github.com/kevva) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## shebang-regex +License: MIT +By: Sindre Sorhus +Repository: sindresorhus/shebang-regex + +> MIT License +> +> Copyright (c) Sindre Sorhus (sindresorhus.com) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--------------------------------------- + +## sisteransi +License: MIT +By: Terkel Gjervig +Repository: https://github.com/terkelg/sisteransi + +> MIT License +> +> Copyright (c) 2018 Terkel Gjervig Nielsen +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + +## which +License: ISC +By: Isaac Z. Schlueter +Repository: git://github.com/isaacs/node-which.git + +> The ISC License +> +> Copyright (c) Isaac Z. Schlueter and Contributors +> +> Permission to use, copy, modify, and/or distribute this software for any +> purpose with or without fee is hereby granted, provided that the above +> copyright notice and this permission notice appear in all copies. +> +> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/create-vite/build.config.ts b/packages/create-vite/build.config.ts new file mode 100644 index 00000000000000..2c39d19d427de6 --- /dev/null +++ b/packages/create-vite/build.config.ts @@ -0,0 +1,35 @@ +import path from 'node:path' +import url from 'node:url' +import { defineBuildConfig } from 'unbuild' +import licensePlugin from '../../scripts/rollupLicensePlugin.mjs' + +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) + +export default defineBuildConfig({ + entries: ['src/index'], + clean: true, + rollup: { + inlineDependencies: true, + esbuild: { + minify: true + } + }, + alias: { + // we can always use non-transpiled code since we support 14.18.0+ + prompts: 'prompts/lib/index.js' + }, + hooks: { + 'rollup:options'(ctx, options) { + if (!options.plugins) { + options.plugins = [] + } + options.plugins.push( + licensePlugin( + path.resolve(__dirname, './LICENSE'), + 'create-vite license', + 'create-vite' + ) + ) + } + } +}) diff --git a/packages/create-vite/index.js b/packages/create-vite/index.js index d602eea2b3e57a..f5e8e064a68d9f 100755 --- a/packages/create-vite/index.js +++ b/packages/create-vite/index.js @@ -1,444 +1,3 @@ #!/usr/bin/env node -// @ts-check -import fs from 'node:fs' -import path from 'node:path' -import { fileURLToPath } from 'node:url' -import spawn from 'cross-spawn' -import minimist from 'minimist' -import prompts from 'prompts' -import { - blue, - cyan, - green, - lightGreen, - lightRed, - magenta, - red, - reset, - yellow -} from 'kolorist' - -// Avoids autoconversion to number of the project name by defining that the args -// non associated with an option ( _ ) needs to be parsed as a string. See #4606 -const argv = minimist(process.argv.slice(2), { string: ['_'] }) -const cwd = process.cwd() - -const FRAMEWORKS = [ - { - name: 'vanilla', - display: 'Vanilla', - color: yellow, - variants: [ - { - name: 'vanilla', - display: 'JavaScript', - color: yellow - }, - { - name: 'vanilla-ts', - display: 'TypeScript', - color: blue - } - ] - }, - { - name: 'vue', - display: 'Vue', - color: green, - variants: [ - { - name: 'vue', - display: 'JavaScript', - color: yellow - }, - { - name: 'vue-ts', - display: 'TypeScript', - color: blue - }, - { - name: 'custom-create-vue', - display: 'Customize with create-vue', - color: green, - customCommand: 'npm create vue@latest TARGET_DIR' - }, - { - name: 'custom-nuxt', - display: 'Nuxt', - color: lightGreen, - customCommand: 'npm exec nuxi init TARGET_DIR' - } - ] - }, - { - name: 'react', - display: 'React', - color: cyan, - variants: [ - { - name: 'react', - display: 'JavaScript', - color: yellow - }, - { - name: 'react-ts', - display: 'TypeScript', - color: blue - } - ] - }, - { - name: 'preact', - display: 'Preact', - color: magenta, - variants: [ - { - name: 'preact', - display: 'JavaScript', - color: yellow - }, - { - name: 'preact-ts', - display: 'TypeScript', - color: blue - } - ] - }, - { - name: 'lit', - display: 'Lit', - color: lightRed, - variants: [ - { - name: 'lit', - display: 'JavaScript', - color: yellow - }, - { - name: 'lit-ts', - display: 'TypeScript', - color: blue - } - ] - }, - { - name: 'svelte', - display: 'Svelte', - color: red, - variants: [ - { - name: 'svelte', - display: 'JavaScript', - color: yellow - }, - { - name: 'svelte-ts', - display: 'TypeScript', - color: blue - }, - { - name: 'custom-svelte-kit', - display: 'SvelteKit', - color: red, - customCommand: 'npm create svelte@latest TARGET_DIR' - } - ] - } -] - -const TEMPLATES = FRAMEWORKS.map( - (f) => (f.variants && f.variants.map((v) => v.name)) || [f.name] -).reduce((a, b) => a.concat(b), []) - -const renameFiles = { - _gitignore: '.gitignore' -} - -async function init() { - let targetDir = formatTargetDir(argv._[0]) - let template = argv.template || argv.t - - const defaultTargetDir = 'vite-project' - const getProjectName = () => - targetDir === '.' ? path.basename(path.resolve()) : targetDir - - let result = {} - - try { - result = await prompts( - [ - { - type: targetDir ? null : 'text', - name: 'projectName', - message: reset('Project name:'), - initial: defaultTargetDir, - onState: (state) => { - targetDir = formatTargetDir(state.value) || defaultTargetDir - } - }, - { - type: () => - !fs.existsSync(targetDir) || isEmpty(targetDir) ? null : 'confirm', - name: 'overwrite', - message: () => - (targetDir === '.' - ? 'Current directory' - : `Target directory "${targetDir}"`) + - ` is not empty. Remove existing files and continue?` - }, - { - type: (_, { overwrite } = {}) => { - if (overwrite === false) { - throw new Error(red('✖') + ' Operation cancelled') - } - return null - }, - name: 'overwriteChecker' - }, - { - type: () => (isValidPackageName(getProjectName()) ? null : 'text'), - name: 'packageName', - message: reset('Package name:'), - initial: () => toValidPackageName(getProjectName()), - validate: (dir) => - isValidPackageName(dir) || 'Invalid package.json name' - }, - { - type: template && TEMPLATES.includes(template) ? null : 'select', - name: 'framework', - message: - typeof template === 'string' && !TEMPLATES.includes(template) - ? reset( - `"${template}" isn't a valid template. Please choose from below: ` - ) - : reset('Select a framework:'), - initial: 0, - choices: FRAMEWORKS.map((framework) => { - const frameworkColor = framework.color - return { - title: frameworkColor(framework.display || framework.name), - value: framework - } - }) - }, - { - type: (framework) => - framework && framework.variants ? 'select' : null, - name: 'variant', - message: reset('Select a variant:'), - // @ts-ignore - choices: (framework) => - framework.variants.map((variant) => { - const variantColor = variant.color - return { - title: variantColor(variant.display || variant.name), - value: variant.name - } - }) - } - ], - { - onCancel: () => { - throw new Error(red('✖') + ' Operation cancelled') - } - } - ) - } catch (cancelled) { - console.log(cancelled.message) - return - } - - // user choice associated with prompts - const { framework, overwrite, packageName, variant } = result - - const root = path.join(cwd, targetDir) - - if (overwrite) { - emptyDir(root) - } else if (!fs.existsSync(root)) { - fs.mkdirSync(root, { recursive: true }) - } - - // determine template - template = variant || framework || template - - const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent) - const pkgManager = pkgInfo ? pkgInfo.name : 'npm' - const isYarn1 = pkgManager === 'yarn' && pkgInfo?.version.startsWith('1.') - - if (template.startsWith('custom-')) { - const getCustomCommand = (name) => { - for (const f of FRAMEWORKS) { - for (const v of f.variants || []) { - if (v.name === name) { - return v.customCommand - } - } - } - } - const customCommand = getCustomCommand(template) - const fullCustomCommand = customCommand - .replace('TARGET_DIR', targetDir) - .replace(/^npm create/, `${pkgManager} create`) - // Only Yarn 1.x doesn't support `@version` in the `create` command - .replace('@latest', () => (isYarn1 ? '' : '@latest')) - .replace(/^npm exec/, () => { - // Prefer `pnpm dlx` or `yarn dlx` - if (pkgManager === 'pnpm') { - return 'pnpm dlx' - } - if (pkgManager === 'yarn' && !isYarn1) { - return 'yarn dlx' - } - // Use `npm exec` in all other cases, - // including Yarn 1.x and other custom npm clients. - return 'npm exec' - }) - - const [command, ...args] = fullCustomCommand.split(' ') - const { status } = spawn.sync(command, args, { - stdio: 'inherit' - }) - process.exit(status ?? 0) - } - - console.log(`\nScaffolding project in ${root}...`) - - const templateDir = path.resolve( - fileURLToPath(import.meta.url), - '..', - `template-${template}` - ) - - const write = (file, content) => { - const targetPath = renameFiles[file] - ? path.join(root, renameFiles[file]) - : path.join(root, file) - if (content) { - fs.writeFileSync(targetPath, content) - } else { - copy(path.join(templateDir, file), targetPath) - } - } - - const files = fs.readdirSync(templateDir) - for (const file of files.filter((f) => f !== 'package.json')) { - write(file) - } - - const pkg = JSON.parse( - fs.readFileSync(path.join(templateDir, `package.json`), 'utf-8') - ) - - pkg.name = packageName || getProjectName() - - write('package.json', JSON.stringify(pkg, null, 2)) - - console.log(`\nDone. Now run:\n`) - if (root !== cwd) { - console.log(` cd ${path.relative(cwd, root)}`) - } - switch (pkgManager) { - case 'yarn': - console.log(' yarn') - console.log(' yarn dev') - break - default: - console.log(` ${pkgManager} install`) - console.log(` ${pkgManager} run dev`) - break - } - console.log() -} - -/** - * @param {string | undefined} targetDir - */ -function formatTargetDir(targetDir) { - return targetDir?.trim().replace(/\/+$/g, '') -} - -function copy(src, dest) { - const stat = fs.statSync(src) - if (stat.isDirectory()) { - copyDir(src, dest) - } else { - fs.copyFileSync(src, dest) - } -} - -/** - * @param {string} projectName - */ -function isValidPackageName(projectName) { - return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test( - projectName - ) -} - -/** - * @param {string} projectName - */ -function toValidPackageName(projectName) { - return projectName - .trim() - .toLowerCase() - .replace(/\s+/g, '-') - .replace(/^[._]/, '') - .replace(/[^a-z0-9-~]+/g, '-') -} - -/** - * @param {string} srcDir - * @param {string} destDir - */ -function copyDir(srcDir, destDir) { - fs.mkdirSync(destDir, { recursive: true }) - for (const file of fs.readdirSync(srcDir)) { - const srcFile = path.resolve(srcDir, file) - const destFile = path.resolve(destDir, file) - copy(srcFile, destFile) - } -} - -/** - * @param {string} path - */ -function isEmpty(path) { - const files = fs.readdirSync(path) - return files.length === 0 || (files.length === 1 && files[0] === '.git') -} - -/** - * @param {string} dir - */ -function emptyDir(dir) { - if (!fs.existsSync(dir)) { - return - } - for (const file of fs.readdirSync(dir)) { - if (file === '.git') { - continue - } - fs.rmSync(path.resolve(dir, file), { recursive: true, force: true }) - } -} - -/** - * @param {string | undefined} userAgent process.env.npm_config_user_agent - * @returns object | undefined - */ -function pkgFromUserAgent(userAgent) { - if (!userAgent) return undefined - const pkgSpec = userAgent.split(' ')[0] - const pkgSpecArr = pkgSpec.split('/') - return { - name: pkgSpecArr[0], - version: pkgSpecArr[1] - } -} - -init().catch((e) => { - console.error(e) -}) +import './dist/index.mjs' diff --git a/packages/create-vite/package.json b/packages/create-vite/package.json index a52fa837d977ab..76c33bcd95e75f 100644 --- a/packages/create-vite/package.json +++ b/packages/create-vite/package.json @@ -10,9 +10,15 @@ }, "files": [ "index.js", - "template-*" + "template-*", + "dist" ], "main": "index.js", + "scripts": { + "dev": "unbuild --stub", + "build": "unbuild", + "prepublishOnly": "npm run build" + }, "engines": { "node": "^14.18.0 || >=16.0.0" }, @@ -25,7 +31,7 @@ "url": "https://github.com/vitejs/vite/issues" }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/create-vite#readme", - "dependencies": { + "devDependencies": { "cross-spawn": "^7.0.3", "kolorist": "^1.5.1", "minimist": "^1.2.6", diff --git a/packages/create-vite/src/index.js b/packages/create-vite/src/index.js new file mode 100755 index 00000000000000..8e5aa02ff4a40e --- /dev/null +++ b/packages/create-vite/src/index.js @@ -0,0 +1,442 @@ +// @ts-check +import fs from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import spawn from 'cross-spawn' +import minimist from 'minimist' +import prompts from 'prompts' +import { + blue, + cyan, + green, + lightGreen, + lightRed, + magenta, + red, + reset, + yellow +} from 'kolorist' + +// Avoids autoconversion to number of the project name by defining that the args +// non associated with an option ( _ ) needs to be parsed as a string. See #4606 +const argv = minimist(process.argv.slice(2), { string: ['_'] }) +const cwd = process.cwd() + +const FRAMEWORKS = [ + { + name: 'vanilla', + display: 'Vanilla', + color: yellow, + variants: [ + { + name: 'vanilla', + display: 'JavaScript', + color: yellow + }, + { + name: 'vanilla-ts', + display: 'TypeScript', + color: blue + } + ] + }, + { + name: 'vue', + display: 'Vue', + color: green, + variants: [ + { + name: 'vue', + display: 'JavaScript', + color: yellow + }, + { + name: 'vue-ts', + display: 'TypeScript', + color: blue + }, + { + name: 'custom-create-vue', + display: 'Customize with create-vue', + color: green, + customCommand: 'npm create vue@latest TARGET_DIR' + }, + { + name: 'custom-nuxt', + display: 'Nuxt', + color: lightGreen, + customCommand: 'npm exec nuxi init TARGET_DIR' + } + ] + }, + { + name: 'react', + display: 'React', + color: cyan, + variants: [ + { + name: 'react', + display: 'JavaScript', + color: yellow + }, + { + name: 'react-ts', + display: 'TypeScript', + color: blue + } + ] + }, + { + name: 'preact', + display: 'Preact', + color: magenta, + variants: [ + { + name: 'preact', + display: 'JavaScript', + color: yellow + }, + { + name: 'preact-ts', + display: 'TypeScript', + color: blue + } + ] + }, + { + name: 'lit', + display: 'Lit', + color: lightRed, + variants: [ + { + name: 'lit', + display: 'JavaScript', + color: yellow + }, + { + name: 'lit-ts', + display: 'TypeScript', + color: blue + } + ] + }, + { + name: 'svelte', + display: 'Svelte', + color: red, + variants: [ + { + name: 'svelte', + display: 'JavaScript', + color: yellow + }, + { + name: 'svelte-ts', + display: 'TypeScript', + color: blue + }, + { + name: 'custom-svelte-kit', + display: 'SvelteKit', + color: red, + customCommand: 'npm create svelte@latest TARGET_DIR' + } + ] + } +] + +const TEMPLATES = FRAMEWORKS.map( + (f) => (f.variants && f.variants.map((v) => v.name)) || [f.name] +).reduce((a, b) => a.concat(b), []) + +const renameFiles = { + _gitignore: '.gitignore' +} + +async function init() { + let targetDir = formatTargetDir(argv._[0]) + let template = argv.template || argv.t + + const defaultTargetDir = 'vite-project' + const getProjectName = () => + targetDir === '.' ? path.basename(path.resolve()) : targetDir + + let result = {} + + try { + result = await prompts( + [ + { + type: targetDir ? null : 'text', + name: 'projectName', + message: reset('Project name:'), + initial: defaultTargetDir, + onState: (state) => { + targetDir = formatTargetDir(state.value) || defaultTargetDir + } + }, + { + type: () => + !fs.existsSync(targetDir) || isEmpty(targetDir) ? null : 'confirm', + name: 'overwrite', + message: () => + (targetDir === '.' + ? 'Current directory' + : `Target directory "${targetDir}"`) + + ` is not empty. Remove existing files and continue?` + }, + { + type: (_, { overwrite } = {}) => { + if (overwrite === false) { + throw new Error(red('✖') + ' Operation cancelled') + } + return null + }, + name: 'overwriteChecker' + }, + { + type: () => (isValidPackageName(getProjectName()) ? null : 'text'), + name: 'packageName', + message: reset('Package name:'), + initial: () => toValidPackageName(getProjectName()), + validate: (dir) => + isValidPackageName(dir) || 'Invalid package.json name' + }, + { + type: template && TEMPLATES.includes(template) ? null : 'select', + name: 'framework', + message: + typeof template === 'string' && !TEMPLATES.includes(template) + ? reset( + `"${template}" isn't a valid template. Please choose from below: ` + ) + : reset('Select a framework:'), + initial: 0, + choices: FRAMEWORKS.map((framework) => { + const frameworkColor = framework.color + return { + title: frameworkColor(framework.display || framework.name), + value: framework + } + }) + }, + { + type: (framework) => + framework && framework.variants ? 'select' : null, + name: 'variant', + message: reset('Select a variant:'), + // @ts-ignore + choices: (framework) => + framework.variants.map((variant) => { + const variantColor = variant.color + return { + title: variantColor(variant.display || variant.name), + value: variant.name + } + }) + } + ], + { + onCancel: () => { + throw new Error(red('✖') + ' Operation cancelled') + } + } + ) + } catch (cancelled) { + console.log(cancelled.message) + return + } + + // user choice associated with prompts + const { framework, overwrite, packageName, variant } = result + + const root = path.join(cwd, targetDir) + + if (overwrite) { + emptyDir(root) + } else if (!fs.existsSync(root)) { + fs.mkdirSync(root, { recursive: true }) + } + + // determine template + template = variant || framework || template + + const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent) + const pkgManager = pkgInfo ? pkgInfo.name : 'npm' + const isYarn1 = pkgManager === 'yarn' && pkgInfo?.version.startsWith('1.') + + if (template.startsWith('custom-')) { + const getCustomCommand = (name) => { + for (const f of FRAMEWORKS) { + for (const v of f.variants || []) { + if (v.name === name) { + return v.customCommand + } + } + } + } + const customCommand = getCustomCommand(template) + const fullCustomCommand = customCommand + .replace('TARGET_DIR', targetDir) + .replace(/^npm create/, `${pkgManager} create`) + // Only Yarn 1.x doesn't support `@version` in the `create` command + .replace('@latest', () => (isYarn1 ? '' : '@latest')) + .replace(/^npm exec/, () => { + // Prefer `pnpm dlx` or `yarn dlx` + if (pkgManager === 'pnpm') { + return 'pnpm dlx' + } + if (pkgManager === 'yarn' && !isYarn1) { + return 'yarn dlx' + } + // Use `npm exec` in all other cases, + // including Yarn 1.x and other custom npm clients. + return 'npm exec' + }) + + const [command, ...args] = fullCustomCommand.split(' ') + const { status } = spawn.sync(command, args, { + stdio: 'inherit' + }) + process.exit(status ?? 0) + } + + console.log(`\nScaffolding project in ${root}...`) + + const templateDir = path.resolve( + fileURLToPath(import.meta.url), + '../..', + `template-${template}` + ) + + const write = (file, content) => { + const targetPath = renameFiles[file] + ? path.join(root, renameFiles[file]) + : path.join(root, file) + if (content) { + fs.writeFileSync(targetPath, content) + } else { + copy(path.join(templateDir, file), targetPath) + } + } + + const files = fs.readdirSync(templateDir) + for (const file of files.filter((f) => f !== 'package.json')) { + write(file) + } + + const pkg = JSON.parse( + fs.readFileSync(path.join(templateDir, `package.json`), 'utf-8') + ) + + pkg.name = packageName || getProjectName() + + write('package.json', JSON.stringify(pkg, null, 2)) + + console.log(`\nDone. Now run:\n`) + if (root !== cwd) { + console.log(` cd ${path.relative(cwd, root)}`) + } + switch (pkgManager) { + case 'yarn': + console.log(' yarn') + console.log(' yarn dev') + break + default: + console.log(` ${pkgManager} install`) + console.log(` ${pkgManager} run dev`) + break + } + console.log() +} + +/** + * @param {string | undefined} targetDir + */ +function formatTargetDir(targetDir) { + return targetDir?.trim().replace(/\/+$/g, '') +} + +function copy(src, dest) { + const stat = fs.statSync(src) + if (stat.isDirectory()) { + copyDir(src, dest) + } else { + fs.copyFileSync(src, dest) + } +} + +/** + * @param {string} projectName + */ +function isValidPackageName(projectName) { + return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test( + projectName + ) +} + +/** + * @param {string} projectName + */ +function toValidPackageName(projectName) { + return projectName + .trim() + .toLowerCase() + .replace(/\s+/g, '-') + .replace(/^[._]/, '') + .replace(/[^a-z0-9-~]+/g, '-') +} + +/** + * @param {string} srcDir + * @param {string} destDir + */ +function copyDir(srcDir, destDir) { + fs.mkdirSync(destDir, { recursive: true }) + for (const file of fs.readdirSync(srcDir)) { + const srcFile = path.resolve(srcDir, file) + const destFile = path.resolve(destDir, file) + copy(srcFile, destFile) + } +} + +/** + * @param {string} path + */ +function isEmpty(path) { + const files = fs.readdirSync(path) + return files.length === 0 || (files.length === 1 && files[0] === '.git') +} + +/** + * @param {string} dir + */ +function emptyDir(dir) { + if (!fs.existsSync(dir)) { + return + } + for (const file of fs.readdirSync(dir)) { + if (file === '.git') { + continue + } + fs.rmSync(path.resolve(dir, file), { recursive: true, force: true }) + } +} + +/** + * @param {string | undefined} userAgent process.env.npm_config_user_agent + * @returns object | undefined + */ +function pkgFromUserAgent(userAgent) { + if (!userAgent) return undefined + const pkgSpec = userAgent.split(' ')[0] + const pkgSpecArr = pkgSpec.split('/') + return { + name: pkgSpecArr[0], + version: pkgSpecArr[1] + } +} + +init().catch((e) => { + console.error(e) +}) diff --git a/packages/vite/package.json b/packages/vite/package.json index af2b0ad944bcb3..e411d43cc6c519 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -109,7 +109,6 @@ "postcss-load-config": "^4.0.1", "postcss-modules": "^5.0.0", "resolve.exports": "^1.1.0", - "rollup-plugin-license": "^2.8.1", "sirv": "^2.0.2", "source-map-js": "^1.0.2", "source-map-support": "^0.5.21", diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index bf5c0e9da810a2..c333e66577f8d5 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -1,17 +1,13 @@ /* eslint-disable no-restricted-globals */ -import fs from 'node:fs' import path from 'node:path' import nodeResolve from '@rollup/plugin-node-resolve' import typescript from '@rollup/plugin-typescript' import commonjs from '@rollup/plugin-commonjs' import json from '@rollup/plugin-json' -import license from 'rollup-plugin-license' import MagicString from 'magic-string' -import colors from 'picocolors' -import fg from 'fast-glob' -import { sync as resolve } from 'resolve' import type { Plugin, RollupOptions } from 'rollup' import { defineConfig } from 'rollup' +import licensePlugin from '../../scripts/rollupLicensePlugin.mjs' import pkg from './package.json' const envConfig = defineConfig({ @@ -119,7 +115,12 @@ function createNodePlugins( ignore: ['bufferutil', 'utf-8-validate'] }), json(), - isProduction && licensePlugin(), + isProduction && + licensePlugin( + path.resolve(__dirname, 'LICENSE.md'), + 'Vite core license', + 'Vite' + ), cjsPatchPlugin() ] } @@ -256,115 +257,6 @@ function shimDepsPlugin(deps: Record): Plugin { } } -function licensePlugin() { - return license({ - thirdParty(dependencies) { - // https://github.com/rollup/rollup/blob/master/build-plugins/generate-license-file.js - // MIT Licensed https://github.com/rollup/rollup/blob/master/LICENSE-CORE.md - const coreLicense = fs.readFileSync( - path.resolve(__dirname, '../../LICENSE') - ) - function sortLicenses(licenses) { - let withParenthesis = [] - let noParenthesis = [] - licenses.forEach((license) => { - if (/^\(/.test(license)) { - withParenthesis.push(license) - } else { - noParenthesis.push(license) - } - }) - withParenthesis = withParenthesis.sort() - noParenthesis = noParenthesis.sort() - return [...noParenthesis, ...withParenthesis] - } - const licenses = new Set() - const dependencyLicenseTexts = dependencies - .sort(({ name: nameA }, { name: nameB }) => - nameA > nameB ? 1 : nameB > nameA ? -1 : 0 - ) - .map( - ({ - name, - license, - licenseText, - author, - maintainers, - contributors, - repository - }) => { - let text = `## ${name}\n` - if (license) { - text += `License: ${license}\n` - } - const names = new Set() - for (const person of [author, ...maintainers, ...contributors]) { - const name = typeof person === 'string' ? person : person?.name - if (name) { - names.add(name) - } - } - if (names.size > 0) { - text += `By: ${Array.from(names).join(', ')}\n` - } - if (repository) { - text += `Repository: ${ - typeof repository === 'string' ? repository : repository.url - }\n` - } - if (!licenseText) { - try { - const pkgDir = path.dirname( - resolve(path.join(name, 'package.json'), { - preserveSymlinks: false - }) - ) - const licenseFile = fg.sync(`${pkgDir}/LICENSE*`, { - caseSensitiveMatch: false - })[0] - if (licenseFile) { - licenseText = fs.readFileSync(licenseFile, 'utf-8') - } - } catch {} - } - if (licenseText) { - text += - '\n' + - licenseText - .trim() - .replace(/(\r\n|\r)/gm, '\n') - .split('\n') - .map((line) => `> ${line}`) - .join('\n') + - '\n' - } - licenses.add(license) - return text - } - ) - .join('\n---------------------------------------\n\n') - const licenseText = - `# Vite core license\n` + - `Vite is released under the MIT license:\n\n` + - coreLicense + - `\n# Licenses of bundled dependencies\n` + - `The published Vite artifact additionally contains code with the following licenses:\n` + - `${sortLicenses(licenses).join(', ')}\n\n` + - `# Bundled dependencies:\n` + - dependencyLicenseTexts - const existingLicenseText = fs.readFileSync('LICENSE.md', 'utf8') - if (existingLicenseText !== licenseText) { - fs.writeFileSync('LICENSE.md', licenseText) - console.warn( - colors.yellow( - '\nLICENSE.md updated. You should commit the updated file.\n' - ) - ) - } - } - }) -} - /** * Inject CJS Context for each deps chunk */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 312c246724d3f3..087c7d3db004d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,7 @@ importers: eslint-plugin-import: ^2.26.0 eslint-plugin-node: ^11.1.0 execa: ^6.1.0 + fast-glob: ^3.2.11 fs-extra: ^10.1.0 lint-staged: ^13.0.3 minimist: ^1.2.6 @@ -50,8 +51,10 @@ importers: pnpm: ^7.9.5 prettier: 2.7.1 prompts: ^2.4.2 + resolve: ^1.22.1 rimraf: ^3.0.2 rollup: ~2.78.0 + rollup-plugin-license: ^2.8.1 semver: ^7.3.7 simple-git-hooks: ^2.8.0 tslib: ^2.4.0 @@ -94,6 +97,7 @@ importers: eslint-plugin-import: 2.26.0_kavhtzjob4obuugpatbfgsyfbm eslint-plugin-node: 11.1.0_eslint@8.23.0 execa: 6.1.0 + fast-glob: 3.2.11 fs-extra: 10.1.0 lint-staged: 13.0.3 minimist: 1.2.6 @@ -103,8 +107,10 @@ importers: pnpm: 7.9.5 prettier: 2.7.1 prompts: 2.4.2 + resolve: 1.22.1 rimraf: 3.0.2 rollup: 2.78.0 + rollup-plugin-license: 2.8.1_rollup@2.78.0 semver: 7.3.7 simple-git-hooks: 2.8.0 tslib: 2.4.0 @@ -122,7 +128,7 @@ importers: kolorist: ^1.5.1 minimist: ^1.2.6 prompts: ^2.4.2 - dependencies: + devDependencies: cross-spawn: 7.0.3 kolorist: 1.5.1 minimist: 1.2.6 @@ -252,7 +258,6 @@ importers: resolve: ^1.22.1 resolve.exports: ^1.1.0 rollup: ~2.78.0 - rollup-plugin-license: ^2.8.1 sirv: ^2.0.2 source-map-js: ^1.0.2 source-map-support: ^0.5.21 @@ -313,7 +318,6 @@ importers: postcss-load-config: 4.0.1_postcss@8.4.16 postcss-modules: 5.0.0_postcss@8.4.16 resolve.exports: 1.1.0 - rollup-plugin-license: 2.8.1_rollup@2.78.0 sirv: 2.0.2 source-map-js: 1.0.2 source-map-support: 0.5.21 @@ -4059,6 +4063,7 @@ packages: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 + dev: true /crosspath/0.0.8: resolution: {integrity: sha512-IKlS3MpP0fhJ50M6ltyLO7Q4NzwfhafpmolMH0EDKyyaY81HutF2mH4hLpCdm3fKZ/TSTW5qPIdTy62YnefEyQ==} @@ -5112,7 +5117,7 @@ packages: is-glob: 4.0.3 minimatch: 3.1.2 object.values: 1.1.5 - resolve: 1.22.0 + resolve: 1.22.1 tsconfig-paths: 3.14.1 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -5131,7 +5136,7 @@ packages: eslint-utils: 2.1.0 ignore: 5.2.0 minimatch: 3.1.2 - resolve: 1.22.0 + resolve: 1.22.1 semver: 6.3.0 dev: true @@ -6193,6 +6198,7 @@ packages: /isexe/2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true /jiti/1.14.0: resolution: {integrity: sha512-4IwstlaKQc9vCTC+qUXLM1hajy2ImiL9KnLvVYiaHOtS/v3wRjhLlGl121AmgDgx/O43uKmxownJghS5XMya2A==} @@ -6304,6 +6310,7 @@ packages: /kleur/3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} + dev: true /kleur/4.1.4: resolution: {integrity: sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==} @@ -6312,7 +6319,7 @@ packages: /kolorist/1.5.1: resolution: {integrity: sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ==} - dev: false + dev: true /launch-editor-middleware/2.6.0: resolution: {integrity: sha512-K2yxgljj5TdCeRN1lBtO3/J26+AIDDDw+04y6VAiZbWcTdBwsYN6RrZBnW5DN/QiSIdKNjKdATLUUluWWFYTIA==} @@ -7194,6 +7201,7 @@ packages: /path-key/3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + dev: true /path-key/4.0.0: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} @@ -7524,6 +7532,7 @@ packages: dependencies: kleur: 3.0.3 sisteransi: 1.0.5 + dev: true /prop-types/15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -8134,6 +8143,7 @@ packages: engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 + dev: true /shebang-regex/1.0.0: resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=} @@ -8143,6 +8153,7 @@ packages: /shebang-regex/3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + dev: true /shell-exec/1.0.2: resolution: {integrity: sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg==} @@ -8188,6 +8199,7 @@ packages: /sisteransi/1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: true /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} @@ -9144,6 +9156,7 @@ packages: hasBin: true dependencies: isexe: 2.0.0 + dev: true /wide-align/1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} diff --git a/scripts/rollupLicensePlugin.mjs b/scripts/rollupLicensePlugin.mjs new file mode 100644 index 00000000000000..f96719e19bf9a6 --- /dev/null +++ b/scripts/rollupLicensePlugin.mjs @@ -0,0 +1,126 @@ +// @ts-check + +import fs from 'node:fs' +import path from 'node:path' +import license from 'rollup-plugin-license' +import colors from 'picocolors' +import fg from 'fast-glob' +import { sync as resolve } from 'resolve' + +/** + * @param {string} licenseFilePath + * @param {string} licenseTitle + * @param {string} packageName + */ +function licensePlugin(licenseFilePath, licenseTitle, packageName) { + return license({ + thirdParty(dependencies) { + // https://github.com/rollup/rollup/blob/master/build-plugins/generate-license-file.js + // MIT Licensed https://github.com/rollup/rollup/blob/master/LICENSE-CORE.md + const coreLicense = fs.readFileSync( + new URL('../LICENSE', import.meta.url) + ) + function sortLicenses(licenses) { + let withParenthesis = [] + let noParenthesis = [] + licenses.forEach((license) => { + if (/^\(/.test(license)) { + withParenthesis.push(license) + } else { + noParenthesis.push(license) + } + }) + withParenthesis = withParenthesis.sort() + noParenthesis = noParenthesis.sort() + return [...noParenthesis, ...withParenthesis] + } + const licenses = new Set() + const dependencyLicenseTexts = dependencies + .sort(({ name: _nameA }, { name: _nameB }) => { + const nameA = /** @type {string} */ (_nameA) + const nameB = /** @type {string} */ (_nameB) + return nameA > nameB ? 1 : nameB > nameA ? -1 : 0 + }) + .map( + ({ + name, + license, + licenseText, + author, + maintainers, + contributors, + repository + }) => { + let text = `## ${name}\n` + if (license) { + text += `License: ${license}\n` + } + const names = new Set() + for (const person of [author, ...maintainers, ...contributors]) { + const name = typeof person === 'string' ? person : person?.name + if (name) { + names.add(name) + } + } + if (names.size > 0) { + text += `By: ${Array.from(names).join(', ')}\n` + } + if (repository) { + text += `Repository: ${ + typeof repository === 'string' ? repository : repository.url + }\n` + } + if (!licenseText && name) { + try { + const pkgDir = path.dirname( + resolve(path.join(name, 'package.json'), { + preserveSymlinks: false + }) + ) + const licenseFile = fg.sync(`${pkgDir}/LICENSE*`, { + caseSensitiveMatch: false + })[0] + if (licenseFile) { + licenseText = fs.readFileSync(licenseFile, 'utf-8') + } + } catch {} + } + if (licenseText) { + text += + '\n' + + licenseText + .trim() + .replace(/(\r\n|\r)/gm, '\n') + .split('\n') + .map((line) => `> ${line}`) + .join('\n') + + '\n' + } + licenses.add(license) + return text + } + ) + .join('\n---------------------------------------\n\n') + const licenseText = + `# ${licenseTitle}\n` + + `${packageName} is released under the MIT license:\n\n` + + coreLicense + + `\n# Licenses of bundled dependencies\n` + + `The published ${packageName} artifact additionally contains code with the following licenses:\n` + + `${sortLicenses(licenses).join(', ')}\n\n` + + `# Bundled dependencies:\n` + + dependencyLicenseTexts + const existingLicenseText = fs.readFileSync(licenseFilePath, 'utf8') + if (existingLicenseText !== licenseText) { + fs.writeFileSync(licenseFilePath, licenseText) + console.warn( + colors.yellow( + '\nLICENSE.md updated. You should commit the updated file.\n' + ) + ) + } + } + }) +} + +export default licensePlugin From c9521e7d03156178f9d10a453c3825c0e0a713e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Tue, 30 Aug 2022 23:16:06 +0900 Subject: [PATCH 123/311] fix(css): remove css-post plugin sourcemap (#9914) --- packages/vite/src/node/plugins/css.ts | 3 ++- .../css-sourcemap/__tests__/css-sourcemap.spec.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index 4dc3aa7f158587..aacd6cd0ccf732 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -380,7 +380,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { const cssContent = await getContentWithSourcemap(css) const devBase = config.base - return [ + const code = [ `import { updateStyle as __vite__updateStyle, removeStyle as __vite__removeStyle } from ${JSON.stringify( path.posix.join(devBase, CLIENT_PUBLIC_PATH) )}`, @@ -394,6 +394,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin { }`, `import.meta.hot.prune(() => __vite__removeStyle(__vite__id))` ].join('\n') + return { code, map: { mappings: '' } } } // build CSS handling ---------------------------------------------------- diff --git a/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts b/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts index cee31201cb2f6f..d7e9a5e8ecd71d 100644 --- a/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts +++ b/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts @@ -90,6 +90,18 @@ describe.runIf(isServe)('serve', () => { `) }) + test.runIf(isServe)( + 'js .css request does not include sourcemap', + async () => { + const res = await page.request.get( + new URL('./linked-with-import.css', page.url()).href + ) + const content = await res.text() + const lines = content.trim().split('\n') + expect(lines[lines.length - 1]).not.toMatch(/^\/\/#/) + } + ) + test('imported css', async () => { const css = await getStyleTagContentIncluding('.imported ') const map = extractSourcemap(css) From 632fedf87fbcb81b2400571886faf8a8b92376e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 31 Aug 2022 05:53:03 +0900 Subject: [PATCH 124/311] feat(css): format error (#9909) --- .../vite/src/node/__tests__/utils.spec.ts | 20 +++ packages/vite/src/node/plugins/css.ts | 125 ++++++++++-------- packages/vite/src/node/utils.ts | 6 +- 3 files changed, 91 insertions(+), 60 deletions(-) diff --git a/packages/vite/src/node/__tests__/utils.spec.ts b/packages/vite/src/node/__tests__/utils.spec.ts index 858ec8437362a1..dbad4cd4afd1a9 100644 --- a/packages/vite/src/node/__tests__/utils.spec.ts +++ b/packages/vite/src/node/__tests__/utils.spec.ts @@ -6,6 +6,7 @@ import { getPotentialTsSrcPaths, injectQuery, isWindows, + posToNumber, resolveHostname } from '../utils' @@ -156,6 +157,25 @@ test('ts import of file with .js and query param', () => { ]) }) +describe('posToNumber', () => { + test('simple', () => { + const actual = posToNumber('a\nb', { line: 2, column: 0 }) + expect(actual).toBe(2) + }) + test('pass though pos', () => { + const actual = posToNumber('a\nb', 2) + expect(actual).toBe(2) + }) + test('empty line', () => { + const actual = posToNumber('a\n\nb', { line: 3, column: 0 }) + expect(actual).toBe(3) + }) + test('out of range', () => { + const actual = posToNumber('a\nb', { line: 4, column: 0 }) + expect(actual).toBe(4) + }) +}) + describe('getHash', () => { test('8-digit hex', () => { const hash = getHash(Buffer.alloc(0)) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index aacd6cd0ccf732..d2a0ca6538036c 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -804,8 +804,8 @@ async function compileCSS( atImportResolvers ) - if (preprocessResult.errors.length) { - throw preprocessResult.errors[0] + if (preprocessResult.error) { + throw preprocessResult.error } code = preprocessResult.code @@ -894,55 +894,66 @@ async function compileCSS( } } - // postcss is an unbundled dep and should be lazy imported - const postcssResult = await (await import('postcss')) - .default(postcssPlugins) - .process(code, { - ...postcssOptions, - to: id, - from: id, - ...(devSourcemap - ? { - map: { - inline: false, - annotation: false, - // postcss may return virtual files - // we cannot obtain content of them, so this needs to be enabled - sourcesContent: true - // when "prev: preprocessorMap", the result map may include duplicate filename in `postcssResult.map.sources` - // prev: preprocessorMap, + let postcssResult: PostCSS.Result + try { + // postcss is an unbundled dep and should be lazy imported + postcssResult = await (await import('postcss')) + .default(postcssPlugins) + .process(code, { + ...postcssOptions, + to: id, + from: id, + ...(devSourcemap + ? { + map: { + inline: false, + annotation: false, + // postcss may return virtual files + // we cannot obtain content of them, so this needs to be enabled + sourcesContent: true + // when "prev: preprocessorMap", the result map may include duplicate filename in `postcssResult.map.sources` + // prev: preprocessorMap, + } } - } - : {}) - }) - - // record CSS dependencies from @imports - for (const message of postcssResult.messages) { - if (message.type === 'dependency') { - deps.add(normalizePath(message.file as string)) - } else if (message.type === 'dir-dependency') { - // https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#3-dependencies - const { dir, glob: globPattern = '**' } = message - const pattern = - glob.escapePath(normalizePath(path.resolve(path.dirname(id), dir))) + - `/` + - globPattern - const files = glob.sync(pattern, { - ignore: ['**/node_modules/**'] + : {}) }) - for (let i = 0; i < files.length; i++) { - deps.add(files[i]) - } - } else if (message.type === 'warning') { - let msg = `[vite:css] ${message.text}` - if (message.line && message.column) { - msg += `\n${generateCodeFrame(code, { - line: message.line, - column: message.column - })}` + + // record CSS dependencies from @imports + for (const message of postcssResult.messages) { + if (message.type === 'dependency') { + deps.add(normalizePath(message.file as string)) + } else if (message.type === 'dir-dependency') { + // https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#3-dependencies + const { dir, glob: globPattern = '**' } = message + const pattern = + glob.escapePath(normalizePath(path.resolve(path.dirname(id), dir))) + + `/` + + globPattern + const files = glob.sync(pattern, { + ignore: ['**/node_modules/**'] + }) + for (let i = 0; i < files.length; i++) { + deps.add(files[i]) + } + } else if (message.type === 'warning') { + let msg = `[vite:css] ${message.text}` + if (message.line && message.column) { + msg += `\n${generateCodeFrame(code, { + line: message.line, + column: message.column + })}` + } + config.logger.warn(colors.yellow(msg)) } - config.logger.warn(colors.yellow(msg)) } + } catch (e) { + e.message = `[postcss] ${e.message}` + e.code = code + e.loc = { + column: e.column, + line: e.line + } + throw e } if (!devSourcemap) { @@ -1257,6 +1268,7 @@ async function minifyCSS(css: string, config: ResolvedConfig) { return code } catch (e) { if (e.errors) { + e.message = '[esbuild css minify] ' + e.message const msgs = await formatMessages(e.errors, { kind: 'error' }) e.frame = '\n' + msgs.join('\n') e.loc = e.errors[0].location @@ -1366,7 +1378,7 @@ export interface StylePreprocessorResults { code: string map?: ExistingRawSourceMap | undefined additionalMap?: ExistingRawSourceMap | undefined - errors: RollupError[] + error?: RollupError deps: string[] } @@ -1470,14 +1482,14 @@ const scss: SassStylePreprocessor = async ( code: result.css.toString(), map, additionalMap, - errors: [], deps } } catch (e) { // normalize SASS error + e.message = `[sass] ${e.message}` e.id = e.file e.frame = e.formatted - return { code: '', errors: [e], deps: [] } + return { code: '', error: e, deps: [] } } } @@ -1589,13 +1601,15 @@ const less: StylePreprocessor = async (source, root, options, resolvers) => { } catch (e) { const error = e as Less.RenderError // normalize error info - const normalizedError: RollupError = new Error(error.message || error.type) + const normalizedError: RollupError = new Error( + `[less] ${error.message || error.type}` + ) normalizedError.loc = { file: error.filename || options.filename, line: error.line, column: error.column } - return { code: '', errors: [normalizedError], deps: [] } + return { code: '', error: normalizedError, deps: [] } } const map: ExistingRawSourceMap = result.map && JSON.parse(result.map) @@ -1607,8 +1621,7 @@ const less: StylePreprocessor = async (source, root, options, resolvers) => { code: result.css.toString(), map, additionalMap, - deps: result.imports, - errors: [] + deps: result.imports } } @@ -1722,11 +1735,11 @@ const styl: StylePreprocessor = async (source, root, options) => { code: result, map: formatStylusSourceMap(map, root), additionalMap, - errors: [], deps } } catch (e) { - return { code: '', errors: [e], deps: [] } + e.message = `[stylus] ${e.message}` + return { code: '', error: e, deps: [] } } } diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 7378b080eafd0c..d63691f3cdc922 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -433,10 +433,8 @@ export function posToNumber( const lines = source.split(splitRE) const { line, column } = pos let start = 0 - for (let i = 0; i < line - 1; i++) { - if (lines[i]) { - start += lines[i].length + 1 - } + for (let i = 0; i < line - 1 && i < lines.length; i++) { + start += lines[i].length + 1 } return start + column } From 9ac5075825212e5f4f3b262225ff4a3e46b8e8d1 Mon Sep 17 00:00:00 2001 From: "Jeff Yang (Nay Thu Ya Aung)" <32727188+ydcjeff@users.noreply.github.com> Date: Wed, 31 Aug 2022 03:58:47 +0630 Subject: [PATCH 125/311] fix(ssr): enable `inlineDynamicImports` when input has length 1 (#9904) --- packages/vite/src/node/build.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index 34d1bb98ea60fc..21cdce31180e5d 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -481,7 +481,8 @@ async function doBuild( inlineDynamicImports: output.format === 'umd' || output.format === 'iife' || - (ssrWorkerBuild && typeof input === 'string'), + (ssrWorkerBuild && + (typeof input === 'string' || Object.keys(input).length === 1)), ...output } } From 7c4ab51e744747fd626b7316425f003bcb537c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 31 Aug 2022 19:54:38 +0900 Subject: [PATCH 126/311] chore: trigger ecosystem-ci by comment (#9887) --- .github/workflows/ecosystem-ci-trigger.yml | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/ecosystem-ci-trigger.yml diff --git a/.github/workflows/ecosystem-ci-trigger.yml b/.github/workflows/ecosystem-ci-trigger.yml new file mode 100644 index 00000000000000..bc87ef57f5ff8b --- /dev/null +++ b/.github/workflows/ecosystem-ci-trigger.yml @@ -0,0 +1,95 @@ +name: ecosystem-ci trigger + +on: + issue_comment: + types: [created] + +jobs: + trigger: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run') + steps: + - uses: actions/github-script@v6 + with: + script: | + const user = context.payload.sender.login + console.log(`Validate user: ${user}`) + + const allowedUsers = new Set([ + 'yyx990803', + 'patak-dev', + 'antfu', + 'sodatea', + 'Shinigami92', + 'aleclarson', + 'bluwy', + 'poyoho', + 'sapphi-red', + 'ygj6', + 'Niputi' + ]) + + if (allowedUsers.has(user)) { + console.log('Allowed') + await github.rest.reactions.createForIssueComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: context.payload.comment.id, + content: '+1', + }) + } else { + console.log('Not allowed') + await github.rest.reactions.createForIssueComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: context.payload.comment.id, + content: '-1', + }) + throw new Error('not allowed') + } + - uses: actions/github-script@v6 + id: get-pr-data + with: + script: | + console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`) + const { data: pr } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }) + return { + num: context.issue.number, + branchName: pr.head.ref, + repo: pr.head.repo.full_name + } + - id: generate-token + uses: tibdex/github-app-token@v1 + with: + app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }} + private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }} + repository: "${{ github.repository_owner }}/vite-ecosystem-ci" + - uses: actions/github-script@v6 + id: trigger + env: + COMMENT: ${{ github.event.comment.body }} + with: + github-token: ${{ steps.generate-token.outputs.token }} + result-encoding: string + script: | + const comment = process.env.COMMENT.trim() + const prData = ${{ steps.get-pr-data.outputs.result }} + + const suite = comment.replace(/^\/ecosystem-ci run/, '').trim() + + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: 'vite-ecosystem-ci', + workflow_id: 'ecosystem-ci-from-pr.yml', + ref: 'main', + inputs: { + prNumber: '' + prData.num, + branchName: prData.branchName, + repo: prData.repo, + suite: suite === '' ? '-' : suite + } + }) From 8f315a20a7c3a33c72e7993860b6b69f5d6f0e05 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 16:58:43 +0200 Subject: [PATCH 127/311] chore(deps): update dependency postcss-import to v15 (#9929) Co-authored-by: sapphi-red --- packages/vite/package.json | 2 +- packages/vite/src/node/plugins/css.ts | 3 +++ packages/vite/types/shims.d.ts | 1 + playground/css/__tests__/css.spec.ts | 5 +++++ playground/css/index.html | 6 ++++++ playground/css/layered/blue.css | 5 +++++ playground/css/layered/green.css | 5 +++++ playground/css/layered/index.css | 13 +++++++++++++ playground/css/main.js | 2 ++ pnpm-lock.yaml | 14 +++++++------- 10 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 playground/css/layered/blue.css create mode 100644 playground/css/layered/green.css create mode 100644 playground/css/layered/index.css diff --git a/packages/vite/package.json b/packages/vite/package.json index e411d43cc6c519..5781eeb7a3ee23 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -105,7 +105,7 @@ "parse5": "^7.0.0", "periscopic": "^3.0.4", "picocolors": "^1.0.0", - "postcss-import": "^14.1.0", + "postcss-import": "^15.0.0", "postcss-load-config": "^4.0.1", "postcss-modules": "^5.0.0", "resolve.exports": "^1.1.0", diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index d2a0ca6538036c..aebb3286584662 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -848,6 +848,9 @@ async function compileCSS( return path.resolve(resolved) } return id + }, + nameLayer(index) { + return `vite--anon-layer-${getHash(id)}-${index}` } }) ) diff --git a/packages/vite/types/shims.d.ts b/packages/vite/types/shims.d.ts index d90f0bf42c7057..110b34024cd161 100644 --- a/packages/vite/types/shims.d.ts +++ b/packages/vite/types/shims.d.ts @@ -47,6 +47,7 @@ declare module 'postcss-import' { basedir: string, importOptions: any ) => string | string[] | Promise + nameLayer: (index: number, rootFilename: string) => string }) => Plugin export = plugin } diff --git a/playground/css/__tests__/css.spec.ts b/playground/css/__tests__/css.spec.ts index 0053b184e8b197..f46e6d0bfdbabc 100644 --- a/playground/css/__tests__/css.spec.ts +++ b/playground/css/__tests__/css.spec.ts @@ -259,6 +259,11 @@ test.runIf(isBuild)('@charset hoist', async () => { }) }) +test('layers', async () => { + expect(await getColor('.layers-blue')).toMatch('blue') + expect(await getColor('.layers-green')).toMatch('green') +}) + test('@import dependency w/ style entry', async () => { expect(await getColor('.css-dep')).toBe('purple') }) diff --git a/playground/css/index.html b/playground/css/index.html index 39e4305ceda7b8..61d0c2edce5bb8 100644 --- a/playground/css/index.html +++ b/playground/css/index.html @@ -99,6 +99,12 @@

CSS

CSS with @charset:


 
+  

+ @import with layers: + blue + green +

+

@import dependency w/ style entrypoints: this should be purple

diff --git a/playground/css/layered/blue.css b/playground/css/layered/blue.css new file mode 100644 index 00000000000000..faa644dd73ce2d --- /dev/null +++ b/playground/css/layered/blue.css @@ -0,0 +1,5 @@ +@media screen { + .layers-blue { + color: blue; + } +} diff --git a/playground/css/layered/green.css b/playground/css/layered/green.css new file mode 100644 index 00000000000000..15a762b7572e0b --- /dev/null +++ b/playground/css/layered/green.css @@ -0,0 +1,5 @@ +@media screen { + .layers-green { + color: green; + } +} diff --git a/playground/css/layered/index.css b/playground/css/layered/index.css new file mode 100644 index 00000000000000..49756673b674d4 --- /dev/null +++ b/playground/css/layered/index.css @@ -0,0 +1,13 @@ +@layer base; + +@import './blue.css' layer; +@import './green.css' layer; + +@layer base { + .layers-blue { + color: black; + } + .layers-green { + color: black; + } +} diff --git a/playground/css/main.js b/playground/css/main.js index f767a3d9b9674d..39ccd916467faf 100644 --- a/playground/css/main.js +++ b/playground/css/main.js @@ -44,6 +44,8 @@ text('.modules-inline', inlineMod) import charset from './charset.css' text('.charset-css', charset) +import './layered/index.css' + import './dep.css' import './glob-dep.css' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 087c7d3db004d8..cbe3f6bbf6e4c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -252,7 +252,7 @@ importers: periscopic: ^3.0.4 picocolors: ^1.0.0 postcss: ^8.4.16 - postcss-import: ^14.1.0 + postcss-import: ^15.0.0 postcss-load-config: ^4.0.1 postcss-modules: ^5.0.0 resolve: ^1.22.1 @@ -314,7 +314,7 @@ importers: parse5: 7.0.0 periscopic: 3.0.4 picocolors: 1.0.0 - postcss-import: 14.1.0_postcss@8.4.16 + postcss-import: 15.0.0_postcss@8.4.16 postcss-load-config: 4.0.1_postcss@8.4.16 postcss-modules: 5.0.0_postcss@8.4.16 resolve.exports: 1.1.0 @@ -7269,7 +7269,7 @@ packages: dev: true /pify/2.3.0: - resolution: {integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=} + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} /pify/3.0.0: @@ -7323,9 +7323,9 @@ packages: read-cache: 1.0.0 resolve: 1.22.1 - /postcss-import/14.1.0_postcss@8.4.16: - resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} - engines: {node: '>=10.0.0'} + /postcss-import/15.0.0_postcss@8.4.16: + resolution: {integrity: sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg==} + engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: @@ -7770,7 +7770,7 @@ packages: dev: false /read-cache/1.0.0: - resolution: {integrity: sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=} + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} dependencies: pify: 2.3.0 From 091537cea8c4eaf6b1cd29c7e058874cafbc7666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Thu, 1 Sep 2022 01:35:46 +0900 Subject: [PATCH 128/311] chore!: bump esbuild to 0.15.6 (#9934) --- packages/vite/package.json | 2 +- .../src/node/optimizer/esbuildDepPlugin.ts | 26 -- pnpm-lock.yaml | 243 +++++++++++++++++- 3 files changed, 242 insertions(+), 29 deletions(-) diff --git a/packages/vite/package.json b/packages/vite/package.json index 5781eeb7a3ee23..532844adddfd3b 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -58,7 +58,7 @@ }, "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!", "dependencies": { - "esbuild": "^0.14.47", + "esbuild": "^0.15.6", "postcss": "^8.4.16", "resolve": "^1.22.1", "rollup": "~2.78.0" diff --git a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts index f646e3815758d1..66b0bcdbe050a9 100644 --- a/packages/vite/src/node/optimizer/esbuildDepPlugin.ts +++ b/packages/vite/src/node/optimizer/esbuildDepPlugin.ts @@ -1,5 +1,4 @@ import path from 'node:path' -import { promises as fs } from 'node:fs' import type { ImportKind, Plugin } from 'esbuild' import { KNOWN_ASSET_TYPES } from '../constants' import { getDepOptimizationConfig } from '..' @@ -8,7 +7,6 @@ import { flattenId, isBuiltin, isExternalUrl, - isRunningWithYarnPnp, moduleListContains, normalizePath } from '../utils' @@ -300,30 +298,6 @@ module.exports = Object.create(new Proxy({}, { } } ) - - // yarn 2 pnp compat - if (isRunningWithYarnPnp) { - build.onResolve( - { filter: /.*/ }, - async ({ path: id, importer, kind, resolveDir, namespace }) => { - const resolved = await resolve( - id, - importer, - kind, - // pass along resolveDir for entries - namespace === 'dep' ? resolveDir : undefined - ) - if (resolved) { - return resolveResult(id, resolved) - } - } - ) - - build.onLoad({ filter: /.*/ }, async (args) => ({ - contents: await fs.readFile(args.path), - loader: 'default' - })) - } } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbe3f6bbf6e4c3..1d459cc2893bd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,7 +234,7 @@ importers: dotenv: ^14.3.2 dotenv-expand: ^5.1.0 es-module-lexer: ^1.0.3 - esbuild: ^0.14.47 + esbuild: ^0.15.6 estree-walker: ^3.0.1 etag: ^1.8.1 fast-glob: ^3.2.11 @@ -269,7 +269,7 @@ importers: ufo: ^0.8.5 ws: ^8.8.1 dependencies: - esbuild: 0.14.47 + esbuild: 0.15.6 postcss: 8.4.16 resolve: 1.22.1 rollup: 2.78.0 @@ -2258,6 +2258,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64/0.15.6: + resolution: {integrity: sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@eslint/eslintrc/1.3.1: resolution: {integrity: sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4429,6 +4438,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-64/0.14.50: @@ -4449,12 +4459,22 @@ packages: dev: true optional: true + /esbuild-android-64/0.15.6: + resolution: {integrity: sha512-Z1CHSgB1crVQi2LKSBwSkpaGtaloVz0ZIYcRMsvHc3uSXcR/x5/bv9wcZspvH/25lIGTaViosciS/NS09ERmVA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: false + optional: true + /esbuild-android-arm64/0.14.47: resolution: {integrity: sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true + dev: true optional: true /esbuild-android-arm64/0.14.50: @@ -4475,12 +4495,22 @@ packages: dev: true optional: true + /esbuild-android-arm64/0.15.6: + resolution: {integrity: sha512-mvM+gqNxqKm2pCa3dnjdRzl7gIowuc4ga7P7c3yHzs58Im8v/Lfk1ixSgQ2USgIywT48QWaACRa3F4MG7djpSw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + /esbuild-darwin-64/0.14.47: resolution: {integrity: sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-64/0.14.50: @@ -4501,12 +4531,22 @@ packages: dev: true optional: true + /esbuild-darwin-64/0.15.6: + resolution: {integrity: sha512-BsfVt3usScAfGlXJiGtGamwVEOTM8AiYiw1zqDWhGv6BncLXCnTg1As+90mxWewdTZKq3iIy8s9g8CKkrrAXVw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /esbuild-darwin-arm64/0.14.47: resolution: {integrity: sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true + dev: true optional: true /esbuild-darwin-arm64/0.14.50: @@ -4527,12 +4567,22 @@ packages: dev: true optional: true + /esbuild-darwin-arm64/0.15.6: + resolution: {integrity: sha512-CnrAeJaEpPakUobhqO4wVSA4Zm6TPaI5UY4EsI62j9mTrjIyQPXA1n4Ju6Iu5TVZRnEqV6q8blodgYJ6CJuwCA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /esbuild-freebsd-64/0.14.47: resolution: {integrity: sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-64/0.14.50: @@ -4553,12 +4603,22 @@ packages: dev: true optional: true + /esbuild-freebsd-64/0.15.6: + resolution: {integrity: sha512-+qFdmqi+jkAsxsNJkaWVrnxEUUI50nu6c3MBVarv3RCDCbz7ZS1a4ZrdkwEYFnKcVWu6UUE0Kkb1SQ1yGEG6sg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + /esbuild-freebsd-arm64/0.14.47: resolution: {integrity: sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true + dev: true optional: true /esbuild-freebsd-arm64/0.14.50: @@ -4579,12 +4639,22 @@ packages: dev: true optional: true + /esbuild-freebsd-arm64/0.15.6: + resolution: {integrity: sha512-KtQkQOhnNciXm2yrTYZMD3MOm2zBiiwFSU+dkwNbcfDumzzUprr1x70ClTdGuZwieBS1BM/k0KajRQX7r504Xw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-32/0.14.47: resolution: {integrity: sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-32/0.14.50: @@ -4605,12 +4675,22 @@ packages: dev: true optional: true + /esbuild-linux-32/0.15.6: + resolution: {integrity: sha512-IAkDNz3TpxwISTGVdQijwyHBZrbFgLlRi5YXcvaEHtgbmayLSDcJmH5nV1MFgo/x2QdKcHBkOYHdjhKxUAcPwg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-64/0.14.47: resolution: {integrity: sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-64/0.14.50: @@ -4631,12 +4711,22 @@ packages: dev: true optional: true + /esbuild-linux-64/0.15.6: + resolution: {integrity: sha512-gQPksyrEYfA4LJwyfTQWAZaVZCx4wpaLrSzo2+Xc9QLC+i/sMWmX31jBjrn4nLJCd79KvwCinto36QC7BEIU/A==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-arm/0.14.47: resolution: {integrity: sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm/0.14.50: @@ -4657,12 +4747,22 @@ packages: dev: true optional: true + /esbuild-linux-arm/0.15.6: + resolution: {integrity: sha512-xZ0Bq2aivsthDjA/ytQZzxrxIZbG0ATJYMJxNeOIBc1zUjpbVpzBKgllOZMsTSXMHFHGrow6TnCcgwqY0+oEoQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-arm64/0.14.47: resolution: {integrity: sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-arm64/0.14.50: @@ -4683,12 +4783,22 @@ packages: dev: true optional: true + /esbuild-linux-arm64/0.15.6: + resolution: {integrity: sha512-aovDkclFa6C9EdZVBuOXxqZx83fuoq8097xZKhEPSygwuy4Lxs8J4anHG7kojAsR+31lfUuxzOo2tHxv7EiNHA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-mips64le/0.14.47: resolution: {integrity: sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-mips64le/0.14.50: @@ -4709,12 +4819,22 @@ packages: dev: true optional: true + /esbuild-linux-mips64le/0.15.6: + resolution: {integrity: sha512-wVpW8wkWOGizsCqCwOR/G3SHwhaecpGy3fic9BF1r7vq4djLjUcA8KunDaBCjJ6TgLQFhJ98RjDuyEf8AGjAvw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-ppc64le/0.14.47: resolution: {integrity: sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-ppc64le/0.14.50: @@ -4735,12 +4855,22 @@ packages: dev: true optional: true + /esbuild-linux-ppc64le/0.15.6: + resolution: {integrity: sha512-z6w6gsPH/Y77uchocluDC8tkCg9rfkcPTePzZKNr879bF4tu7j9t255wuNOCE396IYEGxY7y8u2HJ9i7kjCLVw==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-riscv64/0.14.47: resolution: {integrity: sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-riscv64/0.14.50: @@ -4761,12 +4891,22 @@ packages: dev: true optional: true + /esbuild-linux-riscv64/0.15.6: + resolution: {integrity: sha512-pfK/3MJcmbfU399TnXW5RTPS1S+ID6ra+CVj9TFZ2s0q9Ja1F5A1VirUUvViPkjiw+Kq3zveyn6U09Wg1zJXrw==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-linux-s390x/0.14.47: resolution: {integrity: sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true + dev: true optional: true /esbuild-linux-s390x/0.14.50: @@ -4787,12 +4927,22 @@ packages: dev: true optional: true + /esbuild-linux-s390x/0.15.6: + resolution: {integrity: sha512-OZeeDu32liefcwAE63FhVqM4heWTC8E3MglOC7SK0KYocDdY/6jyApw0UDkDHlcEK9mW6alX/SH9r3PDjcCo/Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: false + optional: true + /esbuild-netbsd-64/0.14.47: resolution: {integrity: sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true + dev: true optional: true /esbuild-netbsd-64/0.14.50: @@ -4813,12 +4963,22 @@ packages: dev: true optional: true + /esbuild-netbsd-64/0.15.6: + resolution: {integrity: sha512-kaxw61wcHMyiEsSsi5ut1YYs/hvTC2QkxJwyRvC2Cnsz3lfMLEu8zAjpBKWh9aU/N0O/gsRap4wTur5GRuSvBA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: false + optional: true + /esbuild-openbsd-64/0.14.47: resolution: {integrity: sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true + dev: true optional: true /esbuild-openbsd-64/0.14.50: @@ -4839,12 +4999,22 @@ packages: dev: true optional: true + /esbuild-openbsd-64/0.15.6: + resolution: {integrity: sha512-CuoY60alzYfIZapUHqFXqXbj88bbRJu8Fp9okCSHRX2zWIcGz4BXAHXiG7dlCye5nFVrY72psesLuWdusyf2qw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: false + optional: true + /esbuild-sunos-64/0.14.47: resolution: {integrity: sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true + dev: true optional: true /esbuild-sunos-64/0.14.50: @@ -4865,12 +5035,22 @@ packages: dev: true optional: true + /esbuild-sunos-64/0.15.6: + resolution: {integrity: sha512-1ceefLdPWcd1nW/ZLruPEYxeUEAVX0YHbG7w+BB4aYgfknaLGotI/ZvPWUZpzhC8l1EybrVlz++lm3E6ODIJOg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: false + optional: true + /esbuild-windows-32/0.14.47: resolution: {integrity: sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-32/0.14.50: @@ -4891,12 +5071,22 @@ packages: dev: true optional: true + /esbuild-windows-32/0.15.6: + resolution: {integrity: sha512-pBqdOsKqCD5LRYiwF29PJRDJZi7/Wgkz46u3d17MRFmrLFcAZDke3nbdDa1c8YgY78RiemudfCeAemN8EBlIpA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + /esbuild-windows-64/0.14.47: resolution: {integrity: sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-64/0.14.50: @@ -4917,12 +5107,22 @@ packages: dev: true optional: true + /esbuild-windows-64/0.15.6: + resolution: {integrity: sha512-KpPOh4aTOo//g9Pk2oVAzXMpc9Sz9n5A9sZTmWqDSXCiiachfFhbuFlsKBGATYCVitXfmBIJ4nNYYWSOdz4hQg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /esbuild-windows-arm64/0.14.47: resolution: {integrity: sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true + dev: true optional: true /esbuild-windows-arm64/0.14.50: @@ -4943,6 +5143,15 @@ packages: dev: true optional: true + /esbuild-windows-arm64/0.15.6: + resolution: {integrity: sha512-DB3G2x9OvFEa00jV+OkDBYpufq5x/K7a6VW6E2iM896DG4ZnAvJKQksOsCPiM1DUaa+DrijXAQ/ZOcKAqf/3Hg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /esbuild/0.14.47: resolution: {integrity: sha512-wI4ZiIfFxpkuxB8ju4MHrGwGLyp1+awEHAHVpx6w7a+1pmYIq8T9FGEVVwFo0iFierDoMj++Xq69GXWYn2EiwA==} engines: {node: '>=12'} @@ -4969,6 +5178,7 @@ packages: esbuild-windows-32: 0.14.47 esbuild-windows-64: 0.14.47 esbuild-windows-arm64: 0.14.47 + dev: true /esbuild/0.14.50: resolution: {integrity: sha512-SbC3k35Ih2IC6trhbMYW7hYeGdjPKf9atTKwBUHqMCYFZZ9z8zhuvfnZihsnJypl74FjiAKjBRqFkBkAd0rS/w==} @@ -5027,6 +5237,35 @@ packages: esbuild-windows-arm64: 0.15.5 dev: true + /esbuild/0.15.6: + resolution: {integrity: sha512-sgLOv3l4xklvXzzczhRwKRotyrfyZ2i1fCS6PTOLPd9wevDPArGU8HFtHrHCOcsMwTjLjzGm15gvC8uxVzQf+w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/linux-loong64': 0.15.6 + esbuild-android-64: 0.15.6 + esbuild-android-arm64: 0.15.6 + esbuild-darwin-64: 0.15.6 + esbuild-darwin-arm64: 0.15.6 + esbuild-freebsd-64: 0.15.6 + esbuild-freebsd-arm64: 0.15.6 + esbuild-linux-32: 0.15.6 + esbuild-linux-64: 0.15.6 + esbuild-linux-arm: 0.15.6 + esbuild-linux-arm64: 0.15.6 + esbuild-linux-mips64le: 0.15.6 + esbuild-linux-ppc64le: 0.15.6 + esbuild-linux-riscv64: 0.15.6 + esbuild-linux-s390x: 0.15.6 + esbuild-netbsd-64: 0.15.6 + esbuild-openbsd-64: 0.15.6 + esbuild-sunos-64: 0.15.6 + esbuild-windows-32: 0.15.6 + esbuild-windows-64: 0.15.6 + esbuild-windows-arm64: 0.15.6 + dev: false + /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} From 86bf776b1fea26f292163f911fe59ed201d73baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Thu, 1 Sep 2022 15:33:06 +0900 Subject: [PATCH 129/311] fix(hmr): duplicated modules because of query params mismatch (fixes #2255) (#9773) --- packages/vite/src/client/client.ts | 11 ++++++-- .../vite/src/node/plugins/importAnalysis.ts | 2 +- packages/vite/src/node/server/hmr.ts | 7 ++++- packages/vite/types/hmrPayload.d.ts | 4 +++ playground/hmr/__tests__/hmr.spec.ts | 26 +++++++++++++++++++ playground/hmr/hmr.ts | 1 + playground/hmr/importing-updated/a.js | 8 ++++++ playground/hmr/importing-updated/b.js | 8 ++++++ playground/hmr/importing-updated/index.js | 2 ++ playground/hmr/index.html | 1 + 10 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 playground/hmr/importing-updated/a.js create mode 100644 playground/hmr/importing-updated/b.js create mode 100644 playground/hmr/importing-updated/index.js diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index fdd28e6be42278..df05a4eccb276c 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -388,7 +388,12 @@ export function removeStyle(id: string): void { } } -async function fetchUpdate({ path, acceptedPath, timestamp }: Update) { +async function fetchUpdate({ + path, + acceptedPath, + timestamp, + explicitImportRequired +}: Update) { const mod = hotModulesMap.get(path) if (!mod) { // In a code-splitting project, @@ -415,7 +420,9 @@ async function fetchUpdate({ path, acceptedPath, timestamp }: Update) { /* @vite-ignore */ base + path.slice(1) + - `?import&t=${timestamp}${query ? `&${query}` : ''}` + `?${explicitImportRequired ? 'import&' : ''}t=${timestamp}${ + query ? `&${query}` : '' + }` ) moduleMap.set(dep, newMod) } catch (e) { diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index 77b24c2a35da68..f1356d5c7f879e 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -76,7 +76,7 @@ export const canSkipImportAnalysis = (id: string): boolean => const optimizedDepChunkRE = /\/chunk-[A-Z0-9]{8}\.js/ const optimizedDepDynamicRE = /-[A-Z0-9]{8}\.js/ -function isExplicitImportRequired(url: string) { +export function isExplicitImportRequired(url: string): boolean { return !isJSRequest(cleanUrl(url)) && !isCSSRequest(url) } diff --git a/packages/vite/src/node/server/hmr.ts b/packages/vite/src/node/server/hmr.ts index f3298944a5e0b0..3493d370ab0b65 100644 --- a/packages/vite/src/node/server/hmr.ts +++ b/packages/vite/src/node/server/hmr.ts @@ -9,6 +9,7 @@ import { createDebugger, normalizePath, unique } from '../utils' import type { ViteDevServer } from '..' import { isCSSRequest } from '../plugins/css' import { getAffectedGlobModules } from '../plugins/importMetaGlob' +import { isExplicitImportRequired } from '../plugins/importAnalysis' import type { ModuleNode } from './moduleGraph' export const debugHmr = createDebugger('vite:hmr') @@ -151,9 +152,13 @@ export function updateModules( updates.push( ...[...boundaries].map(({ boundary, acceptedVia }) => ({ - type: `${boundary.type}-update` as Update['type'], + type: `${boundary.type}-update` as const, timestamp, path: boundary.url, + explicitImportRequired: + boundary.type === 'js' + ? isExplicitImportRequired(acceptedVia.url) + : undefined, acceptedPath: acceptedVia.url })) ) diff --git a/packages/vite/types/hmrPayload.d.ts b/packages/vite/types/hmrPayload.d.ts index 2fbed3a821466f..9ddb1a48c78072 100644 --- a/packages/vite/types/hmrPayload.d.ts +++ b/packages/vite/types/hmrPayload.d.ts @@ -20,6 +20,10 @@ export interface Update { path: string acceptedPath: string timestamp: number + /** + * @internal + */ + explicitImportRequired: boolean | undefined } export interface PrunePayload { diff --git a/playground/hmr/__tests__/hmr.spec.ts b/playground/hmr/__tests__/hmr.spec.ts index d0635fc04db9ee..3858719b772a37 100644 --- a/playground/hmr/__tests__/hmr.spec.ts +++ b/playground/hmr/__tests__/hmr.spec.ts @@ -218,6 +218,32 @@ if (!isBuild) { expect(await btn.textContent()).toBe('Counter 1') }) + // #2255 + test('importing reloaded', async () => { + await page.goto(viteTestUrl) + const outputEle = await page.$('.importing-reloaded') + const getOutput = () => { + return outputEle.innerHTML() + } + + await untilUpdated(getOutput, ['a.js: a0', 'b.js: b0,a0'].join('
')) + + editFile('importing-updated/a.js', (code) => code.replace("'a0'", "'a1'")) + await untilUpdated( + getOutput, + ['a.js: a0', 'b.js: b0,a0', 'a.js: a1'].join('
') + ) + + editFile('importing-updated/b.js', (code) => + code.replace('`b0,${a}`', '`b1,${a}`') + ) + // note that "a.js: a1" should not happen twice after "b.js: b0,a0'" + await untilUpdated( + getOutput, + ['a.js: a0', 'b.js: b0,a0', 'a.js: a1', 'b.js: b1,a1'].join('
') + ) + }) + describe('acceptExports', () => { const HOT_UPDATED = /hot updated/ const CONNECTED = /connected/ diff --git a/playground/hmr/hmr.ts b/playground/hmr/hmr.ts index f2d21b9bc78884..97330f05f29f64 100644 --- a/playground/hmr/hmr.ts +++ b/playground/hmr/hmr.ts @@ -1,4 +1,5 @@ import { foo as depFoo, nestedFoo } from './hmrDep' +import './importing-updated' export const foo = 1 text('.app', foo) diff --git a/playground/hmr/importing-updated/a.js b/playground/hmr/importing-updated/a.js new file mode 100644 index 00000000000000..4b08229417e4c3 --- /dev/null +++ b/playground/hmr/importing-updated/a.js @@ -0,0 +1,8 @@ +const val = 'a0' +document.querySelector('.importing-reloaded').innerHTML += `a.js: ${val}
` + +export default val + +if (import.meta.hot) { + import.meta.hot.accept() +} diff --git a/playground/hmr/importing-updated/b.js b/playground/hmr/importing-updated/b.js new file mode 100644 index 00000000000000..87c4a065061fea --- /dev/null +++ b/playground/hmr/importing-updated/b.js @@ -0,0 +1,8 @@ +import a from './a.js' + +const val = `b0,${a}` +document.querySelector('.importing-reloaded').innerHTML += `b.js: ${val}
` + +if (import.meta.hot) { + import.meta.hot.accept() +} diff --git a/playground/hmr/importing-updated/index.js b/playground/hmr/importing-updated/index.js new file mode 100644 index 00000000000000..0cc74268d385de --- /dev/null +++ b/playground/hmr/importing-updated/index.js @@ -0,0 +1,2 @@ +import './a' +import './b' diff --git a/playground/hmr/index.html b/playground/hmr/index.html index 7857ef818a911c..aafeaea5b565d4 100644 --- a/playground/hmr/index.html +++ b/playground/hmr/index.html @@ -25,3 +25,4 @@
+
From 7b618f09a181956f4cc31774a453bdef76742943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Fri, 2 Sep 2022 17:25:38 +0900 Subject: [PATCH 130/311] fix(types): mark explicitImportRequired optional and experimental (#9962) --- packages/vite/types/hmrPayload.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vite/types/hmrPayload.d.ts b/packages/vite/types/hmrPayload.d.ts index 9ddb1a48c78072..839095009e76fb 100644 --- a/packages/vite/types/hmrPayload.d.ts +++ b/packages/vite/types/hmrPayload.d.ts @@ -21,9 +21,9 @@ export interface Update { acceptedPath: string timestamp: number /** - * @internal + * @experimental internal */ - explicitImportRequired: boolean | undefined + explicitImportRequired?: boolean | undefined } export interface PrunePayload { From 4158b98c8fc30070967de1176f4b1c252d275386 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Fri, 2 Sep 2022 10:40:25 +0200 Subject: [PATCH 131/311] release: v3.1.0-beta.2 --- packages/vite/CHANGELOG.md | 13 +++++++++++++ packages/vite/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index e58f8663156e19..632672a83b8012 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,16 @@ +## 3.1.0-beta.2 (2022-09-02) + +* fix(css): remove css-post plugin sourcemap (#9914) ([c9521e7](https://github.com/vitejs/vite/commit/c9521e7)), closes [#9914](https://github.com/vitejs/vite/issues/9914) +* fix(hmr): duplicated modules because of query params mismatch (fixes #2255) (#9773) ([86bf776](https://github.com/vitejs/vite/commit/86bf776)), closes [#2255](https://github.com/vitejs/vite/issues/2255) [#9773](https://github.com/vitejs/vite/issues/9773) +* fix(ssr): enable `inlineDynamicImports` when input has length 1 (#9904) ([9ac5075](https://github.com/vitejs/vite/commit/9ac5075)), closes [#9904](https://github.com/vitejs/vite/issues/9904) +* fix(types): mark explicitImportRequired optional and experimental (#9962) ([7b618f0](https://github.com/vitejs/vite/commit/7b618f0)), closes [#9962](https://github.com/vitejs/vite/issues/9962) +* chore!: bump esbuild to 0.15.6 (#9934) ([091537c](https://github.com/vitejs/vite/commit/091537c)), closes [#9934](https://github.com/vitejs/vite/issues/9934) +* chore(deps): update dependency postcss-import to v15 (#9929) ([8f315a2](https://github.com/vitejs/vite/commit/8f315a2)), closes [#9929](https://github.com/vitejs/vite/issues/9929) +* feat(css): format error (#9909) ([632fedf](https://github.com/vitejs/vite/commit/632fedf)), closes [#9909](https://github.com/vitejs/vite/issues/9909) +* perf: bundle create-vite (#9034) ([37ac91e](https://github.com/vitejs/vite/commit/37ac91e)), closes [#9034](https://github.com/vitejs/vite/issues/9034) + + + ## 3.1.0-beta.1 (2022-08-29) * docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) diff --git a/packages/vite/package.json b/packages/vite/package.json index 532844adddfd3b..6a00bcc2656ecb 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.1.0-beta.1", + "version": "3.1.0-beta.2", "type": "module", "license": "MIT", "author": "Evan You", From 85fa2c89f35ecdda4ec5ed52ea50110337d98822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sun, 4 Sep 2022 05:32:49 +0900 Subject: [PATCH 132/311] refactor(create-vite): migrate to TypeScript (#9941) --- package.json | 2 +- .../create-vite/src/{index.js => index.ts} | 115 ++++++++---------- packages/create-vite/tsconfig.json | 14 +++ pnpm-lock.yaml | 10 +- 4 files changed, 72 insertions(+), 69 deletions(-) rename packages/create-vite/src/{index.js => index.ts} (81%) create mode 100644 packages/create-vite/tsconfig.json diff --git a/package.json b/package.json index 2a41ad3a384ed9..a4e029cde05307 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@types/micromatch": "^4.0.2", "@types/minimist": "^1.2.2", "@types/node": "^17.0.42", - "@types/prompts": "^2.4.0", + "@types/prompts": "^2.0.14", "@types/resolve": "^1.20.2", "@types/sass": "~1.43.1", "@types/semver": "^7.3.12", diff --git a/packages/create-vite/src/index.js b/packages/create-vite/src/index.ts similarity index 81% rename from packages/create-vite/src/index.js rename to packages/create-vite/src/index.ts index 8e5aa02ff4a40e..799ca93a75cd47 100755 --- a/packages/create-vite/src/index.js +++ b/packages/create-vite/src/index.ts @@ -1,4 +1,3 @@ -// @ts-check import fs from 'node:fs' import path from 'node:path' import { fileURLToPath } from 'node:url' @@ -19,10 +18,27 @@ import { // Avoids autoconversion to number of the project name by defining that the args // non associated with an option ( _ ) needs to be parsed as a string. See #4606 -const argv = minimist(process.argv.slice(2), { string: ['_'] }) +const argv = minimist<{ + t?: string + template?: string +}>(process.argv.slice(2), { string: ['_'] }) const cwd = process.cwd() -const FRAMEWORKS = [ +type ColorFunc = (str: string | number) => string +type Framework = { + name: string + display: string + color: ColorFunc + variants: FrameworkVariant[] +} +type FrameworkVariant = { + name: string + display: string + color: ColorFunc + customCommand?: string +} + +const FRAMEWORKS: Framework[] = [ { name: 'vanilla', display: 'Vanilla', @@ -149,25 +165,29 @@ const TEMPLATES = FRAMEWORKS.map( (f) => (f.variants && f.variants.map((v) => v.name)) || [f.name] ).reduce((a, b) => a.concat(b), []) -const renameFiles = { +const renameFiles: Record = { _gitignore: '.gitignore' } +const defaultTargetDir = 'vite-project' + async function init() { - let targetDir = formatTargetDir(argv._[0]) - let template = argv.template || argv.t + const argTargetDir = formatTargetDir(argv._[0]) + const argTemplate = argv.template || argv.t - const defaultTargetDir = 'vite-project' + let targetDir = argTargetDir || defaultTargetDir const getProjectName = () => targetDir === '.' ? path.basename(path.resolve()) : targetDir - let result = {} + let result: prompts.Answers< + 'projectName' | 'overwrite' | 'packageName' | 'framework' | 'variant' + > try { result = await prompts( [ { - type: targetDir ? null : 'text', + type: argTargetDir ? null : 'text', name: 'projectName', message: reset('Project name:'), initial: defaultTargetDir, @@ -186,7 +206,7 @@ async function init() { ` is not empty. Remove existing files and continue?` }, { - type: (_, { overwrite } = {}) => { + type: (_, { overwrite }: { overwrite?: boolean }) => { if (overwrite === false) { throw new Error(red('✖') + ' Operation cancelled') } @@ -203,12 +223,13 @@ async function init() { isValidPackageName(dir) || 'Invalid package.json name' }, { - type: template && TEMPLATES.includes(template) ? null : 'select', + type: + argTemplate && TEMPLATES.includes(argTemplate) ? null : 'select', name: 'framework', message: - typeof template === 'string' && !TEMPLATES.includes(template) + typeof argTemplate === 'string' && !TEMPLATES.includes(argTemplate) ? reset( - `"${template}" isn't a valid template. Please choose from below: ` + `"${argTemplate}" isn't a valid template. Please choose from below: ` ) : reset('Select a framework:'), initial: 0, @@ -221,12 +242,11 @@ async function init() { }) }, { - type: (framework) => + type: (framework: Framework) => framework && framework.variants ? 'select' : null, name: 'variant', message: reset('Select a variant:'), - // @ts-ignore - choices: (framework) => + choices: (framework: Framework) => framework.variants.map((variant) => { const variantColor = variant.color return { @@ -242,7 +262,7 @@ async function init() { } } ) - } catch (cancelled) { + } catch (cancelled: any) { console.log(cancelled.message) return } @@ -259,23 +279,15 @@ async function init() { } // determine template - template = variant || framework || template + const template: string = variant || framework || argTemplate const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent) const pkgManager = pkgInfo ? pkgInfo.name : 'npm' const isYarn1 = pkgManager === 'yarn' && pkgInfo?.version.startsWith('1.') - if (template.startsWith('custom-')) { - const getCustomCommand = (name) => { - for (const f of FRAMEWORKS) { - for (const v of f.variants || []) { - if (v.name === name) { - return v.customCommand - } - } - } - } - const customCommand = getCustomCommand(template) + const { customCommand } = + FRAMEWORKS.flatMap((f) => f.variants).find((v) => v.name === template) ?? {} + if (customCommand) { const fullCustomCommand = customCommand .replace('TARGET_DIR', targetDir) .replace(/^npm create/, `${pkgManager} create`) @@ -309,10 +321,8 @@ async function init() { `template-${template}` ) - const write = (file, content) => { - const targetPath = renameFiles[file] - ? path.join(root, renameFiles[file]) - : path.join(root, file) + const write = (file: string, content?: string) => { + const targetPath = path.join(root, renameFiles[file] ?? file) if (content) { fs.writeFileSync(targetPath, content) } else { @@ -350,14 +360,11 @@ async function init() { console.log() } -/** - * @param {string | undefined} targetDir - */ -function formatTargetDir(targetDir) { +function formatTargetDir(targetDir: string | undefined) { return targetDir?.trim().replace(/\/+$/g, '') } -function copy(src, dest) { +function copy(src: string, dest: string) { const stat = fs.statSync(src) if (stat.isDirectory()) { copyDir(src, dest) @@ -366,19 +373,13 @@ function copy(src, dest) { } } -/** - * @param {string} projectName - */ -function isValidPackageName(projectName) { +function isValidPackageName(projectName: string) { return /^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test( projectName ) } -/** - * @param {string} projectName - */ -function toValidPackageName(projectName) { +function toValidPackageName(projectName: string) { return projectName .trim() .toLowerCase() @@ -387,11 +388,7 @@ function toValidPackageName(projectName) { .replace(/[^a-z0-9-~]+/g, '-') } -/** - * @param {string} srcDir - * @param {string} destDir - */ -function copyDir(srcDir, destDir) { +function copyDir(srcDir: string, destDir: string) { fs.mkdirSync(destDir, { recursive: true }) for (const file of fs.readdirSync(srcDir)) { const srcFile = path.resolve(srcDir, file) @@ -400,18 +397,12 @@ function copyDir(srcDir, destDir) { } } -/** - * @param {string} path - */ -function isEmpty(path) { +function isEmpty(path: string) { const files = fs.readdirSync(path) return files.length === 0 || (files.length === 1 && files[0] === '.git') } -/** - * @param {string} dir - */ -function emptyDir(dir) { +function emptyDir(dir: string) { if (!fs.existsSync(dir)) { return } @@ -423,11 +414,7 @@ function emptyDir(dir) { } } -/** - * @param {string | undefined} userAgent process.env.npm_config_user_agent - * @returns object | undefined - */ -function pkgFromUserAgent(userAgent) { +function pkgFromUserAgent(userAgent: string | undefined) { if (!userAgent) return undefined const pkgSpec = userAgent.split(' ')[0] const pkgSpecArr = pkgSpec.split('/') diff --git a/packages/create-vite/tsconfig.json b/packages/create-vite/tsconfig.json new file mode 100644 index 00000000000000..0ec39bdf6a1404 --- /dev/null +++ b/packages/create-vite/tsconfig.json @@ -0,0 +1,14 @@ +{ + "include": ["src", "__tests__"], + "compilerOptions": { + "outDir": "dist", + "target": "ES2020", + "module": "ES2020", + "moduleResolution": "Node", + "strict": true, + "declaration": false, + "sourceMap": false, + "noUnusedLocals": true, + "esModuleInterop": true + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d459cc2893bd6..6c27045e25270e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,7 +25,7 @@ importers: '@types/micromatch': ^4.0.2 '@types/minimist': ^1.2.2 '@types/node': ^17.0.42 - '@types/prompts': ^2.4.0 + '@types/prompts': ^2.0.14 '@types/resolve': ^1.20.2 '@types/sass': ~1.43.1 '@types/semver': ^7.3.12 @@ -81,7 +81,7 @@ importers: '@types/micromatch': 4.0.2 '@types/minimist': 1.2.2 '@types/node': 17.0.42 - '@types/prompts': 2.4.0 + '@types/prompts': 2.0.14 '@types/resolve': 1.20.2 '@types/sass': 1.43.1 '@types/semver': 7.3.12 @@ -2807,8 +2807,10 @@ packages: /@types/parse-json/4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} - /@types/prompts/2.4.0: - resolution: {integrity: sha512-7th8Opn+0XlN0O6qzO7dXOPwL6rigq/EwRS2DntaTHwSw8cLaYKeAPt5dWEKHSL+ffVSUl1itTPUC06+FlsV4Q==} + /@types/prompts/2.0.14: + resolution: {integrity: sha512-HZBd99fKxRWpYCErtm2/yxUZv6/PBI9J7N4TNFffl5JbrYMHBwF25DjQGTW3b3jmXq+9P6/8fCIb2ee57BFfYA==} + dependencies: + '@types/node': 17.0.42 dev: true /@types/resolve/1.17.1: From b1ad82def57f1e07233d5011489900bb38a8fe6b Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 5 Sep 2022 11:47:16 +0200 Subject: [PATCH 133/311] release: v3.1.0 --- packages/vite/CHANGELOG.md | 5 +++++ packages/vite/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 632672a83b8012..c0b64448f1ef35 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.1.0 (2022-09-05) + + + + ## 3.1.0-beta.2 (2022-09-02) * fix(css): remove css-post plugin sourcemap (#9914) ([c9521e7](https://github.com/vitejs/vite/commit/c9521e7)), closes [#9914](https://github.com/vitejs/vite/issues/9914) diff --git a/packages/vite/package.json b/packages/vite/package.json index 6a00bcc2656ecb..b929146aee5359 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.1.0-beta.2", + "version": "3.1.0", "type": "module", "license": "MIT", "author": "Evan You", From 32ba6931aab50b59d896b96815c4ceb229d70ec1 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 5 Sep 2022 11:47:59 +0200 Subject: [PATCH 134/311] release: plugin-vue@3.1.0 --- packages/plugin-vue/CHANGELOG.md | 5 +++++ packages/plugin-vue/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/CHANGELOG.md b/packages/plugin-vue/CHANGELOG.md index afacf0f3eab86e..cde94520cdb190 100644 --- a/packages/plugin-vue/CHANGELOG.md +++ b/packages/plugin-vue/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.1.0 (2022-09-05) + + + + ## 3.1.0-beta.0 (2022-08-29) * docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index efa3397bd2be46..832baeacb22d6e 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "3.1.0-beta.0", + "version": "3.1.0", "license": "MIT", "author": "Evan You", "files": [ From 8b48181cd61f42d24fb0912609fa94b333a9ee95 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 5 Sep 2022 11:48:54 +0200 Subject: [PATCH 135/311] release: plugin-react@2.1.0 --- packages/plugin-react/CHANGELOG.md | 6 ++++++ packages/plugin-react/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index 649e5cd9c68078..f4408610482556 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.1.0 (2022-09-05) + +* fix(plugin-react): duplicate __self prop and __source prop (#9387) ([c89de3a](https://github.com/vitejs/vite/commit/c89de3a)), closes [#9387](https://github.com/vitejs/vite/issues/9387) + + + ## 2.1.0-beta.0 (2022-08-29) * docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index f8e7c6265232d9..fc9b1e9464ddec 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-react", - "version": "2.1.0-beta.0", + "version": "2.1.0", "license": "MIT", "author": "Evan You", "contributors": [ From 4c88989a10b293a1faac9995019450b6c647ef4b Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 5 Sep 2022 11:49:50 +0200 Subject: [PATCH 136/311] release: plugin-legacy@2.1.0 --- packages/plugin-legacy/CHANGELOG.md | 5 +++++ packages/plugin-legacy/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/plugin-legacy/CHANGELOG.md b/packages/plugin-legacy/CHANGELOG.md index cd34f3c6ff5845..61c7e6f4a1386c 100644 --- a/packages/plugin-legacy/CHANGELOG.md +++ b/packages/plugin-legacy/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.1.0 (2022-09-05) + + + + ## 2.1.0-beta.0 (2022-08-29) * fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 6f15399e39574c..87268121bf1edf 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-legacy", - "version": "2.1.0-beta.0", + "version": "2.1.0", "license": "MIT", "author": "Evan You", "files": [ From 3a843d96c9ca0137803aadc6f866401550106295 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 5 Sep 2022 11:50:27 +0200 Subject: [PATCH 137/311] release: create-vite@3.1.0 --- packages/create-vite/CHANGELOG.md | 13 +++++++++++++ packages/create-vite/package.json | 2 +- packages/create-vite/template-lit-ts/package.json | 2 +- packages/create-vite/template-lit/package.json | 2 +- .../create-vite/template-preact-ts/package.json | 2 +- packages/create-vite/template-preact/package.json | 2 +- packages/create-vite/template-react-ts/package.json | 4 ++-- packages/create-vite/template-react/package.json | 4 ++-- .../create-vite/template-svelte-ts/package.json | 2 +- packages/create-vite/template-svelte/package.json | 2 +- .../create-vite/template-vanilla-ts/package.json | 2 +- packages/create-vite/template-vanilla/package.json | 2 +- packages/create-vite/template-vue-ts/package.json | 4 ++-- packages/create-vite/template-vue/package.json | 4 ++-- 14 files changed, 30 insertions(+), 17 deletions(-) diff --git a/packages/create-vite/CHANGELOG.md b/packages/create-vite/CHANGELOG.md index 65eb850352c223..6a3fa6264561d7 100644 --- a/packages/create-vite/CHANGELOG.md +++ b/packages/create-vite/CHANGELOG.md @@ -1,3 +1,16 @@ +## 3.1.0 (2022-09-05) + +* refactor(create-vite): migrate to TypeScript (#9941) ([85fa2c8](https://github.com/vitejs/vite/commit/85fa2c8)), closes [#9941](https://github.com/vitejs/vite/issues/9941) +* perf: bundle create-vite (#9034) ([37ac91e](https://github.com/vitejs/vite/commit/37ac91e)), closes [#9034](https://github.com/vitejs/vite/issues/9034) +* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) +* test(cli): remove unnecessary generics usage (#9859) ([45d6797](https://github.com/vitejs/vite/commit/45d6797)), closes [#9859](https://github.com/vitejs/vite/issues/9859) +* feat: skip `.git` when emptying dir (#9659) ([07fe65e](https://github.com/vitejs/vite/commit/07fe65e)), closes [#9659](https://github.com/vitejs/vite/issues/9659) +* feat(create-vite): add support for custom init commands (`create-vue`, Nuxt, and SvelteKit) (#9406) ([1673f3d](https://github.com/vitejs/vite/commit/1673f3d)), closes [#9406](https://github.com/vitejs/vite/issues/9406) +* chore(deps): update all non-major dependencies (#9675) ([4e56e87](https://github.com/vitejs/vite/commit/4e56e87)), closes [#9675](https://github.com/vitejs/vite/issues/9675) +* chore(deps): update all non-major dependencies (#9778) ([aceaefc](https://github.com/vitejs/vite/commit/aceaefc)), closes [#9778](https://github.com/vitejs/vite/issues/9778) + + + ## 3.0.2 (2022-08-12) diff --git a/packages/create-vite/package.json b/packages/create-vite/package.json index 76c33bcd95e75f..cb0b37beeabcb1 100644 --- a/packages/create-vite/package.json +++ b/packages/create-vite/package.json @@ -1,6 +1,6 @@ { "name": "create-vite", - "version": "3.0.2", + "version": "3.1.0", "type": "module", "license": "MIT", "author": "Evan You", diff --git a/packages/create-vite/template-lit-ts/package.json b/packages/create-vite/template-lit-ts/package.json index 463ed0a92f15e8..1fe7368853fa97 100644 --- a/packages/create-vite/template-lit-ts/package.json +++ b/packages/create-vite/template-lit-ts/package.json @@ -21,6 +21,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-lit/package.json b/packages/create-vite/template-lit/package.json index d9a968e653d1dd..9df78634f332de 100644 --- a/packages/create-vite/template-lit/package.json +++ b/packages/create-vite/template-lit/package.json @@ -18,6 +18,6 @@ "lit": "^2.3.1" }, "devDependencies": { - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index 67d72178f4e826..ce8145c3b7bb8f 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -14,6 +14,6 @@ "devDependencies": { "@preact/preset-vite": "^2.3.0", "typescript": "^4.6.4", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index f20f9c0e8c5a1f..552532559aaafd 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -13,6 +13,6 @@ }, "devDependencies": { "@preact/preset-vite": "^2.3.0", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 954ab1b6c35af8..097084203ed080 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -15,8 +15,8 @@ "devDependencies": { "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", - "@vitejs/plugin-react": "^2.0.1", + "@vitejs/plugin-react": "^2.1.0", "typescript": "^4.6.4", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index ae854711e08149..45ed41a9ced8c8 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -15,7 +15,7 @@ "devDependencies": { "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", - "@vitejs/plugin-react": "^2.0.1", - "vite": "^3.0.9" + "@vitejs/plugin-react": "^2.1.0", + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index 4b2b573519f698..016cd21519b6a5 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -17,6 +17,6 @@ "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index 8b1554b6107eb0..daadafb4cef070 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -11,6 +11,6 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.2", "svelte": "^3.49.0", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-vanilla-ts/package.json b/packages/create-vite/template-vanilla-ts/package.json index d35e6a2f5051a2..3deb58bf3756f2 100644 --- a/packages/create-vite/template-vanilla-ts/package.json +++ b/packages/create-vite/template-vanilla-ts/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-vanilla/package.json b/packages/create-vite/template-vanilla/package.json index 95543d260c4650..e0d02a899f40e4 100644 --- a/packages/create-vite/template-vanilla/package.json +++ b/packages/create-vite/template-vanilla/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "devDependencies": { - "vite": "^3.0.9" + "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index 066d16c44ae57f..727ea107255221 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -12,9 +12,9 @@ "vue": "^3.2.37" }, "devDependencies": { - "@vitejs/plugin-vue": "^3.0.3", + "@vitejs/plugin-vue": "^3.1.0", "typescript": "^4.6.4", - "vite": "^3.0.9", + "vite": "^3.1.0", "vue-tsc": "^0.40.4" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index e6bc9a293283c0..1fe94b6fadcb6c 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -12,7 +12,7 @@ "vue": "^3.2.37" }, "devDependencies": { - "@vitejs/plugin-vue": "^3.0.3", - "vite": "^3.0.9" + "@vitejs/plugin-vue": "^3.1.0", + "vite": "^3.1.0" } } From 44dbcbec8b1c0db0d42887ba5bf3de752e3baada Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 5 Sep 2022 13:09:14 +0200 Subject: [PATCH 138/311] chore: update 3.1 changelog (#9994) --- packages/vite/CHANGELOG.md | 83 +++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index c0b64448f1ef35..4027c0270c61ca 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,39 +1,59 @@ ## 3.1.0 (2022-09-05) +### Main Changes +- Vite now uses [parse5](https://github.com/inikulin/parse5), which parses HTML in the same way as the latest browser versions. This migration gives us a more robust HTML story moving forward ([#9678](https://github.com/vitejs/vite/issues/9678)). +- Vite now supports using objects as hooks to change execution order ([#9634](https://github.com/vitejs/vite/issues/9634)). Check out the [RFC](https://github.com/vitejs/rfcs/discussions/12) and the implementation upstream at [rollup/rollup#4600](https://github.com/rollup/rollup/pull/4600) for details and rationale. + ```js + import { resolve } from 'node:path'; + import { readdir } from 'node:fs/promises'; + + export default function getFilesOnDisk() { + return { + name: 'getFilesOnDisk', + writeBundle: { + // run this hook sequentially even if the hook is parallel + sequential: true, + // push this hook to the 'post' stage, after all normal hooks + order: 'post', + // hook implementation + async handler({ dir }) { + const topLevelFiles = await readdir(resolve(dir)) + console.log(topLevelFiles) + } + } + } + } + ``` + Read the updated [Rollup Plugin docs](https://rollupjs.org/guide/en/#build-hooks) for more information. +> **Note** +> After Vite 3.1, you are no longer going to see `[vite] hot updated` log messages in the browser console. These messages have been moved to the debug channel ([#8855](https://github.com/vitejs/vite/issues/8855)). Check your browser docs to [show debug logs](https://developer.chrome.com/docs/devtools/console/log/#level). -## 3.1.0-beta.2 (2022-09-02) +### Features -* fix(css): remove css-post plugin sourcemap (#9914) ([c9521e7](https://github.com/vitejs/vite/commit/c9521e7)), closes [#9914](https://github.com/vitejs/vite/issues/9914) -* fix(hmr): duplicated modules because of query params mismatch (fixes #2255) (#9773) ([86bf776](https://github.com/vitejs/vite/commit/86bf776)), closes [#2255](https://github.com/vitejs/vite/issues/2255) [#9773](https://github.com/vitejs/vite/issues/9773) -* fix(ssr): enable `inlineDynamicImports` when input has length 1 (#9904) ([9ac5075](https://github.com/vitejs/vite/commit/9ac5075)), closes [#9904](https://github.com/vitejs/vite/issues/9904) -* fix(types): mark explicitImportRequired optional and experimental (#9962) ([7b618f0](https://github.com/vitejs/vite/commit/7b618f0)), closes [#9962](https://github.com/vitejs/vite/issues/9962) -* chore!: bump esbuild to 0.15.6 (#9934) ([091537c](https://github.com/vitejs/vite/commit/091537c)), closes [#9934](https://github.com/vitejs/vite/issues/9934) -* chore(deps): update dependency postcss-import to v15 (#9929) ([8f315a2](https://github.com/vitejs/vite/commit/8f315a2)), closes [#9929](https://github.com/vitejs/vite/issues/9929) * feat(css): format error (#9909) ([632fedf](https://github.com/vitejs/vite/commit/632fedf)), closes [#9909](https://github.com/vitejs/vite/issues/9909) * perf: bundle create-vite (#9034) ([37ac91e](https://github.com/vitejs/vite/commit/37ac91e)), closes [#9034](https://github.com/vitejs/vite/issues/9034) +* feat: stabilize server.resolvedUrls (#9866) ([c3f6731](https://github.com/vitejs/vite/commit/c3f6731)), closes [#9866](https://github.com/vitejs/vite/issues/9866) +* feat(client): use debug channel on hot updates (#8855) ([0452224](https://github.com/vitejs/vite/commit/0452224)), closes [#8855](https://github.com/vitejs/vite/issues/8855) +* feat: relax dep browser externals as warning (#9837) ([71cb374](https://github.com/vitejs/vite/commit/71cb374)), closes [#9837](https://github.com/vitejs/vite/issues/9837) +* feat: support object style hooks (#9634) ([757a92f](https://github.com/vitejs/vite/commit/757a92f)), closes [#9634](https://github.com/vitejs/vite/issues/9634) +* refactor: migrate from vue/compiler-dom to parse5 (#9678) ([05b3ce6](https://github.com/vitejs/vite/commit/05b3ce6)), closes [#9678](https://github.com/vitejs/vite/issues/9678) +* refactor: use `server.ssrTransform` (#9769) ([246a087](https://github.com/vitejs/vite/commit/246a087)), closes [#9769](https://github.com/vitejs/vite/issues/9769) +* perf: legacy avoid insert the entry module css (#9761) ([0765ab8](https://github.com/vitejs/vite/commit/0765ab8)), closes [#9761](https://github.com/vitejs/vite/issues/9761) +### Bug Fixes - -## 3.1.0-beta.1 (2022-08-29) - -* docs: fix typo (#9855) ([583f185](https://github.com/vitejs/vite/commit/583f185)), closes [#9855](https://github.com/vitejs/vite/issues/9855) +* fix(css): remove css-post plugin sourcemap (#9914) ([c9521e7](https://github.com/vitejs/vite/commit/c9521e7)), closes [#9914](https://github.com/vitejs/vite/issues/9914) +* fix(hmr): duplicated modules because of query params mismatch (fixes #2255) (#9773) ([86bf776](https://github.com/vitejs/vite/commit/86bf776)), closes [#2255](https://github.com/vitejs/vite/issues/2255) [#9773](https://github.com/vitejs/vite/issues/9773) +* fix(ssr): enable `inlineDynamicImports` when input has length 1 (#9904) ([9ac5075](https://github.com/vitejs/vite/commit/9ac5075)), closes [#9904](https://github.com/vitejs/vite/issues/9904) +* fix(types): mark explicitImportRequired optional and experimental (#9962) ([7b618f0](https://github.com/vitejs/vite/commit/7b618f0)), closes [#9962](https://github.com/vitejs/vite/issues/9962) +* fix: bump esbuild to 0.15.6 (#9934) ([091537c](https://github.com/vitejs/vite/commit/091537c)), closes [#9934](https://github.com/vitejs/vite/issues/9934) * refactor(hmr): simplify fetchUpdate (#9881) ([8872aba](https://github.com/vitejs/vite/commit/8872aba)), closes [#9881](https://github.com/vitejs/vite/issues/9881) * fix: ensure version query for direct node_modules imports (#9848) ([e7712ff](https://github.com/vitejs/vite/commit/e7712ff)), closes [#9848](https://github.com/vitejs/vite/issues/9848) * fix: escape glob path (#9842) ([6be971e](https://github.com/vitejs/vite/commit/6be971e)), closes [#9842](https://github.com/vitejs/vite/issues/9842) * fix(build): build project path error (#9793) ([cc8800a](https://github.com/vitejs/vite/commit/cc8800a)), closes [#9793](https://github.com/vitejs/vite/issues/9793) -* fix(deps): update all non-major dependencies (#9888) ([e35a58b](https://github.com/vitejs/vite/commit/e35a58b)), closes [#9888](https://github.com/vitejs/vite/issues/9888) * fix(types): explicitly set Vite hooks' `this` to `void` (#9885) ([2d2f2e5](https://github.com/vitejs/vite/commit/2d2f2e5)), closes [#9885](https://github.com/vitejs/vite/issues/9885) -* feat: stabilize server.resolvedUrls (#9866) ([c3f6731](https://github.com/vitejs/vite/commit/c3f6731)), closes [#9866](https://github.com/vitejs/vite/issues/9866) -* feat(client): use debug channel on hot updates (#8855) ([0452224](https://github.com/vitejs/vite/commit/0452224)), closes [#8855](https://github.com/vitejs/vite/issues/8855) - - - -## 3.1.0-beta.0 (2022-08-25) - -* feat: relax dep browser externals as warning (#9837) ([71cb374](https://github.com/vitejs/vite/commit/71cb374)), closes [#9837](https://github.com/vitejs/vite/issues/9837) -* feat: support object style hooks (#9634) ([757a92f](https://github.com/vitejs/vite/commit/757a92f)), closes [#9634](https://github.com/vitejs/vite/issues/9634) * fix: `completeSystemWrapPlugin` captures `function ()` (fixes #9807) (#9821) ([1ee0364](https://github.com/vitejs/vite/commit/1ee0364)), closes [#9807](https://github.com/vitejs/vite/issues/9807) [#9821](https://github.com/vitejs/vite/issues/9821) * fix: `injectQuery` break relative path (#9760) ([61273b2](https://github.com/vitejs/vite/commit/61273b2)), closes [#9760](https://github.com/vitejs/vite/issues/9760) * fix: close socket when client error handled (#9816) ([ba62be4](https://github.com/vitejs/vite/commit/ba62be4)), closes [#9816](https://github.com/vitejs/vite/issues/9816) @@ -42,13 +62,20 @@ * fix: sanitize asset filenames (#9737) ([2f468bb](https://github.com/vitejs/vite/commit/2f468bb)), closes [#9737](https://github.com/vitejs/vite/issues/9737) * fix: Skip inlining Git LFS placeholders (fix #9714) (#9795) ([9c7e43d](https://github.com/vitejs/vite/commit/9c7e43d)), closes [#9714](https://github.com/vitejs/vite/issues/9714) [#9795](https://github.com/vitejs/vite/issues/9795) * fix(html): move importmap before module scripts (#9392) ([b386fba](https://github.com/vitejs/vite/commit/b386fba)), closes [#9392](https://github.com/vitejs/vite/issues/9392) -* refactor: migrate from vue/compiler-dom to parse5 (#9678) ([05b3ce6](https://github.com/vitejs/vite/commit/05b3ce6)), closes [#9678](https://github.com/vitejs/vite/issues/9678) -* refactor: use `server.ssrTransform` (#9769) ([246a087](https://github.com/vitejs/vite/commit/246a087)), closes [#9769](https://github.com/vitejs/vite/issues/9769) -* chore: output tsconfck debug log (#9768) ([9206ad7](https://github.com/vitejs/vite/commit/9206ad7)), closes [#9768](https://github.com/vitejs/vite/issues/9768) -* chore: remove custom vitepress config (#9785) ([b2c0ee0](https://github.com/vitejs/vite/commit/b2c0ee0)), closes [#9785](https://github.com/vitejs/vite/issues/9785) -* chore(deps): update all non-major dependencies (#9778) ([aceaefc](https://github.com/vitejs/vite/commit/aceaefc)), closes [#9778](https://github.com/vitejs/vite/issues/9778) -* chore(deps): update dependency postcss-modules to v5 (#9779) ([aca6ac2](https://github.com/vitejs/vite/commit/aca6ac2)), closes [#9779](https://github.com/vitejs/vite/issues/9779) -* perf: legacy avoid insert the entry module css (#9761) ([0765ab8](https://github.com/vitejs/vite/commit/0765ab8)), closes [#9761](https://github.com/vitejs/vite/issues/9761) + +### Previous Changelogs + +#### [3.1.0-beta.2](https://github.com/vitejs/vite/compare/v3.1.0-beta.1...v3.1.0-beta.2) (2022-09-02) + +See [3.1.0-beta.2 changelog](https://github.com/vitejs/vite/blob/v3.1.0-beta.2/packages/vite/CHANGELOG.md) + +#### [3.1.0-beta.1](https://github.com/vitejs/vite/compare/v3.1.0-beta.0...v3.1.0-beta.1) (2022-08-29) + +See [3.1.0-beta.1 changelog](https://github.com/vitejs/vite/blob/v3.1.0-beta.1/packages/vite/CHANGELOG.md) + +#### [3.1.0-beta.0](https://github.com/vitejs/vite/compare/v3.0.0...v3.1.0-beta.0) (2022-08-25) + +See [3.1.0-beta.0 changelog](https://github.com/vitejs/vite/blob/v3.1.0-beta.0/packages/vite/CHANGELOG.md) From 0d20eae2236231aebdfe5cf8fc1794226873d779 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 5 Sep 2022 22:55:01 +0800 Subject: [PATCH 139/311] fix(preview): send configured headers (#9976) --- docs/config/preview-options.md | 6 ++++++ packages/vite/src/node/preview.ts | 10 +++++++++- playground/fs-serve/__tests__/fs-serve.spec.ts | 9 +++++++++ playground/fs-serve/package.json | 2 +- playground/fs-serve/root/vite.config.js | 8 ++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/config/preview-options.md b/docs/config/preview-options.md index 32589a5091d12b..3604afb9576d42 100644 --- a/docs/config/preview-options.md +++ b/docs/config/preview-options.md @@ -75,3 +75,9 @@ Uses [`http-proxy`](https://github.com/http-party/node-http-proxy). Full options - **Default:** [`server.cors`](./server-options#server-cors) Configure CORS for the preview server. This is enabled by default and allows any origin. Pass an [options object](https://github.com/expressjs/cors) to fine tune the behavior or `false` to disable. + +## preview.headers + +- **Type:** `OutgoingHttpHeaders` + +Specify server response headers. diff --git a/packages/vite/src/node/preview.ts b/packages/vite/src/node/preview.ts index bebd212217d384..82640c3ff5c43c 100644 --- a/packages/vite/src/node/preview.ts +++ b/packages/vite/src/node/preview.ts @@ -111,12 +111,20 @@ export async function preview( // static assets const distDir = path.resolve(config.root, config.build.outDir) + const headers = config.preview.headers app.use( previewBase, sirv(distDir, { etag: true, dev: true, - single: config.appType === 'spa' + single: config.appType === 'spa', + setHeaders(res) { + if (headers) { + for (const name in headers) { + res.setHeader(name, headers[name]!) + } + } + } }) ) diff --git a/playground/fs-serve/__tests__/fs-serve.spec.ts b/playground/fs-serve/__tests__/fs-serve.spec.ts index 8fcb3f61125158..90d35d21b04773 100644 --- a/playground/fs-serve/__tests__/fs-serve.spec.ts +++ b/playground/fs-serve/__tests__/fs-serve.spec.ts @@ -1,3 +1,4 @@ +import fetch from 'node-fetch' import { beforeAll, describe, expect, test } from 'vitest' import testJSON from '../safe.json' import { isServe, page, viteTestUrl } from '~utils' @@ -97,3 +98,11 @@ describe.runIf(isServe)('main', () => { expect(await page.textContent('.unsafe-dotenv')).toBe('404') }) }) + +describe('fetch', () => { + // Note: this should pass in build too, but the test setup doesn't use Vite preview + test.runIf(isServe)('serve with configured headers', async () => { + const res = await fetch(viteTestUrl + '/src/') + expect(res.headers.get('x-served-by')).toBe('vite') + }) +}) diff --git a/playground/fs-serve/package.json b/playground/fs-serve/package.json index c50be06a8cb286..6a5d18e2303c53 100644 --- a/playground/fs-serve/package.json +++ b/playground/fs-serve/package.json @@ -6,6 +6,6 @@ "dev": "vite root", "build": "vite build root", "debug": "node --inspect-brk ../../packages/vite/bin/vite", - "preview": "vite preview" + "preview": "vite preview root" } } diff --git a/playground/fs-serve/root/vite.config.js b/playground/fs-serve/root/vite.config.js index 5712ad5acb3438..12d07754cbf10d 100644 --- a/playground/fs-serve/root/vite.config.js +++ b/playground/fs-serve/root/vite.config.js @@ -18,6 +18,14 @@ module.exports = { }, hmr: { overlay: false + }, + headers: { + 'x-served-by': 'vite' + } + }, + preview: { + headers: { + 'x-served-by': 'vite' } }, define: { From 855f2f077eb8dc41b395bccecb6a5b836eb526a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 20:09:13 +0200 Subject: [PATCH 140/311] fix(deps): update all non-major dependencies (#9985) --- package.json | 22 +- .../template-preact-ts/package.json | 2 +- .../create-vite/template-preact/package.json | 2 +- .../template-react-ts/package.json | 2 +- .../create-vite/template-react/package.json | 2 +- .../template-svelte-ts/package.json | 6 +- .../create-vite/template-svelte/package.json | 4 +- .../create-vite/template-vue-ts/package.json | 4 +- .../create-vite/template-vue/package.json | 2 +- packages/plugin-legacy/package.json | 4 +- packages/plugin-react/package.json | 2 +- packages/plugin-vue/package.json | 2 +- packages/vite/package.json | 4 +- playground/alias/package.json | 4 +- playground/backend-integration/package.json | 2 +- playground/css-sourcemap/package.json | 4 +- playground/css/package.json | 2 +- playground/extensions/package.json | 2 +- .../dep-that-imports-vue/package.json | 2 +- .../dep-that-requires-vue/package.json | 2 +- playground/external/package.json | 2 +- playground/json/package.json | 2 +- playground/multiple-entrypoints/package.json | 2 +- playground/object-hooks/package.json | 2 +- playground/optimize-deps/package.json | 2 +- playground/preload/package.json | 2 +- playground/react-emotion/package.json | 2 +- playground/ssr-vue/package.json | 2 +- playground/tailwind/package.json | 2 +- playground/vue-jsx/package.json | 2 +- playground/vue-legacy/package.json | 2 +- playground/vue-lib/package.json | 2 +- playground/vue-server-origin/package.json | 2 +- playground/vue-sourcemap/package.json | 4 +- playground/vue/package.json | 4 +- pnpm-lock.yaml | 964 +++++++----------- 36 files changed, 423 insertions(+), 651 deletions(-) diff --git a/package.json b/package.json index a4e029cde05307..b2d0409cbce6a8 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@babel/types": "^7.18.13", - "@microsoft/api-extractor": "^7.29.5", + "@microsoft/api-extractor": "^7.30.0", "@rollup/plugin-typescript": "^8.4.0", "@types/babel__core": "^7.1.19", "@types/babel__standalone": "^7.1.4", @@ -57,13 +57,13 @@ "@types/semver": "^7.3.12", "@types/stylus": "^0.48.38", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.35.1", - "@typescript-eslint/parser": "^5.35.1", + "@typescript-eslint/eslint-plugin": "^5.36.1", + "@typescript-eslint/parser": "^5.36.1", "conventional-changelog-cli": "^2.2.2", "cross-env": "^7.0.3", "esbuild": "^0.14.47", "eslint": "^8.23.0", - "eslint-define-config": "^1.6.0", + "eslint-define-config": "^1.7.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", "execa": "^6.1.0", @@ -74,7 +74,7 @@ "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", "playwright-chromium": "^1.25.1", - "pnpm": "^7.9.5", + "pnpm": "^7.11.0", "prettier": "2.7.1", "prompts": "^2.4.2", "resolve": "^1.22.1", @@ -84,13 +84,13 @@ "semver": "^7.3.7", "simple-git-hooks": "^2.8.0", "tslib": "^2.4.0", - "tsx": "^3.8.2", + "tsx": "^3.9.0", "typescript": "^4.6.4", - "unbuild": "^0.8.9", + "unbuild": "^0.8.10", "vite": "workspace:*", - "vitepress": "^1.0.0-alpha.12", - "vitest": "^0.22.1", - "vue": "^3.2.37" + "vitepress": "^1.0.0-alpha.13", + "vitest": "^0.23.1", + "vue": "^3.2.38" }, "simple-git-hooks": { "pre-commit": "pnpm exec lint-staged --concurrent false", @@ -110,7 +110,7 @@ "eslint --cache --fix" ] }, - "packageManager": "pnpm@7.9.5", + "packageManager": "pnpm@7.11.0", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index ce8145c3b7bb8f..7693977472c178 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -12,7 +12,7 @@ "preact": "^10.10.6" }, "devDependencies": { - "@preact/preset-vite": "^2.3.0", + "@preact/preset-vite": "^2.3.1", "typescript": "^4.6.4", "vite": "^3.1.0" } diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index 552532559aaafd..f82ab1d9206030 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -12,7 +12,7 @@ "preact": "^10.10.6" }, "devDependencies": { - "@preact/preset-vite": "^2.3.0", + "@preact/preset-vite": "^2.3.1", "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 097084203ed080..644fb8237ad867 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.0.17", + "@types/react": "^18.0.18", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", "typescript": "^4.6.4", diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index 45ed41a9ced8c8..ad6398aa052314 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -13,7 +13,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.0.17", + "@types/react": "^18.0.18", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", "vite": "^3.1.0" diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index 016cd21519b6a5..dd42c5937717fb 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -10,10 +10,10 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.2", + "@sveltejs/vite-plugin-svelte": "^1.0.5", "@tsconfig/svelte": "^3.0.0", - "svelte": "^3.49.0", - "svelte-check": "^2.8.1", + "svelte": "^3.50.0", + "svelte-check": "^2.9.0", "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index daadafb4cef070..e6cd66218a5059 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -9,8 +9,8 @@ "preview": "vite preview" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.2", - "svelte": "^3.49.0", + "@sveltejs/vite-plugin-svelte": "^1.0.5", + "svelte": "^3.50.0", "vite": "^3.1.0" } } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index 727ea107255221..56a4f4ad3c2651 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -9,12 +9,12 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "^3.1.0", "typescript": "^4.6.4", "vite": "^3.1.0", - "vue-tsc": "^0.40.4" + "vue-tsc": "^0.40.7" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index 1fe94b6fadcb6c..12770e3b800e3a 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "^3.1.0", diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 87268121bf1edf..0696a08e6d0075 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -37,9 +37,9 @@ "dependencies": { "@babel/standalone": "^7.18.13", "core-js": "^3.25.0", - "magic-string": "^0.26.2", + "magic-string": "^0.26.3", "regenerator-runtime": "^0.13.9", - "systemjs": "^6.12.4" + "systemjs": "^6.12.6" }, "peerDependencies": { "terser": "^5.4.0", diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index fc9b1e9464ddec..ce6635d5179e6a 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -44,7 +44,7 @@ "@babel/plugin-transform-react-jsx-development": "^7.18.6", "@babel/plugin-transform-react-jsx-self": "^7.18.6", "@babel/plugin-transform-react-jsx-source": "^7.18.6", - "magic-string": "^0.26.2", + "magic-string": "^0.26.3", "react-refresh": "^0.14.0" }, "peerDependencies": { diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 832baeacb22d6e..af38d881dadba3 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -46,6 +46,6 @@ "slash": "^4.0.0", "source-map": "^0.6.1", "vite": "workspace:*", - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/packages/vite/package.json b/packages/vite/package.json index b929146aee5359..ab59809cb0d833 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -96,13 +96,13 @@ "http-proxy": "^1.18.1", "json5": "^2.2.1", "launch-editor-middleware": "^2.6.0", - "magic-string": "^0.26.2", + "magic-string": "^0.26.3", "micromatch": "^4.0.5", "mlly": "^0.5.14", "mrmime": "^1.0.1", "okie": "^1.0.1", "open": "^8.4.0", - "parse5": "^7.0.0", + "parse5": "^7.1.1", "periscopic": "^3.0.4", "picocolors": "^1.0.0", "postcss-import": "^15.0.0", diff --git a/playground/alias/package.json b/playground/alias/package.json index 4b49ca8d346ebf..332f3ab1450e02 100644 --- a/playground/alias/package.json +++ b/playground/alias/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "aliased-module": "file:./dir/module", - "vue": "^3.2.37", - "@vue/shared": "^3.2.37" + "vue": "^3.2.38", + "@vue/shared": "^3.2.38" }, "devDependencies": { "resolve-linked": "workspace:*" diff --git a/playground/backend-integration/package.json b/playground/backend-integration/package.json index 299ffe9d9920dd..10fd4cde9bd15e 100644 --- a/playground/backend-integration/package.json +++ b/playground/backend-integration/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "devDependencies": { - "sass": "^1.54.5", + "sass": "^1.54.8", "tailwindcss": "^3.1.8", "fast-glob": "^3.2.11" } diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index cdc1d168f2d448..48ab27d966d93f 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -10,8 +10,8 @@ }, "devDependencies": { "less": "^4.1.3", - "magic-string": "^0.26.2", - "sass": "^1.54.5", + "magic-string": "^0.26.3", + "sass": "^1.54.8", "stylus": "^0.59.0" } } diff --git a/playground/css/package.json b/playground/css/package.json index 87e768f5938630..d78392341905a9 100644 --- a/playground/css/package.json +++ b/playground/css/package.json @@ -17,7 +17,7 @@ "fast-glob": "^3.2.11", "less": "^4.1.3", "postcss-nested": "^5.0.6", - "sass": "^1.54.5", + "sass": "^1.54.8", "stylus": "^0.59.0" } } diff --git a/playground/extensions/package.json b/playground/extensions/package.json index 380aaa142fd0c4..a90473c15cfb64 100644 --- a/playground/extensions/package.json +++ b/playground/extensions/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/external/dep-that-imports-vue/package.json b/playground/external/dep-that-imports-vue/package.json index 0fcd4b186a979b..0c9cf889e25c2f 100644 --- a/playground/external/dep-that-imports-vue/package.json +++ b/playground/external/dep-that-imports-vue/package.json @@ -3,6 +3,6 @@ "private": true, "version": "0.0.0", "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/external/dep-that-requires-vue/package.json b/playground/external/dep-that-requires-vue/package.json index a71847a02bb969..759433b6094a55 100644 --- a/playground/external/dep-that-requires-vue/package.json +++ b/playground/external/dep-that-requires-vue/package.json @@ -3,6 +3,6 @@ "private": true, "version": "0.0.0", "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/external/package.json b/playground/external/package.json index 94fdc429ce2b0b..8e3fde96ecdb18 100644 --- a/playground/external/package.json +++ b/playground/external/package.json @@ -14,6 +14,6 @@ }, "devDependencies": { "vite": "workspace:*", - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/json/package.json b/playground/json/package.json index ef60b42ff96971..ee851285a0945c 100644 --- a/playground/json/package.json +++ b/playground/json/package.json @@ -15,6 +15,6 @@ "cross-env": "^7.0.3", "express": "^4.18.1", "json-module": "file:./json-module", - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/multiple-entrypoints/package.json b/playground/multiple-entrypoints/package.json index 88896854311469..8a62eb41c6dbde 100644 --- a/playground/multiple-entrypoints/package.json +++ b/playground/multiple-entrypoints/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "fast-glob": "^3.2.11", - "sass": "^1.54.5" + "sass": "^1.54.8" } } diff --git a/playground/object-hooks/package.json b/playground/object-hooks/package.json index 380aaa142fd0c4..a90473c15cfb64 100644 --- a/playground/object-hooks/package.json +++ b/playground/object-hooks/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/optimize-deps/package.json b/playground/optimize-deps/package.json index 2ece5488da5425..f9254a5e221147 100644 --- a/playground/optimize-deps/package.json +++ b/playground/optimize-deps/package.json @@ -33,7 +33,7 @@ "react-dom": "^18.2.0", "resolve-linked": "workspace:0.0.0", "url": "^0.11.0", - "vue": "^3.2.37", + "vue": "^3.2.38", "vuex": "^4.0.2", "lodash": "^4.17.21", "lodash.clonedeep": "^4.5.0" diff --git a/playground/preload/package.json b/playground/preload/package.json index 07fad09b3b6f3f..ec11ffd6b10599 100644 --- a/playground/preload/package.json +++ b/playground/preload/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37", + "vue": "^3.2.38", "vue-router": "^4.1.5" }, "devDependencies": { diff --git a/playground/react-emotion/package.json b/playground/react-emotion/package.json index bca5d25bc6a3e9..842f7c6402d84e 100644 --- a/playground/react-emotion/package.json +++ b/playground/react-emotion/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "@emotion/react": "^11.10.0", + "@emotion/react": "^11.10.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-switch": "^7.0.0" diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index 16beb1dbcca4bc..5c450d10d62d60 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "example-external-component": "file:example-external-component", - "vue": "^3.2.37", + "vue": "^3.2.38", "vue-router": "^4.1.5", "vuex": "^4.0.2" }, diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json index 1f4246c162273c..0bc57919fdf209 100644 --- a/playground/tailwind/package.json +++ b/playground/tailwind/package.json @@ -11,7 +11,7 @@ "dependencies": { "autoprefixer": "^10.4.8", "tailwindcss": "^3.1.8", - "vue": "^3.2.37", + "vue": "^3.2.38", "vue-router": "^4.1.5" }, "devDependencies": { diff --git a/playground/vue-jsx/package.json b/playground/vue-jsx/package.json index af84606ab64eea..8d376c526a9bde 100644 --- a/playground/vue-jsx/package.json +++ b/playground/vue-jsx/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/vue-legacy/package.json b/playground/vue-legacy/package.json index 201a5ae47bb293..9a6267fc79c842 100644 --- a/playground/vue-legacy/package.json +++ b/playground/vue-legacy/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/vue-lib/package.json b/playground/vue-lib/package.json index c10f1729c5a71a..e593d30981e3b6 100644 --- a/playground/vue-lib/package.json +++ b/playground/vue-lib/package.json @@ -8,7 +8,7 @@ "build-consumer": "vite build --config ./vite.config.consumer.ts" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*" diff --git a/playground/vue-server-origin/package.json b/playground/vue-server-origin/package.json index 8d379e3ee194d1..754c4122af8a18 100644 --- a/playground/vue-server-origin/package.json +++ b/playground/vue-server-origin/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*" diff --git a/playground/vue-sourcemap/package.json b/playground/vue-sourcemap/package.json index db8ae355815d52..f140a473affb2e 100644 --- a/playground/vue-sourcemap/package.json +++ b/playground/vue-sourcemap/package.json @@ -12,9 +12,9 @@ "@vitejs/plugin-vue": "workspace:*", "less": "^4.1.3", "postcss-nested": "^5.0.6", - "sass": "^1.54.5" + "sass": "^1.54.8" }, "dependencies": { - "vue": "^3.2.37" + "vue": "^3.2.38" } } diff --git a/playground/vue/package.json b/playground/vue/package.json index ae3f05e966bfdc..7ef2fe5d69c4d4 100644 --- a/playground/vue/package.json +++ b/playground/vue/package.json @@ -10,14 +10,14 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "vue": "^3.2.37" + "vue": "^3.2.38" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", "js-yaml": "^4.1.0", "less": "^4.1.3", "pug": "^3.0.2", - "sass": "^1.54.5", + "sass": "^1.54.8", "stylus": "^0.59.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c27045e25270e..dfd5fe3955fc31 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,7 +11,7 @@ importers: .: specifiers: '@babel/types': ^7.18.13 - '@microsoft/api-extractor': ^7.29.5 + '@microsoft/api-extractor': ^7.30.0 '@rollup/plugin-typescript': ^8.4.0 '@types/babel__core': ^7.1.19 '@types/babel__standalone': ^7.1.4 @@ -31,13 +31,13 @@ importers: '@types/semver': ^7.3.12 '@types/stylus': ^0.48.38 '@types/ws': ^8.5.3 - '@typescript-eslint/eslint-plugin': ^5.35.1 - '@typescript-eslint/parser': ^5.35.1 + '@typescript-eslint/eslint-plugin': ^5.36.1 + '@typescript-eslint/parser': ^5.36.1 conventional-changelog-cli: ^2.2.2 cross-env: ^7.0.3 esbuild: ^0.14.47 eslint: ^8.23.0 - eslint-define-config: ^1.6.0 + eslint-define-config: ^1.7.0 eslint-plugin-import: ^2.26.0 eslint-plugin-node: ^11.1.0 execa: ^6.1.0 @@ -48,7 +48,7 @@ importers: npm-run-all: ^4.1.5 picocolors: ^1.0.0 playwright-chromium: ^1.25.1 - pnpm: ^7.9.5 + pnpm: ^7.11.0 prettier: 2.7.1 prompts: ^2.4.2 resolve: ^1.22.1 @@ -58,16 +58,16 @@ importers: semver: ^7.3.7 simple-git-hooks: ^2.8.0 tslib: ^2.4.0 - tsx: ^3.8.2 + tsx: ^3.9.0 typescript: ^4.6.4 - unbuild: ^0.8.9 + unbuild: ^0.8.10 vite: workspace:* - vitepress: ^1.0.0-alpha.12 - vitest: ^0.22.1 - vue: ^3.2.37 + vitepress: ^1.0.0-alpha.13 + vitest: ^0.23.1 + vue: ^3.2.38 devDependencies: '@babel/types': 7.18.13 - '@microsoft/api-extractor': 7.29.5 + '@microsoft/api-extractor': 7.30.0 '@rollup/plugin-typescript': 8.4.0_7emp2e44zzc74lnyjhc37gdv4y '@types/babel__core': 7.1.19 '@types/babel__standalone': 7.1.4 @@ -87,14 +87,14 @@ importers: '@types/semver': 7.3.12 '@types/stylus': 0.48.38 '@types/ws': 8.5.3 - '@typescript-eslint/eslint-plugin': 5.35.1_hy4by47wjjtoupqk2r7jy5xf2e - '@typescript-eslint/parser': 5.35.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/eslint-plugin': 5.36.1_g2qdd2k5igsxhudjjarcmw5o7e + '@typescript-eslint/parser': 5.36.1_pyvvhc3zqdua4akflcggygkl44 conventional-changelog-cli: 2.2.2 cross-env: 7.0.3 esbuild: 0.14.47 eslint: 8.23.0 - eslint-define-config: 1.6.0 - eslint-plugin-import: 2.26.0_kavhtzjob4obuugpatbfgsyfbm + eslint-define-config: 1.7.0 + eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 eslint-plugin-node: 11.1.0_eslint@8.23.0 execa: 6.1.0 fast-glob: 3.2.11 @@ -104,7 +104,7 @@ importers: npm-run-all: 4.1.5 picocolors: 1.0.0 playwright-chromium: 1.25.1 - pnpm: 7.9.5 + pnpm: 7.11.0 prettier: 2.7.1 prompts: 2.4.2 resolve: 1.22.1 @@ -114,13 +114,13 @@ importers: semver: 7.3.7 simple-git-hooks: 2.8.0 tslib: 2.4.0 - tsx: 3.8.2 + tsx: 3.9.0 typescript: 4.6.4 - unbuild: 0.8.9 + unbuild: 0.8.10 vite: link:packages/vite - vitepress: 1.0.0-alpha.12 - vitest: 0.22.1 - vue: 3.2.37 + vitepress: 1.0.0-alpha.13 + vitest: 0.23.1 + vue: 3.2.38 packages/create-vite: specifiers: @@ -139,16 +139,16 @@ importers: '@babel/core': ^7.18.13 '@babel/standalone': ^7.18.13 core-js: ^3.25.0 - magic-string: ^0.26.2 + magic-string: ^0.26.3 regenerator-runtime: ^0.13.9 - systemjs: ^6.12.4 + systemjs: ^6.12.6 vite: workspace:* dependencies: '@babel/standalone': 7.18.13 core-js: 3.25.0 - magic-string: 0.26.2 + magic-string: 0.26.3 regenerator-runtime: 0.13.9 - systemjs: 6.12.4 + systemjs: 6.12.6 devDependencies: '@babel/core': 7.18.13 vite: link:../vite @@ -160,7 +160,7 @@ importers: '@babel/plugin-transform-react-jsx-development': ^7.18.6 '@babel/plugin-transform-react-jsx-self': ^7.18.6 '@babel/plugin-transform-react-jsx-source': ^7.18.6 - magic-string: ^0.26.2 + magic-string: ^0.26.3 react-refresh: ^0.14.0 vite: workspace:* dependencies: @@ -169,7 +169,7 @@ importers: '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.18.13 '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.18.13 '@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.18.13 - magic-string: 0.26.2 + magic-string: 0.26.3 react-refresh: 0.14.0 devDependencies: vite: link:../vite @@ -183,7 +183,7 @@ importers: slash: ^4.0.0 source-map: ^0.6.1 vite: workspace:* - vue: ^3.2.37 + vue: ^3.2.38 devDependencies: '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.15 @@ -192,7 +192,7 @@ importers: slash: 4.0.0 source-map: 0.6.1 vite: link:../vite - vue: 3.2.37 + vue: 3.2.38 packages/plugin-vue-jsx: specifiers: @@ -242,13 +242,13 @@ importers: http-proxy: ^1.18.1 json5: ^2.2.1 launch-editor-middleware: ^2.6.0 - magic-string: ^0.26.2 + magic-string: ^0.26.3 micromatch: ^4.0.5 mlly: ^0.5.14 mrmime: ^1.0.1 okie: ^1.0.1 open: ^8.4.0 - parse5: ^7.0.0 + parse5: ^7.1.1 periscopic: ^3.0.4 picocolors: ^1.0.0 postcss: ^8.4.16 @@ -305,13 +305,13 @@ importers: http-proxy: 1.18.1_debug@4.3.4 json5: 2.2.1 launch-editor-middleware: 2.6.0 - magic-string: 0.26.2 + magic-string: 0.26.3 micromatch: 4.0.5 mlly: 0.5.14 mrmime: 1.0.1 okie: 1.0.1 open: 8.4.0 - parse5: 7.0.0 + parse5: 7.1.1 periscopic: 3.0.4 picocolors: 1.0.0 postcss-import: 15.0.0_postcss@8.4.16 @@ -345,14 +345,14 @@ importers: playground/alias: specifiers: - '@vue/shared': ^3.2.37 + '@vue/shared': ^3.2.38 aliased-module: file:./dir/module resolve-linked: workspace:* - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - '@vue/shared': 3.2.37 + '@vue/shared': 3.2.38 aliased-module: file:playground/alias/dir/module - vue: 3.2.37 + vue: 3.2.38 devDependencies: resolve-linked: link:../resolve-linked @@ -368,11 +368,11 @@ importers: playground/backend-integration: specifiers: fast-glob: ^3.2.11 - sass: ^1.54.5 + sass: ^1.54.8 tailwindcss: ^3.1.8 devDependencies: fast-glob: 3.2.11 - sass: 1.54.5 + sass: 1.54.8 tailwindcss: 3.1.8 playground/build-old: @@ -391,7 +391,7 @@ importers: fast-glob: ^3.2.11 less: ^4.1.3 postcss-nested: ^5.0.6 - sass: ^1.54.5 + sass: ^1.54.8 stylus: ^0.59.0 devDependencies: css-dep: link:css-dep @@ -399,7 +399,7 @@ importers: fast-glob: 3.2.11 less: 4.1.3 postcss-nested: 5.0.6 - sass: 1.54.5 + sass: 1.54.8 stylus: 0.59.0 playground/css-codesplit: @@ -411,13 +411,13 @@ importers: playground/css-sourcemap: specifiers: less: ^4.1.3 - magic-string: ^0.26.2 - sass: ^1.54.5 + magic-string: ^0.26.3 + sass: ^1.54.8 stylus: ^0.59.0 devDependencies: less: 4.1.3 - magic-string: 0.26.2 - sass: 1.54.5 + magic-string: 0.26.3 + sass: 1.54.8 stylus: 0.59.0 playground/css/css-dep: @@ -467,34 +467,34 @@ importers: playground/extensions: specifiers: - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 playground/external: specifiers: '@vitejs/dep-that-imports-vue': file:./dep-that-imports-vue '@vitejs/dep-that-requires-vue': file:./dep-that-requires-vue vite: workspace:* - vue: ^3.2.37 + vue: ^3.2.38 dependencies: '@vitejs/dep-that-imports-vue': file:playground/external/dep-that-imports-vue '@vitejs/dep-that-requires-vue': file:playground/external/dep-that-requires-vue devDependencies: vite: link:../../packages/vite - vue: 3.2.37 + vue: 3.2.38 playground/external/dep-that-imports-vue: specifiers: - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 playground/external/dep-that-requires-vue: specifiers: - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 playground/file-delete-restore: specifiers: @@ -536,12 +536,12 @@ importers: cross-env: ^7.0.3 express: ^4.18.1 json-module: file:./json-module - vue: ^3.2.37 + vue: ^3.2.38 devDependencies: cross-env: 7.0.3 express: 4.18.1 json-module: file:playground/json/json-module - vue: 3.2.37 + vue: 3.2.38 playground/json/json-module: specifiers: {} @@ -565,10 +565,10 @@ importers: playground/multiple-entrypoints: specifiers: fast-glob: ^3.2.11 - sass: ^1.54.5 + sass: ^1.54.8 devDependencies: fast-glob: 3.2.11 - sass: 1.54.5 + sass: 1.54.8 playground/nested-deps: specifiers: @@ -621,9 +621,9 @@ importers: playground/object-hooks: specifiers: - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 playground/optimize-deps: specifiers: @@ -654,7 +654,7 @@ importers: react-dom: ^18.2.0 resolve-linked: workspace:0.0.0 url: ^0.11.0 - vue: ^3.2.37 + vue: ^3.2.38 vuex: ^4.0.2 dependencies: added-in-entries: file:playground/optimize-deps/added-in-entries @@ -683,8 +683,8 @@ importers: react-dom: 18.2.0_react@18.2.0 resolve-linked: link:../resolve-linked url: 0.11.0 - vue: 3.2.37 - vuex: 4.0.2_vue@3.2.37 + vue: 3.2.38 + vuex: 4.0.2_vue@3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -775,11 +775,11 @@ importers: dep-a: file:./dep-a dep-including-a: file:./dep-including-a terser: ^5.15.0 - vue: ^3.2.37 + vue: ^3.2.38 vue-router: ^4.1.5 dependencies: - vue: 3.2.37 - vue-router: 4.1.5_vue@3.2.37 + vue: 3.2.38 + vue-router: 4.1.5_vue@3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue dep-a: file:playground/preload/dep-a @@ -832,13 +832,13 @@ importers: specifiers: '@babel/plugin-proposal-pipeline-operator': ^7.18.9 '@emotion/babel-plugin': ^11.10.2 - '@emotion/react': ^11.10.0 + '@emotion/react': ^11.10.4 '@vitejs/plugin-react': workspace:* react: ^18.2.0 react-dom: ^18.2.0 react-switch: ^7.0.0 dependencies: - '@emotion/react': 11.10.0_react@18.2.0 + '@emotion/react': 11.10.4_react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 react-switch: 7.0.0_biqbaboplfbrettd7655fr4n2y @@ -1110,14 +1110,14 @@ importers: example-external-component: file:example-external-component express: ^4.18.1 serve-static: ^1.15.0 - vue: ^3.2.37 + vue: ^3.2.38 vue-router: ^4.1.5 vuex: ^4.0.2 dependencies: example-external-component: file:playground/ssr-vue/example-external-component - vue: 3.2.37 - vue-router: 4.1.5_vue@3.2.37 - vuex: 4.0.2_vue@3.2.37 + vue: 3.2.38 + vue-router: 4.1.5_vue@3.2.38 + vuex: 4.0.2_vue@3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -1152,13 +1152,13 @@ importers: autoprefixer: ^10.4.8 tailwindcss: ^3.1.8 ts-node: ^10.9.1 - vue: ^3.2.37 + vue: ^3.2.38 vue-router: ^4.1.5 dependencies: autoprefixer: 10.4.8 tailwindcss: 3.1.8_ts-node@10.9.1 - vue: 3.2.37 - vue-router: 4.1.5_vue@3.2.37 + vue: 3.2.38 + vue-router: 4.1.5_vue@3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue ts-node: 10.9.1 @@ -1182,27 +1182,27 @@ importers: less: ^4.1.3 lodash-es: ^4.17.21 pug: ^3.0.2 - sass: ^1.54.5 + sass: ^1.54.8 stylus: ^0.59.0 - vue: ^3.2.37 + vue: ^3.2.38 dependencies: lodash-es: 4.17.21 - vue: 3.2.37 + vue: 3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue js-yaml: 4.1.0 less: 4.1.3 pug: 3.0.2 - sass: 1.54.5 + sass: 1.54.8 stylus: 0.59.0 playground/vue-jsx: specifiers: '@vitejs/plugin-vue': workspace:* '@vitejs/plugin-vue-jsx': workspace:* - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -1211,9 +1211,9 @@ importers: specifiers: '@vitejs/plugin-legacy': workspace:* '@vitejs/plugin-vue': workspace:* - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 devDependencies: '@vitejs/plugin-legacy': link:../../packages/plugin-legacy '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1221,18 +1221,18 @@ importers: playground/vue-lib: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue playground/vue-server-origin: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.37 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1241,15 +1241,15 @@ importers: '@vitejs/plugin-vue': workspace:* less: ^4.1.3 postcss-nested: ^5.0.6 - sass: ^1.54.5 - vue: ^3.2.37 + sass: ^1.54.8 + vue: ^3.2.38 dependencies: - vue: 3.2.37 + vue: 3.2.38 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue less: 4.1.3 postcss-nested: 5.0.6 - sass: 1.54.5 + sass: 1.54.8 playground/wasm: specifiers: {} @@ -1393,7 +1393,7 @@ packages: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.17.9 + '@babel/highlight': 7.18.6 dev: true /@babel/code-frame/7.18.6: @@ -1411,29 +1411,6 @@ packages: resolution: {integrity: sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==} engines: {node: '>=6.9.0'} - /@babel/core/7.18.10: - resolution: {integrity: sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.12 - '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 - '@babel/helper-module-transforms': 7.18.9 - '@babel/helpers': 7.18.9 - '@babel/parser': 7.18.11 - '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.13 - convert-source-map: 1.8.0 - debug: 4.3.4 - gensync: 1.0.0-beta.2 - json5: 2.2.1 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/core/7.18.13: resolution: {integrity: sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==} engines: {node: '>=6.9.0'} @@ -1479,15 +1456,6 @@ packages: - supports-color dev: true - /@babel/generator/7.18.12: - resolution: {integrity: sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.18.13 - '@jridgewell/gen-mapping': 0.3.2 - jsesc: 2.5.2 - dev: true - /@babel/generator/7.18.13: resolution: {integrity: sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==} engines: {node: '>=6.9.0'} @@ -1509,7 +1477,7 @@ packages: resolution: {integrity: sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 dev: false @@ -1534,19 +1502,6 @@ packages: semver: 6.3.0 dev: true - /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.10: - resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/compat-data': 7.18.8 - '@babel/core': 7.18.10 - '@babel/helper-validator-option': 7.18.6 - browserslist: 4.21.3 - semver: 6.3.0 - dev: true - /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} engines: {node: '>=6.9.0'} @@ -1648,7 +1603,7 @@ packages: '@babel/helper-module-imports': 7.16.7 '@babel/helper-simple-access': 7.17.7 '@babel/helper-split-export-declaration': 7.16.7 - '@babel/helper-validator-identifier': 7.16.7 + '@babel/helper-validator-identifier': 7.18.6 '@babel/template': 7.16.7 '@babel/traverse': 7.18.5 '@babel/types': 7.18.13 @@ -1738,6 +1693,7 @@ packages: /@babel/helper-validator-identifier/7.16.7: resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==} engines: {node: '>=6.9.0'} + dev: true /@babel/helper-validator-identifier/7.18.6: resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} @@ -1773,15 +1729,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/highlight/7.17.9: - resolution: {integrity: sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.16.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} @@ -1795,7 +1742,7 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 /@babel/parser/7.18.13: resolution: {integrity: sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==} @@ -1810,13 +1757,14 @@ packages: hasBin: true dependencies: '@babel/types': 7.18.4 + dev: true /@babel/parser/7.18.9: resolution: {integrity: sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: false /@babel/plugin-proposal-pipeline-operator/7.18.9: @@ -1943,28 +1891,15 @@ packages: - supports-color dev: false - /@babel/runtime/7.18.3: - resolution: {integrity: sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.9 - dev: false - /@babel/runtime/7.18.9: resolution: {integrity: sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 - /@babel/standalone/7.18.12: - resolution: {integrity: sha512-wDh3K5IUJiSMAY0MLYBFoCaj2RCZwvDz5BHn2uHat9KOsGWEVDFgFQFIOO+81Js2phFKNppLC45iOCsZVfJniw==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/standalone/7.18.13: resolution: {integrity: sha512-5hjvvFkaXyfQri+s4CAZtx6FTKclfTNd2QN2RwgzCVJhnYYgKh4YFBCnNJSxurzvpSKD2NmpCkoWAkMc+j9y+g==} engines: {node: '>=6.9.0'} - dev: false /@babel/template/7.16.7: resolution: {integrity: sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==} @@ -2000,24 +1935,6 @@ packages: - supports-color dev: false - /@babel/traverse/7.18.11: - resolution: {integrity: sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.12 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.18.9 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.18.11 - '@babel/types': 7.18.13 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/traverse/7.18.13: resolution: {integrity: sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==} engines: {node: '>=6.9.0'} @@ -2045,7 +1962,7 @@ packages: '@babel/helper-function-name': 7.17.9 '@babel/helper-hoist-variables': 7.16.7 '@babel/helper-split-export-declaration': 7.16.7 - '@babel/parser': 7.18.5 + '@babel/parser': 7.18.13 '@babel/types': 7.18.13 debug: 4.3.4 globals: 11.12.0 @@ -2077,6 +1994,7 @@ packages: dependencies: '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 + dev: false /@babel/types/7.18.10: resolution: {integrity: sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==} @@ -2100,6 +2018,7 @@ packages: dependencies: '@babel/helper-validator-identifier': 7.16.7 to-fast-properties: 2.0.0 + dev: true /@cloudflare/workers-types/2.2.2: resolution: {integrity: sha512-kaMn2rueJ0PL1TYVGknTCh0X0x0d9G+FNXAFep7/4uqecEZoQb/63o6rOmMuiqI09zLuHV6xhKRXinokV/MY9A==} @@ -2183,8 +2102,8 @@ packages: /@emotion/memoize/0.8.0: resolution: {integrity: sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==} - /@emotion/react/11.10.0_react@18.2.0: - resolution: {integrity: sha512-K6z9zlHxxBXwN8TcpwBKcEsBsOw4JWCCmR+BeeOWgqp8GIU1yA2Odd41bwdAAr0ssbQrbJbVnndvv7oiv1bZeQ==} + /@emotion/react/11.10.4_react@18.2.0: + resolution: {integrity: sha512-j0AkMpr6BL8gldJZ6XQsQ8DnS9TxEQu1R+OGmDZiWjBAJtCcbt0tS3I/YffoqHXxH6MjgI7KdMbYKw3MEiU9eA==} peerDependencies: '@babel/core': ^7.0.0 '@types/react': '*' @@ -2199,6 +2118,7 @@ packages: '@emotion/babel-plugin': 11.10.2 '@emotion/cache': 11.10.0 '@emotion/serialize': 1.1.0 + '@emotion/use-insertion-effect-with-fallbacks': 1.0.0_react@18.2.0 '@emotion/utils': 1.2.0 '@emotion/weak-memoize': 0.3.0 hoist-non-react-statics: 3.3.2 @@ -2221,6 +2141,14 @@ packages: /@emotion/unitless/0.8.0: resolution: {integrity: sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==} + /@emotion/use-insertion-effect-with-fallbacks/1.0.0_react@18.2.0: + resolution: {integrity: sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A==} + peerDependencies: + react: '>=16.8.0' + dependencies: + react: 18.2.0 + dev: false + /@emotion/utils/1.2.0: resolution: {integrity: sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw==} @@ -2249,22 +2177,12 @@ packages: get-tsconfig: 4.1.0 dev: true - /@esbuild/linux-loong64/0.15.5: - resolution: {integrity: sha512-UHkDFCfSGTuXq08oQltXxSZmH1TXyWsL+4QhZDWvvLl6mEJQqk3u7/wq1LjhrrAXYIllaTtRSzUXl4Olkf2J8A==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /@esbuild/linux-loong64/0.15.6: resolution: {integrity: sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true - dev: false optional: true /@eslint/eslintrc/1.3.1: @@ -2396,19 +2314,19 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model/7.23.3: - resolution: {integrity: sha512-HpsWzG6jrWHrTlIg53kmp/IVQPBHUZc+8dunnr9VXrmDjVBehaXxp9A6jhTQ/bd7W1m5TYfAvwCmseC1+9FCuA==} + /@microsoft/api-extractor-model/7.24.0: + resolution: {integrity: sha512-lFzF5h+quTyVB7eaKJkqrbQRDGSkrHzXyF8iMVvHdlaNrodGeyhtQeBFDuRVvBXTW2ILBiOV6ZWwUM1eGKcD+A==} dependencies: '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 '@rushstack/node-core-library': 3.51.1 dev: true - /@microsoft/api-extractor/7.29.5: - resolution: {integrity: sha512-+vqO/TAGw9xXANpvTjA4y5ADcaRuYuBoJ9IfoAHubrGuxKG6GoW3P2tfdgwteLz95CnlftBxYp+3NG/mf05P9Q==} + /@microsoft/api-extractor/7.30.0: + resolution: {integrity: sha512-XmtvrW74SzGvv59cjNC6+TE13XbIm4qrKKZtveoFRNbKdyTR4eIqnLmPvh1fgfolSF+iKfXlHHsQJpcgwdNztA==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.23.3 + '@microsoft/api-extractor-model': 7.24.0 '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 '@rushstack/node-core-library': 3.51.1 @@ -2504,6 +2422,16 @@ packages: slash: 3.0.0 dev: true + /@rollup/plugin-alias/3.1.9_rollup@2.79.0: + resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} + engines: {node: '>=8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + rollup: 2.79.0 + slash: 3.0.0 + dev: true + /@rollup/plugin-commonjs/22.0.2_rollup@2.78.0: resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} engines: {node: '>= 12.0.0'} @@ -2520,6 +2448,22 @@ packages: rollup: 2.78.0 dev: true + /@rollup/plugin-commonjs/22.0.2_rollup@2.79.0: + resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} + engines: {node: '>= 12.0.0'} + peerDependencies: + rollup: ^2.68.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.0 + commondir: 1.0.1 + estree-walker: 2.0.2 + glob: 7.2.0 + is-reference: 1.2.1 + magic-string: 0.25.9 + resolve: 1.22.1 + rollup: 2.79.0 + dev: true + /@rollup/plugin-dynamic-import-vars/1.4.4_rollup@2.78.0: resolution: {integrity: sha512-51BcU6ag9EeF09CtEsa5D/IHYo7KI42TR1Jc4doNzV1nHAiH7TvUi5vsLERFMjs9Gzy9K0otbZH/2wb0hpBhRA==} engines: {node: '>= 10.0.0'} @@ -2542,6 +2486,15 @@ packages: rollup: 2.78.0 dev: true + /@rollup/plugin-json/4.1.0_rollup@2.79.0: + resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} + peerDependencies: + rollup: ^1.20.0 || ^2.0.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.0 + rollup: 2.79.0 + dev: true + /@rollup/plugin-node-resolve/13.3.0_rollup@2.78.0: resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} engines: {node: '>= 10.0.0'} @@ -2557,14 +2510,29 @@ packages: rollup: 2.78.0 dev: true - /@rollup/plugin-replace/4.0.0_rollup@2.78.0: + /@rollup/plugin-node-resolve/13.3.0_rollup@2.79.0: + resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.42.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.79.0 + '@types/resolve': 1.17.1 + deepmerge: 4.2.2 + is-builtin-module: 3.1.0 + is-module: 1.0.0 + resolve: 1.22.1 + rollup: 2.79.0 + dev: true + + /@rollup/plugin-replace/4.0.0_rollup@2.79.0: resolution: {integrity: sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==} peerDependencies: rollup: ^1.20.0 || ^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.78.0 + '@rollup/pluginutils': 3.1.0_rollup@2.79.0 magic-string: 0.25.9 - rollup: 2.78.0 + rollup: 2.79.0 dev: true /@rollup/plugin-typescript/8.4.0_7emp2e44zzc74lnyjhc37gdv4y: @@ -2614,6 +2582,18 @@ packages: rollup: 2.78.0 dev: true + /@rollup/pluginutils/3.1.0_rollup@2.79.0: + resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@types/estree': 0.0.39 + estree-walker: 1.0.1 + picomatch: 2.3.1 + rollup: 2.79.0 + dev: true + /@rollup/pluginutils/4.2.1: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} @@ -2853,8 +2833,8 @@ packages: '@types/node': 17.0.42 dev: true - /@typescript-eslint/eslint-plugin/5.35.1_hy4by47wjjtoupqk2r7jy5xf2e: - resolution: {integrity: sha512-RBZZXZlI4XCY4Wzgy64vB+0slT9+yAPQRjj/HSaRwUot33xbDjF1oN9BLwOLTewoOI0jothIltZRe9uJCHf8gg==} + /@typescript-eslint/eslint-plugin/5.36.1_g2qdd2k5igsxhudjjarcmw5o7e: + resolution: {integrity: sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2864,10 +2844,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.35.1_pyvvhc3zqdua4akflcggygkl44 - '@typescript-eslint/scope-manager': 5.35.1 - '@typescript-eslint/type-utils': 5.35.1_pyvvhc3zqdua4akflcggygkl44 - '@typescript-eslint/utils': 5.35.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/parser': 5.36.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/type-utils': 5.36.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/utils': 5.36.1_pyvvhc3zqdua4akflcggygkl44 debug: 4.3.4 eslint: 8.23.0 functional-red-black-tree: 1.0.1 @@ -2880,8 +2860,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.35.1_pyvvhc3zqdua4akflcggygkl44: - resolution: {integrity: sha512-XL2TBTSrh3yWAsMYpKseBYTVpvudNf69rPOWXWVBI08My2JVT5jR66eTt4IgQFHA/giiKJW5dUD4x/ZviCKyGg==} + /@typescript-eslint/parser/5.36.1_pyvvhc3zqdua4akflcggygkl44: + resolution: {integrity: sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2890,9 +2870,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.35.1 - '@typescript-eslint/types': 5.35.1 - '@typescript-eslint/typescript-estree': 5.35.1_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.6.4 debug: 4.3.4 eslint: 8.23.0 typescript: 4.6.4 @@ -2900,16 +2880,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.35.1: - resolution: {integrity: sha512-kCYRSAzIW9ByEIzmzGHE50NGAvAP3wFTaZevgWva7GpquDyFPFcmvVkFJGWJJktg/hLwmys/FZwqM9EKr2u24Q==} + /@typescript-eslint/scope-manager/5.36.1: + resolution: {integrity: sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.35.1 - '@typescript-eslint/visitor-keys': 5.35.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/visitor-keys': 5.36.1 dev: true - /@typescript-eslint/type-utils/5.35.1_pyvvhc3zqdua4akflcggygkl44: - resolution: {integrity: sha512-8xT8ljvo43Mp7BiTn1vxLXkjpw8wS4oAc00hMSB4L1/jIiYbjjnc3Qp2GAUOG/v8zsNCd1qwcqfCQ0BuishHkw==} + /@typescript-eslint/type-utils/5.36.1_pyvvhc3zqdua4akflcggygkl44: + resolution: {integrity: sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2918,7 +2898,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.35.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.6.4 + '@typescript-eslint/utils': 5.36.1_pyvvhc3zqdua4akflcggygkl44 debug: 4.3.4 eslint: 8.23.0 tsutils: 3.21.0_typescript@4.6.4 @@ -2927,13 +2908,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.35.1: - resolution: {integrity: sha512-FDaujtsH07VHzG0gQ6NDkVVhi1+rhq0qEvzHdJAQjysN+LHDCKDKCBRlZFFE0ec0jKxiv0hN63SNfExy0KrbQQ==} + /@typescript-eslint/types/5.36.1: + resolution: {integrity: sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.35.1_typescript@4.6.4: - resolution: {integrity: sha512-JUqE1+VRTGyoXlDWWjm6MdfpBYVq+hixytrv1oyjYIBEOZhBCwtpp5ZSvBt4wIA1MKWlnaC2UXl2XmYGC3BoQA==} + /@typescript-eslint/typescript-estree/5.36.1_typescript@4.6.4: + resolution: {integrity: sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2941,8 +2922,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.35.1 - '@typescript-eslint/visitor-keys': 5.35.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/visitor-keys': 5.36.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -2953,16 +2934,16 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.35.1_pyvvhc3zqdua4akflcggygkl44: - resolution: {integrity: sha512-v6F8JNXgeBWI4pzZn36hT2HXXzoBBBJuOYvoQiaQaEEjdi5STzux3Yj8v7ODIpx36i/5s8TdzuQ54TPc5AITQQ==} + /@typescript-eslint/utils/5.36.1_pyvvhc3zqdua4akflcggygkl44: + resolution: {integrity: sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.35.1 - '@typescript-eslint/types': 5.35.1 - '@typescript-eslint/typescript-estree': 5.35.1_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.6.4 eslint: 8.23.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.23.0 @@ -2971,11 +2952,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.35.1: - resolution: {integrity: sha512-cEB1DvBVo1bxbW/S5axbGPE6b7FIMAbo3w+AGq6zNDA7+NYJOIkKj/sInfTv4edxd4PxJSgdN4t6/pbvgA+n5g==} + /@typescript-eslint/visitor-keys/5.36.1: + resolution: {integrity: sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.35.1 + '@typescript-eslint/types': 5.36.1 eslint-visitor-keys: 3.3.0 dev: true @@ -3000,39 +2981,39 @@ packages: - supports-color dev: false - /@vue/compiler-core/3.2.37: - resolution: {integrity: sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==} + /@vue/compiler-core/3.2.38: + resolution: {integrity: sha512-/FsvnSu7Z+lkd/8KXMa4yYNUiqQrI22135gfsQYVGuh5tqEgOB0XqrUdb/KnCLa5+TmQLPwvyUnKMyCpu+SX3Q==} dependencies: - '@babel/parser': 7.18.5 - '@vue/shared': 3.2.37 + '@babel/parser': 7.18.13 + '@vue/shared': 3.2.38 estree-walker: 2.0.2 source-map: 0.6.1 - /@vue/compiler-dom/3.2.37: - resolution: {integrity: sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==} + /@vue/compiler-dom/3.2.38: + resolution: {integrity: sha512-zqX4FgUbw56kzHlgYuEEJR8mefFiiyR3u96498+zWPsLeh1WKvgIReoNE+U7gG8bCUdvsrJ0JRmev0Ky6n2O0g==} dependencies: - '@vue/compiler-core': 3.2.37 - '@vue/shared': 3.2.37 + '@vue/compiler-core': 3.2.38 + '@vue/shared': 3.2.38 - /@vue/compiler-sfc/3.2.37: - resolution: {integrity: sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==} + /@vue/compiler-sfc/3.2.38: + resolution: {integrity: sha512-KZjrW32KloMYtTcHAFuw3CqsyWc5X6seb8KbkANSWt3Cz9p2qA8c1GJpSkksFP9ABb6an0FLCFl46ZFXx3kKpg==} dependencies: - '@babel/parser': 7.18.5 - '@vue/compiler-core': 3.2.37 - '@vue/compiler-dom': 3.2.37 - '@vue/compiler-ssr': 3.2.37 - '@vue/reactivity-transform': 3.2.37 - '@vue/shared': 3.2.37 + '@babel/parser': 7.18.13 + '@vue/compiler-core': 3.2.38 + '@vue/compiler-dom': 3.2.38 + '@vue/compiler-ssr': 3.2.38 + '@vue/reactivity-transform': 3.2.38 + '@vue/shared': 3.2.38 estree-walker: 2.0.2 magic-string: 0.25.9 - postcss: 8.4.14 + postcss: 8.4.16 source-map: 0.6.1 - /@vue/compiler-ssr/3.2.37: - resolution: {integrity: sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==} + /@vue/compiler-ssr/3.2.38: + resolution: {integrity: sha512-bm9jOeyv1H3UskNm4S6IfueKjUNFmi2kRweFIGnqaGkkRePjwEcfCVqyS3roe7HvF4ugsEkhf4+kIvDhip6XzQ==} dependencies: - '@vue/compiler-dom': 3.2.37 - '@vue/shared': 3.2.37 + '@vue/compiler-dom': 3.2.38 + '@vue/shared': 3.2.38 /@vue/devtools-api/6.1.4: resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==} @@ -3041,52 +3022,52 @@ packages: /@vue/devtools-api/6.2.1: resolution: {integrity: sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==} - /@vue/reactivity-transform/3.2.37: - resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==} + /@vue/reactivity-transform/3.2.38: + resolution: {integrity: sha512-3SD3Jmi1yXrDwiNJqQ6fs1x61WsDLqVk4NyKVz78mkaIRh6d3IqtRnptgRfXn+Fzf+m6B1KxBYWq1APj6h4qeA==} dependencies: - '@babel/parser': 7.18.5 - '@vue/compiler-core': 3.2.37 - '@vue/shared': 3.2.37 + '@babel/parser': 7.18.13 + '@vue/compiler-core': 3.2.38 + '@vue/shared': 3.2.38 estree-walker: 2.0.2 magic-string: 0.25.9 - /@vue/reactivity/3.2.37: - resolution: {integrity: sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==} + /@vue/reactivity/3.2.38: + resolution: {integrity: sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==} dependencies: - '@vue/shared': 3.2.37 + '@vue/shared': 3.2.38 - /@vue/runtime-core/3.2.37: - resolution: {integrity: sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==} + /@vue/runtime-core/3.2.38: + resolution: {integrity: sha512-kk0qiSiXUU/IKxZw31824rxmFzrLr3TL6ZcbrxWTKivadoKupdlzbQM4SlGo4MU6Zzrqv4fzyUasTU1jDoEnzg==} dependencies: - '@vue/reactivity': 3.2.37 - '@vue/shared': 3.2.37 + '@vue/reactivity': 3.2.38 + '@vue/shared': 3.2.38 - /@vue/runtime-dom/3.2.37: - resolution: {integrity: sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==} + /@vue/runtime-dom/3.2.38: + resolution: {integrity: sha512-4PKAb/ck2TjxdMSzMsnHViOrrwpudk4/A56uZjhzvusoEU9xqa5dygksbzYepdZeB5NqtRw5fRhWIiQlRVK45A==} dependencies: - '@vue/runtime-core': 3.2.37 - '@vue/shared': 3.2.37 + '@vue/runtime-core': 3.2.38 + '@vue/shared': 3.2.38 csstype: 2.6.20 - /@vue/server-renderer/3.2.37_vue@3.2.37: - resolution: {integrity: sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==} + /@vue/server-renderer/3.2.38_vue@3.2.38: + resolution: {integrity: sha512-pg+JanpbOZ5kEfOZzO2bt02YHd+ELhYP8zPeLU1H0e7lg079NtuuSB8fjLdn58c4Ou8UQ6C1/P+528nXnLPAhA==} peerDependencies: - vue: 3.2.37 + vue: 3.2.38 dependencies: - '@vue/compiler-ssr': 3.2.37 - '@vue/shared': 3.2.37 - vue: 3.2.37 + '@vue/compiler-ssr': 3.2.38 + '@vue/shared': 3.2.38 + vue: 3.2.38 - /@vue/shared/3.2.37: - resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} + /@vue/shared/3.2.38: + resolution: {integrity: sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==} - /@vueuse/core/9.1.0_vue@3.2.37: + /@vueuse/core/9.1.0_vue@3.2.38: resolution: {integrity: sha512-BIroqvXEqt826aE9r3K5cox1zobuPuAzdYJ36kouC2TVhlXvFKIILgFVWrpp9HZPwB3aLzasmG3K87q7TSyXZg==} dependencies: '@types/web-bluetooth': 0.0.15 '@vueuse/metadata': 9.1.0 - '@vueuse/shared': 9.1.0_vue@3.2.37 - vue-demi: 0.13.1_vue@3.2.37 + '@vueuse/shared': 9.1.0_vue@3.2.38 + vue-demi: 0.13.1_vue@3.2.38 transitivePeerDependencies: - '@vue/composition-api' - vue @@ -3096,10 +3077,10 @@ packages: resolution: {integrity: sha512-8OEhlog1iaAGTD3LICZ8oBGQdYeMwByvXetOtAOZCJOzyCRSwqwdggTsmVZZ1rkgYIEqgUBk942AsAPwM21s6A==} dev: true - /@vueuse/shared/9.1.0_vue@3.2.37: + /@vueuse/shared/9.1.0_vue@3.2.38: resolution: {integrity: sha512-pB/3njQu4tfJJ78ajELNda0yMG6lKfpToQW7Soe09CprF1k3QuyoNi1tBNvo75wBDJWD+LOnr+c4B5HZ39jY/Q==} dependencies: - vue-demi: 0.13.1_vue@3.2.37 + vue-demi: 0.13.1_vue@3.2.38 transitivePeerDependencies: - '@vue/composition-api' - vue @@ -3395,7 +3376,7 @@ packages: resolution: {integrity: sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==} engines: {node: '>= 10.0.0'} dependencies: - '@babel/types': 7.17.10 + '@babel/types': 7.18.13 dev: true /balanced-match/1.0.2: @@ -3634,7 +3615,7 @@ packages: fast-glob: 3.2.11 helpertypes: 0.0.2 reserved-words: 0.1.2 - resolve: 1.22.0 + resolve: 1.22.1 typescript: 4.6.4 dev: true @@ -3819,8 +3800,8 @@ packages: /constantinople/4.0.1: resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==} dependencies: - '@babel/parser': 7.18.5 - '@babel/types': 7.17.10 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 dev: true /content-disposition/0.5.4: @@ -4333,8 +4314,8 @@ packages: engines: {node: '>= 0.8'} dev: true - /entities/4.3.1: - resolution: {integrity: sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==} + /entities/4.4.0: + resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} engines: {node: '>=0.12'} dev: true @@ -4452,22 +4433,12 @@ packages: dev: true optional: true - /esbuild-android-64/0.15.5: - resolution: {integrity: sha512-dYPPkiGNskvZqmIK29OPxolyY3tp+c47+Fsc2WYSOVjEPWNCHNyqhtFqQadcXMJDQt8eN0NMDukbyQgFcHquXg==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - /esbuild-android-64/0.15.6: resolution: {integrity: sha512-Z1CHSgB1crVQi2LKSBwSkpaGtaloVz0ZIYcRMsvHc3uSXcR/x5/bv9wcZspvH/25lIGTaViosciS/NS09ERmVA==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true - dev: false optional: true /esbuild-android-arm64/0.14.47: @@ -4488,22 +4459,12 @@ packages: dev: true optional: true - /esbuild-android-arm64/0.15.5: - resolution: {integrity: sha512-YyEkaQl08ze3cBzI/4Cm1S+rVh8HMOpCdq8B78JLbNFHhzi4NixVN93xDrHZLztlocEYqi45rHHCgA8kZFidFg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - /esbuild-android-arm64/0.15.6: resolution: {integrity: sha512-mvM+gqNxqKm2pCa3dnjdRzl7gIowuc4ga7P7c3yHzs58Im8v/Lfk1ixSgQ2USgIywT48QWaACRa3F4MG7djpSw==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true - dev: false optional: true /esbuild-darwin-64/0.14.47: @@ -4524,22 +4485,12 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.15.5: - resolution: {integrity: sha512-Cr0iIqnWKx3ZTvDUAzG0H/u9dWjLE4c2gTtRLz4pqOBGjfjqdcZSfAObFzKTInLLSmD0ZV1I/mshhPoYSBMMCQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /esbuild-darwin-64/0.15.6: resolution: {integrity: sha512-BsfVt3usScAfGlXJiGtGamwVEOTM8AiYiw1zqDWhGv6BncLXCnTg1As+90mxWewdTZKq3iIy8s9g8CKkrrAXVw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true - dev: false optional: true /esbuild-darwin-arm64/0.14.47: @@ -4560,22 +4511,12 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.15.5: - resolution: {integrity: sha512-WIfQkocGtFrz7vCu44ypY5YmiFXpsxvz2xqwe688jFfSVCnUsCn2qkEVDo7gT8EpsLOz1J/OmqjExePL1dr1Kg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /esbuild-darwin-arm64/0.15.6: resolution: {integrity: sha512-CnrAeJaEpPakUobhqO4wVSA4Zm6TPaI5UY4EsI62j9mTrjIyQPXA1n4Ju6Iu5TVZRnEqV6q8blodgYJ6CJuwCA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true - dev: false optional: true /esbuild-freebsd-64/0.14.47: @@ -4596,22 +4537,12 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.15.5: - resolution: {integrity: sha512-M5/EfzV2RsMd/wqwR18CELcenZ8+fFxQAAEO7TJKDmP3knhWSbD72ILzrXFMMwshlPAS1ShCZ90jsxkm+8FlaA==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /esbuild-freebsd-64/0.15.6: resolution: {integrity: sha512-+qFdmqi+jkAsxsNJkaWVrnxEUUI50nu6c3MBVarv3RCDCbz7ZS1a4ZrdkwEYFnKcVWu6UUE0Kkb1SQ1yGEG6sg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true - dev: false optional: true /esbuild-freebsd-arm64/0.14.47: @@ -4632,22 +4563,12 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.15.5: - resolution: {integrity: sha512-2JQQ5Qs9J0440F/n/aUBNvY6lTo4XP/4lt1TwDfHuo0DY3w5++anw+jTjfouLzbJmFFiwmX7SmUhMnysocx96w==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /esbuild-freebsd-arm64/0.15.6: resolution: {integrity: sha512-KtQkQOhnNciXm2yrTYZMD3MOm2zBiiwFSU+dkwNbcfDumzzUprr1x70ClTdGuZwieBS1BM/k0KajRQX7r504Xw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true - dev: false optional: true /esbuild-linux-32/0.14.47: @@ -4668,22 +4589,12 @@ packages: dev: true optional: true - /esbuild-linux-32/0.15.5: - resolution: {integrity: sha512-gO9vNnIN0FTUGjvTFucIXtBSr1Woymmx/aHQtuU+2OllGU6YFLs99960UD4Dib1kFovVgs59MTXwpFdVoSMZoQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-32/0.15.6: resolution: {integrity: sha512-IAkDNz3TpxwISTGVdQijwyHBZrbFgLlRi5YXcvaEHtgbmayLSDcJmH5nV1MFgo/x2QdKcHBkOYHdjhKxUAcPwg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-64/0.14.47: @@ -4704,22 +4615,12 @@ packages: dev: true optional: true - /esbuild-linux-64/0.15.5: - resolution: {integrity: sha512-ne0GFdNLsm4veXbTnYAWjbx3shpNKZJUd6XpNbKNUZaNllDZfYQt0/zRqOg0sc7O8GQ+PjSMv9IpIEULXVTVmg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-64/0.15.6: resolution: {integrity: sha512-gQPksyrEYfA4LJwyfTQWAZaVZCx4wpaLrSzo2+Xc9QLC+i/sMWmX31jBjrn4nLJCd79KvwCinto36QC7BEIU/A==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-arm/0.14.47: @@ -4740,22 +4641,12 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.15.5: - resolution: {integrity: sha512-wvAoHEN+gJ/22gnvhZnS/+2H14HyAxM07m59RSLn3iXrQsdS518jnEWRBnJz3fR6BJa+VUTo0NxYjGaNt7RA7Q==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-arm/0.15.6: resolution: {integrity: sha512-xZ0Bq2aivsthDjA/ytQZzxrxIZbG0ATJYMJxNeOIBc1zUjpbVpzBKgllOZMsTSXMHFHGrow6TnCcgwqY0+oEoQ==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-arm64/0.14.47: @@ -4776,22 +4667,12 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.15.5: - resolution: {integrity: sha512-7EgFyP2zjO065XTfdCxiXVEk+f83RQ1JsryN1X/VSX2li9rnHAt2swRbpoz5Vlrl6qjHrCmq5b6yxD13z6RheA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-arm64/0.15.6: resolution: {integrity: sha512-aovDkclFa6C9EdZVBuOXxqZx83fuoq8097xZKhEPSygwuy4Lxs8J4anHG7kojAsR+31lfUuxzOo2tHxv7EiNHA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-mips64le/0.14.47: @@ -4812,22 +4693,12 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.15.5: - resolution: {integrity: sha512-KdnSkHxWrJ6Y40ABu+ipTZeRhFtc8dowGyFsZY5prsmMSr1ZTG9zQawguN4/tunJ0wy3+kD54GaGwdcpwWAvZQ==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-mips64le/0.15.6: resolution: {integrity: sha512-wVpW8wkWOGizsCqCwOR/G3SHwhaecpGy3fic9BF1r7vq4djLjUcA8KunDaBCjJ6TgLQFhJ98RjDuyEf8AGjAvw==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-ppc64le/0.14.47: @@ -4848,22 +4719,12 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.15.5: - resolution: {integrity: sha512-QdRHGeZ2ykl5P0KRmfGBZIHmqcwIsUKWmmpZTOq573jRWwmpfRmS7xOhmDHBj9pxv+6qRMH8tLr2fe+ZKQvCYw==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-ppc64le/0.15.6: resolution: {integrity: sha512-z6w6gsPH/Y77uchocluDC8tkCg9rfkcPTePzZKNr879bF4tu7j9t255wuNOCE396IYEGxY7y8u2HJ9i7kjCLVw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-riscv64/0.14.47: @@ -4884,22 +4745,12 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.15.5: - resolution: {integrity: sha512-p+WE6RX+jNILsf+exR29DwgV6B73khEQV0qWUbzxaycxawZ8NE0wA6HnnTxbiw5f4Gx9sJDUBemh9v49lKOORA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-riscv64/0.15.6: resolution: {integrity: sha512-pfK/3MJcmbfU399TnXW5RTPS1S+ID6ra+CVj9TFZ2s0q9Ja1F5A1VirUUvViPkjiw+Kq3zveyn6U09Wg1zJXrw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-linux-s390x/0.14.47: @@ -4920,22 +4771,12 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.15.5: - resolution: {integrity: sha512-J2ngOB4cNzmqLHh6TYMM/ips8aoZIuzxJnDdWutBw5482jGXiOzsPoEF4j2WJ2mGnm7FBCO4StGcwzOgic70JQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-s390x/0.15.6: resolution: {integrity: sha512-OZeeDu32liefcwAE63FhVqM4heWTC8E3MglOC7SK0KYocDdY/6jyApw0UDkDHlcEK9mW6alX/SH9r3PDjcCo/Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true - dev: false optional: true /esbuild-netbsd-64/0.14.47: @@ -4956,22 +4797,12 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.15.5: - resolution: {integrity: sha512-MmKUYGDizYjFia0Rwt8oOgmiFH7zaYlsoQ3tIOfPxOqLssAsEgG0MUdRDm5lliqjiuoog8LyDu9srQk5YwWF3w==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - /esbuild-netbsd-64/0.15.6: resolution: {integrity: sha512-kaxw61wcHMyiEsSsi5ut1YYs/hvTC2QkxJwyRvC2Cnsz3lfMLEu8zAjpBKWh9aU/N0O/gsRap4wTur5GRuSvBA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true - dev: false optional: true /esbuild-openbsd-64/0.14.47: @@ -4992,22 +4823,12 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.15.5: - resolution: {integrity: sha512-2mMFfkLk3oPWfopA9Plj4hyhqHNuGyp5KQyTT9Rc8hFd8wAn5ZrbJg+gNcLMo2yzf8Uiu0RT6G9B15YN9WQyMA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - /esbuild-openbsd-64/0.15.6: resolution: {integrity: sha512-CuoY60alzYfIZapUHqFXqXbj88bbRJu8Fp9okCSHRX2zWIcGz4BXAHXiG7dlCye5nFVrY72psesLuWdusyf2qw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true - dev: false optional: true /esbuild-sunos-64/0.14.47: @@ -5028,22 +4849,12 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.15.5: - resolution: {integrity: sha512-2sIzhMUfLNoD+rdmV6AacilCHSxZIoGAU2oT7XmJ0lXcZWnCvCtObvO6D4puxX9YRE97GodciRGDLBaiC6x1SA==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - /esbuild-sunos-64/0.15.6: resolution: {integrity: sha512-1ceefLdPWcd1nW/ZLruPEYxeUEAVX0YHbG7w+BB4aYgfknaLGotI/ZvPWUZpzhC8l1EybrVlz++lm3E6ODIJOg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true - dev: false optional: true /esbuild-windows-32/0.14.47: @@ -5064,22 +4875,12 @@ packages: dev: true optional: true - /esbuild-windows-32/0.15.5: - resolution: {integrity: sha512-e+duNED9UBop7Vnlap6XKedA/53lIi12xv2ebeNS4gFmu7aKyTrok7DPIZyU5w/ftHD4MUDs5PJUkQPP9xJRzg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - /esbuild-windows-32/0.15.6: resolution: {integrity: sha512-pBqdOsKqCD5LRYiwF29PJRDJZi7/Wgkz46u3d17MRFmrLFcAZDke3nbdDa1c8YgY78RiemudfCeAemN8EBlIpA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true - dev: false optional: true /esbuild-windows-64/0.14.47: @@ -5100,22 +4901,12 @@ packages: dev: true optional: true - /esbuild-windows-64/0.15.5: - resolution: {integrity: sha512-v+PjvNtSASHOjPDMIai9Yi+aP+Vwox+3WVdg2JB8N9aivJ7lyhp4NVU+J0MV2OkWFPnVO8AE/7xH+72ibUUEnw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /esbuild-windows-64/0.15.6: resolution: {integrity: sha512-KpPOh4aTOo//g9Pk2oVAzXMpc9Sz9n5A9sZTmWqDSXCiiachfFhbuFlsKBGATYCVitXfmBIJ4nNYYWSOdz4hQg==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true - dev: false optional: true /esbuild-windows-arm64/0.14.47: @@ -5136,22 +4927,12 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.15.5: - resolution: {integrity: sha512-Yz8w/D8CUPYstvVQujByu6mlf48lKmXkq6bkeSZZxTA626efQOJb26aDGLzmFWx6eg/FwrXgt6SZs9V8Pwy/aA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /esbuild-windows-arm64/0.15.6: resolution: {integrity: sha512-DB3G2x9OvFEa00jV+OkDBYpufq5x/K7a6VW6E2iM896DG4ZnAvJKQksOsCPiM1DUaa+DrijXAQ/ZOcKAqf/3Hg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true - dev: false optional: true /esbuild/0.14.47: @@ -5210,35 +4991,6 @@ packages: esbuild-windows-arm64: 0.14.50 dev: true - /esbuild/0.15.5: - resolution: {integrity: sha512-VSf6S1QVqvxfIsSKb3UKr3VhUCis7wgDbtF4Vd9z84UJr05/Sp2fRKmzC+CSPG/dNAPPJZ0BTBLTT1Fhd6N9Gg==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/linux-loong64': 0.15.5 - esbuild-android-64: 0.15.5 - esbuild-android-arm64: 0.15.5 - esbuild-darwin-64: 0.15.5 - esbuild-darwin-arm64: 0.15.5 - esbuild-freebsd-64: 0.15.5 - esbuild-freebsd-arm64: 0.15.5 - esbuild-linux-32: 0.15.5 - esbuild-linux-64: 0.15.5 - esbuild-linux-arm: 0.15.5 - esbuild-linux-arm64: 0.15.5 - esbuild-linux-mips64le: 0.15.5 - esbuild-linux-ppc64le: 0.15.5 - esbuild-linux-riscv64: 0.15.5 - esbuild-linux-s390x: 0.15.5 - esbuild-netbsd-64: 0.15.5 - esbuild-openbsd-64: 0.15.5 - esbuild-sunos-64: 0.15.5 - esbuild-windows-32: 0.15.5 - esbuild-windows-64: 0.15.5 - esbuild-windows-arm64: 0.15.5 - dev: true - /esbuild/0.15.6: resolution: {integrity: sha512-sgLOv3l4xklvXzzczhRwKRotyrfyZ2i1fCS6PTOLPd9wevDPArGU8HFtHrHCOcsMwTjLjzGm15gvC8uxVzQf+w==} engines: {node: '>=12'} @@ -5266,7 +5018,6 @@ packages: esbuild-windows-32: 0.15.6 esbuild-windows-64: 0.15.6 esbuild-windows-arm64: 0.15.6 - dev: false /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -5284,8 +5035,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-define-config/1.6.0: - resolution: {integrity: sha512-3qulYnwDRGYQHXHGdXBSRcfpI7m37ilBoERzTUYI8fBUoK/46yfUVNkGwM9cF/aoBrGgIDcBSz/HyPQJTHI/+w==} + /eslint-define-config/1.7.0: + resolution: {integrity: sha512-13zk8z8eKO4tpPMvAGV0sa6ok0XuMeu7Zhcizu2bLwcLy1fbNt7/h8PU1wbp9IoIgQETggZJozU0nPXUXOao2g==} engines: {node: '>= 14.6.0', npm: '>= 6.0.0', pnpm: '>= 7.0.0'} dev: true @@ -5298,7 +5049,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.3_v26d7mdxwhyqykunawffqp7s2m: + /eslint-module-utils/2.7.3_632zrvmnhpkgiajg2zqauquf6u: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -5316,7 +5067,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.35.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/parser': 5.36.1_pyvvhc3zqdua4akflcggygkl44 debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -5335,7 +5086,7 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_kavhtzjob4obuugpatbfgsyfbm: + /eslint-plugin-import/2.26.0_wyxuyzvlfep3lsyoibc4fosfq4: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -5345,14 +5096,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.35.1_pyvvhc3zqdua4akflcggygkl44 + '@typescript-eslint/parser': 5.36.1_pyvvhc3zqdua4akflcggygkl44 array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.23.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_v26d7mdxwhyqykunawffqp7s2m + eslint-module-utils: 2.7.3_632zrvmnhpkgiajg2zqauquf6u has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -6064,7 +5815,7 @@ packages: /history/5.3.0: resolution: {integrity: sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==} dependencies: - '@babel/runtime': 7.18.3 + '@babel/runtime': 7.18.9 dev: false /hoist-non-react-statics/3.3.2: @@ -6073,8 +5824,8 @@ packages: react-is: 16.13.1 dev: false - /hookable/5.1.1: - resolution: {integrity: sha512-7qam9XBFb+DijNBthaL1k/7lHU2TEMZkWSyuqmU3sCQze1wFm5w9AlEx30PD7a+QVAjOy6Ec2goFwe1YVyk2uA==} + /hookable/5.3.0: + resolution: {integrity: sha512-4gTA2q08HT8G32uIW7Jpro3rSXgT2ZTM8R6+r7H7joq90eZlqFPPTvHD6w8WZUohIrbXbDperL96ilb6dkNxNw==} dev: true /hosted-git-info/2.8.9: @@ -6776,8 +6527,8 @@ packages: dependencies: sourcemap-codec: 1.4.8 - /magic-string/0.26.2: - resolution: {integrity: sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==} + /magic-string/0.26.3: + resolution: {integrity: sha512-u1Po0NDyFcwdg2nzHT88wSK0+Rih0N1M+Ph1Sp08k8yvFFU3KR72wryS7e1qMPJypt99WB7fIFVCA92mQrMjrg==} engines: {node: '>=12'} dependencies: sourcemap-codec: 1.4.8 @@ -6981,7 +6732,7 @@ packages: engines: {node: '>=10'} hasBin: true - /mkdist/0.3.13_typescript@4.7.4: + /mkdist/0.3.13_typescript@4.8.2: resolution: {integrity: sha512-+eCPpkr8l2X630y5PIlkts2tzYEsb+aGIgXdrQv9ZGtWE2bLlD6kVIFfI6FJwFpjjw4dPPyorxQc6Uhm/oXlvg==} hasBin: true peerDependencies: @@ -6997,7 +6748,7 @@ packages: jiti: 1.14.0 mri: 1.2.0 pathe: 0.2.0 - typescript: 4.7.4 + typescript: 4.8.2 dev: true /mlly/0.5.14: @@ -7409,10 +7160,10 @@ packages: engines: {node: '>= 0.10'} dev: true - /parse5/7.0.0: - resolution: {integrity: sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==} + /parse5/7.1.1: + resolution: {integrity: sha512-kwpuwzB+px5WUg9pyK0IcK/shltJN5/OVhQagxhCQNtT9Y9QRZqNY2e1cmbu/paRh5LMnz/oVTVLBpjFmMZhSg==} dependencies: - entities: 4.3.1 + entities: 4.4.0 dev: true /parseurl/1.3.3: @@ -7547,8 +7298,8 @@ packages: hasBin: true dev: true - /pnpm/7.9.5: - resolution: {integrity: sha512-+r7+PlBIsblqia8eUOUsBp/R+lHmGAm55jyQRt3DWMUI0srVR1aNJhQECfx24L53Ckz9g48mVxQXEniQMWQPmw==} + /pnpm/7.11.0: + resolution: {integrity: sha512-cxh4TfCE8L4ZbLBN72kTGKTYP7X08nrIzoQ2rQCKihAcIHAdNIgsk4bEJyE1xHjE+bNJt9skwr7aJv3LpvUawQ==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -8192,22 +7943,22 @@ packages: dependencies: glob: 7.2.0 - /rollup-plugin-dts/4.2.2_nm5mlcuxlwr6samvke7b2fz27i: + /rollup-plugin-dts/4.2.2_id3sp2lbl4kx3dskm7teaj32um: resolution: {integrity: sha512-A3g6Rogyko/PXeKoUlkjxkP++8UDVpgA7C+Tdl77Xj4fgEaIjPSnxRmR53EzvoYy97VMVwLAOcWJudaVAuxneQ==} engines: {node: '>=v12.22.11'} peerDependencies: rollup: ^2.55 typescript: ^4.1 dependencies: - magic-string: 0.26.2 - rollup: 2.78.0 - typescript: 4.7.4 + magic-string: 0.26.3 + rollup: 2.79.0 + typescript: 4.8.2 optionalDependencies: '@babel/code-frame': 7.18.6 dev: true - /rollup-plugin-esbuild/4.9.3_g2b53jqudjimruv6spqg4ieafm: - resolution: {integrity: sha512-bxfUNYTa9Tw/4kdFfT9gtidDtqXyRdCW11ctZM7D8houCCVqp5qHzQF7hhIr31rqMA0APbG47fgVbbCGXgM49Q==} + /rollup-plugin-esbuild/4.10.1_ajqsvouysgwbbwdvvze7lmgc4q: + resolution: {integrity: sha512-/ymcRB283zjFp1JTBXO8ekxv0c9vRc2L6OTljghsLthQ4vqeDSDWa9BVz1tHiVrx6SbUnUpDPLC0K/MXK7j5TA==} engines: {node: '>=12'} peerDependencies: esbuild: '>=0.10.1' @@ -8216,10 +7967,10 @@ packages: '@rollup/pluginutils': 4.2.1 debug: 4.3.4 es-module-lexer: 0.9.3 - esbuild: 0.15.5 + esbuild: 0.15.6 joycon: 3.1.1 jsonc-parser: 3.1.0 - rollup: 2.78.0 + rollup: 2.79.0 transitivePeerDependencies: - supports-color dev: true @@ -8233,7 +7984,7 @@ packages: commenting: 1.1.0 glob: 7.2.0 lodash: 4.17.21 - magic-string: 0.26.2 + magic-string: 0.26.3 mkdirp: 1.0.4 moment: 2.29.3 package-name-regex: 2.0.6 @@ -8249,6 +8000,14 @@ packages: optionalDependencies: fsevents: 2.3.2 + /rollup/2.79.0: + resolution: {integrity: sha512-x4KsrCgwQ7ZJPcFA/SUu6QVcYlO7uRLfLAy0DSA4NS2eG8japdbpM50ToH7z4iObodRYOJ0soneF0iaQRJ6zhA==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -8276,8 +8035,8 @@ packages: truncate-utf8-bytes: 1.0.2 dev: true - /sass/1.54.5: - resolution: {integrity: sha512-p7DTOzxkUPa/63FU0R3KApkRHwcVZYC0PLnLm5iyZACyp15qSi32x7zVUhRdABAATmkALqgGrjCJAcWvobmhHw==} + /sass/1.54.8: + resolution: {integrity: sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==} engines: {node: '>=12.0.0'} hasBin: true dependencies: @@ -8732,8 +8491,8 @@ packages: resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=} dev: false - /systemjs/6.12.4: - resolution: {integrity: sha512-ha/j+KULJmavOQY3ZQ5vQ5Qp4Y9uf+lWL5ulrC7FqbhKsIyEyPDOTkHYSSKSVTwN9HimZYc0UN7rwVVK+HKwwA==} + /systemjs/6.12.6: + resolution: {integrity: sha512-SawLiWya8/uNR4p12OggSYZ35tP4U4QTpfV57DdZEOPr6+J6zlLSeeEpMmzYTEoBAsMhctdEE+SWJUDYX4EaKw==} dev: false /tailwindcss/3.1.8: @@ -8863,6 +8622,11 @@ packages: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} dev: false + /tinybench/2.1.4: + resolution: {integrity: sha512-NFWIw2Gg7EUPdeE8nL1Dc7AMVlk7sOr2PmSNKVuQrZ0YwTOFoshPQ+hcLrgnhK8dTP3FWMCJaf4N+/hXp6lKPw==} + engines: {node: '>=16.0.0'} + dev: true + /tinypool/0.2.4: resolution: {integrity: sha512-Vs3rhkUH6Qq1t5bqtb816oT+HeJTXfwt2cbPH17sWHIYKTotQIFPk3tf2fgqRrVyMDVOc1EnPgzIxfIulXVzwQ==} engines: {node: '>=14.0.0'} @@ -8985,8 +8749,8 @@ packages: typescript: 4.6.4 dev: true - /tsx/3.8.2: - resolution: {integrity: sha512-Jf9izq3Youry5aEarspf6Gm+v/IE2A2xP7YVhtNH1VSCpM0jjACg7C3oD5rIoLBfXWGJSZj4KKC2bwE0TgLb2Q==} + /tsx/3.9.0: + resolution: {integrity: sha512-ofxsE+qjqCYYq4UBt5khglvb+ESgxef1YpuNcdQI92kvcAT2tZVrnSK3g4bRXTUhLmKHcC5q8vIZA47os/stng==} hasBin: true dependencies: '@esbuild-kit/cjs-loader': 2.3.3 @@ -9061,6 +8825,12 @@ packages: hasBin: true dev: true + /typescript/4.8.2: + resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /typeson-registry/1.0.0-alpha.39: resolution: {integrity: sha512-NeGDEquhw+yfwNhguLPcZ9Oj0fzbADiX4R0WxvoY8nGhy98IbzQy1sezjoEFWOywOboj/DWehI+/aUlRVrJnnw==} engines: {node: '>=10.0.0'} @@ -9100,38 +8870,38 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unbuild/0.8.9: - resolution: {integrity: sha512-LCFL/V3Y0UDxal6MNvSTGuyOnTAha467oTCRURZqj4zaW1r/kTDeVNkA9OdP8J/bnsxr0CvkdjRjlvv/K3o7Yw==} + /unbuild/0.8.10: + resolution: {integrity: sha512-i9VPStkM59dBLFNpeED1G2+EQuR8Tb35yErNxlo5WVDN0zAlE9PHgK5JilX/73sZD9381BTe28H8U/dgXsMvSA==} hasBin: true dependencies: - '@rollup/plugin-alias': 3.1.9_rollup@2.78.0 - '@rollup/plugin-commonjs': 22.0.2_rollup@2.78.0 - '@rollup/plugin-json': 4.1.0_rollup@2.78.0 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.78.0 - '@rollup/plugin-replace': 4.0.0_rollup@2.78.0 + '@rollup/plugin-alias': 3.1.9_rollup@2.79.0 + '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.0 + '@rollup/plugin-json': 4.1.0_rollup@2.79.0 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.0 + '@rollup/plugin-replace': 4.0.0_rollup@2.79.0 '@rollup/pluginutils': 4.2.1 chalk: 5.0.1 consola: 2.15.3 defu: 6.1.0 - esbuild: 0.15.5 + esbuild: 0.15.6 globby: 13.1.2 - hookable: 5.1.1 + hookable: 5.3.0 jiti: 1.14.0 - magic-string: 0.26.2 + magic-string: 0.26.3 mkdirp: 1.0.4 - mkdist: 0.3.13_typescript@4.7.4 + mkdist: 0.3.13_typescript@4.8.2 mlly: 0.5.14 mri: 1.2.0 pathe: 0.3.5 pkg-types: 0.3.4 pretty-bytes: 6.0.0 rimraf: 3.0.2 - rollup: 2.78.0 - rollup-plugin-dts: 4.2.2_nm5mlcuxlwr6samvke7b2fz27i - rollup-plugin-esbuild: 4.9.3_g2b53jqudjimruv6spqg4ieafm + rollup: 2.79.0 + rollup-plugin-dts: 4.2.2_id3sp2lbl4kx3dskm7teaj32um + rollup-plugin-esbuild: 4.10.1_ajqsvouysgwbbwdvvze7lmgc4q scule: 0.3.2 - typescript: 4.7.4 - untyped: 0.4.5 + typescript: 4.8.2 + untyped: 0.4.7 transitivePeerDependencies: - supports-color dev: true @@ -9151,11 +8921,11 @@ packages: engines: {node: '>= 0.8'} dev: true - /untyped/0.4.5: - resolution: {integrity: sha512-buq9URfOj4xAnVfu6BYNKzHZLHAzsCbHsDc/kHy66ESMqRpj00oD9qWf2M2qm0pC0DigsVxRF3uhOa5HJtrwGA==} + /untyped/0.4.7: + resolution: {integrity: sha512-hBgCv7fnqIRzAagn2cUZxxVmhTE7NcMAgI8CfQelFVacG4O55VrurigpK0G504ph4sQSqVsGEo52O5EKFCnJ9g==} dependencies: - '@babel/core': 7.18.10 - '@babel/standalone': 7.18.12 + '@babel/core': 7.18.13 + '@babel/standalone': 7.18.13 '@babel/types': 7.18.13 scule: 0.3.2 transitivePeerDependencies: @@ -9223,19 +8993,19 @@ packages: engines: {node: '>= 0.8'} dev: true - /vitepress/1.0.0-alpha.12: - resolution: {integrity: sha512-++e7p9oxqk7RKz2fMNtrOAWmZSWVPozDuOG1owwntPRincC8/pIhPkJ9ojNHcHCHBylszJBsjkRqbseurZ7vCg==} + /vitepress/1.0.0-alpha.13: + resolution: {integrity: sha512-gCbKb+6o0g5wHt2yyqBPk7FcvrB+MfwGtg1JMS5p99GTQR87l3b7symCl8o1ecv7MDXwJ2mPB8ZrYNLnQAJxLQ==} hasBin: true dependencies: '@docsearch/css': 3.2.1 '@docsearch/js': 3.2.1 '@vitejs/plugin-vue': link:packages/plugin-vue '@vue/devtools-api': 6.2.1 - '@vueuse/core': 9.1.0_vue@3.2.37 + '@vueuse/core': 9.1.0_vue@3.2.38 body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 vite: link:packages/vite - vue: 3.2.37 + vue: 3.2.38 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -9244,8 +9014,8 @@ packages: - react-dom dev: true - /vitest/0.22.1: - resolution: {integrity: sha512-+x28YTnSLth4KbXg7MCzoDAzPJlJex7YgiZbUh6YLp0/4PqVZ7q7/zyfdL0OaPtKTpNiQFPpMC8Y2MSzk8F7dw==} + /vitest/0.23.1: + resolution: {integrity: sha512-kn9pG+h6VA3yj/xRvwgLKEd33rOlzMqJEg3tl5HSm3WUPlkY1Lr1FK8RN1uIqVKvFxmz6HGU3EQW+xW2kazRkQ==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -9272,6 +9042,8 @@ packages: chai: 4.3.6 debug: 4.3.4 local-pkg: 0.4.2 + strip-literal: 0.4.0 + tinybench: 2.1.4 tinypool: 0.2.4 tinyspy: 1.0.2 vite: link:packages/vite @@ -9292,7 +9064,7 @@ packages: resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==} dev: true - /vue-demi/0.13.1_vue@3.2.37: + /vue-demi/0.13.1_vue@3.2.38: resolution: {integrity: sha512-xmkJ56koG3ptpLnpgmIzk9/4nFf4CqduSJbUM0OdPoU87NwRuZ6x49OLhjSa/fC15fV+5CbEnrxU4oyE022svg==} engines: {node: '>=12'} hasBin: true @@ -9304,34 +9076,34 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.2.37 + vue: 3.2.38 dev: true - /vue-router/4.1.5_vue@3.2.37: + /vue-router/4.1.5_vue@3.2.38: resolution: {integrity: sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==} peerDependencies: vue: ^3.2.0 dependencies: '@vue/devtools-api': 6.2.1 - vue: 3.2.37 + vue: 3.2.38 dev: false - /vue/3.2.37: - resolution: {integrity: sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==} + /vue/3.2.38: + resolution: {integrity: sha512-hHrScEFSmDAWL0cwO4B6WO7D3sALZPbfuThDsGBebthrNlDxdJZpGR3WB87VbjpPh96mep1+KzukYEhpHDFa8Q==} dependencies: - '@vue/compiler-dom': 3.2.37 - '@vue/compiler-sfc': 3.2.37 - '@vue/runtime-dom': 3.2.37 - '@vue/server-renderer': 3.2.37_vue@3.2.37 - '@vue/shared': 3.2.37 + '@vue/compiler-dom': 3.2.38 + '@vue/compiler-sfc': 3.2.38 + '@vue/runtime-dom': 3.2.38 + '@vue/server-renderer': 3.2.38_vue@3.2.38 + '@vue/shared': 3.2.38 - /vuex/4.0.2_vue@3.2.37: + /vuex/4.0.2_vue@3.2.38: resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==} peerDependencies: vue: ^3.0.2 dependencies: '@vue/devtools-api': 6.1.4 - vue: 3.2.37 + vue: 3.2.38 dev: false /web-streams-polyfill/3.2.1: @@ -9409,8 +9181,8 @@ packages: resolution: {integrity: sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==} engines: {node: '>= 10.0.0'} dependencies: - '@babel/parser': 7.18.5 - '@babel/types': 7.17.10 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 dev: true @@ -9569,7 +9341,7 @@ packages: name: '@vitejs/dep-that-imports-vue' version: 0.0.0 dependencies: - vue: 3.2.37 + vue: 3.2.38 dev: false file:playground/external/dep-that-requires-vue: @@ -9577,7 +9349,7 @@ packages: name: '@vitejs/dep-that-requires-vue' version: 0.0.0 dependencies: - vue: 3.2.37 + vue: 3.2.38 dev: false file:playground/import-assertion/import-assertion-dep: From 9c1be108bfb1eac3dbbe432214349153d8b9ed5e Mon Sep 17 00:00:00 2001 From: musicq Date: Tue, 6 Sep 2022 05:06:18 +0800 Subject: [PATCH 141/311] refactor: config hook helper function (#9982) --- packages/vite/src/node/config.ts | 43 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 4fb0fcc9a15a93..829c47fee07abf 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -442,16 +442,7 @@ export async function resolveConfig( // run config hooks const userPlugins = [...prePlugins, ...normalPlugins, ...postPlugins] - for (const p of getSortedPluginsByHook('config', userPlugins)) { - const hook = p.config - const handler = hook && 'handler' in hook ? hook.handler : hook - if (handler) { - const res = await handler(config, configEnv) - if (res) { - config = mergeConfig(config, res) - } - } - } + config = await runConfigHook(config, userPlugins, configEnv) if (process.env.VITE_TEST_WITHOUT_PLUGIN_COMMONJS) { config = mergeConfig(config, { @@ -611,16 +602,7 @@ export async function resolveConfig( ...workerNormalPlugins, ...workerPostPlugins ] - for (const p of getSortedPluginsByHook('config', workerUserPlugins)) { - const hook = p.config - const handler = hook && 'handler' in hook ? hook.handler : hook - if (handler) { - const res = await handler(workerConfig, configEnv) - if (res) { - workerConfig = mergeConfig(workerConfig, res) - } - } - } + workerConfig = await runConfigHook(workerConfig, workerUserPlugins, configEnv) const resolvedWorkerOptions: ResolveWorkerOptions = { format: workerConfig.worker?.format || 'iife', plugins: [], @@ -1089,6 +1071,27 @@ async function loadConfigFromBundledFile( } } +async function runConfigHook( + config: InlineConfig, + plugins: Plugin[], + configEnv: ConfigEnv +): Promise { + let conf = config + + for (const p of getSortedPluginsByHook('config', plugins)) { + const hook = p.config + const handler = hook && 'handler' in hook ? hook.handler : hook + if (handler) { + const res = await handler(conf, configEnv) + if (res) { + conf = mergeConfig(conf, res) + } + } + } + + return conf +} + export function getDepOptimizationConfig( config: ResolvedConfig, ssr: boolean From 31f5ff3ef9ee071afa8cc66870e13e9753c3ab93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= Date: Wed, 7 Sep 2022 00:57:10 +0800 Subject: [PATCH 142/311] refactor: optimize `async` and `await` in code (#9854) --- packages/vite/src/node/optimizer/optimizer.ts | 2 +- packages/vite/src/node/plugins/importAnalysis.ts | 2 +- playground/assets/__tests__/assets.spec.ts | 2 +- playground/ssr-vue/src/entry-server.js | 2 +- playground/vitestGlobalSetup.ts | 2 +- playground/vitestSetup.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/vite/src/node/optimizer/optimizer.ts b/packages/vite/src/node/optimizer/optimizer.ts index 9bf03aa88005b0..0f32d70300dfb7 100644 --- a/packages/vite/src/node/optimizer/optimizer.ts +++ b/packages/vite/src/node/optimizer/optimizer.ts @@ -232,7 +232,7 @@ async function createDepsOptimizer( } } - async function startNextDiscoveredBatch() { + function startNextDiscoveredBatch() { newDepsDiscovered = false // Add the current depOptimizationProcessing to the queue, these diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index f1356d5c7f879e..80204c17a65091 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -87,7 +87,7 @@ function markExplicitImport(url: string) { return url } -async function extractImportedBindings( +function extractImportedBindings( id: string, source: string, importSpec: ImportSpecifier, diff --git a/playground/assets/__tests__/assets.spec.ts b/playground/assets/__tests__/assets.spec.ts index ceb259102d4031..affe284fb62d75 100644 --- a/playground/assets/__tests__/assets.spec.ts +++ b/playground/assets/__tests__/assets.spec.ts @@ -272,7 +272,7 @@ describe.runIf(isBuild)('encodeURI', () => { test('img src with encodeURI', async () => { const img = await page.$('.encodeURI') expect( - await (await img.getAttribute('src')).startsWith('data:image/png;base64') + (await img.getAttribute('src')).startsWith('data:image/png;base64') ).toBe(true) }) }) diff --git a/playground/ssr-vue/src/entry-server.js b/playground/ssr-vue/src/entry-server.js index ec0810f885863f..e44c9abd3eb114 100644 --- a/playground/ssr-vue/src/entry-server.js +++ b/playground/ssr-vue/src/entry-server.js @@ -6,7 +6,7 @@ export async function render(url, manifest) { const { app, router } = createApp() // set the router to the desired URL before rendering - router.push(url) + await router.push(url) await router.isReady() // passing SSR context object which will be available via useSSRContext() diff --git a/playground/vitestGlobalSetup.ts b/playground/vitestGlobalSetup.ts index 05bbf767423487..611b32064971c0 100644 --- a/playground/vitestGlobalSetup.ts +++ b/playground/vitestGlobalSetup.ts @@ -42,7 +42,7 @@ export async function setup(): Promise { } export async function teardown(): Promise { - browserServer?.close() + await browserServer?.close() if (!process.env.VITE_PRESERVE_BUILD_ARTIFACTS) { fs.removeSync(path.resolve(__dirname, '../playground-temp')) } diff --git a/playground/vitestSetup.ts b/playground/vitestSetup.ts index 57d44f9a91c898..f7c2629daa8f45 100644 --- a/playground/vitestSetup.ts +++ b/playground/vitestSetup.ts @@ -172,7 +172,7 @@ beforeAll(async (s) => { serverLogs.length = 0 await page?.close() await server?.close() - watcher?.close() + await watcher?.close() if (browser) { await browser.close() } From a7706d0d980307a91c443c6bb57e048cade7dc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 7 Sep 2022 04:22:59 +0900 Subject: [PATCH 143/311] fix: prevent error overlay style being overridden (fixes #9969) (#9971) --- packages/vite/src/client/overlay.ts | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/vite/src/client/overlay.ts b/packages/vite/src/client/overlay.ts index f9a22b7db2c6b3..e094f5664a5bb6 100644 --- a/packages/vite/src/client/overlay.ts +++ b/packages/vite/src/client/overlay.ts @@ -1,8 +1,17 @@ import type { ErrorPayload } from 'types/hmrPayload' +// set :host styles to make playwright detect the element as visible const template = /*html*/ ` -
-
-

-  

-  

-  
- Click outside or fix the code to dismiss.
- You can also disable this overlay by setting - server.hmr.overlay to false in vite.config.js. +
+
+
+

+    

+    

+    
+ Click outside or fix the code to dismiss.
+ You can also disable this overlay by setting + server.hmr.overlay to false in vite.config.js. +
` From 1b822d0598a6e13108da541e37d6e0ccb5c226f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ximo=20Mussini?= Date: Tue, 6 Sep 2022 16:58:36 -0300 Subject: [PATCH 144/311] fix: ensure version query for relative node_modules imports (#10016) --- packages/vite/src/node/plugins/resolve.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index 371609fdf23c83..97b032b2833e11 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -175,7 +175,10 @@ export function resolvePlugin(resolveOptions: InternalResolveOptions): Plugin { // as if they would have been imported through a bare import // Use the original id to do the check as the resolved id may be the real // file path after symlinks resolution - const isNodeModule = !!normalizePath(id).match(nodeModulesInPathRE) + const isNodeModule = + nodeModulesInPathRE.test(normalizePath(id)) || + nodeModulesInPathRE.test(normalizePath(resolved)) + if (isNodeModule && !resolved.match(DEP_VERSION_RE)) { const versionHash = depsOptimizer.metadata.browserHash if (versionHash && OPTIMIZABLE_ENTRY_RE.test(resolved)) { From 9f8d79b9897427882bb7da1bdb7862a15938c865 Mon Sep 17 00:00:00 2001 From: Percy Ma Date: Wed, 7 Sep 2022 16:00:54 +0800 Subject: [PATCH 145/311] chore: use pnpm `shell-emulator` instead of `cross-env` (#10023) --- .npmrc | 1 + package.json | 13 +++++------ playground/env/package.json | 7 ++---- playground/json/package.json | 3 +-- playground/react-sourcemap/package.json | 7 +++--- playground/ssr-deps/package.json | 3 +-- playground/ssr-html/package.json | 3 +-- playground/ssr-pug/package.json | 3 +-- playground/ssr-react/package.json | 3 +-- playground/ssr-vue/package.json | 3 +-- playground/ssr-webworker/package.json | 3 +-- playground/worker/package.json | 24 +++++++++---------- pnpm-lock.yaml | 31 +------------------------ 13 files changed, 32 insertions(+), 72 deletions(-) diff --git a/.npmrc b/.npmrc index 6d64ed708da7d4..148b202c642b5e 100644 --- a/.npmrc +++ b/.npmrc @@ -6,3 +6,4 @@ hoist-pattern[]=pug hoist-pattern[]=source-map-support hoist-pattern[]=ts-node strict-peer-dependencies=false +shell-emulator=true \ No newline at end of file diff --git a/package.json b/package.json index b2d0409cbce6a8..3f5145d12a99b4 100644 --- a/package.json +++ b/package.json @@ -20,17 +20,17 @@ "typecheck": "tsc -p scripts --noEmit && tsc -p playground --noEmit", "test": "run-s test-unit test-serve test-build", "test-serve": "vitest run -c vitest.config.e2e.ts", - "test-build": "cross-env VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts", - "test-build-without-plugin-commonjs": "cross-env VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build", + "test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts", + "test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build", "test-unit": "vitest run", "test-docs": "pnpm run docs-build", - "debug-serve": "cross-env VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts", - "debug-build": "cross-env VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts", + "debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts", + "debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts", "docs": "vitepress dev docs", "docs-build": "vitepress build docs", "docs-serve": "vitepress serve docs", - "build": "pnpm -r --filter=./packages/* run build", - "dev": "pnpm -r --parallel --filter=./packages/* run dev", + "build": "pnpm -r --filter='./packages/*' run build", + "dev": "pnpm -r --parallel --filter='./packages/*' run dev", "release": "tsx scripts/release.ts", "ci-publish": "tsx scripts/publishCI.ts", "ci-docs": "run-s build docs-build" @@ -60,7 +60,6 @@ "@typescript-eslint/eslint-plugin": "^5.36.1", "@typescript-eslint/parser": "^5.36.1", "conventional-changelog-cli": "^2.2.2", - "cross-env": "^7.0.3", "esbuild": "^0.14.47", "eslint": "^8.23.0", "eslint-define-config": "^1.7.0", diff --git a/playground/env/package.json b/playground/env/package.json index 271cbf0a7d20c0..091afe4bd08a88 100644 --- a/playground/env/package.json +++ b/playground/env/package.json @@ -3,12 +3,9 @@ "private": true, "version": "0.0.0", "scripts": { - "dev": "cross-env VITE_INLINE=inline-serve vite", - "build": "cross-env VITE_INLINE=inline-build vite build", + "dev": "VITE_INLINE=inline-serve vite", + "build": "VITE_INLINE=inline-build vite build", "debug": "node --inspect-brk ../../packages/vite/bin/vite", "preview": "vite preview" - }, - "devDependencies": { - "cross-env": "^7.0.3" } } diff --git a/playground/json/package.json b/playground/json/package.json index ee851285a0945c..b2c29d3e6f494d 100644 --- a/playground/json/package.json +++ b/playground/json/package.json @@ -8,11 +8,10 @@ "debug": "node --inspect-brk ../../packages/vite/bin/vite", "preview": "vite preview", "dev:ssr": "node server", - "serve:ssr": "cross-env NODE_ENV=production node server", + "serve:ssr": "NODE_ENV=production node server", "debug:ssr": "node --inspect-brk server" }, "devDependencies": { - "cross-env": "^7.0.3", "express": "^4.18.1", "json-module": "file:./json-module", "vue": "^3.2.38" diff --git a/playground/react-sourcemap/package.json b/playground/react-sourcemap/package.json index 91aa3331b877b4..70398d97257914 100644 --- a/playground/react-sourcemap/package.json +++ b/playground/react-sourcemap/package.json @@ -4,9 +4,9 @@ "version": "0.0.0", "scripts": { "dev": "vite", - "dev:classic": "cross-env USE_CLASSIC=1 vite", + "dev:classic": "USE_CLASSIC=1 vite", "build": "vite build", - "build:classic": "cross-env USE_CLASSIC=1 vite build", + "build:classic": "USE_CLASSIC=1 vite build", "debug": "node --inspect-brk ../../packages/vite/bin/vite", "preview": "vite preview" }, @@ -15,7 +15,6 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@vitejs/plugin-react": "workspace:*", - "cross-env": "^7.0.3" + "@vitejs/plugin-react": "workspace:*" } } diff --git a/playground/ssr-deps/package.json b/playground/ssr-deps/package.json index ac82dadbcead63..785806c3bab816 100644 --- a/playground/ssr-deps/package.json +++ b/playground/ssr-deps/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "node server", - "serve": "cross-env NODE_ENV=production node server", + "serve": "NODE_ENV=production node server", "debug": "node --inspect-brk server" }, "dependencies": { @@ -32,7 +32,6 @@ "pkg-exports": "file:./pkg-exports" }, "devDependencies": { - "cross-env": "^7.0.3", "express": "^4.18.1" } } diff --git a/playground/ssr-html/package.json b/playground/ssr-html/package.json index 73614bab95ca5a..a800fe8477a416 100644 --- a/playground/ssr-html/package.json +++ b/playground/ssr-html/package.json @@ -5,12 +5,11 @@ "type": "module", "scripts": { "dev": "node server", - "serve": "cross-env NODE_ENV=production node server", + "serve": "NODE_ENV=production node server", "debug": "node --inspect-brk server" }, "dependencies": {}, "devDependencies": { - "cross-env": "^7.0.3", "express": "^4.18.1" } } diff --git a/playground/ssr-pug/package.json b/playground/ssr-pug/package.json index 547e8cbf7e94b2..5b64c6535cbfe9 100644 --- a/playground/ssr-pug/package.json +++ b/playground/ssr-pug/package.json @@ -5,11 +5,10 @@ "type": "module", "scripts": { "dev": "node server", - "serve": "cross-env NODE_ENV=production node server", + "serve": "NODE_ENV=production node server", "debug": "node --inspect-brk server" }, "devDependencies": { - "cross-env": "^7.0.3", "express": "^4.18.1", "pug": "^3.0.2" } diff --git a/playground/ssr-react/package.json b/playground/ssr-react/package.json index 3fd0f7134a2de9..ea03ab80086d47 100644 --- a/playground/ssr-react/package.json +++ b/playground/ssr-react/package.json @@ -9,7 +9,7 @@ "build:client": "vite build --outDir dist/client", "build:server": "vite build --ssr src/entry-server.jsx --outDir dist/server", "generate": "vite build --outDir dist/static && npm run build:server && node prerender", - "serve": "cross-env NODE_ENV=production node server", + "serve": "NODE_ENV=production node server", "debug": "node --inspect-brk server" }, "dependencies": { @@ -20,7 +20,6 @@ "devDependencies": { "@vitejs/plugin-react": "workspace:*", "compression": "^1.7.4", - "cross-env": "^7.0.3", "express": "^4.18.1", "serve-static": "^1.15.0" } diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index 5c450d10d62d60..f3869dc9c1fdf3 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -11,7 +11,7 @@ "build:server": "vite build --ssr src/entry-server.js --outDir dist/server", "build:server:noExternal": "vite build --config vite.config.noexternal.js --ssr src/entry-server.js --outDir dist/server", "generate": "vite build --ssrManifest --outDir dist/static && npm run build:server && node prerender", - "serve": "cross-env NODE_ENV=production node server", + "serve": "NODE_ENV=production node server", "debug": "node --inspect-brk server" }, "dependencies": { @@ -24,7 +24,6 @@ "@vitejs/plugin-vue": "workspace:*", "@vitejs/plugin-vue-jsx": "workspace:*", "compression": "^1.7.4", - "cross-env": "^7.0.3", "dep-import-type": "link:./dep-import-type", "express": "^4.18.1", "serve-static": "^1.15.0" diff --git a/playground/ssr-webworker/package.json b/playground/ssr-webworker/package.json index 9f6c8c00534eab..66fdc8b7afaa99 100644 --- a/playground/ssr-webworker/package.json +++ b/playground/ssr-webworker/package.json @@ -4,14 +4,13 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "cross-env DEV=1 node worker", + "dev": "DEV=1 node worker", "build:worker": "vite build --ssr src/entry-worker.jsx --outDir dist/worker" }, "dependencies": { "react": "^18.2.0" }, "devDependencies": { - "cross-env": "^7.0.3", "miniflare": "^1.4.1", "resolve-linked": "workspace:*" } diff --git a/playground/worker/package.json b/playground/worker/package.json index 701fca25628e76..e3fe8121a49d46 100644 --- a/playground/worker/package.json +++ b/playground/worker/package.json @@ -9,18 +9,18 @@ "dev:es": "vite --config ./vite.config-es.js dev", "build:es": "vite --config ./vite.config-es.js build", "preview:es": "vite --config ./vite.config-es.js preview", - "dev:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev", - "build:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build", - "preview:sourcemap": "cross-env WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview", - "dev:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev", - "build:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build", - "preview:sourcemap-hidden": "cross-env WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview", - "dev:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev", - "build:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build", - "preview:sourcemap-inline": "cross-env WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview", - "dev:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js dev", - "build:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js build", - "preview:relative-base": "cross-env WORKER_MODE=inline vite --config ./vite.config-relative-base.js preview", + "dev:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js dev", + "build:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js build", + "preview:sourcemap": "WORKER_MODE=sourcemap vite --config ./vite.config-sourcemap.js preview", + "dev:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js dev", + "build:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js build", + "preview:sourcemap-hidden": "WORKER_MODE=hidden vite --config ./vite.config-sourcemap.js preview", + "dev:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js dev", + "build:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js build", + "preview:sourcemap-inline": "WORKER_MODE=inline vite --config ./vite.config-sourcemap.js preview", + "dev:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js dev", + "build:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js build", + "preview:relative-base": "WORKER_MODE=inline vite --config ./vite.config-relative-base.js preview", "debug": "node --inspect-brk ../../packages/vite/bin/vite" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dfd5fe3955fc31..ca8db4b26b25a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,7 +34,6 @@ importers: '@typescript-eslint/eslint-plugin': ^5.36.1 '@typescript-eslint/parser': ^5.36.1 conventional-changelog-cli: ^2.2.2 - cross-env: ^7.0.3 esbuild: ^0.14.47 eslint: ^8.23.0 eslint-define-config: ^1.7.0 @@ -90,7 +89,6 @@ importers: '@typescript-eslint/eslint-plugin': 5.36.1_g2qdd2k5igsxhudjjarcmw5o7e '@typescript-eslint/parser': 5.36.1_pyvvhc3zqdua4akflcggygkl44 conventional-changelog-cli: 2.2.2 - cross-env: 7.0.3 esbuild: 0.14.47 eslint: 8.23.0 eslint-define-config: 1.7.0 @@ -457,10 +455,7 @@ importers: specifiers: {} playground/env: - specifiers: - cross-env: ^7.0.3 - devDependencies: - cross-env: 7.0.3 + specifiers: {} playground/env-nested: specifiers: {} @@ -533,12 +528,10 @@ importers: playground/json: specifiers: - cross-env: ^7.0.3 express: ^4.18.1 json-module: file:./json-module vue: ^3.2.38 devDependencies: - cross-env: 7.0.3 express: 4.18.1 json-module: file:playground/json/json-module vue: 3.2.38 @@ -850,7 +843,6 @@ importers: playground/react-sourcemap: specifiers: '@vitejs/plugin-react': workspace:* - cross-env: ^7.0.3 react: ^18.2.0 react-dom: ^18.2.0 dependencies: @@ -858,7 +850,6 @@ importers: react-dom: 18.2.0_react@18.2.0 devDependencies: '@vitejs/plugin-react': link:../../packages/plugin-react - cross-env: 7.0.3 playground/react/jsx-entry: specifiers: {} @@ -936,7 +927,6 @@ importers: specifiers: '@vitejs/css-lib': file:./css-lib bcrypt: ^5.0.1 - cross-env: ^7.0.3 define-properties-exports: file:./define-properties-exports define-property-exports: file:./define-property-exports express: ^4.18.1 @@ -980,7 +970,6 @@ importers: require-absolute: file:playground/ssr-deps/require-absolute ts-transpiled-exports: file:playground/ssr-deps/ts-transpiled-exports devDependencies: - cross-env: 7.0.3 express: 4.18.1 playground/ssr-deps/css-lib: @@ -1063,19 +1052,15 @@ importers: playground/ssr-html: specifiers: - cross-env: ^7.0.3 express: ^4.18.1 devDependencies: - cross-env: 7.0.3 express: 4.18.1 playground/ssr-pug: specifiers: - cross-env: ^7.0.3 express: ^4.18.1 pug: ^3.0.2 devDependencies: - cross-env: 7.0.3 express: 4.18.1 pug: 3.0.2 @@ -1083,7 +1068,6 @@ importers: specifiers: '@vitejs/plugin-react': workspace:* compression: ^1.7.4 - cross-env: ^7.0.3 express: ^4.18.1 react: ^18.2.0 react-dom: ^18.2.0 @@ -1096,7 +1080,6 @@ importers: devDependencies: '@vitejs/plugin-react': link:../../packages/plugin-react compression: 1.7.4 - cross-env: 7.0.3 express: 4.18.1 serve-static: 1.15.0 @@ -1105,7 +1088,6 @@ importers: '@vitejs/plugin-vue': workspace:* '@vitejs/plugin-vue-jsx': workspace:* compression: ^1.7.4 - cross-env: ^7.0.3 dep-import-type: link:./dep-import-type example-external-component: file:example-external-component express: ^4.18.1 @@ -1122,7 +1104,6 @@ importers: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx compression: 1.7.4 - cross-env: 7.0.3 dep-import-type: link:dep-import-type express: 4.18.1 serve-static: 1.15.0 @@ -1135,14 +1116,12 @@ importers: playground/ssr-webworker: specifiers: - cross-env: ^7.0.3 miniflare: ^1.4.1 react: ^18.2.0 resolve-linked: workspace:* dependencies: react: 18.2.0 devDependencies: - cross-env: 7.0.3 miniflare: 1.4.1 resolve-linked: link:../resolve-linked @@ -4029,14 +4008,6 @@ packages: /create-require/1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - /cross-env/7.0.3: - resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} - engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} - hasBin: true - dependencies: - cross-spawn: 7.0.3 - dev: true - /cross-spawn/6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} From 9de9bc477638ec46d2e80e6e66ec4f3eb6b439e9 Mon Sep 17 00:00:00 2001 From: Shyim <6224096+shyim@users.noreply.github.com> Date: Fri, 9 Sep 2022 13:10:47 +0200 Subject: [PATCH 146/311] fix: proxy to secured websocket server (#10045) --- packages/vite/src/node/server/middlewares/proxy.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/server/middlewares/proxy.ts b/packages/vite/src/node/server/middlewares/proxy.ts index f08f69091f1c68..6554358f091028 100644 --- a/packages/vite/src/node/server/middlewares/proxy.ts +++ b/packages/vite/src/node/server/middlewares/proxy.ts @@ -88,7 +88,9 @@ export function proxyMiddleware( if (doesProxyContextMatchUrl(context, url)) { const [proxy, opts] = proxies[context] if ( - (opts.ws || opts.target?.toString().startsWith('ws:')) && + (opts.ws || + opts.target?.toString().startsWith('ws:') || + opts.target?.toString().startsWith('wss:')) && req.headers['sec-websocket-protocol'] !== HMR_HEADER ) { if (opts.rewrite) { From 9e65a41f15b9593cf5f1518d4ad4c4f84bd37c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sat, 10 Sep 2022 18:14:37 +0900 Subject: [PATCH 147/311] chore: cleanup old changelogs (#10056) --- packages/vite/CHANGELOG.md | 3316 +----------------------------------- 1 file changed, 21 insertions(+), 3295 deletions(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 4027c0270c61ca..003d80425afc20 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -575,3307 +575,33 @@ See [3.0.0-alpha.1 changelog](https://github.com/vitejs/vite/blob/v3.0.0-alpha.1 See [3.0.0-alpha.0 changelog](https://github.com/vitejs/vite/blob/v3.0.0-alpha.0/packages/vite/CHANGELOG.md) +## Previous Changelogs +### 2.9.x (2022-03-30 - 2022-08-12) +See [2.9.15 changelog](https://github.com/vitejs/vite/blob/v2.9.15/packages/vite/CHANGELOG.md) +### 2.8.x (2022-02-09 - 2022-03-01) +See [2.8.6 changelog](https://github.com/vitejs/vite/blob/v2.8.6/packages/vite/CHANGELOG.md) -## 2.9.14 (2022-07-08) +### 2.7.x (2021-10-28 - 2021-12-28) +See [2.7.13 changelog](https://github.com/vitejs/vite/blob/v2.7.13/packages/vite/CHANGELOG.md) -* fix: re-encode url to prevent fs.allow bypass (fixes #8498) (#8990) ([adb61c5](https://github.com/vitejs/vite/commit/adb61c5)), closes [#8498](https://github.com/vitejs/vite/issues/8498) [#8990](https://github.com/vitejs/vite/issues/8990) -* fix: reverts #8471, fix css content ([da77dee](https://github.com/vitejs/vite/commit/da77dee)), closes [#8874](https://github.com/vitejs/vite/issues/8874) -* fix(css): preserve dynamic import css code (fixes #5348) ([d4d89b9](https://github.com/vitejs/vite/commit/d4d89b9)), closes [#5348](https://github.com/vitejs/vite/issues/5348) [#7746](https://github.com/vitejs/vite/issues/7746) -* fix(css): always use css module content (#8977) ([84ec02a](https://github.com/vitejs/vite/commit/84ec02a)), closes [#8936](https://github.com/vitejs/vite/issues/8936) [#8977](https://github.com/vitejs/vite/issues/8977) +### 2.6.x (2021-09-20 - 2021-10-27) +See [2.6.14 changelog](https://github.com/vitejs/vite/blob/v2.6.14/packages/vite/CHANGELOG.md) +### 2.5.x (2021-08-03 - 2021-09-13) +See [2.5.10 changelog](https://github.com/vitejs/vite/blob/v2.5.10/packages/vite/CHANGELOG.md) +### 2.4.x (2021-06-27 - 2021-07-27) +See [2.4.4 changelog](https://github.com/vitejs/vite/blob/v2.4.4/packages/vite/CHANGELOG.md) -## 2.9.13 (2022-06-27) +### 2.3.x (2021-05-11 - 2021-06-19) +See [2.3.8 changelog](https://github.com/vitejs/vite/blob/v2.3.8/packages/vite/CHANGELOG.md) -* fix: /@fs/ dir traversal with escaped chars (fixes #8498) (#8805) ([e109d64](https://github.com/vitejs/vite/commit/e109d64)), closes [#8498](https://github.com/vitejs/vite/issues/8498) [#8805](https://github.com/vitejs/vite/issues/8805) -* fix(wasm): support decoding data URL in Node < v16 (#8668) ([1afc1c2](https://github.com/vitejs/vite/commit/1afc1c2)), closes [#8668](https://github.com/vitejs/vite/issues/8668) +### 2.2.x (2021-04-19 - 2021-05-03) +See [2.2.4 changelog](https://github.com/vitejs/vite/blob/v2.2.4/packages/vite/CHANGELOG.md) +### 2.1.x (2021-03-15 - 2021-03-31) +See [2.1.5 changelog](https://github.com/vitejs/vite/blob/v2.1.5/packages/vite/CHANGELOG.md) - -## 2.9.12 (2022-06-10) - -* fix: outdated optimized dep removed from module graph (#8534) ([c0d6c60](https://github.com/vitejs/vite/commit/c0d6c60)), closes [#8534](https://github.com/vitejs/vite/issues/8534) - - - -## 2.9.11 (2022-06-10) - -* fix: respect server.headers in static middlewares (#8481) ([ab7dc1c](https://github.com/vitejs/vite/commit/ab7dc1c)), closes [#8481](https://github.com/vitejs/vite/issues/8481) -* fix(dev): avoid FOUC when swapping out link tag (fix #7973) (#8495) ([01fa807](https://github.com/vitejs/vite/commit/01fa807)), closes [#7973](https://github.com/vitejs/vite/issues/7973) [#8495](https://github.com/vitejs/vite/issues/8495) - - - -## 2.9.10 (2022-06-06) - -* feat: treat Astro file scripts as TS (#8151) ([9fdd0a3](https://github.com/vitejs/vite/commit/9fdd0a3)), closes [#8151](https://github.com/vitejs/vite/issues/8151) -* feat: new hook `configurePreviewServer` (#7658) (#8437) ([7b972bc](https://github.com/vitejs/vite/commit/7b972bc)), closes [#7658](https://github.com/vitejs/vite/issues/7658) [#8437](https://github.com/vitejs/vite/issues/8437) -* fix: remove empty chunk css imports when using esnext (#8345) ([9fbc1a9](https://github.com/vitejs/vite/commit/9fbc1a9)), closes [#8345](https://github.com/vitejs/vite/issues/8345) -* fix: EPERM error on Windows when processing dependencies (#8235) ([dfe4307](https://github.com/vitejs/vite/commit/dfe4307)), closes [#8235](https://github.com/vitejs/vite/issues/8235) -* fix(css): remove `?used` hack (fixes #6421, #8245) (#8278) (#8471) ([8d7bac4](https://github.com/vitejs/vite/commit/8d7bac4)), closes [#6421](https://github.com/vitejs/vite/issues/6421) [#8245](https://github.com/vitejs/vite/issues/8245) [#8278](https://github.com/vitejs/vite/issues/8278) [#8471](https://github.com/vitejs/vite/issues/8471) -* chore(lint): sort for imports (#8113) ([4bd1531](https://github.com/vitejs/vite/commit/4bd1531)), closes [#8113](https://github.com/vitejs/vite/issues/8113) - - - -## 2.9.9 (2022-05-11) - -* fix: add direct query to html-proxy css (fixes #8091) (#8094) ([a24b5e3](https://github.com/vitejs/vite/commit/a24b5e3)), closes [#8091](https://github.com/vitejs/vite/issues/8091) [#8094](https://github.com/vitejs/vite/issues/8094) -* fix: graceful rename in windows (#8036) ([84496f8](https://github.com/vitejs/vite/commit/84496f8)), closes [#8036](https://github.com/vitejs/vite/issues/8036) -* fix: image-set with base64 images (fix #8028) (#8035) ([992aee2](https://github.com/vitejs/vite/commit/992aee2)), closes [#8028](https://github.com/vitejs/vite/issues/8028) [#8035](https://github.com/vitejs/vite/issues/8035) -* fix: invalidate ssrError when HMR update occurs (#8052) ([22fa882](https://github.com/vitejs/vite/commit/22fa882)), closes [#8052](https://github.com/vitejs/vite/issues/8052) -* fix: use `strip-literal` to strip string lterals (#8054) ([b6fc3cd](https://github.com/vitejs/vite/commit/b6fc3cd)), closes [#8054](https://github.com/vitejs/vite/issues/8054) -* perf(lib): reduce backtrack when injecting esbuild helpers (#8110) ([e5556ab](https://github.com/vitejs/vite/commit/e5556ab)), closes [#8110](https://github.com/vitejs/vite/issues/8110) - - - -## 2.9.8 (2022-05-04) - -* fix: inline js and css paths for virtual html (#7993) ([d49e3fb](https://github.com/vitejs/vite/commit/d49e3fb)), closes [#7993](https://github.com/vitejs/vite/issues/7993) -* fix: only handle merge ssr.noExternal (#8003) ([642d65b](https://github.com/vitejs/vite/commit/642d65b)), closes [#8003](https://github.com/vitejs/vite/issues/8003) -* fix: optimized processing folder renaming in win (fix #7939) (#8019) ([e5fe1c6](https://github.com/vitejs/vite/commit/e5fe1c6)), closes [#7939](https://github.com/vitejs/vite/issues/7939) [#8019](https://github.com/vitejs/vite/issues/8019) -* fix(css): do not clean id when passing to postcss (fix #7822) (#7827) ([72f17f8](https://github.com/vitejs/vite/commit/72f17f8)), closes [#7822](https://github.com/vitejs/vite/issues/7822) [#7827](https://github.com/vitejs/vite/issues/7827) -* fix(css): var in image-set (#7921) ([e96b908](https://github.com/vitejs/vite/commit/e96b908)), closes [#7921](https://github.com/vitejs/vite/issues/7921) -* fix(ssr): allow ssrTransform to parse hashbang (#8005) ([6420ba0](https://github.com/vitejs/vite/commit/6420ba0)), closes [#8005](https://github.com/vitejs/vite/issues/8005) -* feat: import ts with .js in vue (#7998) ([9974094](https://github.com/vitejs/vite/commit/9974094)), closes [#7998](https://github.com/vitejs/vite/issues/7998) -* chore: remove maybeVirtualHtmlSet (#8010) ([e85164e](https://github.com/vitejs/vite/commit/e85164e)), closes [#8010](https://github.com/vitejs/vite/issues/8010) - - - -## 2.9.7 (2022-05-02) - -* chore: update license ([d58c030](https://github.com/vitejs/vite/commit/d58c030)) -* chore(css): catch postcss config error (fix #2793) (#7934) ([7f535ac](https://github.com/vitejs/vite/commit/7f535ac)), closes [#2793](https://github.com/vitejs/vite/issues/2793) [#7934](https://github.com/vitejs/vite/issues/7934) -* chore(deps): update all non-major dependencies (#7949) ([b877d30](https://github.com/vitejs/vite/commit/b877d30)), closes [#7949](https://github.com/vitejs/vite/issues/7949) -* fix: inject esbuild helpers in IIFE and UMD wrappers (#7948) ([f7d2d71](https://github.com/vitejs/vite/commit/f7d2d71)), closes [#7948](https://github.com/vitejs/vite/issues/7948) -* fix: inline css hash (#7974) ([f6ae60d](https://github.com/vitejs/vite/commit/f6ae60d)), closes [#7974](https://github.com/vitejs/vite/issues/7974) -* fix: inline style hmr, transform style code inplace (#7869) ([a30a548](https://github.com/vitejs/vite/commit/a30a548)), closes [#7869](https://github.com/vitejs/vite/issues/7869) -* fix: use NODE_ENV in optimizer (#7673) ([50672e4](https://github.com/vitejs/vite/commit/50672e4)), closes [#7673](https://github.com/vitejs/vite/issues/7673) -* fix(css): clean comments before hoist at rules (#7924) ([e48827f](https://github.com/vitejs/vite/commit/e48827f)), closes [#7924](https://github.com/vitejs/vite/issues/7924) -* fix(css): dynamic import css in package fetches removed js (fixes #7955, #6823) (#7969) ([025eebf](https://github.com/vitejs/vite/commit/025eebf)), closes [#7955](https://github.com/vitejs/vite/issues/7955) [#6823](https://github.com/vitejs/vite/issues/6823) [#7969](https://github.com/vitejs/vite/issues/7969) -* fix(css): inline css module when ssr, minify issue (fix #5471) (#7807) ([cf8a48a](https://github.com/vitejs/vite/commit/cf8a48a)), closes [#5471](https://github.com/vitejs/vite/issues/5471) [#7807](https://github.com/vitejs/vite/issues/7807) -* fix(css): sourcemap crash with postcss (#7982) ([7f9f8f1](https://github.com/vitejs/vite/commit/7f9f8f1)), closes [#7982](https://github.com/vitejs/vite/issues/7982) -* fix(css): support postcss.config.ts (#7935) ([274c10e](https://github.com/vitejs/vite/commit/274c10e)), closes [#7935](https://github.com/vitejs/vite/issues/7935) -* fix(ssr): failed ssrLoadModule call throws same error (#7177) ([891e7fc](https://github.com/vitejs/vite/commit/891e7fc)), closes [#7177](https://github.com/vitejs/vite/issues/7177) -* fix(worker): import.meta.* (#7706) ([b092697](https://github.com/vitejs/vite/commit/b092697)), closes [#7706](https://github.com/vitejs/vite/issues/7706) -* docs: `server.origin` config trailing slash (fix #6622) (#7865) ([5c1ee5a](https://github.com/vitejs/vite/commit/5c1ee5a)), closes [#6622](https://github.com/vitejs/vite/issues/6622) [#7865](https://github.com/vitejs/vite/issues/7865) - - - -## 2.9.6 (2022-04-26) - -* fix: `apply` condition skipped for nested plugins (#7741) ([1f2ca53](https://github.com/vitejs/vite/commit/1f2ca53)), closes [#7741](https://github.com/vitejs/vite/issues/7741) -* fix: clean string regexp (#7871) ([ecc78bc](https://github.com/vitejs/vite/commit/ecc78bc)), closes [#7871](https://github.com/vitejs/vite/issues/7871) -* fix: escape character in string regexp match (#7834) ([1d468c8](https://github.com/vitejs/vite/commit/1d468c8)), closes [#7834](https://github.com/vitejs/vite/issues/7834) -* fix: HMR propagation of HTML changes (fix #7870) (#7895) ([1f7855c](https://github.com/vitejs/vite/commit/1f7855c)), closes [#7870](https://github.com/vitejs/vite/issues/7870) [#7895](https://github.com/vitejs/vite/issues/7895) -* fix: modulepreload polyfill only during build (fix #4786) (#7816) ([709776f](https://github.com/vitejs/vite/commit/709776f)), closes [#4786](https://github.com/vitejs/vite/issues/4786) [#7816](https://github.com/vitejs/vite/issues/7816) -* fix: new SharedWorker syntax (#7800) ([474d5c2](https://github.com/vitejs/vite/commit/474d5c2)), closes [#7800](https://github.com/vitejs/vite/issues/7800) -* fix: node v18 support (#7812) ([fc89057](https://github.com/vitejs/vite/commit/fc89057)), closes [#7812](https://github.com/vitejs/vite/issues/7812) -* fix: preview jsdoc params (#7903) ([e474381](https://github.com/vitejs/vite/commit/e474381)), closes [#7903](https://github.com/vitejs/vite/issues/7903) -* fix: replace import.meta.url correctly (#7792) ([12d1194](https://github.com/vitejs/vite/commit/12d1194)), closes [#7792](https://github.com/vitejs/vite/issues/7792) -* fix: set `isSelfAccepting` to `false` for any asset not processed by importAnalysis (#7898) ([0d2089c](https://github.com/vitejs/vite/commit/0d2089c)), closes [#7898](https://github.com/vitejs/vite/issues/7898) -* fix: spelling mistakes (#7883) ([54728e3](https://github.com/vitejs/vite/commit/54728e3)), closes [#7883](https://github.com/vitejs/vite/issues/7883) -* fix: ssr.noExternal with boolean values (#7813) ([0b2d307](https://github.com/vitejs/vite/commit/0b2d307)), closes [#7813](https://github.com/vitejs/vite/issues/7813) -* fix: style use string instead of js import (#7786) ([ba43c29](https://github.com/vitejs/vite/commit/ba43c29)), closes [#7786](https://github.com/vitejs/vite/issues/7786) -* fix: update sourcemap in importAnalysisBuild (#7825) ([d7540c8](https://github.com/vitejs/vite/commit/d7540c8)), closes [#7825](https://github.com/vitejs/vite/issues/7825) -* fix(ssr): rewrite dynamic class method name (fix #7751) (#7757) ([b89974a](https://github.com/vitejs/vite/commit/b89974a)), closes [#7751](https://github.com/vitejs/vite/issues/7751) [#7757](https://github.com/vitejs/vite/issues/7757) -* chore: code structure (#7790) ([5f7fe00](https://github.com/vitejs/vite/commit/5f7fe00)), closes [#7790](https://github.com/vitejs/vite/issues/7790) -* chore: fix worker sourcemap output style (#7805) ([17f3be7](https://github.com/vitejs/vite/commit/17f3be7)), closes [#7805](https://github.com/vitejs/vite/issues/7805) -* chore(deps): update all non-major dependencies (#7780) ([eba9d05](https://github.com/vitejs/vite/commit/eba9d05)), closes [#7780](https://github.com/vitejs/vite/issues/7780) -* chore(deps): update all non-major dependencies (#7847) ([e29d1d9](https://github.com/vitejs/vite/commit/e29d1d9)), closes [#7847](https://github.com/vitejs/vite/issues/7847) -* feat: enable optimizeDeps.esbuildOptions.loader (#6840) ([af8ca60](https://github.com/vitejs/vite/commit/af8ca60)), closes [#6840](https://github.com/vitejs/vite/issues/6840) - - - -## 2.9.5 (2022-04-14) - -* fix: revert #7582, fix #7721 and #7736 (#7737) ([fa86d69](https://github.com/vitejs/vite/commit/fa86d69)), closes [#7721](https://github.com/vitejs/vite/issues/7721) [#7736](https://github.com/vitejs/vite/issues/7736) [#7737](https://github.com/vitejs/vite/issues/7737) -* chore: format css minify esbuild error (#7731) ([c445075](https://github.com/vitejs/vite/commit/c445075)), closes [#7731](https://github.com/vitejs/vite/issues/7731) - - - -## 2.9.4 (2022-04-13) - -* fix: handle url imports with semicolon (fix #7717) (#7718) ([a5c2a78](https://github.com/vitejs/vite/commit/a5c2a78)), closes [#7717](https://github.com/vitejs/vite/issues/7717) [#7718](https://github.com/vitejs/vite/issues/7718) - - - -## 2.9.3 (2022-04-13) - -* fix: revert #7665 (#7716) ([26862c4](https://github.com/vitejs/vite/commit/26862c4)), closes [#7665](https://github.com/vitejs/vite/issues/7665) [#7716](https://github.com/vitejs/vite/issues/7716) - - - -## 2.9.2 (2022-04-13) - -* fix: `$ vite preview` 404 handling (#7665) ([66b6dc5](https://github.com/vitejs/vite/commit/66b6dc5)), closes [#7665](https://github.com/vitejs/vite/issues/7665) -* fix: build should also respect esbuild=false config (#7602) ([2dc0e80](https://github.com/vitejs/vite/commit/2dc0e80)), closes [#7602](https://github.com/vitejs/vite/issues/7602) -* fix: default value of assetsDir option (#7703) ([83d32d9](https://github.com/vitejs/vite/commit/83d32d9)), closes [#7703](https://github.com/vitejs/vite/issues/7703) -* fix: detect env hmr (#7595) ([212d454](https://github.com/vitejs/vite/commit/212d454)), closes [#7595](https://github.com/vitejs/vite/issues/7595) -* fix: EACCES permission denied due to resolve new paths default (#7612) ([1dd019f](https://github.com/vitejs/vite/commit/1dd019f)), closes [#7612](https://github.com/vitejs/vite/issues/7612) -* fix: fix HMR propagation when imports not analyzed (#7561) ([57e7914](https://github.com/vitejs/vite/commit/57e7914)), closes [#7561](https://github.com/vitejs/vite/issues/7561) -* fix: nested comments and strings, new regexp utils (#7650) ([93900f0](https://github.com/vitejs/vite/commit/93900f0)), closes [#7650](https://github.com/vitejs/vite/issues/7650) -* fix: revert optimizeDeps false, keep optimizedDeps.disabled (#7715) ([ba9a1ff](https://github.com/vitejs/vite/commit/ba9a1ff)), closes [#7715](https://github.com/vitejs/vite/issues/7715) -* fix: update watch mode (#7132) ([9ed1672](https://github.com/vitejs/vite/commit/9ed1672)), closes [#7132](https://github.com/vitejs/vite/issues/7132) -* fix: update ws types (#7605) ([b620587](https://github.com/vitejs/vite/commit/b620587)), closes [#7605](https://github.com/vitejs/vite/issues/7605) -* fix: use correct proxy config in preview (#7604) ([cf59005](https://github.com/vitejs/vite/commit/cf59005)), closes [#7604](https://github.com/vitejs/vite/issues/7604) -* fix(css): hoist charset (#7678) ([29e622c](https://github.com/vitejs/vite/commit/29e622c)), closes [#7678](https://github.com/vitejs/vite/issues/7678) -* fix(css): include inline css module in bundle (#7591) ([45b9273](https://github.com/vitejs/vite/commit/45b9273)), closes [#7591](https://github.com/vitejs/vite/issues/7591) -* fix(deps): update all non-major dependencies (#7668) ([485263c](https://github.com/vitejs/vite/commit/485263c)), closes [#7668](https://github.com/vitejs/vite/issues/7668) -* fix(less): handles rewriting relative paths passed Less's `data-uri` function. (#7400) ([08e39b7](https://github.com/vitejs/vite/commit/08e39b7)), closes [#7400](https://github.com/vitejs/vite/issues/7400) -* fix(resolver): skip known ESM entries when resolving a `require` call (#7582) ([5d6ea8e](https://github.com/vitejs/vite/commit/5d6ea8e)), closes [#7582](https://github.com/vitejs/vite/issues/7582) -* fix(ssr): properly transform export default with expressions (#7705) ([d6830e3](https://github.com/vitejs/vite/commit/d6830e3)), closes [#7705](https://github.com/vitejs/vite/issues/7705) -* feat: clean string module lex string template (#7667) ([dfce283](https://github.com/vitejs/vite/commit/dfce283)), closes [#7667](https://github.com/vitejs/vite/issues/7667) -* feat: explicit the word boundary (#6876) ([7ddbf96](https://github.com/vitejs/vite/commit/7ddbf96)), closes [#6876](https://github.com/vitejs/vite/issues/6876) -* feat: optimizeDeps.disabled (#7646) ([48e038c](https://github.com/vitejs/vite/commit/48e038c)), closes [#7646](https://github.com/vitejs/vite/issues/7646) -* chore: fix term cases (#7553) ([c296130](https://github.com/vitejs/vite/commit/c296130)), closes [#7553](https://github.com/vitejs/vite/issues/7553) -* chore: revert removed line in #7698 ([7e6a2c8](https://github.com/vitejs/vite/commit/7e6a2c8)), closes [#7698](https://github.com/vitejs/vite/issues/7698) -* chore: type unknown env as any (#7702) ([23fdef1](https://github.com/vitejs/vite/commit/23fdef1)), closes [#7702](https://github.com/vitejs/vite/issues/7702) -* chore(deps): update all non-major dependencies (#7603) ([fc51a15](https://github.com/vitejs/vite/commit/fc51a15)), closes [#7603](https://github.com/vitejs/vite/issues/7603) -* perf(css): hoist at rules with regex (#7691) ([8858180](https://github.com/vitejs/vite/commit/8858180)), closes [#7691](https://github.com/vitejs/vite/issues/7691) -* refactor: esbuild handles `target` and `useDefineForClassFields` (#7698) ([0c928aa](https://github.com/vitejs/vite/commit/0c928aa)), closes [#7698](https://github.com/vitejs/vite/issues/7698) -* docs: update release notes (#7563) ([a74bd7b](https://github.com/vitejs/vite/commit/a74bd7b)), closes [#7563](https://github.com/vitejs/vite/issues/7563) - - - -## 2.9.1 (2022-03-31) - -* fix: allow port 0 to be provided to server (#7530) ([173e4c9](https://github.com/vitejs/vite/commit/173e4c9)), closes [#7530](https://github.com/vitejs/vite/issues/7530) -* fix: brotli let for reassignment (#7544) ([d0253d7](https://github.com/vitejs/vite/commit/d0253d7)), closes [#7544](https://github.com/vitejs/vite/issues/7544) -* fix: dynamic import warning with @vite-ignore (#7533) ([29c1ec0](https://github.com/vitejs/vite/commit/29c1ec0)), closes [#7533](https://github.com/vitejs/vite/issues/7533) -* fix: remove unneeded skipping optimization log (#7531) ([41fa2f5](https://github.com/vitejs/vite/commit/41fa2f5)), closes [#7531](https://github.com/vitejs/vite/issues/7531) -* docs(changelog): fix raw glob imports syntax (#7540) ([87fbe13](https://github.com/vitejs/vite/commit/87fbe13)), closes [#7540](https://github.com/vitejs/vite/issues/7540) -* chore: 2.9 release notes (#7525) ([4324f48](https://github.com/vitejs/vite/commit/4324f48)), closes [#7525](https://github.com/vitejs/vite/issues/7525) - - - -# [2.9.0](https://github.com/vitejs/vite/compare/v2.8.6...v2.9.0) (2022-03-30) - -### Faster Cold Start - -Before 2.9, the first time dev was run on a project Vite needed to perform a scan phase to discover dependencies and then pre-bundle them before starting the server. In 2.9 both scanning [#7379](https://github.com/vitejs/vite/issues/7379) and pre-bundling [#6758](https://github.com/vitejs/vite/issues/6758) of dependencies are now non-blocking, so the server starts right away during cold start. We also now allow requests to flow through the pipeline improving initial cold start load speed and increasing the chances of discovering new missing dependencies when re-processing and letting Vite populate the module graph and the browser to process files. In many cases, there is also no need to full-reload the page when new dependencies are discovered. - -### CSS Sourcemap support during dev (experimental) - -Vite now supports CSS sourcemaps [#7173](https://github.com/vitejs/vite/issues/7173). This feature is still experimental, and it is disabled by default to avoid incurring a performance penalty for users that don't need it. To enable it, set [css.devSourcemap](https://vitejs.dev/config/#css-devsourcemap) to `true`. - -### Avoid splitting vendor chunks by default - -Vite's default chunking strategy was a good fit for most SPAs, but it wasn't ideal in some other use cases. Vite doesn't have enough context to make the best decision here, so in Vite 2.9 the previous chunking strategy is now [opt-in](https://vitejs.dev/guide/build.html#chunking-strategy) [#6534](https://github.com/vitejs/vite/issues/6534) and Vite will no longer split vendor libs in a separate chunk. - -### Web Workers enhancements - -Web Workers now supports source map generation (see [#5417](https://github.com/vitejs/vite/issues/5417)). The implementation is also now more robust, fixing several issues encountered in previous versions ([#6599](https://github.com/vitejs/vite/issues/6599)). - -### Raw Glob Imports - -Glob imports support for the `raw` modifier syntax has changed to using `{ as: 'raw' }`, which works in the same way as the `?raw` suffix in regular imports: - -```js -const examples = import.meta.globEager('./examples/*.html', { as: 'raw' }) -``` - -The `{ assert: { type: 'raw' }}` syntax introduced in v2.8 has been deprecated. See [#7017](https://github.com/vitejs/vite/issues/7017) for more information. - -### `envDir` changes - -The `envDir` now correctly loads `.env` files in the specified directory only (defaults to `root`). Previously, it would load files above the directory, which imposed security issues. If you had relied on the previous behaviour, make sure you move your `.env` files to the correct directory, or configure the `envDir` option. - -### New tools for Plugin and Framework Authors - -#### Client Server Communication API - -Vite now provides utilities for plugins to help handle the communication with clients connected to Vite's server [#7437](https://github.com/vitejs/vite/issues/7437). Reusing the open WebSocket connection between the server and clients several use cases can be simplified ([vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect), [SliDev](https://sli.dev), and many others). Check out the [Client Server Communication docs](https://vitejs.dev/guide/api-plugin.html#client-server-communication) for more information. - -```js -// Send a message from the client to the server -if (import.meta.hot) { - import.meta.hot.send('my:from-client', { msg: 'Hey!' }) -} -``` - -```js -// And listen to client messages in a plugin - configureServer(server) { - server.ws.on('my:from-client', (data, client) => { - console.log('Message from client:', data.msg) // Hey! - // ... - }) - } -``` - -#### `importedCss` and `importedAssets` to RenderedChunk type - -Replace the internal `chunkToEmittedCssFileMap` and `chunkToEmittedAssetsMap` variables with public properties added by Vite to `RenderedChunk` objects in the `renderChunk` phase. These is useful for Vite-based frameworks that generate their own HTML. See [#6629](https://github.com/vitejs/vite/issues/6629). - -#### Optimize Custom Extensions (experimental) - -A new `optimizeDeps.extensions: string[]` option is available to enable pre-bundling of custom extensions. A respective esbuild plugin is required to handle that extension. e.g. `['.svelte', '.svelte.md']`. See [#6801](https://github.com/vitejs/vite/issues/6801) for more information. - - -### Bug Fixes - -* fix: build path error on Windows (#7383) ([e3c7c7a](https://github.com/vitejs/vite/commit/e3c7c7a)), closes [#7383](https://github.com/vitejs/vite/issues/7383) -* fix: import url worker two times (#7468) ([f05a813](https://github.com/vitejs/vite/commit/f05a813)), closes [#7468](https://github.com/vitejs/vite/issues/7468) -* fix: import with query with exports/browser field (#7098) ([9ce6732](https://github.com/vitejs/vite/commit/9ce6732)), closes [#7098](https://github.com/vitejs/vite/issues/7098) -* fix: make @fs URLs work with special characters (#7510) ([2b7dad1](https://github.com/vitejs/vite/commit/2b7dad1)), closes [#7510](https://github.com/vitejs/vite/issues/7510) -* fix: tailwind css sourcemap warning (#7480) ([90df0bb](https://github.com/vitejs/vite/commit/90df0bb)), closes [#7480](https://github.com/vitejs/vite/issues/7480) -* fix: worker match only run in js (#7500) ([9481c7d](https://github.com/vitejs/vite/commit/9481c7d)), closes [#7500](https://github.com/vitejs/vite/issues/7500) -* fix: Correctly process urls when they are rewritten to contain space (#7452) ([9ee2cf6](https://github.com/vitejs/vite/commit/9ee2cf6)), closes [#7452](https://github.com/vitejs/vite/issues/7452) -* fix: custom event payload type (#7498) ([28b0660](https://github.com/vitejs/vite/commit/28b0660)), closes [#7498](https://github.com/vitejs/vite/issues/7498) -* fix: handle relative path glob raw import, fix #7307 (#7371) ([7f8dc58](https://github.com/vitejs/vite/commit/7f8dc58)), closes [#7307](https://github.com/vitejs/vite/issues/7307) [#7371](https://github.com/vitejs/vite/issues/7371) -* fix: import.meta.url in worker (#7464) ([8ac4b12](https://github.com/vitejs/vite/commit/8ac4b12)), closes [#7464](https://github.com/vitejs/vite/issues/7464) -* fix: optimizeDeps.entries default ignore paths (#7469) ([4c95e99](https://github.com/vitejs/vite/commit/4c95e99)), closes [#7469](https://github.com/vitejs/vite/issues/7469) -* fix: errors in worker handling (#7236) ([77dc1a1](https://github.com/vitejs/vite/commit/77dc1a1)), closes [#7236](https://github.com/vitejs/vite/issues/7236) -* fix: consider undefined port when checking port (#7318) ([c7fc7c3](https://github.com/vitejs/vite/commit/c7fc7c3)), closes [#7318](https://github.com/vitejs/vite/issues/7318) -* fix: inline style css sourcemap (#7434) ([47668b5](https://github.com/vitejs/vite/commit/47668b5)), closes [#7434](https://github.com/vitejs/vite/issues/7434) -* fix: sourcemap missing source files warning with cached vue (#7442) ([a2ce20d](https://github.com/vitejs/vite/commit/a2ce20d)), closes [#7442](https://github.com/vitejs/vite/issues/7442) -* fix: update tsconfck to 1.2.1 (#7424) ([a90b03b](https://github.com/vitejs/vite/commit/a90b03b)), closes [#7424](https://github.com/vitejs/vite/issues/7424) -* fix: virtual html sourcemap warning (#7440) ([476786b](https://github.com/vitejs/vite/commit/476786b)), closes [#7440](https://github.com/vitejs/vite/issues/7440) -* fix(less): empty less file error (#7412) ([0535c70](https://github.com/vitejs/vite/commit/0535c70)), closes [#7412](https://github.com/vitejs/vite/issues/7412) -* fix(resolve): skip `module` field when the importer is a `require` call (#7438) ([fe4c1ed](https://github.com/vitejs/vite/commit/fe4c1ed)), closes [#7438](https://github.com/vitejs/vite/issues/7438) -* fix: avoid mangling code from incorrect magic-string usage (#7397) ([68d76c9](https://github.com/vitejs/vite/commit/68d76c9)), closes [#7397](https://github.com/vitejs/vite/issues/7397) -* fix(config): server restart on config dependencies changed on windows (#7366) ([c43467a](https://github.com/vitejs/vite/commit/c43467a)), closes [#7366](https://github.com/vitejs/vite/issues/7366) -* fix(deps): update all non-major dependencies (#7392) ([b63fc3b](https://github.com/vitejs/vite/commit/b63fc3b)), closes [#7392](https://github.com/vitejs/vite/issues/7392) -* fix: add version to optimized chunks, fix #7323 (#7350) ([1be1db6](https://github.com/vitejs/vite/commit/1be1db6)), closes [#7323](https://github.com/vitejs/vite/issues/7323) [#7350](https://github.com/vitejs/vite/issues/7350) -* fix: browser cache of newly discovered deps (#7378) ([392a0de](https://github.com/vitejs/vite/commit/392a0de)), closes [#7378](https://github.com/vitejs/vite/issues/7378) -* fix: do not warn (about not being able to bundle non module scripts) when src is an external url (#7 ([0646fe8](https://github.com/vitejs/vite/commit/0646fe8)), closes [#7380](https://github.com/vitejs/vite/issues/7380) -* fix: overwrite deps info browserHash only on commit (#7359) ([1e9615d](https://github.com/vitejs/vite/commit/1e9615d)), closes [#7359](https://github.com/vitejs/vite/issues/7359) -* fix: delayed full page reload (#7347) ([fa0820a](https://github.com/vitejs/vite/commit/fa0820a)), closes [#7347](https://github.com/vitejs/vite/issues/7347) -* fix: early discovery of missing deps, fix #7333 (#7346) ([7d2f37c](https://github.com/vitejs/vite/commit/7d2f37c)), closes [#7333](https://github.com/vitejs/vite/issues/7333) [#7346](https://github.com/vitejs/vite/issues/7346) -* fix: unhandled exception on eager transformRequest (#7345) ([c3260a4](https://github.com/vitejs/vite/commit/c3260a4)), closes [#7345](https://github.com/vitejs/vite/issues/7345) -* fix: update to esbuild 0.14.27, fix #6994 (#7320) ([65aaeee](https://github.com/vitejs/vite/commit/65aaeee)), closes [#6994](https://github.com/vitejs/vite/issues/6994) [#7320](https://github.com/vitejs/vite/issues/7320) -* fix: `ssrExternal` should not skip nested dependencies (#7154) ([f8f934a](https://github.com/vitejs/vite/commit/f8f934a)), closes [#7154](https://github.com/vitejs/vite/issues/7154) -* fix: dep with dynamic import wrong error log (#7313) ([769f535](https://github.com/vitejs/vite/commit/769f535)), closes [#7313](https://github.com/vitejs/vite/issues/7313) -* fix: avoid caching transform result of invalidated module (#7254) ([2d7ba72](https://github.com/vitejs/vite/commit/2d7ba72)), closes [#7254](https://github.com/vitejs/vite/issues/7254) -* fix: dont replace define in json (#7294) ([fc5c937](https://github.com/vitejs/vite/commit/fc5c937)), closes [#7294](https://github.com/vitejs/vite/issues/7294) -* fix: main browserHash after stable optimization rerun (#7284) ([98eefa8](https://github.com/vitejs/vite/commit/98eefa8)), closes [#7284](https://github.com/vitejs/vite/issues/7284) -* fix: needs es interop check for newly discovered deps (#7243) ([ba3047d](https://github.com/vitejs/vite/commit/ba3047d)), closes [#7243](https://github.com/vitejs/vite/issues/7243) -* fix: pending requests after module invalidation (#7283) ([a1044d7](https://github.com/vitejs/vite/commit/a1044d7)), closes [#7283](https://github.com/vitejs/vite/issues/7283) -* fix: use browserHash for imports from node_modules (#7278) ([161f8ea](https://github.com/vitejs/vite/commit/161f8ea)), closes [#7278](https://github.com/vitejs/vite/issues/7278) -* fix: use hmr port if specified (#7282) ([3ee04c0](https://github.com/vitejs/vite/commit/3ee04c0)), closes [#7282](https://github.com/vitejs/vite/issues/7282) -* fix: use relative paths in _metadata.json (#7299) ([8b945f5](https://github.com/vitejs/vite/commit/8b945f5)), closes [#7299](https://github.com/vitejs/vite/issues/7299) -* fix(asset): allow non-existent url (#7306) ([6bc45a2](https://github.com/vitejs/vite/commit/6bc45a2)), closes [#7306](https://github.com/vitejs/vite/issues/7306) -* fix(hmr): hmr style tag no support in html (#7262) ([fae120a](https://github.com/vitejs/vite/commit/fae120a)), closes [#7262](https://github.com/vitejs/vite/issues/7262) -* fix: `import.meta.url` should not throw (#7219) ([5de3a98](https://github.com/vitejs/vite/commit/5de3a98)), closes [#7219](https://github.com/vitejs/vite/issues/7219) -* fix: allow `localhost` as a valid hostname (#7092) ([4194cce](https://github.com/vitejs/vite/commit/4194cce)), closes [#7092](https://github.com/vitejs/vite/issues/7092) -* fix: build optimize deps metada location (#7214) ([dc46adf](https://github.com/vitejs/vite/commit/dc46adf)), closes [#7214](https://github.com/vitejs/vite/issues/7214) -* fix: define plugin not ignore file names (#6340) ([7215a03](https://github.com/vitejs/vite/commit/7215a03)), closes [#6340](https://github.com/vitejs/vite/issues/6340) -* fix: deprecate `{ assert: { type: raw }}` in favor of `{ as: raw }` (fix #7017) (#7215) ([87ecce5](https://github.com/vitejs/vite/commit/87ecce5)), closes [#7017](https://github.com/vitejs/vite/issues/7017) [#7215](https://github.com/vitejs/vite/issues/7215) -* fix: execute classic worker in dev mode (#7099) ([3c0a609](https://github.com/vitejs/vite/commit/3c0a609)), closes [#7099](https://github.com/vitejs/vite/issues/7099) -* fix: handle files with multiple comments (#7202) ([3f5b645](https://github.com/vitejs/vite/commit/3f5b645)), closes [#7202](https://github.com/vitejs/vite/issues/7202) -* fix: honor the host param when creating a websocket server (#5617) ([882c8a8](https://github.com/vitejs/vite/commit/882c8a8)), closes [#5617](https://github.com/vitejs/vite/issues/5617) -* fix: import css in less/scss (fix 3293) (#7147) ([9b51a3a](https://github.com/vitejs/vite/commit/9b51a3a)), closes [#7147](https://github.com/vitejs/vite/issues/7147) -* fix: optimizeDeps.include missing in known imports fallback (#7218) ([6c08c86](https://github.com/vitejs/vite/commit/6c08c86)), closes [#7218](https://github.com/vitejs/vite/issues/7218) -* fix: prevent loading env outside of root (#6995) ([e0a4d81](https://github.com/vitejs/vite/commit/e0a4d81)), closes [#6995](https://github.com/vitejs/vite/issues/6995) -* fix: reoptimize deps on esbuild options change (#6855) ([4517c2b](https://github.com/vitejs/vite/commit/4517c2b)), closes [#6855](https://github.com/vitejs/vite/issues/6855) -* fix: replacing compression with modern version (#6557) ([5648d09](https://github.com/vitejs/vite/commit/5648d09)), closes [#6557](https://github.com/vitejs/vite/issues/6557) -* fix: restart optimize (#7004) ([47fbe29](https://github.com/vitejs/vite/commit/47fbe29)), closes [#7004](https://github.com/vitejs/vite/issues/7004) -* fix: reusing variable names in html module scripts (fix #6851) (#6818) ([c46b56d](https://github.com/vitejs/vite/commit/c46b56d)), closes [#6851](https://github.com/vitejs/vite/issues/6851) [#6818](https://github.com/vitejs/vite/issues/6818) -* fix: revert #6340, definePlugin tests, warning box (#7174) ([6cb0647](https://github.com/vitejs/vite/commit/6cb0647)), closes [#6340](https://github.com/vitejs/vite/issues/6340) [#7174](https://github.com/vitejs/vite/issues/7174) -* fix: update postcss-load-config to load PostCSS plugins based on their config file path (#6856) ([f02f961](https://github.com/vitejs/vite/commit/f02f961)), closes [#6856](https://github.com/vitejs/vite/issues/6856) -* fix(hmr): client pinging behind a proxy on websocket disconnect (fix #4501) (#5466) ([96573db](https://github.com/vitejs/vite/commit/96573db)), closes [#4501](https://github.com/vitejs/vite/issues/4501) [#5466](https://github.com/vitejs/vite/issues/5466) -* fix(html): build mode ignore html define transform (#6663) ([79dd003](https://github.com/vitejs/vite/commit/79dd003)), closes [#6663](https://github.com/vitejs/vite/issues/6663) -* fix(json): load json module error (#6352) ([c8a7ea8](https://github.com/vitejs/vite/commit/c8a7ea8)), closes [#6352](https://github.com/vitejs/vite/issues/6352) -* fix(optimizer): add missing keys to hash (#7189) ([b0c0efe](https://github.com/vitejs/vite/commit/b0c0efe)), closes [#7189](https://github.com/vitejs/vite/issues/7189) -* fix(resolve): try .tsx extension for .js import from typescript module (#7005) ([72b8cb6](https://github.com/vitejs/vite/commit/72b8cb6)), closes [#7005](https://github.com/vitejs/vite/issues/7005) -* fix(server): base middleware redirect with search and hash (#6574) ([a516e85](https://github.com/vitejs/vite/commit/a516e85)), closes [#6574](https://github.com/vitejs/vite/issues/6574) -* fix(server): ensure consistency for url to file mapping in importAnalysis and static middleware (#65 ([b214115](https://github.com/vitejs/vite/commit/b214115)), closes [#6518](https://github.com/vitejs/vite/issues/6518) -* fix(ssr): bypass missing resolve error in SSR (#7164) ([a4927c5](https://github.com/vitejs/vite/commit/a4927c5)), closes [#7164](https://github.com/vitejs/vite/issues/7164) - - -### Features - -* feat(worker): Add sourcemap support for worker bundles (#5417) ([465b6b9](https://github.com/vitejs/vite/commit/465b6b9)), closes [#5417](https://github.com/vitejs/vite/issues/5417) -* feat(type): support typing for custom events (#7476) ([50a8765](https://github.com/vitejs/vite/commit/50a8765)), closes [#7476](https://github.com/vitejs/vite/issues/7476) -* refactor(types): share hot context type (#7475) ([64ddff0](https://github.com/vitejs/vite/commit/64ddff0)), closes [#7475](https://github.com/vitejs/vite/issues/7475) -* feat: support importing css with ?raw (#5796) ([fedb106](https://github.com/vitejs/vite/commit/fedb106)), closes [#5796](https://github.com/vitejs/vite/issues/5796) -* feat(css): css.devSourcemap option (#7471) ([57f14cb](https://github.com/vitejs/vite/commit/57f14cb)), closes [#7471](https://github.com/vitejs/vite/issues/7471) -* feat(dev): expose APIs for client-server communication (#7437) ([e29ea8e](https://github.com/vitejs/vite/commit/e29ea8e)), closes [#7437](https://github.com/vitejs/vite/issues/7437) -* feat: hide optimized deps found during scan phase logs (#7419) ([f4934e8](https://github.com/vitejs/vite/commit/f4934e8)), closes [#7419](https://github.com/vitejs/vite/issues/7419) -* feat: non-blocking scanning of dependencies (#7379) ([676f545](https://github.com/vitejs/vite/commit/676f545)), closes [#7379](https://github.com/vitejs/vite/issues/7379) -* feat: css sourcemap support during dev (#7173) ([38a655f](https://github.com/vitejs/vite/commit/38a655f)), closes [#7173](https://github.com/vitejs/vite/issues/7173) -* feat: expose ssrRewriteStacktrace (#7091) ([d4ae45d](https://github.com/vitejs/vite/commit/d4ae45d)), closes [#7091](https://github.com/vitejs/vite/issues/7091) -* feat: add `importedCss` and `importedAssets` to RenderedChunk type (#6629) ([8d0fc90](https://github.com/vitejs/vite/commit/8d0fc90)), closes [#6629](https://github.com/vitejs/vite/issues/6629) -* feat: non-blocking pre bundling of dependencies (#6758) ([24bb3e4](https://github.com/vitejs/vite/commit/24bb3e4)), closes [#6758](https://github.com/vitejs/vite/issues/6758) -* feat: optimize custom extensions (#6801) ([c11af23](https://github.com/vitejs/vite/commit/c11af23)), closes [#6801](https://github.com/vitejs/vite/issues/6801) -* feat: show all prebundle deps when debug (#6726) ([e626055](https://github.com/vitejs/vite/commit/e626055)), closes [#6726](https://github.com/vitejs/vite/issues/6726) -* feat(glob): import.meta.glob support alias path (#6526) ([86882ad](https://github.com/vitejs/vite/commit/86882ad)), closes [#6526](https://github.com/vitejs/vite/issues/6526) -* feat(perf): tsconfck perf improvement (#7055) ([993ea39](https://github.com/vitejs/vite/commit/993ea39)), closes [#7055](https://github.com/vitejs/vite/issues/7055) -* feat(worker): bundle worker emit asset file (#6599) ([0ade335](https://github.com/vitejs/vite/commit/0ade335)), closes [#6599](https://github.com/vitejs/vite/issues/6599) -* refactor: avoid splitting vendor chunk by default (#6534) ([849e845](https://github.com/vitejs/vite/commit/849e845)), closes [#6534](https://github.com/vitejs/vite/issues/6534) - - -### Beta Changelogs - - -#### [2.9.0-beta.11](https://github.com/vitejs/vite/compare/v2.9.0-beta.10...v2.9.0-beta.11) (2022-03-29) - -See [2.9.0-beta.11 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.11/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.10](https://github.com/vitejs/vite/compare/v2.9.0-beta.9...v2.9.0-beta.10) (2022-03-28) - -See [2.9.0-beta.10 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.10/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.9](https://github.com/vitejs/vite/compare/v2.9.0-beta.8...v2.9.0-beta.9) (2022-03-26) - -See [2.9.0-beta.9 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.9/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.8](https://github.com/vitejs/vite/compare/v2.9.0-beta.7...v2.9.0-beta.8) (2022-03-24) - -See [2.9.0-beta.8 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.8/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.7](https://github.com/vitejs/vite/compare/v2.9.0-beta.6...v2.9.0-beta.7) (2022-03-23) - -See [2.9.0-beta.7 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.7/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.6](https://github.com/vitejs/vite/compare/v2.9.0-beta.5...v2.9.0-beta.6) (2022-03-22) - -See [2.9.0-beta.6 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.6/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.5](https://github.com/vitejs/vite/compare/v2.9.0-beta.4...v2.9.0-beta.5) (2022-03-22) - -See [2.9.0-beta.5 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.5/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.4](https://github.com/vitejs/vite/compare/v2.9.0-beta.3...v2.9.0-beta.4) (2022-03-19) - -See [2.9.0-beta.4 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.4/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.3](https://github.com/vitejs/vite/compare/v2.9.0-beta.2...v2.9.0-beta.3) (2022-03-16) - -See [2.9.0-beta.3 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.3/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.2](https://github.com/vitejs/vite/compare/v2.9.0-beta.1...v2.9.0-beta.2) (2022-03-14) - -See [2.9.0-beta.2 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.2/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.1](https://github.com/vitejs/vite/compare/v2.9.0-beta.0...v2.9.0-beta.1) (2022-03-14) - -See [2.9.0-beta.1 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.1/packages/vite/CHANGELOG.md) - - -#### [2.9.0-beta.0](https://github.com/vitejs/vite/compare/v2.8.6...v2.9.0-beta.0) (2022-03-09) - -See [2.9.0-beta.0 changelog](https://github.com/vitejs/vite/blob/v2.9.0-beta.0/packages/vite/CHANGELOG.md) - - - -## [2.8.6](https://github.com/vitejs/vite/compare/v2.8.5...v2.8.6) (2022-03-01) - - -### Bug Fixes - -* revert [#7052](https://github.com/vitejs/vite/issues/7052), hmr style tag no support in html ([#7136](https://github.com/vitejs/vite/issues/7136)) ([5c116ec](https://github.com/vitejs/vite/commit/5c116ecde0ad43409334853457d68481a22e19d4)) -* throw Error when can't preload CSS ([#7108](https://github.com/vitejs/vite/issues/7108)) ([d9f8edb](https://github.com/vitejs/vite/commit/d9f8edbd5b243f60212cc4bb9271c01b7e3fdd76)) - - - -## [2.8.5](https://github.com/vitejs/vite/compare/v2.8.4...v2.8.5) (2022-02-28) - - -### Bug Fixes - -* ?html-proxy with trailing = added by some servers ([#7093](https://github.com/vitejs/vite/issues/7093)) ([5818ac9](https://github.com/vitejs/vite/commit/5818ac927861783ea2b05450761fed30f40e7399)) -* allow optional trailing comma in asset `import.meta.url` ([#6983](https://github.com/vitejs/vite/issues/6983)) ([2debb9f](https://github.com/vitejs/vite/commit/2debb9f4cbb6003e7d24444cf049b45582d82ff1)) -* cannot reassign process.env.NODE_ENV in ssr ([#6989](https://github.com/vitejs/vite/issues/6989)) ([983feb2](https://github.com/vitejs/vite/commit/983feb2cdc5180dc46c3f5fc5b99baaa8d6b7078)) -* **config:** Warn about terserOptions in more cases ([#7101](https://github.com/vitejs/vite/issues/7101)) ([79428ad](https://github.com/vitejs/vite/commit/79428ad5b849455e14f95d1b439ae296ba231221)) -* don't override user config ([#7034](https://github.com/vitejs/vite/issues/7034)) ([8fd8f6e](https://github.com/vitejs/vite/commit/8fd8f6e0e501c9e46bc3e179c900d31fa5cafce1)) -* fileToBuiltUrl got undefined when file type is `.ico` ([#7106](https://github.com/vitejs/vite/issues/7106)) ([7a1a552](https://github.com/vitejs/vite/commit/7a1a552ba710bad5714ef0fbb16fdd29ac58ae0b)) -* **glob:** css imports injecting a ?used query to export the css string ([#6949](https://github.com/vitejs/vite/issues/6949)) ([0b3f4ef](https://github.com/vitejs/vite/commit/0b3f4ef231004e072bf1b037f63bc4ef169d938e)) -* **hmr:** hmr style tag no support in html ([#7052](https://github.com/vitejs/vite/issues/7052)) ([a9dfce3](https://github.com/vitejs/vite/commit/a9dfce38108e796e0de0e3b43ced34d60883cef3)) -* image -> image/x-icon ([#7120](https://github.com/vitejs/vite/issues/7120)) ([065ceca](https://github.com/vitejs/vite/commit/065ceca5c7b8f1843e220fbdbe8a0da4cbb78935)) -* import with query with exports field ([#7073](https://github.com/vitejs/vite/issues/7073)) ([88ded7f](https://github.com/vitejs/vite/commit/88ded7f16382d83603511de043785e01ee1e4a3a)) -* prebundle dep with colon ([#7006](https://github.com/vitejs/vite/issues/7006)) ([2136f2b](https://github.com/vitejs/vite/commit/2136f2bb960d1a81ac3b3ca04d9ebd89dba44661)) -* recycle serve to avoid preventing Node self-exit ([#6895](https://github.com/vitejs/vite/issues/6895)) ([d6b2c53](https://github.com/vitejs/vite/commit/d6b2c53c6f0bcc4ffa9cdf48375f9bbcc98f79f7)) -* resolve [@import](https://github.com/import) of the proxied -
-
-
-

-    

-    

-    
+
+
+
+

+    

+    

+    
Click outside or fix the code to dismiss.
You can also disable this overlay by setting server.hmr.overlay to false in vite.config.js. @@ -132,7 +136,7 @@ const { HTMLElement = class {} as typeof globalThis.HTMLElement } = globalThis export class ErrorOverlay extends HTMLElement { root: ShadowRoot - constructor(err: ErrorPayload['err']) { + constructor(err: ErrorPayload['err'], links = true) { super() this.root = this.attachShadow({ mode: 'open' }) this.root.innerHTML = template @@ -149,7 +153,7 @@ export class ErrorOverlay extends HTMLElement { const [file] = (err.loc?.file || err.id || 'unknown file').split(`?`) if (err.loc) { - this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, true) + this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, links) } else if (err.id) { this.text('.file', file) } @@ -157,7 +161,7 @@ export class ErrorOverlay extends HTMLElement { if (hasFrame) { this.text('.frame', err.frame!.trim()) } - this.text('.stack', err.stack, true) + this.text('.stack', err.stack, links) this.root.querySelector('.window')!.addEventListener('click', (e) => { e.stopPropagation() From fb8ab1641feb597f5ba51f8e6e043d2ce3980e08 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Sep 2022 17:11:42 -0400 Subject: [PATCH 199/311] feat: support import.meta.hot.invalidate (#10244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com> Co-authored-by: 翠 / green --- docs/guide/api-hmr.md | 14 +++++++++++++- packages/vite/src/client-types.d.ts | 3 ++- packages/vite/src/client/client.ts | 6 +++--- packages/vite/src/node/index.ts | 6 +++++- packages/vite/src/node/server/index.ts | 16 +++++++++++++++- packages/vite/src/types/customEvent.d.ts | 5 +++++ packages/vite/types/customEvent.d.ts | 6 +++++- playground/hmr/__tests__/hmr.spec.ts | 24 ++++++++++++++++++++++-- playground/hmr/hmr.ts | 5 +++++ playground/hmr/index.html | 1 + playground/hmr/invalidation/child.js | 9 +++++++++ playground/hmr/invalidation/parent.js | 9 +++++++++ 12 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 playground/hmr/invalidation/child.js create mode 100644 playground/hmr/invalidation/parent.js diff --git a/docs/guide/api-hmr.md b/docs/guide/api-hmr.md index 3b416169f5231a..12a859370d2e11 100644 --- a/docs/guide/api-hmr.md +++ b/docs/guide/api-hmr.md @@ -125,7 +125,18 @@ Calling `import.meta.hot.decline()` indicates this module is not hot-updatable, ## `hot.invalidate()` -For now, calling `import.meta.hot.invalidate()` simply reloads the page. +A self-accepting module may realize during runtime that it can't handle a HMR update, and so the update needs to be forcefully propagated to importers. By calling `import.meta.hot.invalidate()`, the HMR server will invalidate the importers of the caller, as if the caller wasn't self-accepting. + +Note that you should always call `import.meta.hot.accept` even if you plan to call `invalidate` immediately afterwards, or else the HMR client won't listen for future changes to the self-accepting module. To communicate your intent clearly, we recommend calling `invalidate` within the `accept` callback like so: + + ```ts + import.meta.hot.accept(module => { + // You may use the new module instance to decide whether to invalidate. + if (cannotHandleUpdate(module)) { + import.meta.hot.invalidate() + } + }) + ``` ## `hot.on(event, cb)` @@ -136,6 +147,7 @@ The following HMR events are dispatched by Vite automatically: - `'vite:beforeUpdate'` when an update is about to be applied (e.g. a module will be replaced) - `'vite:beforeFullReload'` when a full reload is about to occur - `'vite:beforePrune'` when modules that are no longer needed are about to be pruned +- `'vite:invalidate'` when a module is invalidated with `import.meta.hot.invalidate()` - `'vite:error'` when an error occurs (e.g. syntax error) Custom HMR events can also be sent from plugins. See [handleHotUpdate](./api-plugin#handlehotupdate) for more details. diff --git a/packages/vite/src/client-types.d.ts b/packages/vite/src/client-types.d.ts index 270a1ac29f2d8b..cca320bc5d4e1b 100644 --- a/packages/vite/src/client-types.d.ts +++ b/packages/vite/src/client-types.d.ts @@ -1,6 +1,7 @@ export type { CustomEventMap, - InferCustomEventPayload + InferCustomEventPayload, + InvalidatePayload } from './types/customEvent' export type { HMRPayload, diff --git a/packages/vite/src/client/client.ts b/packages/vite/src/client/client.ts index 83465d794358e2..3f974e77d9b52b 100644 --- a/packages/vite/src/client/client.ts +++ b/packages/vite/src/client/client.ts @@ -546,10 +546,10 @@ export function createHotContext(ownerPath: string): ViteHotContext { // eslint-disable-next-line @typescript-eslint/no-empty-function decline() {}, + // tell the server to re-perform hmr propagation from this module as root invalidate() { - // TODO should tell the server to re-perform hmr propagation - // from this module as root - location.reload() + notifyListeners('vite:invalidate', { path: ownerPath }) + this.send('vite:invalidate', { path: ownerPath }) }, // custom events diff --git a/packages/vite/src/node/index.ts b/packages/vite/src/node/index.ts index 2bc81f001d6947..0e246615bfa5f3 100644 --- a/packages/vite/src/node/index.ts +++ b/packages/vite/src/node/index.ts @@ -102,7 +102,11 @@ export type { PrunePayload, ErrorPayload } from 'types/hmrPayload' -export type { CustomEventMap, InferCustomEventPayload } from 'types/customEvent' +export type { + CustomEventMap, + InferCustomEventPayload, + InvalidatePayload +} from 'types/customEvent' // [deprecated: use vite/client/types instead] export type { ImportGlobFunction, diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 57a6a01e1fea12..77b91a4dfd6dba 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -13,6 +13,7 @@ import launchEditorMiddleware from 'launch-editor-middleware' import type { SourceMap } from 'rollup' import picomatch from 'picomatch' import type { Matcher } from 'picomatch' +import type { InvalidatePayload } from 'types/customEvent' import type { CommonServerOptions } from '../http' import { httpServerStart, @@ -67,7 +68,12 @@ import { timeMiddleware } from './middlewares/time' import { ModuleGraph } from './moduleGraph' import { errorMiddleware, prepareError } from './middlewares/error' import type { HmrOptions } from './hmr' -import { handleFileAddUnlink, handleHMRUpdate } from './hmr' +import { + getShortName, + handleFileAddUnlink, + handleHMRUpdate, + updateModules +} from './hmr' import { openBrowser } from './openBrowser' import type { TransformOptions, TransformResult } from './transformRequest' import { transformRequest } from './transformRequest' @@ -489,6 +495,14 @@ export async function createServer( handleFileAddUnlink(normalizePath(file), server) }) + ws.on('vite:invalidate', async ({ path }: InvalidatePayload) => { + const mod = moduleGraph.urlToModuleMap.get(path) + if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) { + const file = getShortName(mod.file!, config.root) + updateModules(file, [...mod.importers], mod.lastHMRTimestamp, server) + } + }) + if (!middlewareMode && httpServer) { httpServer.once('listening', () => { // update actual port since this may be different from initial value diff --git a/packages/vite/src/types/customEvent.d.ts b/packages/vite/src/types/customEvent.d.ts index af4db5d14fbe97..839e17dd729eda 100644 --- a/packages/vite/src/types/customEvent.d.ts +++ b/packages/vite/src/types/customEvent.d.ts @@ -10,6 +10,11 @@ export interface CustomEventMap { 'vite:beforePrune': PrunePayload 'vite:beforeFullReload': FullReloadPayload 'vite:error': ErrorPayload + 'vite:invalidate': InvalidatePayload +} + +export interface InvalidatePayload { + path: string } export type InferCustomEventPayload = diff --git a/packages/vite/types/customEvent.d.ts b/packages/vite/types/customEvent.d.ts index 09fd7dc36ea481..d5bdbde98984fb 100644 --- a/packages/vite/types/customEvent.d.ts +++ b/packages/vite/types/customEvent.d.ts @@ -1 +1,5 @@ -export type { CustomEventMap, InferCustomEventPayload } from '../client/types' +export type { + CustomEventMap, + InferCustomEventPayload, + InvalidatePayload +} from '../client/types' diff --git a/playground/hmr/__tests__/hmr.spec.ts b/playground/hmr/__tests__/hmr.spec.ts index ef8def29a389a5..70d5a1b9ace52e 100644 --- a/playground/hmr/__tests__/hmr.spec.ts +++ b/playground/hmr/__tests__/hmr.spec.ts @@ -18,14 +18,14 @@ test('should render', async () => { if (!isBuild) { test('should connect', async () => { - expect(browserLogs.length).toBe(2) + expect(browserLogs.length).toBe(3) expect(browserLogs.some((msg) => msg.match('connected'))).toBe(true) browserLogs.length = 0 }) test('self accept', async () => { const el = await page.$('.app') - + browserLogs.length = 0 editFile('hmr.ts', (code) => code.replace('const foo = 1', 'const foo = 2')) await untilUpdated(() => el.textContent(), '2') @@ -91,6 +91,7 @@ if (!isBuild) { test('nested dep propagation', async () => { const el = await page.$('.nested') + browserLogs.length = 0 editFile('hmrNestedDep.js', (code) => code.replace('const foo = 1', 'const foo = 2') @@ -127,6 +128,25 @@ if (!isBuild) { browserLogs.length = 0 }) + test('invalidate', async () => { + browserLogs.length = 0 + const el = await page.$('.invalidation') + + editFile('invalidation/child.js', (code) => + code.replace('child', 'child updated') + ) + await untilUpdated(() => el.textContent(), 'child updated') + expect(browserLogs).toMatchObject([ + '>>> vite:beforeUpdate -- update', + '>>> vite:invalidate -- /invalidation/child.js', + '[vite] hot updated: /invalidation/child.js', + '>>> vite:beforeUpdate -- update', + '(invalidation) parent is executing', + '[vite] hot updated: /invalidation/parent.js' + ]) + browserLogs.length = 0 + }) + test('plugin hmr handler + custom event', async () => { const el = await page.$('.custom') editFile('customFile.js', (code) => code.replace('custom', 'edited')) diff --git a/playground/hmr/hmr.ts b/playground/hmr/hmr.ts index dc3c22eac9d56e..473dff9fdbfb88 100644 --- a/playground/hmr/hmr.ts +++ b/playground/hmr/hmr.ts @@ -2,6 +2,7 @@ import { virtual } from 'virtual:file' import { foo as depFoo, nestedFoo } from './hmrDep' import './importing-updated' +import './invalidation/parent' export const foo = 1 text('.app', foo) @@ -88,6 +89,10 @@ if (import.meta.hot) { console.log(`>>> vite:error -- ${event.type}`) }) + import.meta.hot.on('vite:invalidate', ({ path }) => { + console.log(`>>> vite:invalidate -- ${path}`) + }) + import.meta.hot.on('custom:foo', ({ msg }) => { text('.custom', msg) }) diff --git a/playground/hmr/index.html b/playground/hmr/index.html index 28f08014036ade..b8d6065a9fd5e2 100644 --- a/playground/hmr/index.html +++ b/playground/hmr/index.html @@ -20,6 +20,7 @@
+
diff --git a/playground/hmr/invalidation/child.js b/playground/hmr/invalidation/child.js new file mode 100644 index 00000000000000..b424e2f83c3233 --- /dev/null +++ b/playground/hmr/invalidation/child.js @@ -0,0 +1,9 @@ +if (import.meta.hot) { + // Need to accept, to register a callback for HMR + import.meta.hot.accept(() => { + // Trigger HMR in importers + import.meta.hot.invalidate() + }) +} + +export const value = 'child' diff --git a/playground/hmr/invalidation/parent.js b/playground/hmr/invalidation/parent.js new file mode 100644 index 00000000000000..0b10298fff1aa4 --- /dev/null +++ b/playground/hmr/invalidation/parent.js @@ -0,0 +1,9 @@ +import { value } from './child' + +if (import.meta.hot) { + import.meta.hot.accept() +} + +console.log('(invalidation) parent is executing') + +document.querySelector('.invalidation').innerHTML = value From 931d69b4d3cfebe641b93867191a7d411593f554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Barr=C3=A9?= Date: Thu, 29 Sep 2022 17:56:25 +0200 Subject: [PATCH 200/311] feat(optimizer): Support bun lockfile format (#10288) --- packages/vite/src/node/optimizer/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index eb9b51aa472e59..94447b9403393b 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -1042,7 +1042,12 @@ function isSingleDefaultExport(exports: readonly string[]) { return exports.length === 1 && exports[0] === 'default' } -const lockfileFormats = ['package-lock.json', 'yarn.lock', 'pnpm-lock.yaml'] +const lockfileFormats = [ + 'package-lock.json', + 'yarn.lock', + 'pnpm-lock.yaml', + 'bun.lockb' +] export function getDepHash(config: ResolvedConfig, ssr: boolean): string { let content = lookupFile(config.root, lockfileFormats) || '' From 291174d89c5c6af8e4890324545d079954ab4bf7 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Fri, 30 Sep 2022 17:29:26 +0800 Subject: [PATCH 201/311] refactor(types): simplify type exports (#10243) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 翠 / green --- .eslintignore | 1 - .eslintrc.cjs | 2 +- .gitignore | 1 - .prettierignore | 1 - CONTRIBUTING.md | 4 +- docs/guide/api-plugin.md | 21 +--- packages/vite/api-extractor.client.json | 54 --------- packages/vite/client.d.ts | 2 +- packages/vite/import-meta.d.ts | 10 -- packages/vite/package.json | 27 ++--- packages/vite/scripts/patchTypes.ts | 83 -------------- packages/vite/scripts/postPatchTypes.ts | 16 +++ packages/vite/scripts/prePatchTypes.ts | 23 ++++ packages/vite/scripts/util.ts | 72 ++++++++++++ packages/vite/src/client-types.d.ts | 24 ---- packages/vite/src/dep-types/package.json | 3 - .../__snapshots__/fixture.test.ts.snap | 6 +- .../plugins/importGlob/fixture-a/index.ts | 6 +- .../vite/src/{dep-types => types}/alias.d.ts | 0 .../src/{dep-types => types}/anymatch.d.ts | 0 .../src/{dep-types => types}/chokidar.d.ts | 0 .../src/{dep-types => types}/commonjs.d.ts | 0 .../src/{dep-types => types}/connect.d.ts | 0 packages/vite/src/types/customEvent.d.ts | 21 ---- .../dynamicImportVars.d.ts | 0 packages/vite/src/types/hmrPayload.d.ts | 61 ---------- packages/vite/src/types/hot.d.ts | 33 ------ .../src/{dep-types => types}/http-proxy.d.ts | 0 packages/vite/src/types/importGlob.d.ts | 97 ---------------- packages/vite/src/types/importMeta.d.ts | 25 ----- .../vite/src/{dep-types => types}/shims.d.ts | 0 .../vite/src/{dep-types => types}/terser.d.ts | 0 .../vite/src/{dep-types => types}/ws.d.ts | 0 packages/vite/types/customEvent.d.ts | 26 ++++- packages/vite/types/hmrPayload.d.ts | 71 ++++++++++-- packages/vite/types/hot.d.ts | 34 +++++- packages/vite/types/importGlob.d.ts | 104 ++++++++++++++++-- packages/vite/types/importMeta.d.ts | 39 +++++-- playground/hmr/event.d.ts | 21 ++-- pnpm-lock.yaml | 8 +- 40 files changed, 386 insertions(+), 510 deletions(-) delete mode 100644 packages/vite/api-extractor.client.json delete mode 100644 packages/vite/import-meta.d.ts delete mode 100644 packages/vite/scripts/patchTypes.ts create mode 100644 packages/vite/scripts/postPatchTypes.ts create mode 100644 packages/vite/scripts/prePatchTypes.ts create mode 100644 packages/vite/scripts/util.ts delete mode 100644 packages/vite/src/client-types.d.ts delete mode 100644 packages/vite/src/dep-types/package.json rename packages/vite/src/{dep-types => types}/alias.d.ts (100%) rename packages/vite/src/{dep-types => types}/anymatch.d.ts (100%) rename packages/vite/src/{dep-types => types}/chokidar.d.ts (100%) rename packages/vite/src/{dep-types => types}/commonjs.d.ts (100%) rename packages/vite/src/{dep-types => types}/connect.d.ts (100%) delete mode 100644 packages/vite/src/types/customEvent.d.ts rename packages/vite/src/{dep-types => types}/dynamicImportVars.d.ts (100%) delete mode 100644 packages/vite/src/types/hmrPayload.d.ts delete mode 100644 packages/vite/src/types/hot.d.ts rename packages/vite/src/{dep-types => types}/http-proxy.d.ts (100%) delete mode 100644 packages/vite/src/types/importGlob.d.ts delete mode 100644 packages/vite/src/types/importMeta.d.ts rename packages/vite/src/{dep-types => types}/shims.d.ts (100%) rename packages/vite/src/{dep-types => types}/terser.d.ts (100%) rename packages/vite/src/{dep-types => types}/ws.d.ts (100%) diff --git a/.eslintignore b/.eslintignore index 833faed81beb2b..2974196847e467 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ dist playground-temp temp -packages/vite/client/types.d.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2ce0e4fbf59c67..6333ec251973c0 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -131,7 +131,7 @@ module.exports = defineConfig({ } }, { - files: ['packages/vite/src/dep-types/**', '*.spec.ts'], + files: ['packages/vite/src/types/**', '*.spec.ts'], rules: { 'node/no-extraneous-import': 'off' } diff --git a/.gitignore b/.gitignore index 8aafb6ab143259..7f1cab0e1f4356 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ *.local *.log /.vscode/ -/packages/vite/client/types.d.ts /packages/vite/LICENSE dist dist-ssr diff --git a/.prettierignore b/.prettierignore index be3598b2ccb5b3..b1ea458b9bb9d8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,4 +9,3 @@ playground/tsconfig-json-load-error/has-error/tsconfig.json playground/html/invalid.html playground/html/valid.html playground/worker/classic-worker.js -packages/vite/client/types.d.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2f04ce43f86c7..78271bb6768b3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,10 +218,12 @@ Avoid deps with large transitive dependencies that result in bloated size compar Vite aims to be fully usable as a dependency in a TypeScript project (e.g. it should provide proper typings for VitePress), and also in `vite.config.ts`. This means technically a dependency whose types are exposed needs to be part of `dependencies` instead of `devDependencies`. However, this also means we won't be able to bundle it. -To get around this, we inline some of these dependencies' types in `packages/vite/src/dep-types`. This way, we can still expose the typing but bundle the dependency's source code. +To get around this, we inline some of these dependencies' types in `packages/vite/src/types`. This way, we can still expose the typing but bundle the dependency's source code. Use `pnpm run check-dist-types` to check that the bundled types do not rely on types in `devDependencies`. If you are adding `dependencies`, make sure to configure `tsconfig.check.json`. +For types shared between client and node, they should be added into `packages/vite/types`. These types are not bundled and are published as is (though they are still considered internal). Dependency types within this directory (e.g. `packages/vite/types/chokidar.d.ts`) are deprecated and should be added to `packages/vite/src/types` instead. + ### Think Before Adding Yet Another Option We already have many config options, and we should avoid fixing an issue by adding yet another one. Before adding an option, consider whether the problem: diff --git a/docs/guide/api-plugin.md b/docs/guide/api-plugin.md index 33d8ba0e9802b7..c18c6daca3263f 100644 --- a/docs/guide/api-plugin.md +++ b/docs/guide/api-plugin.md @@ -595,21 +595,12 @@ It is possible to type custom events by extending the `CustomEventMap` interface ```ts // events.d.ts -import 'vite' -import 'vite/client/types' +import 'vite/types/customEvent' -interface MyCustomEventMap { - 'custom:foo': { msg: string } - // 'event-key': payload -} - -// extend interface for server-side -declare module 'vite' { - interface CustomEventMap extends MyCustomEventMap {} -} - -// extend interface for client-side -declare module 'vite/client/types' { - interface CustomEventMap extends MyCustomEventMap {} +declare module 'vite/types/customEvent' { + interface CustomEventMap { + 'custom:foo': { msg: string } + // 'event-key': payload + } } ``` diff --git a/packages/vite/api-extractor.client.json b/packages/vite/api-extractor.client.json deleted file mode 100644 index 81188aa4870d54..00000000000000 --- a/packages/vite/api-extractor.client.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - "projectFolder": "./src/client", - - "mainEntryPointFilePath": "./src/client-types.d.ts", - - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "", - "publicTrimmedFilePath": "./client/types.d.ts" - }, - - "apiReport": { - "enabled": false - }, - - "docModel": { - "enabled": false - }, - - "tsdocMetadata": { - "enabled": false - }, - - "messages": { - "compilerMessageReporting": { - "default": { - "logLevel": "warning" - } - }, - - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - "addToApiReportFile": true - }, - - "ae-missing-release-tag": { - "logLevel": "none" - } - }, - - "tsdocMessageReporting": { - "default": { - "logLevel": "warning" - }, - - "tsdoc-undefined-tag": { - "logLevel": "none" - } - } - } -} diff --git a/packages/vite/client.d.ts b/packages/vite/client.d.ts index 5ee6940825b119..e99b4a526b7a58 100644 --- a/packages/vite/client.d.ts +++ b/packages/vite/client.d.ts @@ -1,4 +1,4 @@ -/// +/// // CSS modules type CSSModuleClasses = { readonly [key: string]: string } diff --git a/packages/vite/import-meta.d.ts b/packages/vite/import-meta.d.ts deleted file mode 100644 index 73baf3c106c74f..00000000000000 --- a/packages/vite/import-meta.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { - ImportMeta as ViteImportMeta, - ImportMetaEnv as ViteImportMetaEnv - // eslint-disable-next-line node/no-missing-import -- use .js for `moduleResolution: "nodenext"` -} from './client/types.js' - -declare global { - interface ImportMeta extends ViteImportMeta {} - interface ImportMetaEnv extends ViteImportMetaEnv {} -} diff --git a/packages/vite/package.json b/packages/vite/package.json index 935a1dffa13461..a567a7afc3790c 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -20,12 +20,6 @@ "./client": { "types": "./client.d.ts" }, - "./import-meta": { - "types": "./import-meta.d.ts" - }, - "./client/types": { - "types": "./client/types.d.ts" - }, "./dist/client/*": "./dist/client/*", "./package.json": "./package.json" }, @@ -33,11 +27,9 @@ "bin", "dist", "client.d.ts", - "import-meta.d.ts", "index.cjs", "src/client", - "types", - "client/types.d.ts" + "types" ], "engines": { "node": "^14.18.0 || >=16.0.0" @@ -55,13 +47,12 @@ "dev": "rimraf dist && pnpm run build-bundle -w", "build": "rimraf dist && run-s build-bundle build-types", "build-bundle": "rollup --config rollup.config.ts --configPlugin typescript", - "build-types": "run-p build-node-types build-client-types", - "build-node-types": "run-s build-node-types-temp build-node-types-patch build-node-types-roll build-node-types-check", - "build-node-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node", - "build-node-types-patch": "tsx scripts/patchTypes.ts", - "build-node-types-roll": "api-extractor run && rimraf temp", - "build-node-types-check": "tsc --project tsconfig.check.json", - "build-client-types": "api-extractor run -c api-extractor.client.json", + "build-types": "run-s build-types-temp build-types-pre-patch build-types-roll build-types-post-patch build-types-check", + "build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node", + "build-types-pre-patch": "tsx scripts/prePatchTypes.ts", + "build-types-roll": "api-extractor run && rimraf temp", + "build-types-post-patch": "tsx scripts/postPatchTypes.ts", + "build-types-check": "tsc --project tsconfig.check.json", "lint": "eslint --cache --ext .ts src/**", "format": "prettier --write --cache --parser typescript \"src/**/*.ts\"", "prepublishOnly": "npm run build" @@ -127,8 +118,8 @@ "strip-literal": "^0.4.2", "tsconfck": "^2.0.1", "tslib": "^2.4.0", - "dep-types": "link:./src/dep-types", - "types": "link:./src/types", + "dep-types": "link:./src/types", + "types": "link:./types", "ufo": "^0.8.5", "ws": "^8.9.0" }, diff --git a/packages/vite/scripts/patchTypes.ts b/packages/vite/scripts/patchTypes.ts deleted file mode 100644 index 8d86c9c7b76292..00000000000000 --- a/packages/vite/scripts/patchTypes.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs' -import { dirname, relative, resolve } from 'node:path' -import { fileURLToPath } from 'node:url' -import type { ParseResult } from '@babel/parser' -import { parse } from '@babel/parser' -import type { File, StringLiteral } from '@babel/types' -import colors from 'picocolors' -import MagicString from 'magic-string' - -const dir = dirname(fileURLToPath(import.meta.url)) -const tempDir = resolve(dir, '../temp/node') -const typesDir = resolve(dir, '../src/types') -const depTypesDir = resolve(dir, '../src/dep-types') - -// walk through the temp dts dir, find all import/export of types/*, deps-types/* -// and rewrite them into relative imports - so that api-extractor actually -// includes them in the rolled-up final d.ts file. -walkDir(tempDir) -console.log(colors.green(colors.bold(`patched types/*, deps-types/* imports`))) - -function slash(p: string): string { - return p.replace(/\\/g, '/') -} - -function walkDir(dir: string): void { - const files = readdirSync(dir) - for (const file of files) { - const resolved = resolve(dir, file) - const isDir = statSync(resolved).isDirectory() - if (isDir) { - walkDir(resolved) - } else { - rewriteFile(resolved) - } - } -} - -function rewriteFile(file: string): void { - const content = readFileSync(file, 'utf-8') - const str = new MagicString(content) - let ast: ParseResult - try { - ast = parse(content, { - sourceType: 'module', - plugins: ['typescript', 'classProperties'] - }) - } catch (e) { - console.log(colors.red(`failed to parse ${file}`)) - throw e - } - for (const statement of ast.program.body) { - if ( - statement.type === 'ImportDeclaration' || - statement.type === 'ExportNamedDeclaration' || - statement.type === 'ExportAllDeclaration' - ) { - const source = statement.source - if (source?.value.startsWith('types/')) { - rewriteSource(str, source, file, typesDir, 'types') - } else if (source?.value.startsWith('dep-types/')) { - rewriteSource(str, source, file, depTypesDir, 'dep-types') - } - } - } - writeFileSync(file, str.toString()) -} - -function rewriteSource( - str: MagicString, - source: StringLiteral, - rewritingFile: string, - typesDir: string, - typesDirName: string -) { - const absoluteTypePath = resolve( - typesDir, - source.value.slice(typesDirName.length + 1) - ) - const relativeTypePath = slash( - relative(dirname(rewritingFile), absoluteTypePath) - ) - str.overwrite(source.start!, source.end!, JSON.stringify(relativeTypePath)) -} diff --git a/packages/vite/scripts/postPatchTypes.ts b/packages/vite/scripts/postPatchTypes.ts new file mode 100644 index 00000000000000..95f3fc217efcb0 --- /dev/null +++ b/packages/vite/scripts/postPatchTypes.ts @@ -0,0 +1,16 @@ +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import colors from 'picocolors' +import { rewriteImports } from './util' + +const dir = dirname(fileURLToPath(import.meta.url)) +const nodeDts = resolve(dir, '../dist/node/index.d.ts') + +// rewrite `types/*` import to relative import +rewriteImports(nodeDts, (importPath) => { + if (importPath.startsWith('types/')) { + return '../../' + importPath + } +}) + +console.log(colors.green(colors.bold(`patched types/* imports`))) diff --git a/packages/vite/scripts/prePatchTypes.ts b/packages/vite/scripts/prePatchTypes.ts new file mode 100644 index 00000000000000..eda006b476209d --- /dev/null +++ b/packages/vite/scripts/prePatchTypes.ts @@ -0,0 +1,23 @@ +import { dirname, relative, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import colors from 'picocolors' +import { rewriteImports, slash } from './util' + +const dir = dirname(fileURLToPath(import.meta.url)) +const tempDir = resolve(dir, '../temp/node') +const depTypesDir = resolve(dir, '../src/types') + +// walk through the temp dts dir, find all import/export of, deps-types/* +// and rewrite them into relative imports - so that api-extractor actually +// includes them in the rolled-up final d.ts file. +rewriteImports(tempDir, (importPath, currentFile) => { + if (importPath.startsWith('dep-types/')) { + const absoluteTypePath = resolve( + depTypesDir, + importPath.slice('dep-types/'.length) + ) + return slash(relative(dirname(currentFile), absoluteTypePath)) + } +}) + +console.log(colors.green(colors.bold(`patched deps-types/* imports`))) diff --git a/packages/vite/scripts/util.ts b/packages/vite/scripts/util.ts new file mode 100644 index 00000000000000..4cc867afe82801 --- /dev/null +++ b/packages/vite/scripts/util.ts @@ -0,0 +1,72 @@ +import { readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs' +import { resolve } from 'node:path' +import type { ParseResult } from '@babel/parser' +import { parse } from '@babel/parser' +import type { File } from '@babel/types' +import colors from 'picocolors' +import MagicString from 'magic-string' + +export function rewriteImports( + fileOrDir: string, + rewrite: (importPath: string, currentFile: string) => string | void +): void { + walkDir(fileOrDir, (file) => { + rewriteFileImports(file, (importPath) => { + return rewrite(importPath, file) + }) + }) +} + +export function slash(p: string): string { + return p.replace(/\\/g, '/') +} + +function walkDir(dir: string, handleFile: (file: string) => void): void { + if (statSync(dir).isDirectory()) { + const files = readdirSync(dir) + for (const file of files) { + const resolved = resolve(dir, file) + walkDir(resolved, handleFile) + } + } else { + handleFile(dir) + } +} + +function rewriteFileImports( + file: string, + rewrite: (importPath: string) => string | void +): void { + const content = readFileSync(file, 'utf-8') + const str = new MagicString(content) + let ast: ParseResult + try { + ast = parse(content, { + sourceType: 'module', + plugins: ['typescript', 'classProperties'] + }) + } catch (e) { + console.log(colors.red(`failed to parse ${file}`)) + throw e + } + for (const statement of ast.program.body) { + if ( + statement.type === 'ImportDeclaration' || + statement.type === 'ExportNamedDeclaration' || + statement.type === 'ExportAllDeclaration' + ) { + const source = statement.source + if (source?.value) { + const newImportPath = rewrite(source.value) + if (newImportPath) { + str.overwrite( + source.start!, + source.end!, + JSON.stringify(newImportPath) + ) + } + } + } + } + writeFileSync(file, str.toString()) +} diff --git a/packages/vite/src/client-types.d.ts b/packages/vite/src/client-types.d.ts deleted file mode 100644 index cca320bc5d4e1b..00000000000000 --- a/packages/vite/src/client-types.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export type { - CustomEventMap, - InferCustomEventPayload, - InvalidatePayload -} from './types/customEvent' -export type { - HMRPayload, - ConnectedPayload, - UpdatePayload, - Update, - PrunePayload, - FullReloadPayload, - CustomPayload, - ErrorPayload -} from './types/hmrPayload' -export type { ModuleNamespace, ViteHotContext } from './types/hot' -export type { - ImportGlobOptions, - GeneralImportGlobOptions, - KnownAsTypeMap, - ImportGlobFunction, - ImportGlobEagerFunction -} from './types/importGlob' -export type { ImportMetaEnv, ImportMeta } from './types/importMeta' diff --git a/packages/vite/src/dep-types/package.json b/packages/vite/src/dep-types/package.json deleted file mode 100644 index 3d6a75c81455a0..00000000000000 --- a/packages/vite/src/dep-types/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "//": "this file is just here to make pnpm happy with --frozen-lockfile" -} diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap b/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap index f4103222acebdd..e638850c4ce0b0 100644 --- a/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap +++ b/packages/vite/src/node/__tests__/plugins/importGlob/__snapshots__/fixture.test.ts.snap @@ -1,7 +1,8 @@ // Vitest Snapshot v1 exports[`fixture > transform 1`] = ` -"import * as __vite_glob_1_0 from \\"./modules/a.ts\\";import * as __vite_glob_1_1 from \\"./modules/b.ts\\";import * as __vite_glob_1_2 from \\"./modules/index.ts\\";import { name as __vite_glob_3_0 } from \\"./modules/a.ts\\";import { name as __vite_glob_3_1 } from \\"./modules/b.ts\\";import { name as __vite_glob_3_2 } from \\"./modules/index.ts\\";import { default as __vite_glob_5_0 } from \\"./modules/a.ts?raw\\";import { default as __vite_glob_5_1 } from \\"./modules/b.ts?raw\\";export const basic = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); +"import * as __vite_glob_1_0 from \\"./modules/a.ts\\";import * as __vite_glob_1_1 from \\"./modules/b.ts\\";import * as __vite_glob_1_2 from \\"./modules/index.ts\\";import { name as __vite_glob_3_0 } from \\"./modules/a.ts\\";import { name as __vite_glob_3_1 } from \\"./modules/b.ts\\";import { name as __vite_glob_3_2 } from \\"./modules/index.ts\\";import { default as __vite_glob_5_0 } from \\"./modules/a.ts?raw\\";import { default as __vite_glob_5_1 } from \\"./modules/b.ts?raw\\";import \\"types/importMeta\\"; +export const basic = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); export const basicEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_1_0,\\"./modules/b.ts\\": __vite_glob_1_1,\\"./modules/index.ts\\": __vite_glob_1_2}); export const ignore = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\")}); export const namedEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_3_0,\\"./modules/b.ts\\": __vite_glob_3_1,\\"./modules/index.ts\\": __vite_glob_3_2}); @@ -19,7 +20,8 @@ export const cleverCwd2 = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": ( `; exports[`fixture > transform with restoreQueryExtension 1`] = ` -"import * as __vite_glob_1_0 from \\"./modules/a.ts\\";import * as __vite_glob_1_1 from \\"./modules/b.ts\\";import * as __vite_glob_1_2 from \\"./modules/index.ts\\";import { name as __vite_glob_3_0 } from \\"./modules/a.ts\\";import { name as __vite_glob_3_1 } from \\"./modules/b.ts\\";import { name as __vite_glob_3_2 } from \\"./modules/index.ts\\";import { default as __vite_glob_5_0 } from \\"./modules/a.ts?raw\\";import { default as __vite_glob_5_1 } from \\"./modules/b.ts?raw\\";export const basic = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); +"import * as __vite_glob_1_0 from \\"./modules/a.ts\\";import * as __vite_glob_1_1 from \\"./modules/b.ts\\";import * as __vite_glob_1_2 from \\"./modules/index.ts\\";import { name as __vite_glob_3_0 } from \\"./modules/a.ts\\";import { name as __vite_glob_3_1 } from \\"./modules/b.ts\\";import { name as __vite_glob_3_2 } from \\"./modules/index.ts\\";import { default as __vite_glob_5_0 } from \\"./modules/a.ts?raw\\";import { default as __vite_glob_5_1 } from \\"./modules/b.ts?raw\\";import \\"types/importMeta\\"; +export const basic = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\"),\\"./modules/index.ts\\": () => import(\\"./modules/index.ts\\")}); export const basicEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_1_0,\\"./modules/b.ts\\": __vite_glob_1_1,\\"./modules/index.ts\\": __vite_glob_1_2}); export const ignore = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": () => import(\\"./modules/a.ts\\"),\\"./modules/b.ts\\": () => import(\\"./modules/b.ts\\")}); export const namedEager = /* #__PURE__ */ Object.assign({\\"./modules/a.ts\\": __vite_glob_3_0,\\"./modules/b.ts\\": __vite_glob_3_1,\\"./modules/index.ts\\": __vite_glob_3_2}); diff --git a/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts b/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts index ccf47d4edca6cf..452336631be666 100644 --- a/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts +++ b/packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts @@ -1,8 +1,4 @@ -import type { ImportMeta as ViteImportMeta } from 'types/importMeta' - -declare global { - interface ImportMeta extends ViteImportMeta {} -} +import 'types/importMeta' export interface ModuleType { name: string diff --git a/packages/vite/src/dep-types/alias.d.ts b/packages/vite/src/types/alias.d.ts similarity index 100% rename from packages/vite/src/dep-types/alias.d.ts rename to packages/vite/src/types/alias.d.ts diff --git a/packages/vite/src/dep-types/anymatch.d.ts b/packages/vite/src/types/anymatch.d.ts similarity index 100% rename from packages/vite/src/dep-types/anymatch.d.ts rename to packages/vite/src/types/anymatch.d.ts diff --git a/packages/vite/src/dep-types/chokidar.d.ts b/packages/vite/src/types/chokidar.d.ts similarity index 100% rename from packages/vite/src/dep-types/chokidar.d.ts rename to packages/vite/src/types/chokidar.d.ts diff --git a/packages/vite/src/dep-types/commonjs.d.ts b/packages/vite/src/types/commonjs.d.ts similarity index 100% rename from packages/vite/src/dep-types/commonjs.d.ts rename to packages/vite/src/types/commonjs.d.ts diff --git a/packages/vite/src/dep-types/connect.d.ts b/packages/vite/src/types/connect.d.ts similarity index 100% rename from packages/vite/src/dep-types/connect.d.ts rename to packages/vite/src/types/connect.d.ts diff --git a/packages/vite/src/types/customEvent.d.ts b/packages/vite/src/types/customEvent.d.ts deleted file mode 100644 index 839e17dd729eda..00000000000000 --- a/packages/vite/src/types/customEvent.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { - ErrorPayload, - FullReloadPayload, - PrunePayload, - UpdatePayload -} from './hmrPayload' - -export interface CustomEventMap { - 'vite:beforeUpdate': UpdatePayload - 'vite:beforePrune': PrunePayload - 'vite:beforeFullReload': FullReloadPayload - 'vite:error': ErrorPayload - 'vite:invalidate': InvalidatePayload -} - -export interface InvalidatePayload { - path: string -} - -export type InferCustomEventPayload = - T extends keyof CustomEventMap ? CustomEventMap[T] : any diff --git a/packages/vite/src/dep-types/dynamicImportVars.d.ts b/packages/vite/src/types/dynamicImportVars.d.ts similarity index 100% rename from packages/vite/src/dep-types/dynamicImportVars.d.ts rename to packages/vite/src/types/dynamicImportVars.d.ts diff --git a/packages/vite/src/types/hmrPayload.d.ts b/packages/vite/src/types/hmrPayload.d.ts deleted file mode 100644 index 839095009e76fb..00000000000000 --- a/packages/vite/src/types/hmrPayload.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -export type HMRPayload = - | ConnectedPayload - | UpdatePayload - | FullReloadPayload - | CustomPayload - | ErrorPayload - | PrunePayload - -export interface ConnectedPayload { - type: 'connected' -} - -export interface UpdatePayload { - type: 'update' - updates: Update[] -} - -export interface Update { - type: 'js-update' | 'css-update' - path: string - acceptedPath: string - timestamp: number - /** - * @experimental internal - */ - explicitImportRequired?: boolean | undefined -} - -export interface PrunePayload { - type: 'prune' - paths: string[] -} - -export interface FullReloadPayload { - type: 'full-reload' - path?: string -} - -export interface CustomPayload { - type: 'custom' - event: string - data?: any -} - -export interface ErrorPayload { - type: 'error' - err: { - [name: string]: any - message: string - stack: string - id?: string - frame?: string - plugin?: string - pluginCode?: string - loc?: { - file?: string - line: number - column: number - } - } -} diff --git a/packages/vite/src/types/hot.d.ts b/packages/vite/src/types/hot.d.ts deleted file mode 100644 index 985f3a47197c43..00000000000000 --- a/packages/vite/src/types/hot.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { InferCustomEventPayload } from './customEvent' - -export type ModuleNamespace = Record & { - [Symbol.toStringTag]: 'Module' -} - -export interface ViteHotContext { - readonly data: any - - accept(): void - accept(cb: (mod: ModuleNamespace | undefined) => void): void - accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void - accept( - deps: readonly string[], - cb: (mods: Array) => void - ): void - - acceptExports(exportNames: string | readonly string[]): void - acceptExports( - exportNames: string | readonly string[], - cb: (mod: ModuleNamespace | undefined) => void - ): void - - dispose(cb: (data: any) => void): void - decline(): void - invalidate(): void - - on( - event: T, - cb: (payload: InferCustomEventPayload) => void - ): void - send(event: T, data?: InferCustomEventPayload): void -} diff --git a/packages/vite/src/dep-types/http-proxy.d.ts b/packages/vite/src/types/http-proxy.d.ts similarity index 100% rename from packages/vite/src/dep-types/http-proxy.d.ts rename to packages/vite/src/types/http-proxy.d.ts diff --git a/packages/vite/src/types/importGlob.d.ts b/packages/vite/src/types/importGlob.d.ts deleted file mode 100644 index 321e3804a7e09a..00000000000000 --- a/packages/vite/src/types/importGlob.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -export interface ImportGlobOptions< - Eager extends boolean, - AsType extends string -> { - /** - * Import type for the import url. - */ - as?: AsType - /** - * Import as static or dynamic - * - * @default false - */ - eager?: Eager - /** - * Import only the specific named export. Set to `default` to import the default export. - */ - import?: string - /** - * Custom queries - */ - query?: string | Record - /** - * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance. - * - * @default false - */ - exhaustive?: boolean -} - -export type GeneralImportGlobOptions = ImportGlobOptions - -export interface KnownAsTypeMap { - raw: string - url: string - worker: Worker -} - -export interface ImportGlobFunction { - /** - * Import a list of files with a glob pattern. - * - * Overload 1: No generic provided, infer the type from `eager` and `as` - */ - < - Eager extends boolean, - As extends string, - T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown - >( - glob: string | string[], - options?: ImportGlobOptions - ): (Eager extends true ? true : false) extends true - ? Record - : Record Promise> - /** - * Import a list of files with a glob pattern. - * - * Overload 2: Module generic provided, infer the type from `eager: false` - */ - ( - glob: string | string[], - options?: ImportGlobOptions - ): Record Promise> - /** - * Import a list of files with a glob pattern. - * - * Overload 3: Module generic provided, infer the type from `eager: true` - */ - ( - glob: string | string[], - options: ImportGlobOptions - ): Record -} - -export interface ImportGlobEagerFunction { - /** - * Eagerly import a list of files with a glob pattern. - * - * Overload 1: No generic provided, infer the type from `as` - */ - < - As extends string, - T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown - >( - glob: string | string[], - options?: Omit, 'eager'> - ): Record - /** - * Eagerly import a list of files with a glob pattern. - * - * Overload 2: Module generic provided - */ - ( - glob: string | string[], - options?: Omit, 'eager'> - ): Record -} diff --git a/packages/vite/src/types/importMeta.d.ts b/packages/vite/src/types/importMeta.d.ts deleted file mode 100644 index 794c27c73c102c..00000000000000 --- a/packages/vite/src/types/importMeta.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { ViteHotContext } from './hot' -import type { ImportGlobEagerFunction, ImportGlobFunction } from './importGlob' - -export interface ImportMetaEnv { - [key: string]: any - BASE_URL: string - MODE: string - DEV: boolean - PROD: boolean - SSR: boolean -} - -export interface ImportMeta { - url: string - - readonly hot?: ViteHotContext - - readonly env: ImportMetaEnv - - glob: ImportGlobFunction - /** - * @deprecated Use `import.meta.glob('*', { eager: true })` instead - */ - globEager: ImportGlobEagerFunction -} diff --git a/packages/vite/src/dep-types/shims.d.ts b/packages/vite/src/types/shims.d.ts similarity index 100% rename from packages/vite/src/dep-types/shims.d.ts rename to packages/vite/src/types/shims.d.ts diff --git a/packages/vite/src/dep-types/terser.d.ts b/packages/vite/src/types/terser.d.ts similarity index 100% rename from packages/vite/src/dep-types/terser.d.ts rename to packages/vite/src/types/terser.d.ts diff --git a/packages/vite/src/dep-types/ws.d.ts b/packages/vite/src/types/ws.d.ts similarity index 100% rename from packages/vite/src/dep-types/ws.d.ts rename to packages/vite/src/types/ws.d.ts diff --git a/packages/vite/types/customEvent.d.ts b/packages/vite/types/customEvent.d.ts index d5bdbde98984fb..839e17dd729eda 100644 --- a/packages/vite/types/customEvent.d.ts +++ b/packages/vite/types/customEvent.d.ts @@ -1,5 +1,21 @@ -export type { - CustomEventMap, - InferCustomEventPayload, - InvalidatePayload -} from '../client/types' +import type { + ErrorPayload, + FullReloadPayload, + PrunePayload, + UpdatePayload +} from './hmrPayload' + +export interface CustomEventMap { + 'vite:beforeUpdate': UpdatePayload + 'vite:beforePrune': PrunePayload + 'vite:beforeFullReload': FullReloadPayload + 'vite:error': ErrorPayload + 'vite:invalidate': InvalidatePayload +} + +export interface InvalidatePayload { + path: string +} + +export type InferCustomEventPayload = + T extends keyof CustomEventMap ? CustomEventMap[T] : any diff --git a/packages/vite/types/hmrPayload.d.ts b/packages/vite/types/hmrPayload.d.ts index 8bbb5e2fdf3e57..839095009e76fb 100644 --- a/packages/vite/types/hmrPayload.d.ts +++ b/packages/vite/types/hmrPayload.d.ts @@ -1,10 +1,61 @@ -export type { - HMRPayload, - ConnectedPayload, - UpdatePayload, - Update, - PrunePayload, - FullReloadPayload, - CustomPayload, - ErrorPayload -} from '../client/types' +export type HMRPayload = + | ConnectedPayload + | UpdatePayload + | FullReloadPayload + | CustomPayload + | ErrorPayload + | PrunePayload + +export interface ConnectedPayload { + type: 'connected' +} + +export interface UpdatePayload { + type: 'update' + updates: Update[] +} + +export interface Update { + type: 'js-update' | 'css-update' + path: string + acceptedPath: string + timestamp: number + /** + * @experimental internal + */ + explicitImportRequired?: boolean | undefined +} + +export interface PrunePayload { + type: 'prune' + paths: string[] +} + +export interface FullReloadPayload { + type: 'full-reload' + path?: string +} + +export interface CustomPayload { + type: 'custom' + event: string + data?: any +} + +export interface ErrorPayload { + type: 'error' + err: { + [name: string]: any + message: string + stack: string + id?: string + frame?: string + plugin?: string + pluginCode?: string + loc?: { + file?: string + line: number + column: number + } + } +} diff --git a/packages/vite/types/hot.d.ts b/packages/vite/types/hot.d.ts index 83727b7019997e..985f3a47197c43 100644 --- a/packages/vite/types/hot.d.ts +++ b/packages/vite/types/hot.d.ts @@ -1 +1,33 @@ -export type { ModuleNamespace, ViteHotContext } from '../client/types' +import type { InferCustomEventPayload } from './customEvent' + +export type ModuleNamespace = Record & { + [Symbol.toStringTag]: 'Module' +} + +export interface ViteHotContext { + readonly data: any + + accept(): void + accept(cb: (mod: ModuleNamespace | undefined) => void): void + accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void + accept( + deps: readonly string[], + cb: (mods: Array) => void + ): void + + acceptExports(exportNames: string | readonly string[]): void + acceptExports( + exportNames: string | readonly string[], + cb: (mod: ModuleNamespace | undefined) => void + ): void + + dispose(cb: (data: any) => void): void + decline(): void + invalidate(): void + + on( + event: T, + cb: (payload: InferCustomEventPayload) => void + ): void + send(event: T, data?: InferCustomEventPayload): void +} diff --git a/packages/vite/types/importGlob.d.ts b/packages/vite/types/importGlob.d.ts index 7951020049d0dc..321e3804a7e09a 100644 --- a/packages/vite/types/importGlob.d.ts +++ b/packages/vite/types/importGlob.d.ts @@ -1,7 +1,97 @@ -export type { - ImportGlobOptions, - GeneralImportGlobOptions, - KnownAsTypeMap, - ImportGlobFunction, - ImportGlobEagerFunction -} from '../client/types' +export interface ImportGlobOptions< + Eager extends boolean, + AsType extends string +> { + /** + * Import type for the import url. + */ + as?: AsType + /** + * Import as static or dynamic + * + * @default false + */ + eager?: Eager + /** + * Import only the specific named export. Set to `default` to import the default export. + */ + import?: string + /** + * Custom queries + */ + query?: string | Record + /** + * Search files also inside `node_modules/` and hidden directories (e.g. `.git/`). This might have impact on performance. + * + * @default false + */ + exhaustive?: boolean +} + +export type GeneralImportGlobOptions = ImportGlobOptions + +export interface KnownAsTypeMap { + raw: string + url: string + worker: Worker +} + +export interface ImportGlobFunction { + /** + * Import a list of files with a glob pattern. + * + * Overload 1: No generic provided, infer the type from `eager` and `as` + */ + < + Eager extends boolean, + As extends string, + T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown + >( + glob: string | string[], + options?: ImportGlobOptions + ): (Eager extends true ? true : false) extends true + ? Record + : Record Promise> + /** + * Import a list of files with a glob pattern. + * + * Overload 2: Module generic provided, infer the type from `eager: false` + */ + ( + glob: string | string[], + options?: ImportGlobOptions + ): Record Promise> + /** + * Import a list of files with a glob pattern. + * + * Overload 3: Module generic provided, infer the type from `eager: true` + */ + ( + glob: string | string[], + options: ImportGlobOptions + ): Record +} + +export interface ImportGlobEagerFunction { + /** + * Eagerly import a list of files with a glob pattern. + * + * Overload 1: No generic provided, infer the type from `as` + */ + < + As extends string, + T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown + >( + glob: string | string[], + options?: Omit, 'eager'> + ): Record + /** + * Eagerly import a list of files with a glob pattern. + * + * Overload 2: Module generic provided + */ + ( + glob: string | string[], + options?: Omit, 'eager'> + ): Record +} diff --git a/packages/vite/types/importMeta.d.ts b/packages/vite/types/importMeta.d.ts index 97a9518f5d8e4f..da338b6833bed6 100644 --- a/packages/vite/types/importMeta.d.ts +++ b/packages/vite/types/importMeta.d.ts @@ -1,13 +1,28 @@ -import type { - ImportMeta as ViteImportMeta, - ImportMetaEnv as ViteImportMetaEnv -} from '../client/types' - -declare global { - interface GlobOptions { - as?: string - } - - interface ImportMeta extends ViteImportMeta {} - interface ImportMetaEnv extends ViteImportMetaEnv {} +// This file is an augmentation to the built-in ImportMeta interface +// Thus cannot contain any top-level imports +// + +/* eslint-disable @typescript-eslint/consistent-type-imports */ + +interface ImportMetaEnv { + [key: string]: any + BASE_URL: string + MODE: string + DEV: boolean + PROD: boolean + SSR: boolean +} + +interface ImportMeta { + url: string + + readonly hot?: import('./hot').ViteHotContext + + readonly env: ImportMetaEnv + + glob: import('./importGlob').ImportGlobFunction + /** + * @deprecated Use `import.meta.glob('*', { eager: true })` instead + */ + globEager: import('./importGlob').ImportGlobEagerFunction } diff --git a/playground/hmr/event.d.ts b/playground/hmr/event.d.ts index 5b4818294ed744..151a9cc3b861cd 100644 --- a/playground/hmr/event.d.ts +++ b/playground/hmr/event.d.ts @@ -1,16 +1,9 @@ -import 'vite' -import 'vite/client/types' +import 'vite/types/customEvent' -interface MyCustomEventMap { - 'custom:foo': { msg: string } - 'custom:remote-add': { a: number; b: number } - 'custom:remote-add-result': { result: string } -} - -declare module 'vite' { - interface CustomEventMap extends MyCustomEventMap {} -} - -declare module 'vite/client/types' { - interface CustomEventMap extends MyCustomEventMap {} +declare module 'vite/types/customEvent' { + interface CustomEventMap { + 'custom:foo': { msg: string } + 'custom:remote-add': { a: number; b: number } + 'custom:remote-add-result': { result: string } + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab25134fb26652..21b4f10a506cf5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,7 +231,7 @@ importers: cors: ^2.8.5 cross-spawn: ^7.0.3 debug: ^4.3.4 - dep-types: link:./src/dep-types + dep-types: link:./src/types dotenv: ^14.3.2 dotenv-expand: ^5.1.0 es-module-lexer: ^1.0.3 @@ -267,7 +267,7 @@ importers: strip-literal: ^0.4.2 tsconfck: ^2.0.1 tslib: ^2.4.0 - types: link:./src/types + types: link:./types ufo: ^0.8.5 ws: ^8.9.0 dependencies: @@ -298,7 +298,7 @@ importers: cors: 2.8.5 cross-spawn: 7.0.3 debug: 4.3.4 - dep-types: link:src/dep-types + dep-types: link:src/types dotenv: 14.3.2 dotenv-expand: 5.1.0 es-module-lexer: 1.0.3 @@ -329,7 +329,7 @@ importers: strip-literal: 0.4.2 tsconfck: 2.0.1 tslib: 2.4.0 - types: link:src/types + types: link:types ufo: 0.8.5 ws: 8.9.0 From 8ede2f18f8a71350284241f2fbcb44f7ecf79e78 Mon Sep 17 00:00:00 2001 From: Vitaly Baev Date: Fri, 30 Sep 2022 12:48:53 +0300 Subject: [PATCH 202/311] feat: support postcss sugarss (#6705) --- packages/vite/package.json | 4 ++ packages/vite/src/node/optimizer/scan.ts | 3 +- packages/vite/src/node/plugins/css.ts | 58 +++++++++++++++++++----- playground/css/__tests__/css.spec.ts | 22 +++++++++ playground/css/index.html | 11 +++++ playground/css/main.js | 3 ++ playground/css/nested/nested.sss | 8 ++++ playground/css/package.json | 3 +- playground/css/sugarss.sss | 4 ++ pnpm-lock.yaml | 9 ++++ 10 files changed, 111 insertions(+), 14 deletions(-) create mode 100644 playground/css/nested/nested.sss create mode 100644 playground/css/sugarss.sss diff --git a/packages/vite/package.json b/packages/vite/package.json index a567a7afc3790c..e273c38c5ab166 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -127,6 +127,7 @@ "less": "*", "sass": "*", "stylus": "*", + "sugarss": "*", "terser": "^5.4.0" }, "peerDependenciesMeta": { @@ -139,6 +140,9 @@ "less": { "optional": true }, + "sugarss": { + "optional": true + }, "terser": { "optional": true } diff --git a/packages/vite/src/node/optimizer/scan.ts b/packages/vite/src/node/optimizer/scan.ts index a3b799dc91542b..e600e7ff69f96f 100644 --- a/packages/vite/src/node/optimizer/scan.ts +++ b/packages/vite/src/node/optimizer/scan.ts @@ -427,7 +427,8 @@ function esbuildScanPlugin( // css & json & wasm build.onResolve( { - filter: /\.(css|less|sass|scss|styl|stylus|pcss|postcss|json|wasm)$/ + filter: + /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss|json|wasm)$/ }, externalUnlessEntry ) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index 1f26f80d1e6d74..824dc8d571c91e 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -104,7 +104,7 @@ export interface CSSModulesOptions { | null } -const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\\?)` +const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)($|\\?)` const cssLangRE = new RegExp(cssLangs) const cssModuleRE = new RegExp(`\\.module${cssLangs}`) const directRequestRE = /(\?|&)direct\b/ @@ -127,7 +127,13 @@ const enum PreprocessLang { const enum PureCssLang { css = 'css' } -type CssLang = keyof typeof PureCssLang | keyof typeof PreprocessLang +const enum PostCssDialectLang { + sss = 'sugarss' +} +type CssLang = + | keyof typeof PureCssLang + | keyof typeof PreprocessLang + | keyof typeof PostCssDialectLang export const isCSSRequest = (request: string): boolean => cssLangRE.test(request) @@ -150,10 +156,10 @@ export const removedPureCssFilesCache = new WeakMap< export const cssEntryFilesCache = new WeakMap>() -const postcssConfigCache = new WeakMap< - ResolvedConfig, - PostCSSConfigResult | null ->() +const postcssConfigCache: Record< + string, + WeakMap +> = {} function encodePublicUrlsInCSS(config: ResolvedConfig) { return config.command === 'build' @@ -752,8 +758,8 @@ async function compileCSS( // crawl them in order to register watch dependencies. const needInlineImport = code.includes('@import') const hasUrl = cssUrlRE.test(code) || cssImageSetRE.test(code) - const postcssConfig = await resolvePostcssConfig(config) const lang = id.match(cssLangRE)?.[1] as CssLang | undefined + const postcssConfig = await resolvePostcssConfig(config, getCssDialect(lang)) // 1. plain css that needs no processing if ( @@ -827,6 +833,15 @@ async function compileCSS( // 3. postcss const postcssOptions = (postcssConfig && postcssConfig.options) || {} + + // for sugarss change parser + if (lang === 'sss') { + postcssOptions.parser = loadPreprocessor( + PostCssDialectLang.sss, + config.root + ) + } + const postcssPlugins = postcssConfig && postcssConfig.plugins ? postcssConfig.plugins.slice() : [] @@ -1050,9 +1065,15 @@ interface PostCSSConfigResult { } async function resolvePostcssConfig( - config: ResolvedConfig + config: ResolvedConfig, + dialect = 'css' ): Promise { - let result = postcssConfigCache.get(config) + postcssConfigCache[dialect] ??= new WeakMap< + ResolvedConfig, + PostCSSConfigResult | null + >() + + let result = postcssConfigCache[dialect].get(config) if (result !== undefined) { return result } @@ -1089,7 +1110,7 @@ async function resolvePostcssConfig( } } - postcssConfigCache.set(config, result) + postcssConfigCache[dialect].set(config, result) return result } @@ -1385,7 +1406,9 @@ export interface StylePreprocessorResults { deps: string[] } -const loadedPreprocessors: Partial> = {} +const loadedPreprocessors: Partial< + Record +> = {} // TODO: use dynamic import const _require = createRequire(import.meta.url) @@ -1397,7 +1420,14 @@ function loadPreprocessor( lang: PreprocessLang.stylus, root: string ): typeof Stylus -function loadPreprocessor(lang: PreprocessLang, root: string): any { +function loadPreprocessor( + lang: PostCssDialectLang.sss, + root: string +): PostCSS.Parser +function loadPreprocessor( + lang: PreprocessLang | PostCssDialectLang, + root: string +): any { if (lang in loadedPreprocessors) { return loadedPreprocessors[lang] } @@ -1809,3 +1839,7 @@ const preProcessors = Object.freeze({ function isPreProcessor(lang: any): lang is PreprocessLang { return lang && lang in preProcessors } + +function getCssDialect(lang: CssLang | undefined): string { + return lang === 'sss' ? 'sss' : 'css' +} diff --git a/playground/css/__tests__/css.spec.ts b/playground/css/__tests__/css.spec.ts index 689e9c925f644a..833063f61c7497 100644 --- a/playground/css/__tests__/css.spec.ts +++ b/playground/css/__tests__/css.spec.ts @@ -457,6 +457,28 @@ test.runIf(isBuild)('warning can be suppressed by esbuild.logOverride', () => { }) }) +test('sugarss', async () => { + const imported = await page.$('.sugarss') + const atImport = await page.$('.sugarss-at-import') + const atImportAlias = await page.$('.sugarss-at-import-alias') + + expect(await getColor(imported)).toBe('blue') + expect(await getColor(atImport)).toBe('darkslateblue') + expect(await getBg(atImport)).toMatch(isBuild ? /base64/ : '/nested/icon.png') + expect(await getColor(atImportAlias)).toBe('darkslateblue') + expect(await getBg(atImportAlias)).toMatch( + isBuild ? /base64/ : '/nested/icon.png' + ) + + editFile('sugarss.sss', (code) => code.replace('color: blue', 'color: coral')) + await untilUpdated(() => getColor(imported), 'coral') + + editFile('nested/nested.sss', (code) => + code.replace('color: darkslateblue', 'color: blue') + ) + await untilUpdated(() => getColor(atImport), 'blue') +}) + // NOTE: the match inline snapshot should generate by build mode test('async css order', async () => { await withRetry(async () => { diff --git a/playground/css/index.html b/playground/css/index.html index 61d0c2edce5bb8..799cfebf7adbe3 100644 --- a/playground/css/index.html +++ b/playground/css/index.html @@ -73,6 +73,17 @@

CSS

Imported Stylus string:


 
+  

SugarSS: This should be blue

+

+ @import from SugarSS: This should be darkslateblue and have bg image +

+

+ @import from SugarSS: This should be darkslateblue and have bg image which + url contains alias +

+

Imported SugarSS string:

+

+
   

CSS modules: this should be turquoise

Imported CSS module:


diff --git a/playground/css/main.js b/playground/css/main.js
index 4e1ed37754968f..68299638b78369 100644
--- a/playground/css/main.js
+++ b/playground/css/main.js
@@ -3,6 +3,9 @@ import './minify.css'
 import css from './imported.css'
 text('.imported-css', css)
 
+import sugarss from './sugarss.sss'
+text('.imported-sugarss', sugarss)
+
 import sass from './sass.scss'
 text('.imported-sass', sass)
 
diff --git a/playground/css/nested/nested.sss b/playground/css/nested/nested.sss
new file mode 100644
index 00000000000000..2de4c96564a100
--- /dev/null
+++ b/playground/css/nested/nested.sss
@@ -0,0 +1,8 @@
+.sugarss-at-import
+  color: darkslateblue
+  background: url(./icon.png) 10px no-repeat
+
+
+.sugarss-at-import-alias
+  color: darkslateblue
+  background: url(@/nested/icon.png) 10px no-repeat
diff --git a/playground/css/package.json b/playground/css/package.json
index a0d2bb41a00edf..5081b5462c2fa4 100644
--- a/playground/css/package.json
+++ b/playground/css/package.json
@@ -18,6 +18,7 @@
     "less": "^4.1.3",
     "postcss-nested": "^5.0.6",
     "sass": "^1.55.0",
-    "stylus": "^0.59.0"
+    "stylus": "^0.59.0",
+    "sugarss": "^4.0.1"
   }
 }
diff --git a/playground/css/sugarss.sss b/playground/css/sugarss.sss
new file mode 100644
index 00000000000000..cd393b10519041
--- /dev/null
+++ b/playground/css/sugarss.sss
@@ -0,0 +1,4 @@
+@import '@/nested/nested.sss'
+
+.sugarss
+  color: blue
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 21b4f10a506cf5..209ad19320eb7d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -397,6 +397,7 @@ importers:
       postcss-nested: ^5.0.6
       sass: ^1.55.0
       stylus: ^0.59.0
+      sugarss: ^4.0.1
     devDependencies:
       css-dep: link:css-dep
       css-js-dep: file:playground/css/css-js-dep
@@ -405,6 +406,7 @@ importers:
       postcss-nested: 5.0.6
       sass: 1.55.0
       stylus: 0.59.0
+      sugarss: 4.0.1
 
   playground/css-codesplit:
     specifiers: {}
@@ -8195,6 +8197,13 @@ packages:
       - supports-color
     dev: true
 
+  /sugarss/4.0.1:
+    resolution: {integrity: sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==}
+    engines: {node: '>=12.0'}
+    peerDependencies:
+      postcss: ^8.3.3
+    dev: true
+
   /supports-color/5.5.0:
     resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
     engines: {node: '>=4'}

From ee3231c90a5eaaefdba628c3c82bcad54060aeb6 Mon Sep 17 00:00:00 2001
From: qmhc <544022268@qq.com>
Date: Fri, 30 Sep 2022 20:17:08 +0800
Subject: [PATCH 203/311] fix: support process each out dir when there are two
 or more (#9748)

---
 packages/vite/src/node/build.ts | 101 +++++++++++++++++++-------------
 packages/vite/src/node/utils.ts |  35 ++++++++++-
 2 files changed, 92 insertions(+), 44 deletions(-)

diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts
index 3ef16ec019c6d5..fafd460e363d3b 100644
--- a/packages/vite/src/node/build.ts
+++ b/packages/vite/src/node/build.ts
@@ -559,20 +559,22 @@ async function doBuild(
       libOptions,
       config.logger
     )
+    const normalizedOutputs: OutputOptions[] = []
+
+    if (Array.isArray(outputs)) {
+      for (const resolvedOutput of outputs) {
+        normalizedOutputs.push(buildOutputOptions(resolvedOutput))
+      }
+    } else {
+      normalizedOutputs.push(buildOutputOptions(outputs))
+    }
+
+    const outDirs = normalizedOutputs.map(({ dir }) => resolve(dir!))
 
     // watch file changes with rollup
     if (config.build.watch) {
       config.logger.info(colors.cyan(`\nwatching for file changes...`))
 
-      const output: OutputOptions[] = []
-      if (Array.isArray(outputs)) {
-        for (const resolvedOutput of outputs) {
-          output.push(buildOutputOptions(resolvedOutput))
-        }
-      } else {
-        output.push(buildOutputOptions(outputs))
-      }
-
       const resolvedChokidarOptions = resolveChokidarOptions(
         config.build.watch.chokidar
       )
@@ -580,7 +582,7 @@ async function doBuild(
       const { watch } = await import('rollup')
       const watcher = watch({
         ...rollupOptions,
-        output,
+        output: normalizedOutputs,
         watch: {
           ...config.build.watch,
           chokidar: resolvedChokidarOptions
@@ -591,7 +593,7 @@ async function doBuild(
         if (event.code === 'BUNDLE_START') {
           config.logger.info(colors.cyan(`\nbuild started...`))
           if (options.write) {
-            prepareOutDir(outDir, options.emptyOutDir, config)
+            prepareOutDir(outDirs, options.emptyOutDir, config)
           }
         } else if (event.code === 'BUNDLE_END') {
           event.result.close()
@@ -610,24 +612,18 @@ async function doBuild(
     parallelBuilds.push(bundle)
 
     const generate = (output: OutputOptions = {}) => {
-      return bundle[options.write ? 'write' : 'generate'](
-        buildOutputOptions(output)
-      )
+      return bundle[options.write ? 'write' : 'generate'](output)
     }
 
     if (options.write) {
-      prepareOutDir(outDir, options.emptyOutDir, config)
+      prepareOutDir(outDirs, options.emptyOutDir, config)
     }
 
-    if (Array.isArray(outputs)) {
-      const res = []
-      for (const output of outputs) {
-        res.push(await generate(output))
-      }
-      return res
-    } else {
-      return await generate(outputs)
+    const res = []
+    for (const output of normalizedOutputs) {
+      res.push(await generate(output))
     }
+    return Array.isArray(outputs) ? res : res[0]
   } catch (e) {
     outputBuildError(e)
     throw e
@@ -635,30 +631,53 @@ async function doBuild(
 }
 
 function prepareOutDir(
-  outDir: string,
+  outDirs: string[],
   emptyOutDir: boolean | null,
   config: ResolvedConfig
 ) {
-  if (fs.existsSync(outDir)) {
-    if (
-      emptyOutDir == null &&
-      !normalizePath(outDir).startsWith(config.root + '/')
-    ) {
-      // warn if outDir is outside of root
-      config.logger.warn(
-        colors.yellow(
-          `\n${colors.bold(`(!)`)} outDir ${colors.white(
-            colors.dim(outDir)
-          )} is not inside project root and will not be emptied.\n` +
-            `Use --emptyOutDir to override.\n`
+  const nonDuplicateDirs = new Set(outDirs)
+  let outside = false
+  if (emptyOutDir == null) {
+    for (const outDir of nonDuplicateDirs) {
+      if (
+        fs.existsSync(outDir) &&
+        !normalizePath(outDir).startsWith(config.root + '/')
+      ) {
+        // warn if outDir is outside of root
+        config.logger.warn(
+          colors.yellow(
+            `\n${colors.bold(`(!)`)} outDir ${colors.white(
+              colors.dim(outDir)
+            )} is not inside project root and will not be emptied.\n` +
+              `Use --emptyOutDir to override.\n`
+          )
         )
-      )
-    } else if (emptyOutDir !== false) {
-      emptyDir(outDir, ['.git'])
+        outside = true
+        break
+      }
     }
   }
-  if (config.publicDir && fs.existsSync(config.publicDir)) {
-    copyDir(config.publicDir, outDir)
+  for (const outDir of nonDuplicateDirs) {
+    if (!outside && emptyOutDir !== false && fs.existsSync(outDir)) {
+      // skip those other outDirs which are nested in current outDir
+      const skipDirs = outDirs
+        .map((dir) => {
+          const relative = path.relative(outDir, dir)
+          if (
+            relative &&
+            !relative.startsWith('..') &&
+            !path.isAbsolute(relative)
+          ) {
+            return relative
+          }
+          return ''
+        })
+        .filter(Boolean)
+      emptyDir(outDir, [...skipDirs, '.git'])
+    }
+    if (config.publicDir && fs.existsSync(config.publicDir)) {
+      copyDir(config.publicDir, outDir)
+    }
   }
 }
 
diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts
index 2c6a8c790c607c..2711a29b7eb703 100644
--- a/packages/vite/src/node/utils.ts
+++ b/packages/vite/src/node/utils.ts
@@ -549,16 +549,45 @@ export function isFileReadable(filename: string): boolean {
   }
 }
 
+const splitFirstDirRE = /(.+?)[\\/](.+)/
+
 /**
  * Delete every file and subdirectory. **The given directory must exist.**
- * Pass an optional `skip` array to preserve files in the root directory.
+ * Pass an optional `skip` array to preserve files under the root directory.
  */
 export function emptyDir(dir: string, skip?: string[]): void {
+  const skipInDir: string[] = []
+  let nested: Map | null = null
+  if (skip?.length) {
+    for (const file of skip) {
+      if (path.dirname(file) !== '.') {
+        const matched = file.match(splitFirstDirRE)
+        if (matched) {
+          nested ??= new Map()
+          const [, nestedDir, skipPath] = matched
+          let nestedSkip = nested.get(nestedDir)
+          if (!nestedSkip) {
+            nestedSkip = []
+            nested.set(nestedDir, nestedSkip)
+          }
+          if (!nestedSkip.includes(skipPath)) {
+            nestedSkip.push(skipPath)
+          }
+        }
+      } else {
+        skipInDir.push(file)
+      }
+    }
+  }
   for (const file of fs.readdirSync(dir)) {
-    if (skip?.includes(file)) {
+    if (skipInDir.includes(file)) {
       continue
     }
-    fs.rmSync(path.resolve(dir, file), { recursive: true, force: true })
+    if (nested?.has(file)) {
+      emptyDir(path.resolve(dir, file), nested.get(file))
+    } else {
+      fs.rmSync(path.resolve(dir, file), { recursive: true, force: true })
+    }
   }
 }
 

From 65a0fad209821b2f8cd6f1cbabe5fe72f27e9b17 Mon Sep 17 00:00:00 2001
From: Marco Schumacher 
Date: Fri, 30 Sep 2022 17:31:21 +0200
Subject: [PATCH 204/311] feat(lib): allow multiple entries (#7047)

---
 docs/config/build-options.md                  |   4 +-
 docs/guide/build.md                           |  23 ++++
 .../vite/src/node/__tests__/build.spec.ts     | 130 ++++++++++++++++++
 packages/vite/src/node/build.ts               |  53 +++++--
 4 files changed, 194 insertions(+), 16 deletions(-)

diff --git a/docs/config/build-options.md b/docs/config/build-options.md
index 42e12d03b16cb2..a40f62f3ceb8a8 100644
--- a/docs/config/build-options.md
+++ b/docs/config/build-options.md
@@ -145,10 +145,10 @@ Options to pass on to [@rollup/plugin-dynamic-import-vars](https://github.com/ro
 
 ## build.lib
 
-- **Type:** `{ entry: string, name?: string, formats?: ('es' | 'cjs' | 'umd' | 'iife')[], fileName?: string | ((format: ModuleFormat) => string) }`
+- **Type:** `{ entry: string | string[] | { [entryAlias: string]: string }, name?: string, formats?: ('es' | 'cjs' | 'umd' | 'iife')[], fileName?: string | ((format: ModuleFormat, entryName: string) => string) }`
 - **Related:** [Library Mode](/guide/build#library-mode)
 
-Build as a library. `entry` is required since the library cannot use HTML as entry. `name` is the exposed global variable and is required when `formats` includes `'umd'` or `'iife'`. Default `formats` are `['es', 'umd']`. `fileName` is the name of the package file output, default `fileName` is the name option of package.json, it can also be defined as function taking the `format` as an argument.
+Build as a library. `entry` is required since the library cannot use HTML as entry. `name` is the exposed global variable and is required when `formats` includes `'umd'` or `'iife'`. Default `formats` are `['es', 'umd']`. `fileName` is the name of the package file output, default `fileName` is the name option of package.json, it can also be defined as function taking the `format` and `entryAlias` as arguments.
 
 ## build.manifest
 
diff --git a/docs/guide/build.md b/docs/guide/build.md
index 30dadbbb2473df..41376b46e5f2f8 100644
--- a/docs/guide/build.md
+++ b/docs/guide/build.md
@@ -128,6 +128,7 @@ import { defineConfig } from 'vite'
 export default defineConfig({
   build: {
     lib: {
+      // Could also be a dictionary or array of multiple entry points
       entry: resolve(__dirname, 'lib/main.js'),
       name: 'MyLib',
       // the proper extensions will be added
@@ -185,6 +186,28 @@ Recommended `package.json` for your lib:
 }
 ```
 
+Or, if exposing multiple entry points:
+
+```json
+{
+  "name": "my-lib",
+  "type": "module",
+  "files": ["dist"],
+  "main": "./dist/my-lib.cjs",
+  "module": "./dist/my-lib.mjs",
+  "exports": {
+    ".": {
+      "import": "./dist/my-lib.mjs",
+      "require": "./dist/my-lib.cjs"
+    },
+    "./secondary": {
+      "import": "./dist/secondary.mjs",
+      "require": "./dist/secondary.cjs"
+    }
+  }
+}
+```
+
 ::: tip Note
 If the `package.json` does not contain `"type": "module"`, Vite will generate different file extensions for Node.js compatibility. `.js` will become `.mjs` and `.cjs` will become `.js`.
 :::
diff --git a/packages/vite/src/node/__tests__/build.spec.ts b/packages/vite/src/node/__tests__/build.spec.ts
index a692041b0ba04c..e12187b1ce6dfc 100644
--- a/packages/vite/src/node/__tests__/build.spec.ts
+++ b/packages/vite/src/node/__tests__/build.spec.ts
@@ -20,6 +20,7 @@ describe('resolveLibFilename', () => {
         entry: 'mylib.js'
       },
       'es',
+      'myLib',
       resolve(__dirname, 'packages/name')
     )
 
@@ -33,6 +34,7 @@ describe('resolveLibFilename', () => {
         entry: 'mylib.js'
       },
       'es',
+      'myLib',
       resolve(__dirname, 'packages/name')
     )
 
@@ -45,6 +47,7 @@ describe('resolveLibFilename', () => {
         entry: 'mylib.js'
       },
       'es',
+      'myLib',
       resolve(__dirname, 'packages/name')
     )
 
@@ -58,6 +61,7 @@ describe('resolveLibFilename', () => {
         entry: 'mylib.js'
       },
       'es',
+      'myLib',
       resolve(__dirname, 'packages/noname')
     )
 
@@ -71,6 +75,7 @@ describe('resolveLibFilename', () => {
           entry: 'mylib.js'
         },
         'es',
+        'myLib',
         resolve(__dirname, 'packages/noname')
       )
     }).toThrow()
@@ -88,6 +93,7 @@ describe('resolveLibFilename', () => {
       const filename = resolveLibFilename(
         baseLibOptions,
         format,
+        'myLib',
         resolve(__dirname, 'packages/noname')
       )
 
@@ -107,10 +113,134 @@ describe('resolveLibFilename', () => {
       const filename = resolveLibFilename(
         baseLibOptions,
         format,
+        'myLib',
         resolve(__dirname, 'packages/module')
       )
 
       expect(expectedFilename).toBe(filename)
     }
   })
+
+  test('multiple entries with aliases', () => {
+    const libOptions: LibraryOptions = {
+      entry: {
+        entryA: 'entryA.js',
+        entryB: 'entryB.js'
+      }
+    }
+
+    const [fileName1, fileName2] = ['entryA', 'entryB'].map((entryAlias) =>
+      resolveLibFilename(
+        libOptions,
+        'es',
+        entryAlias,
+        resolve(__dirname, 'packages/name')
+      )
+    )
+
+    expect(fileName1).toBe('entryA.mjs')
+    expect(fileName2).toBe('entryB.mjs')
+  })
+
+  test('multiple entries with aliases: custom filename function', () => {
+    const libOptions: LibraryOptions = {
+      entry: {
+        entryA: 'entryA.js',
+        entryB: 'entryB.js'
+      },
+      fileName: (format, entryAlias) =>
+        `custom-filename-function.${entryAlias}.${format}.js`
+    }
+
+    const [fileName1, fileName2] = ['entryA', 'entryB'].map((entryAlias) =>
+      resolveLibFilename(
+        libOptions,
+        'es',
+        entryAlias,
+        resolve(__dirname, 'packages/name')
+      )
+    )
+
+    expect(fileName1).toBe('custom-filename-function.entryA.es.js')
+    expect(fileName2).toBe('custom-filename-function.entryB.es.js')
+  })
+
+  test('multiple entries with aliases: custom filename string', () => {
+    const libOptions: LibraryOptions = {
+      entry: {
+        entryA: 'entryA.js',
+        entryB: 'entryB.js'
+      },
+      fileName: 'custom-filename'
+    }
+
+    const [fileName1, fileName2] = ['entryA', 'entryB'].map((entryAlias) =>
+      resolveLibFilename(
+        libOptions,
+        'es',
+        entryAlias,
+        resolve(__dirname, 'packages/name')
+      )
+    )
+
+    expect(fileName1).toBe('custom-filename.mjs')
+    expect(fileName2).toBe('custom-filename.mjs')
+  })
+
+  test('multiple entries as array', () => {
+    const libOptions: LibraryOptions = {
+      entry: ['entryA.js', 'entryB.js']
+    }
+
+    const [fileName1, fileName2] = ['entryA', 'entryB'].map((entryAlias) =>
+      resolveLibFilename(
+        libOptions,
+        'es',
+        entryAlias,
+        resolve(__dirname, 'packages/name')
+      )
+    )
+
+    expect(fileName1).toBe('entryA.mjs')
+    expect(fileName2).toBe('entryB.mjs')
+  })
+
+  test('multiple entries as array: custom filename function', () => {
+    const libOptions: LibraryOptions = {
+      entry: ['entryA.js', 'entryB.js'],
+      fileName: (format, entryAlias) =>
+        `custom-filename-function.${entryAlias}.${format}.js`
+    }
+
+    const [fileName1, fileName2] = ['entryA', 'entryB'].map((entryAlias) =>
+      resolveLibFilename(
+        libOptions,
+        'es',
+        entryAlias,
+        resolve(__dirname, 'packages/name')
+      )
+    )
+
+    expect(fileName1).toBe('custom-filename-function.entryA.es.js')
+    expect(fileName2).toBe('custom-filename-function.entryB.es.js')
+  })
+
+  test('multiple entries as array: custom filename string', () => {
+    const libOptions: LibraryOptions = {
+      entry: ['entryA.js', 'entryB.js'],
+      fileName: 'custom-filename'
+    }
+
+    const [fileName1, fileName2] = ['entryA', 'entryB'].map((entryAlias) =>
+      resolveLibFilename(
+        libOptions,
+        'es',
+        entryAlias,
+        resolve(__dirname, 'packages/name')
+      )
+    )
+
+    expect(fileName1).toBe('custom-filename.mjs')
+    expect(fileName2).toBe('custom-filename.mjs')
+  })
 })
diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts
index fafd460e363d3b..9ed62f8d72b940 100644
--- a/packages/vite/src/node/build.ts
+++ b/packages/vite/src/node/build.ts
@@ -3,6 +3,7 @@ import path from 'node:path'
 import colors from 'picocolors'
 import type {
   ExternalOption,
+  InputOption,
   InternalModuleFormat,
   ModuleFormat,
   OutputOptions,
@@ -214,7 +215,7 @@ export interface LibraryOptions {
   /**
    * Path of library entry
    */
-  entry: string
+  entry: InputOption
   /**
    * The name of the exposed global variable. Required when the `formats` option includes
    * `umd` or `iife`
@@ -230,7 +231,7 @@ export interface LibraryOptions {
    * of the project package.json. It can also be defined as a function taking the
    * format as an argument.
    */
-  fileName?: string | ((format: ModuleFormat) => string)
+  fileName?: string | ((format: ModuleFormat, entryName: string) => string)
 }
 
 export type LibraryFormats = 'es' | 'cjs' | 'umd' | 'iife'
@@ -439,7 +440,17 @@ async function doBuild(
 
   const resolve = (p: string) => path.resolve(config.root, p)
   const input = libOptions
-    ? options.rollupOptions?.input || resolve(libOptions.entry)
+    ? options.rollupOptions?.input ||
+      (typeof libOptions.entry === 'string'
+        ? resolve(libOptions.entry)
+        : Array.isArray(libOptions.entry)
+        ? libOptions.entry.map(resolve)
+        : Object.fromEntries(
+            Object.entries(libOptions.entry).map(([alias, file]) => [
+              alias,
+              resolve(file)
+            ])
+          ))
     : typeof options.ssr === 'string'
     ? resolve(options.ssr)
     : options.rollupOptions?.input || resolve('index.html')
@@ -536,7 +547,8 @@ async function doBuild(
         entryFileNames: ssr
           ? `[name].${jsExt}`
           : libOptions
-          ? resolveLibFilename(libOptions, format, config.root, jsExt)
+          ? ({ name }) =>
+              resolveLibFilename(libOptions, format, name, config.root, jsExt)
           : path.posix.join(options.assetsDir, `[name].[hash].${jsExt}`),
         chunkFileNames: libOptions
           ? `[name].[hash].${jsExt}`
@@ -705,15 +717,20 @@ function resolveOutputJsExtension(
 export function resolveLibFilename(
   libOptions: LibraryOptions,
   format: ModuleFormat,
+  entryName: string,
   root: string,
   extension?: JsExt
 ): string {
   if (typeof libOptions.fileName === 'function') {
-    return libOptions.fileName(format)
+    return libOptions.fileName(format, entryName)
   }
 
   const packageJson = getPkgJson(root)
-  const name = libOptions.fileName || getPkgName(packageJson.name)
+  const name =
+    libOptions.fileName ||
+    (typeof libOptions.entry === 'string'
+      ? getPkgName(packageJson.name)
+      : entryName)
 
   if (!name)
     throw new Error(
@@ -736,14 +753,22 @@ function resolveBuildOutputs(
 ): OutputOptions | OutputOptions[] | undefined {
   if (libOptions) {
     const formats = libOptions.formats || ['es', 'umd']
-    if (
-      (formats.includes('umd') || formats.includes('iife')) &&
-      !libOptions.name
-    ) {
-      throw new Error(
-        `Option "build.lib.name" is required when output formats ` +
-          `include "umd" or "iife".`
-      )
+    if (formats.includes('umd') || formats.includes('iife')) {
+      if (
+        typeof libOptions.entry !== 'string' &&
+        Object.values(libOptions.entry).length > 1
+      ) {
+        throw new Error(
+          `Multiple entry points are not supported when output formats include "umd" or "iife".`
+        )
+      }
+
+      if (!libOptions.name) {
+        throw new Error(
+          `Option "build.lib.name" is required when output formats ` +
+            `include "umd" or "iife".`
+        )
+      }
     }
     if (!outputs) {
       return formats.map((format) => ({ format }))

From 2266d834c8ae4dadd380a3e6f94b041b8e1e8a74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0=20/=20green?= 
Date: Sat, 1 Oct 2022 00:31:45 +0900
Subject: [PATCH 205/311] fix(deps): update rollup to `^2.79.1` (#10298)

---
 package.json                     |   2 +-
 packages/plugin-vue/package.json |   2 +-
 packages/vite/package.json       |   2 +-
 pnpm-lock.yaml                   | 169 +++++++++++--------------------
 4 files changed, 60 insertions(+), 115 deletions(-)

diff --git a/package.json b/package.json
index 7fea462b78be4c..5070f7b158f97b 100644
--- a/package.json
+++ b/package.json
@@ -79,7 +79,7 @@
     "prompts": "^2.4.2",
     "resolve": "^1.22.1",
     "rimraf": "^3.0.2",
-    "rollup": "~2.78.0",
+    "rollup": "^2.79.1",
     "rollup-plugin-license": "^2.8.1",
     "semver": "^7.3.7",
     "simple-git-hooks": "^2.8.0",
diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json
index af9671eb3373b6..567a8bb147bbfb 100644
--- a/packages/plugin-vue/package.json
+++ b/packages/plugin-vue/package.json
@@ -42,7 +42,7 @@
     "@jridgewell/gen-mapping": "^0.3.2",
     "@jridgewell/trace-mapping": "^0.3.15",
     "debug": "^4.3.4",
-    "rollup": "~2.78.0",
+    "rollup": "^2.79.1",
     "slash": "^4.0.0",
     "source-map": "^0.6.1",
     "vite": "workspace:*",
diff --git a/packages/vite/package.json b/packages/vite/package.json
index e273c38c5ab166..582ccfc4e3858e 100644
--- a/packages/vite/package.json
+++ b/packages/vite/package.json
@@ -62,7 +62,7 @@
     "esbuild": "^0.15.9",
     "postcss": "^8.4.16",
     "resolve": "^1.22.1",
-    "rollup": "~2.78.0"
+    "rollup": "^2.79.1"
   },
   "optionalDependencies": {
     "fsevents": "~2.3.2"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 209ad19320eb7d..088899102f8c76 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,7 +53,7 @@ importers:
       prompts: ^2.4.2
       resolve: ^1.22.1
       rimraf: ^3.0.2
-      rollup: ~2.78.0
+      rollup: ^2.79.1
       rollup-plugin-license: ^2.8.1
       semver: ^7.3.7
       simple-git-hooks: ^2.8.0
@@ -68,7 +68,7 @@ importers:
     devDependencies:
       '@babel/types': 7.19.0
       '@microsoft/api-extractor': 7.31.2
-      '@rollup/plugin-typescript': 8.5.0_7emp2e44zzc74lnyjhc37gdv4y
+      '@rollup/plugin-typescript': 8.5.0_emi2rsvbxv4qzobq57f3ztmpla
       '@types/babel__core': 7.1.19
       '@types/babel__standalone': 7.1.4
       '@types/convert-source-map': 1.5.2
@@ -109,8 +109,8 @@ importers:
       prompts: 2.4.2
       resolve: 1.22.1
       rimraf: 3.0.2
-      rollup: 2.78.0
-      rollup-plugin-license: 2.8.1_rollup@2.78.0
+      rollup: 2.79.1
+      rollup-plugin-license: 2.8.1_rollup@2.79.1
       semver: 7.3.7
       simple-git-hooks: 2.8.0
       tslib: 2.4.0
@@ -181,7 +181,7 @@ importers:
       '@jridgewell/gen-mapping': ^0.3.2
       '@jridgewell/trace-mapping': ^0.3.15
       debug: ^4.3.4
-      rollup: ~2.78.0
+      rollup: ^2.79.1
       slash: ^4.0.0
       source-map: ^0.6.1
       vite: workspace:*
@@ -190,7 +190,7 @@ importers:
       '@jridgewell/gen-mapping': 0.3.2
       '@jridgewell/trace-mapping': 0.3.15
       debug: 4.3.4
-      rollup: 2.78.0
+      rollup: 2.79.1
       slash: 4.0.0
       source-map: 0.6.1
       vite: link:../vite
@@ -259,7 +259,7 @@ importers:
       postcss-modules: ^5.0.0
       resolve: ^1.22.1
       resolve.exports: ^1.1.0
-      rollup: ~2.78.0
+      rollup: ^2.79.1
       sirv: ^2.0.2
       source-map-js: ^1.0.2
       source-map-support: ^0.5.21
@@ -274,7 +274,7 @@ importers:
       esbuild: 0.15.9
       postcss: 8.4.16
       resolve: 1.22.1
-      rollup: 2.78.0
+      rollup: 2.79.1
     optionalDependencies:
       fsevents: 2.3.2
     devDependencies:
@@ -282,12 +282,12 @@ importers:
       '@babel/parser': 7.19.1
       '@babel/types': 7.19.0
       '@jridgewell/trace-mapping': 0.3.15
-      '@rollup/plugin-alias': 3.1.9_rollup@2.78.0
-      '@rollup/plugin-commonjs': 22.0.2_rollup@2.78.0
-      '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.78.0
-      '@rollup/plugin-json': 4.1.0_rollup@2.78.0
-      '@rollup/plugin-node-resolve': 14.1.0_rollup@2.78.0
-      '@rollup/plugin-typescript': 8.5.0_rollup@2.78.0+tslib@2.4.0
+      '@rollup/plugin-alias': 3.1.9_rollup@2.79.1
+      '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1
+      '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.79.1
+      '@rollup/plugin-json': 4.1.0_rollup@2.79.1
+      '@rollup/plugin-node-resolve': 14.1.0_rollup@2.79.1
+      '@rollup/plugin-typescript': 8.5.0_rollup@2.79.1+tslib@2.4.0
       '@rollup/pluginutils': 4.2.1
       acorn: 8.8.0
       cac: 6.7.14
@@ -2176,59 +2176,33 @@ packages:
     engines: {node: '>=14'}
     dev: false
 
-  /@rollup/plugin-alias/3.1.9_rollup@2.78.0:
+  /@rollup/plugin-alias/3.1.9_rollup@2.79.1:
     resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==}
     engines: {node: '>=8.0.0'}
     peerDependencies:
       rollup: ^1.20.0||^2.0.0
     dependencies:
-      rollup: 2.78.0
+      rollup: 2.79.1
       slash: 3.0.0
     dev: true
 
-  /@rollup/plugin-alias/3.1.9_rollup@2.79.0:
-    resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==}
-    engines: {node: '>=8.0.0'}
-    peerDependencies:
-      rollup: ^1.20.0||^2.0.0
-    dependencies:
-      rollup: 2.79.0
-      slash: 3.0.0
-    dev: true
-
-  /@rollup/plugin-commonjs/22.0.2_rollup@2.78.0:
-    resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==}
-    engines: {node: '>= 12.0.0'}
-    peerDependencies:
-      rollup: ^2.68.0
-    dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.78.0
-      commondir: 1.0.1
-      estree-walker: 2.0.2
-      glob: 7.2.0
-      is-reference: 1.2.1
-      magic-string: 0.25.9
-      resolve: 1.22.1
-      rollup: 2.78.0
-    dev: true
-
-  /@rollup/plugin-commonjs/22.0.2_rollup@2.79.0:
+  /@rollup/plugin-commonjs/22.0.2_rollup@2.79.1:
     resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==}
     engines: {node: '>= 12.0.0'}
     peerDependencies:
       rollup: ^2.68.0
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.79.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
       commondir: 1.0.1
       estree-walker: 2.0.2
       glob: 7.2.0
       is-reference: 1.2.1
       magic-string: 0.25.9
       resolve: 1.22.1
-      rollup: 2.79.0
+      rollup: 2.79.1
     dev: true
 
-  /@rollup/plugin-dynamic-import-vars/1.4.4_rollup@2.78.0:
+  /@rollup/plugin-dynamic-import-vars/1.4.4_rollup@2.79.1:
     resolution: {integrity: sha512-51BcU6ag9EeF09CtEsa5D/IHYo7KI42TR1Jc4doNzV1nHAiH7TvUi5vsLERFMjs9Gzy9K0otbZH/2wb0hpBhRA==}
     engines: {node: '>= 10.0.0'}
     peerDependencies:
@@ -2238,68 +2212,59 @@ packages:
       estree-walker: 2.0.2
       fast-glob: 3.2.12
       magic-string: 0.25.9
-      rollup: 2.78.0
+      rollup: 2.79.1
     dev: true
 
-  /@rollup/plugin-json/4.1.0_rollup@2.78.0:
+  /@rollup/plugin-json/4.1.0_rollup@2.79.1:
     resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==}
     peerDependencies:
       rollup: ^1.20.0 || ^2.0.0
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.78.0
-      rollup: 2.78.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
+      rollup: 2.79.1
     dev: true
 
-  /@rollup/plugin-json/4.1.0_rollup@2.79.0:
-    resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==}
-    peerDependencies:
-      rollup: ^1.20.0 || ^2.0.0
-    dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.79.0
-      rollup: 2.79.0
-    dev: true
-
-  /@rollup/plugin-node-resolve/13.3.0_rollup@2.79.0:
+  /@rollup/plugin-node-resolve/13.3.0_rollup@2.79.1:
     resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==}
     engines: {node: '>= 10.0.0'}
     peerDependencies:
       rollup: ^2.42.0
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.79.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
       '@types/resolve': 1.17.1
       deepmerge: 4.2.2
       is-builtin-module: 3.1.0
       is-module: 1.0.0
       resolve: 1.22.1
-      rollup: 2.79.0
+      rollup: 2.79.1
     dev: true
 
-  /@rollup/plugin-node-resolve/14.1.0_rollup@2.78.0:
+  /@rollup/plugin-node-resolve/14.1.0_rollup@2.79.1:
     resolution: {integrity: sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==}
     engines: {node: '>= 10.0.0'}
     peerDependencies:
       rollup: ^2.78.0
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.78.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
       '@types/resolve': 1.17.1
       deepmerge: 4.2.2
       is-builtin-module: 3.1.0
       is-module: 1.0.0
       resolve: 1.22.1
-      rollup: 2.78.0
+      rollup: 2.79.1
     dev: true
 
-  /@rollup/plugin-replace/4.0.0_rollup@2.79.0:
+  /@rollup/plugin-replace/4.0.0_rollup@2.79.1:
     resolution: {integrity: sha512-+rumQFiaNac9y64OHtkHGmdjm7us9bo1PlbgQfdihQtuNxzjpaB064HbRnewUOggLQxVCCyINfStkgmBeQpv1g==}
     peerDependencies:
       rollup: ^1.20.0 || ^2.0.0
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.79.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
       magic-string: 0.25.9
-      rollup: 2.79.0
+      rollup: 2.79.1
     dev: true
 
-  /@rollup/plugin-typescript/8.5.0_7emp2e44zzc74lnyjhc37gdv4y:
+  /@rollup/plugin-typescript/8.5.0_emi2rsvbxv4qzobq57f3ztmpla:
     resolution: {integrity: sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==}
     engines: {node: '>=8.0.0'}
     peerDependencies:
@@ -2310,14 +2275,14 @@ packages:
       tslib:
         optional: true
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.78.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
       resolve: 1.22.1
-      rollup: 2.78.0
+      rollup: 2.79.1
       tslib: 2.4.0
       typescript: 4.6.4
     dev: true
 
-  /@rollup/plugin-typescript/8.5.0_rollup@2.78.0+tslib@2.4.0:
+  /@rollup/plugin-typescript/8.5.0_rollup@2.79.1+tslib@2.4.0:
     resolution: {integrity: sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==}
     engines: {node: '>=8.0.0'}
     peerDependencies:
@@ -2328,13 +2293,13 @@ packages:
       tslib:
         optional: true
     dependencies:
-      '@rollup/pluginutils': 3.1.0_rollup@2.78.0
+      '@rollup/pluginutils': 3.1.0_rollup@2.79.1
       resolve: 1.22.1
-      rollup: 2.78.0
+      rollup: 2.79.1
       tslib: 2.4.0
     dev: true
 
-  /@rollup/pluginutils/3.1.0_rollup@2.78.0:
+  /@rollup/pluginutils/3.1.0_rollup@2.79.1:
     resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
     engines: {node: '>= 8.0.0'}
     peerDependencies:
@@ -2343,19 +2308,7 @@ packages:
       '@types/estree': 0.0.39
       estree-walker: 1.0.1
       picomatch: 2.3.1
-      rollup: 2.78.0
-    dev: true
-
-  /@rollup/pluginutils/3.1.0_rollup@2.79.0:
-    resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
-    engines: {node: '>= 8.0.0'}
-    peerDependencies:
-      rollup: ^1.20.0||^2.0.0
-    dependencies:
-      '@types/estree': 0.0.39
-      estree-walker: 1.0.1
-      picomatch: 2.3.1
-      rollup: 2.79.0
+      rollup: 2.79.1
     dev: true
 
   /@rollup/pluginutils/4.2.1:
@@ -7670,7 +7623,7 @@ packages:
     dependencies:
       glob: 7.2.0
 
-  /rollup-plugin-dts/4.2.2_id3sp2lbl4kx3dskm7teaj32um:
+  /rollup-plugin-dts/4.2.2_b2qkuxlobxx24w2qbmhtfsd2nq:
     resolution: {integrity: sha512-A3g6Rogyko/PXeKoUlkjxkP++8UDVpgA7C+Tdl77Xj4fgEaIjPSnxRmR53EzvoYy97VMVwLAOcWJudaVAuxneQ==}
     engines: {node: '>=v12.22.11'}
     peerDependencies:
@@ -7678,13 +7631,13 @@ packages:
       typescript: ^4.1
     dependencies:
       magic-string: 0.26.4
-      rollup: 2.79.0
+      rollup: 2.79.1
       typescript: 4.8.2
     optionalDependencies:
       '@babel/code-frame': 7.18.6
     dev: true
 
-  /rollup-plugin-esbuild/4.10.1_zprrkcbct7bo6atdakidof6o3q:
+  /rollup-plugin-esbuild/4.10.1_x5xzcocanie7kx5dltzpnaarrm:
     resolution: {integrity: sha512-/ymcRB283zjFp1JTBXO8ekxv0c9vRc2L6OTljghsLthQ4vqeDSDWa9BVz1tHiVrx6SbUnUpDPLC0K/MXK7j5TA==}
     engines: {node: '>=12'}
     peerDependencies:
@@ -7697,12 +7650,12 @@ packages:
       esbuild: 0.15.9
       joycon: 3.1.1
       jsonc-parser: 3.2.0
-      rollup: 2.79.0
+      rollup: 2.79.1
     transitivePeerDependencies:
       - supports-color
     dev: true
 
-  /rollup-plugin-license/2.8.1_rollup@2.78.0:
+  /rollup-plugin-license/2.8.1_rollup@2.79.1:
     resolution: {integrity: sha512-VYd9pzaNL7NN6xQp93XiiCV2UoduXgSmTcz6rl9bHPdiifT6yH3Zw/omEr73Rq8TIyN4nqJACBbKIT/2eE66wg==}
     engines: {node: '>=10.0.0'}
     peerDependencies:
@@ -7715,25 +7668,17 @@ packages:
       mkdirp: 1.0.4
       moment: 2.29.3
       package-name-regex: 2.0.6
-      rollup: 2.78.0
+      rollup: 2.79.1
       spdx-expression-validate: 2.0.0
       spdx-satisfies: 5.0.1
     dev: true
 
-  /rollup/2.78.0:
-    resolution: {integrity: sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg==}
-    engines: {node: '>=10.0.0'}
-    hasBin: true
-    optionalDependencies:
-      fsevents: 2.3.2
-
-  /rollup/2.79.0:
-    resolution: {integrity: sha512-x4KsrCgwQ7ZJPcFA/SUu6QVcYlO7uRLfLAy0DSA4NS2eG8japdbpM50ToH7z4iObodRYOJ0soneF0iaQRJ6zhA==}
+  /rollup/2.79.1:
+    resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==}
     engines: {node: '>=10.0.0'}
     hasBin: true
     optionalDependencies:
       fsevents: 2.3.2
-    dev: true
 
   /run-parallel/1.2.0:
     resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
@@ -8607,11 +8552,11 @@ packages:
     resolution: {integrity: sha512-q/oUXuqpJCoDKUk3qIkRjHPcgee5vvV1oiRJYpKwNkFSSRfzvYchQ+HxObwGrUubzDhnT+0qxO2wz5UunZtzog==}
     hasBin: true
     dependencies:
-      '@rollup/plugin-alias': 3.1.9_rollup@2.79.0
-      '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.0
-      '@rollup/plugin-json': 4.1.0_rollup@2.79.0
-      '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.0
-      '@rollup/plugin-replace': 4.0.0_rollup@2.79.0
+      '@rollup/plugin-alias': 3.1.9_rollup@2.79.1
+      '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1
+      '@rollup/plugin-json': 4.1.0_rollup@2.79.1
+      '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1
+      '@rollup/plugin-replace': 4.0.0_rollup@2.79.1
       '@rollup/pluginutils': 4.2.1
       chalk: 5.0.1
       consola: 2.15.3
@@ -8629,9 +8574,9 @@ packages:
       pkg-types: 0.3.5
       pretty-bytes: 6.0.0
       rimraf: 3.0.2
-      rollup: 2.79.0
-      rollup-plugin-dts: 4.2.2_id3sp2lbl4kx3dskm7teaj32um
-      rollup-plugin-esbuild: 4.10.1_zprrkcbct7bo6atdakidof6o3q
+      rollup: 2.79.1
+      rollup-plugin-dts: 4.2.2_b2qkuxlobxx24w2qbmhtfsd2nq
+      rollup-plugin-esbuild: 4.10.1_x5xzcocanie7kx5dltzpnaarrm
       scule: 0.3.2
       typescript: 4.8.2
       untyped: 0.5.0

From f842f74d2d3723c75e6591931607b4d7141bf0db Mon Sep 17 00:00:00 2001
From: "${Mr.DJA}" <42304709+iMrDJAi@users.noreply.github.com>
Date: Fri, 30 Sep 2022 20:54:51 +0100
Subject: [PATCH 206/311] feat: add `throwIfNamespace` option for custom JSX
 runtime (#9571)

---
 packages/plugin-react/src/index.ts | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts
index 5a82b0a2a6cd0e..3617605afc686d 100644
--- a/packages/plugin-react/src/index.ts
+++ b/packages/plugin-react/src/index.ts
@@ -40,6 +40,11 @@ export interface Options {
    * @default true
    */
   jsxPure?: boolean
+  /**
+   * Toggles whether or not to throw an error if an XML namespaced tag name is used.
+   * @default true
+   */
+  jsxThrowIfNamespace?: boolean
   /**
    * Babel configuration applied in both dev and prod.
    */
@@ -248,7 +253,8 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
                 {
                   runtime: 'automatic',
                   importSource: opts.jsxImportSource,
-                  pure: opts.jsxPure !== false
+                  pure: opts.jsxPure !== false,
+                  throwIfNamespace: opts.jsxThrowIfNamespace
                 }
               ])
 

From a60529fd80006cfce82cb586810bd684c9385208 Mon Sep 17 00:00:00 2001
From: Bjorn Lu 
Date: Sat, 1 Oct 2022 12:47:58 +0800
Subject: [PATCH 207/311] fix(ssr): correctly track scope (#10300)

---
 .../node/ssr/__tests__/ssrTransform.spec.ts   | 61 ++++++++++++++++++-
 packages/vite/src/node/ssr/ssrTransform.ts    | 52 ++++++++++------
 2 files changed, 94 insertions(+), 19 deletions(-)

diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts
index e70a3e30c948cc..a5ca20c9be3d09 100644
--- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts
+++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts
@@ -1,6 +1,5 @@
 import { expect, test } from 'vitest'
 import { transformWithEsbuild } from '../../plugins/esbuild'
-import { traverseHtml } from '../../plugins/html'
 import { ssrTransform } from '../ssrTransform'
 
 const ssrTransformSimple = async (code: string, url = '') =>
@@ -728,3 +727,63 @@ console.log("it can parse the hashbang")`
     console.log(\\"it can parse the hashbang\\")"
   `)
 })
+
+// #10289
+test('track scope by class, function, condition blocks', async () => {
+  const code = `
+import { foo, bar } from 'foobar'
+if (false) {
+  const foo = 'foo'
+  console.log(foo)
+} else if (false) {
+  const [bar] = ['bar']
+  console.log(bar)
+} else {
+  console.log(foo)
+  console.log(bar)
+}
+export class Test {
+  constructor() {
+    if (false) {
+      const foo = 'foo'
+      console.log(foo)
+    } else if (false) {
+      const [bar] = ['bar']
+      console.log(bar)
+    } else {
+      console.log(foo)
+      console.log(bar)
+    }
+  }
+};`.trim()
+
+  expect(await ssrTransformSimpleCode(code)).toMatchInlineSnapshot(`
+    "const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"foobar\\");
+
+    if (false) {
+      const foo = 'foo'
+      console.log(foo)
+    } else if (false) {
+      const [bar] = ['bar']
+      console.log(bar)
+    } else {
+      console.log(__vite_ssr_import_0__.foo)
+      console.log(__vite_ssr_import_0__.bar)
+    }
+    class Test {
+      constructor() {
+        if (false) {
+          const foo = 'foo'
+          console.log(foo)
+        } else if (false) {
+          const [bar] = ['bar']
+          console.log(bar)
+        } else {
+          console.log(__vite_ssr_import_0__.foo)
+          console.log(__vite_ssr_import_0__.bar)
+        }
+      }
+    }
+    Object.defineProperty(__vite_ssr_exports__, \\"Test\\", { enumerable: true, configurable: true, get(){ return Test }});;"
+  `)
+})
diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts
index 0798d674547fb3..fe24dddac2e79a 100644
--- a/packages/vite/src/node/ssr/ssrTransform.ts
+++ b/packages/vite/src/node/ssr/ssrTransform.ts
@@ -322,7 +322,7 @@ function walk(
   const scopeMap = new WeakMap<_Node, Set>()
   const identifiers: [id: any, stack: Node[]][] = []
 
-  const setScope = (node: FunctionNode, name: string) => {
+  const setScope = (node: _Node, name: string) => {
     let scopeIds = scopeMap.get(node)
     if (scopeIds && scopeIds.has(name)) {
       return
@@ -337,29 +337,29 @@ function walk(
   function isInScope(name: string, parents: Node[]) {
     return parents.some((node) => node && scopeMap.get(node)?.has(name))
   }
-  function handlePattern(p: Pattern, parentFunction: FunctionNode) {
+  function handlePattern(p: Pattern, parentScope: _Node) {
     if (p.type === 'Identifier') {
-      setScope(parentFunction, p.name)
+      setScope(parentScope, p.name)
     } else if (p.type === 'RestElement') {
-      handlePattern(p.argument, parentFunction)
+      handlePattern(p.argument, parentScope)
     } else if (p.type === 'ObjectPattern') {
       p.properties.forEach((property) => {
         if (property.type === 'RestElement') {
-          setScope(parentFunction, (property.argument as Identifier).name)
+          setScope(parentScope, (property.argument as Identifier).name)
         } else {
-          handlePattern(property.value, parentFunction)
+          handlePattern(property.value, parentScope)
         }
       })
     } else if (p.type === 'ArrayPattern') {
       p.elements.forEach((element) => {
         if (element) {
-          handlePattern(element, parentFunction)
+          handlePattern(element, parentScope)
         }
       })
     } else if (p.type === 'AssignmentPattern') {
-      handlePattern(p.left, parentFunction)
+      handlePattern(p.left, parentScope)
     } else {
-      setScope(parentFunction, (p as any).name)
+      setScope(parentScope, (p as any).name)
     }
   }
 
@@ -369,7 +369,14 @@ function walk(
         return this.skip()
       }
 
-      parent && parentStack.unshift(parent)
+      // track parent stack, skip for "else-if"/"else" branches as acorn nests
+      // the ast within "if" nodes instead of flattening them
+      if (
+        parent &&
+        !(parent.type === 'IfStatement' && node === parent.alternate)
+      ) {
+        parentStack.unshift(parent)
+      }
 
       if (node.type === 'MetaProperty' && node.meta.name === 'import') {
         onImportMeta(node)
@@ -389,9 +396,9 @@ function walk(
         // If it is a function declaration, it could be shadowing an import
         // Add its name to the scope so it won't get replaced
         if (node.type === 'FunctionDeclaration') {
-          const parentFunction = findParentFunction(parentStack)
-          if (parentFunction) {
-            setScope(parentFunction, node.id!.name)
+          const parentScope = findParentScope(parentStack)
+          if (parentScope) {
+            setScope(parentScope, node.id!.name)
           }
         }
         // walk function expressions and add its arguments to known identifiers
@@ -430,7 +437,7 @@ function walk(
         // mark property in destructuring pattern
         setIsNodeInPattern(node)
       } else if (node.type === 'VariableDeclarator') {
-        const parentFunction = findParentFunction(parentStack)
+        const parentFunction = findParentScope(parentStack)
         if (parentFunction) {
           handlePattern(node.id, parentFunction)
         }
@@ -438,7 +445,13 @@ function walk(
     },
 
     leave(node: Node, parent: Node | null) {
-      parent && parentStack.shift()
+      // untrack parent stack from above
+      if (
+        parent &&
+        !(parent.type === 'IfStatement' && node === parent.alternate)
+      ) {
+        parentStack.shift()
+      }
     }
   })
 
@@ -521,12 +534,15 @@ const isStaticProperty = (node: _Node): node is Property =>
 const isStaticPropertyKey = (node: _Node, parent: _Node) =>
   isStaticProperty(parent) && parent.key === node
 
+const functionNodeTypeRE = /Function(?:Expression|Declaration)$|Method$/
 function isFunction(node: _Node): node is FunctionNode {
-  return /Function(?:Expression|Declaration)$|Method$/.test(node.type)
+  return functionNodeTypeRE.test(node.type)
 }
 
-function findParentFunction(parentStack: _Node[]): FunctionNode | undefined {
-  return parentStack.find((i) => isFunction(i)) as FunctionNode
+const scopeNodeTypeRE =
+  /(?:Function|Class)(?:Expression|Declaration)$|Method$|^IfStatement$/
+function findParentScope(parentStack: _Node[]): _Node | undefined {
+  return parentStack.find((i) => scopeNodeTypeRE.test(i.type))
 }
 
 function isInDestructuringAssignment(

From 7a6d4bc0d7fa614d3ac469ca35352a23aaef8232 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BF=A0=20/=20green?= 
Date: Sat, 1 Oct 2022 18:00:37 +0900
Subject: [PATCH 208/311] test: add sugarss sourcemap test (#10303)

---
 .../__tests__/css-sourcemap.spec.ts           | 210 +-----------------
 playground/css-sourcemap/imported.sss         |   2 +
 playground/css-sourcemap/index.html           |   4 +
 playground/css-sourcemap/package.json         |   3 +-
 pnpm-lock.yaml                                |   2 +
 5 files changed, 16 insertions(+), 205 deletions(-)
 create mode 100644 playground/css-sourcemap/imported.sss

diff --git a/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts b/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts
index d7e9a5e8ecd71d..4b2331e8836d4c 100644
--- a/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts
+++ b/playground/css-sourcemap/__tests__/css-sourcemap.spec.ts
@@ -231,210 +231,18 @@ describe.runIf(isServe)('serve', () => {
     `)
   })
 
-  test('should not output missing source file warning', () => {
-    serverLogs.forEach((log) => {
-      expect(log).not.toMatch(/Sourcemap for .+ points to missing source files/)
-    })
-  })
-})
-
-describe.runIf(isServe)('serve', () => {
-  const getStyleTagContentIncluding = async (content: string) => {
-    const styles = await page.$$('style')
-    for (const style of styles) {
-      const text = await style.textContent()
-      if (text.includes(content)) {
-        return text
-      }
-    }
-    throw new Error('Not found')
-  }
-
-  test('linked css', async () => {
-    const res = await page.request.get(
-      new URL('./linked.css', page.url()).href,
-      {
-        headers: {
-          accept: 'text/css'
-        }
-      }
-    )
-    const css = await res.text()
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AAAA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACT,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACb,CAAC;",
-        "sources": [
-          "/root/linked.css",
-        ],
-        "sourcesContent": [
-          ".linked {
-        color: red;
-      }
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('linked css with import', async () => {
-    const res = await page.request.get(
-      new URL('./linked-with-import.css', page.url()).href,
-      {
-        headers: {
-          accept: 'text/css'
-        }
-      }
-    )
-    const css = await res.text()
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AAAA;EACE,UAAU;AACZ;;ACAA;EACE,UAAU;AACZ",
-        "sources": [
-          "/root/be-imported.css",
-          "/root/linked-with-import.css",
-        ],
-        "sourcesContent": [
-          ".be-imported {
-        color: red;
-      }
-      ",
-          "@import '@/be-imported.css';
-
-      .linked-with-import {
-        color: red;
-      }
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('imported css', async () => {
-    const css = await getStyleTagContentIncluding('.imported ')
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AAAA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACX,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACb,CAAC;",
-        "sources": [
-          "/root/imported.css",
-        ],
-        "sourcesContent": [
-          ".imported {
-        color: red;
-      }
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('imported css with import', async () => {
-    const css = await getStyleTagContentIncluding('.imported-with-import ')
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AAAA;EACE,UAAU;AACZ;;ACAA;EACE,UAAU;AACZ",
-        "sources": [
-          "/root/be-imported.css",
-          "/root/imported-with-import.css",
-        ],
-        "sourcesContent": [
-          ".be-imported {
-        color: red;
-      }
-      ",
-          "@import '@/be-imported.css';
-
-      .imported-with-import {
-        color: red;
-      }
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('imported sass', async () => {
-    const css = await getStyleTagContentIncluding('.imported-sass ')
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AACE;EACE",
-        "sources": [
-          "/root/imported.sass",
-        ],
-        "sourcesContent": [
-          ".imported
-        &-sass
-          color: red
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('imported sass module', async () => {
-    const css = await getStyleTagContentIncluding('._imported-sass-module_')
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AACE;EACE",
-        "sources": [
-          "/root/imported.module.sass",
-        ],
-        "sourcesContent": [
-          ".imported
-        &-sass-module
-          color: red
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('imported less', async () => {
-    const css = await getStyleTagContentIncluding('.imported-less ')
+  test('imported sugarss', async () => {
+    const css = await getStyleTagContentIncluding('.imported-sugarss ')
     const map = extractSourcemap(css)
     expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
       {
-        "mappings": "AACE;EACE",
+        "mappings": "AAAA;EACE;AADc",
         "sources": [
-          "/root/imported.less",
+          "/root/imported.sss",
         ],
         "sourcesContent": [
-          ".imported {
-        &-less {
-          color: @color;
-        }
-      }
-      ",
-        ],
-        "version": 3,
-      }
-    `)
-  })
-
-  test('imported stylus', async () => {
-    const css = await getStyleTagContentIncluding('.imported-stylus ')
-    const map = extractSourcemap(css)
-    expect(formatSourcemapForSnapshot(map)).toMatchInlineSnapshot(`
-      {
-        "mappings": "AACE;EACE,cAAM",
-        "sources": [
-          "/root/imported.styl",
-        ],
-        "sourcesContent": [
-          ".imported
-        &-stylus
-          color blue-red-mixed
+          ".imported-sugarss
+        color: red
       ",
         ],
         "version": 3,
@@ -448,9 +256,3 @@ describe.runIf(isServe)('serve', () => {
     })
   })
 })
-
-test.runIf(isBuild)('should not output sourcemap warning (#4939)', () => {
-  serverLogs.forEach((log) => {
-    expect(log).not.toMatch('Sourcemap is likely to be incorrect')
-  })
-})
diff --git a/playground/css-sourcemap/imported.sss b/playground/css-sourcemap/imported.sss
new file mode 100644
index 00000000000000..56084992472c47
--- /dev/null
+++ b/playground/css-sourcemap/imported.sss
@@ -0,0 +1,2 @@
+.imported-sugarss
+  color: red
diff --git a/playground/css-sourcemap/index.html b/playground/css-sourcemap/index.html
index a943c1d113a9b4..6f81e0322e47be 100644
--- a/playground/css-sourcemap/index.html
+++ b/playground/css-sourcemap/index.html
@@ -24,6 +24,8 @@ 

CSS Sourcemap

<imported less> with string additionalData

<imported stylus>

+ +

<imported sugarss>

diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index d61c74d04eab04..3c60c0f1aa40e4 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -12,6 +12,7 @@ "less": "^4.1.3", "magic-string": "^0.26.4", "sass": "^1.55.0", - "stylus": "^0.59.0" + "stylus": "^0.59.0", + "sugarss": "^4.0.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 088899102f8c76..965ac298184bd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -420,11 +420,13 @@ importers: magic-string: ^0.26.4 sass: ^1.55.0 stylus: ^0.59.0 + sugarss: ^4.0.1 devDependencies: less: 4.1.3 magic-string: 0.26.4 sass: 1.55.0 stylus: 0.59.0 + sugarss: 4.0.1 playground/css/css-dep: specifiers: {} From 0b89dd2053ebc3eaa94897bb988f23cd336ae220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 3 Oct 2022 01:30:27 +0900 Subject: [PATCH 209/311] fix: add module types (#10299) --- packages/vite/client.d.ts | 49 ++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/packages/vite/client.d.ts b/packages/vite/client.d.ts index e99b4a526b7a58..08e1e4cb424c84 100644 --- a/packages/vite/client.d.ts +++ b/packages/vite/client.d.ts @@ -31,6 +31,10 @@ declare module '*.module.pcss' { const classes: CSSModuleClasses export default classes } +declare module '*.module.sss' { + const classes: CSSModuleClasses + export default classes +} // CSS declare module '*.css' { @@ -61,11 +65,19 @@ declare module '*.pcss' { const css: string export default css } +declare module '*.sss' { + const css: string + export default css +} // Built-in asset types -// see `src/constants.ts` +// see `src/node/constants.ts` // images +declare module '*.png' { + const src: string + export default src +} declare module '*.jpg' { const src: string export default src @@ -86,10 +98,6 @@ declare module '*.pjp' { const src: string export default src } -declare module '*.png' { - const src: string - export default src -} declare module '*.gif' { const src: string export default src @@ -164,12 +172,6 @@ declare module '*.otf' { } // other -declare module '*.wasm?init' { - const initWasm: ( - options: WebAssembly.Imports - ) => Promise - export default initWasm -} declare module '*.webmanifest' { const src: string export default src @@ -183,6 +185,14 @@ declare module '*.txt' { export default src } +// wasm?init +declare module '*.wasm?init' { + const initWasm: ( + options: WebAssembly.Imports + ) => Promise + export default initWasm +} + // web worker declare module '*?worker' { const workerConstructor: { @@ -198,6 +208,11 @@ declare module '*?worker&inline' { export default workerConstructor } +declare module '*?worker&url' { + const src: string + export default src +} + declare module '*?sharedworker' { const sharedWorkerConstructor: { new (): SharedWorker @@ -205,6 +220,18 @@ declare module '*?sharedworker' { export default sharedWorkerConstructor } +declare module '*?sharedworker&inline' { + const sharedWorkerConstructor: { + new (): SharedWorker + } + export default sharedWorkerConstructor +} + +declare module '*?sharedworker&url' { + const src: string + export default src +} + declare module '*?raw' { const src: string export default src From 9d87c116426cd6b5da2156def6fdd9d1ae71b2b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:13:19 +0200 Subject: [PATCH 210/311] chore(deps): update dependency slash to v5 (#10317) --- packages/plugin-vue/package.json | 2 +- pnpm-lock.yaml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 567a8bb147bbfb..c89a5c9147bcfa 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -43,7 +43,7 @@ "@jridgewell/trace-mapping": "^0.3.15", "debug": "^4.3.4", "rollup": "^2.79.1", - "slash": "^4.0.0", + "slash": "^5.0.0", "source-map": "^0.6.1", "vite": "workspace:*", "vue": "^3.2.39" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 965ac298184bd6..f6048b21cac31c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -182,7 +182,7 @@ importers: '@jridgewell/trace-mapping': ^0.3.15 debug: ^4.3.4 rollup: ^2.79.1 - slash: ^4.0.0 + slash: ^5.0.0 source-map: ^0.6.1 vite: workspace:* vue: ^3.2.39 @@ -191,7 +191,7 @@ importers: '@jridgewell/trace-mapping': 0.3.15 debug: 4.3.4 rollup: 2.79.1 - slash: 4.0.0 + slash: 5.0.0 source-map: 0.6.1 vite: link:../vite vue: 3.2.39 @@ -7885,6 +7885,11 @@ packages: engines: {node: '>=12'} dev: true + /slash/5.0.0: + resolution: {integrity: sha512-n6KkmvKS0623igEVj3FF0OZs1gYYJ0o0Hj939yc1fyxl2xt+xYpLnzJB6xBSqOfV9ZFLEWodBBN/heZJahuIJQ==} + engines: {node: '>=14.16'} + dev: true + /slice-ansi/3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} From a38b450441eea02a680b80ac0624126ba6abe3f7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:23:36 +0800 Subject: [PATCH 211/311] fix(deps): update all non-major dependencies (#10316) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 18 +- .../create-vite/template-lit-ts/package.json | 2 +- .../create-vite/template-lit/package.json | 2 +- .../template-preact-ts/package.json | 2 +- .../create-vite/template-preact/package.json | 2 +- .../template-react-ts/package.json | 2 +- .../create-vite/template-react/package.json | 2 +- .../template-svelte-ts/package.json | 4 +- .../create-vite/template-svelte/package.json | 2 +- .../template-vanilla-ts/package.json | 2 +- .../create-vite/template-vanilla/package.json | 2 +- .../create-vite/template-vue-ts/package.json | 6 +- .../create-vite/template-vue/package.json | 6 +- packages/plugin-legacy/package.json | 10 +- packages/plugin-react/package.json | 4 +- packages/plugin-vue-jsx/package.json | 4 +- packages/plugin-vue/package.json | 2 +- packages/vite/package.json | 8 +- playground/alias/package.json | 4 +- playground/css-sourcemap/package.json | 2 +- playground/extensions/package.json | 2 +- .../dep-that-imports-vue/package.json | 2 +- .../dep-that-requires-vue/package.json | 2 +- playground/external/package.json | 2 +- playground/json/package.json | 2 +- playground/object-hooks/package.json | 2 +- playground/optimize-deps/package.json | 4 +- playground/preload/package.json | 2 +- playground/ssr-vue/package.json | 2 +- playground/tailwind/package.json | 2 +- playground/vue-jsx/package.json | 2 +- playground/vue-legacy/package.json | 2 +- playground/vue-lib/package.json | 2 +- playground/vue-server-origin/package.json | 2 +- playground/vue-sourcemap/package.json | 2 +- playground/vue/package.json | 2 +- pnpm-lock.yaml | 798 +++++++++--------- 37 files changed, 455 insertions(+), 463 deletions(-) diff --git a/package.json b/package.json index 5070f7b158f97b..9ee3d9fe80d7b8 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "ci-docs": "run-s build docs-build" }, "devDependencies": { - "@babel/types": "^7.19.0", - "@microsoft/api-extractor": "^7.31.2", + "@babel/types": "^7.19.3", + "@microsoft/api-extractor": "^7.32.0", "@rollup/plugin-typescript": "^8.5.0", "@types/babel__core": "^7.1.19", "@types/babel__standalone": "^7.1.4", @@ -58,8 +58,8 @@ "@types/semver": "^7.3.12", "@types/stylus": "^0.48.38", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.38.0", - "@typescript-eslint/parser": "^5.38.0", + "@typescript-eslint/eslint-plugin": "^5.38.1", + "@typescript-eslint/parser": "^5.38.1", "conventional-changelog-cli": "^2.2.2", "esbuild": "^0.14.47", "eslint": "^8.24.0", @@ -73,8 +73,8 @@ "minimist": "^1.2.6", "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", - "playwright-chromium": "^1.26.0", - "pnpm": "^7.12.2", + "playwright-chromium": "^1.26.1", + "pnpm": "^7.13.0", "prettier": "2.7.1", "prompts": "^2.4.2", "resolve": "^1.22.1", @@ -88,9 +88,9 @@ "typescript": "^4.6.4", "unbuild": "^0.8.11", "vite": "workspace:*", - "vitepress": "^1.0.0-alpha.16", + "vitepress": "^1.0.0-alpha.19", "vitest": "^0.23.4", - "vue": "^3.2.39" + "vue": "^3.2.40" }, "simple-git-hooks": { "pre-commit": "pnpm exec lint-staged --concurrent false", @@ -110,7 +110,7 @@ "eslint --cache --fix" ] }, - "packageManager": "pnpm@7.12.2", + "packageManager": "pnpm@7.13.0", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-lit-ts/package.json b/packages/create-vite/template-lit-ts/package.json index f5291641d96752..f1c5b453499985 100644 --- a/packages/create-vite/template-lit-ts/package.json +++ b/packages/create-vite/template-lit-ts/package.json @@ -21,6 +21,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-lit/package.json b/packages/create-vite/template-lit/package.json index 1154861181c7e1..6a0e5f02613040 100644 --- a/packages/create-vite/template-lit/package.json +++ b/packages/create-vite/template-lit/package.json @@ -18,6 +18,6 @@ "lit": "^2.3.1" }, "devDependencies": { - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index 4e38547b575ab8..bfaae76fc8d2b2 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -14,6 +14,6 @@ "devDependencies": { "@preact/preset-vite": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index e6fd043b875997..df5d9062d4d79c 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -13,6 +13,6 @@ }, "devDependencies": { "@preact/preset-vite": "^2.4.0", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 049ca21c852163..02b9a18ef3725e 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -17,6 +17,6 @@ "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", "typescript": "^4.6.4", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index 4d63da6ecac4c6..e63c1da49276bd 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -16,6 +16,6 @@ "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index fdb3987f849550..2a7a04d801e1d5 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -13,10 +13,10 @@ "@sveltejs/vite-plugin-svelte": "^1.0.8", "@tsconfig/svelte": "^3.0.0", "svelte": "^3.50.1", - "svelte-check": "^2.9.0", + "svelte-check": "^2.9.1", "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index 16a202ea996167..94cddc9a4af766 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -11,6 +11,6 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.8", "svelte": "^3.50.1", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-vanilla-ts/package.json b/packages/create-vite/template-vanilla-ts/package.json index 093144c9580fed..6843cd0eeb32a8 100644 --- a/packages/create-vite/template-vanilla-ts/package.json +++ b/packages/create-vite/template-vanilla-ts/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-vanilla/package.json b/packages/create-vite/template-vanilla/package.json index 2b4c03827380f9..46eb670177880a 100644 --- a/packages/create-vite/template-vanilla/package.json +++ b/packages/create-vite/template-vanilla/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "devDependencies": { - "vite": "^3.1.3" + "vite": "^3.1.4" } } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index ebc6e559331da2..ab5fc23af6270c 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -9,12 +9,12 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { - "@vitejs/plugin-vue": "^3.1.0", + "@vitejs/plugin-vue": "^3.1.2", "typescript": "^4.6.4", - "vite": "^3.1.3", + "vite": "^3.1.4", "vue-tsc": "^0.40.13" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index 77e0dbb627a6a5..ceaadbf7726b39 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -9,10 +9,10 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { - "@vitejs/plugin-vue": "^3.1.0", - "vite": "^3.1.3" + "@vitejs/plugin-vue": "^3.1.2", + "vite": "^3.1.4" } } diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index 0d307c520e37a5..f75af9ee12f6c9 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -35,18 +35,18 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", "dependencies": { - "@babel/standalone": "^7.19.2", - "core-js": "^3.25.3", - "magic-string": "^0.26.4", + "@babel/standalone": "^7.19.3", + "core-js": "^3.25.4", + "magic-string": "^0.26.5", "regenerator-runtime": "^0.13.9", - "systemjs": "^6.12.6" + "systemjs": "^6.13.0" }, "peerDependencies": { "terser": "^5.4.0", "vite": "^3.0.0" }, "devDependencies": { - "@babel/core": "^7.19.1", + "@babel/core": "^7.19.3", "picocolors": "^1.0.0", "vite": "workspace:*" } diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index 8001f1ca7389c7..1f10d2b1e5f5ac 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -39,12 +39,12 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-react#readme", "dependencies": { - "@babel/core": "^7.19.1", + "@babel/core": "^7.19.3", "@babel/plugin-transform-react-jsx": "^7.19.0", "@babel/plugin-transform-react-jsx-development": "^7.18.6", "@babel/plugin-transform-react-jsx-self": "^7.18.6", "@babel/plugin-transform-react-jsx-source": "^7.18.6", - "magic-string": "^0.26.4", + "magic-string": "^0.26.5", "react-refresh": "^0.14.0" }, "peerDependencies": { diff --git a/packages/plugin-vue-jsx/package.json b/packages/plugin-vue-jsx/package.json index 68567ec2abb5bc..0477ce434ace01 100644 --- a/packages/plugin-vue-jsx/package.json +++ b/packages/plugin-vue-jsx/package.json @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-vue-jsx#readme", "dependencies": { - "@babel/core": "^7.19.1", - "@babel/plugin-transform-typescript": "^7.19.1", + "@babel/core": "^7.19.3", + "@babel/plugin-transform-typescript": "^7.19.3", "@vue/babel-plugin-jsx": "^1.1.1" }, "devDependencies": { diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index c89a5c9147bcfa..6152f8f1dc993e 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -46,6 +46,6 @@ "slash": "^5.0.0", "source-map": "^0.6.1", "vite": "workspace:*", - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/packages/vite/package.json b/packages/vite/package.json index 582ccfc4e3858e..43e4bba9f2f908 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -60,7 +60,7 @@ "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!", "dependencies": { "esbuild": "^0.15.9", - "postcss": "^8.4.16", + "postcss": "^8.4.17", "resolve": "^1.22.1", "rollup": "^2.79.1" }, @@ -69,8 +69,8 @@ }, "devDependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/parser": "^7.19.1", - "@babel/types": "^7.19.0", + "@babel/parser": "^7.19.3", + "@babel/types": "^7.19.3", "@jridgewell/trace-mapping": "^0.3.15", "@rollup/plugin-alias": "^3.1.9", "@rollup/plugin-commonjs": "^22.0.2", @@ -97,7 +97,7 @@ "http-proxy": "^1.18.1", "json5": "^2.2.1", "launch-editor-middleware": "^2.6.0", - "magic-string": "^0.26.4", + "magic-string": "^0.26.5", "micromatch": "^4.0.5", "mlly": "^0.5.16", "mrmime": "^1.0.1", diff --git a/playground/alias/package.json b/playground/alias/package.json index 56f95bdabb61f4..34a110d2a82051 100644 --- a/playground/alias/package.json +++ b/playground/alias/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "aliased-module": "file:./dir/module", - "vue": "^3.2.39", - "@vue/shared": "^3.2.39" + "vue": "^3.2.40", + "@vue/shared": "^3.2.40" }, "devDependencies": { "resolve-linked": "workspace:*" diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index 3c60c0f1aa40e4..9257357eb31078 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "less": "^4.1.3", - "magic-string": "^0.26.4", + "magic-string": "^0.26.5", "sass": "^1.55.0", "stylus": "^0.59.0", "sugarss": "^4.0.1" diff --git a/playground/extensions/package.json b/playground/extensions/package.json index ab6e8a04d8f746..366455e484f16d 100644 --- a/playground/extensions/package.json +++ b/playground/extensions/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/external/dep-that-imports-vue/package.json b/playground/external/dep-that-imports-vue/package.json index ae2c4e1312514f..7b77b5f5c398cf 100644 --- a/playground/external/dep-that-imports-vue/package.json +++ b/playground/external/dep-that-imports-vue/package.json @@ -3,6 +3,6 @@ "private": true, "version": "0.0.0", "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/external/dep-that-requires-vue/package.json b/playground/external/dep-that-requires-vue/package.json index 92e8b85ceda1c6..fadb1a48240671 100644 --- a/playground/external/dep-that-requires-vue/package.json +++ b/playground/external/dep-that-requires-vue/package.json @@ -3,6 +3,6 @@ "private": true, "version": "0.0.0", "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/external/package.json b/playground/external/package.json index b50c2a299bfbe0..53e2dd628302b4 100644 --- a/playground/external/package.json +++ b/playground/external/package.json @@ -14,6 +14,6 @@ }, "devDependencies": { "vite": "workspace:*", - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/json/package.json b/playground/json/package.json index c329f7c4669df3..945d03575f68ba 100644 --- a/playground/json/package.json +++ b/playground/json/package.json @@ -14,6 +14,6 @@ "devDependencies": { "express": "^4.18.1", "json-module": "file:./json-module", - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/object-hooks/package.json b/playground/object-hooks/package.json index ab6e8a04d8f746..366455e484f16d 100644 --- a/playground/object-hooks/package.json +++ b/playground/object-hooks/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/optimize-deps/package.json b/playground/optimize-deps/package.json index 4e0df0ab00e553..01bf8259094afe 100644 --- a/playground/optimize-deps/package.json +++ b/playground/optimize-deps/package.json @@ -28,12 +28,12 @@ "added-in-entries": "file:./added-in-entries", "lodash-es": "^4.17.21", "nested-exclude": "file:./nested-exclude", - "phoenix": "^1.6.12", + "phoenix": "^1.6.13", "react": "^18.2.0", "react-dom": "^18.2.0", "resolve-linked": "workspace:0.0.0", "url": "^0.11.0", - "vue": "^3.2.39", + "vue": "^3.2.40", "vuex": "^4.0.2", "lodash": "^4.17.21", "lodash.clonedeep": "^4.5.0" diff --git a/playground/preload/package.json b/playground/preload/package.json index ce2e71a6f1af1d..dc2293d23a68f0 100644 --- a/playground/preload/package.json +++ b/playground/preload/package.json @@ -17,7 +17,7 @@ "preview:preload-disabled": "vite preview --config vite.config-preload-disabled.ts" }, "dependencies": { - "vue": "^3.2.39", + "vue": "^3.2.40", "vue-router": "^4.1.5" }, "devDependencies": { diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index bb4edd525549a1..d65235fe38b9bc 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "example-external-component": "file:example-external-component", - "vue": "^3.2.39", + "vue": "^3.2.40", "vue-router": "^4.1.5", "vuex": "^4.0.2" }, diff --git a/playground/tailwind/package.json b/playground/tailwind/package.json index 795cdea839bc90..38043cef1da945 100644 --- a/playground/tailwind/package.json +++ b/playground/tailwind/package.json @@ -11,7 +11,7 @@ "dependencies": { "autoprefixer": "^10.4.12", "tailwindcss": "^3.1.8", - "vue": "^3.2.39", + "vue": "^3.2.40", "vue-router": "^4.1.5" }, "devDependencies": { diff --git a/playground/vue-jsx/package.json b/playground/vue-jsx/package.json index a89519f4e5399b..43f7e1b5222267 100644 --- a/playground/vue-jsx/package.json +++ b/playground/vue-jsx/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/vue-legacy/package.json b/playground/vue-legacy/package.json index e90be717245628..63305f6795fac5 100644 --- a/playground/vue-legacy/package.json +++ b/playground/vue-legacy/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/vue-lib/package.json b/playground/vue-lib/package.json index d28ab18295c799..1b75d2c9ac583f 100644 --- a/playground/vue-lib/package.json +++ b/playground/vue-lib/package.json @@ -9,7 +9,7 @@ "build-consumer": "vite build --config ./vite.config.consumer.ts" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*" diff --git a/playground/vue-server-origin/package.json b/playground/vue-server-origin/package.json index 2056ec63aa5c08..70af9cc804d90a 100644 --- a/playground/vue-server-origin/package.json +++ b/playground/vue-server-origin/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*" diff --git a/playground/vue-sourcemap/package.json b/playground/vue-sourcemap/package.json index da314b7c708ffa..6b68b7c5e3e3c6 100644 --- a/playground/vue-sourcemap/package.json +++ b/playground/vue-sourcemap/package.json @@ -15,6 +15,6 @@ "sass": "^1.55.0" }, "dependencies": { - "vue": "^3.2.39" + "vue": "^3.2.40" } } diff --git a/playground/vue/package.json b/playground/vue/package.json index 723e2f4f8f3f91..a731715f74eb54 100644 --- a/playground/vue/package.json +++ b/playground/vue/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "vue": "^3.2.39" + "vue": "^3.2.40" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6048b21cac31c..18fcc22c346fff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,8 +10,8 @@ importers: .: specifiers: - '@babel/types': ^7.19.0 - '@microsoft/api-extractor': ^7.31.2 + '@babel/types': ^7.19.3 + '@microsoft/api-extractor': ^7.32.0 '@rollup/plugin-typescript': ^8.5.0 '@types/babel__core': ^7.1.19 '@types/babel__standalone': ^7.1.4 @@ -32,8 +32,8 @@ importers: '@types/semver': ^7.3.12 '@types/stylus': ^0.48.38 '@types/ws': ^8.5.3 - '@typescript-eslint/eslint-plugin': ^5.38.0 - '@typescript-eslint/parser': ^5.38.0 + '@typescript-eslint/eslint-plugin': ^5.38.1 + '@typescript-eslint/parser': ^5.38.1 conventional-changelog-cli: ^2.2.2 esbuild: ^0.14.47 eslint: ^8.24.0 @@ -47,8 +47,8 @@ importers: minimist: ^1.2.6 npm-run-all: ^4.1.5 picocolors: ^1.0.0 - playwright-chromium: ^1.26.0 - pnpm: ^7.12.2 + playwright-chromium: ^1.26.1 + pnpm: ^7.13.0 prettier: 2.7.1 prompts: ^2.4.2 resolve: ^1.22.1 @@ -62,12 +62,12 @@ importers: typescript: ^4.6.4 unbuild: ^0.8.11 vite: workspace:* - vitepress: ^1.0.0-alpha.16 + vitepress: ^1.0.0-alpha.19 vitest: ^0.23.4 - vue: ^3.2.39 + vue: ^3.2.40 devDependencies: - '@babel/types': 7.19.0 - '@microsoft/api-extractor': 7.31.2 + '@babel/types': 7.19.3 + '@microsoft/api-extractor': 7.32.0 '@rollup/plugin-typescript': 8.5.0_emi2rsvbxv4qzobq57f3ztmpla '@types/babel__core': 7.1.19 '@types/babel__standalone': 7.1.4 @@ -88,13 +88,13 @@ importers: '@types/semver': 7.3.12 '@types/stylus': 0.48.38 '@types/ws': 8.5.3 - '@typescript-eslint/eslint-plugin': 5.38.0_rwai6flfqy4pzaqznlsnhxvs6q - '@typescript-eslint/parser': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/eslint-plugin': 5.38.1_z5cqhfye5lpmqil3ypaxjnnbyi + '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm conventional-changelog-cli: 2.2.2 esbuild: 0.14.47 eslint: 8.24.0 eslint-define-config: 1.7.0 - eslint-plugin-import: 2.26.0_2azyxy5wfmd73v3pbt5rvmgcsm + eslint-plugin-import: 2.26.0_gofx6msuqd4luqedfouzks2s4u eslint-plugin-node: 11.1.0_eslint@8.24.0 execa: 6.1.0 fast-glob: 3.2.12 @@ -103,8 +103,8 @@ importers: minimist: 1.2.6 npm-run-all: 4.1.5 picocolors: 1.0.0 - playwright-chromium: 1.26.0 - pnpm: 7.12.2 + playwright-chromium: 1.26.1 + pnpm: 7.13.0 prettier: 2.7.1 prompts: 2.4.2 resolve: 1.22.1 @@ -118,9 +118,9 @@ importers: typescript: 4.6.4 unbuild: 0.8.11 vite: link:packages/vite - vitepress: 1.0.0-alpha.16 + vitepress: 1.0.0-alpha.19 vitest: 0.23.4 - vue: 3.2.39 + vue: 3.2.40 packages/create-vite: specifiers: @@ -136,42 +136,42 @@ importers: packages/plugin-legacy: specifiers: - '@babel/core': ^7.19.1 - '@babel/standalone': ^7.19.2 - core-js: ^3.25.3 - magic-string: ^0.26.4 + '@babel/core': ^7.19.3 + '@babel/standalone': ^7.19.3 + core-js: ^3.25.4 + magic-string: ^0.26.5 picocolors: ^1.0.0 regenerator-runtime: ^0.13.9 - systemjs: ^6.12.6 + systemjs: ^6.13.0 vite: workspace:* dependencies: - '@babel/standalone': 7.19.2 - core-js: 3.25.3 - magic-string: 0.26.4 + '@babel/standalone': 7.19.3 + core-js: 3.25.4 + magic-string: 0.26.5 regenerator-runtime: 0.13.9 - systemjs: 6.12.6 + systemjs: 6.13.0 devDependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 picocolors: 1.0.0 vite: link:../vite packages/plugin-react: specifiers: - '@babel/core': ^7.19.1 + '@babel/core': ^7.19.3 '@babel/plugin-transform-react-jsx': ^7.19.0 '@babel/plugin-transform-react-jsx-development': ^7.18.6 '@babel/plugin-transform-react-jsx-self': ^7.18.6 '@babel/plugin-transform-react-jsx-source': ^7.18.6 - magic-string: ^0.26.4 + magic-string: ^0.26.5 react-refresh: ^0.14.0 vite: workspace:* dependencies: - '@babel/core': 7.19.1 - '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.19.1 - '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.19.1 - '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.19.1 - '@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.19.1 - magic-string: 0.26.4 + '@babel/core': 7.19.3 + '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.19.3 + '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.19.3 + '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.19.3 + '@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.19.3 + magic-string: 0.26.5 react-refresh: 0.14.0 devDependencies: vite: link:../vite @@ -185,7 +185,7 @@ importers: slash: ^5.0.0 source-map: ^0.6.1 vite: workspace:* - vue: ^3.2.39 + vue: ^3.2.40 devDependencies: '@jridgewell/gen-mapping': 0.3.2 '@jridgewell/trace-mapping': 0.3.15 @@ -194,26 +194,26 @@ importers: slash: 5.0.0 source-map: 0.6.1 vite: link:../vite - vue: 3.2.39 + vue: 3.2.40 packages/plugin-vue-jsx: specifiers: - '@babel/core': ^7.19.1 - '@babel/plugin-transform-typescript': ^7.19.1 + '@babel/core': ^7.19.3 + '@babel/plugin-transform-typescript': ^7.19.3 '@vue/babel-plugin-jsx': ^1.1.1 vite: workspace:* dependencies: - '@babel/core': 7.19.1 - '@babel/plugin-transform-typescript': 7.19.1_@babel+core@7.19.1 - '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.19.1 + '@babel/core': 7.19.3 + '@babel/plugin-transform-typescript': 7.19.3_@babel+core@7.19.3 + '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.19.3 devDependencies: vite: link:../vite packages/vite: specifiers: '@ampproject/remapping': ^2.2.0 - '@babel/parser': ^7.19.1 - '@babel/types': ^7.19.0 + '@babel/parser': ^7.19.3 + '@babel/types': ^7.19.3 '@jridgewell/trace-mapping': ^0.3.15 '@rollup/plugin-alias': ^3.1.9 '@rollup/plugin-commonjs': ^22.0.2 @@ -243,7 +243,7 @@ importers: http-proxy: ^1.18.1 json5: ^2.2.1 launch-editor-middleware: ^2.6.0 - magic-string: ^0.26.4 + magic-string: ^0.26.5 micromatch: ^4.0.5 mlly: ^0.5.16 mrmime: ^1.0.1 @@ -253,7 +253,7 @@ importers: periscopic: ^3.0.4 picocolors: ^1.0.0 picomatch: ^2.3.1 - postcss: ^8.4.16 + postcss: ^8.4.17 postcss-import: ^15.0.0 postcss-load-config: ^4.0.1 postcss-modules: ^5.0.0 @@ -272,15 +272,15 @@ importers: ws: ^8.9.0 dependencies: esbuild: 0.15.9 - postcss: 8.4.16 + postcss: 8.4.17 resolve: 1.22.1 rollup: 2.79.1 optionalDependencies: fsevents: 2.3.2 devDependencies: '@ampproject/remapping': 2.2.0 - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 '@jridgewell/trace-mapping': 0.3.15 '@rollup/plugin-alias': 3.1.9_rollup@2.79.1 '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1 @@ -308,7 +308,7 @@ importers: http-proxy: 1.18.1_debug@4.3.4 json5: 2.2.1 launch-editor-middleware: 2.6.0 - magic-string: 0.26.4 + magic-string: 0.26.5 micromatch: 4.0.5 mlly: 0.5.16 mrmime: 1.0.1 @@ -318,9 +318,9 @@ importers: periscopic: 3.0.4 picocolors: 1.0.0 picomatch: 2.3.1 - postcss-import: 15.0.0_postcss@8.4.16 - postcss-load-config: 4.0.1_postcss@8.4.16 - postcss-modules: 5.0.0_postcss@8.4.16 + postcss-import: 15.0.0_postcss@8.4.17 + postcss-load-config: 4.0.1_postcss@8.4.17 + postcss-modules: 5.0.0_postcss@8.4.17 resolve.exports: 1.1.0 sirv: 2.0.2 source-map-js: 1.0.2 @@ -349,14 +349,14 @@ importers: playground/alias: specifiers: - '@vue/shared': ^3.2.39 + '@vue/shared': ^3.2.40 aliased-module: file:./dir/module resolve-linked: workspace:* - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - '@vue/shared': 3.2.39 + '@vue/shared': 3.2.40 aliased-module: file:playground/alias/dir/module - vue: 3.2.39 + vue: 3.2.40 devDependencies: resolve-linked: link:../resolve-linked @@ -417,13 +417,13 @@ importers: playground/css-sourcemap: specifiers: less: ^4.1.3 - magic-string: ^0.26.4 + magic-string: ^0.26.5 sass: ^1.55.0 stylus: ^0.59.0 sugarss: ^4.0.1 devDependencies: less: 4.1.3 - magic-string: 0.26.4 + magic-string: 0.26.5 sass: 1.55.0 stylus: 0.59.0 sugarss: 4.0.1 @@ -472,34 +472,34 @@ importers: playground/extensions: specifiers: - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 playground/external: specifiers: '@vitejs/dep-that-imports-vue': file:./dep-that-imports-vue '@vitejs/dep-that-requires-vue': file:./dep-that-requires-vue vite: workspace:* - vue: ^3.2.39 + vue: ^3.2.40 dependencies: '@vitejs/dep-that-imports-vue': file:playground/external/dep-that-imports-vue '@vitejs/dep-that-requires-vue': file:playground/external/dep-that-requires-vue devDependencies: vite: link:../../packages/vite - vue: 3.2.39 + vue: 3.2.40 playground/external/dep-that-imports-vue: specifiers: - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 playground/external/dep-that-requires-vue: specifiers: - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 playground/file-delete-restore: specifiers: @@ -540,11 +540,11 @@ importers: specifiers: express: ^4.18.1 json-module: file:./json-module - vue: ^3.2.39 + vue: ^3.2.40 devDependencies: express: 4.18.1 json-module: file:playground/json/json-module - vue: 3.2.39 + vue: 3.2.40 playground/json/json-module: specifiers: {} @@ -624,9 +624,9 @@ importers: playground/object-hooks: specifiers: - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 playground/optimize-deps: specifiers: @@ -652,12 +652,12 @@ importers: lodash-es: ^4.17.21 lodash.clonedeep: ^4.5.0 nested-exclude: file:./nested-exclude - phoenix: ^1.6.12 + phoenix: ^1.6.13 react: ^18.2.0 react-dom: ^18.2.0 resolve-linked: workspace:0.0.0 url: ^0.11.0 - vue: ^3.2.39 + vue: ^3.2.40 vuex: ^4.0.2 dependencies: added-in-entries: file:playground/optimize-deps/added-in-entries @@ -681,13 +681,13 @@ importers: lodash-es: 4.17.21 lodash.clonedeep: 4.5.0 nested-exclude: file:playground/optimize-deps/nested-exclude - phoenix: 1.6.12 + phoenix: 1.6.13 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 resolve-linked: link:../resolve-linked url: 0.11.0 - vue: 3.2.39 - vuex: 4.0.2_vue@3.2.39 + vue: 3.2.40 + vuex: 4.0.2_vue@3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -778,11 +778,11 @@ importers: dep-a: file:./dep-a dep-including-a: file:./dep-including-a terser: ^5.15.0 - vue: ^3.2.39 + vue: ^3.2.40 vue-router: ^4.1.5 dependencies: - vue: 3.2.39 - vue-router: 4.1.5_vue@3.2.39 + vue: 3.2.40 + vue-router: 4.1.5_vue@3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue dep-a: file:playground/preload/dep-a @@ -1116,14 +1116,14 @@ importers: example-external-component: file:example-external-component express: ^4.18.1 serve-static: ^1.15.0 - vue: ^3.2.39 + vue: ^3.2.40 vue-router: ^4.1.5 vuex: ^4.0.2 dependencies: example-external-component: file:playground/ssr-vue/example-external-component - vue: 3.2.39 - vue-router: 4.1.5_vue@3.2.39 - vuex: 4.0.2_vue@3.2.39 + vue: 3.2.40 + vue-router: 4.1.5_vue@3.2.40 + vuex: 4.0.2_vue@3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -1155,13 +1155,13 @@ importers: autoprefixer: ^10.4.12 tailwindcss: ^3.1.8 ts-node: ^10.9.1 - vue: ^3.2.39 + vue: ^3.2.40 vue-router: ^4.1.5 dependencies: autoprefixer: 10.4.12 tailwindcss: 3.1.8_ts-node@10.9.1 - vue: 3.2.39 - vue-router: 4.1.5_vue@3.2.39 + vue: 3.2.40 + vue-router: 4.1.5_vue@3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue ts-node: 10.9.1 @@ -1187,10 +1187,10 @@ importers: pug: ^3.0.2 sass: ^1.55.0 stylus: ^0.59.0 - vue: ^3.2.39 + vue: ^3.2.40 dependencies: lodash-es: 4.17.21 - vue: 3.2.39 + vue: 3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue js-yaml: 4.1.0 @@ -1203,9 +1203,9 @@ importers: specifiers: '@vitejs/plugin-vue': workspace:* '@vitejs/plugin-vue-jsx': workspace:* - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -1214,9 +1214,9 @@ importers: specifiers: '@vitejs/plugin-legacy': workspace:* '@vitejs/plugin-vue': workspace:* - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 devDependencies: '@vitejs/plugin-legacy': link:../../packages/plugin-legacy '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1224,18 +1224,18 @@ importers: playground/vue-lib: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue playground/vue-server-origin: specifiers: '@vitejs/plugin-vue': workspace:* - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue @@ -1245,9 +1245,9 @@ importers: less: ^4.1.3 postcss-nested: ^5.0.6 sass: ^1.55.0 - vue: ^3.2.39 + vue: ^3.2.40 dependencies: - vue: 3.2.39 + vue: 3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue less: 4.1.3 @@ -1398,24 +1398,24 @@ packages: dependencies: '@babel/highlight': 7.18.6 - /@babel/compat-data/7.19.1: - resolution: {integrity: sha512-72a9ghR0gnESIa7jBN53U32FOVCEoztyIlKaNoU05zRhEecduGK9L9c3ww7Mp06JiR+0ls0GBPFJQwwtjn9ksg==} + /@babel/compat-data/7.19.3: + resolution: {integrity: sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==} engines: {node: '>=6.9.0'} - /@babel/core/7.19.1: - resolution: {integrity: sha512-1H8VgqXme4UXCRv7/Wa1bq7RVymKOzC7znjyFM8KiEzwFqcKUKYNoQef4GhdklgNvoBXyW4gYhuBNCM5o1zImw==} + /@babel/core/7.19.3: + resolution: {integrity: sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 '@babel/code-frame': 7.18.6 - '@babel/generator': 7.19.0 - '@babel/helper-compilation-targets': 7.19.1_@babel+core@7.19.1 + '@babel/generator': 7.19.3 + '@babel/helper-compilation-targets': 7.19.3_@babel+core@7.19.3 '@babel/helper-module-transforms': 7.19.0 '@babel/helpers': 7.19.0 - '@babel/parser': 7.19.1 + '@babel/parser': 7.19.3 '@babel/template': 7.18.10 - '@babel/traverse': 7.19.1 - '@babel/types': 7.19.0 + '@babel/traverse': 7.19.3 + '@babel/types': 7.19.3 convert-source-map: 1.8.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -1424,11 +1424,11 @@ packages: transitivePeerDependencies: - supports-color - /@babel/generator/7.19.0: - resolution: {integrity: sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==} + /@babel/generator/7.19.3: + resolution: {integrity: sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 @@ -1436,28 +1436,28 @@ packages: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: false - /@babel/helper-compilation-targets/7.19.1_@babel+core@7.19.1: - resolution: {integrity: sha512-LlLkkqhCMyz2lkQPvJNdIYU7O5YjWRgC2R4omjCTpZd8u8KMQzZvX4qce+/BluN1rcQiV7BoGUpmQ0LeHerbhg==} + /@babel/helper-compilation-targets/7.19.3_@babel+core@7.19.3: + resolution: {integrity: sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.19.1 - '@babel/core': 7.19.1 + '@babel/compat-data': 7.19.3 + '@babel/core': 7.19.3 '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.4 semver: 6.3.0 - /@babel/helper-create-class-features-plugin/7.19.0_@babel+core@7.19.1: + /@babel/helper-create-class-features-plugin/7.19.0_@babel+core@7.19.3: resolution: {integrity: sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 @@ -1478,33 +1478,33 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 /@babel/helper-member-expression-to-functions/7.18.9: resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: false /@babel/helper-module-imports/7.16.7: resolution: {integrity: sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: false /@babel/helper-module-imports/7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 /@babel/helper-module-transforms/7.19.0: resolution: {integrity: sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==} @@ -1514,10 +1514,10 @@ packages: '@babel/helper-module-imports': 7.18.6 '@babel/helper-simple-access': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.18.10 - '@babel/traverse': 7.19.1 - '@babel/types': 7.19.0 + '@babel/traverse': 7.19.3 + '@babel/types': 7.19.3 transitivePeerDependencies: - supports-color @@ -1525,7 +1525,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: false /@babel/helper-plugin-utils/7.18.6: @@ -1549,8 +1549,8 @@ packages: '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-member-expression-to-functions': 7.18.9 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/traverse': 7.19.1 - '@babel/types': 7.19.0 + '@babel/traverse': 7.19.3 + '@babel/types': 7.19.3 transitivePeerDependencies: - supports-color dev: false @@ -1559,20 +1559,20 @@ packages: resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 /@babel/helper-split-export-declaration/7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 /@babel/helper-string-parser/7.18.10: resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier/7.18.6: - resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} + /@babel/helper-validator-identifier/7.19.1: + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} /@babel/helper-validator-option/7.18.6: @@ -1584,8 +1584,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/traverse': 7.19.1 - '@babel/types': 7.19.0 + '@babel/traverse': 7.19.3 + '@babel/types': 7.19.3 transitivePeerDependencies: - supports-color @@ -1593,16 +1593,16 @@ packages: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser/7.19.1: - resolution: {integrity: sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A==} + /@babel/parser/7.19.3: + resolution: {integrity: sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 /@babel/plugin-proposal-pipeline-operator/7.18.9: resolution: {integrity: sha512-Pc33e6m8f4MJhRXVCUwiKZNtEm+W2CUPHIL0lyJNtkp+w6d75CLw3gsBKQ81VAMUgT9jVPIEU8gwJ5nJgmJ1Ag==} @@ -1614,13 +1614,13 @@ packages: '@babel/plugin-syntax-pipeline-operator': 7.18.6 dev: true - /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.19.1: + /@babel/plugin-syntax-jsx/7.16.7_@babel+core@7.19.3: resolution: {integrity: sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-plugin-utils': 7.19.0 dev: false @@ -1632,13 +1632,13 @@ packages: dependencies: '@babel/helper-plugin-utils': 7.19.0 - /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.19.1: + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.19.3: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-plugin-utils': 7.19.0 dev: false @@ -1651,70 +1651,70 @@ packages: '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.19.1: + /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.19.3: resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-plugin-utils': 7.19.0 dev: false - /@babel/plugin-transform-react-jsx-development/7.18.6_@babel+core@7.19.1: + /@babel/plugin-transform-react-jsx-development/7.18.6_@babel+core@7.19.3: resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 - '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.19.1 + '@babel/core': 7.19.3 + '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.19.3 dev: false - /@babel/plugin-transform-react-jsx-self/7.18.6_@babel+core@7.19.1: + /@babel/plugin-transform-react-jsx-self/7.18.6_@babel+core@7.19.3: resolution: {integrity: sha512-A0LQGx4+4Jv7u/tWzoJF7alZwnBDQd6cGLh9P+Ttk4dpiL+J5p7NSNv/9tlEFFJDq3kjxOavWmbm6t0Gk+A3Ig==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-plugin-utils': 7.18.6 dev: false - /@babel/plugin-transform-react-jsx-source/7.18.6_@babel+core@7.19.1: + /@babel/plugin-transform-react-jsx-source/7.18.6_@babel+core@7.19.3: resolution: {integrity: sha512-utZmlASneDfdaMh0m/WausbjUjEdGrQJz0vFK93d7wD3xf5wBtX219+q6IlCNZeguIcxS2f/CvLZrlLSvSHQXw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-plugin-utils': 7.18.6 dev: false - /@babel/plugin-transform-react-jsx/7.19.0_@babel+core@7.19.1: + /@babel/plugin-transform-react-jsx/7.19.0_@babel+core@7.19.3: resolution: {integrity: sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-module-imports': 7.18.6 '@babel/helper-plugin-utils': 7.19.0 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.19.1 - '@babel/types': 7.19.0 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.19.3 + '@babel/types': 7.19.3 dev: false - /@babel/plugin-transform-typescript/7.19.1_@babel+core@7.19.1: - resolution: {integrity: sha512-+ILcOU+6mWLlvCwnL920m2Ow3wWx3Wo8n2t5aROQmV55GZt+hOiLvBaa3DNzRjSEHa1aauRs4/YLmkCfFkhhRQ==} + /@babel/plugin-transform-typescript/7.19.3_@babel+core@7.19.3: + resolution: {integrity: sha512-z6fnuK9ve9u/0X0rRvI9MY0xg+DOUaABDYOe+/SQTxtlptaBB/V9JIUxJn6xp3lMBeb9qe8xSFmHU35oZDXD+w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.19.1 - '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.19.1 + '@babel/core': 7.19.3 + '@babel/helper-create-class-features-plugin': 7.19.0_@babel+core@7.19.3 '@babel/helper-plugin-utils': 7.19.0 - '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.19.1 + '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.19.3 transitivePeerDependencies: - supports-color dev: false @@ -1725,8 +1725,8 @@ packages: dependencies: regenerator-runtime: 0.13.9 - /@babel/standalone/7.19.2: - resolution: {integrity: sha512-p+U+TYGevnPUemfHeQVFwABp9kWe5+h20MKxCzvyeAD1SIm7tlvo6lGRFz1WakAxmVZvLz7WDuWjwdC8FZKp+A==} + /@babel/standalone/7.19.3: + resolution: {integrity: sha512-zSdDx28L6f27Y59OMrl8mBbtyB/cpIGlHm7wVOHlcmUTpD10AiUILkekZATkkpsuTagTWezdJmUaeY8P2SONUA==} engines: {node: '>=6.9.0'} /@babel/template/7.16.7: @@ -1734,8 +1734,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 dev: false /@babel/template/7.18.10: @@ -1743,50 +1743,50 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 /@babel/traverse/7.17.10: resolution: {integrity: sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/generator': 7.19.0 + '@babel/generator': 7.19.3 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false - /@babel/traverse/7.19.1: - resolution: {integrity: sha512-0j/ZfZMxKukDaag2PtOPDbwuELqIar6lLskVPPJDjXMXjfLb1Obo/1yjxIGqqAJrmfaTIY3z2wFLAQ7qSkLsuA==} + /@babel/traverse/7.19.3: + resolution: {integrity: sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/generator': 7.19.0 + '@babel/generator': 7.19.3 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - /@babel/types/7.19.0: - resolution: {integrity: sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==} + /@babel/types/7.19.3: + resolution: {integrity: sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.18.10 - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 /@cloudflare/workers-types/2.2.2: @@ -2075,30 +2075,30 @@ packages: - supports-color dev: false - /@microsoft/api-extractor-model/7.24.2: - resolution: {integrity: sha512-uUvjqTCY7hYERWGks+joTioN1QYHIucCDy7I/JqLxFxLbFXE5dpc1X7L+FG4PN/s8QYL24DKt0fqJkgcrFKLTw==} + /@microsoft/api-extractor-model/7.24.3: + resolution: {integrity: sha512-JElpLULqYDXQb0YIKKQhOJaNWBXsYeYu5J51Z4O6RGbOq7Tby9ViVfpDuXVXa87AMOSR5WKuaxG/5SnQVVNxiw==} dependencies: '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.52.0 + '@rushstack/node-core-library': 3.53.0 dev: true - /@microsoft/api-extractor/7.31.2: - resolution: {integrity: sha512-ZODCU9ckTS9brXiZpUW2iDrnAg7jLxeLBM1AkPpSZFcbG/8HGLvfKOKrd71VIJHjc52x2lB8xj7ZWksnP7AOBA==} + /@microsoft/api-extractor/7.32.0: + resolution: {integrity: sha512-BfvPpeVzWLFTdairVItzWQGsZr82fR4RH+8Q4I7t0f9xq66v4Qz9K+u25jbL5R42X01b/vvJMuRhX5KhU8J1Ug==} hasBin: true dependencies: - '@microsoft/api-extractor-model': 7.24.2 + '@microsoft/api-extractor-model': 7.24.3 '@microsoft/tsdoc': 0.14.1 '@microsoft/tsdoc-config': 0.16.1 - '@rushstack/node-core-library': 3.52.0 - '@rushstack/rig-package': 0.3.15 - '@rushstack/ts-command-line': 4.12.3 + '@rushstack/node-core-library': 3.53.0 + '@rushstack/rig-package': 0.3.16 + '@rushstack/ts-command-line': 4.12.4 colors: 1.2.5 lodash: 4.17.21 resolve: 1.17.0 semver: 7.3.7 source-map: 0.6.1 - typescript: 4.7.4 + typescript: 4.8.4 dev: true /@microsoft/tsdoc-config/0.16.1: @@ -2321,8 +2321,8 @@ packages: picomatch: 2.3.1 dev: true - /@rushstack/node-core-library/3.52.0: - resolution: {integrity: sha512-Z+MAP//G3rEGZd3JxJcBGcPYJlh8pvPoLMTLa5Sy6FTE6hRPzN+5J8DT7BbTmlqZaL6SZpXF30heRUbnYOvujw==} + /@rushstack/node-core-library/3.53.0: + resolution: {integrity: sha512-FXk3eDtTHKnaUq+fLyNY867ioRhMa6CJDJO5hZ3wuGlxm184nckAFiU+hx027AodjpnqjX6pYF0zZGq7k7P/vg==} dependencies: '@types/node': 12.20.24 colors: 1.2.5 @@ -2334,15 +2334,15 @@ packages: z-schema: 5.0.3 dev: true - /@rushstack/rig-package/0.3.15: - resolution: {integrity: sha512-jxVfvO5OnkRlYRhcVDZWvwiI2l4pv37HDJRtyg5HbD8Z/I8Xj32RICgrxS5xMeGGytobrg5S6OfPOHskg7Nw+A==} + /@rushstack/rig-package/0.3.16: + resolution: {integrity: sha512-FoSQng2RtapEUe+CBPKxbpZUhUht5s2+mMiztRH95qqp81dsUpfEWojtV6XrUVyWIRk2/cY1CDZUKJWxMrT26Q==} dependencies: resolve: 1.17.0 strip-json-comments: 3.1.1 dev: true - /@rushstack/ts-command-line/4.12.3: - resolution: {integrity: sha512-Pdij22RotMXzI+HWHyYCvw0RMZhiP5a6Za/96XamZ1+mxmpSm4ujf8TROKxGAHySmR5A8iNVSlzhNMnUlFQE6g==} + /@rushstack/ts-command-line/4.12.4: + resolution: {integrity: sha512-ckZHEfPiJCmBdWd/syve5zu2TNsPIqbFie3jWzM/izZa6ZOkDwex/K1ww+kJ12hFBnN44lMD7voJvKXajUCEDA==} dependencies: '@types/argparse': 1.0.38 argparse: 1.0.10 @@ -2373,8 +2373,8 @@ packages: /@types/babel__core/7.1.19: resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} dependencies: - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.17.1 @@ -2383,13 +2383,13 @@ packages: /@types/babel__generator/7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: true /@types/babel__standalone/7.1.4: resolution: {integrity: sha512-HijIDmcNl3Wmo0guqjYkQvMzyRCM6zMCkYcdG8f+2X7mPBNa9ikSeaQlWs2Yg18KN1klOJzyupX5BPOf+7ahaw==} dependencies: - '@babel/core': 7.19.1 + '@babel/core': 7.19.3 transitivePeerDependencies: - supports-color dev: true @@ -2397,14 +2397,14 @@ packages: /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 dev: true /@types/babel__traverse/7.17.1: resolution: {integrity: sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: true /@types/braces/3.0.1: @@ -2556,8 +2556,8 @@ packages: '@types/node': 17.0.42 dev: true - /@typescript-eslint/eslint-plugin/5.38.0_rwai6flfqy4pzaqznlsnhxvs6q: - resolution: {integrity: sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==} + /@typescript-eslint/eslint-plugin/5.38.1_z5cqhfye5lpmqil3ypaxjnnbyi: + resolution: {integrity: sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2567,10 +2567,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm - '@typescript-eslint/scope-manager': 5.38.0 - '@typescript-eslint/type-utils': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm - '@typescript-eslint/utils': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/scope-manager': 5.38.1 + '@typescript-eslint/type-utils': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/utils': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm debug: 4.3.4 eslint: 8.24.0 ignore: 5.2.0 @@ -2582,8 +2582,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.38.0_4at4lsfnhb3djm6qjts2gmiglm: - resolution: {integrity: sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==} + /@typescript-eslint/parser/5.38.1_4at4lsfnhb3djm6qjts2gmiglm: + resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2592,9 +2592,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.38.0 - '@typescript-eslint/types': 5.38.0 - '@typescript-eslint/typescript-estree': 5.38.0_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.38.1 + '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.6.4 debug: 4.3.4 eslint: 8.24.0 typescript: 4.6.4 @@ -2602,16 +2602,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.38.0: - resolution: {integrity: sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==} + /@typescript-eslint/scope-manager/5.38.1: + resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.0 - '@typescript-eslint/visitor-keys': 5.38.0 + '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/visitor-keys': 5.38.1 dev: true - /@typescript-eslint/type-utils/5.38.0_4at4lsfnhb3djm6qjts2gmiglm: - resolution: {integrity: sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==} + /@typescript-eslint/type-utils/5.38.1_4at4lsfnhb3djm6qjts2gmiglm: + resolution: {integrity: sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2620,8 +2620,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.38.0_typescript@4.6.4 - '@typescript-eslint/utils': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.6.4 + '@typescript-eslint/utils': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm debug: 4.3.4 eslint: 8.24.0 tsutils: 3.21.0_typescript@4.6.4 @@ -2630,13 +2630,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.38.0: - resolution: {integrity: sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==} + /@typescript-eslint/types/5.38.1: + resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.38.0_typescript@4.6.4: - resolution: {integrity: sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==} + /@typescript-eslint/typescript-estree/5.38.1_typescript@4.6.4: + resolution: {integrity: sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2644,8 +2644,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.38.0 - '@typescript-eslint/visitor-keys': 5.38.0 + '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/visitor-keys': 5.38.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -2656,16 +2656,16 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.38.0_4at4lsfnhb3djm6qjts2gmiglm: - resolution: {integrity: sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==} + /@typescript-eslint/utils/5.38.1_4at4lsfnhb3djm6qjts2gmiglm: + resolution: {integrity: sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.38.0 - '@typescript-eslint/types': 5.38.0 - '@typescript-eslint/typescript-estree': 5.38.0_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.38.1 + '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.6.4 eslint: 8.24.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.24.0 @@ -2674,11 +2674,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.38.0: - resolution: {integrity: sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==} + /@typescript-eslint/visitor-keys/5.38.1: + resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/types': 5.38.1 eslint-visitor-keys: 3.3.0 dev: true @@ -2686,14 +2686,14 @@ packages: resolution: {integrity: sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==} dev: false - /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.19.1: + /@vue/babel-plugin-jsx/1.1.1_@babel+core@7.19.3: resolution: {integrity: sha512-j2uVfZjnB5+zkcbc/zsOc0fSNGCMMjaEXP52wdwdIfn0qjFfEYpYZBFKFg+HHnQeJCVrjOeO0YxgaL7DMrym9w==} dependencies: '@babel/helper-module-imports': 7.16.7 - '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.19.1 + '@babel/plugin-syntax-jsx': 7.16.7_@babel+core@7.19.3 '@babel/template': 7.16.7 '@babel/traverse': 7.17.10 - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 '@vue/babel-helper-vue-transform-on': 1.0.2 camelcase: 6.3.0 html-tags: 3.2.0 @@ -2703,39 +2703,39 @@ packages: - supports-color dev: false - /@vue/compiler-core/3.2.39: - resolution: {integrity: sha512-mf/36OWXqWn0wsC40nwRRGheR/qoID+lZXbIuLnr4/AngM0ov8Xvv8GHunC0rKRIkh60bTqydlqTeBo49rlbqw==} + /@vue/compiler-core/3.2.40: + resolution: {integrity: sha512-2Dc3Stk0J/VyQ4OUr2yEC53kU28614lZS+bnrCbFSAIftBJ40g/2yQzf4mPBiFuqguMB7hyHaujdgZAQ67kZYA==} dependencies: - '@babel/parser': 7.19.1 - '@vue/shared': 3.2.39 + '@babel/parser': 7.19.3 + '@vue/shared': 3.2.40 estree-walker: 2.0.2 source-map: 0.6.1 - /@vue/compiler-dom/3.2.39: - resolution: {integrity: sha512-HMFI25Be1C8vLEEv1hgEO1dWwG9QQ8LTTPmCkblVJY/O3OvWx6r1+zsox5mKPMGvqYEZa6l8j+xgOfUspgo7hw==} + /@vue/compiler-dom/3.2.40: + resolution: {integrity: sha512-OZCNyYVC2LQJy4H7h0o28rtk+4v+HMQygRTpmibGoG9wZyomQiS5otU7qo3Wlq5UfHDw2RFwxb9BJgKjVpjrQw==} dependencies: - '@vue/compiler-core': 3.2.39 - '@vue/shared': 3.2.39 + '@vue/compiler-core': 3.2.40 + '@vue/shared': 3.2.40 - /@vue/compiler-sfc/3.2.39: - resolution: {integrity: sha512-fqAQgFs1/BxTUZkd0Vakn3teKUt//J3c420BgnYgEOoVdTwYpBTSXCMJ88GOBCylmUBbtquGPli9tVs7LzsWIA==} + /@vue/compiler-sfc/3.2.40: + resolution: {integrity: sha512-tzqwniIN1fu1PDHC3CpqY/dPCfN/RN1thpBC+g69kJcrl7mbGiHKNwbA6kJ3XKKy8R6JLKqcpVugqN4HkeBFFg==} dependencies: - '@babel/parser': 7.19.1 - '@vue/compiler-core': 3.2.39 - '@vue/compiler-dom': 3.2.39 - '@vue/compiler-ssr': 3.2.39 - '@vue/reactivity-transform': 3.2.39 - '@vue/shared': 3.2.39 + '@babel/parser': 7.19.3 + '@vue/compiler-core': 3.2.40 + '@vue/compiler-dom': 3.2.40 + '@vue/compiler-ssr': 3.2.40 + '@vue/reactivity-transform': 3.2.40 + '@vue/shared': 3.2.40 estree-walker: 2.0.2 magic-string: 0.25.9 - postcss: 8.4.16 + postcss: 8.4.17 source-map: 0.6.1 - /@vue/compiler-ssr/3.2.39: - resolution: {integrity: sha512-EoGCJ6lincKOZGW+0Ky4WOKsSmqL7hp1ZYgen8M7u/mlvvEQUaO9tKKOy7K43M9U2aA3tPv0TuYYQFrEbK2eFQ==} + /@vue/compiler-ssr/3.2.40: + resolution: {integrity: sha512-80cQcgasKjrPPuKcxwuCx7feq+wC6oFl5YaKSee9pV3DNq+6fmCVwEEC3vvkf/E2aI76rIJSOYHsWSEIxK74oQ==} dependencies: - '@vue/compiler-dom': 3.2.39 - '@vue/shared': 3.2.39 + '@vue/compiler-dom': 3.2.40 + '@vue/shared': 3.2.40 /@vue/devtools-api/6.1.4: resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==} @@ -2743,66 +2743,71 @@ packages: /@vue/devtools-api/6.2.1: resolution: {integrity: sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==} + dev: false + + /@vue/devtools-api/6.4.2: + resolution: {integrity: sha512-6hNZ23h1M2Llky+SIAmVhL7s6BjLtZBCzjIz9iRSBUsysjE7kC39ulW0dH4o/eZtycmSt4qEr6RDVGTIuWu+ow==} + dev: true - /@vue/reactivity-transform/3.2.39: - resolution: {integrity: sha512-HGuWu864zStiWs9wBC6JYOP1E00UjMdDWIG5W+FpUx28hV3uz9ODOKVNm/vdOy/Pvzg8+OcANxAVC85WFBbl3A==} + /@vue/reactivity-transform/3.2.40: + resolution: {integrity: sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==} dependencies: - '@babel/parser': 7.19.1 - '@vue/compiler-core': 3.2.39 - '@vue/shared': 3.2.39 + '@babel/parser': 7.19.3 + '@vue/compiler-core': 3.2.40 + '@vue/shared': 3.2.40 estree-walker: 2.0.2 magic-string: 0.25.9 - /@vue/reactivity/3.2.39: - resolution: {integrity: sha512-vlaYX2a3qMhIZfrw3Mtfd+BuU+TZmvDrPMa+6lpfzS9k/LnGxkSuf0fhkP0rMGfiOHPtyKoU9OJJJFGm92beVQ==} + /@vue/reactivity/3.2.40: + resolution: {integrity: sha512-N9qgGLlZmtUBMHF9xDT4EkD9RdXde1Xbveb+niWMXuHVWQP5BzgRmE3SFyUBBcyayG4y1lhoz+lphGRRxxK4RA==} dependencies: - '@vue/shared': 3.2.39 + '@vue/shared': 3.2.40 - /@vue/runtime-core/3.2.39: - resolution: {integrity: sha512-xKH5XP57JW5JW+8ZG1khBbuLakINTgPuINKL01hStWLTTGFOrM49UfCFXBcFvWmSbci3gmJyLl2EAzCaZWsx8g==} + /@vue/runtime-core/3.2.40: + resolution: {integrity: sha512-U1+rWf0H8xK8aBUZhnrN97yoZfHbjgw/bGUzfgKPJl69/mXDuSg8CbdBYBn6VVQdR947vWneQBFzdhasyzMUKg==} dependencies: - '@vue/reactivity': 3.2.39 - '@vue/shared': 3.2.39 + '@vue/reactivity': 3.2.40 + '@vue/shared': 3.2.40 - /@vue/runtime-dom/3.2.39: - resolution: {integrity: sha512-4G9AEJP+sLhsqf5wXcyKVWQKUhI+iWfy0hWQgea+CpaTD7BR0KdQzvoQdZhwCY6B3oleSyNLkLAQwm0ya/wNoA==} + /@vue/runtime-dom/3.2.40: + resolution: {integrity: sha512-AO2HMQ+0s2+MCec8hXAhxMgWhFhOPJ/CyRXnmTJ6XIOnJFLrH5Iq3TNwvVcODGR295jy77I6dWPj+wvFoSYaww==} dependencies: - '@vue/runtime-core': 3.2.39 - '@vue/shared': 3.2.39 + '@vue/runtime-core': 3.2.40 + '@vue/shared': 3.2.40 csstype: 2.6.20 - /@vue/server-renderer/3.2.39_vue@3.2.39: - resolution: {integrity: sha512-1yn9u2YBQWIgytFMjz4f/t0j43awKytTGVptfd3FtBk76t1pd8mxbek0G/DrnjJhd2V7mSTb5qgnxMYt8Z5iSQ==} + /@vue/server-renderer/3.2.40_vue@3.2.40: + resolution: {integrity: sha512-gtUcpRwrXOJPJ4qyBpU3EyxQa4EkV8I4f8VrDePcGCPe4O/hd0BPS7v9OgjIQob6Ap8VDz9G+mGTKazE45/95w==} peerDependencies: - vue: 3.2.39 + vue: 3.2.40 dependencies: - '@vue/compiler-ssr': 3.2.39 - '@vue/shared': 3.2.39 - vue: 3.2.39 + '@vue/compiler-ssr': 3.2.40 + '@vue/shared': 3.2.40 + vue: 3.2.40 - /@vue/shared/3.2.39: - resolution: {integrity: sha512-D3dl2ZB9qE6mTuWPk9RlhDeP1dgNRUKC3NJxji74A4yL8M2MwlhLKUC/49WHjrNzSPug58fWx/yFbaTzGAQSBw==} + /@vue/shared/3.2.40: + resolution: {integrity: sha512-0PLQ6RUtZM0vO3teRfzGi4ltLUO5aO+kLgwh4Um3THSR03rpQWLTuRCkuO5A41ITzwdWeKdPHtSARuPkoo5pCQ==} - /@vueuse/core/9.2.0_vue@3.2.39: - resolution: {integrity: sha512-/MZ6qpz6uSyaXrtoeBWQzAKRG3N7CvfVWvQxiM3ei3Xe5ydOjjtVbo7lGl9p8dECV93j7W8s63A8H0kFLpLyxg==} + /@vueuse/core/9.3.0_vue@3.2.40: + resolution: {integrity: sha512-64Rna8IQDWpdrJxgitDg7yv1yTp41ZmvV8zlLEylK4QQLWAhz1OFGZDPZ8bU4lwcGgbEJ2sGi2jrdNh4LttUSQ==} dependencies: '@types/web-bluetooth': 0.0.15 - '@vueuse/metadata': 9.2.0 - '@vueuse/shared': 9.2.0_vue@3.2.39 - vue-demi: 0.13.1_vue@3.2.39 + '@vueuse/metadata': 9.3.0 + '@vueuse/shared': 9.3.0_vue@3.2.40 + vue-demi: 0.13.1_vue@3.2.40 transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/metadata/9.2.0: - resolution: {integrity: sha512-exN4KE6iquxDCdt72BgEhb3tlOpECtD61AUdXnUqBTIUCl70x1Ar/QXo3bYcvxmdMS2/peQyfeTzBjRTpvL5xw==} + /@vueuse/metadata/9.3.0: + resolution: {integrity: sha512-GnnfjbzIPJIh9ngL9s9oGU1+Hx/h5/KFqTfJykzh/1xjaHkedV9g0MASpdmPZIP+ynNhKAcEfA6g5i8KXwtoMA==} dev: true - /@vueuse/shared/9.2.0_vue@3.2.39: - resolution: {integrity: sha512-NnRp/noSWuXW0dKhZK5D0YLrDi0nmZ18UeEgwXQq7Ul5TTP93lcNnKjrHtd68j2xFB/l59yPGFlCryL692bnrA==} + /@vueuse/shared/9.3.0_vue@3.2.40: + resolution: {integrity: sha512-caGUWLY0DpPC6l31KxeUy6vPVNA0yKxx81jFYLoMpyP6cF84FG5Dkf69DfSUqL57wX8JcUkJDMnQaQIZPWFEQQ==} dependencies: - vue-demi: 0.13.1_vue@3.2.39 + vue-demi: 0.13.1_vue@3.2.40 transitivePeerDependencies: - '@vue/composition-api' - vue @@ -3098,7 +3103,7 @@ packages: resolution: {integrity: sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==} engines: {node: '>= 10.0.0'} dependencies: - '@babel/types': 7.19.0 + '@babel/types': 7.19.3 dev: true /balanced-match/1.0.2: @@ -3506,8 +3511,8 @@ packages: /constantinople/4.0.1: resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==} dependencies: - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 dev: true /content-disposition/0.5.4: @@ -3705,8 +3710,8 @@ packages: is-what: 3.14.1 dev: true - /core-js/3.25.3: - resolution: {integrity: sha512-y1hvKXmPHvm5B7w4ln1S4uc9eV/O5+iFExSRUimnvIph11uaizFR8LFMdONN8hG3P2pipUfX4Y/fR8rAEtcHcQ==} + /core-js/3.25.4: + resolution: {integrity: sha512-JDLxg61lFPFYQ7U0HKoyKwVUV63VbbVTb/K73Yf+k4Mf4ZBZxCjfyrWZjTk1ZM7ZrgFSqhSIOmuzYAxG2f/reQ==} requiresBuild: true dev: false @@ -4744,7 +4749,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.3_wksnzkbqgr3q3djac7fn35kbeq: + /eslint-module-utils/2.7.3_sc2njczt72bj6aejru6rzi6gwa: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -4762,7 +4767,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -4781,7 +4786,7 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_2azyxy5wfmd73v3pbt5rvmgcsm: + /eslint-plugin-import/2.26.0_gofx6msuqd4luqedfouzks2s4u: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4791,14 +4796,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.38.0_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.24.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_wksnzkbqgr3q3djac7fn35kbeq + eslint-module-utils: 2.7.3_sc2njczt72bj6aejru6rzi6gwa has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -5593,13 +5598,13 @@ packages: resolution: {integrity: sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg==} dev: true - /icss-utils/5.1.0_postcss@8.4.16: + /icss-utils/5.1.0_postcss@8.4.17: resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.16 + postcss: 8.4.17 dev: true /ignore/5.2.0: @@ -6216,8 +6221,8 @@ packages: dependencies: sourcemap-codec: 1.4.8 - /magic-string/0.26.4: - resolution: {integrity: sha512-e5uXtVJ22aEpK9u1+eQf0fSxHeqwyV19K+uGnlROCxUhzwRip9tBsaMViK/0vC3viyPd5Gtucp3UmEp/Q2cPTQ==} + /magic-string/0.26.5: + resolution: {integrity: sha512-yXUIYOOQnEHKHOftp5shMWpB9ImfgfDJpapa38j/qMtTj5QHWucvxP4lUtuRmHT9vAzvtpHkWKXW9xBwimXeNg==} engines: {node: '>=12'} dependencies: sourcemap-codec: 1.4.8 @@ -6643,10 +6648,6 @@ packages: set-blocking: 2.0.0 dev: false - /nprogress/0.2.0: - resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==} - dev: true - /object-assign/4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -6926,8 +6927,8 @@ packages: is-reference: 3.0.0 dev: true - /phoenix/1.6.12: - resolution: {integrity: sha512-r0MkPQqC348wfEO9Tn6sbFMPt0zn0Mo0aYIz+zig76xxvFQp7xk5GwwlErh04qyCnNfXta2emTQ7aEyo1OtMIQ==} + /phoenix/1.6.13: + resolution: {integrity: sha512-LesTEFhjPsSBn3W2YnI8+0Og1aJKVmwXk+K/XoWgxTDeAxGaJxftF4biy7Vq6tZE07Lhgq3G/UEDmXNP0vYtRg==} dev: false /picocolors/1.0.0: @@ -6972,60 +6973,60 @@ packages: pathe: 0.3.8 dev: true - /playwright-chromium/1.26.0: - resolution: {integrity: sha512-4hDiVmMKmtuHW5ne11S1HCQTdL+wytprQMhWYecEjMSIKBR1DJ3JLrcUDgqA0L5Jzi/CBKYQQk6TOVlTjXybXQ==} + /playwright-chromium/1.26.1: + resolution: {integrity: sha512-F38TvJWkrP7aLJ99AeZFSad0FKjOjudhdBsFr91cJkO28sEEy2VEiUJtk3ezu3a55S9Ka/kMJ1gM1msM3hDkGA==} engines: {node: '>=14'} hasBin: true requiresBuild: true dependencies: - playwright-core: 1.26.0 + playwright-core: 1.26.1 dev: true - /playwright-core/1.26.0: - resolution: {integrity: sha512-p8huU8eU4gD3VkJd3DA1nA7R3XA6rFvFL+1RYS96cSljCF2yJE9CWEHTPF4LqX8KN9MoWCrAfVKP5381X3CZqg==} + /playwright-core/1.26.1: + resolution: {integrity: sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==} engines: {node: '>=14'} hasBin: true dev: true - /pnpm/7.12.2: - resolution: {integrity: sha512-8QvnKANKN+YZXDmVYGI7zRJysdKldZI+w3AYnxu9IwtnLv1x6WuzrJr0nxMcTeuUAT908RjDqK+/6KJB9wNqxA==} + /pnpm/7.13.0: + resolution: {integrity: sha512-n1oG3HAOIXuOpzQAMqaPTTKlP1lJBpj9p9EIom63WYiZmCl2GaTvrcDQ085MZRcb5buQxt5lYgfqXppkluB97A==} engines: {node: '>=14.6'} hasBin: true dev: true - /postcss-import/14.1.0_postcss@8.4.14: + /postcss-import/14.1.0_postcss@8.4.17: resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} engines: {node: '>=10.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.14 + postcss: 8.4.17 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.1 - /postcss-import/15.0.0_postcss@8.4.16: + /postcss-import/15.0.0_postcss@8.4.17: resolution: {integrity: sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg==} engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.16 + postcss: 8.4.17 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.1 dev: true - /postcss-js/4.0.0_postcss@8.4.14: + /postcss-js/4.0.0_postcss@8.4.17: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.3.3 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.14 + postcss: 8.4.17 - /postcss-load-config/3.1.4_pe6iykxod2v7i2uk6okjazxzki: + /postcss-load-config/3.1.4_m6qswdslzu5ddi7v2thd72jv24: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -7038,12 +7039,12 @@ packages: optional: true dependencies: lilconfig: 2.0.6 - postcss: 8.4.14 + postcss: 8.4.17 ts-node: 10.9.1 yaml: 1.10.2 dev: false - /postcss-load-config/3.1.4_postcss@8.4.14: + /postcss-load-config/3.1.4_postcss@8.4.17: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -7056,10 +7057,10 @@ packages: optional: true dependencies: lilconfig: 2.0.6 - postcss: 8.4.14 + postcss: 8.4.17 yaml: 1.10.2 - /postcss-load-config/4.0.1_postcss@8.4.16: + /postcss-load-config/4.0.1_postcss@8.4.17: resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -7072,52 +7073,52 @@ packages: optional: true dependencies: lilconfig: 2.0.5 - postcss: 8.4.16 + postcss: 8.4.17 yaml: 2.1.1 dev: true - /postcss-modules-extract-imports/3.0.0_postcss@8.4.16: + /postcss-modules-extract-imports/3.0.0_postcss@8.4.17: resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.16 + postcss: 8.4.17 dev: true - /postcss-modules-local-by-default/4.0.0_postcss@8.4.16: + /postcss-modules-local-by-default/4.0.0_postcss@8.4.17: resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0_postcss@8.4.16 - postcss: 8.4.16 + icss-utils: 5.1.0_postcss@8.4.17 + postcss: 8.4.17 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 dev: true - /postcss-modules-scope/3.0.0_postcss@8.4.16: + /postcss-modules-scope/3.0.0_postcss@8.4.17: resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.16 + postcss: 8.4.17 postcss-selector-parser: 6.0.10 dev: true - /postcss-modules-values/4.0.0_postcss@8.4.16: + /postcss-modules-values/4.0.0_postcss@8.4.17: resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0_postcss@8.4.16 - postcss: 8.4.16 + icss-utils: 5.1.0_postcss@8.4.17 + postcss: 8.4.17 dev: true - /postcss-modules/5.0.0_postcss@8.4.16: + /postcss-modules/5.0.0_postcss@8.4.17: resolution: {integrity: sha512-rGvpTDOM3//3Ysn3Xtvhzaj8ab984wKCpP02TEF559tLbUjNay3RQDpPxb7BREmfBtJm3/1WbQOZ7fSXwYLZ/w==} peerDependencies: postcss: ^8.0.0 @@ -7125,11 +7126,11 @@ packages: generic-names: 4.0.0 icss-replace-symbols: 1.1.0 lodash.camelcase: 4.3.0 - postcss: 8.4.16 - postcss-modules-extract-imports: 3.0.0_postcss@8.4.16 - postcss-modules-local-by-default: 4.0.0_postcss@8.4.16 - postcss-modules-scope: 3.0.0_postcss@8.4.16 - postcss-modules-values: 4.0.0_postcss@8.4.16 + postcss: 8.4.17 + postcss-modules-extract-imports: 3.0.0_postcss@8.4.17 + postcss-modules-local-by-default: 4.0.0_postcss@8.4.17 + postcss-modules-scope: 3.0.0_postcss@8.4.17 + postcss-modules-values: 4.0.0_postcss@8.4.17 string-hash: 1.1.3 dev: true @@ -7142,13 +7143,13 @@ packages: postcss-selector-parser: 6.0.10 dev: true - /postcss-nested/5.0.6_postcss@8.4.14: + /postcss-nested/5.0.6_postcss@8.4.17: resolution: {integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.14 + postcss: 8.4.17 postcss-selector-parser: 6.0.10 /postcss-selector-parser/6.0.10: @@ -7161,16 +7162,8 @@ packages: /postcss-value-parser/4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - /postcss/8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.4 - picocolors: 1.0.0 - source-map-js: 1.0.2 - - /postcss/8.4.16: - resolution: {integrity: sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==} + /postcss/8.4.17: + resolution: {integrity: sha512-UNxNOLQydcOFi41yHNMcKRZ39NeXlr8AxGuZJsdub8vIb12fHzcq37DTU/QtbI6WLxNg2gF9Z+8qtRwTj1UI1Q==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.4 @@ -7632,7 +7625,7 @@ packages: rollup: ^2.55 typescript: ^4.1 dependencies: - magic-string: 0.26.4 + magic-string: 0.26.5 rollup: 2.79.1 typescript: 4.8.2 optionalDependencies: @@ -7666,7 +7659,7 @@ packages: commenting: 1.1.0 glob: 7.2.0 lodash: 4.17.21 - magic-string: 0.26.4 + magic-string: 0.26.5 mkdirp: 1.0.4 moment: 2.29.3 package-name-regex: 2.0.6 @@ -8177,8 +8170,8 @@ packages: resolution: {integrity: sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=} dev: false - /systemjs/6.12.6: - resolution: {integrity: sha512-SawLiWya8/uNR4p12OggSYZ35tP4U4QTpfV57DdZEOPr6+J6zlLSeeEpMmzYTEoBAsMhctdEE+SWJUDYX4EaKw==} + /systemjs/6.13.0: + resolution: {integrity: sha512-P3cgh2bpaPvAO2NE3uRp/n6hmk4xPX4DQf+UzTlCAycssKdqhp6hjw+ENWe+aUS7TogKRFtptMosTSFeC6R55g==} dev: false /tailwindcss/3.1.8: @@ -8199,11 +8192,11 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.14 - postcss-import: 14.1.0_postcss@8.4.14 - postcss-js: 4.0.0_postcss@8.4.14 - postcss-load-config: 3.1.4_postcss@8.4.14 - postcss-nested: 5.0.6_postcss@8.4.14 + postcss: 8.4.17 + postcss-import: 14.1.0_postcss@8.4.17 + postcss-js: 4.0.0_postcss@8.4.17 + postcss-load-config: 3.1.4_postcss@8.4.17 + postcss-nested: 5.0.6_postcss@8.4.17 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 quick-lru: 5.1.1 @@ -8229,11 +8222,11 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.14 - postcss-import: 14.1.0_postcss@8.4.14 - postcss-js: 4.0.0_postcss@8.4.14 - postcss-load-config: 3.1.4_pe6iykxod2v7i2uk6okjazxzki - postcss-nested: 5.0.6_postcss@8.4.14 + postcss: 8.4.17 + postcss-import: 14.1.0_postcss@8.4.17 + postcss-js: 4.0.0_postcss@8.4.17 + postcss-load-config: 3.1.4_m6qswdslzu5ddi7v2thd72jv24 + postcss-nested: 5.0.6_postcss@8.4.17 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 quick-lru: 5.1.1 @@ -8504,14 +8497,14 @@ packages: hasBin: true dev: true - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + /typescript/4.8.2: + resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==} engines: {node: '>=4.2.0'} hasBin: true dev: true - /typescript/4.8.2: - resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==} + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -8572,7 +8565,7 @@ packages: globby: 13.1.2 hookable: 5.3.0 jiti: 1.14.0 - magic-string: 0.26.4 + magic-string: 0.26.5 mkdirp: 1.0.4 mkdist: 0.3.13_typescript@4.8.2 mlly: 0.5.16 @@ -8609,9 +8602,9 @@ packages: /untyped/0.5.0: resolution: {integrity: sha512-2Sre5A1a7G61bjaAKZnSFaVgbJMwwbbYQpJFH69hAYcDfN7kIaktlSphS02XJilz4+/jR1tsJ5MHo1oMoCezxg==} dependencies: - '@babel/core': 7.19.1 - '@babel/standalone': 7.19.2 - '@babel/types': 7.19.0 + '@babel/core': 7.19.3 + '@babel/standalone': 7.19.3 + '@babel/types': 7.19.3 scule: 0.3.2 transitivePeerDependencies: - supports-color @@ -8678,20 +8671,19 @@ packages: engines: {node: '>= 0.8'} dev: true - /vitepress/1.0.0-alpha.16: - resolution: {integrity: sha512-IXW3jA2Y9BsoYlpVuVcAy2XEu1wuoq2xmPvSDPVFrh8HV+oVpuvbPUCHqG6smEcu86xw3g4JjreqAwPlpPn6gw==} + /vitepress/1.0.0-alpha.19: + resolution: {integrity: sha512-0FIUZB6JGXio7SELDDUkyQoMjmO/UAXqDXmznzOsBKsdZ3EHlyb6NaP/V/BMfN5S8+GV88ScbIL0jd/pDzkLBg==} hasBin: true dependencies: '@docsearch/css': 3.2.1 '@docsearch/js': 3.2.1 '@vitejs/plugin-vue': link:packages/plugin-vue - '@vue/devtools-api': 6.2.1 - '@vueuse/core': 9.2.0_vue@3.2.39 + '@vue/devtools-api': 6.4.2 + '@vueuse/core': 9.3.0_vue@3.2.40 body-scroll-lock: 4.0.0-beta.0 - nprogress: 0.2.0 shiki: 0.11.1 vite: link:packages/vite - vue: 3.2.39 + vue: 3.2.40 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -8750,7 +8742,7 @@ packages: resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==} dev: true - /vue-demi/0.13.1_vue@3.2.39: + /vue-demi/0.13.1_vue@3.2.40: resolution: {integrity: sha512-xmkJ56koG3ptpLnpgmIzk9/4nFf4CqduSJbUM0OdPoU87NwRuZ6x49OLhjSa/fC15fV+5CbEnrxU4oyE022svg==} engines: {node: '>=12'} hasBin: true @@ -8762,34 +8754,34 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.2.39 + vue: 3.2.40 dev: true - /vue-router/4.1.5_vue@3.2.39: + /vue-router/4.1.5_vue@3.2.40: resolution: {integrity: sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==} peerDependencies: vue: ^3.2.0 dependencies: '@vue/devtools-api': 6.2.1 - vue: 3.2.39 + vue: 3.2.40 dev: false - /vue/3.2.39: - resolution: {integrity: sha512-tRkguhRTw9NmIPXhzk21YFBqXHT2t+6C6wPOgQ50fcFVWnPdetmRqbmySRHznrYjX2E47u0cGlKGcxKZJ38R/g==} + /vue/3.2.40: + resolution: {integrity: sha512-1mGHulzUbl2Nk3pfvI5aXYYyJUs1nm4kyvuz38u4xlQkLUn1i2R7nDbI4TufECmY8v1qNBHYy62bCaM+3cHP2A==} dependencies: - '@vue/compiler-dom': 3.2.39 - '@vue/compiler-sfc': 3.2.39 - '@vue/runtime-dom': 3.2.39 - '@vue/server-renderer': 3.2.39_vue@3.2.39 - '@vue/shared': 3.2.39 + '@vue/compiler-dom': 3.2.40 + '@vue/compiler-sfc': 3.2.40 + '@vue/runtime-dom': 3.2.40 + '@vue/server-renderer': 3.2.40_vue@3.2.40 + '@vue/shared': 3.2.40 - /vuex/4.0.2_vue@3.2.39: + /vuex/4.0.2_vue@3.2.40: resolution: {integrity: sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==} peerDependencies: vue: ^3.0.2 dependencies: '@vue/devtools-api': 6.1.4 - vue: 3.2.39 + vue: 3.2.40 dev: false /web-streams-polyfill/3.2.1: @@ -8867,8 +8859,8 @@ packages: resolution: {integrity: sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==} engines: {node: '>= 10.0.0'} dependencies: - '@babel/parser': 7.19.1 - '@babel/types': 7.19.0 + '@babel/parser': 7.19.3 + '@babel/types': 7.19.3 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 dev: true @@ -9027,7 +9019,7 @@ packages: name: '@vitejs/dep-that-imports-vue' version: 0.0.0 dependencies: - vue: 3.2.39 + vue: 3.2.40 dev: false file:playground/external/dep-that-requires-vue: @@ -9035,7 +9027,7 @@ packages: name: '@vitejs/dep-that-requires-vue' version: 0.0.0 dependencies: - vue: 3.2.39 + vue: 3.2.40 dev: false file:playground/import-assertion/import-assertion-dep: From ec1f3ae55fd5b01084a5ba191fd500648e5fb9c8 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 3 Oct 2022 15:02:51 +0800 Subject: [PATCH 212/311] fix(config): resolve implicit deps as absolute path (#10254) Co-authored-by: BjornLuG --- packages/vite/src/node/config.ts | 57 +++++++++---------- playground/config/__tests__/load.spec.ts | 24 ++++++++ playground/config/__tests__/serve.ts | 3 + playground/config/packages/entry/package.json | 3 + .../config/packages/entry/vite.config.ts | 5 ++ playground/config/packages/siblings/foo.ts | 3 + .../config/packages/siblings/package.json | 7 +++ pnpm-lock.yaml | 15 +++++ 8 files changed, 87 insertions(+), 30 deletions(-) create mode 100644 playground/config/__tests__/load.spec.ts create mode 100644 playground/config/__tests__/serve.ts create mode 100644 playground/config/packages/entry/package.json create mode 100644 playground/config/packages/entry/vite.config.ts create mode 100644 playground/config/packages/siblings/foo.ts create mode 100644 playground/config/packages/siblings/package.json diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 09c6e00adf9d6e..5fded668f295d0 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -48,7 +48,7 @@ import { ENV_ENTRY } from './constants' import type { InternalResolveOptions, ResolveOptions } from './plugins/resolve' -import { resolvePlugin } from './plugins/resolve' +import { resolvePlugin, tryNodeResolve } from './plugins/resolve' import type { LogLevel, Logger } from './logger' import { createLogger } from './logger' import type { DepOptimizationConfig, DepOptimizationOptions } from './optimizer' @@ -967,40 +967,33 @@ async function bundleConfigFile( { name: 'externalize-deps', setup(build) { - build.onResolve({ filter: /.*/ }, ({ path: id, importer }) => { + const options: InternalResolveOptions = { + root: path.dirname(fileName), + isBuild: true, + isProduction: true, + isRequire: !isESM, + preferRelative: false, + tryIndex: true, + mainFields: DEFAULT_MAIN_FIELDS, + browserField: false, + conditions: [], + dedupe: [], + extensions: DEFAULT_EXTENSIONS, + preserveSymlinks: false + } + + build.onResolve({ filter: /.*/ }, ({ path: id, importer, kind }) => { // externalize bare imports - if (id[0] !== '.' && !path.isAbsolute(id)) { + if (id[0] !== '.' && !isAbsolute(id)) { + let idFsPath = tryNodeResolve(id, importer, options, false)?.id + if (idFsPath && (isESM || kind === 'dynamic-import')) { + idFsPath = pathToFileURL(idFsPath).href + } return { + path: idFsPath, external: true } } - // bundle the rest and make sure that the we can also access - // it's third-party dependencies. externalize if not. - // monorepo/ - // ├─ package.json - // ├─ utils.js -----------> bundle (share same node_modules) - // ├─ vite-project/ - // │ ├─ vite.config.js --> entry - // │ ├─ package.json - // ├─ foo-project/ - // │ ├─ utils.js --------> external (has own node_modules) - // │ ├─ package.json - const idFsPath = path.resolve(path.dirname(importer), id) - const idPkgPath = lookupFile(idFsPath, [`package.json`], { - pathOnly: true - }) - if (idPkgPath) { - const idPkgDir = path.dirname(idPkgPath) - // if this file needs to go up one or more directory to reach the vite config, - // that means it has it's own node_modules (e.g. foo-project) - if (path.relative(idPkgDir, fileName).startsWith('..')) { - return { - // normalize actual import after bundled as a single vite config - path: isESM ? pathToFileURL(idFsPath).href : idFsPath, - external: true - } - } - } }) } }, @@ -1122,3 +1115,7 @@ export function isDepsOptimizerEnabled( (command === 'serve' && disabled === 'dev') ) } + +function isAbsolute(id: string) { + return path.isAbsolute(id) || path.posix.isAbsolute(id) +} diff --git a/playground/config/__tests__/load.spec.ts b/playground/config/__tests__/load.spec.ts new file mode 100644 index 00000000000000..e25ac224673a66 --- /dev/null +++ b/playground/config/__tests__/load.spec.ts @@ -0,0 +1,24 @@ +import { resolve } from 'node:path' +import { loadConfigFromFile } from 'vite' +import { expect, it } from 'vitest' + +it('loadConfigFromFile', async () => { + const { config } = await loadConfigFromFile( + {} as any, + resolve(__dirname, '../packages/entry/vite.config.ts') + ) + expect(config).toMatchInlineSnapshot(` + { + "array": [ + [ + 1, + 3, + ], + [ + 2, + 4, + ], + ], + } + `) +}) diff --git a/playground/config/__tests__/serve.ts b/playground/config/__tests__/serve.ts new file mode 100644 index 00000000000000..e8959c0a1eda19 --- /dev/null +++ b/playground/config/__tests__/serve.ts @@ -0,0 +1,3 @@ +export function serve() { + return +} diff --git a/playground/config/packages/entry/package.json b/playground/config/packages/entry/package.json new file mode 100644 index 00000000000000..c251a034716150 --- /dev/null +++ b/playground/config/packages/entry/package.json @@ -0,0 +1,3 @@ +{ + "name": "@vite/test-config-entry" +} diff --git a/playground/config/packages/entry/vite.config.ts b/playground/config/packages/entry/vite.config.ts new file mode 100644 index 00000000000000..a53828cb84cfd8 --- /dev/null +++ b/playground/config/packages/entry/vite.config.ts @@ -0,0 +1,5 @@ +import { array } from '../siblings/foo' + +export default { + array +} diff --git a/playground/config/packages/siblings/foo.ts b/playground/config/packages/siblings/foo.ts new file mode 100644 index 00000000000000..78a8912131faed --- /dev/null +++ b/playground/config/packages/siblings/foo.ts @@ -0,0 +1,3 @@ +import { partition } from 'lodash' + +export const array = partition([1, 2, 3, 4], (n) => n % 2) diff --git a/playground/config/packages/siblings/package.json b/playground/config/packages/siblings/package.json new file mode 100644 index 00000000000000..4cbdc81d2100ea --- /dev/null +++ b/playground/config/packages/siblings/package.json @@ -0,0 +1,7 @@ +{ + "name": "@vite/test-config-sibling", + "devDependencies": { + "@types/lodash": "^4.14.186", + "lodash": "^4.17.21" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18fcc22c346fff..5c9eec08453f43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -388,6 +388,17 @@ importers: playground/cli-module: specifiers: {} + playground/config/packages/entry: + specifiers: {} + + playground/config/packages/siblings: + specifiers: + '@types/lodash': ^4.14.186 + lodash: ^4.17.21 + devDependencies: + '@types/lodash': 4.14.186 + lodash: 4.17.21 + playground/css: specifiers: css-dep: link:./css-dep @@ -2473,6 +2484,10 @@ packages: resolution: {integrity: sha512-1YXyYH83h6We1djyoUEqTlVyQtCfJAFXELSKW2ZRtjHD4hQ82CC4lvrv5D0l0FLcKBaiPbXyi3MpMsI9ZRgKsw==} dev: true + /@types/lodash/4.14.186: + resolution: {integrity: sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==} + dev: true + /@types/micromatch/4.0.2: resolution: {integrity: sha512-oqXqVb0ci19GtH0vOA/U2TmHTcRY9kuZl4mqUxe0QmJAlIW13kzhuK5pi1i9+ngav8FjpSb9FVS/GE00GLX1VA==} dependencies: From 7c4accb8dec3204948d7b73e5386e789661f9198 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 3 Oct 2022 17:14:17 +0800 Subject: [PATCH 213/311] fix(hmr): handle virtual module update (#10324) --- packages/vite/src/node/plugins/importAnalysis.ts | 5 +++-- packages/vite/src/node/server/hmr.ts | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/vite/src/node/plugins/importAnalysis.ts b/packages/vite/src/node/plugins/importAnalysis.ts index 3559a8d5fdbc34..ae4a7b556d00c2 100644 --- a/packages/vite/src/node/plugins/importAnalysis.ts +++ b/packages/vite/src/node/plugins/importAnalysis.ts @@ -21,7 +21,8 @@ import { debugHmr, handlePrunedModules, lexAcceptedHmrDeps, - lexAcceptedHmrExports + lexAcceptedHmrExports, + normalizeHmrUrl } from '../server/hmr' import { cleanUrl, @@ -629,7 +630,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin { str().prepend( `import { createHotContext as __vite__createHotContext } from "${clientPublicPath}";` + `import.meta.hot = __vite__createHotContext(${JSON.stringify( - importerModule.url + normalizeHmrUrl(importerModule.url) )});` ) } diff --git a/packages/vite/src/node/server/hmr.ts b/packages/vite/src/node/server/hmr.ts index 3493d370ab0b65..e5d93fad8629de 100644 --- a/packages/vite/src/node/server/hmr.ts +++ b/packages/vite/src/node/server/hmr.ts @@ -5,7 +5,7 @@ import colors from 'picocolors' import type { Update } from 'types/hmrPayload' import type { RollupError } from 'rollup' import { CLIENT_DIR } from '../constants' -import { createDebugger, normalizePath, unique } from '../utils' +import { createDebugger, normalizePath, unique, wrapId } from '../utils' import type { ViteDevServer } from '..' import { isCSSRequest } from '../plugins/css' import { getAffectedGlobModules } from '../plugins/importMetaGlob' @@ -154,12 +154,12 @@ export function updateModules( ...[...boundaries].map(({ boundary, acceptedVia }) => ({ type: `${boundary.type}-update` as const, timestamp, - path: boundary.url, + path: normalizeHmrUrl(boundary.url), explicitImportRequired: boundary.type === 'js' ? isExplicitImportRequired(acceptedVia.url) : undefined, - acceptedPath: acceptedVia.url + acceptedPath: normalizeHmrUrl(acceptedVia.url) })) ) } @@ -484,6 +484,13 @@ export function lexAcceptedHmrExports( return urls.size > 0 } +export function normalizeHmrUrl(url: string): string { + if (!url.startsWith('.') && !url.startsWith('/')) { + url = wrapId(url) + } + return url +} + function error(pos: number) { const err = new Error( `import.meta.hot.accept() can only accept string literals or an ` + From d619460b14c09982d588085ec4dafd673a3cad68 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Wed, 5 Oct 2022 15:19:46 +0800 Subject: [PATCH 214/311] fix: env variables override (#10113) --- packages/vite/src/node/__tests__/env.spec.ts | 53 ++++++++++++++++ packages/vite/src/node/__tests__/env/.env | 5 ++ .../src/node/__tests__/env/.env.development | 4 ++ .../src/node/__tests__/env/.env.production | 1 + packages/vite/src/node/env.ts | 61 ++++++++++--------- 5 files changed, 95 insertions(+), 29 deletions(-) create mode 100644 packages/vite/src/node/__tests__/env.spec.ts create mode 100644 packages/vite/src/node/__tests__/env/.env create mode 100644 packages/vite/src/node/__tests__/env/.env.development create mode 100644 packages/vite/src/node/__tests__/env/.env.production diff --git a/packages/vite/src/node/__tests__/env.spec.ts b/packages/vite/src/node/__tests__/env.spec.ts new file mode 100644 index 00000000000000..4e2a88f95b1665 --- /dev/null +++ b/packages/vite/src/node/__tests__/env.spec.ts @@ -0,0 +1,53 @@ +import { join } from 'node:path' +import { fileURLToPath } from 'node:url' +import { describe, expect, test } from 'vitest' +import { loadEnv } from '../env' + +const __dirname = fileURLToPath(new URL('.', import.meta.url)) + +describe('loadEnv', () => { + test('basic', () => { + expect(loadEnv('development', join(__dirname, './env'))) + .toMatchInlineSnapshot(` + { + "VITE_APP_BASE_ROUTE": "/", + "VITE_APP_BASE_URL": "/", + "VITE_ENV1": "ENV1", + "VITE_ENV2": "ENV2", + "VITE_ENV3": "ENV3", + } + `) + }) + + test('specific prefix', () => { + expect(loadEnv('development', join(__dirname, './env'), 'VVITE')) + .toMatchInlineSnapshot(` + { + "VVITE_A": "A", + "VVITE_B": "B", + } + `) + }) + + test('override', () => { + expect(loadEnv('production', join(__dirname, './env'))) + .toMatchInlineSnapshot(` + { + "VITE_APP_BASE_ROUTE": "/app/", + "VITE_APP_BASE_URL": "/app/", + "VITE_USER_NODE_ENV": "production", + } + `) + }) + + test('VITE_USER_NODE_ENV', () => { + loadEnv('development', join(__dirname, './env')) + expect(process.env.VITE_USER_NODE_ENV).toEqual('production') + }) + + test('Already exists VITE_USER_NODE_ENV', () => { + process.env.VITE_USER_NODE_ENV = 'test' + loadEnv('development', join(__dirname, './env')) + expect(process.env.VITE_USER_NODE_ENV).toEqual('test') + }) +}) diff --git a/packages/vite/src/node/__tests__/env/.env b/packages/vite/src/node/__tests__/env/.env new file mode 100644 index 00000000000000..7a34658dc46559 --- /dev/null +++ b/packages/vite/src/node/__tests__/env/.env @@ -0,0 +1,5 @@ +VITE_APP_BASE_ROUTE=/ +VITE_APP_BASE_URL=$VITE_APP_BASE_ROUTE + +VVITE_A=A +VVITE_B=B diff --git a/packages/vite/src/node/__tests__/env/.env.development b/packages/vite/src/node/__tests__/env/.env.development new file mode 100644 index 00000000000000..f961c7335f1352 --- /dev/null +++ b/packages/vite/src/node/__tests__/env/.env.development @@ -0,0 +1,4 @@ +NODE_ENV=production +VITE_ENV1=ENV1 +VITE_ENV2=ENV2 +VITE_ENV3=ENV3 diff --git a/packages/vite/src/node/__tests__/env/.env.production b/packages/vite/src/node/__tests__/env/.env.production new file mode 100644 index 00000000000000..108c69a7ae9588 --- /dev/null +++ b/packages/vite/src/node/__tests__/env/.env.production @@ -0,0 +1 @@ +VITE_APP_BASE_ROUTE=/app/ diff --git a/packages/vite/src/node/env.ts b/packages/vite/src/node/env.ts index 0472f6fc829d49..a69be1ed233043 100644 --- a/packages/vite/src/node/env.ts +++ b/packages/vite/src/node/env.ts @@ -18,10 +18,10 @@ export function loadEnv( prefixes = arraify(prefixes) const env: Record = {} const envFiles = [ - /** mode local file */ `.env.${mode}.local`, - /** mode file */ `.env.${mode}`, + /** default file */ `.env`, /** local file */ `.env.local`, - /** default file */ `.env` + /** mode file */ `.env.${mode}`, + /** mode local file */ `.env.${mode}.local` ] // check if there are actual env variables starting with VITE_* @@ -35,35 +35,38 @@ export function loadEnv( } } - for (const file of envFiles) { - const path = lookupFile(envDir, [file], { pathOnly: true, rootDir: envDir }) - if (path) { - const parsed = dotenv.parse(fs.readFileSync(path), { - debug: process.env.DEBUG?.includes('vite:dotenv') || undefined + const parsed = Object.fromEntries( + envFiles.flatMap((file) => { + const path = lookupFile(envDir, [file], { + pathOnly: true, + rootDir: envDir }) + if (!path) return [] + return Object.entries( + dotenv.parse(fs.readFileSync(path), { + debug: process.env.DEBUG?.includes('vite:dotenv') + }) + ) + }) + ) - // let environment variables use each other - dotenvExpand({ - parsed, - // prevent process.env mutation - ignoreProcessEnv: true - } as any) + // let environment variables use each other + dotenvExpand({ + parsed, + // prevent process.env mutation + ignoreProcessEnv: true + } as any) - // only keys that start with prefix are exposed to client - for (const [key, value] of Object.entries(parsed)) { - if ( - prefixes.some((prefix) => key.startsWith(prefix)) && - env[key] === undefined - ) { - env[key] = value - } else if ( - key === 'NODE_ENV' && - process.env.VITE_USER_NODE_ENV === undefined - ) { - // NODE_ENV override in .env file - process.env.VITE_USER_NODE_ENV = value - } - } + // only keys that start with prefix are exposed to client + for (const [key, value] of Object.entries(parsed)) { + if (prefixes.some((prefix) => key.startsWith(prefix))) { + env[key] = value + } else if ( + key === 'NODE_ENV' && + process.env.VITE_USER_NODE_ENV === undefined + ) { + // NODE_ENV override in .env file + process.env.VITE_USER_NODE_ENV = value } } return env From 65dd88b8e3fafcfdc141074a08f468559cfaaefb Mon Sep 17 00:00:00 2001 From: Jiby Jose Date: Wed, 5 Oct 2022 09:43:06 +0200 Subject: [PATCH 215/311] fix(server): handle appType mpa html fallback (#10336) Co-authored-by: Jiby Jose Co-authored-by: bluwy --- packages/vite/src/node/server/index.ts | 8 ++++---- .../{spaFallback.ts => htmlFallback.ts} | 17 ++++++++++------- .../src/node/server/middlewares/indexHtml.ts | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) rename packages/vite/src/node/server/middlewares/{spaFallback.ts => htmlFallback.ts} (65%) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index 77b91a4dfd6dba..e919302e1d0412 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -53,7 +53,7 @@ import type { WebSocketServer } from './ws' import { createWebSocketServer } from './ws' import { baseMiddleware } from './middlewares/base' import { proxyMiddleware } from './middlewares/proxy' -import { spaFallbackMiddleware } from './middlewares/spaFallback' +import { htmlFallbackMiddleware } from './middlewares/htmlFallback' import { transformMiddleware } from './middlewares/transform' import { createDevHtmlTransformFn, @@ -560,9 +560,9 @@ export async function createServer( middlewares.use(serveRawFsMiddleware(server)) middlewares.use(serveStaticMiddleware(root, server)) - // spa fallback - if (config.appType === 'spa') { - middlewares.use(spaFallbackMiddleware(root)) + // html fallback + if (config.appType === 'spa' || config.appType === 'mpa') { + middlewares.use(htmlFallbackMiddleware(root, config.appType === 'spa')) } // run post config hooks diff --git a/packages/vite/src/node/server/middlewares/spaFallback.ts b/packages/vite/src/node/server/middlewares/htmlFallback.ts similarity index 65% rename from packages/vite/src/node/server/middlewares/spaFallback.ts rename to packages/vite/src/node/server/middlewares/htmlFallback.ts index 6f5b645cd02429..314f4ec2a63e7f 100644 --- a/packages/vite/src/node/server/middlewares/spaFallback.ts +++ b/packages/vite/src/node/server/middlewares/htmlFallback.ts @@ -4,11 +4,12 @@ import history from 'connect-history-api-fallback' import type { Connect } from 'dep-types/connect' import { createDebugger } from '../../utils' -export function spaFallbackMiddleware( - root: string +export function htmlFallbackMiddleware( + root: string, + spaFallback: boolean ): Connect.NextHandleFunction { - const historySpaFallbackMiddleware = history({ - logger: createDebugger('vite:spa-fallback'), + const historyHtmlFallbackMiddleware = history({ + logger: createDebugger('vite:html-fallback'), // support /dir/ without explicit index.html rewrites: [ { @@ -20,7 +21,9 @@ export function spaFallbackMiddleware( if (fs.existsSync(path.join(root, rewritten))) { return rewritten } else { - return `/index.html` + if (spaFallback) { + return `/index.html` + } } } } @@ -28,7 +31,7 @@ export function spaFallbackMiddleware( }) // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` - return function viteSpaFallbackMiddleware(req, res, next) { - return historySpaFallbackMiddleware(req, res, next) + return function viteHtmlFallbackMiddleware(req, res, next) { + return historyHtmlFallbackMiddleware(req, res, next) } } diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index 199468727c17c2..8c036629bcf26e 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -283,7 +283,7 @@ export function indexHtmlMiddleware( } const url = req.url && cleanUrl(req.url) - // spa-fallback always redirects to /index.html + // htmlFallbackMiddleware appends '.html' to URLs if (url?.endsWith('.html') && req.headers['sec-fetch-dest'] !== 'script') { const filename = getHtmlFilename(url, server) if (fs.existsSync(filename)) { From cba13e8b924fc2c318b4af5324e7c883014e5a8a Mon Sep 17 00:00:00 2001 From: smeng9 <38666763+smeng9@users.noreply.github.com> Date: Wed, 5 Oct 2022 02:45:32 -0500 Subject: [PATCH 216/311] fix(optimizer): browser field bare import (fix #7599) (#10314) Co-authored-by: sapphi-red --- packages/vite/src/node/plugins/resolve.ts | 40 ++++++++++++++++++- .../__tests__/optimize-deps.spec.ts | 4 ++ .../dep-cjs-browser-field-bare/events-shim.js | 3 ++ .../dep-cjs-browser-field-bare/index.js | 5 +++ .../dep-cjs-browser-field-bare/internal.js | 6 +++ .../dep-cjs-browser-field-bare/package.json | 9 +++++ playground/optimize-deps/index.html | 6 +++ playground/optimize-deps/package.json | 1 + pnpm-lock.yaml | 11 +++++ 9 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 playground/optimize-deps/dep-cjs-browser-field-bare/events-shim.js create mode 100644 playground/optimize-deps/dep-cjs-browser-field-bare/index.js create mode 100644 playground/optimize-deps/dep-cjs-browser-field-bare/internal.js create mode 100644 playground/optimize-deps/dep-cjs-browser-field-bare/package.json diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index b9476e501ff447..d3672e81c71fe4 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -1106,7 +1106,8 @@ function tryResolveBrowserMapping( externalize?: boolean ) { let res: string | undefined - const pkg = importer && idToPkgMap.get(importer) + const pkg = + importer && (idToPkgMap.get(importer) || resolvePkg(importer, options)) if (pkg && isObject(pkg.data.browser)) { const mapId = isFilePath ? './' + slash(path.relative(pkg.dir, id)) : id const browserMappedPath = mapWithBrowserField(mapId, pkg.data.browser) @@ -1165,3 +1166,40 @@ function getRealPath(resolved: string, preserveSymlinks?: boolean): string { } return normalizePath(resolved) } + +/** + * if importer was not resolved by vite's resolver previously + * (when esbuild resolved it) + * resolve importer's pkg and add to idToPkgMap + */ +function resolvePkg(importer: string, options: InternalResolveOptions) { + const { root, preserveSymlinks, packageCache } = options + + if (importer.includes('\x00')) { + return null + } + + const possiblePkgIds: string[] = [] + for (let prevSlashIndex = -1; ; ) { + const slashIndex = importer.indexOf(isWindows ? '\\' : '/', prevSlashIndex) + if (slashIndex < 0) { + break + } + + prevSlashIndex = slashIndex + 1 + + const possiblePkgId = importer.slice(0, slashIndex) + possiblePkgIds.push(possiblePkgId) + } + + let pkg: PackageData | undefined + possiblePkgIds.reverse().find((pkgId) => { + pkg = resolvePackageData(pkgId, root, preserveSymlinks, packageCache)! + return pkg + })! + + if (pkg) { + idToPkgMap.set(importer, pkg) + } + return pkg +} diff --git a/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/playground/optimize-deps/__tests__/optimize-deps.spec.ts index 997d3bb9da1a26..8d109205855555 100644 --- a/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -58,6 +58,10 @@ test('cjs browser field (axios)', async () => { expect(await page.textContent('.cjs-browser-field')).toBe('pong') }) +test('cjs browser field bare', async () => { + expect(await page.textContent('.cjs-browser-field-bare')).toBe('pong') +}) + test('dep from linked dep (lodash-es)', async () => { expect(await page.textContent('.deps-linked')).toBe('fooBarBaz') }) diff --git a/playground/optimize-deps/dep-cjs-browser-field-bare/events-shim.js b/playground/optimize-deps/dep-cjs-browser-field-bare/events-shim.js new file mode 100644 index 00000000000000..fb5ce844858a55 --- /dev/null +++ b/playground/optimize-deps/dep-cjs-browser-field-bare/events-shim.js @@ -0,0 +1,3 @@ +module.exports = { + foo: 'foo' +} diff --git a/playground/optimize-deps/dep-cjs-browser-field-bare/index.js b/playground/optimize-deps/dep-cjs-browser-field-bare/index.js new file mode 100644 index 00000000000000..5ea984fdc8a39c --- /dev/null +++ b/playground/optimize-deps/dep-cjs-browser-field-bare/index.js @@ -0,0 +1,5 @@ +'use strict' + +const internal = require('./internal') + +module.exports = internal diff --git a/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js b/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js new file mode 100644 index 00000000000000..6ab4782816a21a --- /dev/null +++ b/playground/optimize-deps/dep-cjs-browser-field-bare/internal.js @@ -0,0 +1,6 @@ +'use strict' + +// eslint-disable-next-line import/no-nodejs-modules +const events = require('events') + +module.exports = 'foo' in events ? 'pong' : '' diff --git a/playground/optimize-deps/dep-cjs-browser-field-bare/package.json b/playground/optimize-deps/dep-cjs-browser-field-bare/package.json new file mode 100644 index 00000000000000..87a42018c9b419 --- /dev/null +++ b/playground/optimize-deps/dep-cjs-browser-field-bare/package.json @@ -0,0 +1,9 @@ +{ + "name": "dep-cjs-browser-field-bare", + "private": true, + "version": "0.0.0", + "main": "index.js", + "browser": { + "events": "./events-shim.js" + } +} diff --git a/playground/optimize-deps/index.html b/playground/optimize-deps/index.html index f3e94ca6624dc1..3ca86a5359781a 100644 --- a/playground/optimize-deps/index.html +++ b/playground/optimize-deps/index.html @@ -29,6 +29,9 @@

Dedupe (dep in linked & optimized package)

CommonJS w/ browser field mapping (axios)

This should show pong:
+

CommonJS w/ bare id browser field mapping

+
This should show pong:
+

Detecting linked src package and optimizing its deps (lodash-es)

This should show fooBarBaz:
@@ -100,6 +103,9 @@

Non Optimized Module isn't duplicated

// test dep detection in globbed files const globbed = import.meta.glob('./glob/*.js', { eager: true }) + import cjsBrowerFieldBare from 'dep-cjs-browser-field-bare' + text('.cjs-browser-field-bare', cjsBrowerFieldBare) + import { camelCase } from 'dep-linked' text('.deps-linked', camelCase('foo-bar-baz')) diff --git a/playground/optimize-deps/package.json b/playground/optimize-deps/package.json index 01bf8259094afe..0441c709cd71a8 100644 --- a/playground/optimize-deps/package.json +++ b/playground/optimize-deps/package.json @@ -11,6 +11,7 @@ "dependencies": { "axios": "^0.27.2", "clipboard": "^2.0.11", + "dep-cjs-browser-field-bare": "file:./dep-cjs-browser-field-bare", "dep-cjs-compiled-from-cjs": "file:./dep-cjs-compiled-from-cjs", "dep-cjs-compiled-from-esm": "file:./dep-cjs-compiled-from-esm", "dep-cjs-with-assets": "file:./dep-cjs-with-assets", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5c9eec08453f43..405e698cc5d7a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -645,6 +645,7 @@ importers: added-in-entries: file:./added-in-entries axios: ^0.27.2 clipboard: ^2.0.11 + dep-cjs-browser-field-bare: file:./dep-cjs-browser-field-bare dep-cjs-compiled-from-cjs: file:./dep-cjs-compiled-from-cjs dep-cjs-compiled-from-esm: file:./dep-cjs-compiled-from-esm dep-cjs-with-assets: file:./dep-cjs-with-assets @@ -674,6 +675,7 @@ importers: added-in-entries: file:playground/optimize-deps/added-in-entries axios: 0.27.2 clipboard: 2.0.11 + dep-cjs-browser-field-bare: file:playground/optimize-deps/dep-cjs-browser-field-bare dep-cjs-compiled-from-cjs: file:playground/optimize-deps/dep-cjs-compiled-from-cjs dep-cjs-compiled-from-esm: file:playground/optimize-deps/dep-cjs-compiled-from-esm dep-cjs-with-assets: file:playground/optimize-deps/dep-cjs-with-assets @@ -705,6 +707,9 @@ importers: playground/optimize-deps/added-in-entries: specifiers: {} + playground/optimize-deps/dep-cjs-browser-field-bare: + specifiers: {} + playground/optimize-deps/dep-cjs-compiled-from-cjs: specifiers: {} @@ -9063,6 +9068,12 @@ packages: version: 1.0.0 dev: false + file:playground/optimize-deps/dep-cjs-browser-field-bare: + resolution: {directory: playground/optimize-deps/dep-cjs-browser-field-bare, type: directory} + name: dep-cjs-browser-field-bare + version: 0.0.0 + dev: false + file:playground/optimize-deps/dep-cjs-compiled-from-cjs: resolution: {directory: playground/optimize-deps/dep-cjs-compiled-from-cjs, type: directory} name: dep-cjs-compiled-from-cjs From e976b065628ca451cd07bf5472427462d64bc56c Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 5 Oct 2022 05:24:32 -0400 Subject: [PATCH 217/311] fix(react): conditionally self-accept fast-refresh HMR (#10239) Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com> --- packages/plugin-react/src/fast-refresh.ts | 54 ++++++++++++++++--- playground/react/App.jsx | 24 +++++++-- playground/react/__tests__/react.spec.ts | 62 +++++++++++++++++++--- playground/react/context/ContextButton.jsx | 11 ++++ playground/react/context/CountProvider.jsx | 12 +++++ playground/react/hmr/no-exported-comp.jsx | 7 +++ playground/react/hmr/parent.jsx | 7 +++ 7 files changed, 160 insertions(+), 17 deletions(-) create mode 100644 playground/react/context/ContextButton.jsx create mode 100644 playground/react/context/CountProvider.jsx create mode 100644 playground/react/hmr/no-exported-comp.jsx create mode 100644 playground/react/hmr/parent.jsx diff --git a/packages/plugin-react/src/fast-refresh.ts b/packages/plugin-react/src/fast-refresh.ts index b3b095a65cf2ae..b0b38a8cafb94e 100644 --- a/packages/plugin-react/src/fast-refresh.ts +++ b/packages/plugin-react/src/fast-refresh.ts @@ -58,20 +58,57 @@ if (import.meta.hot) { window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform; }`.replace(/[\n]+/gm, '') -const footer = ` -if (import.meta.hot) { - window.$RefreshReg$ = prevRefreshReg; - window.$RefreshSig$ = prevRefreshSig; - - __ACCEPT__ +const timeout = ` if (!window.__vite_plugin_react_timeout) { window.__vite_plugin_react_timeout = setTimeout(() => { window.__vite_plugin_react_timeout = 0; RefreshRuntime.performReactRefresh(); }, 30); } +` + +const footer = ` +if (import.meta.hot) { + window.$RefreshReg$ = prevRefreshReg; + window.$RefreshSig$ = prevRefreshSig; + + __ACCEPT__ }` +const checkAndAccept = ` +function isReactRefreshBoundary(mod) { + if (mod == null || typeof mod !== 'object') { + return false; + } + let hasExports = false; + let areAllExportsComponents = true; + for (const exportName in mod) { + hasExports = true; + if (exportName === '__esModule') { + continue; + } + const desc = Object.getOwnPropertyDescriptor(mod, exportName); + if (desc && desc.get) { + // Don't invoke getters as they may have side effects. + return false; + } + const exportValue = mod[exportName]; + if (!RefreshRuntime.isLikelyComponentType(exportValue)) { + areAllExportsComponents = false; + } + } + return hasExports && areAllExportsComponents; +} + +import.meta.hot.accept(mod => { + if (isReactRefreshBoundary(mod)) { + ${timeout} + } else { + import.meta.hot.invalidate(); + } +}); +` + export function addRefreshWrapper( code: string, id: string, @@ -80,12 +117,13 @@ export function addRefreshWrapper( return ( header.replace('__SOURCE__', JSON.stringify(id)) + code + - footer.replace('__ACCEPT__', accept ? 'import.meta.hot.accept();' : '') + footer.replace('__ACCEPT__', accept ? checkAndAccept : timeout) ) } export function isRefreshBoundary(ast: t.File): boolean { - // Every export must be a React component. + // Every export must be a potential React component. + // We'll also perform a runtime check that's more robust as well (isLikelyComponentType). return ast.program.body.every((node) => { if (node.type !== 'ExportNamedDeclaration') { return true diff --git a/playground/react/App.jsx b/playground/react/App.jsx index 3ec29ba38d893b..83f4cc07ea4a07 100644 --- a/playground/react/App.jsx +++ b/playground/react/App.jsx @@ -1,6 +1,9 @@ import { useState } from 'react' -import Dummy from './components/Dummy?qs-should-not-break-plugin-react' import Button from 'jsx-entry' +import Dummy from './components/Dummy?qs-should-not-break-plugin-react' +import Parent from './hmr/parent' +import { CountProvider } from './context/CountProvider' +import { ContextButton } from './context/ContextButton' function App() { const [count, setCount] = useState(0) @@ -9,10 +12,16 @@ function App() {

Hello Vite + React

-

+

+ +

Edit App.jsx and save to test HMR updates.

@@ -27,9 +36,18 @@ function App() {
+
) } -export default App +function AppWithProviders() { + return ( + + + + ) +} + +export default AppWithProviders diff --git a/playground/react/__tests__/react.spec.ts b/playground/react/__tests__/react.spec.ts index 15f6319220d7f2..654a45a668e894 100644 --- a/playground/react/__tests__/react.spec.ts +++ b/playground/react/__tests__/react.spec.ts @@ -1,28 +1,35 @@ import { expect, test } from 'vitest' -import { editFile, isServe, page, untilUpdated } from '~utils' +import { + browserLogs, + editFile, + isBuild, + isServe, + page, + untilUpdated +} from '~utils' test('should render', async () => { expect(await page.textContent('h1')).toMatch('Hello Vite + React') }) test('should update', async () => { - expect(await page.textContent('button')).toMatch('count is: 0') - await page.click('button') - expect(await page.textContent('button')).toMatch('count is: 1') + expect(await page.textContent('#state-button')).toMatch('count is: 0') + await page.click('#state-button') + expect(await page.textContent('#state-button')).toMatch('count is: 1') }) test('should hmr', async () => { editFile('App.jsx', (code) => code.replace('Vite + React', 'Updated')) await untilUpdated(() => page.textContent('h1'), 'Hello Updated') // preserve state - expect(await page.textContent('button')).toMatch('count is: 1') + expect(await page.textContent('#state-button')).toMatch('count is: 1') }) test.runIf(isServe)( 'should have annotated jsx with file location metadata', async () => { const meta = await page.evaluate(() => { - const button = document.querySelector('button') + const button = document.querySelector('#state-button') const key = Object.keys(button).find( (key) => key.indexOf('__reactFiber') === 0 ) @@ -37,3 +44,46 @@ test.runIf(isServe)( ]) } ) + +if (!isBuild) { + // #9869 + test('should only hmr files with exported react components', async () => { + browserLogs.length = 0 + editFile('hmr/no-exported-comp.jsx', (code) => + code.replace('An Object', 'Updated') + ) + await untilUpdated(() => page.textContent('#parent'), 'Updated') + expect(browserLogs).toMatchObject([ + '[vite] hot updated: /hmr/no-exported-comp.jsx', + '[vite] hot updated: /hmr/parent.jsx', + 'Parent rendered' + ]) + browserLogs.length = 0 + }) + + // #3301 + test('should hmr react context', async () => { + browserLogs.length = 0 + expect(await page.textContent('#context-button')).toMatch( + 'context-based count is: 0' + ) + await page.click('#context-button') + expect(await page.textContent('#context-button')).toMatch( + 'context-based count is: 1' + ) + editFile('context/CountProvider.jsx', (code) => + code.replace('context provider', 'context provider updated') + ) + await untilUpdated( + () => page.textContent('#context-provider'), + 'context provider updated' + ) + expect(browserLogs).toMatchObject([ + '[vite] hot updated: /context/CountProvider.jsx', + '[vite] hot updated: /App.jsx', + '[vite] hot updated: /context/ContextButton.jsx', + 'Parent rendered' + ]) + browserLogs.length = 0 + }) +} diff --git a/playground/react/context/ContextButton.jsx b/playground/react/context/ContextButton.jsx new file mode 100644 index 00000000000000..92c6d0bd26f968 --- /dev/null +++ b/playground/react/context/ContextButton.jsx @@ -0,0 +1,11 @@ +import { useContext } from 'react' +import { CountContext } from './CountProvider' + +export function ContextButton() { + const { count, setCount } = useContext(CountContext) + return ( + + ) +} diff --git a/playground/react/context/CountProvider.jsx b/playground/react/context/CountProvider.jsx new file mode 100644 index 00000000000000..223ad25f04f056 --- /dev/null +++ b/playground/react/context/CountProvider.jsx @@ -0,0 +1,12 @@ +import { createContext, useState } from 'react' +export const CountContext = createContext() + +export const CountProvider = ({ children }) => { + const [count, setCount] = useState(0) + return ( + + {children} +
context provider
+
+ ) +} diff --git a/playground/react/hmr/no-exported-comp.jsx b/playground/react/hmr/no-exported-comp.jsx new file mode 100644 index 00000000000000..7784bcb50603a9 --- /dev/null +++ b/playground/react/hmr/no-exported-comp.jsx @@ -0,0 +1,7 @@ +// This un-exported react component should not cause this file to be treated +// as an HMR boundary +const Unused = () => An unused react component + +export const Foo = { + is: 'An Object' +} diff --git a/playground/react/hmr/parent.jsx b/playground/react/hmr/parent.jsx new file mode 100644 index 00000000000000..ff8698281c83c7 --- /dev/null +++ b/playground/react/hmr/parent.jsx @@ -0,0 +1,7 @@ +import { Foo } from './no-exported-comp' + +export default function Parent() { + console.log('Parent rendered') + + return
{Foo.is}
+} From 599eb81191edc44c14b9c117d761d8bbb008e817 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Wed, 5 Oct 2022 11:58:53 +0200 Subject: [PATCH 218/311] release: v3.2.0-beta.0 --- packages/vite/CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++ packages/vite/package.json | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 12250b4fd3826f..a867f57f4a5be9 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,47 @@ +## 3.2.0-beta.0 (2022-10-05) + +* fix: add module types (#10299) ([0b89dd2](https://github.com/vitejs/vite/commit/0b89dd2)), closes [#10299](https://github.com/vitejs/vite/issues/10299) +* fix: css order problem in async chunk (#9949) ([6c7b834](https://github.com/vitejs/vite/commit/6c7b834)), closes [#9949](https://github.com/vitejs/vite/issues/9949) +* fix: don't duplicate styles with dynamic import (fix #9967) (#9970) ([65f97bd](https://github.com/vitejs/vite/commit/65f97bd)), closes [#9967](https://github.com/vitejs/vite/issues/9967) [#9970](https://github.com/vitejs/vite/issues/9970) +* fix: env variables override (#10113) ([d619460](https://github.com/vitejs/vite/commit/d619460)), closes [#10113](https://github.com/vitejs/vite/issues/10113) +* fix: isFromTsImporter flag in worker virtual model (#10273) ([78f74c9](https://github.com/vitejs/vite/commit/78f74c9)), closes [#10273](https://github.com/vitejs/vite/issues/10273) +* fix: properly close optimizer on server restart (#10028) ([a32777f](https://github.com/vitejs/vite/commit/a32777f)), closes [#10028](https://github.com/vitejs/vite/issues/10028) +* fix: respect `mainFields` when resolving browser/module field (fixes #8659) (#10071) ([533d13c](https://github.com/vitejs/vite/commit/533d13c)), closes [#8659](https://github.com/vitejs/vite/issues/8659) [#10071](https://github.com/vitejs/vite/issues/10071) +* fix: respect resolve.conditions, when resolving browser/require field (#9860) ([9a83eaf](https://github.com/vitejs/vite/commit/9a83eaf)), closes [#9860](https://github.com/vitejs/vite/issues/9860) +* fix: support process each out dir when there are two or more (#9748) ([ee3231c](https://github.com/vitejs/vite/commit/ee3231c)), closes [#9748](https://github.com/vitejs/vite/issues/9748) +* fix(build): fix resolution algorithm when `build.ssr` is true (#9989) ([7229251](https://github.com/vitejs/vite/commit/7229251)), closes [#9989](https://github.com/vitejs/vite/issues/9989) +* fix(config): resolve implicit deps as absolute path (#10254) ([ec1f3ae](https://github.com/vitejs/vite/commit/ec1f3ae)), closes [#10254](https://github.com/vitejs/vite/issues/10254) +* fix(css): missing css in lib mode (#10185) ([e4c1c6d](https://github.com/vitejs/vite/commit/e4c1c6d)), closes [#10185](https://github.com/vitejs/vite/issues/10185) +* fix(deps): update all non-major dependencies (#10160) ([6233c83](https://github.com/vitejs/vite/commit/6233c83)), closes [#10160](https://github.com/vitejs/vite/issues/10160) +* fix(deps): update all non-major dependencies (#10316) ([a38b450](https://github.com/vitejs/vite/commit/a38b450)), closes [#10316](https://github.com/vitejs/vite/issues/10316) +* fix(deps): update rollup to `^2.79.1` (#10298) ([2266d83](https://github.com/vitejs/vite/commit/2266d83)), closes [#10298](https://github.com/vitejs/vite/issues/10298) +* fix(esbuild): transpile with esnext in dev (#10207) ([43b7b78](https://github.com/vitejs/vite/commit/43b7b78)), closes [#10207](https://github.com/vitejs/vite/issues/10207) +* fix(hmr): handle virtual module update (#10324) ([7c4accb](https://github.com/vitejs/vite/commit/7c4accb)), closes [#10324](https://github.com/vitejs/vite/issues/10324) +* fix(optimizer): browser field bare import (fix #7599) (#10314) ([cba13e8](https://github.com/vitejs/vite/commit/cba13e8)), closes [#7599](https://github.com/vitejs/vite/issues/7599) [#10314](https://github.com/vitejs/vite/issues/10314) +* fix(sass): reorder sass importers (#10101) ([a543731](https://github.com/vitejs/vite/commit/a543731)), closes [#10101](https://github.com/vitejs/vite/issues/10101) +* fix(server): handle appType mpa html fallback (#10336) ([65dd88b](https://github.com/vitejs/vite/commit/65dd88b)), closes [#10336](https://github.com/vitejs/vite/issues/10336) +* fix(ssr): correctly track scope (#10300) ([a60529f](https://github.com/vitejs/vite/commit/a60529f)), closes [#10300](https://github.com/vitejs/vite/issues/10300) +* fix(worker): support comment in worker constructor option (#10226) ([66c9058](https://github.com/vitejs/vite/commit/66c9058)), closes [#10226](https://github.com/vitejs/vite/issues/10226) +* fix(worker): support trailing comma (#10211) ([0542e7c](https://github.com/vitejs/vite/commit/0542e7c)), closes [#10211](https://github.com/vitejs/vite/issues/10211) +* feat: build.modulePreload options (#9938) ([e223f84](https://github.com/vitejs/vite/commit/e223f84)), closes [#9938](https://github.com/vitejs/vite/issues/9938) +* feat: customize ErrorOverlay (#10234) ([fe4dc8d](https://github.com/vitejs/vite/commit/fe4dc8d)), closes [#10234](https://github.com/vitejs/vite/issues/10234) +* feat: dynamic import support ?url and ?worker (#8261) ([0cb01ca](https://github.com/vitejs/vite/commit/0cb01ca)), closes [#8261](https://github.com/vitejs/vite/issues/8261) +* feat: include duplicate assets in the manifest (#9928) ([42ecf37](https://github.com/vitejs/vite/commit/42ecf37)), closes [#9928](https://github.com/vitejs/vite/issues/9928) +* feat: support import.meta.hot.invalidate (#10244) ([fb8ab16](https://github.com/vitejs/vite/commit/fb8ab16)), closes [#10244](https://github.com/vitejs/vite/issues/10244) +* feat: support postcss sugarss (#6705) ([8ede2f1](https://github.com/vitejs/vite/commit/8ede2f1)), closes [#6705](https://github.com/vitejs/vite/issues/6705) +* feat(assets): allow `new URL` to resolve package assets (#7837) ([bafccf5](https://github.com/vitejs/vite/commit/bafccf5)), closes [#7837](https://github.com/vitejs/vite/issues/7837) +* feat(client): add data-vite-dev-id attribute to style elements (#10080) ([ea09fde](https://github.com/vitejs/vite/commit/ea09fde)), closes [#10080](https://github.com/vitejs/vite/issues/10080) +* feat(lib): allow multiple entries (#7047) ([65a0fad](https://github.com/vitejs/vite/commit/65a0fad)), closes [#7047](https://github.com/vitejs/vite/issues/7047) +* feat(optimizer): Support bun lockfile format (#10288) ([931d69b](https://github.com/vitejs/vite/commit/931d69b)), closes [#10288](https://github.com/vitejs/vite/issues/10288) +* refactor(types): bundle client types (#9966) ([da632bf](https://github.com/vitejs/vite/commit/da632bf)), closes [#9966](https://github.com/vitejs/vite/issues/9966) +* refactor(types): simplify type exports (#10243) ([291174d](https://github.com/vitejs/vite/commit/291174d)), closes [#10243](https://github.com/vitejs/vite/issues/10243) +* chore: remove cacheDir param (#10188) ([6eb374a](https://github.com/vitejs/vite/commit/6eb374a)), closes [#10188](https://github.com/vitejs/vite/issues/10188) +* chore: update type init (#10251) ([ed40a65](https://github.com/vitejs/vite/commit/ed40a65)), closes [#10251](https://github.com/vitejs/vite/issues/10251) +* docs: fix invalid jsdoc comments (#10241) ([9acb839](https://github.com/vitejs/vite/commit/9acb839)), closes [#10241](https://github.com/vitejs/vite/issues/10241) +* perf: cache compiled glob for `server.fs.deny` (#10044) ([df560b0](https://github.com/vitejs/vite/commit/df560b0)), closes [#10044](https://github.com/vitejs/vite/issues/10044) + + + ## 3.1.3 (2022-09-19) * fix: esbuildOutputFromId for symlinked root (#10154) ([fc5310f](https://github.com/vitejs/vite/commit/fc5310f)), closes [#10154](https://github.com/vitejs/vite/issues/10154) diff --git a/packages/vite/package.json b/packages/vite/package.json index 43e4bba9f2f908..710e06dbcbbf6d 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.1.3", + "version": "3.2.0-beta.0", "type": "module", "license": "MIT", "author": "Evan You", From 2603968c592a31cb42274f2b0f7003ca14c54675 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Wed, 5 Oct 2022 12:00:18 +0200 Subject: [PATCH 219/311] release: plugin-vue@3.2.0-beta.0 --- packages/plugin-vue/CHANGELOG.md | 12 ++++++++++++ packages/plugin-vue/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/CHANGELOG.md b/packages/plugin-vue/CHANGELOG.md index cde94520cdb190..4c059b05a864f9 100644 --- a/packages/plugin-vue/CHANGELOG.md +++ b/packages/plugin-vue/CHANGELOG.md @@ -1,3 +1,15 @@ +## 3.2.0-beta.0 (2022-10-05) + +* fix(deps): update all non-major dependencies (#10077) ([caf00c8](https://github.com/vitejs/vite/commit/caf00c8)), closes [#10077](https://github.com/vitejs/vite/issues/10077) +* fix(deps): update all non-major dependencies (#10316) ([a38b450](https://github.com/vitejs/vite/commit/a38b450)), closes [#10316](https://github.com/vitejs/vite/issues/10316) +* fix(deps): update all non-major dependencies (#9985) ([855f2f0](https://github.com/vitejs/vite/commit/855f2f0)), closes [#9985](https://github.com/vitejs/vite/issues/9985) +* fix(deps): update rollup to `^2.79.1` (#10298) ([2266d83](https://github.com/vitejs/vite/commit/2266d83)), closes [#10298](https://github.com/vitejs/vite/issues/10298) +* fix(esbuild): transpile with esnext in dev (#10207) ([43b7b78](https://github.com/vitejs/vite/commit/43b7b78)), closes [#10207](https://github.com/vitejs/vite/issues/10207) +* chore(deps): update dependency slash to v5 (#10317) ([9d87c11](https://github.com/vitejs/vite/commit/9d87c11)), closes [#10317](https://github.com/vitejs/vite/issues/10317) +* refactor(types): bundle client types (#9966) ([da632bf](https://github.com/vitejs/vite/commit/da632bf)), closes [#9966](https://github.com/vitejs/vite/issues/9966) + + + ## 3.1.0 (2022-09-05) diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 6152f8f1dc993e..c3277320214d9a 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "3.1.0", + "version": "3.2.0-beta.0", "license": "MIT", "author": "Evan You", "files": [ From 1ddd04837ad32f1fa6da30631766947c3fec48d1 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Wed, 5 Oct 2022 12:01:46 +0200 Subject: [PATCH 220/311] release: plugin-vue-jsx@2.1.0-beta.0 --- packages/plugin-vue-jsx/CHANGELOG.md | 10 ++++++++++ packages/plugin-vue-jsx/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue-jsx/CHANGELOG.md b/packages/plugin-vue-jsx/CHANGELOG.md index 04b5aa102d7b09..3293b83a98383f 100644 --- a/packages/plugin-vue-jsx/CHANGELOG.md +++ b/packages/plugin-vue-jsx/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.1.0-beta.0 (2022-10-05) + +* fix(deps): update all non-major dependencies (#10077) ([caf00c8](https://github.com/vitejs/vite/commit/caf00c8)), closes [#10077](https://github.com/vitejs/vite/issues/10077) +* fix(deps): update all non-major dependencies (#10160) ([6233c83](https://github.com/vitejs/vite/commit/6233c83)), closes [#10160](https://github.com/vitejs/vite/issues/10160) +* fix(deps): update all non-major dependencies (#10316) ([a38b450](https://github.com/vitejs/vite/commit/a38b450)), closes [#10316](https://github.com/vitejs/vite/issues/10316) +* refactor(types): bundle client types (#9966) ([da632bf](https://github.com/vitejs/vite/commit/da632bf)), closes [#9966](https://github.com/vitejs/vite/issues/9966) +* refactor(vue-jsx): remove `@babel/plugin-syntax-import-meta` (#10233) ([1bac86a](https://github.com/vitejs/vite/commit/1bac86a)), closes [#10233](https://github.com/vitejs/vite/issues/10233) + + + ## 2.0.1 (2022-08-29) * fix: mention that Node.js 13/15 support is dropped (fixes #9113) (#9116) ([2826303](https://github.com/vitejs/vite/commit/2826303)), closes [#9113](https://github.com/vitejs/vite/issues/9113) [#9116](https://github.com/vitejs/vite/issues/9116) diff --git a/packages/plugin-vue-jsx/package.json b/packages/plugin-vue-jsx/package.json index 0477ce434ace01..faae8b0f0c37a3 100644 --- a/packages/plugin-vue-jsx/package.json +++ b/packages/plugin-vue-jsx/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue-jsx", - "version": "2.0.1", + "version": "2.1.0-beta.0", "license": "MIT", "author": "Evan You", "files": [ From aeea9bdbd98be37a5b9ef1db7ae9f658d877501b Mon Sep 17 00:00:00 2001 From: patak-dev Date: Wed, 5 Oct 2022 12:03:28 +0200 Subject: [PATCH 221/311] release: plugin-react@2.2.0-beta.0 --- packages/plugin-react/CHANGELOG.md | 12 ++++++++++++ packages/plugin-react/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/plugin-react/CHANGELOG.md b/packages/plugin-react/CHANGELOG.md index f4408610482556..a6e28f6c9144cb 100644 --- a/packages/plugin-react/CHANGELOG.md +++ b/packages/plugin-react/CHANGELOG.md @@ -1,3 +1,15 @@ +## 2.2.0-beta.0 (2022-10-05) + +* fix(deps): update all non-major dependencies (#10077) ([caf00c8](https://github.com/vitejs/vite/commit/caf00c8)), closes [#10077](https://github.com/vitejs/vite/issues/10077) +* fix(deps): update all non-major dependencies (#10160) ([6233c83](https://github.com/vitejs/vite/commit/6233c83)), closes [#10160](https://github.com/vitejs/vite/issues/10160) +* fix(deps): update all non-major dependencies (#10316) ([a38b450](https://github.com/vitejs/vite/commit/a38b450)), closes [#10316](https://github.com/vitejs/vite/issues/10316) +* fix(deps): update all non-major dependencies (#9985) ([855f2f0](https://github.com/vitejs/vite/commit/855f2f0)), closes [#9985](https://github.com/vitejs/vite/issues/9985) +* fix(react): conditionally self-accept fast-refresh HMR (#10239) ([e976b06](https://github.com/vitejs/vite/commit/e976b06)), closes [#10239](https://github.com/vitejs/vite/issues/10239) +* feat: add `throwIfNamespace` option for custom JSX runtime (#9571) ([f842f74](https://github.com/vitejs/vite/commit/f842f74)), closes [#9571](https://github.com/vitejs/vite/issues/9571) +* refactor(types): bundle client types (#9966) ([da632bf](https://github.com/vitejs/vite/commit/da632bf)), closes [#9966](https://github.com/vitejs/vite/issues/9966) + + + ## 2.1.0 (2022-09-05) * fix(plugin-react): duplicate __self prop and __source prop (#9387) ([c89de3a](https://github.com/vitejs/vite/commit/c89de3a)), closes [#9387](https://github.com/vitejs/vite/issues/9387) diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index 1f10d2b1e5f5ac..7e073dd97b19a6 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-react", - "version": "2.1.0", + "version": "2.2.0-beta.0", "license": "MIT", "author": "Evan You", "contributors": [ From 14b7af616800b7aa3bb606ecdb3a4a557eac4205 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Wed, 5 Oct 2022 12:04:21 +0200 Subject: [PATCH 222/311] release: plugin-legacy@2.3.0-beta.0 --- packages/plugin-legacy/CHANGELOG.md | 10 ++++++++++ packages/plugin-legacy/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/plugin-legacy/CHANGELOG.md b/packages/plugin-legacy/CHANGELOG.md index 3bf33a1488de08..138560511c4a64 100644 --- a/packages/plugin-legacy/CHANGELOG.md +++ b/packages/plugin-legacy/CHANGELOG.md @@ -1,3 +1,13 @@ +## 2.3.0-beta.0 (2022-10-05) + +* fix(deps): update all non-major dependencies (#10160) ([6233c83](https://github.com/vitejs/vite/commit/6233c83)), closes [#10160](https://github.com/vitejs/vite/issues/10160) +* fix(deps): update all non-major dependencies (#10246) ([81d4d04](https://github.com/vitejs/vite/commit/81d4d04)), closes [#10246](https://github.com/vitejs/vite/issues/10246) +* fix(deps): update all non-major dependencies (#10316) ([a38b450](https://github.com/vitejs/vite/commit/a38b450)), closes [#10316](https://github.com/vitejs/vite/issues/10316) +* fix(legacy): don't force set `build.target` when `renderLegacyChunks=false` (fixes #10201) (#10220) ([7f548e8](https://github.com/vitejs/vite/commit/7f548e8)), closes [#10201](https://github.com/vitejs/vite/issues/10201) [#10220](https://github.com/vitejs/vite/issues/10220) +* refactor(types): bundle client types (#9966) ([da632bf](https://github.com/vitejs/vite/commit/da632bf)), closes [#9966](https://github.com/vitejs/vite/issues/9966) + + + ## 2.2.0 (2022-09-19) * docs(plugin-legacy): fix Vite default target (#10158) ([62ff788](https://github.com/vitejs/vite/commit/62ff788)), closes [#10158](https://github.com/vitejs/vite/issues/10158) diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index f75af9ee12f6c9..da5d83390e2e67 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-legacy", - "version": "2.2.0", + "version": "2.3.0-beta.0", "license": "MIT", "author": "Evan You", "files": [ From cc1c8298d431a438c0f1b7b036ab9f333ed5ff74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Wed, 5 Oct 2022 20:57:30 +0900 Subject: [PATCH 223/311] fix(config): don't resolve by module field (#10347) --- packages/vite/src/node/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 5fded668f295d0..6faf7d2d863f03 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -974,7 +974,7 @@ async function bundleConfigFile( isRequire: !isESM, preferRelative: false, tryIndex: true, - mainFields: DEFAULT_MAIN_FIELDS, + mainFields: [], browserField: false, conditions: [], dedupe: [], From c48bda56a3ef3ee737270dfa6421bec92d71e10a Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Thu, 6 Oct 2022 14:40:51 +0900 Subject: [PATCH 224/311] docs: fix code example (#10355) --- docs/guide/api-hmr.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guide/api-hmr.md b/docs/guide/api-hmr.md index 12a859370d2e11..7733c8e91ba477 100644 --- a/docs/guide/api-hmr.md +++ b/docs/guide/api-hmr.md @@ -129,14 +129,14 @@ A self-accepting module may realize during runtime that it can't handle a HMR up Note that you should always call `import.meta.hot.accept` even if you plan to call `invalidate` immediately afterwards, or else the HMR client won't listen for future changes to the self-accepting module. To communicate your intent clearly, we recommend calling `invalidate` within the `accept` callback like so: - ```ts - import.meta.hot.accept(module => { - // You may use the new module instance to decide whether to invalidate. - if (cannotHandleUpdate(module)) { - import.meta.hot.invalidate() - } - }) - ``` +```js +import.meta.hot.accept((module) => { + // You may use the new module instance to decide whether to invalidate. + if (cannotHandleUpdate(module)) { + import.meta.hot.invalidate() + } +}) +``` ## `hot.on(event, cb)` From 47f1d2457575fa6b6fea0f3f98119facf84d1abb Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 6 Oct 2022 16:19:30 +0800 Subject: [PATCH 225/311] chore: ci check for minor branches --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db621689ef2639..c18ab498787d76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ on: - perf/* - v1 - v2 + - v2.* + - v3.* pull_request: workflow_dispatch: From 34f5be73cc0525c19e39b0721a08e4090cad1905 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 6 Oct 2022 13:53:06 -0700 Subject: [PATCH 226/311] chore: migrate from vuex to pinia (#10366) --- playground/ssr-vue/package.json | 4 ++-- playground/ssr-vue/src/main.js | 3 +++ playground/ssr-vue/src/pages/Store.vue | 10 +++++----- pnpm-lock.yaml | 23 +++++++++++++++++++---- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index d65235fe38b9bc..818f8a8e1ab882 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -16,9 +16,9 @@ }, "dependencies": { "example-external-component": "file:example-external-component", + "pinia": "^2.0.22", "vue": "^3.2.40", - "vue-router": "^4.1.5", - "vuex": "^4.0.2" + "vue-router": "^4.1.5" }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", diff --git a/playground/ssr-vue/src/main.js b/playground/ssr-vue/src/main.js index ee969e0f1c449e..d2dd1e002147fe 100644 --- a/playground/ssr-vue/src/main.js +++ b/playground/ssr-vue/src/main.js @@ -1,3 +1,4 @@ +import { createPinia } from 'pinia' import { createSSRApp } from 'vue' import App from './App.vue' import { createRouter } from './router' @@ -7,6 +8,8 @@ import { createRouter } from './router' // fresh store here. export function createApp() { const app = createSSRApp(App) + const pinia = createPinia() + app.use(pinia) const router = createRouter() app.use(router) return { app, router } diff --git a/playground/ssr-vue/src/pages/Store.vue b/playground/ssr-vue/src/pages/Store.vue index df4d6b302d8474..90bd95653b15ae 100644 --- a/playground/ssr-vue/src/pages/Store.vue +++ b/playground/ssr-vue/src/pages/Store.vue @@ -3,16 +3,16 @@ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 405e698cc5d7a8..c3004290db3fc8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1131,15 +1131,15 @@ importers: dep-import-type: link:./dep-import-type example-external-component: file:example-external-component express: ^4.18.1 + pinia: ^2.0.22 serve-static: ^1.15.0 vue: ^3.2.40 vue-router: ^4.1.5 - vuex: ^4.0.2 dependencies: example-external-component: file:playground/ssr-vue/example-external-component + pinia: 2.0.22_vue@3.2.40 vue: 3.2.40 vue-router: 4.1.5_vue@3.2.40 - vuex: 4.0.2_vue@3.2.40 devDependencies: '@vitejs/plugin-vue': link:../../packages/plugin-vue '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx @@ -2767,7 +2767,6 @@ packages: /@vue/devtools-api/6.4.2: resolution: {integrity: sha512-6hNZ23h1M2Llky+SIAmVhL7s6BjLtZBCzjIz9iRSBUsysjE7kC39ulW0dH4o/eZtycmSt4qEr6RDVGTIuWu+ow==} - dev: true /@vue/reactivity-transform/3.2.40: resolution: {integrity: sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==} @@ -6985,6 +6984,23 @@ packages: dev: true optional: true + /pinia/2.0.22_vue@3.2.40: + resolution: {integrity: sha512-u+b8/BC+tmvo3ACbYO2w5NfxHWFOjvvw9DQnyT0dW8aUMCPRQT5QnfZ5R5W2MzZBMTeZRMQI7V/QFbafmM9QHw==} + peerDependencies: + '@vue/composition-api': ^1.4.0 + typescript: '>=4.4.4' + vue: ^2.6.14 || ^3.2.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + typescript: + optional: true + dependencies: + '@vue/devtools-api': 6.4.2 + vue: 3.2.40 + vue-demi: 0.13.1_vue@3.2.40 + dev: false + /pkg-types/0.3.5: resolution: {integrity: sha512-VkxCBFVgQhNHYk9subx+HOhZ4jzynH11ah63LZsprTKwPCWG9pfWBlkElWFbvkP9BVR0dP1jS9xPdhaHQNK74Q==} dependencies: @@ -8775,7 +8791,6 @@ packages: optional: true dependencies: vue: 3.2.40 - dev: true /vue-router/4.1.5_vue@3.2.40: resolution: {integrity: sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==} From 23c9259aa31424d96fdc87f61236fd3b84aed2c3 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 6 Oct 2022 20:35:42 -0700 Subject: [PATCH 227/311] chore: update magic-string (#10364) --- packages/vite/package.json | 2 +- packages/vite/src/node/plugins/asset.ts | 8 ++--- .../src/node/plugins/assetImportMetaUrl.ts | 10 +++---- packages/vite/src/node/plugins/define.ts | 2 +- packages/vite/src/node/plugins/html.ts | 28 +++++------------- .../src/node/plugins/importAnalysisBuild.ts | 29 +++++-------------- packages/vite/src/node/plugins/worker.ts | 9 +----- .../src/node/plugins/workerImportMetaUrl.ts | 5 ++-- .../src/node/server/middlewares/indexHtml.ts | 5 ++-- packages/vite/src/node/ssr/ssrTransform.ts | 13 ++++----- pnpm-lock.yaml | 17 +++++++---- 11 files changed, 45 insertions(+), 83 deletions(-) diff --git a/packages/vite/package.json b/packages/vite/package.json index 710e06dbcbbf6d..aeef277ff670a3 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -97,7 +97,7 @@ "http-proxy": "^1.18.1", "json5": "^2.2.1", "launch-editor-middleware": "^2.6.0", - "magic-string": "^0.26.5", + "magic-string": "^0.26.6", "micromatch": "^4.0.5", "mlly": "^0.5.16", "mrmime": "^1.0.1", diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts index 3839b54ef3365b..a7a8f2554bf0a1 100644 --- a/packages/vite/src/node/plugins/asset.ts +++ b/packages/vite/src/node/plugins/asset.ts @@ -95,9 +95,7 @@ export function renderAssetUrlInJS( typeof replacement === 'string' ? JSON.stringify(replacement).slice(1, -1) : `"+${replacement.runtime}+"` - s.overwrite(match.index, match.index + full.length, replacementString, { - contentOnly: true - }) + s.update(match.index, match.index + full.length, replacementString) } // Replace __VITE_PUBLIC_ASSET__5aa0ddc0__ with absolute paths @@ -119,9 +117,7 @@ export function renderAssetUrlInJS( typeof replacement === 'string' ? JSON.stringify(replacement).slice(1, -1) : `"+${replacement.runtime}+"` - s.overwrite(match.index, match.index + full.length, replacementString, { - contentOnly: true - }) + s.update(match.index, match.index + full.length, replacementString) } return s diff --git a/packages/vite/src/node/plugins/assetImportMetaUrl.ts b/packages/vite/src/node/plugins/assetImportMetaUrl.ts index de946614620866..c21c1a0c29e4f8 100644 --- a/packages/vite/src/node/plugins/assetImportMetaUrl.ts +++ b/packages/vite/src/node/plugins/assetImportMetaUrl.ts @@ -61,11 +61,10 @@ export function assetImportMetaUrlPlugin(config: ResolvedConfig): Plugin { // target so we use the global location here. It can be // window.location or self.location in case it is used in a Web Worker. // @see https://developer.mozilla.org/en-US/docs/Web/API/Window/self - s.overwrite( + s.update( index, index + exp.length, - `new URL((import.meta.glob(${pattern}, { eager: true, import: 'default', as: 'url' }))[${rawUrl}], self.location)`, - { contentOnly: true } + `new URL((import.meta.glob(${pattern}, { eager: true, import: 'default', as: 'url' }))[${rawUrl}], self.location)` ) continue } @@ -111,11 +110,10 @@ export function assetImportMetaUrlPlugin(config: ResolvedConfig): Plugin { ) builtUrl = url } - s.overwrite( + s.update( index, index + exp.length, - `new URL(${JSON.stringify(builtUrl)}, self.location)`, - { contentOnly: true } + `new URL(${JSON.stringify(builtUrl)}, self.location)` ) } if (s) { diff --git a/packages/vite/src/node/plugins/define.ts b/packages/vite/src/node/plugins/define.ts index 0448327d660ed6..e683ba4d0175db 100644 --- a/packages/vite/src/node/plugins/define.ts +++ b/packages/vite/src/node/plugins/define.ts @@ -139,7 +139,7 @@ export function definePlugin(config: ResolvedConfig): Plugin { const start = match.index const end = start + match[0].length const replacement = '' + replacements[match[1]] - s.overwrite(start, end, replacement, { contentOnly: true }) + s.update(start, end, replacement) } if (!hasReplaced) { diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index 5285fab26cd0b4..ad2f3abd39af32 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -216,11 +216,10 @@ export function overwriteAttrValue( } const wrapOffset = valueStart[1] === '"' || valueStart[1] === "'" ? 1 : 0 const valueOffset = valueStart.index! + valueStart[0].length - 1 - s.overwrite( + s.update( sourceCodeLocation.startOffset + valueOffset + wrapOffset, sourceCodeLocation.endOffset - wrapOffset, - newValue, - { contentOnly: true } + newValue ) return s } @@ -487,11 +486,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { js += `\nimport "${id}?html-proxy&inline-css&index=${inlineModuleIndex}.css"` const hash = getHash(cleanUrl(id)) // will transform in `applyHtmlTransforms` - s.overwrite( + s.update( styleNode.sourceCodeLocation!.startOffset, styleNode.sourceCodeLocation!.endOffset, - `__VITE_INLINE_CSS__${hash}_${inlineModuleIndex}__`, - { contentOnly: true } + `__VITE_INLINE_CSS__${hash}_${inlineModuleIndex}__` ) } @@ -546,16 +544,9 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { // emit asset for (const { start, end, url } of scriptUrls) { if (!isExcludedUrl(url)) { - s.overwrite( - start, - end, - await urlToBuiltUrl(url, id, config, this), - { contentOnly: true } - ) + s.update(start, end, await urlToBuiltUrl(url, id, config, this)) } else if (checkPublicFile(url, config)) { - s.overwrite(start, end, toOutputPublicFilePath(url), { - contentOnly: true - }) + s.update(start, end, toOutputPublicFilePath(url)) } } @@ -780,12 +771,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { s ||= new MagicString(result) const { 0: full, 1: scopedName } = match const cssTransformedCode = htmlProxyResult.get(scopedName)! - s.overwrite( - match.index, - match.index + full.length, - cssTransformedCode, - { contentOnly: true } - ) + s.update(match.index, match.index + full.length, cssTransformedCode) } if (s) { result = s.toString() diff --git a/packages/vite/src/node/plugins/importAnalysisBuild.ts b/packages/vite/src/node/plugins/importAnalysisBuild.ts index 849b71c4cdcd64..d1eaa6437a6962 100644 --- a/packages/vite/src/node/plugins/importAnalysisBuild.ts +++ b/packages/vite/src/node/plugins/importAnalysisBuild.ts @@ -350,9 +350,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { if (!rewriteDone) { let rewrittenUrl = JSON.stringify(file) if (!isDynamicImport) rewrittenUrl = rewrittenUrl.slice(1, -1) - str().overwrite(start, end, rewrittenUrl, { - contentOnly: true - }) + str().update(start, end, rewrittenUrl) } } } @@ -374,9 +372,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { !(bareImportRE.test(specifier) && !specifier.includes('/')) ) { const url = specifier.replace(/\?|$/, (m) => `?used${m ? '&' : ''}`) - str().overwrite(start, end, isDynamicImport ? `'${url}'` : url, { - contentOnly: true - }) + str().update(start, end, isDynamicImport ? `'${url}'` : url) } } @@ -405,12 +401,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { const s = new MagicString(code) let match: RegExpExecArray | null while ((match = re.exec(code))) { - s.overwrite( - match.index, - match.index + isModernFlag.length, - isModern, - { contentOnly: true } - ) + s.update(match.index, match.index + isModernFlag.length, isModern) } return { code: s.toString(), @@ -505,9 +496,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { hasRemovedPureCssChunk = true } - s.overwrite(expStart, expEnd, 'Promise.resolve({})', { - contentOnly: true - }) + s.update(expStart, expEnd, 'Promise.resolve({})') } } } @@ -582,11 +571,10 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { ) } - s.overwrite( + s.update( markerStartPos, markerStartPos + preloadMarkerWithQuote.length, - `[${renderedDeps.join(',')}]`, - { contentOnly: true } + `[${renderedDeps.join(',')}]` ) rewroteMarkerStartPos.add(markerStartPos) } @@ -598,11 +586,10 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin { let markerStartPos = code.indexOf(preloadMarkerWithQuote) while (markerStartPos >= 0) { if (!rewroteMarkerStartPos.has(markerStartPos)) { - s.overwrite( + s.update( markerStartPos, markerStartPos + preloadMarkerWithQuote.length, - 'void 0', - { contentOnly: true } + 'void 0' ) } diff --git a/packages/vite/src/node/plugins/worker.ts b/packages/vite/src/node/plugins/worker.ts index b645d178f6f645..02d0dd3d74ece4 100644 --- a/packages/vite/src/node/plugins/worker.ts +++ b/packages/vite/src/node/plugins/worker.ts @@ -356,14 +356,7 @@ export function webWorkerPlugin(config: ResolvedConfig): Plugin { typeof replacement === 'string' ? JSON.stringify(replacement).slice(1, -1) : `"+${replacement.runtime}+"` - s.overwrite( - match.index, - match.index + full.length, - replacementString, - { - contentOnly: true - } - ) + s.update(match.index, match.index + full.length, replacementString) } } return result() diff --git a/packages/vite/src/node/plugins/workerImportMetaUrl.ts b/packages/vite/src/node/plugins/workerImportMetaUrl.ts index b0173b6b03ca6e..a2c4e22038b672 100644 --- a/packages/vite/src/node/plugins/workerImportMetaUrl.ts +++ b/packages/vite/src/node/plugins/workerImportMetaUrl.ts @@ -141,11 +141,10 @@ export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin { builtUrl = injectQuery(builtUrl, WORKER_FILE_ID) builtUrl = injectQuery(builtUrl, `type=${workerType}`) } - s.overwrite( + s.update( urlIndex, urlIndex + exp.length, - `new URL(${JSON.stringify(builtUrl)}, self.location)`, - { contentOnly: true } + `new URL(${JSON.stringify(builtUrl)}, self.location)` ) } diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index 8c036629bcf26e..736fc316ee3011 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -184,11 +184,10 @@ const devHtmlHook: IndexHtmlTransformHook = async ( if (module) { server?.moduleGraph.invalidateModule(module) } - s.overwrite( + s.update( node.sourceCodeLocation!.startOffset, node.sourceCodeLocation!.endOffset, - ``, - { contentOnly: true } + `` ) } diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index fe24dddac2e79a..12c3bb354b6c9e 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -196,11 +196,10 @@ async function ssrTransformScript( ) } else { // anonymous default exports - s.overwrite( + s.update( node.start, node.start + 14 /* 'export default'.length */, - `${ssrModuleExportsKey}.default =`, - { contentOnly: true } + `${ssrModuleExportsKey}.default =` ) } } @@ -247,16 +246,14 @@ async function ssrTransformScript( s.prependRight(topNode.start, `const ${id.name} = ${binding};\n`) } } else { - s.overwrite(id.start, id.end, binding, { contentOnly: true }) + s.update(id.start, id.end, binding) } }, onImportMeta(node) { - s.overwrite(node.start, node.end, ssrImportMetaKey, { contentOnly: true }) + s.update(node.start, node.end, ssrImportMetaKey) }, onDynamicImport(node) { - s.overwrite(node.start, node.start + 6, ssrDynamicImportKey, { - contentOnly: true - }) + s.update(node.start, node.start + 6, ssrDynamicImportKey) if (node.type === 'ImportExpression' && node.source.type === 'Literal') { dynamicDeps.add(node.source.value as string) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3004290db3fc8..93f7aa14a41e63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -243,7 +243,7 @@ importers: http-proxy: ^1.18.1 json5: ^2.2.1 launch-editor-middleware: ^2.6.0 - magic-string: ^0.26.5 + magic-string: ^0.26.6 micromatch: ^4.0.5 mlly: ^0.5.16 mrmime: ^1.0.1 @@ -308,7 +308,7 @@ importers: http-proxy: 1.18.1_debug@4.3.4 json5: 2.2.1 launch-editor-middleware: 2.6.0 - magic-string: 0.26.5 + magic-string: 0.26.6 micromatch: 4.0.5 mlly: 0.5.16 mrmime: 1.0.1 @@ -6246,6 +6246,13 @@ packages: dependencies: sourcemap-codec: 1.4.8 + /magic-string/0.26.6: + resolution: {integrity: sha512-6d+3bFybzyQFJYSoRsl9ZC0wheze8M1LrQC7tNMRqXR4izUTDOLMd9BtSuExK9iAukFh+s5K0WAhc/dlQ+HKYA==} + engines: {node: '>=12'} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -7661,7 +7668,7 @@ packages: rollup: ^2.55 typescript: ^4.1 dependencies: - magic-string: 0.26.5 + magic-string: 0.26.6 rollup: 2.79.1 typescript: 4.8.2 optionalDependencies: @@ -7695,7 +7702,7 @@ packages: commenting: 1.1.0 glob: 7.2.0 lodash: 4.17.21 - magic-string: 0.26.5 + magic-string: 0.26.6 mkdirp: 1.0.4 moment: 2.29.3 package-name-regex: 2.0.6 @@ -8601,7 +8608,7 @@ packages: globby: 13.1.2 hookable: 5.3.0 jiti: 1.14.0 - magic-string: 0.26.5 + magic-string: 0.26.6 mkdirp: 1.0.4 mkdist: 0.3.13_typescript@4.8.2 mlly: 0.5.16 From 2401253b9aa487c50edb5ec571d5ba7adc949e27 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 6 Oct 2022 20:36:25 -0700 Subject: [PATCH 228/311] chore: make reproduction field a textarea (#10353) --- .github/ISSUE_TEMPLATE/bug_report.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8c3987ca835d2d..c330f6c2926bf3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -19,9 +19,15 @@ body: attributes: label: Reproduction description: Please provide a link via [vite.new](https://vite.new/) or a link to a repo that can reproduce the problem you ran into. `npm create vite@latest` and `npm create vite-extra@latest` (for SSR or library repros) can be used as a starter template. A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required ([Why?](https://antfu.me/posts/why-reproductions-are-required)). If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. If no reproduction is provided after 3 days, it will be auto-closed. - placeholder: Reproduction URL and steps + placeholder: Reproduction URL validations: required: true + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Please provide any reproduction steps that may need to be described. E.g. if it happens only when running the dev or build script make sure it's clear which one to use. + placeholder: Run `npm install` followed by `npm run dev` - type: textarea id: system-info attributes: From 834a3821d8511ab7d19ed0e231a8b1580c271fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Sat, 8 Oct 2022 16:17:48 +0300 Subject: [PATCH 229/311] docs: update `git checkout -b main` as `git checkout -B main` (#10325) --- docs/guide/static-deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index 705d58f560842b..5c2273b36888b5 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -83,7 +83,7 @@ Now the `preview` command will launch the server at `http://localhost:8080`. # echo 'www.example.com' > CNAME git init - git checkout -b main + git checkout -B main git add -A git commit -m 'deploy' From 7b4d6e827aaf4da1b9785f82313745884ac6ce22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sun, 9 Oct 2022 01:30:06 +0900 Subject: [PATCH 230/311] fix(html): handle attrs with prefix (fixes #10337) (#10381) --- packages/vite/src/node/plugins/html.ts | 21 ++++++++++++++----- .../src/node/server/middlewares/indexHtml.ts | 8 ++++--- playground/html/public/sprite.svg | 14 +++++++++++++ playground/html/valid.html | 7 ++++++- 4 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 playground/html/public/sprite.svg diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts index ad2f3abd39af32..30daca766b4ee9 100644 --- a/packages/vite/src/node/plugins/html.ts +++ b/packages/vite/src/node/plugins/html.ts @@ -182,6 +182,7 @@ export function getScriptInfo(node: DefaultTreeAdapterMap['element']): { let isModule = false let isAsync = false for (const p of node.attrs) { + if (p.prefix !== undefined) continue if (p.name === 'src') { if (!src) { src = p @@ -412,9 +413,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { const assetAttrs = assetAttrsConfig[node.nodeName] if (assetAttrs) { for (const p of node.attrs) { - if (p.value && assetAttrs.includes(p.name)) { + const attrKey = getAttrKey(p) + if (p.value && assetAttrs.includes(attrKey)) { const attrSourceCodeLocation = - node.sourceCodeLocation!.attrs![p.name] + node.sourceCodeLocation!.attrs![attrKey] // assetsUrl may be encodeURI const url = decodeURI(p.value) if (!isExcludedUrl(url)) { @@ -423,7 +425,9 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { isCSSRequest(url) && // should not be converted if following attributes are present (#6748) !node.attrs.some( - (p) => p.name === 'media' || p.name === 'disabled' + (p) => + p.prefix === undefined && + (p.name === 'media' || p.name === 'disabled') ) ) { // CSS references, convert to import @@ -453,7 +457,10 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { // // extract inline styles as virtual css and add class attribute to tag for selecting const inlineStyle = node.attrs.find( - (prop) => prop.name === 'style' && prop.value.includes('url(') // only url(...) in css need to emit file + (prop) => + prop.prefix === undefined && + prop.name === 'style' && + prop.value.includes('url(') // only url(...) in css need to emit file ) if (inlineStyle) { inlineModuleIndex++ @@ -527,7 +534,7 @@ export function buildHtmlPlugin(config: ResolvedConfig): Plugin { ) { try { const url = - attr.name === 'srcset' + attr.prefix === undefined && attr.name === 'srcset' ? await processSrcSet(content, ({ url }) => urlToBuiltUrl(url, id, config, this) ) @@ -1133,3 +1140,7 @@ function serializeAttrs(attrs: HtmlTagDescriptor['attrs']): string { function incrementIndent(indent: string = '') { return `${indent}${indent[0] === '\t' ? '\t' : ' '}` } + +export function getAttrKey(attr: Token.Attribute): string { + return attr.prefix === undefined ? attr.name : `${attr.prefix}:${attr.name}` +} diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index 736fc316ee3011..326281b853f079 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -9,6 +9,7 @@ import { addToHTMLProxyCache, applyHtmlTransforms, assetAttrsConfig, + getAttrKey, getScriptInfo, nodeIsElement, overwriteAttrValue, @@ -112,7 +113,7 @@ const processNodeUrl = ( // rewrite after `../index.js` -> `localhost:5173/index.js`. const processedUrl = - attr.name === 'srcset' + attr.name === 'srcset' && attr.prefix === undefined ? processSrcSetSync(url, ({ url }) => replacer(url)) : replacer(url) overwriteAttrValue(s, sourceCodeLocation, processedUrl) @@ -228,10 +229,11 @@ const devHtmlHook: IndexHtmlTransformHook = async ( const assetAttrs = assetAttrsConfig[node.nodeName] if (assetAttrs) { for (const p of node.attrs) { - if (p.value && assetAttrs.includes(p.name)) { + const attrKey = getAttrKey(p) + if (p.value && assetAttrs.includes(attrKey)) { processNodeUrl( p, - node.sourceCodeLocation!.attrs![p.name], + node.sourceCodeLocation!.attrs![attrKey], s, config, htmlPath, diff --git a/playground/html/public/sprite.svg b/playground/html/public/sprite.svg new file mode 100644 index 00000000000000..b948cff92b6e39 --- /dev/null +++ b/playground/html/public/sprite.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/playground/html/valid.html b/playground/html/valid.html index a2bd28f802184e..8bc52a0bcbccd4 100644 --- a/playground/html/valid.html +++ b/playground/html/valid.html @@ -7,4 +7,9 @@
No quotes on Attr
- \ No newline at end of file + + + + + + From 8c4df1f4a6c2444bede34b2d9fab2ca1810caec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Sun, 9 Oct 2022 18:47:25 +0900 Subject: [PATCH 231/311] fix: make client type work with `moduleResolution=node16` (#10375) --- packages/vite/types/package.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 packages/vite/types/package.json diff --git a/packages/vite/types/package.json b/packages/vite/types/package.json new file mode 100644 index 00000000000000..5757150f514df6 --- /dev/null +++ b/packages/vite/types/package.json @@ -0,0 +1,3 @@ +{ + "//": "this file is here to make typescript happy when moduleResolution=node16+" +} From 87b48f9103f467c3ad33b039ccf845aed9a281d7 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 10 Oct 2022 03:44:27 +0800 Subject: [PATCH 232/311] fix(ssr): track var as function scope (#10388) --- .../node/ssr/__tests__/ssrTransform.spec.ts | 24 +++++++++++++++++++ packages/vite/src/node/ssr/ssrTransform.ts | 24 ++++++++++++++++--- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts index a5ca20c9be3d09..33d5071a054a99 100644 --- a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -787,3 +787,27 @@ export class Test { Object.defineProperty(__vite_ssr_exports__, \\"Test\\", { enumerable: true, configurable: true, get(){ return Test }});;" `) }) + +// #10386 +test('track var scope by function', async () => { + expect( + await ssrTransformSimpleCode(` +import { foo, bar } from 'foobar' +function test() { + if (true) { + var foo = () => { var why = 'would' }, bar = 'someone' + } + return [foo, bar] +}`) + ).toMatchInlineSnapshot(` + " + const __vite_ssr_import_0__ = await __vite_ssr_import__(\\"foobar\\"); + + function test() { + if (true) { + var foo = () => { var why = 'would' }, bar = 'someone' + } + return [foo, bar] + }" + `) +}) diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts index 12c3bb354b6c9e..eefdf29f70d7a1 100644 --- a/packages/vite/src/node/ssr/ssrTransform.ts +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -5,6 +5,7 @@ import type { Identifier, Pattern, Property, + VariableDeclaration, Node as _Node } from 'estree' import { extract_names as extractNames } from 'periscopic' @@ -316,6 +317,7 @@ function walk( { onIdentifier, onImportMeta, onDynamicImport }: Visitors ) { const parentStack: Node[] = [] + const varKindStack: VariableDeclaration['kind'][] = [] const scopeMap = new WeakMap<_Node, Set>() const identifiers: [id: any, stack: Node[]][] = [] @@ -375,6 +377,11 @@ function walk( parentStack.unshift(parent) } + // track variable declaration kind stack used by VariableDeclarator + if (node.type === 'VariableDeclaration') { + varKindStack.unshift(node.kind) + } + if (node.type === 'MetaProperty' && node.meta.name === 'import') { onImportMeta(node) } else if (node.type === 'ImportExpression') { @@ -434,7 +441,10 @@ function walk( // mark property in destructuring pattern setIsNodeInPattern(node) } else if (node.type === 'VariableDeclarator') { - const parentFunction = findParentScope(parentStack) + const parentFunction = findParentScope( + parentStack, + varKindStack[0] === 'var' + ) if (parentFunction) { handlePattern(node.id, parentFunction) } @@ -449,6 +459,10 @@ function walk( ) { parentStack.shift() } + + if (node.type === 'VariableDeclaration') { + varKindStack.shift() + } } }) @@ -538,8 +552,12 @@ function isFunction(node: _Node): node is FunctionNode { const scopeNodeTypeRE = /(?:Function|Class)(?:Expression|Declaration)$|Method$|^IfStatement$/ -function findParentScope(parentStack: _Node[]): _Node | undefined { - return parentStack.find((i) => scopeNodeTypeRE.test(i.type)) +function findParentScope( + parentStack: _Node[], + isVar = false +): _Node | undefined { + const regex = isVar ? functionNodeTypeRE : scopeNodeTypeRE + return parentStack.find((i) => regex.test(i.type)) } function isInDestructuringAssignment( From 07d3fbd21e6b63a12997d201a2deb5b2f2129882 Mon Sep 17 00:00:00 2001 From: Marco Schumacher Date: Mon, 10 Oct 2022 09:25:34 +0200 Subject: [PATCH 233/311] feat(lib): cjs instead of umd as default format for multiple entries (#10315) --- docs/config/build-options.md | 2 +- .../vite/src/node/__tests__/build.spec.ts | 26 ++++++++++++++++++- packages/vite/src/node/build.ts | 15 ++++++----- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/docs/config/build-options.md b/docs/config/build-options.md index a40f62f3ceb8a8..da1d33d453e8d1 100644 --- a/docs/config/build-options.md +++ b/docs/config/build-options.md @@ -148,7 +148,7 @@ Options to pass on to [@rollup/plugin-dynamic-import-vars](https://github.com/ro - **Type:** `{ entry: string | string[] | { [entryAlias: string]: string }, name?: string, formats?: ('es' | 'cjs' | 'umd' | 'iife')[], fileName?: string | ((format: ModuleFormat, entryName: string) => string) }` - **Related:** [Library Mode](/guide/build#library-mode) -Build as a library. `entry` is required since the library cannot use HTML as entry. `name` is the exposed global variable and is required when `formats` includes `'umd'` or `'iife'`. Default `formats` are `['es', 'umd']`. `fileName` is the name of the package file output, default `fileName` is the name option of package.json, it can also be defined as function taking the `format` and `entryAlias` as arguments. +Build as a library. `entry` is required since the library cannot use HTML as entry. `name` is the exposed global variable and is required when `formats` includes `'umd'` or `'iife'`. Default `formats` are `['es', 'umd']`, or `['es', 'cjs']`, if multiple entries are used. `fileName` is the name of the package file output, default `fileName` is the name option of package.json, it can also be defined as function taking the `format` and `entryAlias` as arguments. ## build.manifest diff --git a/packages/vite/src/node/__tests__/build.spec.ts b/packages/vite/src/node/__tests__/build.spec.ts index e12187b1ce6dfc..27984280b4c38b 100644 --- a/packages/vite/src/node/__tests__/build.spec.ts +++ b/packages/vite/src/node/__tests__/build.spec.ts @@ -1,8 +1,9 @@ import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' +import type { Logger } from 'vite' import { describe, expect, test } from 'vitest' import type { LibraryFormats, LibraryOptions } from '../build' -import { resolveLibFilename } from '../build' +import { resolveBuildOutputs, resolveLibFilename } from '../build' const __dirname = resolve(fileURLToPath(import.meta.url), '..') @@ -244,3 +245,26 @@ describe('resolveLibFilename', () => { expect(fileName2).toBe('custom-filename.mjs') }) }) + +describe('resolveBuildOutputs', () => { + test('default format: one entry', () => { + const libOptions: LibraryOptions = { + entry: 'entryA.js', + name: 'entryA' + } + + const outputs = resolveBuildOutputs(undefined, libOptions, {} as Logger) + + expect(outputs).toEqual([{ format: 'es' }, { format: 'umd' }]) + }) + + test('default format: multiple entries', () => { + const libOptions: LibraryOptions = { + entry: ['entryA.js', 'entryB.js'] + } + + const outputs = resolveBuildOutputs(undefined, libOptions, {} as Logger) + + expect(outputs).toEqual([{ format: 'es' }, { format: 'cjs' }]) + }) +}) diff --git a/packages/vite/src/node/build.ts b/packages/vite/src/node/build.ts index 9ed62f8d72b940..94f08c14b17b64 100644 --- a/packages/vite/src/node/build.ts +++ b/packages/vite/src/node/build.ts @@ -746,18 +746,21 @@ export function resolveLibFilename( return `${name}.${format}.${extension}` } -function resolveBuildOutputs( +export function resolveBuildOutputs( outputs: OutputOptions | OutputOptions[] | undefined, libOptions: LibraryOptions | false, logger: Logger ): OutputOptions | OutputOptions[] | undefined { if (libOptions) { - const formats = libOptions.formats || ['es', 'umd'] + const hasMultipleEntries = + typeof libOptions.entry !== 'string' && + Object.values(libOptions.entry).length > 1 + + const formats = + libOptions.formats || (hasMultipleEntries ? ['es', 'cjs'] : ['es', 'umd']) + if (formats.includes('umd') || formats.includes('iife')) { - if ( - typeof libOptions.entry !== 'string' && - Object.values(libOptions.entry).length > 1 - ) { + if (hasMultipleEntries) { throw new Error( `Multiple entry points are not supported when output formats include "umd" or "iife".` ) From f519423170fafeee9d58aeb2052cb3bc224f25f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Oct 2022 09:36:31 +0200 Subject: [PATCH 234/311] chore(deps): update all non-major dependencies (#10393) --- package.json | 20 +- .../create-vite/template-lit-ts/package.json | 4 +- .../create-vite/template-lit/package.json | 4 +- .../template-preact-ts/package.json | 4 +- .../create-vite/template-preact/package.json | 4 +- .../template-react-ts/package.json | 2 +- .../create-vite/template-react/package.json | 2 +- .../template-svelte-ts/package.json | 4 +- .../create-vite/template-svelte/package.json | 4 +- .../template-vanilla-ts/package.json | 2 +- .../create-vite/template-vanilla/package.json | 2 +- .../create-vite/template-vue-ts/package.json | 2 +- .../create-vite/template-vue/package.json | 2 +- packages/plugin-legacy/package.json | 4 +- packages/plugin-react/package.json | 2 +- packages/plugin-vue/package.json | 2 +- packages/vite/package.json | 4 +- playground/css-sourcemap/package.json | 2 +- playground/json/package.json | 2 +- playground/legacy/package.json | 4 +- playground/optimize-missing-deps/package.json | 2 +- playground/preload/package.json | 2 +- playground/ssr-deps/package.json | 4 +- playground/ssr-html/package.json | 2 +- playground/ssr-pug/package.json | 2 +- playground/ssr-react/package.json | 4 +- playground/ssr-vue/package.json | 4 +- pnpm-lock.yaml | 690 ++++++++++++------ 28 files changed, 505 insertions(+), 281 deletions(-) diff --git a/package.json b/package.json index 9ee3d9fe80d7b8..45f13e5b4b28f5 100644 --- a/package.json +++ b/package.json @@ -52,17 +52,17 @@ "@types/minimist": "^1.2.2", "@types/node": "^17.0.42", "@types/picomatch": "^2.3.0", - "@types/prompts": "^2.0.14", + "@types/prompts": "^2.4.1", "@types/resolve": "^1.20.2", "@types/sass": "~1.43.1", "@types/semver": "^7.3.12", "@types/stylus": "^0.48.38", "@types/ws": "^8.5.3", - "@typescript-eslint/eslint-plugin": "^5.38.1", - "@typescript-eslint/parser": "^5.38.1", + "@typescript-eslint/eslint-plugin": "^5.39.0", + "@typescript-eslint/parser": "^5.39.0", "conventional-changelog-cli": "^2.2.2", "esbuild": "^0.14.47", - "eslint": "^8.24.0", + "eslint": "^8.25.0", "eslint-define-config": "^1.7.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", @@ -73,23 +73,23 @@ "minimist": "^1.2.6", "npm-run-all": "^4.1.5", "picocolors": "^1.0.0", - "playwright-chromium": "^1.26.1", - "pnpm": "^7.13.0", + "playwright-chromium": "^1.27.0", + "pnpm": "^7.13.3", "prettier": "2.7.1", "prompts": "^2.4.2", "resolve": "^1.22.1", "rimraf": "^3.0.2", "rollup": "^2.79.1", "rollup-plugin-license": "^2.8.1", - "semver": "^7.3.7", + "semver": "^7.3.8", "simple-git-hooks": "^2.8.0", "tslib": "^2.4.0", - "tsx": "^3.9.0", + "tsx": "^3.10.1", "typescript": "^4.6.4", "unbuild": "^0.8.11", "vite": "workspace:*", "vitepress": "^1.0.0-alpha.19", - "vitest": "^0.23.4", + "vitest": "^0.24.0", "vue": "^3.2.40" }, "simple-git-hooks": { @@ -110,7 +110,7 @@ "eslint --cache --fix" ] }, - "packageManager": "pnpm@7.13.0", + "packageManager": "pnpm@7.13.3", "pnpm": { "overrides": { "vite": "workspace:*", diff --git a/packages/create-vite/template-lit-ts/package.json b/packages/create-vite/template-lit-ts/package.json index f1c5b453499985..f62e672ba36a16 100644 --- a/packages/create-vite/template-lit-ts/package.json +++ b/packages/create-vite/template-lit-ts/package.json @@ -17,10 +17,10 @@ "build": "tsc && vite build" }, "dependencies": { - "lit": "^2.3.1" + "lit": "^2.4.0" }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-lit/package.json b/packages/create-vite/template-lit/package.json index 6a0e5f02613040..d20a325aa66182 100644 --- a/packages/create-vite/template-lit/package.json +++ b/packages/create-vite/template-lit/package.json @@ -15,9 +15,9 @@ "build": "vite build" }, "dependencies": { - "lit": "^2.3.1" + "lit": "^2.4.0" }, "devDependencies": { - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-preact-ts/package.json b/packages/create-vite/template-preact-ts/package.json index bfaae76fc8d2b2..b929fde4932449 100644 --- a/packages/create-vite/template-preact-ts/package.json +++ b/packages/create-vite/template-preact-ts/package.json @@ -9,11 +9,11 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.11.0" + "preact": "^10.11.1" }, "devDependencies": { "@preact/preset-vite": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-preact/package.json b/packages/create-vite/template-preact/package.json index df5d9062d4d79c..5d6e72338f16df 100644 --- a/packages/create-vite/template-preact/package.json +++ b/packages/create-vite/template-preact/package.json @@ -9,10 +9,10 @@ "preview": "vite preview" }, "dependencies": { - "preact": "^10.11.0" + "preact": "^10.11.1" }, "devDependencies": { "@preact/preset-vite": "^2.4.0", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-react-ts/package.json b/packages/create-vite/template-react-ts/package.json index 02b9a18ef3725e..7e071c361451ab 100644 --- a/packages/create-vite/template-react-ts/package.json +++ b/packages/create-vite/template-react-ts/package.json @@ -17,6 +17,6 @@ "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", "typescript": "^4.6.4", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-react/package.json b/packages/create-vite/template-react/package.json index e63c1da49276bd..9af0f2247ddae5 100644 --- a/packages/create-vite/template-react/package.json +++ b/packages/create-vite/template-react/package.json @@ -16,6 +16,6 @@ "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-svelte-ts/package.json b/packages/create-vite/template-svelte-ts/package.json index 2a7a04d801e1d5..3d1990f7d2aa68 100644 --- a/packages/create-vite/template-svelte-ts/package.json +++ b/packages/create-vite/template-svelte-ts/package.json @@ -10,13 +10,13 @@ "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.8", + "@sveltejs/vite-plugin-svelte": "^1.0.9", "@tsconfig/svelte": "^3.0.0", "svelte": "^3.50.1", "svelte-check": "^2.9.1", "svelte-preprocess": "^4.10.7", "tslib": "^2.4.0", "typescript": "^4.6.4", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-svelte/package.json b/packages/create-vite/template-svelte/package.json index 94cddc9a4af766..a400c741df9151 100644 --- a/packages/create-vite/template-svelte/package.json +++ b/packages/create-vite/template-svelte/package.json @@ -9,8 +9,8 @@ "preview": "vite preview" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.8", + "@sveltejs/vite-plugin-svelte": "^1.0.9", "svelte": "^3.50.1", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-vanilla-ts/package.json b/packages/create-vite/template-vanilla-ts/package.json index 6843cd0eeb32a8..0cf9eab6807827 100644 --- a/packages/create-vite/template-vanilla-ts/package.json +++ b/packages/create-vite/template-vanilla-ts/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "typescript": "^4.6.4", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-vanilla/package.json b/packages/create-vite/template-vanilla/package.json index 46eb670177880a..c8db867cad79d6 100644 --- a/packages/create-vite/template-vanilla/package.json +++ b/packages/create-vite/template-vanilla/package.json @@ -9,6 +9,6 @@ "preview": "vite preview" }, "devDependencies": { - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/create-vite/template-vue-ts/package.json b/packages/create-vite/template-vue-ts/package.json index ab5fc23af6270c..8ceb925374472f 100644 --- a/packages/create-vite/template-vue-ts/package.json +++ b/packages/create-vite/template-vue-ts/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@vitejs/plugin-vue": "^3.1.2", "typescript": "^4.6.4", - "vite": "^3.1.4", + "vite": "^3.1.6", "vue-tsc": "^0.40.13" } } diff --git a/packages/create-vite/template-vue/package.json b/packages/create-vite/template-vue/package.json index ceaadbf7726b39..cf4c1eeebd2f5f 100644 --- a/packages/create-vite/template-vue/package.json +++ b/packages/create-vite/template-vue/package.json @@ -13,6 +13,6 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^3.1.2", - "vite": "^3.1.4" + "vite": "^3.1.6" } } diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index da5d83390e2e67..98e23e66b880e6 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -36,8 +36,8 @@ "homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", "dependencies": { "@babel/standalone": "^7.19.3", - "core-js": "^3.25.4", - "magic-string": "^0.26.5", + "core-js": "^3.25.5", + "magic-string": "^0.26.7", "regenerator-runtime": "^0.13.9", "systemjs": "^6.13.0" }, diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json index 7e073dd97b19a6..f1f5e80e9e0fb2 100644 --- a/packages/plugin-react/package.json +++ b/packages/plugin-react/package.json @@ -44,7 +44,7 @@ "@babel/plugin-transform-react-jsx-development": "^7.18.6", "@babel/plugin-transform-react-jsx-self": "^7.18.6", "@babel/plugin-transform-react-jsx-source": "^7.18.6", - "magic-string": "^0.26.5", + "magic-string": "^0.26.7", "react-refresh": "^0.14.0" }, "peerDependencies": { diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index c3277320214d9a..7b05d4de15b1c7 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.16", "debug": "^4.3.4", "rollup": "^2.79.1", "slash": "^5.0.0", diff --git a/packages/vite/package.json b/packages/vite/package.json index aeef277ff670a3..2cd2346a2c5e4f 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -71,7 +71,7 @@ "@ampproject/remapping": "^2.2.0", "@babel/parser": "^7.19.3", "@babel/types": "^7.19.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.16", "@rollup/plugin-alias": "^3.1.9", "@rollup/plugin-commonjs": "^22.0.2", "@rollup/plugin-dynamic-import-vars": "^1.4.4", @@ -97,7 +97,7 @@ "http-proxy": "^1.18.1", "json5": "^2.2.1", "launch-editor-middleware": "^2.6.0", - "magic-string": "^0.26.6", + "magic-string": "^0.26.7", "micromatch": "^4.0.5", "mlly": "^0.5.16", "mrmime": "^1.0.1", diff --git a/playground/css-sourcemap/package.json b/playground/css-sourcemap/package.json index 9257357eb31078..624a5c40f6e9d5 100644 --- a/playground/css-sourcemap/package.json +++ b/playground/css-sourcemap/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "less": "^4.1.3", - "magic-string": "^0.26.5", + "magic-string": "^0.26.7", "sass": "^1.55.0", "stylus": "^0.59.0", "sugarss": "^4.0.1" diff --git a/playground/json/package.json b/playground/json/package.json index 945d03575f68ba..deabb703fdbe3c 100644 --- a/playground/json/package.json +++ b/playground/json/package.json @@ -12,7 +12,7 @@ "debug:ssr": "node --inspect-brk server" }, "devDependencies": { - "express": "^4.18.1", + "express": "^4.18.2", "json-module": "file:./json-module", "vue": "^3.2.40" } diff --git a/playground/legacy/package.json b/playground/legacy/package.json index 59bea25646ac7c..bfdd3e3e68e805 100644 --- a/playground/legacy/package.json +++ b/playground/legacy/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@vitejs/plugin-legacy": "workspace:*", - "express": "^4.18.1", - "terser": "^5.15.0" + "express": "^4.18.2", + "terser": "^5.15.1" } } diff --git a/playground/optimize-missing-deps/package.json b/playground/optimize-missing-deps/package.json index 50f8ba90fa9d2f..27a40f331de3c2 100644 --- a/playground/optimize-missing-deps/package.json +++ b/playground/optimize-missing-deps/package.json @@ -9,6 +9,6 @@ "missing-dep": "file:./missing-dep" }, "devDependencies": { - "express": "^4.18.1" + "express": "^4.18.2" } } diff --git a/playground/preload/package.json b/playground/preload/package.json index dc2293d23a68f0..61dd1b960d3255 100644 --- a/playground/preload/package.json +++ b/playground/preload/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@vitejs/plugin-vue": "workspace:*", - "terser": "^5.15.0", + "terser": "^5.15.1", "dep-a": "file:./dep-a", "dep-including-a": "file:./dep-including-a" } diff --git a/playground/ssr-deps/package.json b/playground/ssr-deps/package.json index 785806c3bab816..b6799d78175a37 100644 --- a/playground/ssr-deps/package.json +++ b/playground/ssr-deps/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@vitejs/css-lib": "file:./css-lib", - "bcrypt": "^5.0.1", + "bcrypt": "^5.1.0", "define-properties-exports": "file:./define-properties-exports", "define-property-exports": "file:./define-property-exports", "forwarded-export": "file:./forwarded-export", @@ -32,6 +32,6 @@ "pkg-exports": "file:./pkg-exports" }, "devDependencies": { - "express": "^4.18.1" + "express": "^4.18.2" } } diff --git a/playground/ssr-html/package.json b/playground/ssr-html/package.json index a800fe8477a416..3267d3347768c6 100644 --- a/playground/ssr-html/package.json +++ b/playground/ssr-html/package.json @@ -10,6 +10,6 @@ }, "dependencies": {}, "devDependencies": { - "express": "^4.18.1" + "express": "^4.18.2" } } diff --git a/playground/ssr-pug/package.json b/playground/ssr-pug/package.json index 5b64c6535cbfe9..50d6ad43babc38 100644 --- a/playground/ssr-pug/package.json +++ b/playground/ssr-pug/package.json @@ -9,7 +9,7 @@ "debug": "node --inspect-brk server" }, "devDependencies": { - "express": "^4.18.1", + "express": "^4.18.2", "pug": "^3.0.2" } } diff --git a/playground/ssr-react/package.json b/playground/ssr-react/package.json index d20ccde7efc1dc..7ad1cdc0ad7701 100644 --- a/playground/ssr-react/package.json +++ b/playground/ssr-react/package.json @@ -15,12 +15,12 @@ "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", - "react-router-dom": "^6.4.1" + "react-router-dom": "^6.4.2" }, "devDependencies": { "@vitejs/plugin-react": "workspace:*", "compression": "^1.7.4", - "express": "^4.18.1", + "express": "^4.18.2", "serve-static": "^1.15.0" } } diff --git a/playground/ssr-vue/package.json b/playground/ssr-vue/package.json index 818f8a8e1ab882..a45e53eb1bbf60 100644 --- a/playground/ssr-vue/package.json +++ b/playground/ssr-vue/package.json @@ -16,7 +16,7 @@ }, "dependencies": { "example-external-component": "file:example-external-component", - "pinia": "^2.0.22", + "pinia": "^2.0.23", "vue": "^3.2.40", "vue-router": "^4.1.5" }, @@ -25,7 +25,7 @@ "@vitejs/plugin-vue-jsx": "workspace:*", "compression": "^1.7.4", "dep-import-type": "link:./dep-import-type", - "express": "^4.18.1", + "express": "^4.18.2", "serve-static": "^1.15.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93f7aa14a41e63..64c5d779f746da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,17 +26,17 @@ importers: '@types/minimist': ^1.2.2 '@types/node': ^17.0.42 '@types/picomatch': ^2.3.0 - '@types/prompts': ^2.0.14 + '@types/prompts': ^2.4.1 '@types/resolve': ^1.20.2 '@types/sass': ~1.43.1 '@types/semver': ^7.3.12 '@types/stylus': ^0.48.38 '@types/ws': ^8.5.3 - '@typescript-eslint/eslint-plugin': ^5.38.1 - '@typescript-eslint/parser': ^5.38.1 + '@typescript-eslint/eslint-plugin': ^5.39.0 + '@typescript-eslint/parser': ^5.39.0 conventional-changelog-cli: ^2.2.2 esbuild: ^0.14.47 - eslint: ^8.24.0 + eslint: ^8.25.0 eslint-define-config: ^1.7.0 eslint-plugin-import: ^2.26.0 eslint-plugin-node: ^11.1.0 @@ -47,23 +47,23 @@ importers: minimist: ^1.2.6 npm-run-all: ^4.1.5 picocolors: ^1.0.0 - playwright-chromium: ^1.26.1 - pnpm: ^7.13.0 + playwright-chromium: ^1.27.0 + pnpm: ^7.13.3 prettier: 2.7.1 prompts: ^2.4.2 resolve: ^1.22.1 rimraf: ^3.0.2 rollup: ^2.79.1 rollup-plugin-license: ^2.8.1 - semver: ^7.3.7 + semver: ^7.3.8 simple-git-hooks: ^2.8.0 tslib: ^2.4.0 - tsx: ^3.9.0 + tsx: ^3.10.1 typescript: ^4.6.4 unbuild: ^0.8.11 vite: workspace:* vitepress: ^1.0.0-alpha.19 - vitest: ^0.23.4 + vitest: ^0.24.0 vue: ^3.2.40 devDependencies: '@babel/types': 7.19.3 @@ -82,20 +82,20 @@ importers: '@types/minimist': 1.2.2 '@types/node': 17.0.42 '@types/picomatch': 2.3.0 - '@types/prompts': 2.0.14 + '@types/prompts': 2.4.1 '@types/resolve': 1.20.2 '@types/sass': 1.43.1 '@types/semver': 7.3.12 '@types/stylus': 0.48.38 '@types/ws': 8.5.3 - '@typescript-eslint/eslint-plugin': 5.38.1_z5cqhfye5lpmqil3ypaxjnnbyi - '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/eslint-plugin': 5.39.0_nl7x46ushz3ov2g5popuxtfsgy + '@typescript-eslint/parser': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a conventional-changelog-cli: 2.2.2 esbuild: 0.14.47 - eslint: 8.24.0 + eslint: 8.25.0 eslint-define-config: 1.7.0 - eslint-plugin-import: 2.26.0_gofx6msuqd4luqedfouzks2s4u - eslint-plugin-node: 11.1.0_eslint@8.24.0 + eslint-plugin-import: 2.26.0_dzvnzej2un7roooznz6ef2if2q + eslint-plugin-node: 11.1.0_eslint@8.25.0 execa: 6.1.0 fast-glob: 3.2.12 fs-extra: 10.1.0 @@ -103,23 +103,23 @@ importers: minimist: 1.2.6 npm-run-all: 4.1.5 picocolors: 1.0.0 - playwright-chromium: 1.26.1 - pnpm: 7.13.0 + playwright-chromium: 1.27.0 + pnpm: 7.13.3 prettier: 2.7.1 prompts: 2.4.2 resolve: 1.22.1 rimraf: 3.0.2 rollup: 2.79.1 rollup-plugin-license: 2.8.1_rollup@2.79.1 - semver: 7.3.7 + semver: 7.3.8 simple-git-hooks: 2.8.0 tslib: 2.4.0 - tsx: 3.9.0 + tsx: 3.10.1 typescript: 4.6.4 unbuild: 0.8.11 vite: link:packages/vite vitepress: 1.0.0-alpha.19 - vitest: 0.23.4 + vitest: 0.24.0 vue: 3.2.40 packages/create-vite: @@ -138,16 +138,16 @@ importers: specifiers: '@babel/core': ^7.19.3 '@babel/standalone': ^7.19.3 - core-js: ^3.25.4 - magic-string: ^0.26.5 + core-js: ^3.25.5 + magic-string: ^0.26.7 picocolors: ^1.0.0 regenerator-runtime: ^0.13.9 systemjs: ^6.13.0 vite: workspace:* dependencies: '@babel/standalone': 7.19.3 - core-js: 3.25.4 - magic-string: 0.26.5 + core-js: 3.25.5 + magic-string: 0.26.7 regenerator-runtime: 0.13.9 systemjs: 6.13.0 devDependencies: @@ -162,7 +162,7 @@ importers: '@babel/plugin-transform-react-jsx-development': ^7.18.6 '@babel/plugin-transform-react-jsx-self': ^7.18.6 '@babel/plugin-transform-react-jsx-source': ^7.18.6 - magic-string: ^0.26.5 + magic-string: ^0.26.7 react-refresh: ^0.14.0 vite: workspace:* dependencies: @@ -171,7 +171,7 @@ importers: '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.19.3 '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.19.3 '@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.19.3 - magic-string: 0.26.5 + magic-string: 0.26.7 react-refresh: 0.14.0 devDependencies: vite: link:../vite @@ -179,7 +179,7 @@ importers: packages/plugin-vue: specifiers: '@jridgewell/gen-mapping': ^0.3.2 - '@jridgewell/trace-mapping': ^0.3.15 + '@jridgewell/trace-mapping': ^0.3.16 debug: ^4.3.4 rollup: ^2.79.1 slash: ^5.0.0 @@ -188,7 +188,7 @@ importers: vue: ^3.2.40 devDependencies: '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.15 + '@jridgewell/trace-mapping': 0.3.16 debug: 4.3.4 rollup: 2.79.1 slash: 5.0.0 @@ -214,7 +214,7 @@ importers: '@ampproject/remapping': ^2.2.0 '@babel/parser': ^7.19.3 '@babel/types': ^7.19.3 - '@jridgewell/trace-mapping': ^0.3.15 + '@jridgewell/trace-mapping': ^0.3.16 '@rollup/plugin-alias': ^3.1.9 '@rollup/plugin-commonjs': ^22.0.2 '@rollup/plugin-dynamic-import-vars': ^1.4.4 @@ -243,7 +243,7 @@ importers: http-proxy: ^1.18.1 json5: ^2.2.1 launch-editor-middleware: ^2.6.0 - magic-string: ^0.26.6 + magic-string: ^0.26.7 micromatch: ^4.0.5 mlly: ^0.5.16 mrmime: ^1.0.1 @@ -281,7 +281,7 @@ importers: '@ampproject/remapping': 2.2.0 '@babel/parser': 7.19.3 '@babel/types': 7.19.3 - '@jridgewell/trace-mapping': 0.3.15 + '@jridgewell/trace-mapping': 0.3.16 '@rollup/plugin-alias': 3.1.9_rollup@2.79.1 '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1 '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.79.1 @@ -308,7 +308,7 @@ importers: http-proxy: 1.18.1_debug@4.3.4 json5: 2.2.1 launch-editor-middleware: 2.6.0 - magic-string: 0.26.6 + magic-string: 0.26.7 micromatch: 4.0.5 mlly: 0.5.16 mrmime: 1.0.1 @@ -428,13 +428,13 @@ importers: playground/css-sourcemap: specifiers: less: ^4.1.3 - magic-string: ^0.26.5 + magic-string: ^0.26.7 sass: ^1.55.0 stylus: ^0.59.0 sugarss: ^4.0.1 devDependencies: less: 4.1.3 - magic-string: 0.26.5 + magic-string: 0.26.7 sass: 1.55.0 stylus: 0.59.0 sugarss: 4.0.1 @@ -549,11 +549,11 @@ importers: playground/json: specifiers: - express: ^4.18.1 + express: ^4.18.2 json-module: file:./json-module vue: ^3.2.40 devDependencies: - express: 4.18.1 + express: 4.18.2 json-module: file:playground/json/json-module vue: 3.2.40 @@ -563,12 +563,12 @@ importers: playground/legacy: specifiers: '@vitejs/plugin-legacy': workspace:* - express: ^4.18.1 - terser: ^5.15.0 + express: ^4.18.2 + terser: ^5.15.1 devDependencies: '@vitejs/plugin-legacy': link:../../packages/plugin-legacy - express: 4.18.1 - terser: 5.15.0 + express: 4.18.2 + terser: 5.15.1 playground/lib: specifiers: {} @@ -772,12 +772,12 @@ importers: playground/optimize-missing-deps: specifiers: - express: ^4.18.1 + express: ^4.18.2 missing-dep: file:./missing-dep dependencies: missing-dep: file:playground/optimize-missing-deps/missing-dep devDependencies: - express: 4.18.1 + express: 4.18.2 playground/optimize-missing-deps/missing-dep: specifiers: @@ -793,7 +793,7 @@ importers: '@vitejs/plugin-vue': workspace:* dep-a: file:./dep-a dep-including-a: file:./dep-including-a - terser: ^5.15.0 + terser: ^5.15.1 vue: ^3.2.40 vue-router: ^4.1.5 dependencies: @@ -803,7 +803,7 @@ importers: '@vitejs/plugin-vue': link:../../packages/plugin-vue dep-a: file:playground/preload/dep-a dep-including-a: file:playground/preload/dep-including-a - terser: 5.15.0 + terser: 5.15.1 playground/preload/dep-a: specifiers: {} @@ -952,10 +952,10 @@ importers: playground/ssr-deps: specifiers: '@vitejs/css-lib': file:./css-lib - bcrypt: ^5.0.1 + bcrypt: ^5.1.0 define-properties-exports: file:./define-properties-exports define-property-exports: file:./define-property-exports - express: ^4.18.1 + express: ^4.18.2 external-entry: file:./external-entry external-using-external-entry: file:./external-using-external-entry forwarded-export: file:./forwarded-export @@ -975,7 +975,7 @@ importers: ts-transpiled-exports: file:./ts-transpiled-exports dependencies: '@vitejs/css-lib': file:playground/ssr-deps/css-lib - bcrypt: 5.0.1 + bcrypt: 5.1.0 define-properties-exports: file:playground/ssr-deps/define-properties-exports define-property-exports: file:playground/ssr-deps/define-property-exports external-entry: file:playground/ssr-deps/external-entry @@ -996,7 +996,7 @@ importers: require-absolute: file:playground/ssr-deps/require-absolute ts-transpiled-exports: file:playground/ssr-deps/ts-transpiled-exports devDependencies: - express: 4.18.1 + express: 4.18.2 playground/ssr-deps/css-lib: specifiers: {} @@ -1078,35 +1078,35 @@ importers: playground/ssr-html: specifiers: - express: ^4.18.1 + express: ^4.18.2 devDependencies: - express: 4.18.1 + express: 4.18.2 playground/ssr-pug: specifiers: - express: ^4.18.1 + express: ^4.18.2 pug: ^3.0.2 devDependencies: - express: 4.18.1 + express: 4.18.2 pug: 3.0.2 playground/ssr-react: specifiers: '@vitejs/plugin-react': workspace:* compression: ^1.7.4 - express: ^4.18.1 + express: ^4.18.2 react: ^18.2.0 react-dom: ^18.2.0 - react-router-dom: ^6.4.1 + react-router-dom: ^6.4.2 serve-static: ^1.15.0 dependencies: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-router-dom: 6.4.1_biqbaboplfbrettd7655fr4n2y + react-router-dom: 6.4.2_biqbaboplfbrettd7655fr4n2y devDependencies: '@vitejs/plugin-react': link:../../packages/plugin-react compression: 1.7.4 - express: 4.18.1 + express: 4.18.2 serve-static: 1.15.0 playground/ssr-resolve: @@ -1130,14 +1130,14 @@ importers: compression: ^1.7.4 dep-import-type: link:./dep-import-type example-external-component: file:example-external-component - express: ^4.18.1 - pinia: ^2.0.22 + express: ^4.18.2 + pinia: ^2.0.23 serve-static: ^1.15.0 vue: ^3.2.40 vue-router: ^4.1.5 dependencies: example-external-component: file:playground/ssr-vue/example-external-component - pinia: 2.0.22_vue@3.2.40 + pinia: 2.0.23_vue@3.2.40 vue: 3.2.40 vue-router: 4.1.5_vue@3.2.40 devDependencies: @@ -1145,7 +1145,7 @@ importers: '@vitejs/plugin-vue-jsx': link:../../packages/plugin-vue-jsx compression: 1.7.4 dep-import-type: link:dep-import-type - express: 4.18.1 + express: 4.18.2 serve-static: 1.15.0 playground/ssr-vue/dep-import-type: @@ -1406,7 +1406,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.1.1 - '@jridgewell/trace-mapping': 0.3.15 + '@jridgewell/trace-mapping': 0.3.16 /@babel/code-frame/7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} @@ -1941,27 +1941,36 @@ packages: resolution: {integrity: sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg==} dev: false - /@esbuild-kit/cjs-loader/2.3.3: - resolution: {integrity: sha512-Rt4O1mXlPEDVxvjsHLgbtHVdUXYK9C1/6ThpQnt7FaXIjUOsI6qhHYMgALhNnlIMZffag44lXd6Dqgx3xALbpQ==} + /@esbuild-kit/cjs-loader/2.4.0: + resolution: {integrity: sha512-DBBCiHPgL2B/elUpvCDhNHXnlZQ9sfO2uyt1OJyAXKT41beQEFY4OxZ6gwS+ZesRCbZ6JV8M7GEyOPkjv8kdIw==} dependencies: - '@esbuild-kit/core-utils': 2.1.0 - get-tsconfig: 4.1.0 + '@esbuild-kit/core-utils': 3.0.0 + get-tsconfig: 4.2.0 dev: true - /@esbuild-kit/core-utils/2.1.0: - resolution: {integrity: sha512-fZirrc2KjeTumVjE4bpleWOk2gD83b7WuGeQqOceKFQL+heNKKkNB5G5pekOUTLzfSBc0hP7hCSBoD9TuR0hLw==} + /@esbuild-kit/core-utils/3.0.0: + resolution: {integrity: sha512-TXmwH9EFS3DC2sI2YJWJBgHGhlteK0Xyu1VabwetMULfm3oYhbrsWV5yaSr2NTWZIgDGVLHbRf0inxbjXqAcmQ==} dependencies: - esbuild: 0.14.50 + esbuild: 0.15.10 source-map-support: 0.5.21 dev: true - /@esbuild-kit/esm-loader/2.4.2: - resolution: {integrity: sha512-N9dPKAj8WOx6djVnStgILWXip4fjDcBk9L7azO0/uQDpu8Ee0eaL78mkN4Acid9BzvNAKWwdYXFJZnsVahNEew==} + /@esbuild-kit/esm-loader/2.5.0: + resolution: {integrity: sha512-ySs0qOsiwj+hsgZM9/MniGdvfa9/WzqfFuIia8/5gSUPeIQIX2/tG91QakxPFOR35VFiwTB7wCiHtiS6dc6SkA==} dependencies: - '@esbuild-kit/core-utils': 2.1.0 - get-tsconfig: 4.1.0 + '@esbuild-kit/core-utils': 3.0.0 + get-tsconfig: 4.2.0 dev: true + /@esbuild/android-arm/0.15.10: + resolution: {integrity: sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm/0.15.9: resolution: {integrity: sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==} engines: {node: '>=12'} @@ -1970,6 +1979,15 @@ packages: requiresBuild: true optional: true + /@esbuild/linux-loong64/0.15.10: + resolution: {integrity: sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64/0.15.9: resolution: {integrity: sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==} engines: {node: '>=12'} @@ -1978,8 +1996,8 @@ packages: requiresBuild: true optional: true - /@eslint/eslintrc/1.3.2: - resolution: {integrity: sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==} + /@eslint/eslintrc/1.3.3: + resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -2006,10 +2024,6 @@ packages: - supports-color dev: true - /@humanwhocodes/gitignore-to-minimatch/1.0.2: - resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} - dev: true - /@humanwhocodes/module-importer/1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -2033,7 +2047,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.1.1 - '@jridgewell/sourcemap-codec': 1.4.13 + '@jridgewell/sourcemap-codec': 1.4.14 /@jridgewell/gen-mapping/0.3.2: resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} @@ -2041,10 +2055,10 @@ packages: dependencies: '@jridgewell/set-array': 1.1.1 '@jridgewell/sourcemap-codec': 1.4.13 - '@jridgewell/trace-mapping': 0.3.15 + '@jridgewell/trace-mapping': 0.3.16 - /@jridgewell/resolve-uri/3.0.7: - resolution: {integrity: sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==} + /@jridgewell/resolve-uri/3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} /@jridgewell/set-array/1.1.1: @@ -2055,26 +2069,29 @@ packages: resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} dependencies: '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.15 + '@jridgewell/trace-mapping': 0.3.16 dev: true /@jridgewell/sourcemap-codec/1.4.13: resolution: {integrity: sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==} - /@jridgewell/trace-mapping/0.3.15: - resolution: {integrity: sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==} + /@jridgewell/sourcemap-codec/1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + + /@jridgewell/trace-mapping/0.3.16: + resolution: {integrity: sha512-LCQ+NeThyJ4k1W2d+vIKdxuSt9R3pQSZ4P92m7EakaYuXcVWbHuT5bjNcqLd4Rdgi6xYWYDvBJZJLZSLanjDcA==} dependencies: - '@jridgewell/resolve-uri': 3.0.7 - '@jridgewell/sourcemap-codec': 1.4.13 + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 /@jridgewell/trace-mapping/0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - '@jridgewell/resolve-uri': 3.0.7 - '@jridgewell/sourcemap-codec': 1.4.13 + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 - /@mapbox/node-pre-gyp/1.0.9: - resolution: {integrity: sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==} + /@mapbox/node-pre-gyp/1.0.10: + resolution: {integrity: sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==} hasBin: true dependencies: detect-libc: 2.0.1 @@ -2084,7 +2101,7 @@ packages: nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 - semver: 7.3.7 + semver: 7.3.8 tar: 6.1.11 transitivePeerDependencies: - encoding @@ -2112,7 +2129,7 @@ packages: colors: 1.2.5 lodash: 4.17.21 resolve: 1.17.0 - semver: 7.3.7 + semver: 7.3.8 source-map: 0.6.1 typescript: 4.8.4 dev: true @@ -2189,8 +2206,8 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@remix-run/router/1.0.1: - resolution: {integrity: sha512-eBV5rvW4dRFOU1eajN7FmYxjAIVz/mRHgUE9En9mBn6m3mulK3WTR5C3iQhL9MZ14rWAq+xOlEaCkDiW0/heOg==} + /@remix-run/router/1.0.2: + resolution: {integrity: sha512-GRSOFhJzjGN+d4sKHTMSvNeUPoZiDHWmRnXfzaxrqe7dE/Nzlc8BiMSJdLDESZlndM7jIUrZ/F4yWqVYlI0rwQ==} engines: {node: '>=14'} dev: false @@ -2346,7 +2363,7 @@ packages: import-lazy: 4.0.0 jju: 1.4.0 resolve: 1.17.0 - semver: 7.3.7 + semver: 7.3.8 z-schema: 5.0.3 dev: true @@ -2530,8 +2547,8 @@ packages: resolution: {integrity: sha512-O397rnSS9iQI4OirieAtsDqvCj4+3eY1J+EPdNTKuHuRWIfUoGyzX294o8C4KJYaLqgSrd2o60c5EqCU8Zv02g==} dev: true - /@types/prompts/2.0.14: - resolution: {integrity: sha512-HZBd99fKxRWpYCErtm2/yxUZv6/PBI9J7N4TNFffl5JbrYMHBwF25DjQGTW3b3jmXq+9P6/8fCIb2ee57BFfYA==} + /@types/prompts/2.4.1: + resolution: {integrity: sha512-1Mqzhzi9W5KlooNE4o0JwSXGUDeQXKldbGn9NO4tpxwZbHXYd+WcKpCksG2lbhH7U9I9LigfsdVsP2QAY0lNPA==} dependencies: '@types/node': 17.0.42 dev: true @@ -2576,8 +2593,8 @@ packages: '@types/node': 17.0.42 dev: true - /@typescript-eslint/eslint-plugin/5.38.1_z5cqhfye5lpmqil3ypaxjnnbyi: - resolution: {integrity: sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==} + /@typescript-eslint/eslint-plugin/5.39.0_nl7x46ushz3ov2g5popuxtfsgy: + resolution: {integrity: sha512-xVfKOkBm5iWMNGKQ2fwX5GVgBuHmZBO1tCRwXmY5oAIsPscfwm2UADDuNB8ZVYCtpQvJK4xpjrK7jEhcJ0zY9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2587,23 +2604,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/type-utils': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm - '@typescript-eslint/utils': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/parser': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a + '@typescript-eslint/scope-manager': 5.39.0 + '@typescript-eslint/type-utils': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a + '@typescript-eslint/utils': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a debug: 4.3.4 - eslint: 8.24.0 + eslint: 8.25.0 ignore: 5.2.0 regexpp: 3.2.0 - semver: 7.3.7 + semver: 7.3.8 tsutils: 3.21.0_typescript@4.6.4 typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.38.1_4at4lsfnhb3djm6qjts2gmiglm: - resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==} + /@typescript-eslint/parser/5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a: + resolution: {integrity: sha512-PhxLjrZnHShe431sBAGHaNe6BDdxAASDySgsBCGxcBecVCi8NQWxQZMcizNA4g0pN51bBAn/FUfkWG3SDVcGlA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2612,26 +2629,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.6.4 + '@typescript-eslint/scope-manager': 5.39.0 + '@typescript-eslint/types': 5.39.0 + '@typescript-eslint/typescript-estree': 5.39.0_typescript@4.6.4 debug: 4.3.4 - eslint: 8.24.0 + eslint: 8.25.0 typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.38.1: - resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==} + /@typescript-eslint/scope-manager/5.39.0: + resolution: {integrity: sha512-/I13vAqmG3dyqMVSZPjsbuNQlYS082Y7OMkwhCfLXYsmlI0ca4nkL7wJ/4gjX70LD4P8Hnw1JywUVVAwepURBw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/types': 5.39.0 + '@typescript-eslint/visitor-keys': 5.39.0 dev: true - /@typescript-eslint/type-utils/5.38.1_4at4lsfnhb3djm6qjts2gmiglm: - resolution: {integrity: sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==} + /@typescript-eslint/type-utils/5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a: + resolution: {integrity: sha512-KJHJkOothljQWzR3t/GunL0TPKY+fGJtnpl+pX+sJ0YiKTz3q2Zr87SGTmFqsCMFrLt5E0+o+S6eQY0FAXj9uA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2640,23 +2657,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.6.4 - '@typescript-eslint/utils': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/typescript-estree': 5.39.0_typescript@4.6.4 + '@typescript-eslint/utils': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a debug: 4.3.4 - eslint: 8.24.0 + eslint: 8.25.0 tsutils: 3.21.0_typescript@4.6.4 typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.38.1: - resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==} + /@typescript-eslint/types/5.39.0: + resolution: {integrity: sha512-gQMZrnfEBFXK38hYqt8Lkwt8f4U6yq+2H5VDSgP/qiTzC8Nw8JO3OuSUOQ2qW37S/dlwdkHDntkZM6SQhKyPhw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.38.1_typescript@4.6.4: - resolution: {integrity: sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==} + /@typescript-eslint/typescript-estree/5.39.0_typescript@4.6.4: + resolution: {integrity: sha512-qLFQP0f398sdnogJoLtd43pUgB18Q50QSA+BTE5h3sUxySzbWDpTSdgt4UyxNSozY/oDK2ta6HVAzvGgq8JYnA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2664,41 +2681,41 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/types': 5.39.0 + '@typescript-eslint/visitor-keys': 5.39.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.7 + semver: 7.3.8 tsutils: 3.21.0_typescript@4.6.4 typescript: 4.6.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.38.1_4at4lsfnhb3djm6qjts2gmiglm: - resolution: {integrity: sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==} + /@typescript-eslint/utils/5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a: + resolution: {integrity: sha512-+DnY5jkpOpgj+EBtYPyHRjXampJfC0yUZZzfzLuUWVZvCuKqSdJVC8UhdWipIw7VKNTfwfAPiOWzYkAwuIhiAg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.6.4 - eslint: 8.24.0 + '@typescript-eslint/scope-manager': 5.39.0 + '@typescript-eslint/types': 5.39.0 + '@typescript-eslint/typescript-estree': 5.39.0_typescript@4.6.4 + eslint: 8.25.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint-utils: 3.0.0_eslint@8.25.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.38.1: - resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==} + /@typescript-eslint/visitor-keys/5.39.0: + resolution: {integrity: sha512-yyE3RPwOG+XJBLrhvsxAidUgybJVQ/hG8BhiJo0k8JSAYfk/CshVcxf0HwP4Jt7WZZ6vLmxdo1p6EyN3tzFTkg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/types': 5.39.0 eslint-visitor-keys: 3.3.0 dev: true @@ -2767,6 +2784,11 @@ packages: /@vue/devtools-api/6.4.2: resolution: {integrity: sha512-6hNZ23h1M2Llky+SIAmVhL7s6BjLtZBCzjIz9iRSBUsysjE7kC39ulW0dH4o/eZtycmSt4qEr6RDVGTIuWu+ow==} + dev: true + + /@vue/devtools-api/6.4.4: + resolution: {integrity: sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==} + dev: false /@vue/reactivity-transform/3.2.40: resolution: {integrity: sha512-HQUCVwEaacq6fGEsg2NUuGKIhUveMCjOk8jGHqLXPI2w6zFoPrlQhwWEaINTv5kkZDXKEnCijAp+4gNEHG03yw==} @@ -3020,7 +3042,7 @@ packages: dev: true /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: true /array-ify/1.0.0: @@ -3133,13 +3155,13 @@ packages: engines: {node: '>=6.0.0'} dev: true - /bcrypt/5.0.1: - resolution: {integrity: sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==} + /bcrypt/5.1.0: + resolution: {integrity: sha512-RHBS7HI5N5tEnGTmtR/pppX0mmDSBpQ4aCBsj7CEQfYXDcO74A8sIBYcJMuCsis2E81zDxeENYhv66oZwLiA+Q==} engines: {node: '>= 10.0.0'} requiresBuild: true dependencies: - '@mapbox/node-pre-gyp': 1.0.9 - node-addon-api: 3.2.1 + '@mapbox/node-pre-gyp': 1.0.10 + node-addon-api: 5.0.0 transitivePeerDependencies: - encoding - supports-color @@ -3153,8 +3175,8 @@ packages: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} - /body-parser/1.20.0: - resolution: {integrity: sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==} + /body-parser/1.20.1: + resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dependencies: bytes: 3.1.2 @@ -3165,7 +3187,7 @@ packages: http-errors: 2.0.0 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.10.3 + qs: 6.11.0 raw-body: 2.5.1 type-is: 1.6.18 unpipe: 1.0.0 @@ -3710,7 +3732,7 @@ packages: safe-buffer: 5.1.2 /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: true /cookie/0.4.2: @@ -3729,8 +3751,8 @@ packages: is-what: 3.14.1 dev: true - /core-js/3.25.4: - resolution: {integrity: sha512-JDLxg61lFPFYQ7U0HKoyKwVUV63VbbVTb/K73Yf+k4Mf4ZBZxCjfyrWZjTk1ZM7ZrgFSqhSIOmuzYAxG2f/reQ==} + /core-js/3.25.5: + resolution: {integrity: sha512-nbm6eZSjm+ZuBQxCUPQKQCoUEfFOXjUZ8dTTyikyKaWrTYmAVbykQfwsKE5dBK88u3QCkCrzsx/PPlKfhsvgpw==} requiresBuild: true dev: false @@ -4014,7 +4036,7 @@ packages: dev: true /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true /electron-to-chromium/1.4.258: @@ -4151,6 +4173,15 @@ packages: dev: true optional: true + /esbuild-android-64/0.15.10: + resolution: {integrity: sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /esbuild-android-64/0.15.9: resolution: {integrity: sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==} engines: {node: '>=12'} @@ -4177,6 +4208,15 @@ packages: dev: true optional: true + /esbuild-android-arm64/0.15.10: + resolution: {integrity: sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /esbuild-android-arm64/0.15.9: resolution: {integrity: sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==} engines: {node: '>=12'} @@ -4203,6 +4243,15 @@ packages: dev: true optional: true + /esbuild-darwin-64/0.15.10: + resolution: {integrity: sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-64/0.15.9: resolution: {integrity: sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==} engines: {node: '>=12'} @@ -4229,6 +4278,15 @@ packages: dev: true optional: true + /esbuild-darwin-arm64/0.15.10: + resolution: {integrity: sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-arm64/0.15.9: resolution: {integrity: sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==} engines: {node: '>=12'} @@ -4255,6 +4313,15 @@ packages: dev: true optional: true + /esbuild-freebsd-64/0.15.10: + resolution: {integrity: sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-64/0.15.9: resolution: {integrity: sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==} engines: {node: '>=12'} @@ -4281,6 +4348,15 @@ packages: dev: true optional: true + /esbuild-freebsd-arm64/0.15.10: + resolution: {integrity: sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-arm64/0.15.9: resolution: {integrity: sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==} engines: {node: '>=12'} @@ -4307,6 +4383,15 @@ packages: dev: true optional: true + /esbuild-linux-32/0.15.10: + resolution: {integrity: sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-32/0.15.9: resolution: {integrity: sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==} engines: {node: '>=12'} @@ -4333,6 +4418,15 @@ packages: dev: true optional: true + /esbuild-linux-64/0.15.10: + resolution: {integrity: sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-64/0.15.9: resolution: {integrity: sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==} engines: {node: '>=12'} @@ -4359,6 +4453,15 @@ packages: dev: true optional: true + /esbuild-linux-arm/0.15.10: + resolution: {integrity: sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm/0.15.9: resolution: {integrity: sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==} engines: {node: '>=12'} @@ -4385,6 +4488,15 @@ packages: dev: true optional: true + /esbuild-linux-arm64/0.15.10: + resolution: {integrity: sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm64/0.15.9: resolution: {integrity: sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==} engines: {node: '>=12'} @@ -4411,6 +4523,15 @@ packages: dev: true optional: true + /esbuild-linux-mips64le/0.15.10: + resolution: {integrity: sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-mips64le/0.15.9: resolution: {integrity: sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==} engines: {node: '>=12'} @@ -4437,6 +4558,15 @@ packages: dev: true optional: true + /esbuild-linux-ppc64le/0.15.10: + resolution: {integrity: sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-ppc64le/0.15.9: resolution: {integrity: sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==} engines: {node: '>=12'} @@ -4463,6 +4593,15 @@ packages: dev: true optional: true + /esbuild-linux-riscv64/0.15.10: + resolution: {integrity: sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-riscv64/0.15.9: resolution: {integrity: sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==} engines: {node: '>=12'} @@ -4489,6 +4628,15 @@ packages: dev: true optional: true + /esbuild-linux-s390x/0.15.10: + resolution: {integrity: sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-s390x/0.15.9: resolution: {integrity: sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==} engines: {node: '>=12'} @@ -4515,6 +4663,15 @@ packages: dev: true optional: true + /esbuild-netbsd-64/0.15.10: + resolution: {integrity: sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-netbsd-64/0.15.9: resolution: {integrity: sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==} engines: {node: '>=12'} @@ -4541,6 +4698,15 @@ packages: dev: true optional: true + /esbuild-openbsd-64/0.15.10: + resolution: {integrity: sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-openbsd-64/0.15.9: resolution: {integrity: sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==} engines: {node: '>=12'} @@ -4567,6 +4733,15 @@ packages: dev: true optional: true + /esbuild-sunos-64/0.15.10: + resolution: {integrity: sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /esbuild-sunos-64/0.15.9: resolution: {integrity: sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==} engines: {node: '>=12'} @@ -4593,6 +4768,15 @@ packages: dev: true optional: true + /esbuild-windows-32/0.15.10: + resolution: {integrity: sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-32/0.15.9: resolution: {integrity: sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==} engines: {node: '>=12'} @@ -4619,6 +4803,15 @@ packages: dev: true optional: true + /esbuild-windows-64/0.15.10: + resolution: {integrity: sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-64/0.15.9: resolution: {integrity: sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==} engines: {node: '>=12'} @@ -4645,6 +4838,15 @@ packages: dev: true optional: true + /esbuild-windows-arm64/0.15.10: + resolution: {integrity: sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-arm64/0.15.9: resolution: {integrity: sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==} engines: {node: '>=12'} @@ -4709,6 +4911,36 @@ packages: esbuild-windows-arm64: 0.14.50 dev: true + /esbuild/0.15.10: + resolution: {integrity: sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.15.10 + '@esbuild/linux-loong64': 0.15.10 + esbuild-android-64: 0.15.10 + esbuild-android-arm64: 0.15.10 + esbuild-darwin-64: 0.15.10 + esbuild-darwin-arm64: 0.15.10 + esbuild-freebsd-64: 0.15.10 + esbuild-freebsd-arm64: 0.15.10 + esbuild-linux-32: 0.15.10 + esbuild-linux-64: 0.15.10 + esbuild-linux-arm: 0.15.10 + esbuild-linux-arm64: 0.15.10 + esbuild-linux-mips64le: 0.15.10 + esbuild-linux-ppc64le: 0.15.10 + esbuild-linux-riscv64: 0.15.10 + esbuild-linux-s390x: 0.15.10 + esbuild-netbsd-64: 0.15.10 + esbuild-openbsd-64: 0.15.10 + esbuild-sunos-64: 0.15.10 + esbuild-windows-32: 0.15.10 + esbuild-windows-64: 0.15.10 + esbuild-windows-arm64: 0.15.10 + dev: true + /esbuild/0.15.9: resolution: {integrity: sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==} engines: {node: '>=12'} @@ -4768,7 +5000,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.3_sc2njczt72bj6aejru6rzi6gwa: + /eslint-module-utils/2.7.3_zgjfcdlr3zhegzdqses2t5vk6u: resolution: {integrity: sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==} engines: {node: '>=4'} peerDependencies: @@ -4786,7 +5018,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/parser': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -4794,18 +5026,18 @@ packages: - supports-color dev: true - /eslint-plugin-es/3.0.1_eslint@8.24.0: + /eslint-plugin-es/3.0.1_eslint@8.25.0: resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.24.0 + eslint: 8.25.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_gofx6msuqd4luqedfouzks2s4u: + /eslint-plugin-import/2.26.0_dzvnzej2un7roooznz6ef2if2q: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4815,14 +5047,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_4at4lsfnhb3djm6qjts2gmiglm + '@typescript-eslint/parser': 5.39.0_ajfq4rvgi3mh3ryl6fjvjvl74a array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.24.0 + eslint: 8.25.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.3_sc2njczt72bj6aejru6rzi6gwa + eslint-module-utils: 2.7.3_zgjfcdlr3zhegzdqses2t5vk6u has: 1.0.3 is-core-module: 2.9.0 is-glob: 4.0.3 @@ -4836,14 +5068,14 @@ packages: - supports-color dev: true - /eslint-plugin-node/11.1.0_eslint@8.24.0: + /eslint-plugin-node/11.1.0_eslint@8.25.0: resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.24.0 - eslint-plugin-es: 3.0.1_eslint@8.24.0 + eslint: 8.25.0 + eslint-plugin-es: 3.0.1_eslint@8.25.0 eslint-utils: 2.1.0 ignore: 5.2.0 minimatch: 3.1.2 @@ -4874,13 +5106,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.24.0: + /eslint-utils/3.0.0_eslint@8.25.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.24.0 + eslint: 8.25.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4899,14 +5131,13 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.24.0: - resolution: {integrity: sha512-dWFaPhGhTAiPcCgm3f6LI2MBWbogMnTJzFBbhXVRQDJPkr9pGZvVjlVfXd+vyDcWPA2Ic9L2AXPIQM0+vk/cSQ==} + /eslint/8.25.0: + resolution: {integrity: sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.2 + '@eslint/eslintrc': 1.3.3 '@humanwhocodes/config-array': 0.10.5 - '@humanwhocodes/gitignore-to-minimatch': 1.0.2 '@humanwhocodes/module-importer': 1.0.1 ajv: 6.12.6 chalk: 4.1.2 @@ -4915,7 +5146,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.24.0 + eslint-utils: 3.0.0_eslint@8.25.0 eslint-visitor-keys: 3.3.0 espree: 9.4.0 esquery: 1.4.0 @@ -5025,13 +5256,13 @@ packages: strip-final-newline: 3.0.0 dev: true - /express/4.18.1: - resolution: {integrity: sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==} + /express/4.18.2: + resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} engines: {node: '>= 0.10.0'} dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.0 + body-parser: 1.20.1 content-disposition: 0.5.4 content-type: 1.0.4 cookie: 0.5.0 @@ -5050,7 +5281,7 @@ packages: parseurl: 1.3.3 path-to-regexp: 0.1.7 proxy-addr: 2.0.7 - qs: 6.10.3 + qs: 6.11.0 range-parser: 1.2.1 safe-buffer: 5.2.1 send: 0.18.0 @@ -5228,7 +5459,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: true @@ -5354,8 +5585,8 @@ packages: resolution: {integrity: sha512-LRn8Jlk+DwZE4GTlDbT3Hikd1wSHgLMme/+7ddlqKd7ldwR6LjJgTVWzBnR01wnYGe4KgrXjg287RaI22UHmAw==} dev: true - /get-tsconfig/4.1.0: - resolution: {integrity: sha512-bhshxJhpfmeQ8x4fAvDqJV2VfGp5TfHdLpmBpNZZhMoVyfIrOippBW4mayC3DT9Sxuhcyl56Efw61qL28hG4EQ==} + /get-tsconfig/4.2.0: + resolution: {integrity: sha512-X8u8fREiYOE6S8hLbq99PeykTDoLVnxvF4DjWKJmz9xy2nNRdUcV8ZN9tniJFeKyTU3qnC9lL8n4Chd6LmVKHg==} dev: true /git-raw-commits/2.0.11: @@ -6240,19 +6471,12 @@ packages: dependencies: sourcemap-codec: 1.4.8 - /magic-string/0.26.5: - resolution: {integrity: sha512-yXUIYOOQnEHKHOftp5shMWpB9ImfgfDJpapa38j/qMtTj5QHWucvxP4lUtuRmHT9vAzvtpHkWKXW9xBwimXeNg==} + /magic-string/0.26.7: + resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} engines: {node: '>=12'} dependencies: sourcemap-codec: 1.4.8 - /magic-string/0.26.6: - resolution: {integrity: sha512-6d+3bFybzyQFJYSoRsl9ZC0wheze8M1LrQC7tNMRqXR4izUTDOLMd9BtSuExK9iAukFh+s5K0WAhc/dlQ+HKYA==} - engines: {node: '>=12'} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -6284,7 +6508,7 @@ packages: dev: true /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: true @@ -6311,7 +6535,7 @@ packages: dev: true /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: true /merge-stream/2.0.0: @@ -6500,7 +6724,7 @@ packages: dev: true /ms/2.0.0: - resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true /ms/2.1.2: @@ -6555,8 +6779,8 @@ packages: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true - /node-addon-api/3.2.1: - resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} + /node-addon-api/5.0.0: + resolution: {integrity: sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA==} dev: false /node-cron/2.0.3: @@ -6625,7 +6849,7 @@ packages: dependencies: hosted-git-info: 4.1.0 is-core-module: 2.9.0 - semver: 7.3.7 + semver: 7.3.8 validate-npm-package-license: 3.0.4 dev: true @@ -6716,7 +6940,7 @@ packages: dev: true /on-finished/2.3.0: - resolution: {integrity: sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=} + resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 @@ -6920,7 +7144,7 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} /path-to-regexp/0.1.7: - resolution: {integrity: sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=} + resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} dev: true /path-type/3.0.0: @@ -6991,8 +7215,8 @@ packages: dev: true optional: true - /pinia/2.0.22_vue@3.2.40: - resolution: {integrity: sha512-u+b8/BC+tmvo3ACbYO2w5NfxHWFOjvvw9DQnyT0dW8aUMCPRQT5QnfZ5R5W2MzZBMTeZRMQI7V/QFbafmM9QHw==} + /pinia/2.0.23_vue@3.2.40: + resolution: {integrity: sha512-N15hFf4o5STrxpNrib1IEb1GOArvPYf1zPvQVRGOO1G1d74Ak0J0lVyalX/SmrzdT4Q0nlEFjbURsmBmIGUR5Q==} peerDependencies: '@vue/composition-api': ^1.4.0 typescript: '>=4.4.4' @@ -7003,7 +7227,7 @@ packages: typescript: optional: true dependencies: - '@vue/devtools-api': 6.4.2 + '@vue/devtools-api': 6.4.4 vue: 3.2.40 vue-demi: 0.13.1_vue@3.2.40 dev: false @@ -7016,23 +7240,23 @@ packages: pathe: 0.3.8 dev: true - /playwright-chromium/1.26.1: - resolution: {integrity: sha512-F38TvJWkrP7aLJ99AeZFSad0FKjOjudhdBsFr91cJkO28sEEy2VEiUJtk3ezu3a55S9Ka/kMJ1gM1msM3hDkGA==} + /playwright-chromium/1.27.0: + resolution: {integrity: sha512-nd33WzI8U6cBVnNVBiv83K8SuaxFtm4EICDtd3Wd0pXMgsnmfzKIXBwmg1IOyBr4vtpH+Ho82iB/ME4doxW3hg==} engines: {node: '>=14'} hasBin: true requiresBuild: true dependencies: - playwright-core: 1.26.1 + playwright-core: 1.27.0 dev: true - /playwright-core/1.26.1: - resolution: {integrity: sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==} + /playwright-core/1.27.0: + resolution: {integrity: sha512-VBKaaFUVKDo3akW+o4DwbK1ZyXh46tcSwQKPK3lruh8IJd5feu55XVZx4vOkbb2uqrNdIF51sgsadYT533SdpA==} engines: {node: '>=14'} hasBin: true dev: true - /pnpm/7.13.0: - resolution: {integrity: sha512-n1oG3HAOIXuOpzQAMqaPTTKlP1lJBpj9p9EIom63WYiZmCl2GaTvrcDQ085MZRcb5buQxt5lYgfqXppkluB97A==} + /pnpm/7.13.3: + resolution: {integrity: sha512-6avqSfzfAr/9w1ZleaMI276ZuZUu88eOIe6v2mTCuwtSjUEqheboH1G4m7jgF+4arMUfnBrz371UAU+DCeCiSA==} engines: {node: '>=14.6'} hasBin: true dev: true @@ -7388,8 +7612,8 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} dev: true - /qs/6.10.3: - resolution: {integrity: sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==} + /qs/6.11.0: + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} engines: {node: '>=0.6'} dependencies: side-channel: 1.0.4 @@ -7447,26 +7671,26 @@ packages: engines: {node: '>=0.10.0'} dev: false - /react-router-dom/6.4.1_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-MY7NJCrGNVJtGp8ODMOBHu20UaIkmwD2V3YsAOUQoCXFk7Ppdwf55RdcGyrSj+ycSL9Uiwrb3gTLYSnzcRoXww==} + /react-router-dom/6.4.2_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-yM1kjoTkpfjgczPrcyWrp+OuQMyB1WleICiiGfstnQYo/S8hPEEnVjr/RdmlH6yKK4Tnj1UGXFSa7uwAtmDoLQ==} engines: {node: '>=14'} peerDependencies: react: '>=16.8' react-dom: '>=16.8' dependencies: - '@remix-run/router': 1.0.1 + '@remix-run/router': 1.0.2 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-router: 6.4.1_react@18.2.0 + react-router: 6.4.2_react@18.2.0 dev: false - /react-router/6.4.1_react@18.2.0: - resolution: {integrity: sha512-OJASKp5AykDWFewgWUim1vlLr7yfD4vO/h+bSgcP/ix8Md+LMHuAjovA74MQfsfhQJGGN1nHRhwS5qQQbbBt3A==} + /react-router/6.4.2_react@18.2.0: + resolution: {integrity: sha512-Rb0BAX9KHhVzT1OKhMvCDMw776aTYM0DtkxqUBP8dNBom3mPXlfNs76JNGK8wKJ1IZEY1+WGj+cvZxHVk/GiKw==} engines: {node: '>=14'} peerDependencies: react: '>=16.8' dependencies: - '@remix-run/router': 1.0.1 + '@remix-run/router': 1.0.2 react: 18.2.0 dev: false @@ -7668,7 +7892,7 @@ packages: rollup: ^2.55 typescript: ^4.1 dependencies: - magic-string: 0.26.6 + magic-string: 0.26.7 rollup: 2.79.1 typescript: 4.8.2 optionalDependencies: @@ -7702,7 +7926,7 @@ packages: commenting: 1.1.0 glob: 7.2.0 lodash: 4.17.21 - magic-string: 0.26.6 + magic-string: 0.26.7 mkdirp: 1.0.4 moment: 2.29.3 package-name-regex: 2.0.6 @@ -7793,8 +8017,8 @@ packages: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true - /semver/7.3.7: - resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} + /semver/7.3.8: + resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} hasBin: true dependencies: @@ -8052,7 +8276,7 @@ packages: dev: true /statuses/1.5.0: - resolution: {integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=} + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} dev: true @@ -8303,8 +8527,8 @@ packages: uuid: 3.4.0 dev: true - /terser/5.15.0: - resolution: {integrity: sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA==} + /terser/5.15.1: + resolution: {integrity: sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==} engines: {node: '>=10'} hasBin: true dependencies: @@ -8344,8 +8568,8 @@ packages: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} dev: false - /tinybench/2.1.5: - resolution: {integrity: sha512-ak+PZZEuH3mw6CCFOgf5S90YH0MARnZNhxjhjguAmoJimEMAJuNip/rJRd6/wyylHItomVpKTzZk9zrhTrQCoQ==} + /tinybench/2.3.0: + resolution: {integrity: sha512-zs1gMVBwyyG2QbVchYIbnabRhMOCGvrwZz/q+SV+LIMa9q5YDQZi2kkI6ZRqV2Bz7ba1uvrc7ieUoE4KWnGeKg==} dev: true /tinypool/0.3.0: @@ -8383,7 +8607,7 @@ packages: dev: true /tr46/0.0.3: - resolution: {integrity: sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=} + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false /tr46/2.1.0: @@ -8470,13 +8694,13 @@ packages: typescript: 4.6.4 dev: true - /tsx/3.9.0: - resolution: {integrity: sha512-ofxsE+qjqCYYq4UBt5khglvb+ESgxef1YpuNcdQI92kvcAT2tZVrnSK3g4bRXTUhLmKHcC5q8vIZA47os/stng==} + /tsx/3.10.1: + resolution: {integrity: sha512-Gh6xoW4xrdnLs6hYZydVHIQtrgmbZ/DbnJoLsYoI8MxhKAIyu8R7RyF0D5qg9UKi74Nmr4iSlijdz7Q43IGLyQ==} hasBin: true dependencies: - '@esbuild-kit/cjs-loader': 2.3.3 - '@esbuild-kit/core-utils': 2.1.0 - '@esbuild-kit/esm-loader': 2.4.2 + '@esbuild-kit/cjs-loader': 2.4.0 + '@esbuild-kit/core-utils': 3.0.0 + '@esbuild-kit/esm-loader': 2.5.0 optionalDependencies: fsevents: 2.3.2 dev: true @@ -8608,7 +8832,7 @@ packages: globby: 13.1.2 hookable: 5.3.0 jiti: 1.14.0 - magic-string: 0.26.6 + magic-string: 0.26.7 mkdirp: 1.0.4 mkdist: 0.3.13_typescript@4.8.2 mlly: 0.5.16 @@ -8638,7 +8862,7 @@ packages: dev: true /unpipe/1.0.0: - resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=} + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} dev: true @@ -8735,8 +8959,8 @@ packages: - react-dom dev: true - /vitest/0.23.4: - resolution: {integrity: sha512-iukBNWqQAv8EKDBUNntspLp9SfpaVFbmzmM0sNcnTxASQZMzRw3PsM6DMlsHiI+I6GeO5/sYDg3ecpC+SNFLrQ==} + /vitest/0.24.0: + resolution: {integrity: sha512-k5j3FPTor+MJx2x0pDW2gtVk+s9VC6nSHT3SoqOIk9Je5fFpPgict+Xy2eAVXUogvSixs45Ya1oZk+oK93BO0w==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -8764,7 +8988,7 @@ packages: debug: 4.3.4 local-pkg: 0.4.2 strip-literal: 0.4.2 - tinybench: 2.1.5 + tinybench: 2.3.0 tinypool: 0.3.0 tinyspy: 1.0.2 vite: link:packages/vite @@ -8842,7 +9066,7 @@ packages: dev: true /webidl-conversions/3.0.1: - resolution: {integrity: sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=} + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false /webidl-conversions/6.1.0: @@ -8851,7 +9075,7 @@ packages: dev: true /whatwg-url/5.0.0: - resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=} + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 From e2b4c8f2eb6c49a6ac3a7dacf355f4f11fc732dd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Oct 2022 10:51:13 +0200 Subject: [PATCH 235/311] chore(deps): update dependency @rollup/plugin-alias to v4 (#10394) Co-authored-by: sapphi-red --- packages/vite/package.json | 2 +- packages/vite/src/node/index.ts | 1 + packages/vite/src/types/alias.d.ts | 4 +++- pnpm-lock.yaml | 17 +++++++++++++++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/vite/package.json b/packages/vite/package.json index 2cd2346a2c5e4f..ca2601a40983b2 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -72,7 +72,7 @@ "@babel/parser": "^7.19.3", "@babel/types": "^7.19.3", "@jridgewell/trace-mapping": "^0.3.16", - "@rollup/plugin-alias": "^3.1.9", + "@rollup/plugin-alias": "^4.0.0", "@rollup/plugin-commonjs": "^22.0.2", "@rollup/plugin-dynamic-import-vars": "^1.4.4", "@rollup/plugin-json": "^4.1.0", diff --git a/packages/vite/src/node/index.ts b/packages/vite/src/node/index.ts index 0e246615bfa5f3..d8e97d5a6a382f 100644 --- a/packages/vite/src/node/index.ts +++ b/packages/vite/src/node/index.ts @@ -119,6 +119,7 @@ export type { // dep types export type { AliasOptions, + MapToFunction, ResolverFunction, ResolverObject, Alias diff --git a/packages/vite/src/types/alias.d.ts b/packages/vite/src/types/alias.d.ts index 3f4393586f1299..5752c25c04fc96 100644 --- a/packages/vite/src/types/alias.d.ts +++ b/packages/vite/src/types/alias.d.ts @@ -40,7 +40,9 @@ export interface Alias { customResolver?: ResolverFunction | ResolverObject | null } -export type ResolverFunction = PluginHooks['resolveId'] +export type MapToFunction = T extends Function ? T : never + +export type ResolverFunction = MapToFunction export interface ResolverObject { buildStart?: PluginHooks['buildStart'] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64c5d779f746da..000d30c1040610 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,7 +215,7 @@ importers: '@babel/parser': ^7.19.3 '@babel/types': ^7.19.3 '@jridgewell/trace-mapping': ^0.3.16 - '@rollup/plugin-alias': ^3.1.9 + '@rollup/plugin-alias': ^4.0.0 '@rollup/plugin-commonjs': ^22.0.2 '@rollup/plugin-dynamic-import-vars': ^1.4.4 '@rollup/plugin-json': ^4.1.0 @@ -282,7 +282,7 @@ importers: '@babel/parser': 7.19.3 '@babel/types': 7.19.3 '@jridgewell/trace-mapping': 0.3.16 - '@rollup/plugin-alias': 3.1.9_rollup@2.79.1 + '@rollup/plugin-alias': 4.0.0_rollup@2.79.1 '@rollup/plugin-commonjs': 22.0.2_rollup@2.79.1 '@rollup/plugin-dynamic-import-vars': 1.4.4_rollup@2.79.1 '@rollup/plugin-json': 4.1.0_rollup@2.79.1 @@ -2221,6 +2221,19 @@ packages: slash: 3.0.0 dev: true + /@rollup/plugin-alias/4.0.0_rollup@2.79.1: + resolution: {integrity: sha512-fGRWzM2F6wXnzAqn4Db8SdB/2Ree0u2XOQaaTy9mhqA35NmUzJXevMBUcpZywPF2MIUUAw+SKfWogKxFSPh+Qw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + rollup: 2.79.1 + slash: 4.0.0 + dev: true + /@rollup/plugin-commonjs/22.0.2_rollup@2.79.1: resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} engines: {node: '>= 12.0.0'} From 8eb0b0aa3e644f47f0b0b99a1bf19e675a79e4c4 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Mon, 10 Oct 2022 11:08:59 +0200 Subject: [PATCH 236/311] release: v3.2.0-beta.1 --- packages/vite/CHANGELOG.md | 13 +++++++++++++ packages/vite/package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index a867f57f4a5be9..c40bdf5961da51 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,16 @@ +## 3.2.0-beta.1 (2022-10-10) + +* chore: update magic-string (#10364) ([23c9259](https://github.com/vitejs/vite/commit/23c9259)), closes [#10364](https://github.com/vitejs/vite/issues/10364) +* chore(deps): update all non-major dependencies (#10393) ([f519423](https://github.com/vitejs/vite/commit/f519423)), closes [#10393](https://github.com/vitejs/vite/issues/10393) +* chore(deps): update dependency @rollup/plugin-alias to v4 (#10394) ([e2b4c8f](https://github.com/vitejs/vite/commit/e2b4c8f)), closes [#10394](https://github.com/vitejs/vite/issues/10394) +* feat(lib): cjs instead of umd as default format for multiple entries (#10315) ([07d3fbd](https://github.com/vitejs/vite/commit/07d3fbd)), closes [#10315](https://github.com/vitejs/vite/issues/10315) +* fix: make client type work with `moduleResolution=node16` (#10375) ([8c4df1f](https://github.com/vitejs/vite/commit/8c4df1f)), closes [#10375](https://github.com/vitejs/vite/issues/10375) +* fix(config): don't resolve by module field (#10347) ([cc1c829](https://github.com/vitejs/vite/commit/cc1c829)), closes [#10347](https://github.com/vitejs/vite/issues/10347) +* fix(html): handle attrs with prefix (fixes #10337) (#10381) ([7b4d6e8](https://github.com/vitejs/vite/commit/7b4d6e8)), closes [#10337](https://github.com/vitejs/vite/issues/10337) [#10381](https://github.com/vitejs/vite/issues/10381) +* fix(ssr): track var as function scope (#10388) ([87b48f9](https://github.com/vitejs/vite/commit/87b48f9)), closes [#10388](https://github.com/vitejs/vite/issues/10388) + + + ## 3.2.0-beta.0 (2022-10-05) * fix: add module types (#10299) ([0b89dd2](https://github.com/vitejs/vite/commit/0b89dd2)), closes [#10299](https://github.com/vitejs/vite/issues/10299) diff --git a/packages/vite/package.json b/packages/vite/package.json index ca2601a40983b2..6e5906ff658c45 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "3.2.0-beta.0", + "version": "3.2.0-beta.1", "type": "module", "license": "MIT", "author": "Evan You", From 3a87593d2e1614cf117c580859ab68c6e1db227f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 10 Oct 2022 19:44:19 +0900 Subject: [PATCH 237/311] chore: fix vue-ssr test warning (#10399) --- playground/ssr-vue/src/pages/Store.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/playground/ssr-vue/src/pages/Store.vue b/playground/ssr-vue/src/pages/Store.vue index 90bd95653b15ae..60a19217e55645 100644 --- a/playground/ssr-vue/src/pages/Store.vue +++ b/playground/ssr-vue/src/pages/Store.vue @@ -1,5 +1,5 @@ From 1a961d9bf737d56d3a6d130eb81c732e00c9f8fb Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 10 Oct 2022 21:56:08 +0800 Subject: [PATCH 238/311] fix(ssr): handle parallel hookNodeResolve (#10401) --- packages/vite/src/node/ssr/ssrModuleLoader.ts | 66 +++++++++++-------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts index 13b58541c64c1b..0e4e163570a575 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -226,6 +226,12 @@ async function instantiateModule( return Object.freeze(ssrModule) } +// `nodeImport` may run in parallel on multiple `ssrLoadModule` calls. +// We keep track of the current importing count so that the first import +// would `hookNodeResolve`, and the last import would `unhookNodeResolve`. +let importingCount = 0 +let unhookNodeResolve: ReturnType | undefined + // In node@12+ we can use dynamic import to load CJS and ESM async function nodeImport( id: string, @@ -250,34 +256,36 @@ async function nodeImport( return resolved.id } - // When an ESM module imports an ESM dependency, this hook is *not* used. - const unhookNodeResolve = hookNodeResolve( - (nodeResolve) => (id, parent, isMain, options) => { - // Use the Vite resolver only for bare imports while skipping - // any absolute paths, built-in modules and binary modules. - if ( - !bareImportRE.test(id) || - path.isAbsolute(id) || - isBuiltin(id) || - id.endsWith('.node') - ) { - return nodeResolve(id, parent, isMain, options) - } - if (parent) { - let resolved = viteResolve(id, parent.id) - if (resolved) { - // hookNodeResolve must use platform-specific path.normalize - // to be compatible with dynamicImport (#6080) - resolved = path.normalize(resolved) + if (importingCount === 0) { + // When an ESM module imports an ESM dependency, this hook is *not* used. + unhookNodeResolve = hookNodeResolve( + (nodeResolve) => (id, parent, isMain, options) => { + // Use the Vite resolver only for bare imports while skipping + // any absolute paths, built-in modules and binary modules. + if ( + !bareImportRE.test(id) || + path.isAbsolute(id) || + isBuiltin(id) || + id.endsWith('.node') + ) { + return nodeResolve(id, parent, isMain, options) } - return resolved + if (parent) { + let resolved = viteResolve(id, parent.id) + if (resolved) { + // hookNodeResolve must use platform-specific path.normalize + // to be compatible with dynamicImport (#6080) + resolved = path.normalize(resolved) + } + return resolved + } + // Importing a CJS module from an ESM module. In this case, the import + // specifier is already an absolute path, so this is a no-op. + // Options like `resolve.dedupe` and `mode` are not respected. + return id } - // Importing a CJS module from an ESM module. In this case, the import - // specifier is already an absolute path, so this is a no-op. - // Options like `resolve.dedupe` and `mode` are not respected. - return id - } - ) + ) + } let url: string if (id.startsWith('node:') || isBuiltin(id)) { @@ -299,10 +307,14 @@ async function nodeImport( } try { + importingCount++ const mod = await dynamicImport(url) return proxyESM(mod) } finally { - unhookNodeResolve() + importingCount-- + if (importingCount === 0) { + unhookNodeResolve?.() + } } } From d7ac96d97233c375f1bc115628a068dc38502aca Mon Sep 17 00:00:00 2001 From: Happydev <81974850+MoustaphaDev@users.noreply.github.com> Date: Tue, 11 Oct 2022 04:07:14 +0000 Subject: [PATCH 239/311] docs: add missing binding in asset import example (#10414) --- packages/plugin-vue/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-vue/README.md b/packages/plugin-vue/README.md index be02ab7ae4ab36..2718e7e3360e70 100644 --- a/packages/plugin-vue/README.md +++ b/packages/plugin-vue/README.md @@ -77,7 +77,7 @@ Is the same as: import _imports_0 from '../image.png' - + ``` By default the following tag/attribute combinations are transformed, and can be configured using the `template.transformAssetUrls` option. From f248e6510ba332256d4e87ffda589ab64c6ac3d4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 12 Oct 2022 09:40:06 +0800 Subject: [PATCH 240/311] docs: add fathom analytics --- docs/.vitepress/config.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 3578621b2a0331..678ca2790841d1 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -66,7 +66,16 @@ export default defineConfig({ ['meta', { property: 'og:description', content: ogDescription }], ['meta', { name: 'twitter:card', content: 'summary_large_image' }], ['meta', { name: 'twitter:site', content: '@vite_js' }], - ['meta', { name: 'theme-color', content: '#646cff' }] + ['meta', { name: 'theme-color', content: '#646cff' }], + [ + 'script', + { + src: 'https://cdn.usefathom.com/script.js', + 'data-site': 'CBDFBSLI', + 'data-spa': 'auto', + defer: '' + } + ] ], vue: { From ecba3f8baca042d015c9285b6cb07993c67235a9 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Wed, 12 Oct 2022 18:24:32 +0800 Subject: [PATCH 241/311] fix(config): skip resolve builtin modules (#10420) --- packages/vite/src/node/config.ts | 7 ++----- playground/cli-module/package.json | 3 +++ playground/cli-module/vite.config.js | 6 ++++++ pnpm-lock.yaml | 12 ++++++------ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 6faf7d2d863f03..dd0feee665ae34 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -25,6 +25,7 @@ import { createDebugger, createFilter, dynamicImport, + isBuiltin, isExternalUrl, isObject, lookupFile, @@ -984,7 +985,7 @@ async function bundleConfigFile( build.onResolve({ filter: /.*/ }, ({ path: id, importer, kind }) => { // externalize bare imports - if (id[0] !== '.' && !isAbsolute(id)) { + if (id[0] !== '.' && !path.isAbsolute(id) && !isBuiltin(id)) { let idFsPath = tryNodeResolve(id, importer, options, false)?.id if (idFsPath && (isESM || kind === 'dynamic-import')) { idFsPath = pathToFileURL(idFsPath).href @@ -1115,7 +1116,3 @@ export function isDepsOptimizerEnabled( (command === 'serve' && disabled === 'dev') ) } - -function isAbsolute(id: string) { - return path.isAbsolute(id) || path.posix.isAbsolute(id) -} diff --git a/playground/cli-module/package.json b/playground/cli-module/package.json index 0f297d4e4d0563..30a94d2bb877ad 100644 --- a/playground/cli-module/package.json +++ b/playground/cli-module/package.json @@ -8,5 +8,8 @@ "build": "vite build", "debug": "node --inspect-brk ../../packages/vite/bin/vite", "serve": "vite preview" + }, + "devDependencies": { + "url": "^0.11.0" } } diff --git a/playground/cli-module/vite.config.js b/playground/cli-module/vite.config.js index 9629e535d58e38..4020d4627917bb 100644 --- a/playground/cli-module/vite.config.js +++ b/playground/cli-module/vite.config.js @@ -1,5 +1,11 @@ +// eslint-disable-next-line import/no-nodejs-modules +import { URL } from 'url' import { defineConfig } from 'vite' +// make sure bundling works even if `url` refers to the locally installed +// `url` package instead of the built-in `url` nodejs module +globalThis.__test_url = URL + export default defineConfig({ server: { host: 'localhost' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 000d30c1040610..8c17bb951e931c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -386,7 +386,10 @@ importers: specifiers: {} playground/cli-module: - specifiers: {} + specifiers: + url: ^0.11.0 + devDependencies: + url: 0.11.0 playground/config/packages/entry: specifiers: {} @@ -7601,8 +7604,7 @@ packages: dev: true /punycode/1.3.2: - resolution: {integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=} - dev: false + resolution: {integrity: sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==} /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} @@ -7636,7 +7638,6 @@ packages: resolution: {integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=} engines: {node: '>=0.4.x'} deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. - dev: false /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -8907,11 +8908,10 @@ packages: dev: true /url/0.11.0: - resolution: {integrity: sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=} + resolution: {integrity: sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==} dependencies: punycode: 1.3.2 querystring: 0.2.0 - dev: false /utf8-byte-length/1.0.4: resolution: {integrity: sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==} From 325900601c4955d5a97459d4b80def1a724672f6 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 13 Oct 2022 00:35:44 -0700 Subject: [PATCH 242/311] fix: prefer exports when resolving (#10371) Co-authored-by: bluwy --- packages/vite/src/node/plugins/resolve.ts | 34 ++++++++++++++++--- packages/vite/src/node/ssr/ssrModuleLoader.ts | 2 +- playground/resolve/__tests__/resolve.spec.ts | 7 ++++ .../exports-legacy-fallback/dir/index.js | 1 + .../exports-legacy-fallback/dir/index.mjs | 1 + .../exports-legacy-fallback/dir/package.json | 4 +++ .../resolve/exports-legacy-fallback/index.js | 1 + .../exports-legacy-fallback/package.json | 12 +++++++ playground/resolve/index.html | 6 ++++ playground/resolve/package.json | 1 + pnpm-lock.yaml | 8 +++++ 11 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 playground/resolve/exports-legacy-fallback/dir/index.js create mode 100644 playground/resolve/exports-legacy-fallback/dir/index.mjs create mode 100644 playground/resolve/exports-legacy-fallback/dir/package.json create mode 100644 playground/resolve/exports-legacy-fallback/index.js create mode 100644 playground/resolve/exports-legacy-fallback/package.json diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index d3672e81c71fe4..1d7c86a301d2b1 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -648,13 +648,36 @@ export function tryNodeResolve( basedir = nestedResolveFrom(nestedRoot, basedir, preserveSymlinks) } + // nearest package.json + let nearestPkg: PackageData | undefined + // nearest package.json that may have the `exports` field let pkg: PackageData | undefined - const pkgId = possiblePkgIds.reverse().find((pkgId) => { - pkg = resolvePackageData(pkgId, basedir, preserveSymlinks, packageCache)! - return pkg + + let pkgId = possiblePkgIds.reverse().find((pkgId) => { + nearestPkg = resolvePackageData( + pkgId, + basedir, + preserveSymlinks, + packageCache + )! + return nearestPkg })! - if (!pkg) { + const rootPkgId = possiblePkgIds[0] + const rootPkg = resolvePackageData( + rootPkgId, + basedir, + preserveSymlinks, + packageCache + )! + if (rootPkg?.data?.exports) { + pkg = rootPkg + pkgId = rootPkgId + } else { + pkg = nearestPkg + } + + if (!pkg || !nearestPkg) { // if import can't be found, check if it's an optional peer dep. // if so, we can resolve to a special id that errors only when imported. if ( @@ -753,7 +776,8 @@ export function tryNodeResolve( } const ext = path.extname(resolved) - const isCJS = ext === '.cjs' || (ext === '.js' && pkg.data.type !== 'module') + const isCJS = + ext === '.cjs' || (ext === '.js' && nearestPkg.data.type !== 'module') if ( !options.ssrOptimizeCheck && diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts index 0e4e163570a575..b5b9c98b0336d0 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -126,7 +126,7 @@ async function instantiateModule( preserveSymlinks, isBuild: true, isProduction, - isRequire: true, + isRequire: false, root } diff --git a/playground/resolve/__tests__/resolve.spec.ts b/playground/resolve/__tests__/resolve.spec.ts index 6d7a9b6efb1907..8f910f4989bfaa 100644 --- a/playground/resolve/__tests__/resolve.spec.ts +++ b/playground/resolve/__tests__/resolve.spec.ts @@ -36,6 +36,13 @@ test('deep import with exports field + mapped dir', async () => { ) }) +// this is how Svelte 3 is packaged +test('deep import with exports and legacy fallback', async () => { + expect(await page.textContent('.exports-legacy-fallback')).toMatch( + '[success]' + ) +}) + test('Respect exports field env key priority', async () => { expect(await page.textContent('.exports-env')).toMatch('[success]') }) diff --git a/playground/resolve/exports-legacy-fallback/dir/index.js b/playground/resolve/exports-legacy-fallback/dir/index.js new file mode 100644 index 00000000000000..9c02b83a60f172 --- /dev/null +++ b/playground/resolve/exports-legacy-fallback/dir/index.js @@ -0,0 +1 @@ +export const msg = '[fail] mapped js file' diff --git a/playground/resolve/exports-legacy-fallback/dir/index.mjs b/playground/resolve/exports-legacy-fallback/dir/index.mjs new file mode 100644 index 00000000000000..fa498c78684744 --- /dev/null +++ b/playground/resolve/exports-legacy-fallback/dir/index.mjs @@ -0,0 +1 @@ +export const msg = '[success] mapped mjs file' diff --git a/playground/resolve/exports-legacy-fallback/dir/package.json b/playground/resolve/exports-legacy-fallback/dir/package.json new file mode 100644 index 00000000000000..4cf44a46cb30d2 --- /dev/null +++ b/playground/resolve/exports-legacy-fallback/dir/package.json @@ -0,0 +1,4 @@ +{ + "main": "index.js", + "module": "index.mjs" +} diff --git a/playground/resolve/exports-legacy-fallback/index.js b/playground/resolve/exports-legacy-fallback/index.js new file mode 100644 index 00000000000000..03677be8580ef6 --- /dev/null +++ b/playground/resolve/exports-legacy-fallback/index.js @@ -0,0 +1 @@ +export default 5 diff --git a/playground/resolve/exports-legacy-fallback/package.json b/playground/resolve/exports-legacy-fallback/package.json new file mode 100644 index 00000000000000..9934531a2d45ae --- /dev/null +++ b/playground/resolve/exports-legacy-fallback/package.json @@ -0,0 +1,12 @@ +{ + "name": "resolve-exports-legacy-fallback", + "private": true, + "version": "1.0.0", + "exports": { + "./dir": { + "import": "./dir/index.mjs", + "require": "./dir/index.js" + }, + ".": "index.js" + } +} diff --git a/playground/resolve/index.html b/playground/resolve/index.html index c744d4b9317463..6150dc86dbb1ef 100644 --- a/playground/resolve/index.html +++ b/playground/resolve/index.html @@ -24,6 +24,9 @@

Deep import with exports field + mapped directory

Exports field env priority

fail

+

Exports with legacy fallback

+

fail

+

Resolve /index.*

fail

@@ -163,6 +166,9 @@

resolve package that contains # in path

import { msg as exportsEnvMsg } from 'resolve-exports-env' text('.exports-env', exportsEnvMsg) + import { msg as exportsLegacyFallbackMsg } from 'resolve-exports-legacy-fallback/dir' + text('.exports-legacy-fallback', exportsLegacyFallbackMsg) + // implicit index resolving import { foo } from './util' text('.index', foo()) diff --git a/playground/resolve/package.json b/playground/resolve/package.json index 760fba0c02f5a0..a7f4966360d19c 100644 --- a/playground/resolve/package.json +++ b/playground/resolve/package.json @@ -20,6 +20,7 @@ "resolve-custom-condition": "link:./custom-condition", "resolve-custom-main-field": "link:./custom-main-field", "resolve-exports-env": "link:./exports-env", + "resolve-exports-legacy-fallback": "link:./exports-legacy-fallback", "resolve-exports-path": "link:./exports-path", "resolve-linked": "workspace:*" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c17bb951e931c..713af3da8d2bb1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -896,6 +896,7 @@ importers: resolve-custom-condition: link:./custom-condition resolve-custom-main-field: link:./custom-main-field resolve-exports-env: link:./exports-env + resolve-exports-legacy-fallback: link:./exports-legacy-fallback resolve-exports-path: link:./exports-path resolve-linked: workspace:* dependencies: @@ -910,6 +911,7 @@ importers: resolve-custom-condition: link:custom-condition resolve-custom-main-field: link:custom-main-field resolve-exports-env: link:exports-env + resolve-exports-legacy-fallback: link:exports-legacy-fallback resolve-exports-path: link:exports-path resolve-linked: link:../resolve-linked @@ -940,6 +942,12 @@ importers: playground/resolve/exports-env: specifiers: {} + playground/resolve/exports-legacy-fallback: + specifiers: {} + + playground/resolve/exports-legacy-fallback/dir: + specifiers: {} + playground/resolve/exports-path: specifiers: {} From c4489ea193f4d2f703882cb03490980aa5174040 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Thu, 13 Oct 2022 15:37:09 +0800 Subject: [PATCH 243/311] fix(config): partial deno support (#10446) --- packages/vite/src/node/config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index dd0feee665ae34..9467cad2c1f7df 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -986,6 +986,10 @@ async function bundleConfigFile( build.onResolve({ filter: /.*/ }, ({ path: id, importer, kind }) => { // externalize bare imports if (id[0] !== '.' && !path.isAbsolute(id) && !isBuiltin(id)) { + // partial deno support as `npm:` does not work in `tryNodeResolve` + if (id.startsWith('npm:')) { + return { external: true } + } let idFsPath = tryNodeResolve(id, importer, options, false)?.id if (idFsPath && (isESM || kind === 'dynamic-import')) { idFsPath = pathToFileURL(idFsPath).href From a9f9d31ad63c77bb1a3b20d60530cb5295ab3702 Mon Sep 17 00:00:00 2001 From: Li Zhequ Date: Fri, 14 Oct 2022 05:18:22 +0800 Subject: [PATCH 244/311] fix(plugin-vue): enable ts in template when using tsx in dev mode (#10180) --- packages/plugin-vue/src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index 5d76256f75c2c2..64ad9346d8c783 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -213,9 +213,11 @@ export async function transformMain( // handle TS transpilation let resolvedCode = output.join('\n') + const lang = descriptor.scriptSetup?.lang || descriptor.script?.lang + if ( - (descriptor.script?.lang === 'ts' || - descriptor.scriptSetup?.lang === 'ts') && + lang && + /tsx?$/.test(lang) && !descriptor.script?.src // only normal script can have src ) { const { code, map } = await transformWithEsbuild( From 832801153ef54859127cef95ae48fc75a4d31c76 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Fri, 14 Oct 2022 17:02:34 +0800 Subject: [PATCH 245/311] feat(server): invalidate module with hmr (#10333) --- docs/guide/api-javascript.md | 5 +++ packages/vite/src/node/server/index.ts | 11 +++++++ playground/hmr/__tests__/hmr.spec.ts | 14 +++++++- playground/hmr/hmr.ts | 7 ++++ playground/hmr/index.html | 2 ++ playground/hmr/vite.config.ts | 44 ++++++++++++++++++-------- 6 files changed, 69 insertions(+), 14 deletions(-) diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md index 55c1510898cbdb..199507bc85b29e 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -119,6 +119,11 @@ interface ViteDevServer { * Fix ssr error stacktrace. */ ssrFixStacktrace(e: Error): void + /** + * Triggers HMR for a module in the module graph. You can use the `server.moduleGraph` + * API to retrieve the module to be reloaded. If `hmr` is false, this is a no-op. + */ + reloadModule(module: ModuleNode): Promise /** * Start the server. */ diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index e919302e1d0412..5e8296e5ad3aad 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -65,6 +65,7 @@ import { serveStaticMiddleware } from './middlewares/static' import { timeMiddleware } from './middlewares/time' +import type { ModuleNode } from './moduleGraph' import { ModuleGraph } from './moduleGraph' import { errorMiddleware, prepareError } from './middlewares/error' import type { HmrOptions } from './hmr' @@ -245,6 +246,11 @@ export interface ViteDevServer { * Mutates the given SSR error by rewriting the stacktrace */ ssrFixStacktrace(e: Error): void + /** + * Triggers HMR for a module in the module graph. You can use the `server.moduleGraph` + * API to retrieve the module to be reloaded. If `hmr` is false, this is a no-op. + */ + reloadModule(module: ModuleNode): Promise /** * Start the server. */ @@ -382,6 +388,11 @@ export async function createServer( ssrRewriteStacktrace(stack: string) { return ssrRewriteStacktrace(stack, moduleGraph) }, + async reloadModule(module) { + if (serverConfig.hmr !== false && module.file) { + updateModules(module.file, [module], Date.now(), server) + } + }, async listen(port?: number, isRestart?: boolean) { await startServer(server, port, isRestart) if (httpServer) { diff --git a/playground/hmr/__tests__/hmr.spec.ts b/playground/hmr/__tests__/hmr.spec.ts index 70d5a1b9ace52e..143adea310f0d1 100644 --- a/playground/hmr/__tests__/hmr.spec.ts +++ b/playground/hmr/__tests__/hmr.spec.ts @@ -651,11 +651,23 @@ if (!isBuild) { test('handle virtual module updates', async () => { await page.goto(viteTestUrl) const el = await page.$('.virtual') - expect(await el.textContent()).toBe('[success]') + expect(await el.textContent()).toBe('[success]0') editFile('importedVirtual.js', (code) => code.replace('[success]', '[wow]')) await untilUpdated(async () => { const el = await page.$('.virtual') return await el.textContent() }, '[wow]') }) + + test('invalidate virtual module', async () => { + await page.goto(viteTestUrl) + const el = await page.$('.virtual') + expect(await el.textContent()).toBe('[wow]0') + const btn = await page.$('.virtual-update') + btn.click() + await untilUpdated(async () => { + const el = await page.$('.virtual') + return await el.textContent() + }, '[wow]1') + }) } diff --git a/playground/hmr/hmr.ts b/playground/hmr/hmr.ts index 473dff9fdbfb88..4af73ee48489f0 100644 --- a/playground/hmr/hmr.ts +++ b/playground/hmr/hmr.ts @@ -10,6 +10,13 @@ text('.dep', depFoo) text('.nested', nestedFoo) text('.virtual', virtual) +const btn = document.querySelector('.virtual-update') as HTMLButtonElement +btn.onclick = () => { + if (import.meta.hot) { + import.meta.hot.send('virtual:increment') + } +} + if (import.meta.hot) { import.meta.hot.accept(({ foo }) => { console.log('(self-accepting 1) foo is now:', foo) diff --git a/playground/hmr/index.html b/playground/hmr/index.html index b8d6065a9fd5e2..3ddd29be711a67 100644 --- a/playground/hmr/index.html +++ b/playground/hmr/index.html @@ -5,6 +5,8 @@ href="./global.css?param=required" />
+ +