diff --git a/.eslintrc.js b/.eslintrc.js index f81c19f74cc7f3..64ccc552427a80 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,7 +12,7 @@ module.exports = { 'error', { allowModules: ['types', 'estree', 'testUtils'], - tryExtensions: ['.ts', '.js'] + tryExtensions: ['.ts', '.js', '.jsx', '.tsx'] } ], 'node/no-missing-require': [ @@ -20,7 +20,7 @@ module.exports = { { // for try-catching yarn pnp allowModules: ['pnpapi'], - tryExtensions: ['.ts', '.js'] + tryExtensions: ['.ts', '.js', '.jsx', '.tsx'] } ], 'node/no-restricted-require': [ @@ -38,7 +38,7 @@ module.exports = { 'node/no-extraneous-import': [ 'error', { - allowModules: ['vite'] + allowModules: ['vite', 'less', 'sass'] } ], 'node/no-extraneous-require': [ diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000000..c504c325f08040 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Discord Chat + url: https://chat.vitejs.dev + about: Ask questions and discuss with other Vite users in real time. + - name: Questions & Discussions + url: https://github.com/vitejs/vite/discussions + about: Use GitHub discussions for message-board style questions and discussions. diff --git a/.github/commit-convention.md b/.github/commit-convention.md index 609bbe632e004b..c66c7b9676ab3a 100644 --- a/.github/commit-convention.md +++ b/.github/commit-convention.md @@ -7,7 +7,7 @@ Messages must be matched by the following regex: ``` js -/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip): .{1,50}/ +/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/ ``` #### Examples diff --git a/.github/contributing.md b/.github/contributing.md index 6caa68f03288ac..09767a1890dc44 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -1,6 +1,48 @@ # Vite Contributing Guide -Hi! We are really excited that you are interested in contributing to Vite. Before submitting your contribution, please make sure to take a moment and read through the following guidelines: +Hi! We are really excited that you are interested in contributing to Vite. Before submitting your contribution, please make sure to take a moment and read through the following guide: + +## Repo Setup + +The Vite repo is a monorepo using Yarn workspaces. The package manager used to install and link dependencies must be [Yarn v1](https://classic.yarnpkg.com/). + +To development and test the core `vite` package: + +1. Go to `packages/vite` and run `yarn dev`. This starts `tsc` in watch mode. + +2. Run `yarn link` in `packages/vite`. This links `vite` globally so that you can: + + - Run `yarn link vite` in another Vite project to use the locally built Vite; + - Use the `vite` binary anywhere. + +## Running Tests + +Each package under `packages/playground/` contains a `__tests__` directory. The tests are run using [Jest](https://jestjs.io/) + [Playwright](https://playwright.dev/) with custom integrations to make writing tests simple. The detailed setup is inside `jest.config.js` and `scripts/jest*` files. + +Each test can be run under either dev server mode or build mode. + +- `yarn test` by default runs every test in both serve and build mode. + +- `yarn test-serve` runs tests only under serve mode. + +- `yarn test-build` runs tests only under build mode. + +- You can also use `yarn test-serve [match]` or `yarn test-build [match]` to run tests in a specific playground package, e.g. `yarn test-serve css` will run tests for both `playground/css` and `playground/css-codesplit` under serve mode. + + Note package matching is not aviable for the `yarn test` script, which always runs all tests. + +### Test Env and Helpers + +Inside playground tests, a global `page` object is automatically available, which is a Playwright [`Page`](https://playwright.dev/docs/api/class-page) instance that has already navigated to the served page of the current playground. So writing a test is as simple as: + +```js +test('should work', async () => { + expect(await page.textContent('.foo')).toMatch('foo') +}) +``` + +Some common test helpers, e.g. `testDir`, `isBuild` or `editFile` are available in `packages/playground/testUtils.ts`. + ## Pull Request Guidelines - Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch. diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index ff84a7e48a0b56..00000000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,1646 +0,0 @@ -# [1.0.0-rc.13](https://github.com/vitejs/vite/compare/v1.0.0-rc.12...v1.0.0-rc.13) (2020-11-25) - - - -# [1.0.0-rc.11](https://github.com/vitejs/vite/compare/v1.0.0-rc.10...v1.0.0-rc.11) (2020-11-25) - - -### Bug Fixes - -* move https-proxy types to dependencies ([2753658](https://github.com/vitejs/vite/commit/275365862a1a94976686d5d5f8f1775f8a724b6d)) - - - -# [1.0.0-rc.10](https://github.com/vitejs/vite/compare/v1.0.0-rc.9...v1.0.0-rc.10) (2020-11-25) - - -### Bug Fixes - -* multiple builds share esbuild process ([#1125](https://github.com/vitejs/vite/issues/1125)) ([f270440](https://github.com/vitejs/vite/commit/f27044054e7a7a28239a7fcdb601913f0aacd5ac)), closes [#1098](https://github.com/vitejs/vite/issues/1098) -* **build:** always pass `namespaceToStringTag`, let output module has… ([#1057](https://github.com/vitejs/vite/issues/1057)) ([8cd3e85](https://github.com/vitejs/vite/commit/8cd3e85871bd25992c6c8113a61b3df3a6a98f52)), closes [#1048](https://github.com/vitejs/vite/issues/1048) -* **cli:** specify correct arguments to options ([6b98b73](https://github.com/vitejs/vite/commit/6b98b7392af7761def2011aff83116efb5ab8a82)) -* **config:** avoid overwriting defined .env values ([f0e50bd](https://github.com/vitejs/vite/commit/f0e50bd7ff708f56669a9b46aaff913b3526f58c)) -* **config:** move `dotenvExpand` back into `resolveConfig` ([dd03c62](https://github.com/vitejs/vite/commit/dd03c6255f0ac62b72daa523ed8ba6a4f09a4be2)) -* **dev:** chokidar `ignored` ([ce332d1](https://github.com/vitejs/vite/commit/ce332d1415ce50760ed993c7a65042888c25c5cd)), closes [#1132](https://github.com/vitejs/vite/issues/1132) -* **dev:** respect `[@vite-ignore](https://github.com/vite-ignore)` inside module rewrite ([#1011](https://github.com/vitejs/vite/issues/1011)) ([6fbae67](https://github.com/vitejs/vite/commit/6fbae678683d3be358b7270497fd9cbd03c39e9a)), closes [#1007](https://github.com/vitejs/vite/issues/1007) -* **dev:** respect sourceRoot when rewriting source map ([#1073](https://github.com/vitejs/vite/issues/1073)) ([b4afcf1](https://github.com/vitejs/vite/commit/b4afcf1507cf313beb9ecca245be9e6ceb2b126c)) -* **dev:** transform import for commonjs dependencies ([#837](https://github.com/vitejs/vite/issues/837)) ([51aead4](https://github.com/vitejs/vite/commit/51aead44ffb22c7d0c29a489f67b7eb7b9bba4f1)) -* **docs:** README es-dev-server broken link ([#1081](https://github.com/vitejs/vite/issues/1081)) ([0d2768d](https://github.com/vitejs/vite/commit/0d2768d9e53be8c685fb69416ab9dd7df63207cc)) -* `env` key in `UserConfig` should not be required ([#1097](https://github.com/vitejs/vite/issues/1097)) ([f33e89d](https://github.com/vitejs/vite/commit/f33e89db2c944933b52524eff0263cc9546aa0dd)) -* always set NODE_ENV for build ([effc159](https://github.com/vitejs/vite/commit/effc159822c08178825fcdfa99f9c8e672ba653c)) -* cac argv keys are in camel case ([#1092](https://github.com/vitejs/vite/issues/1092)) ([8520e76](https://github.com/vitejs/vite/commit/8520e76cdc15654f0c197cf63539428875aff2c7)) -* indexHtmlPath can be an absolute path ([#1032](https://github.com/vitejs/vite/issues/1032)) ([bc1a8ee](https://github.com/vitejs/vite/commit/bc1a8eeef725de57d0e74d7eb43803f3ea929ac8)) -* target ES2018 instead of ESNEXT ([#1110](https://github.com/vitejs/vite/issues/1110)) ([ce633f4](https://github.com/vitejs/vite/commit/ce633f48602f0e1c6c0d922d03477bdc4143aef0)) -* **types:** buildPluginHtml does not need `config.env` to exist ([#1091](https://github.com/vitejs/vite/issues/1091)) ([29f20e5](https://github.com/vitejs/vite/commit/29f20e50d10c8d1f8be59d249f6cb3538c24a5b5)) -* indentation for injected html tags ([#1068](https://github.com/vitejs/vite/issues/1068)) ([ac5ee6f](https://github.com/vitejs/vite/commit/ac5ee6f5e7024aa69c6e07149885f0b6e00a4f38)) -* only pass valid rollup options to avoid warning ([#1034](https://github.com/vitejs/vite/issues/1034)) ([128d5ff](https://github.com/vitejs/vite/commit/128d5ff7bbb113bcf05bf595201e7dfdec1a147a)) -* **types:** ws should be optional ([#1010](https://github.com/vitejs/vite/issues/1010)) ([5b16cf9](https://github.com/vitejs/vite/commit/5b16cf9f5c627327e53e89c49defe853d358b383)) - - -### Features - -* support new versions of experimental features in `@vue/compiler-sfc` ([#1121](https://github.com/vitejs/vite/issues/1121)) ([a928d74](https://github.com/vitejs/vite/commit/a928d74ae4be9e054bfdab35f2a85a774e81ecb0)) -* **build:** make `rollupOutputOptions` and `rollupPluginVueOptions` overridable ([#1117](https://github.com/vitejs/vite/issues/1117)) ([39bdd45](https://github.com/vitejs/vite/commit/39bdd45290a6fdab31aa8b02caa7d8465d12633c)) -* expose `loadEnv` in public api ([f3e4017](https://github.com/vitejs/vite/commit/f3e4017b96b2839d349e34b249966a3f6be11315)) -* use cac for argv parsing and cli help ([#971](https://github.com/vitejs/vite/issues/971)) ([88bb4ff](https://github.com/vitejs/vite/commit/88bb4ff7d7b70d5668c889188cd95a61d2dc3c1e)) -* **types:** include http-proxy options in ProxiesOptions type ([#1037](https://github.com/vitejs/vite/issues/1037)) ([261c8c8](https://github.com/vitejs/vite/commit/261c8c82f689a7a004670bca06097263e6983a1d)) - - -### Performance Improvements - -* remove empty chunk from css extraction ([963614b](https://github.com/vitejs/vite/commit/963614bff7039207c0b2d9e8c2c5780b74ee176a)) - - - -# [1.0.0-rc.9](https://github.com/vitejs/vite/compare/v1.0.0-rc.8...v1.0.0-rc.9) (2020-11-02) - - -### Bug Fixes - -* **dev:** remove comment for dynamic import inside server rewrite ([#1001](https://github.com/vitejs/vite/issues/1001)) ([4ccff7a](https://github.com/vitejs/vite/commit/4ccff7a109c4c339d3a688bc5d091defe274e927)), closes [#998](https://github.com/vitejs/vite/issues/998) -* **hmr:** infer hmr hostname on client ([#980](https://github.com/vitejs/vite/issues/980)) ([858b2bf](https://github.com/vitejs/vite/commit/858b2bfe530495afcc0540c710e7edafd0e06d03)) -* always emit assets virtually + ensure correct asset paths in ssrBuild ([b8e80ba](https://github.com/vitejs/vite/commit/b8e80ba7142dbddd7dd7f37ca74037bc9dd193f2)) -* **build:** add `write` condition ([e5fdc7e](https://github.com/vitejs/vite/commit/e5fdc7e35e3b009a1ef45c97ae9744f8669105ad)) -* **build:** always render the index.html ([5e7c309](https://github.com/vitejs/vite/commit/5e7c309baa16b78fbfdfbf3fffff7af775c26047)) -* **build:** remove `outDir` before build ([d1599f9](https://github.com/vitejs/vite/commit/d1599f94fb6c0fc7fdeb67ae54ad18407ce16a10)) -* **build:** resolve rollup warning when using pluginsPreBuild ([40e1d87](https://github.com/vitejs/vite/commit/40e1d8721631031fd1c05a6a793e36dd85506e4f)) -* **dev:** always proxy http request even `ws` option is truly ([32be77b](https://github.com/vitejs/vite/commit/32be77bce0257967c4234b822fecd6dbd8571931)), closes [#978](https://github.com/vitejs/vite/issues/978) - - -### Features - -* allow suppressing dynamic import warning with [@vite-ignore](https://github.com/vite-ignore) ([7ac483c](https://github.com/vitejs/vite/commit/7ac483ceacdbedb99cbcffbfc4d70ae7451dc018)) -* **build:** add "vite:emit" output plugin ([#977](https://github.com/vitejs/vite/issues/977)) ([9c2d435](https://github.com/vitejs/vite/commit/9c2d43530406c73d350efba804af8a8ea7718ae7)) -* **types:** add `ImportMetaEnv` global type ([03acecd](https://github.com/vitejs/vite/commit/03acecd797d8393e38c8a78f920c8e0927762018)) - - - -# [1.0.0-rc.8](https://github.com/vitejs/vite/compare/v1.0.0-rc.7...v1.0.0-rc.8) (2020-10-26) - - - -# [1.0.0-rc.7](https://github.com/vitejs/vite/compare/v1.0.0-rc.6...v1.0.0-rc.7) (2020-10-26) - - -### Bug Fixes - -* **build:** add `Symbol.toStringTag` when ssr build es module into cjs chunk ([#951](https://github.com/vitejs/vite/issues/951)) ([344a86a](https://github.com/vitejs/vite/commit/344a86a7f02727eaf34bef2eacef48099ffc686a)), closes [#764](https://github.com/vitejs/vite/issues/764) -* **dev:** resolve sub-package inside node module, let `module` filed inside `package.json` can be take first. ([76fcfa7](https://github.com/vitejs/vite/commit/76fcfa71e9fe8ee69f0bbb35cdfeeede6fe3bfe0)), closes [#829](https://github.com/vitejs/vite/issues/829) -* **hmr:** register component on import ([95e3342](https://github.com/vitejs/vite/commit/95e334296b2883b1deae5983042b089efe946f98)), closes [#959](https://github.com/vitejs/vite/issues/959) -* **hmr:** sniff hmr protocol on client when not specifically configured ([e1c7500](https://github.com/vitejs/vite/commit/e1c75003644868afaaaedd939eae5972f7ef40de)), closes [#956](https://github.com/vitejs/vite/issues/956) -* **html:** avoid mutating outer scope in `renderIndex` function ([f2da029](https://github.com/vitejs/vite/commit/f2da0293e7738bb6e579c934c3c1c35fcddc5b5d)) -* always resolve `outDir` relative to `root` ([f5dee86](https://github.com/vitejs/vite/commit/f5dee8611194cb81dcdd44787c83777c92fddefc)) -* update rollup-pluginutils import ([#954](https://github.com/vitejs/vite/issues/954)) ([dcf1eaa](https://github.com/vitejs/vite/commit/dcf1eaa74ad53d63af5605f1be1224c019c7533d)) - - -### Features - -* add `configureBuild` hook ([1c2a9b9](https://github.com/vitejs/vite/commit/1c2a9b981c70ead236b4d91460ed23e3f619f41c)) -* let `configureBuild` hooks inject Rollup bundles ([03ef2ed](https://github.com/vitejs/vite/commit/03ef2ed00e4e1f519ce5aabf36700b2ac404f99d)) -* let build plugins return post-build hook ([ec47ab8](https://github.com/vitejs/vite/commit/ec47ab82f8127bbc174200267a93d1c8918c0ba2)) -* transforms for index.html ([#793](https://github.com/vitejs/vite/issues/793)) ([ebb964e](https://github.com/vitejs/vite/commit/ebb964e58568b818160ae8b2aa3168197d16720d)) -* **build:** emitManifest ([75d7679](https://github.com/vitejs/vite/commit/75d7679a8348f2df2cda21f805dc6df562fdb996)) -* **build:** support alternative entry for build ([6c66e31](https://github.com/vitejs/vite/commit/6c66e316c33105a894eff33343f0527139b06bd9)) -* **config:** add pluginsPreBuild, etc. for rollup ([#953](https://github.com/vitejs/vite/issues/953)) ([cd3666a](https://github.com/vitejs/vite/commit/cd3666ac6175344d7c0d88450ffdb824794e1e58)) -* **dev:** support configuring CORS ([f416f9f](https://github.com/vitejs/vite/commit/f416f9f32e80e7e6be508391053d155a3a5189d4)) - - -### Reverts - -* Revert "refactor: resolve relative path request inside unoptimized package wh… (#867)" ([ec8f46d](https://github.com/vitejs/vite/commit/ec8f46dd09ac3b2b7e6ffc709227af09addaef59)), closes [#867](https://github.com/vitejs/vite/issues/867) - - - -# [1.0.0-rc.6](https://github.com/vitejs/vite/compare/v1.0.0-rc.5...v1.0.0-rc.6) (2020-10-23) - - -### Bug Fixes - -* apply user rollup plugins last ([#855](https://github.com/vitejs/vite/issues/855)) ([1760658](https://github.com/vitejs/vite/commit/1760658de19e9df6ab67677993fc4defb329354a)) -* ensure source maps can be traced by debugger ([#886](https://github.com/vitejs/vite/issues/886)) ([ba7442f](https://github.com/vitejs/vite/commit/ba7442fffd1f4787bd542f09dae93bc3197e33f9)), closes [#675](https://github.com/vitejs/vite/issues/675) -* **build:** do not merge non-module inline scripts into bundle ([edf0886](https://github.com/vitejs/vite/commit/edf088686794869d3fa92c9cb4a6a15b04187d06)), closes [#719](https://github.com/vitejs/vite/issues/719) -* **build:** relative `sources` in production bundle sourcemap ([#934](https://github.com/vitejs/vite/issues/934)) ([8264fa8](https://github.com/vitejs/vite/commit/8264fa85904ef8f89065d76fc10b488a636306bf)) -* **config:** do not throw when user speicifies type: "module" in package.json ([8acd49e](https://github.com/vitejs/vite/commit/8acd49ee931e315b9b506e816972beb7e4786b59)), closes [#917](https://github.com/vitejs/vite/issues/917) -* **dev:** remove unnecessary warning ([#722](https://github.com/vitejs/vite/issues/722)) ([a2c4b24](https://github.com/vitejs/vite/commit/a2c4b24d4034242e6cf24a84fcc2cad94ae7aff4)), closes [#721](https://github.com/vitejs/vite/issues/721) -* **optimizer:** ignore `@types/*` packages inside optimizer ([#812](https://github.com/vitejs/vite/issues/812)) ([aa81eb3](https://github.com/vitejs/vite/commit/aa81eb34c19f55d6617de25a5aa9ad7adbe2eb8c)), closes [#804](https://github.com/vitejs/vite/issues/804) -* **optimizer:** remove `?commonjs-proxy` injected by `rollup-plugin-commonjs` for assets ([#908](https://github.com/vitejs/vite/issues/908)) ([e3e7059](https://github.com/vitejs/vite/commit/e3e7059e9403138c63198f2269056e0db1139d0e)), closes [#903](https://github.com/vitejs/vite/issues/903) -* **server:** only rewrite module script tags ([c18f387](https://github.com/vitejs/vite/commit/c18f3872a48cbcd493a83ee97c1441a92ac40e77)) -* **server:** read server port only after listening ([#943](https://github.com/vitejs/vite/issues/943)) ([eb039f9](https://github.com/vitejs/vite/commit/eb039f9821d96f7d3ec3ed839ba65a0fdcb8ceeb)) - - -### Features - -* Configurable asset inclusion ([#811](https://github.com/vitejs/vite/issues/811)) ([8378f1a](https://github.com/vitejs/vite/commit/8378f1a736eafa5d3eda856aaac0406ef430a9ae)), closes [#810](https://github.com/vitejs/vite/issues/810) -* inject module scripts into head instead of body ([#882](https://github.com/vitejs/vite/issues/882)) ([28678a9](https://github.com/vitejs/vite/commit/28678a96055839a7b3c6320fd486ae04f58d4dc3)), closes [#881](https://github.com/vitejs/vite/issues/881) -* let user config be a function ([#836](https://github.com/vitejs/vite/issues/836)) ([e06b73e](https://github.com/vitejs/vite/commit/e06b73e98c16decb79801293cb63076dc7bd4eee)) -* **hmr:** handle hmr when editing tailwind config ([#408](https://github.com/vitejs/vite/issues/408)) ([1d33ef3](https://github.com/vitejs/vite/commit/1d33ef38596c46a2e9ac96debb59c665e83614eb)) - - - -# [1.0.0-rc.5](https://github.com/vitejs/vite/compare/v1.0.0-rc.4...v1.0.0-rc.5) (2020-10-23) - - -### Bug Fixes - -* **build:** adjust allowed script tag types ([8b8f357](https://github.com/vitejs/vite/commit/8b8f3571558831c24a7b9b671dc8a1de427df51e)), closes [#724](https://github.com/vitejs/vite/issues/724) -* **build:** correct replace `define` ([e24133e](https://github.com/vitejs/vite/commit/e24133e51cb9d2fc4a338a6efd44a455978e5020)) -* **build:** create at most one `esbuildService` ([#694](https://github.com/vitejs/vite/issues/694)) ([2acae21](https://github.com/vitejs/vite/commit/2acae21b197ccbfc332651247ebe2f9b25fde238)), closes [#693](https://github.com/vitejs/vite/issues/693) -* **build:** css not be tree shake ([#803](https://github.com/vitejs/vite/issues/803)) ([34649b5](https://github.com/vitejs/vite/commit/34649b5fc3b8bef2e51e4fc0dc173a29df4a3b63)), closes [#795](https://github.com/vitejs/vite/issues/795) -* **build:** inject css to dynamic chunk only if it is not empty ([#805](https://github.com/vitejs/vite/issues/805)) ([038a053](https://github.com/vitejs/vite/commit/038a053477029d799b57f0d3242005a951486a61)) -* **build:** normalize `vueTransformAssetUrls` if not pass through plugins ([#668](https://github.com/vitejs/vite/issues/668)) ([47eb448](https://github.com/vitejs/vite/commit/47eb448709fa09f8bd02e1d4159d68e467ed68a7)), closes [#661](https://github.com/vitejs/vite/issues/661) -* **build:** only extract js module script tag in html ([#724](https://github.com/vitejs/vite/issues/724)) ([ef60d55](https://github.com/vitejs/vite/commit/ef60d55b67cf25508fe28a0c6cd2b9745b7f282a)), closes [#670](https://github.com/vitejs/vite/issues/670) -* **build:** resolve external url ([#807](https://github.com/vitejs/vite/issues/807)) ([df2e388](https://github.com/vitejs/vite/commit/df2e3884ee65dfc717b3c24d06da074c3fa9bca3)), closes [#799](https://github.com/vitejs/vite/issues/799) -* **build:** stop spinner on rollup error ([#835](https://github.com/vitejs/vite/issues/835)) ([78489b8](https://github.com/vitejs/vite/commit/78489b87c4b95ff8db86679b2f4a379591c0affa)) -* **config:** typo ([#935](https://github.com/vitejs/vite/issues/935)) ([08213b4](https://github.com/vitejs/vite/commit/08213b44ad79b8fc9b754115e416597326af5696)) -* **dev:** correctly normalize entry path on windows ([#736](https://github.com/vitejs/vite/issues/736)) ([49689e5](https://github.com/vitejs/vite/commit/49689e5d9ccb1e119951951e773d8826ec2221be)), closes [#735](https://github.com/vitejs/vite/issues/735) -* **dev:** decode for `publicPath` ([#924](https://github.com/vitejs/vite/issues/924)) ([0ea245c](https://github.com/vitejs/vite/commit/0ea245c69ec9c7baef7b755e497e15e171695859)), closes [#920](https://github.com/vitejs/vite/issues/920) -* **dev:** don't rewrite files inside public ([#602](https://github.com/vitejs/vite/issues/602)) ([2b544f3](https://github.com/vitejs/vite/commit/2b544f31bf8526b9f5ddee865c6c086f3edce756)) -* **dev:** hand file write end when change event emit in chokidar ([#824](https://github.com/vitejs/vite/issues/824)) ([a8f9595](https://github.com/vitejs/vite/commit/a8f95952650df7507c959478f2fa7048e6b7657b)), closes [#610](https://github.com/vitejs/vite/issues/610) -* **dev:** ignore .git file with hmr ([#664](https://github.com/vitejs/vite/issues/664)) ([c9a2764](https://github.com/vitejs/vite/commit/c9a27643f4ca612c8280c4485a6feadbc973c1ca)), closes [#663](https://github.com/vitejs/vite/issues/663) -* **dev:** strip utf-8 bom ([#814](https://github.com/vitejs/vite/issues/814)) ([ed2afe6](https://github.com/vitejs/vite/commit/ed2afe61c90847fba0191ce8633b41ecde20c73b)) -* **docs:** typo ([#843](https://github.com/vitejs/vite/issues/843)) ([2893a41](https://github.com/vitejs/vite/commit/2893a4149bbf2baf8a895a12ee6548148481a7bf)) -* add `@rollup/plugin-commonjs` before user plugin, let it correct… ([#746](https://github.com/vitejs/vite/issues/746)) ([f005c67](https://github.com/vitejs/vite/commit/f005c67f9865c8ec14a1c752d98962beb9decef5)), closes [#728](https://github.com/vitejs/vite/issues/728) -* avoid overwriting the prorcess global ([#609](https://github.com/vitejs/vite/issues/609)) ([36422c2](https://github.com/vitejs/vite/commit/36422c2d5e0e0e59ef969d0b5287d98bfe7cc3ee)) -* bump `rollup-plugin-terser` + update `esbuild` target to `es2020… ([#723](https://github.com/vitejs/vite/issues/723)) ([5266b74](https://github.com/vitejs/vite/commit/5266b74218a7a080e5b0eeb63383543a932dd5de)), closes [#718](https://github.com/vitejs/vite/issues/718) -* don't mutate plugins array in postcss config ([#791](https://github.com/vitejs/vite/issues/791)) ([3328076](https://github.com/vitejs/vite/commit/3328076261a8bdded73a25c73b509f140cc1ab6e)) -* notModified with transform ([#682](https://github.com/vitejs/vite/issues/682)) ([c6426e9](https://github.com/vitejs/vite/commit/c6426e9f5ae33fdde7ef6093a02960ca0374cecd)), closes [#662](https://github.com/vitejs/vite/issues/662) -* **dev:** omit "?t=" query from esbuild sourcemap source path ([#783](https://github.com/vitejs/vite/issues/783)) ([ec295aa](https://github.com/vitejs/vite/commit/ec295aaf75b48b554cd0aa339b99a8d4b4ec1a47)) -* **dev:** warn unknown dynamic import inside module rewrite ([#776](https://github.com/vitejs/vite/issues/776)) ([304f321](https://github.com/vitejs/vite/commit/304f321c6160ea8c97acb0b6ee1f6022ac873431)), closes [#772](https://github.com/vitejs/vite/issues/772) -* make vite.config support es2020 syntax ([#658](https://github.com/vitejs/vite/issues/658)) ([760cbac](https://github.com/vitejs/vite/commit/760cbacc963e4df37779ff49c8c14f68487dea81)) -* README.md type/grammar ([#625](https://github.com/vitejs/vite/issues/625)) ([2560a45](https://github.com/vitejs/vite/commit/2560a45897e5c608056743352a9dc90cf5ec0877)) -* strip "public/" prefix in `defaultFileToRequest` ([#681](https://github.com/vitejs/vite/issues/681)) ([5d98994](https://github.com/vitejs/vite/commit/5d98994d2c0fb790458a30d4badb7bf83c48691f)) -* use `index.js` as default entry point ([#665](https://github.com/vitejs/vite/issues/665)) ([5969c97](https://github.com/vitejs/vite/commit/5969c97ab5d0da56be72083d88b583db109fd3d3)) -* **dev:** Support passing "0" as port ([#590](https://github.com/vitejs/vite/issues/590)) ([ba9dda2](https://github.com/vitejs/vite/commit/ba9dda22ca89118f39fbbad7afb79c1898892e63)) -* **hmr:** correct hmr for sfc has setup script when it template change ([#763](https://github.com/vitejs/vite/issues/763)) ([9bea946](https://github.com/vitejs/vite/commit/9bea946397e2f63d1580e3f2c6410495f6e05e19)), closes [#748](https://github.com/vitejs/vite/issues/748) - - -### Features - -* **dev:** add hmr config for websocket connection ([#677](https://github.com/vitejs/vite/issues/677)) ([b753478](https://github.com/vitejs/vite/commit/b753478dfe96bd318b39552781e480ea068b6ead)) -* **dev:** proxy ws ([#865](https://github.com/vitejs/vite/issues/865)) ([c3ef4f6](https://github.com/vitejs/vite/commit/c3ef4f64ec09c6916f4e6b9764362a23843b98b6)), closes [#864](https://github.com/vitejs/vite/issues/864) -* set NODE_ENV if not present ([#732](https://github.com/vitejs/vite/issues/732)) ([0455b91](https://github.com/vitejs/vite/commit/0455b9191b9e497a80de6c11190d863e4e4c636a)), closes [#696](https://github.com/vitejs/vite/issues/696) -* suppot CSS modules named exports ([#750](https://github.com/vitejs/vite/issues/750)) ([d2ac431](https://github.com/vitejs/vite/commit/d2ac431e03a9eb91bd819b37100493edd4949530)) -* **build:** add option for `terser` ([#734](https://github.com/vitejs/vite/issues/734)) ([fb85cb2](https://github.com/vitejs/vite/commit/fb85cb2a75dd49bfe6df1a8a1038411b3744a4a2)), closes [#733](https://github.com/vitejs/vite/issues/733) -* **build:** use `fs.emptyDir` instead of `fs.remove` ([#744](https://github.com/vitejs/vite/issues/744)) ([e52e5ed](https://github.com/vitejs/vite/commit/e52e5ed1c5cf74c34cf6a35b7c1d507a3ce66373)), closes [#709](https://github.com/vitejs/vite/issues/709) - - -### Performance Improvements - -* improve regex performance ([#834](https://github.com/vitejs/vite/issues/834)) ([96531fc](https://github.com/vitejs/vite/commit/96531fc859c2f83a5ef66d36fc18f67528e600a6)) - - - -# [1.0.0-rc.4](https://github.com/vuejs/vite/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2020-07-30) - - -### Bug Fixes - -* **hmr:** module rewrite should not cache hmr requests ([e386575](https://github.com/vuejs/vite/commit/e3865756bfb26065b0866be91d03d4b06e4e86dc)), closes [#603](https://github.com/vuejs/vite/issues/603) [#598](https://github.com/vuejs/vite/issues/598) -* support options for template block preprocessor render ([#641](https://github.com/vuejs/vite/issues/641)) ([540ae24](https://github.com/vuejs/vite/commit/540ae24b0d645a4f20bd71037edd716690452ce0)), closes [#634](https://github.com/vuejs/vite/issues/634) -* **build/css:** ensure consistent build css hash ([4fba48b](https://github.com/vuejs/vite/commit/4fba48be081e1d336368812ab23c9d5a74b98c06)), closes [#596](https://github.com/vuejs/vite/issues/596) -* **dev:** don't unregister user service worker ([#622](https://github.com/vuejs/vite/issues/622)) ([ab5d6f6](https://github.com/vuejs/vite/commit/ab5d6f6864f059ea88b5328f97bfdaa4b5146c6a)), closes [#615](https://github.com/vuejs/vite/issues/615) -* **dev:** fix path with query + ignore `?import` query with hmr ([#619](https://github.com/vuejs/vite/issues/619)) ([dd92f4f](https://github.com/vuejs/vite/commit/dd92f4f910553f8d8aaab0e587cb7788e643a24d)), closes [#617](https://github.com/vuejs/vite/issues/617) -* **dev:** use `path` + `content` as rewrite cache key ([#631](https://github.com/vuejs/vite/issues/631)) ([60c7424](https://github.com/vuejs/vite/commit/60c7424f101d52b4542f75c0c9fac1f617097dcd)), closes [#627](https://github.com/vuejs/vite/issues/627) -* handle ` - ``` - - - -# [1.0.0-rc.1](https://github.com/vuejs/vite/compare/v1.0.0-beta.12...v1.0.0-rc.1) (2020-07-17) - - - -# [1.0.0-beta.12](https://github.com/vuejs/vite/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2020-07-16) - - -### Bug Fixes - -* **build:** external base url ([#515](https://github.com/vuejs/vite/issues/515)) ([b16548f](https://github.com/vuejs/vite/commit/b16548fde61f5192f3a9153d99c3785a623e8a12)), closes [#507](https://github.com/vuejs/vite/issues/507) -* **build:** link href used data url ([#516](https://github.com/vuejs/vite/issues/516)) ([8ae073e](https://github.com/vuejs/vite/commit/8ae073e59c77a092cbe505415f59a76e1cadffd4)), closes [#508](https://github.com/vuejs/vite/issues/508) -* **config:** merge array values in rollup config options ([abfe6f8](https://github.com/vuejs/vite/commit/abfe6f8732b057b256f152e71e2e450861636e30)), closes [#526](https://github.com/vuejs/vite/issues/526) -* **css:** fix lazy loaded css injection (fix [#530](https://github.com/vuejs/vite/issues/530)) ([a502399](https://github.com/vuejs/vite/commit/a50239988e57958c7e56e10bb7f24b4e5c8ed234)) -* **optimize:** resolve bare assets import inside node module ([#552](https://github.com/vuejs/vite/issues/552)) ([5801f66](https://github.com/vuejs/vite/commit/5801f6687d4e546ca70b1afbfe80569d90cca072)), closes [#551](https://github.com/vuejs/vite/issues/551) -* **resolve:** properly resolve optimized deps with name ending in .js ([c953f0d](https://github.com/vuejs/vite/commit/c953f0dacc97a557ac79ad73a8a69cd0c72c95b0)), closes [#540](https://github.com/vuejs/vite/issues/540) -* **transform:** keep path/id on transform context consistent between dev/build ([#519](https://github.com/vuejs/vite/issues/519)) ([6388e69](https://github.com/vuejs/vite/commit/6388e699617f7c72e753f9d961278b46a468da60)), closes [#518](https://github.com/vuejs/vite/issues/518) -* change `esbuild` compiler target to `es2020` + bump esbuild + bu… ([#525](https://github.com/vuejs/vite/issues/525)) ([893eeff](https://github.com/vuejs/vite/commit/893eeff4f6ef2134bd75f4e8623347ceab7ce229)), closes [#503](https://github.com/vuejs/vite/issues/503) -* fallback to http1 when proxy is required ([02cc24f](https://github.com/vuejs/vite/commit/02cc24f5e7c3219eb0dd77480f9df8208e81c09c)), closes [#484](https://github.com/vuejs/vite/issues/484) -* fix resolve optimize module + cache hit ([#500](https://github.com/vuejs/vite/issues/500)) ([3766767](https://github.com/vuejs/vite/commit/37667678e462748162d74d0107e619e837bf783c)), closes [#490](https://github.com/vuejs/vite/issues/490) -* inject web worker rollup plugin before node-resolve ([458a4bb](https://github.com/vuejs/vite/commit/458a4bbcb578d79041a91ea364ca53a6053d3ebf)) - - -### Features - -* **build:** add option for disable `rollup-plugin-vue` ([#517](https://github.com/vuejs/vite/issues/517)) ([5d06b0c](https://github.com/vuejs/vite/commit/5d06b0c018259a6ee2a2e0ae75f49951934cf8c1)) -* **transform:** expose notModified flag in transform context ([#510](https://github.com/vuejs/vite/issues/510)) ([2da41f1](https://github.com/vuejs/vite/commit/2da41f1011cc6f33fc8ee4dc279dcbb9214f0bca)) -* ` + + ``` diff --git a/docs/guide/build.md b/docs/guide/build.md index a2fa5d92d2066f..3205d71acb0392 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -21,9 +21,9 @@ Legacy browsers can be supported via [@vitejs/plugin-legacy](https://github.com/ ## Public Base Path -- Related: [Asset Handling](./features#asset-handling) +- Related: [Asset Handling](./assets) -If you are deploying your project under a nested public path, simply specify the [`build.base` config option](/config/#build-base) and all asset paths will be rewritten accordingly. This option can also be specified as a command line flag, e.g. `vite build --base=/my/public/path/`. +If you are deploying your project under a nested public path, simply specify the [`base` config option](/config/#base) and all asset paths will be rewritten accordingly. This option can also be specified as a command line flag, e.g. `vite build --base=/my/public/path/`. JS-imported asset URLs, CSS `url()` references, and asset references in your `.html` files are all automatically adjusted to respect this option during build. @@ -84,7 +84,7 @@ module.exports = { When you are developing a browser-oriented library, you are likely spending most of the time on a test/demo page that imports your actual library. With Vite, you can use your `index.html` for that purpose to get the smooth development experience. -When it is time to bundle your library for distribution, use the [`build.lib` config option](/config/#build-lib): +When it is time to bundle your library for distribution, use the [`build.lib` config option](/config/#build-lib). Make sure to also externalize any dependencies that you do not want to bundle into your library, e.g. `vue` or `react`: ```js // vite.config.js @@ -95,6 +95,18 @@ module.exports = { lib: { entry: path.resolve(__dirname, 'lib/main.js'), name: 'MyLib' + }, + rollupOptions: { + // make sure to externalize deps that shouldn't be bundled + // into your library + external: ['vue'], + output: { + // Provide global variables to use in the UMD build + // for externalized deps + globals: { + vue: 'Vue' + } + } } } } @@ -117,6 +129,11 @@ Recommended `package.json` for your lib: "files": ["dist"], "main": "./dist/my-lib.umd.js", "module": "./dist/my-lib.es.js", - "exports": "./dist/my-lib.es.js" + "exports": { + ".": { + "import": "./dist/my-lib.es.js", + "require": "./dist/my-lib.umd.js" + } + } } ``` diff --git a/docs/guide/comparisons.md b/docs/guide/comparisons.md index faced6b15e5ff7..f68319696a986e 100644 --- a/docs/guide/comparisons.md +++ b/docs/guide/comparisons.md @@ -4,11 +4,32 @@ [Snowpack](https://www.snowpack.dev/) is also a no-bundle native ESM dev server that is very similar in scope to Vite. Aside from different implementation details, the two projects share a lot in terms of technical advantages over traditional tooling. Vite's dependency pre-bundling is also inspired by Snowpack v1 (now [`esinstall`](https://github.com/snowpackjs/snowpack/tree/main/esinstall)). Some of the main differences between the two projects are: -**Production Build Handling** +**Production Build** -Snowpack's default build output is unbundled: it transforms each file into separate built modules, which can then be fed into different "optimizers" that perform the actual bundling. The benefit of this is that you can choose between different end-bundlers (e.g. webpack, Rollup, or even ESbuild), the downside is that it's a bit of a fragmented experience - for example, the `esbuild` optimizer is still unstable, the Rollup optimizer is not officially maintained, and different optimizers have different output and configurations. +Snowpack's default build output is unbundled: it transforms each file into separate built modules, which can then be fed into different "optimizers" that perform the actual bundling. The benefit of this is that you can choose between different end-bundlers to fit specific needs (e.g. webpack, Rollup, or even esbuild), the downside is that it's a bit of a fragmented experience - for example, the esbuild optimizer is still unstable, the Rollup optimizer is not officially maintained, and different optimizers have different output and configurations. -Vite opts to have a deeper integration with one single bundler (Rollup) in order to provide a more streamlined experience. The reason for going with Rollup is because we believe for the foreseeable future, Rollup offers the best balance between maturity, extensibility, build speed, and output bundle size. Vite supports a [Universal Plugin API](./api-plugin) that extends Rollup's plugin interface, and offers more build features such as [multi-page support](./build#multi-page-app) and [library mode](./build#library-mode). +Vite opts to have a deeper integration with one single bundler (Rollup) in order to provide a more streamlined experience. It also allows Vite to support a [Universal Plugin API](./api-plugin) that works for both dev and build. + +Due to a more integrated build process, Vite supports a wide range of features that are currently not available in Snowpack build optimizers: + +- [Multi-Page Support](./build#multi-page-app) +- [Library Mode](./build#library-mode) +- [Automatic CSS code-splitting](./features#css-code-splitting) +- [Optimized async chunk loading](./features#async-chunk-loading-optimization) +- [Automatic dynamic import polyfill](./features#dynamic-import-polyfill) +- Official [legacy mode plugin](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy) that generates dual modern/legacy bundles and auto delivers the right bundle based on browser support. + +**Faster Dependency Pre-Bundling** + +Vite uses [esbuild](https://esbuild.github.io/) instead of Rollup for dependency pre-bundling. This results in significant performance improvements in terms of cold server start and re-bundling on dependency invalidations. + +**Monorepo Support** + +Vite is designed to handle monorepo setups and we have users successfully using it with Yarn, Yarn 2, and PNPM based monorepos. + +**CSS Pre-Processor Support** + +Vite provides more refined support for Sass and Less, including improved `@import` resolution (aliases and npm dependencies) and [automatic `url()` rebasing for inlined files](./features#import-inlining-and-rebasing). **First Class Vue Support** @@ -24,6 +45,6 @@ WMR is mainly designed for [Preact](https://preactjs.com/) projects, and offers [@web/dev-server](https://modern-web.dev/docs/dev-server/overview/) (previously `es-dev-server`) is a great project and Vite 1.0's Koa-based server setup was inspired by it. -`@web/dev-server` is a bit lower-level in terms of scope. It does not provide out-of-the-box framework integrations, and requires manually setting up a Rollup configuration for the production build. However, its parent project does provide a collection of excellent Rollup plugins. +`@web/dev-server` is a bit lower-level in terms of scope. It does not provide official framework integrations, and requires manually setting up a Rollup configuration for the production build. -Overall, Vite is a more opinionated / higher-level tool that aims to provide a more streamlined workflow compared to `@web/dev-server`. That said, the `@web` umbrella project contains many other excellent tools that may benefit Vite users as well. \ No newline at end of file +Overall, Vite is a more opinionated / higher-level tool that aims to provide a more out-of-the-box workflow. That said, the `@web` umbrella project contains many other excellent tools that may benefit Vite users as well. diff --git a/docs/guide/dep-pre-bundling.md b/docs/guide/dep-pre-bundling.md index 7da80e4c1782df..e5fc5173ccdf3c 100644 --- a/docs/guide/dep-pre-bundling.md +++ b/docs/guide/dep-pre-bundling.md @@ -13,7 +13,7 @@ Pre-bundling them to speed up dev server page load... This is Vite performing what we call "dependency pre-bundling". This process serves two purposes: -1. **CommonJS and UMD comaptibility:** During development, Vite's dev serves all code as native ESM. Therefore, Vite must convert dependencies that are shipped as CommonJS or UMD into ESM first. +1. **CommonJS and UMD compatibility:** During development, Vite's dev serves all code as native ESM. Therefore, Vite must convert dependencies that are shipped as CommonJS or UMD into ESM first. When converting CommonJS dependencies, Vite performs smart import analysis so that named imports to CommonJS modules will work as expected even if the exports are dynamically assigned (e.g. React): @@ -24,39 +24,15 @@ This is Vite performing what we call "dependency pre-bundling". This process ser 2. **Performance:** Vite converts ESM dependencies with many internal modules into a single module to improve subsequent page load performance. - Some packages ship their ES modules builds as many separate files importing one another. For example, [`lodash-es` has over 600 internal modules](https://unpkg.com/browse/lodash-es/)! When we do `import { debounce } from 'lodash-es`, the browser fires off 600+ HTTP requests at the same time! Even though the server has no problem handling them, the large amount of requests create a network congestion on the browser side, causing the page the load quite a bit slower. + Some packages ship their ES modules builds as many separate files importing one another. For example, [`lodash-es` has over 600 internal modules](https://unpkg.com/browse/lodash-es/)! When we do `import { debounce } from 'lodash-es'`, the browser fires off 600+ HTTP requests at the same time! Even though the server has no problem handling them, the large amount of requests create a network congestion on the browser side, causing the page to load noticeably slower. By pre-bundling `lodash-es` into a single module, we now only need one HTTP request instead! -## Pre-Bundle Criteria +## Automatic Dependency Discovery -Dependencies are only checked for pre-bundling if it is listed in `dependencies` of your `package.json`. It will be eligible for pre-bundling if one of the following is true: +If an existing cache is not found, Vite will crawl your source code and automatically discover dependency imports (i.e. "bare imports" that expect to be resolved from `node_modules`) and use these found imports as entry points for the pre-bundle. The pre-bundling is performed with `esbuild` so it's typically very fast. -- The dependency's entry contains no valid ES module export (treated as CommonJS); -- The dependency's entry contains ES imports to other modules or dependencies (multiple internal modules). - -This also means you should avoid placing dependencies that are not meant to be imported in your source code under `dependencies` (move them to `devDependencies` instead). - -## Deep Imports - -Pre-bundled dependencies are bundled into a single, separate module, therefore you should prefer using named exports from the main entry point instead of deep imports to individual modules. For example: - -```js -// Bad, will lead to duplicated module instances. -// Vite will complain about it. -import debounce from 'lodash-es/debounce' - -// Good -import { debounce } from 'lodash-es' -``` - -Some dependencies may be designed to be used via deep imports, e.g. `firebase` exposes sub modules via `firebase/*` deep imports. For such dependencies, you can instruct Vite to explicitly include these deep import paths via the [`optimizeDeps.include` option](http://localhost:3000/config/#optimizedeps-include). If you never use the main entry, it is also a good idea to exclude it from pre-bundling. - -## Dependency Compatibility - -While Vite tries its best to accomodate non-ESM dependencies, there are going to be some dependencies that won't work out of the box. The most common types are those that imports Node.js built-in modules (e.g. `os` or `path`) and expects the bundler to automatically shim them. These packages are typically written assuming all users will be consuming it with `webpack`, but such usage does not make sense when targeting browser environments. - -When using Vite, it is strongly recommended to always prefer dependencies that provide ESM formats. This will make your build faster, and results in smaller production bundles due to more efficient tree-shaking. +After the server has already started, if a new dependency import is encountered that isn't already in the cache, Vite will re-run the dep bundling process and reload the page. ## Monorepos and Linked Dependencies @@ -64,16 +40,30 @@ In a monorepo setup, a dependency may be a linked package from the same repo. Vi ## Customizing the Behavior -The default pre-bundling heuristics may not always be desirable. In cases where you want to explicitly include/exclude dependencies from the list, use the [`optimizeDeps` config options](/config/#dep-optimization-options). +The default dependency discovery heuristics may not always be desirable. In cases where you want to explicitly include/exclude dependencies from the list, use the [`optimizeDeps` config options](/config/#dep-optimization-options). + +A typical use case for `optimizeDeps.include` or `optimizeDeps.exclude` is when you have an import that is not directly discoverable in the source code. For example, maybe the import is created as a result of a plugin transform. This means Vite won't be able to discover the import on the initial scan - it can only discover it after the file is requested by the browser and transformed. This will cause the server to immediately re-bundle after server start. + +Both `include` and `exclude` can be used to deal with this. If the dependency is large (with many internal modules) or is CommonJS, then you should include it; If the dependency is small and is already valid ESM, you can exclude it and let the browser load it directly. ## Caching +### File System Cache + Vite caches the pre-bundled dependencies in `node_modules/.vite`. It determines whether it needs to re-run the pre-bundling step based on a few sources: - The `dependencies` list in your `package.json` - Package manager lockfiles, e.g. `package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`. -- Your `vite.config.js`, if present. +- Relevant fields in your `vite.config.js`, if present. The pre-bundling step will only need to be re-run when one of the above has changed. If for some reason you want to force Vite to re-bundle deps, you can either start the dev server with the `--force` command line option, or manually delete the `node_modules/.vite` cache directory. + +### Browser Cache + +Resolved dependency requests are strongly cached with HTTP headers `max-age=31536000,immutable` to improve page reload performance during dev. Once cached, these requests will never hit the dev server again. They are auto invalidated by the appended version query if a different version is installed (as reflected in your package manager lockfile). If you want to debug your dependencies by making local edits, you can: + +1. Temporarily disable cache via the Network tab of your browser devtools; +2. Restart Vite dev server with the `--force` flag to re-bundle the deps; +3. Reload the page. diff --git a/docs/guide/env-and-mode.md b/docs/guide/env-and-mode.md index ab5db2b317e1a3..9180e552cc0637 100644 --- a/docs/guide/env-and-mode.md +++ b/docs/guide/env-and-mode.md @@ -6,7 +6,7 @@ Vite exposes env variables on the special **`import.meta.env`** object. Some bui - **`import.meta.env.MODE`**: {string} the [mode](#modes) the app is running in. -- **`import.meta.env.BASE_URL`**: {string} the base url the app is being served from. In development, this is always `/`. In production, this is determined by the [`build.base` config option](/config/#build-base). +- **`import.meta.env.BASE_URL`**: {string} the base url the app is being served from. This is determined by the [`base` config option](/config/#base). - **`import.meta.env.PROD`**: {boolean} whether the app is running in production. @@ -14,7 +14,7 @@ Vite exposes env variables on the special **`import.meta.env`** object. Some bui ### Production Replacement -During production, these env variables are **statically replaced**. It therefore necessary to always reference them using the full static string. For example, dynamic key access like `import.meta.env[key]` will not work. +During production, these env variables are **statically replaced**. It is therefore necessary to always reference them using the full static string. For example, dynamic key access like `import.meta.env[key]` will not work. It will also replace these strings appearing in JavaScript strings and Vue templates. This should be a rare case, but it can be unintended. There are ways to work around this behavior: diff --git a/docs/guide/features.md b/docs/guide/features.md index 103e335cff26ba..c0bc5d32004223 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -1,14 +1,8 @@ # Features -At the very basic level, developing using Vite is not that much different from using a static file server. However, Vite provides many enhancements over native ESM imports to support +At the very basic level, developing using Vite is not that much different from using a static file server. However, Vite provides many enhancements over native ESM imports to support various features that are typically seen in bundler-based setups. -## Hot Module Replacement - -Vite provides an [HMR API](./api-hmr) over native ESM. Frameworks with HMR capabilities can leverage the API to provide instant, precise updates without reloading the page or blowing away application state. Vite provides first-party HMR integrations for [Vue Single File Components](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) and [React Fast Refresh](https://github.com/vitejs/vite/tree/main/packages/plugin-react-refresh). There are also official integrations for Preact via [@prefresh/vite](https://github.com/JoviDeCroock/prefresh/tree/main/packages/vite). - -Note you don't need to manually set these up - when you [create an app via `@vitejs/create-app`](./), the selected templates would have these pre-configured for you already. - -## NPM Dependency Resolving +## NPM Dependency Resolving and Pre-Bundling Native ES imports do not support bare module imports like the following: @@ -16,11 +10,21 @@ Native ES imports do not support bare module imports like the following: import { someMethod } from 'my-dep' ``` -The above will throw an error in the browser. Vite detects such bare module imports in all served `.js` files and rewrites them to resolved paths like `/node_modules/my-dep/dist/my-dep.js?v=1.0.0` so that the browser can handle them properly. +The above will throw an error in the browser. Vite will detect such bare module imports in all served source files and perform the following: + +1. [Pre-bundle](./dep-pre-bundling) them to improve page loading speed and convert CommonJS / UMD modules to ESM. The pre-bundling step is performed with [esbuild](http://esbuild.github.io/) and makes Vite's cold start time significantly faster than any JavaScript-based bundler. -**Dependency Caching** +2. Rewrite the imports to valid URLs like `/node_modules/.vite/my-dep.js?v=f3sf2ebd` so that the browser can import them properly. -Resolved dependency requests are strongly cached with headers `max-age=31536000,immutable` to improve page reload performance during dev. Once cached, these requests will never hit the dev server again. They are auto invalidated by the appended version query if a different version is installed. If you made manual local edits to your dependencies, you can temporarily disable cache via your browser devtools and reload the page. +**Dependencies are Strongly Cached** + +Vite caches dependency requests via HTTP headers, so if you wish to locally edit/debug a dependency, follow the steps [here](./dep-pre-bundling#browser-cache). + +## Hot Module Replacement + +Vite provides an [HMR API](./api-hmr) over native ESM. Frameworks with HMR capabilities can leverage the API to provide instant, precise updates without reloading the page or blowing away application state. Vite provides first-party HMR integrations for [Vue Single File Components](https://github.com/vitejs/vite/tree/main/packages/plugin-vue) and [React Fast Refresh](https://github.com/vitejs/vite/tree/main/packages/plugin-react-refresh). There are also official integrations for Preact via [@prefresh/vite](https://github.com/JoviDeCroock/prefresh/tree/main/packages/vite). + +Note you don't need to manually set these up - when you [create an app via `@vitejs/create-app`](./), the selected templates would have these pre-configured for you already. ## TypeScript @@ -93,6 +97,12 @@ export default { Importing `.css` files will inject its content to the page via a ` \ No newline at end of file + +label { + margin: 0 0.5em; + font-weight: bold; +} + +code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; + color: #304455; +} + diff --git a/packages/create-app/template-vue-ts/src/shims-vue.d.ts b/packages/create-app/template-vue-ts/src/shims-vue.d.ts new file mode 100644 index 00000000000000..ac1ded792334c2 --- /dev/null +++ b/packages/create-app/template-vue-ts/src/shims-vue.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/packages/create-app/template-vue-ts/tsconfig.json b/packages/create-app/template-vue-ts/tsconfig.json index 8c7115f961a575..e754e65292f1a0 100644 --- a/packages/create-app/template-vue-ts/tsconfig.json +++ b/packages/create-app/template-vue-ts/tsconfig.json @@ -6,9 +6,10 @@ "strict": true, "jsx": "preserve", "sourceMap": true, + "resolveJsonModule": true, + "esModuleInterop": true, "lib": ["esnext", "dom"], - "types": ["vite/client"], - "plugins": [{ "name": "@vuedx/typescript-plugin-vue" }] + "types": ["vite/client"] }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] } diff --git a/packages/create-app/template-vue-ts/vite.config.ts b/packages/create-app/template-vue-ts/vite.config.ts index 2e3d2576fc2e28..315212d69a7ba5 100644 --- a/packages/create-app/template-vue-ts/vite.config.ts +++ b/packages/create-app/template-vue-ts/vite.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +// https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()] }) diff --git a/packages/create-app/template-vue/index.html b/packages/create-app/template-vue/index.html index d49c18c6fb142f..030a6ff51bfc6f 100644 --- a/packages/create-app/template-vue/index.html +++ b/packages/create-app/template-vue/index.html @@ -1,13 +1,13 @@ - - - - - Vite App - - -
- - + + + + + Vite App + + +
+ + diff --git a/packages/create-app/template-vue/package.json b/packages/create-app/template-vue/package.json index fa19c11ebeee79..e93941db3dbf9e 100644 --- a/packages/create-app/template-vue/package.json +++ b/packages/create-app/template-vue/package.json @@ -3,14 +3,15 @@ "version": "0.0.0", "scripts": { "dev": "vite", - "build": "vite build" + "build": "vite build", + "serve": "vite preview" }, "dependencies": { "vue": "^3.0.5" }, "devDependencies": { - "@vitejs/plugin-vue": "^1.0.4", + "@vitejs/plugin-vue": "^1.1.4", "@vue/compiler-sfc": "^3.0.5", - "vite": "^2.0.0-beta.12" + "vite": "^2.0.0-beta.65" } } \ No newline at end of file diff --git a/packages/create-app/template-vue/src/App.vue b/packages/create-app/template-vue/src/App.vue index 9a72bd98acdc9f..e9748276d24a0b 100644 --- a/packages/create-app/template-vue/src/App.vue +++ b/packages/create-app/template-vue/src/App.vue @@ -5,6 +5,9 @@ diff --git a/packages/playground/define/package.json b/packages/playground/define/package.json index fd68a46c35162d..eed4e7a31eb969 100644 --- a/packages/playground/define/package.json +++ b/packages/playground/define/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" } } diff --git a/packages/playground/dynamic-import/__tests__/dynamic-import.spec.ts b/packages/playground/dynamic-import/__tests__/dynamic-import.spec.ts index 80648900549a65..02320108537bea 100644 --- a/packages/playground/dynamic-import/__tests__/dynamic-import.spec.ts +++ b/packages/playground/dynamic-import/__tests__/dynamic-import.spec.ts @@ -11,3 +11,8 @@ test('should load literal dynamic import', async () => { await page.click('.baz') await untilUpdated(() => page.textContent('.view'), 'Baz view') }) + +test('should load full dynamic import from public', async () => { + await page.click('.qux') + await untilUpdated(() => page.textContent('.view'), 'Qux view') +}) diff --git a/packages/playground/dynamic-import/index.html b/packages/playground/dynamic-import/index.html index 6bf5eee0d017a6..ad5e7ab57c98b7 100644 --- a/packages/playground/dynamic-import/index.html +++ b/packages/playground/dynamic-import/index.html @@ -1,26 +1,8 @@ +
- + diff --git a/packages/playground/dynamic-import/nested/index.js b/packages/playground/dynamic-import/nested/index.js new file mode 100644 index 00000000000000..383e51f3d5dfdd --- /dev/null +++ b/packages/playground/dynamic-import/nested/index.js @@ -0,0 +1,26 @@ +async function setView(view) { + const { msg } = await import(`../views/${view}.js`) + text('.view', msg) +} + +;['foo', 'bar'].forEach((id) => { + document.querySelector(`.${id}`).addEventListener('click', () => setView(id)) +}) + +// literal dynamic +document.querySelector('.baz').addEventListener('click', async () => { + const { msg } = await import('../views/baz.js') + text('.view', msg) +}) + +// full dynamic +const arr = ['qux.js'] +const view = `/${arr[0]}` +document.querySelector('.qux').addEventListener('click', async () => { + const { msg } = await import(/*@vite-ignore*/ view) + text('.view', msg) +}) + +function text(el, text) { + document.querySelector(el).textContent = text +} diff --git a/packages/playground/dynamic-import/nested/shared.js b/packages/playground/dynamic-import/nested/shared.js new file mode 100644 index 00000000000000..4384f77f2a3613 --- /dev/null +++ b/packages/playground/dynamic-import/nested/shared.js @@ -0,0 +1 @@ +export const n = 1 diff --git a/packages/playground/dynamic-import/package.json b/packages/playground/dynamic-import/package.json index e6cfed7b7b91fd..91048d3c3b90a2 100644 --- a/packages/playground/dynamic-import/package.json +++ b/packages/playground/dynamic-import/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" } } diff --git a/packages/playground/dynamic-import/qux.js b/packages/playground/dynamic-import/qux.js new file mode 100644 index 00000000000000..be6e7b94044732 --- /dev/null +++ b/packages/playground/dynamic-import/qux.js @@ -0,0 +1 @@ +export const msg = 'Qux view' diff --git a/packages/playground/dynamic-import/views/bar.js b/packages/playground/dynamic-import/views/bar.js index 94401802f2dd50..12b73fd6da9e8c 100644 --- a/packages/playground/dynamic-import/views/bar.js +++ b/packages/playground/dynamic-import/views/bar.js @@ -1 +1,4 @@ +import { n } from '../nested/shared' +console.log('bar' + n) + export const msg = 'Bar view' diff --git a/packages/playground/dynamic-import/views/baz.js b/packages/playground/dynamic-import/views/baz.js index 058ba96c5ed595..0bcfd54d53e564 100644 --- a/packages/playground/dynamic-import/views/baz.js +++ b/packages/playground/dynamic-import/views/baz.js @@ -1 +1,4 @@ +import { n } from '../nested/shared' +console.log('baz' + n) + export const msg = 'Baz view' diff --git a/packages/playground/dynamic-import/views/foo.js b/packages/playground/dynamic-import/views/foo.js index f87abff5b03072..1205c3f4148934 100644 --- a/packages/playground/dynamic-import/views/foo.js +++ b/packages/playground/dynamic-import/views/foo.js @@ -1 +1,4 @@ +import { n } from '../nested/shared' +console.log('foo' + n) + export const msg = 'Foo view' diff --git a/packages/playground/dynamic-import/vite.config.js b/packages/playground/dynamic-import/vite.config.js new file mode 100644 index 00000000000000..e0fb1f662fd3d0 --- /dev/null +++ b/packages/playground/dynamic-import/vite.config.js @@ -0,0 +1,16 @@ +const fs = require('fs') +const path = require('path') + +module.exports = { + plugins: [ + { + name: 'copy', + writeBundle() { + fs.copyFileSync( + path.resolve(__dirname, 'qux.js'), + path.resolve(__dirname, 'dist/qux.js') + ) + } + } + ] +} diff --git a/packages/playground/env/index.html b/packages/playground/env/index.html index 9489635deda8ad..202a0fae9a3624 100644 --- a/packages/playground/env/index.html +++ b/packages/playground/env/index.html @@ -1,44 +1,37 @@

Environment Variables

+

import.meta.env.BASE_URL:

+

import.meta.env.MODE:

+

import.meta.env.DEV:

+

import.meta.env.PROD:

+

import.meta.env.VITE_CUSTOM_ENV_VARIABLE:

- import.meta.env.BASE_URL: -

-

- import.meta.env.MODE: -

-

- import.meta.env.DEV: -

-

- import.meta.env.PROD: -

-

- import.meta.env.VITE_CUSTOM_ENV_VARIABLE: -

-

- import.meta.env.VITE_EFFECTIVE_MODE_FILE_NAME: -

-

- import.meta.env.VITE_INLINE: -

-

- process.env.NODE_ENV: -

-

- import.meta.env:


+  import.meta.env.VITE_EFFECTIVE_MODE_FILE_NAME: 
 

+

import.meta.env.VITE_INLINE:

+

process.env.NODE_ENV:

+

import.meta.env:

-function text(el, text) { - document.querySelector(el).textContent = text -} - \ No newline at end of file + diff --git a/packages/playground/env/package.json b/packages/playground/env/package.json index 2ced20d5275744..efb93c23954582 100644 --- a/packages/playground/env/package.json +++ b/packages/playground/env/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "cross-env VITE_INLINE=inline-serve vite", "build": "cross-env VITE_INLINE=inline-build vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "devDependencies": { "cross-env": "^7.0.3" diff --git a/packages/playground/glob-import/__tests__/glob-import.spec.ts b/packages/playground/glob-import/__tests__/glob-import.spec.ts index f4e37ec46b7d0f..15ffb4c7d97ede 100644 --- a/packages/playground/glob-import/__tests__/glob-import.spec.ts +++ b/packages/playground/glob-import/__tests__/glob-import.spec.ts @@ -1,4 +1,10 @@ -import { isBuild } from '../../testUtils' +import { + addFile, + editFile, + isBuild, + removeFile, + untilUpdated +} from '../../testUtils' const filteredResult = { './foo.js': { @@ -24,14 +30,14 @@ const json = isBuild const allResult = { // JSON file should be properly transformed - './dir/baz.json': json, - './dir/foo.js': { + '/dir/baz.json': json, + '/dir/foo.js': { msg: 'foo' }, - './dir/index.js': { + '/dir/index.js': { modules: filteredResult }, - './dir/nested/bar.js': { + '/dir/nested/bar.js': { modules: { '../baz.json': json }, @@ -44,3 +50,42 @@ test('should work', async () => { JSON.stringify(allResult, null, 2) ) }) + +if (!isBuild) { + test('hmr for adding/removing files', async () => { + addFile('dir/a.js', '') + await untilUpdated( + () => page.textContent('.result'), + JSON.stringify( + { + '/dir/a.js': {}, + ...allResult + }, + null, + 2 + ) + ) + + // edit the added file + editFile('dir/a.js', () => 'export const msg ="a"') + await untilUpdated( + () => page.textContent('.result'), + JSON.stringify( + { + '/dir/a.js': { + msg: 'a' + }, + ...allResult + }, + null, + 2 + ) + ) + + removeFile('dir/a.js') + await untilUpdated( + () => page.textContent('.result'), + JSON.stringify(allResult, null, 2) + ) + }) +} diff --git a/packages/playground/glob-import/index.html b/packages/playground/glob-import/index.html index 541898db833426..b38a194e21b4f2 100644 --- a/packages/playground/glob-import/index.html +++ b/packages/playground/glob-import/index.html @@ -2,7 +2,7 @@ + + diff --git a/packages/playground/html/index.html b/packages/playground/html/index.html index b947033587e2d0..b0b5947debd00c 100644 --- a/packages/playground/html/index.html +++ b/packages/playground/html/index.html @@ -1,7 +1,7 @@ - +

Hello

- \ No newline at end of file + diff --git a/packages/playground/html/nested/index.html b/packages/playground/html/nested/index.html index 54dd231a1b9f82..4fb855b783c890 100644 --- a/packages/playground/html/nested/index.html +++ b/packages/playground/html/nested/index.html @@ -1,3 +1,3 @@ - +

Nested

- \ No newline at end of file + diff --git a/packages/playground/html/package.json b/packages/playground/html/package.json index 6368db40153c7d..db225e882d34dc 100644 --- a/packages/playground/html/package.json +++ b/packages/playground/html/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" } } diff --git a/packages/playground/json/__tests__/json.spec.ts b/packages/playground/json/__tests__/json.spec.ts index cd15c1d50dc4de..2a9451d1c41ca7 100644 --- a/packages/playground/json/__tests__/json.spec.ts +++ b/packages/playground/json/__tests__/json.spec.ts @@ -1,5 +1,7 @@ const json = require('../test.json') +const deepJson = require('@vue/runtime-core/package.json') const stringified = JSON.stringify(json) +const deepStringified = JSON.stringify(deepJson) test('default import', async () => { expect(await page.textContent('.full')).toBe(stringified) @@ -9,6 +11,14 @@ test('named import', async () => { expect(await page.textContent('.named')).toBe(json.hello) }) +test('deep import', async () => { + expect(await page.textContent('.deep-full')).toBe(deepStringified) +}) + +test('named deep import', async () => { + expect(await page.textContent('.deep-named')).toBe(deepJson.name) +}) + test('dynamic import', async () => { expect(await page.textContent('.dynamic')).toBe(stringified) }) diff --git a/packages/playground/json/index.html b/packages/playground/json/index.html index 3c5eaca233d268..0efaea3147a164 100644 --- a/packages/playground/json/index.html +++ b/packages/playground/json/index.html @@ -2,6 +2,10 @@

Normal Import


 

 
+

Deep Import

+

+

+
 

Dynamic Import


 

@@ -11,9 +15,14 @@ 

Raw fetch

\ No newline at end of file + diff --git a/packages/playground/legacy/package.json b/packages/playground/legacy/package.json index c0f4f90fa497b7..9c7c676b3d186e 100644 --- a/packages/playground/legacy/package.json +++ b/packages/playground/legacy/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "vite build --debug legacy", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "devDependencies": { "@vitejs/plugin-legacy": "^1.0.0" diff --git a/packages/playground/lib/public/index.html b/packages/playground/lib/index.dist.html similarity index 70% rename from packages/playground/lib/public/index.html rename to packages/playground/lib/index.dist.html index f205800eebd3e3..3416c1f3952fa9 100644 --- a/packages/playground/lib/public/index.html +++ b/packages/playground/lib/index.dist.html @@ -4,12 +4,12 @@
\ No newline at end of file + MyLib('.umd') + diff --git a/packages/playground/lib/index.html b/packages/playground/lib/index.html index 87e0039ba64050..3fd11da4e8a829 100644 --- a/packages/playground/lib/index.html +++ b/packages/playground/lib/index.html @@ -3,7 +3,7 @@
\ No newline at end of file + myLib('.demo') + diff --git a/packages/playground/lib/package.json b/packages/playground/lib/package.json index dc8a64ad4bbf8d..7a857ec16590b8 100644 --- a/packages/playground/lib/package.json +++ b/packages/playground/lib/package.json @@ -1,10 +1,11 @@ { - "name": "my-lib", + "name": "@example/my-lib", "private": true, "version": "0.0.0", "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" } } diff --git a/packages/playground/lib/vite.config.js b/packages/playground/lib/vite.config.js index 6ca6306abbea33..a80800f6ad3d58 100644 --- a/packages/playground/lib/vite.config.js +++ b/packages/playground/lib/vite.config.js @@ -1,3 +1,4 @@ +const fs = require('fs') const path = require('path') /** @@ -9,5 +10,20 @@ module.exports = { entry: path.resolve(__dirname, 'src/main.js'), name: 'MyLib' } - } + }, + plugins: [ + { + name: 'emit-index', + generateBundle() { + this.emitFile({ + type: 'asset', + fileName: 'index.html', + source: fs.readFileSync( + path.resolve(__dirname, 'index.dist.html'), + 'utf-8' + ) + }) + } + } + ] } diff --git a/packages/playground/optimize-deps-linked-include/index.js b/packages/playground/optimize-deps-linked-include/index.js deleted file mode 100644 index 74c1e295715f63..00000000000000 --- a/packages/playground/optimize-deps-linked-include/index.js +++ /dev/null @@ -1,7 +0,0 @@ -export { msg } from './foo.js' - -import { useState } from 'react' - -export function useCount() { - return useState(0) -} diff --git a/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts index f7616fb9d6be71..94a3dc24665101 100644 --- a/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/packages/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -1,15 +1,33 @@ +import { getColor } from '../../testUtils' + test('default + named imports from cjs dep (react)', async () => { expect(await page.textContent('.cjs button')).toBe('count is 0') await page.click('.cjs button') expect(await page.textContent('.cjs button')).toBe('count is 1') }) +test('named imports from webpacked cjs (phoenix)', async () => { + expect(await page.textContent('.cjs-phoenix')).toBe('ok') +}) + +test('default import from webpacked cjs (clipboard)', async () => { + expect(await page.textContent('.cjs-clipboard')).toBe('ok') +}) + test('dynamic imports from cjs dep (react)', async () => { expect(await page.textContent('.cjs-dynamic button')).toBe('count is 0') await page.click('.cjs-dynamic button') expect(await page.textContent('.cjs-dynamic button')).toBe('count is 1') }) +test('dynamic named imports from webpacked cjs (phoenix)', async () => { + expect(await page.textContent('.cjs-dynamic-phoenix')).toBe('ok') +}) + +test('dynamic default import from webpacked cjs (clipboard)', async () => { + expect(await page.textContent('.cjs-dynamic-clipboard')).toBe('ok') +}) + test('dedupe', async () => { expect(await page.textContent('.dedupe button')).toBe('count is 0') await page.click('.dedupe button') @@ -27,3 +45,19 @@ test('dep from linked dep (lodash-es)', async () => { test('forced include', async () => { expect(await page.textContent('.force-include')).toMatch(`[success]`) }) + +test('import * from optimized dep', async () => { + expect(await page.textContent('.import-star')).toMatch(`[success]`) +}) + +test('dep with css import', async () => { + expect(await getColor('h1')).toBe('red') +}) + +test('dep w/ non-js files handled via plugin', async () => { + expect(await page.textContent('.plugin')).toMatch(`[success]`) +}) + +test('vue + vuex', async () => { + expect(await page.textContent('.vue')).toMatch(`[success]`) +}) diff --git a/packages/playground/optimize-deps/cjs-dynamic.js b/packages/playground/optimize-deps/cjs-dynamic.js index 6fff0fdf8a8efc..dceffd811772d7 100644 --- a/packages/playground/optimize-deps/cjs-dynamic.js +++ b/packages/playground/optimize-deps/cjs-dynamic.js @@ -6,6 +6,16 @@ const React = (await import('react')).default const ReactDOM = await import('react-dom') + const clip = await import('clipboard') + if (typeof clip.default === 'function') { + document.querySelector('.cjs-dynamic-clipboard').textContent = 'ok' + } + + const { Socket } = await import('phoenix') + if (typeof Socket === 'function') { + document.querySelector('.cjs-dynamic-phoenix').textContent = 'ok' + } + function App() { const [count, setCount] = useState(0) diff --git a/packages/playground/optimize-deps/cjs.js b/packages/playground/optimize-deps/cjs.js index b016d04c6fa661..196d395edc30a2 100644 --- a/packages/playground/optimize-deps/cjs.js +++ b/packages/playground/optimize-deps/cjs.js @@ -3,6 +3,16 @@ // are not statically detectable by @rollup/plugin-commonjs. import React, { useState } from 'react' import ReactDOM from 'react-dom' +import { Socket } from 'phoenix' +import clip from 'clipboard' + +if (typeof clip === 'function') { + document.querySelector('.cjs-clipboard').textContent = 'ok' +} + +if (typeof Socket === 'function') { + document.querySelector('.cjs-phoenix').textContent = 'ok' +} function App() { const [count, setCount] = useState(0) diff --git a/packages/playground/optimize-deps/dedupe.js b/packages/playground/optimize-deps/dedupe.js index 3f7f6e656e33e7..d04726330a6138 100644 --- a/packages/playground/optimize-deps/dedupe.js +++ b/packages/playground/optimize-deps/dedupe.js @@ -4,7 +4,7 @@ import ReactDOM from 'react-dom' // #1302: The linked package has a different version of React in its deps // and is itself optimized. Without `dedupe`, the linked package is optimized // with a separate copy of React included, and results in runtime errors. -import { useCount } from 'optimize-deps-linked-include' +import { useCount } from 'dep-linked-include/index.mjs' function App() { const [count, setCount] = useCount() diff --git a/packages/playground/optimize-deps/dep-linked-include/Test.vue b/packages/playground/optimize-deps/dep-linked-include/Test.vue new file mode 100644 index 00000000000000..ca11049b3e883b --- /dev/null +++ b/packages/playground/optimize-deps/dep-linked-include/Test.vue @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/playground/optimize-deps-linked-include/foo.js b/packages/playground/optimize-deps/dep-linked-include/foo.js similarity index 100% rename from packages/playground/optimize-deps-linked-include/foo.js rename to packages/playground/optimize-deps/dep-linked-include/foo.js diff --git a/packages/playground/optimize-deps/dep-linked-include/index.mjs b/packages/playground/optimize-deps/dep-linked-include/index.mjs new file mode 100644 index 00000000000000..81c43abc0387ac --- /dev/null +++ b/packages/playground/optimize-deps/dep-linked-include/index.mjs @@ -0,0 +1,21 @@ +export { msg } from './foo.js' + +import { useState } from 'react' + +export function useCount() { + return useState(0) +} + +// test dep with css/asset imports +import './test.css' + +// test importing node built-ins +import fs from 'fs' + +if (false) { + fs.readFileSync() +} else { + console.log('ok') +} + +export { default as VueSFC } from './Test.vue' diff --git a/packages/playground/optimize-deps-linked-include/package.json b/packages/playground/optimize-deps/dep-linked-include/package.json similarity index 52% rename from packages/playground/optimize-deps-linked-include/package.json rename to packages/playground/optimize-deps/dep-linked-include/package.json index 79a03c3a91fc73..43533d4f02a6b6 100644 --- a/packages/playground/optimize-deps-linked-include/package.json +++ b/packages/playground/optimize-deps/dep-linked-include/package.json @@ -1,7 +1,7 @@ { - "name": "optimize-deps-linked-include", + "name": "dep-linked-include", "version": "0.0.0", - "main": "index.js", + "main": "index.mjs", "dependencies": { "react": "17.0.0" } diff --git a/packages/playground/optimize-deps/dep-linked-include/test.css b/packages/playground/optimize-deps/dep-linked-include/test.css new file mode 100644 index 00000000000000..b719c608467fdd --- /dev/null +++ b/packages/playground/optimize-deps/dep-linked-include/test.css @@ -0,0 +1,3 @@ +body { + color: red; +} \ No newline at end of file diff --git a/packages/playground/optimize-deps-linked/index.js b/packages/playground/optimize-deps/dep-linked/index.js similarity index 100% rename from packages/playground/optimize-deps-linked/index.js rename to packages/playground/optimize-deps/dep-linked/index.js diff --git a/packages/playground/optimize-deps-linked/package.json b/packages/playground/optimize-deps/dep-linked/package.json similarity index 74% rename from packages/playground/optimize-deps-linked/package.json rename to packages/playground/optimize-deps/dep-linked/package.json index 9f33b82460534a..b8ab3d859fe055 100644 --- a/packages/playground/optimize-deps-linked/package.json +++ b/packages/playground/optimize-deps/dep-linked/package.json @@ -1,5 +1,5 @@ { - "name": "optimize-deps-linked", + "name": "dep-linked", "version": "0.0.0", "main": "index.js", "dependencies": { diff --git a/packages/playground/optimize-deps/glob/foo.js b/packages/playground/optimize-deps/glob/foo.js new file mode 100644 index 00000000000000..7f2da6bfb1c276 --- /dev/null +++ b/packages/playground/optimize-deps/glob/foo.js @@ -0,0 +1,5 @@ +import axios from 'axios' + +axios.get('/ping').then((res) => { + document.querySelector('.cjs-browser-field').textContent = res.data +}) diff --git a/packages/playground/optimize-deps/index.html b/packages/playground/optimize-deps/index.html index d79167fa82bf80..b45bdd61de446f 100644 --- a/packages/playground/optimize-deps/index.html +++ b/packages/playground/optimize-deps/index.html @@ -2,10 +2,20 @@

Optimize Deps

CommonJS w/ named imports (react)

+

CommonJS w/ named imports (phoenix)

+
fail
+

CommonJS w/ default export (clipboard)

+
fail
+ -

CommonJS dynamic import (react)

+

CommonJS dynamic import default + named (react)

+

CommonJS dynamic import named (phoenix)

+
+

CommonJS dynamic import default (clipboard)

+
+

Dedupe (dep in linked & optimized package)

@@ -13,7 +23,7 @@

Dedupe (dep in linked & optimized package)

CommonJS w/ browser field mapping (axios)

-
This should show ping:
+
This should show pong:

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

This should show fooBarBaz:
@@ -21,16 +31,37 @@

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

Optimizing force included dep even when it's linked

+

import * as ...

+
+ +

Dep w/ special file format supported via plugins

+
+ +

Vue & Vuex

+
+ diff --git a/packages/playground/optimize-deps/package.json b/packages/playground/optimize-deps/package.json index 7b5e9c8fdb39be..36f7f564b521b8 100644 --- a/packages/playground/optimize-deps/package.json +++ b/packages/playground/optimize-deps/package.json @@ -5,14 +5,20 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "dependencies": { "axios": "^0.21.1", + "clipboard": "^2.0.6", + "dep-cjs-named-only": "link:./dep-cjs-named-only", + "dep-linked": "link:./dep-linked", + "dep-linked-include": "link:./dep-linked-include", + "phoenix": "^1.5.7", "react": "^17.0.1", "react-dom": "^17.0.1", "resolve-linked": "0.0.0", - "optimize-deps-linked": "0.0.0", - "optimize-deps-linked-include": "0.0.0" + "vue": "^3.0.5", + "vuex": "^4.0.0-rc.2" } } diff --git a/packages/playground/optimize-deps/vite.config.js b/packages/playground/optimize-deps/vite.config.js index 267e0ff2be1995..9e07904ef7ce61 100644 --- a/packages/playground/optimize-deps/vite.config.js +++ b/packages/playground/optimize-deps/vite.config.js @@ -1,3 +1,5 @@ +const vue = require('@vitejs/plugin-vue') + /** * @type {import('vite').UserConfig} */ @@ -5,7 +7,8 @@ module.exports = { dedupe: ['react'], optimizeDeps: { - include: ['optimize-deps-linked-include'] + include: ['dep-linked-include'], + plugins: [vue()] }, build: { @@ -14,11 +17,12 @@ module.exports = { }, plugins: [ + vue(), // for axios request test { name: 'mock', - configureServer({ app }) { - app.use('/ping', (_, res) => { + configureServer({ middlewares }) { + middlewares.use('/ping', (_, res) => { res.statusCode = 200 res.end('pong') }) diff --git a/packages/playground/react/package.json b/packages/playground/react/package.json index 38a33bb6b073d3..9213ed00802ee1 100644 --- a/packages/playground/react/package.json +++ b/packages/playground/react/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "dependencies": { "react": "^17.0.1", diff --git a/packages/playground/resolve/__tests__/resolve.spec.ts b/packages/playground/resolve/__tests__/resolve.spec.ts index 9ffe4199177e4e..69858977fa8f68 100644 --- a/packages/playground/resolve/__tests__/resolve.spec.ts +++ b/packages/playground/resolve/__tests__/resolve.spec.ts @@ -1,3 +1,5 @@ +import { isBuild } from '../../testUtils' + test('deep import', async () => { expect(await page.textContent('.deep-import')).toMatch('[2,4]') }) @@ -26,10 +28,20 @@ test('Respect exports field env key priority', async () => { expect(await page.textContent('.exports-env')).toMatch('[success]') }) -test('omitted index/*', async () => { +test('Respect production/development conditionals', async () => { + expect(await page.textContent('.exports-env')).toMatch( + isBuild ? `browser.prod.mjs` : `browser.mjs` + ) +}) + +test('implicit dir/index.js', async () => { expect(await page.textContent('.index')).toMatch('[success]') }) +test('implicit dir/index.js vs explicit file', async () => { + expect(await page.textContent('.dir-vs-file')).toMatch('[success]') +}) + test('filename with dot', async () => { expect(await page.textContent('.dot')).toMatch('[success]') }) diff --git a/packages/playground/resolve/browser-field/out/esm.browser.js b/packages/playground/resolve/browser-field/out/esm.browser.js index a1b93c89f71dd4..bddf03df0b0c22 100644 --- a/packages/playground/resolve/browser-field/out/esm.browser.js +++ b/packages/playground/resolve/browser-field/out/esm.browser.js @@ -1 +1,2 @@ +import jsdom from 'jsdom' // should be redireted to empty module export default '[success] resolve browser field' diff --git a/packages/playground/resolve/browser-field/package.json b/packages/playground/resolve/browser-field/package.json index 65cf0697d576f2..76d68b2ff25d57 100644 --- a/packages/playground/resolve/browser-field/package.json +++ b/packages/playground/resolve/browser-field/package.json @@ -5,6 +5,7 @@ "main": "out/cjs.node.js", "browser": { "./out/cjs.node.js": "./out/esm.browser.js", - "./not-browser.js": false + "./not-browser.js": false, + "jsdom": false } } diff --git a/packages/playground/resolve/dir.js b/packages/playground/resolve/dir.js new file mode 100644 index 00000000000000..96d7982ecd16fb --- /dev/null +++ b/packages/playground/resolve/dir.js @@ -0,0 +1 @@ +export const file = '[success] dir.js' diff --git a/packages/playground/resolve/dir/index.js b/packages/playground/resolve/dir/index.js new file mode 100644 index 00000000000000..604301f196eb9f --- /dev/null +++ b/packages/playground/resolve/dir/index.js @@ -0,0 +1 @@ +export const file = 'dir/index.js' diff --git a/packages/playground/resolve/exports-env/browser.prod.mjs b/packages/playground/resolve/exports-env/browser.prod.mjs new file mode 100644 index 00000000000000..8265343ed6220f --- /dev/null +++ b/packages/playground/resolve/exports-env/browser.prod.mjs @@ -0,0 +1 @@ +export const msg = '[success] exports env (browser.prod.mjs)' \ No newline at end of file diff --git a/packages/playground/resolve/exports-env/package.json b/packages/playground/resolve/exports-env/package.json index 4a61c1d8aec53e..766a6c7d40481d 100644 --- a/packages/playground/resolve/exports-env/package.json +++ b/packages/playground/resolve/exports-env/package.json @@ -3,7 +3,10 @@ "version": "1.0.0", "exports": { "import": { - "browser": "./browser.mjs" + "browser": { + "production": "./browser.prod.mjs", + "development": "./browser.mjs" + } }, "browser": "./browser.js", "default": "./fallback.umd.js" diff --git a/packages/playground/resolve/exports-path/package.json b/packages/playground/resolve/exports-path/package.json index 88370f08129fdc..603a18e67e75d4 100644 --- a/packages/playground/resolve/exports-path/package.json +++ b/packages/playground/resolve/exports-path/package.json @@ -8,9 +8,9 @@ }, "./deep.js": "./deep.js", "./dir/": "./dir/", - "./dir-mapped/": { - "import": "./dir/", - "require": "./dir-cjs/" + "./dir-mapped/*": { + "import": "./dir/*", + "require": "./dir-cjs/*" } } } diff --git a/packages/playground/resolve/index.html b/packages/playground/resolve/index.html index 5340254e94aed7..4e0a654ce33c87 100644 --- a/packages/playground/resolve/index.html +++ b/packages/playground/resolve/index.html @@ -1,7 +1,7 @@

Resolve

Deep import

-

Should show [2,4]:

fail

+

Should show [2,4]:fail

Entry resolving with exports field

fail

@@ -21,6 +21,9 @@

Exports field env priority

Resolve /index.*

fail

+

Resolve dir and file of the same name (should prioritize file)

+

fail

+

Resolve file name containing dot

fail

@@ -54,9 +57,7 @@

Inline package

yield 8 })() - text('.deep-import', JSON.stringify( - slicedToArray(iterable, 2) - )) + text('.deep-import', JSON.stringify(slicedToArray(iterable, 2))) // exports field import { msg } from 'resolve-exports-path' @@ -81,6 +82,10 @@

Inline package

import { foo } from './util' text('.index', foo()) + // implicit dir index vs. file + import { file } from './dir' + text('.dir-vs-file', file) + // filename with dot import { bar } from './util/bar.util' text('.dot', bar()) @@ -108,3 +113,12 @@

Inline package

import { msg as inlineMsg } from './inline-package' text('.inline-pkg', inlineMsg) + + diff --git a/packages/playground/resolve/package.json b/packages/playground/resolve/package.json index ad7b8903502fd2..ea9b0598a28442 100644 --- a/packages/playground/resolve/package.json +++ b/packages/playground/resolve/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "dependencies": { "resolve-exports-path": "link:./exports-path", diff --git a/packages/playground/shims.d.ts b/packages/playground/shims.d.ts index e57fcefbb79bb2..99ed8eb232b14f 100644 --- a/packages/playground/shims.d.ts +++ b/packages/playground/shims.d.ts @@ -2,3 +2,9 @@ declare module 'css-color-names' { const colors: Record export default colors } + +declare module '*.vue' { + import { ComponentOptions } from 'vue' + const component: ComponentOptions + export default component +} diff --git a/packages/playground/ssr-react/__tests__/serve.js b/packages/playground/ssr-react/__tests__/serve.js new file mode 100644 index 00000000000000..750a8554167719 --- /dev/null +++ b/packages/playground/ssr-react/__tests__/serve.js @@ -0,0 +1,58 @@ +// @ts-check +// this is automtically detected by scripts/jestPerTestSetup.ts and will replace +// the default e2e test serve behavior + +const path = require('path') + +const port = (exports.port = 9528) + +/** + * @param {string} root + * @param {boolean} isProd + */ +exports.serve = async function serve(root, isProd) { + if (isProd) { + // build first + const { build } = require('vite') + // client build + await build({ + root, + logLevel: 'error', + build: { + target: 'esnext', + minify: false, + ssrManifest: true, + outDir: 'dist/client' + } + }) + // server build + await build({ + root, + logLevel: 'error', + build: { + target: 'esnext', + ssr: 'src/entry-server.jsx', + outDir: 'dist/server' + } + }) + } + + const { createServer } = require(path.resolve(root, 'server.js')) + const { app, vite } = await createServer(root, isProd) + + return new Promise((resolve, reject) => { + try { + const server = app.listen(port, () => { + resolve({ + // for test teardown + close() { + server.close() + return vite && vite.close() + } + }) + }) + } catch (e) { + reject(e) + } + }) +} diff --git a/packages/playground/ssr-react/__tests__/ssr-react.spec.ts b/packages/playground/ssr-react/__tests__/ssr-react.spec.ts new file mode 100644 index 00000000000000..12660c81e4be14 --- /dev/null +++ b/packages/playground/ssr-react/__tests__/ssr-react.spec.ts @@ -0,0 +1,48 @@ +import { editFile, getColor, isBuild, untilUpdated } from '../../testUtils' +import { port } from './serve' +import fetch from 'node-fetch' + +const url = `http://localhost:${port}` + +test('/about', async () => { + await page.goto(url + '/about') + expect(await page.textContent('h1')).toMatch('About') + // should not have hydration mismatch + browserLogs.forEach((msg) => { + expect(msg).not.toMatch('Expected server HTML') + }) + + // raw http request + const aboutHtml = await (await fetch(url + '/about')).text() + expect(aboutHtml).toMatch('About') +}) + +test('/', async () => { + await page.goto(url) + expect(await page.textContent('h1')).toMatch('Home') + // should not have hydration mismatch + browserLogs.forEach((msg) => { + expect(msg).not.toMatch('Expected server HTML') + }) + + // raw http request + const html = await (await fetch(url)).text() + expect(html).toMatch('Home') +}) + +test('hmr', async () => { + editFile('src/pages/Home.jsx', (code) => + code.replace('

Home', '

changed') + ) + await untilUpdated(() => page.textContent('h1'), 'changed') +}) + +test('client navigation', async () => { + await page.click('a[href="/about"]') + await page.waitForTimeout(10) + expect(await page.textContent('h1')).toMatch('About') + editFile('src/pages/About.jsx', (code) => + code.replace('

About', '

changed') + ) + await untilUpdated(() => page.textContent('h1'), 'changed') +}) diff --git a/packages/playground/ssr-react/index.html b/packages/playground/ssr-react/index.html new file mode 100644 index 00000000000000..1c891c04355068 --- /dev/null +++ b/packages/playground/ssr-react/index.html @@ -0,0 +1,12 @@ + + + + + + Vite App + + +
+ + + diff --git a/packages/playground/ssr-react/package.json b/packages/playground/ssr-react/package.json new file mode 100644 index 00000000000000..abeec97120c776 --- /dev/null +++ b/packages/playground/ssr-react/package.json @@ -0,0 +1,27 @@ +{ + "name": "test-ssr-react", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "node server", + "build": "yarn build:client && yarn build:server", + "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 && yarn build:server && node prerender", + "serve": "cross-env NODE_ENV=production node server", + "debug": "node --inspect-brk server" + }, + "dependencies": { + "react": "^17.0.1", + "react-dom": "^17.0.1", + "react-router": "^5.2.0", + "react-router-dom": "^5.2.0" + }, + "devDependencies": { + "@vitejs/plugin-react-refresh": "^1.0.0", + "compression": "^1.7.4", + "cross-env": "^7.0.3", + "express": "^4.17.1", + "serve-static": "^1.14.1" + } +} diff --git a/packages/playground/ssr-react/prerender.js b/packages/playground/ssr-react/prerender.js new file mode 100644 index 00000000000000..ac88ef632ec6f5 --- /dev/null +++ b/packages/playground/ssr-react/prerender.js @@ -0,0 +1,32 @@ +// Pre-render the app into static HTML. +// run `yarn generate` and then `dist/static` can be served as a static site. + +const fs = require('fs') +const path = require('path') + +const toAbsolute = (p) => path.resolve(__dirname, p) + +const template = fs.readFileSync(toAbsolute('dist/static/index.html'), 'utf-8') +const { render } = require('./dist/server/entry-server.js') + +// determine routes to pre-render from src/pages +const routesToPrerender = fs + .readdirSync(toAbsolute('src/pages')) + .map((file) => { + const name = file.replace(/\.jsx$/, '').toLowerCase() + return name === 'home' ? `/` : `/${name}` + }) + +;(async () => { + // pre-render each route... + for (const url of routesToPrerender) { + const context = {} + const appHtml = await render(url, context) + + const html = template.replace(``, appHtml) + + const filePath = `dist/static${url === '/' ? '/index' : url}.html` + fs.writeFileSync(toAbsolute(filePath), html) + console.log('pre-rendered:', filePath) + } +})() diff --git a/packages/playground/ssr-react/server.js b/packages/playground/ssr-react/server.js new file mode 100644 index 00000000000000..4a6a653a3a781b --- /dev/null +++ b/packages/playground/ssr-react/server.js @@ -0,0 +1,88 @@ +// @ts-check +const fs = require('fs') +const path = require('path') +const express = require('express') + +const isTest = process.env.NODE_ENV === 'test' || !!process.env.VITE_TEST_BUILD + +async function createServer( + root = process.cwd(), + isProd = process.env.NODE_ENV === 'production' +) { + const resolve = (p) => path.resolve(__dirname, p) + + const indexProd = isProd + ? fs.readFileSync(resolve('dist/client/index.html'), 'utf-8') + : '' + + const app = express() + + /** + * @type {import('vite').ViteDevServer} + */ + let vite + if (!isProd) { + vite = await require('vite').createServer({ + root, + logLevel: isTest ? 'error' : 'info', + server: { + middlewareMode: true + } + }) + // use vite's connect instance as middleware + app.use(vite.middlewares) + } else { + app.use(require('compression')()) + app.use( + require('serve-static')(resolve('dist/client'), { + index: false + }) + ) + } + + app.use('*', async (req, res) => { + try { + const url = req.originalUrl + + let template, render + if (!isProd) { + // always read fresh template in dev + template = fs.readFileSync(resolve('index.html'), 'utf-8') + template = await vite.transformIndexHtml(url, template) + render = (await vite.ssrLoadModule('/src/entry-server.jsx')).render + } else { + template = indexProd + render = require('./dist/server/entry-server.js').render + } + + const context = {} + const appHtml = render(url, context) + + if (context.url) { + // Somewhere a `` was rendered + return res.redirect(301, context.url) + } + + const html = template.replace(``, appHtml) + + res.status(200).set({ 'Content-Type': 'text/html' }).end(html) + } catch (e) { + !isProd && vite.ssrFixStacktrace(e) + console.log(e.stack) + res.status(500).end(e.stack) + } + }) + + return { app, vite } +} + +if (!isTest) { + createServer().then(({ app }) => + app.listen(3000, () => { + console.log('http://localhost:3000') + }) + ) +} + +// for test use +exports.createServer = createServer diff --git a/packages/playground/ssr-react/src/App.jsx b/packages/playground/ssr-react/src/App.jsx new file mode 100644 index 00000000000000..1c598add666efb --- /dev/null +++ b/packages/playground/ssr-react/src/App.jsx @@ -0,0 +1,41 @@ +import { Link, Route, Switch } from 'react-router-dom' + +// Auto generates routes from files under ./pages +// https://vitejs.dev/guide/features.html#glob-import +const pages = import.meta.globEager('./pages/*.jsx') + +const routes = Object.keys(pages).map((path) => { + const name = path.match(/\.\/pages\/(.*)\.jsx$/)[1] + return { + name, + path: name === 'Home' ? '/' : `/${name.toLowerCase()}`, + component: pages[path].default + } +}) + +export function App() { + return ( + <> + + + {routes.map(({ path, component: RouteComp }) => { + return ( + + + + ) + })} + + + ) +} diff --git a/packages/playground/ssr-react/src/entry-client.jsx b/packages/playground/ssr-react/src/entry-client.jsx new file mode 100644 index 00000000000000..8757bdc929d0e4 --- /dev/null +++ b/packages/playground/ssr-react/src/entry-client.jsx @@ -0,0 +1,10 @@ +import ReactDOM from 'react-dom' +import { BrowserRouter } from 'react-router-dom' +import { App } from './App' + +ReactDOM.hydrate( + + + , + document.getElementById('app') +) diff --git a/packages/playground/ssr-react/src/entry-server.jsx b/packages/playground/ssr-react/src/entry-server.jsx new file mode 100644 index 00000000000000..56d4810d11ba3c --- /dev/null +++ b/packages/playground/ssr-react/src/entry-server.jsx @@ -0,0 +1,11 @@ +import ReactDOMServer from 'react-dom/server' +import { StaticRouter } from 'react-router-dom' +import { App } from './App' + +export function render(url, context) { + return ReactDOMServer.renderToString( + + + + ) +} diff --git a/packages/playground/ssr-react/src/main.jsx b/packages/playground/ssr-react/src/main.jsx new file mode 100644 index 00000000000000..f4df3e7a453d88 --- /dev/null +++ b/packages/playground/ssr-react/src/main.jsx @@ -0,0 +1,6 @@ +import React from 'react' +import Child from './App' + +export default function App() { + return +} diff --git a/packages/playground/ssr-react/src/pages/About.jsx b/packages/playground/ssr-react/src/pages/About.jsx new file mode 100644 index 00000000000000..22354540091f04 --- /dev/null +++ b/packages/playground/ssr-react/src/pages/About.jsx @@ -0,0 +1,3 @@ +export default function About() { + return

About

+} diff --git a/packages/playground/ssr-react/src/pages/Home.jsx b/packages/playground/ssr-react/src/pages/Home.jsx new file mode 100644 index 00000000000000..3e62e6933192cd --- /dev/null +++ b/packages/playground/ssr-react/src/pages/Home.jsx @@ -0,0 +1,3 @@ +export default function Home() { + return

Home

+} diff --git a/packages/playground/ssr-react/vite.config.js b/packages/playground/ssr-react/vite.config.js new file mode 100644 index 00000000000000..e6aab61311f851 --- /dev/null +++ b/packages/playground/ssr-react/vite.config.js @@ -0,0 +1,14 @@ +const reactRefresh = require('@vitejs/plugin-react-refresh') + +/** + * @type {import('vite').UserConfig} + */ +module.exports = { + plugins: [reactRefresh()], + esbuild: { + jsxInject: `import React from 'react';` + }, + build: { + minify: false + } +} diff --git a/packages/playground/ssr-vue/__tests__/serve.js b/packages/playground/ssr-vue/__tests__/serve.js new file mode 100644 index 00000000000000..3b929218b7eda8 --- /dev/null +++ b/packages/playground/ssr-vue/__tests__/serve.js @@ -0,0 +1,58 @@ +// @ts-check +// this is automtically detected by scripts/jestPerTestSetup.ts and will replace +// the default e2e test serve behavior + +const path = require('path') + +const port = (exports.port = 9527) + +/** + * @param {string} root + * @param {boolean} isProd + */ +exports.serve = async function serve(root, isProd) { + if (isProd) { + // build first + const { build } = require('vite') + // client build + await build({ + root, + logLevel: 'error', + build: { + target: 'esnext', + minify: false, + ssrManifest: true, + outDir: 'dist/client' + } + }) + // server build + await build({ + root, + logLevel: 'error', + build: { + target: 'esnext', + ssr: 'src/entry-server.js', + outDir: 'dist/server' + } + }) + } + + const { createServer } = require(path.resolve(root, 'server.js')) + const { app, vite } = await createServer(root, isProd) + + return new Promise((resolve, reject) => { + try { + const server = app.listen(port, () => { + resolve({ + // for test teardown + close() { + server.close() + return vite && vite.close() + } + }) + }) + } catch (e) { + reject(e) + } + }) +} diff --git a/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts b/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts new file mode 100644 index 00000000000000..d4a0167c0ee83e --- /dev/null +++ b/packages/playground/ssr-vue/__tests__/ssr-vue.spec.ts @@ -0,0 +1,100 @@ +import { editFile, getColor, isBuild, untilUpdated } from '../../testUtils' +import { port } from './serve' +import fetch from 'node-fetch' + +const url = `http://localhost:${port}` + +test('/about', async () => { + await page.goto(url + '/about') + expect(await page.textContent('h1')).toMatch('About') + // should not have hydration mismatch + browserLogs.forEach((msg) => { + expect(msg).not.toMatch('mismatch') + }) + + // fetch sub route + const aboutHtml = await (await fetch(url + '/about')).text() + expect(aboutHtml).toMatch('About') + if (isBuild) { + // assert correct preload directive generation for async chunks and CSS + expect(aboutHtml).not.toMatch( + /link rel="modulepreload".*?href="\/assets\/Home\.\w{8}\.js"/ + ) + expect(aboutHtml).not.toMatch( + /link rel="stylesheet".*?href="\/assets\/Home\.\w{8}\.css"/ + ) + expect(aboutHtml).toMatch( + /link rel="modulepreload".*?href="\/assets\/About\.\w{8}\.js"/ + ) + expect(aboutHtml).toMatch( + /link rel="stylesheet".*?href="\/assets\/About\.\w{8}\.css"/ + ) + } +}) + +test('/', async () => { + await page.goto(url) + expect(await page.textContent('h1')).toMatch('Home') + // should not have hydration mismatch + browserLogs.forEach((msg) => { + expect(msg).not.toMatch('mismatch') + }) + + const html = await (await fetch(url)).text() + expect(html).toMatch('Home') + if (isBuild) { + // assert correct preload directive generation for async chunks and CSS + expect(html).toMatch( + /link rel="modulepreload".*?href="\/assets\/Home\.\w{8}\.js"/ + ) + expect(html).toMatch( + /link rel="stylesheet".*?href="\/assets\/Home\.\w{8}\.css"/ + ) + expect(html).not.toMatch( + /link rel="modulepreload".*?href="\/assets\/About\.\w{8}\.js"/ + ) + expect(html).not.toMatch( + /link rel="stylesheet".*?href="\/assets\/About\.\w{8}\.css"/ + ) + } +}) + +test('css', async () => { + if (isBuild) { + expect(await getColor('h1')).toBe('green') + } else { + // During dev, the CSS is loaded from async chunk and we may have to wait + // when the test runs concurrently. + await untilUpdated(() => getColor('h1'), 'green') + } +}) + +test('asset', async () => { + // should have no 404s + browserLogs.forEach((msg) => { + expect(msg).not.toMatch('404') + }) + const img = await page.$('img') + expect(await img.getAttribute('src')).toMatch( + isBuild ? /\/assets\/logo\.\w{8}\.png/ : '/src/assets/logo.png' + ) +}) + +test('hydration', async () => { + expect(await page.textContent('button')).toMatch('0') + await page.click('button') + expect(await page.textContent('button')).toMatch('1') +}) + +test('hmr', async () => { + editFile('src/pages/Home.vue', (code) => code.replace('Home', 'changed')) + await untilUpdated(() => page.textContent('h1'), 'changed') +}) + +test('client navigation', async () => { + await page.click('a[href="/about"]') + await page.waitForTimeout(10) + expect(await page.textContent('h1')).toMatch('About') + editFile('src/pages/About.vue', (code) => code.replace('About', 'changed')) + await untilUpdated(() => page.textContent('h1'), 'changed') +}) diff --git a/packages/playground/ssr-vue/index.html b/packages/playground/ssr-vue/index.html new file mode 100644 index 00000000000000..17b46a2f7a2267 --- /dev/null +++ b/packages/playground/ssr-vue/index.html @@ -0,0 +1,13 @@ + + + + + + Vite App + + + +
+ + + diff --git a/packages/playground/ssr-vue/package.json b/packages/playground/ssr-vue/package.json new file mode 100644 index 00000000000000..bec3484fb3219c --- /dev/null +++ b/packages/playground/ssr-vue/package.json @@ -0,0 +1,27 @@ +{ + "name": "test-ssr-vue", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "node server", + "build": "yarn build:client && yarn build:server", + "build:client": "vite build --ssrManifest --outDir dist/client", + "build:server": "vite build --ssr src/entry-server.js --outDir dist/server", + "generate": "vite build --ssrManifest --outDir dist/static && yarn build:server && node prerender", + "serve": "cross-env NODE_ENV=production node server", + "debug": "node --inspect-brk server" + }, + "dependencies": { + "vue": "^3.0.5", + "vue-router": "^4.0.3" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^1.0.0", + "@vue/compiler-sfc": "^3.0.5", + "@vue/server-renderer": "^3.0.5", + "compression": "^1.7.4", + "cross-env": "^7.0.3", + "express": "^4.17.1", + "serve-static": "^1.14.1" + } +} diff --git a/packages/playground/ssr-vue/prerender.js b/packages/playground/ssr-vue/prerender.js new file mode 100644 index 00000000000000..5b47f6d2657080 --- /dev/null +++ b/packages/playground/ssr-vue/prerender.js @@ -0,0 +1,37 @@ +// Pre-render the app into static HTML. +// run `yarn generate` and then `dist/static` can be served as a static site. + +const fs = require('fs') +const path = require('path') + +const toAbsolute = (p) => path.resolve(__dirname, p) + +const manifest = require('./dist/static/ssr-manifest.json') +const template = fs.readFileSync(toAbsolute('dist/static/index.html'), 'utf-8') +const { render } = require('./dist/server/entry-server.js') + +// determine routes to pre-render from src/pages +const routesToPrerender = fs + .readdirSync(toAbsolute('src/pages')) + .map((file) => { + const name = file.replace(/\.vue$/, '').toLowerCase() + return name === 'home' ? `/` : `/${name}` + }) + +;(async () => { + // pre-render each route... + for (const url of routesToPrerender) { + const [appHtml, preloadLinks] = await render(url, manifest) + + const html = template + .replace(``, preloadLinks) + .replace(``, appHtml) + + const filePath = `dist/static${url === '/' ? '/index' : url}.html` + fs.writeFileSync(toAbsolute(filePath), html) + console.log('pre-rendered:', filePath) + } + + // done, delete ssr manifest + fs.unlinkSync(toAbsolute('dist/static/ssr-manifest.json')) +})() diff --git a/packages/playground/ssr-vue/server.js b/packages/playground/ssr-vue/server.js new file mode 100644 index 00000000000000..969ab6dacee01a --- /dev/null +++ b/packages/playground/ssr-vue/server.js @@ -0,0 +1,89 @@ +// @ts-check +const fs = require('fs') +const path = require('path') +const express = require('express') + +const isTest = process.env.NODE_ENV === 'test' || !!process.env.VITE_TEST_BUILD + +async function createServer( + root = process.cwd(), + isProd = process.env.NODE_ENV === 'production' +) { + const resolve = (p) => path.resolve(__dirname, p) + + const indexProd = isProd + ? fs.readFileSync(resolve('dist/client/index.html'), 'utf-8') + : '' + + const manifest = isProd + ? // @ts-ignore + require('./dist/client/ssr-manifest.json') + : {} + + const app = express() + + /** + * @type {import('vite').ViteDevServer} + */ + let vite + if (!isProd) { + vite = await require('vite').createServer({ + root, + logLevel: isTest ? 'error' : 'info', + server: { + middlewareMode: true + } + }) + // use vite's connect instance as middleware + app.use(vite.middlewares) + } else { + app.use(require('compression')()) + app.use( + require('serve-static')(resolve('dist/client'), { + index: false + }) + ) + } + + app.use('*', async (req, res) => { + try { + const url = req.originalUrl + + let template, render + if (!isProd) { + // always read fresh template in dev + template = fs.readFileSync(resolve('index.html'), 'utf-8') + template = await vite.transformIndexHtml(url, template) + render = (await vite.ssrLoadModule('/src/entry-server.js')).render + } else { + template = indexProd + render = require('./dist/server/entry-server.js').render + } + + const [appHtml, preloadLinks] = await render(url, manifest) + + const html = template + .replace(``, preloadLinks) + .replace(``, appHtml) + + res.status(200).set({ 'Content-Type': 'text/html' }).end(html) + } catch (e) { + vite && vite.ssrFixStacktrace(e) + console.log(e.stack) + res.status(500).end(e.stack) + } + }) + + return { app, vite } +} + +if (!isTest) { + createServer().then(({ app }) => + app.listen(3000, () => { + console.log('http://localhost:3000') + }) + ) +} + +// for test use +exports.createServer = createServer diff --git a/packages/playground/ssr-vue/src/App.vue b/packages/playground/ssr-vue/src/App.vue new file mode 100644 index 00000000000000..426915f6059392 --- /dev/null +++ b/packages/playground/ssr-vue/src/App.vue @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/packages/playground/ssr-vue/src/assets/logo.png b/packages/playground/ssr-vue/src/assets/logo.png new file mode 100644 index 00000000000000..f3d2503fc2a44b Binary files /dev/null and b/packages/playground/ssr-vue/src/assets/logo.png differ diff --git a/packages/playground/ssr-vue/src/entry-client.js b/packages/playground/ssr-vue/src/entry-client.js new file mode 100644 index 00000000000000..842acce7dc685b --- /dev/null +++ b/packages/playground/ssr-vue/src/entry-client.js @@ -0,0 +1,8 @@ +import { createApp } from './main' + +const { app, router } = createApp() + +// wait until router is ready before mounting to ensure hydration match +router.isReady().then(() => { + app.mount('#app') +}) diff --git a/packages/playground/ssr-vue/src/entry-server.js b/packages/playground/ssr-vue/src/entry-server.js new file mode 100644 index 00000000000000..b94f2d988d9964 --- /dev/null +++ b/packages/playground/ssr-vue/src/entry-server.js @@ -0,0 +1,51 @@ +import { createApp } from './main' +import { renderToString } from '@vue/server-renderer' + +export async function render(url, manifest) { + const { app, router } = createApp() + + // set the router to the desired URL before rendering + router.push(url) + await router.isReady() + + // passing SSR context object which will be available via useSSRContext() + // @vitejs/plugin-vue injects code into a component's setup() that registers + // itself on ctx.modules. After the render, ctx.modules would contain all the + // components that have been instantiated during this render call. + const ctx = {} + const html = await renderToString(app, ctx) + + // the SSR manifest generated by Vite contains module -> chunk/asset mapping + // which we can then use to determine what files need to be preloaded for this + // request. + const preloadLinks = renderPreloadLinks(ctx.modules, manifest) + return [html, preloadLinks] +} + +function renderPreloadLinks(modules, manifest) { + let links = '' + const seen = new Set() + modules.forEach((id) => { + const files = manifest[id] + if (files) { + files.forEach((file) => { + if (!seen.has(file)) { + seen.add(file) + links += renderPreloadLink(file) + } + }) + } + }) + return links +} + +function renderPreloadLink(file) { + if (file.endsWith('.js')) { + return `` + } else if (file.endsWith('.css')) { + return `` + } else { + // TODO + return '' + } +} diff --git a/packages/playground/ssr-vue/src/main.js b/packages/playground/ssr-vue/src/main.js new file mode 100644 index 00000000000000..dbf4287b0baf3c --- /dev/null +++ b/packages/playground/ssr-vue/src/main.js @@ -0,0 +1,13 @@ +import App from './App.vue' +import { createSSRApp } from 'vue' +import { createRouter } from './router' + +// SSR requires a fresh app instance per request, therefore we export a function +// that creates a fresh app instance. If using Vuex, we'd also be creating a +// fresh store here. +export function createApp() { + const app = createSSRApp(App) + const router = createRouter() + app.use(router) + return { app, router } +} diff --git a/packages/playground/ssr-vue/src/pages/About.vue b/packages/playground/ssr-vue/src/pages/About.vue new file mode 100644 index 00000000000000..fd0876306c509b --- /dev/null +++ b/packages/playground/ssr-vue/src/pages/About.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/packages/playground/ssr-vue/src/pages/Home.vue b/packages/playground/ssr-vue/src/pages/Home.vue new file mode 100644 index 00000000000000..f1b3c4742b721a --- /dev/null +++ b/packages/playground/ssr-vue/src/pages/Home.vue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/packages/playground/ssr-vue/src/router.js b/packages/playground/ssr-vue/src/router.js new file mode 100644 index 00000000000000..b80b76b0bf4e2a --- /dev/null +++ b/packages/playground/ssr-vue/src/router.js @@ -0,0 +1,26 @@ +import { + createMemoryHistory, + createRouter as _createRouter, + createWebHistory +} from 'vue-router' + +// Auto generates routes from vue files under ./pages +// https://vitejs.dev/guide/features.html#glob-import +const pages = import.meta.glob('./pages/*.vue') + +const routes = Object.keys(pages).map((path) => { + const name = path.match(/\.\/pages(.*)\.vue$/)[1].toLowerCase() + return { + path: name === '/home' ? '/' : name, + component: pages[path] // () => import('./pages/*.vue') + } +}) + +export function createRouter() { + return _createRouter({ + // use appropriate history implementation for server/client + // import.meta.env.SSR is injected by Vite. + history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(), + routes + }) +} diff --git a/packages/playground/ssr-vue/vite.config.js b/packages/playground/ssr-vue/vite.config.js new file mode 100644 index 00000000000000..d20f4dd734e760 --- /dev/null +++ b/packages/playground/ssr-vue/vite.config.js @@ -0,0 +1,11 @@ +const vuePlugin = require('@vitejs/plugin-vue') + +/** + * @type {import('vite').UserConfig} + */ +module.exports = { + plugins: [vuePlugin()], + build: { + minify: false + } +} diff --git a/packages/playground/testUtils.ts b/packages/playground/testUtils.ts index 59fa0af8080a56..027506c75f735f 100644 --- a/packages/playground/testUtils.ts +++ b/packages/playground/testUtils.ts @@ -67,6 +67,19 @@ export function editFile(filename: string, replacer: (str: string) => string) { fs.writeFileSync(filename, modified) } +export function addFile(filename: string, content: string) { + fs.writeFileSync(path.resolve(testDir, filename), content) +} + +export function removeFile(filename: string) { + fs.unlinkSync(path.resolve(testDir, filename)) +} + +export function listAssets(base = '') { + const assetsDir = path.join(testDir, 'dist', base, 'assets') + return fs.readdirSync(assetsDir) +} + export function findAssetFile(match: string | RegExp, base = '') { const assetsDir = path.join(testDir, 'dist', base, 'assets') const files = fs.readdirSync(assetsDir) @@ -76,6 +89,12 @@ export function findAssetFile(match: string | RegExp, base = '') { return file ? fs.readFileSync(path.resolve(assetsDir, file), 'utf-8') : '' } +export function readManifest(base = '') { + return JSON.parse( + fs.readFileSync(path.join(testDir, 'dist', base, 'manifest.json'), 'utf-8') + ) +} + /** * Poll a getter until the value it returns includes the expected value. */ @@ -84,7 +103,7 @@ export async function untilUpdated( expected: string ) { if (isBuild) return - const maxTries = process.env.CI ? 100 : 20 + const maxTries = process.env.CI ? 100 : 50 for (let tries = 0; tries < maxTries; tries++) { const actual = (await poll()) || '' if (actual.indexOf(expected) > -1 || tries === maxTries - 1) { diff --git a/packages/playground/tsconfig.json b/packages/playground/tsconfig.json index 14bc3bf1ce2e18..d60edb9f78c801 100644 --- a/packages/playground/tsconfig.json +++ b/packages/playground/tsconfig.json @@ -2,11 +2,13 @@ "include": ["."], "exclude": ["**/dist/**"], "compilerOptions": { + "target": "es2019", "outDir": "dist", "allowJs": true, "esModuleInterop": true, + "moduleResolution": "node", "baseUrl": ".", "jsx": "preserve", - "types": ["vite/client", "jest"] + "types": ["vite/client", "jest", "node"] } } diff --git a/packages/playground/vue-jsx/__tests__/vue-jsx.spec.ts b/packages/playground/vue-jsx/__tests__/vue-jsx.spec.ts index 3a54cfdbf011e4..104d3bd52642b9 100644 --- a/packages/playground/vue-jsx/__tests__/vue-jsx.spec.ts +++ b/packages/playground/vue-jsx/__tests__/vue-jsx.spec.ts @@ -1,4 +1,4 @@ -import { editFile, isBuild, untilUpdated } from '../../testUtils' +import { editFile, isBuild, untilUpdated } from 'testUtils' test('should render', async () => { expect(await page.textContent('.named')).toMatch('0') @@ -25,9 +25,10 @@ if (!isBuild) { ) await untilUpdated(() => page.textContent('.named'), 'named updated 0') - // should not affect other components on the page - expect(await page.textContent('.named-specifier')).toMatch('2') - expect(await page.textContent('.default')).toMatch('3') + // affect all components in same file + expect(await page.textContent('.named-specifier')).toMatch('1') + expect(await page.textContent('.default')).toMatch('2') + // should not affect other components from different file expect(await page.textContent('.default-tsx')).toMatch('4') }) @@ -40,8 +41,9 @@ if (!isBuild) { 'named specifier updated 1' ) + // affect all components in same file + expect(await page.textContent('.default')).toMatch('2') // should not affect other components on the page - expect(await page.textContent('.default')).toMatch('3') expect(await page.textContent('.default-tsx')).toMatch('4') }) diff --git a/packages/playground/vue-jsx/index.html b/packages/playground/vue-jsx/index.html index aac41137236e7e..a285a008c13a9e 100644 --- a/packages/playground/vue-jsx/index.html +++ b/packages/playground/vue-jsx/index.html @@ -1,2 +1,2 @@
- \ No newline at end of file + diff --git a/packages/playground/vue-jsx/package.json b/packages/playground/vue-jsx/package.json index 8c1ad4c2d27032..ac4f309ffb58d3 100644 --- a/packages/playground/vue-jsx/package.json +++ b/packages/playground/vue-jsx/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "devDependencies": { "@vitejs/plugin-vue-jsx": "^1.0.0" diff --git a/packages/playground/vue/package.json b/packages/playground/vue/package.json index 2f8bedf648c9da..612a8f6a9073e9 100644 --- a/packages/playground/vue/package.json +++ b/packages/playground/vue/package.json @@ -5,14 +5,15 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" }, "dependencies": { - "vue": "^3.0.4" + "vue": "^3.0.5" }, "devDependencies": { "@vitejs/plugin-vue": "^1.0.0", - "@vue/compiler-sfc": "^3.0.4", + "@vue/compiler-sfc": "^3.0.5", "js-yaml": "^3.14.1", "less": "^3.13.0", "pug": "^3.0.0", diff --git a/packages/playground/vue/src-import/SrcImport.vue b/packages/playground/vue/src-import/SrcImport.vue index 9ff8831029f10c..ac7ec78c869e65 100644 --- a/packages/playground/vue/src-import/SrcImport.vue +++ b/packages/playground/vue/src-import/SrcImport.vue @@ -1,3 +1,3 @@ - + diff --git a/packages/playground/vue/vite.config.ts b/packages/playground/vue/vite.config.ts index 707f3fbe5a89ce..bbd23bbaac830e 100644 --- a/packages/playground/vue/vite.config.ts +++ b/packages/playground/vue/vite.config.ts @@ -1,11 +1,20 @@ +import path from 'path' import { defineConfig } from 'vite' import vuePlugin from '@vitejs/plugin-vue' import { vueI18nPlugin } from './CustomBlockPlugin' export default defineConfig({ + alias: { + '/@': __dirname + }, plugins: [vuePlugin(), vueI18nPlugin], build: { // to make tests faster minify: false + }, + css: { + modules: { + localsConvention: 'camelCaseOnly' + } } }) diff --git a/packages/playground/wasm/index.html b/packages/playground/wasm/index.html index 0e57ccb0cc6e4b..27bdc8167e064e 100644 --- a/packages/playground/wasm/index.html +++ b/packages/playground/wasm/index.html @@ -19,18 +19,21 @@

When wasm is output, result should be 24

async function testWasm(init, resultElement) { const { exported_func } = await init({ imports: { - imported_func: (res) => resultElement.textContent = res + imported_func: (res) => (resultElement.textContent = res) } }) exported_func() } - document.querySelector('.inline-wasm .run') + document + .querySelector('.inline-wasm .run') .addEventListener('click', async () => - testWasm(light, document.querySelector('.inline-wasm .result'))) + testWasm(light, document.querySelector('.inline-wasm .result')) + ) - document.querySelector('.output-wasm .run') + document + .querySelector('.output-wasm .run') .addEventListener('click', async () => - testWasm(heavy, document.querySelector('.output-wasm .result'))) - + testWasm(heavy, document.querySelector('.output-wasm .result')) + ) diff --git a/packages/playground/wasm/package.json b/packages/playground/wasm/package.json index b0603222524f42..4ecd7d5a883564 100644 --- a/packages/playground/wasm/package.json +++ b/packages/playground/wasm/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" } } diff --git a/packages/playground/worker/__tests__/worker.spec.ts b/packages/playground/worker/__tests__/worker.spec.ts index 4251d375e99a85..eb0d457754209d 100644 --- a/packages/playground/worker/__tests__/worker.spec.ts +++ b/packages/playground/worker/__tests__/worker.spec.ts @@ -5,6 +5,10 @@ import { untilUpdated, isBuild, testDir } from '../../testUtils' test('normal', async () => { await page.click('.ping') await untilUpdated(() => page.textContent('.pong'), 'pong') + await untilUpdated( + () => page.textContent('.mode'), + isBuild ? 'production' : 'development' + ) }) test('inlined', async () => { diff --git a/packages/playground/worker/index.html b/packages/playground/worker/index.html index 29f6f51e9e5047..e7bd7c78c1adb2 100644 --- a/packages/playground/worker/index.html +++ b/packages/playground/worker/index.html @@ -1,5 +1,7 @@ -
Response from worker:
+
+ Response from worker: +
Response from inline worker:
@@ -10,7 +12,8 @@ const worker = new Worker() worker.addEventListener('message', (e) => { - document.querySelector('.pong').textContent = e.data + document.querySelector('.pong').textContent = e.data.msg + document.querySelector('.mode').textContent = e.data.mode }) document.querySelector('.ping').addEventListener('click', () => { @@ -19,7 +22,7 @@ const inlineWorker = new InlineWorker() inlineWorker.addEventListener('message', (e) => { - document.querySelector('.pong-inline').textContent = e.data + document.querySelector('.pong-inline').textContent = e.data.msg }) document.querySelector('.ping-inline').addEventListener('click', () => { diff --git a/packages/playground/worker/my-worker.ts b/packages/playground/worker/my-worker.ts index a36e3e812a04ba..2bcce3faa8a50e 100644 --- a/packages/playground/worker/my-worker.ts +++ b/packages/playground/worker/my-worker.ts @@ -1,7 +1,7 @@ -import { msg } from './workerImport' +import { msg, mode } from './workerImport' self.onmessage = (e) => { if (e.data === 'ping') { - self.postMessage(msg) + self.postMessage({ msg, mode }) } } diff --git a/packages/playground/worker/package.json b/packages/playground/worker/package.json index abf6cfeee5551c..04fd69b27dab34 100644 --- a/packages/playground/worker/package.json +++ b/packages/playground/worker/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "vite", "build": "vite build", - "debug": "node --inspect-brk ../../vite/bin/vite" + "debug": "node --inspect-brk ../../vite/bin/vite", + "serve": "vite preview" } } diff --git a/packages/playground/worker/workerImport.js b/packages/playground/worker/workerImport.js index b06eff50b47ec6..1938d643b7eb0d 100644 --- a/packages/playground/worker/workerImport.js +++ b/packages/playground/worker/workerImport.js @@ -1 +1,2 @@ export const msg = 'pong' +export const mode = process.env.NODE_ENV diff --git a/packages/plugin-legacy/CHANGELOG.md b/packages/plugin-legacy/CHANGELOG.md index 0feacab27a8ba0..84cb9caf3f99d5 100644 --- a/packages/plugin-legacy/CHANGELOG.md +++ b/packages/plugin-legacy/CHANGELOG.md @@ -1,3 +1,50 @@ +## [1.2.3](https://github.com/vitejs/vite/compare/plugin-legacy@1.2.2...plugin-legacy@1.2.3) (2021-02-01) + + +### Features + +* **plugin-legacy:** use compact output when transpiling legacy chunks ([045e519](https://github.com/vitejs/vite/commit/045e519d51fbce94bddb60793e9e99311acc5aa2)), closes [#1828](https://github.com/vitejs/vite/issues/1828) + + + +## [1.2.2](https://github.com/vitejs/vite/compare/plugin-legacy@1.2.1...plugin-legacy@1.2.2) (2021-01-25) + + +### Bug Fixes + +* **plugin-legacy:** throw error when using esbuild minify with legacy plugin ([8fb2511](https://github.com/vitejs/vite/commit/8fb2511a02c163d85f60dfab0bef104756768e35)) + + +### Features + +* default vendor chunk splitting ([f6b58a0](https://github.com/vitejs/vite/commit/f6b58a0f535b1c26f9c1dfda74c28c685402c3c9)) +* support `base` option during dev, deprecate `build.base` ([#1556](https://github.com/vitejs/vite/issues/1556)) ([809d4bd](https://github.com/vitejs/vite/commit/809d4bd3bf62d3bc6b35f182178922d2ab2175f1)) + + + +## [1.2.1](https://github.com/vitejs/vite/compare/plugin-legacy@1.2.0...plugin-legacy@1.2.1) (2021-01-14) + + +### Bug Fixes + +* **plugin-legacy:** respect config.build.assetsDir ([#1532](https://github.com/vitejs/vite/issues/1532)) ([3e7ad3f](https://github.com/vitejs/vite/commit/3e7ad3fa26a6149b44b2e522648cbda1009e4888)), closes [#1530](https://github.com/vitejs/vite/issues/1530) + + + +# [1.2.0](https://github.com/vitejs/vite/compare/plugin-legacy@1.1.1...plugin-legacy@1.2.0) (2021-01-11) + + +### Bug Fixes + +* **plugin-html:** typo in the Safari 10 nomodule snippet ([#1483](https://github.com/vitejs/vite/issues/1483)) ([e5576c3](https://github.com/vitejs/vite/commit/e5576c32c08214766c8bac5458dfcad8301d3a1a)) + + +### Features + +* **plugin-legacy:** support additionalLegacyPolyfills ([ca25896](https://github.com/vitejs/vite/commit/ca258962957c32df0196f30267c3d77b544aacbd)), closes [#1475](https://github.com/vitejs/vite/issues/1475) + + + ## [1.1.1](https://github.com/vitejs/vite/compare/plugin-legacy@1.1.0...plugin-legacy@1.1.1) (2021-01-09) diff --git a/packages/plugin-legacy/README.md b/packages/plugin-legacy/README.md index 4adf8a4de8e509..259550b48fb404 100644 --- a/packages/plugin-legacy/README.md +++ b/packages/plugin-legacy/README.md @@ -49,6 +49,14 @@ export default { Set to `false` to avoid generating polyfills and handle it yourself (will still generate legacy chunks with syntax transformations). +### `additionalLegacyPolyfills` + +- **Type:** `string[]` + + Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option. + + Note: if additional plyfills are needed for both the modern and legacy chunks, they can simply be imported in the application source code. + ### `ignoreBrowserslistConfig` - **Type:** `boolean` diff --git a/packages/plugin-legacy/index.d.ts b/packages/plugin-legacy/index.d.ts index 6a88de581ce8ce..1e2c1b81f08cd1 100644 --- a/packages/plugin-legacy/index.d.ts +++ b/packages/plugin-legacy/index.d.ts @@ -13,6 +13,7 @@ export interface Options { * default: true */ polyfills?: boolean | string[] + additionalLegacyPolyfills?: string[] /** * default: false */ diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 1244856238cff8..b803b3bb837a7a 100644 --- a/packages/plugin-legacy/index.js +++ b/packages/plugin-legacy/index.js @@ -56,6 +56,11 @@ function viteLegacyPlugin(options = {}) { } }) } + if (Array.isArray(options.additionalLegacyPolyfills)) { + options.additionalLegacyPolyfills.forEach((i) => { + legacyPolyfills.add(i) + }) + } /** * @type {import('vite').Plugin} @@ -64,6 +69,15 @@ function viteLegacyPlugin(options = {}) { name: 'legacy-generate-polyfill-chunk', apply: 'build', + configResolved(config) { + if (config.build.minify === 'esbuild') { + throw new Error( + `Can't use esbuild as the minifier when targeting legacy browsers ` + + `because esbuild minification is not legacy safe.` + ) + } + }, + async generateBundle(opts, bundle) { if (!isLegacyOutput(opts)) { if (!modernPolyfills.size) { @@ -79,7 +93,7 @@ function viteLegacyPlugin(options = {}) { modernPolyfills, bundle, facadeToModernPolyfillMap, - config.build.minify + config.build ) return } @@ -109,7 +123,7 @@ function viteLegacyPlugin(options = {}) { facadeToLegacyPolyfillMap, // force using terser for legacy polyfill minification, since esbuild // isn't legacy-safe - config.build.minify ? 'terser' : false + config.build ) } } @@ -190,9 +204,17 @@ function viteLegacyPlugin(options = {}) { let { code, ast, map } = loadBabel().transform(raw, { ast: true, configFile: false, + compact: true, sourceMaps, inputSourceMap: sourceMaps && chunk.map, presets: [ + // forcing our plugin to run before preset-env by wrapping it in a + // preset so we can catch the injected import statements... + [ + () => ({ + plugins: [recordAndRemovePolyfillBabelPlugin(legacyPolyfills)] + }) + ], [ 'env', { @@ -211,20 +233,6 @@ function viteLegacyPlugin(options = {}) { ] }) - if (needPolyfills) { - // detect and remove polyfill imports. Since the legacy bundle uses - // format: 'system', any import declarations are polyfill imports injected - // by @babel/preset-env. - for (const node of ast.program.body) { - if (node.type === 'ImportDeclaration') { - legacyPolyfills.add(node.source.value) - } - } - // remove import declarations, perserve line positions so we don't need - // to generate a source map again. - code = code.replace(/^import ".*";/gm, '//') - } - return { code, map } }, @@ -251,7 +259,7 @@ function viteLegacyPlugin(options = {}) { tag: 'script', attrs: { type: 'module', - src: `${config.build.base}${modernPolyfillFilename}` + src: `${config.base}${modernPolyfillFilename}` } }) } else if (modernPolyfills.size) { @@ -267,7 +275,7 @@ function viteLegacyPlugin(options = {}) { // 2. inject Safari 10 nomodule fix tags.push({ tag: 'script', - attrs: { nomdoule: true }, + attrs: { nomodule: true }, children: safari10NoModuleFix, injectTo: 'body' }) @@ -281,7 +289,7 @@ function viteLegacyPlugin(options = {}) { tag: 'script', attrs: { nomodule: true, - src: `${config.build.base}${legacyPolyfillFilename}` + src: `${config.base}${legacyPolyfillFilename}` }, injectTo: 'body' }) @@ -304,7 +312,7 @@ function viteLegacyPlugin(options = {}) { // script content will stay consistent - which allows using a constant // hash value for CSP. id: legacyEntryId, - 'data-src': config.build.base + legacyEntryFilename + 'data-src': config.base + legacyEntryFilename }, children: systemJSInlineCode, injectTo: 'body' @@ -377,15 +385,17 @@ function detectPolyfills(code, targets, list) { * @param {Set} imports * @param {import('rollup').OutputBundle} bundle * @param {Map} facadeToChunkMap - * @param {import('vite').BuildOptions['minify']} minify + * @param {import('vite').BuildOptions} buildOptions */ async function buildPolyfillChunk( name, imports, bundle, facadeToChunkMap, - minify + buildOptions ) { + let { minify, assetsDir } = buildOptions + minify = minify ? 'terser' : false const res = await build({ // so that everything is resolved from here root: __dirname, @@ -396,12 +406,14 @@ async function buildPolyfillChunk( write: false, target: false, minify, + assetsDir, rollupOptions: { input: { [name]: polyfillId }, output: { - format: name.includes('legacy') ? 'iife' : 'es' + format: name.includes('legacy') ? 'iife' : 'es', + manualChunks: undefined } } } @@ -457,6 +469,27 @@ function isLegacyOutput(options) { ) } +/** + * @param {Set} polyfills + */ +function recordAndRemovePolyfillBabelPlugin(polyfills) { + return ({ types: t }) => ({ + name: 'vite-remove-polyfill-import', + visitor: { + Program: { + exit(path) { + path.get('body').forEach((p) => { + if (t.isImportDeclaration(p)) { + polyfills.add(p.node.source.value) + p.remove() + } + }) + } + } + } + }) +} + module.exports = viteLegacyPlugin viteLegacyPlugin.default = viteLegacyPlugin diff --git a/packages/plugin-legacy/package.json b/packages/plugin-legacy/package.json index d7f824d96684a0..56b502ca5487a3 100644 --- a/packages/plugin-legacy/package.json +++ b/packages/plugin-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-legacy", - "version": "1.1.1", + "version": "1.2.3", "license": "MIT", "author": "Evan You", "files": [ diff --git a/packages/plugin-react-refresh/CHANGELOG.md b/packages/plugin-react-refresh/CHANGELOG.md index e704efc36bb0de..0c8308e2929c95 100644 --- a/packages/plugin-react-refresh/CHANGELOG.md +++ b/packages/plugin-react-refresh/CHANGELOG.md @@ -1,3 +1,48 @@ +## [1.2.2](https://github.com/vitejs/vite/compare/plugin-react-refresh@1.2.1...plugin-react-refresh@1.2.2) (2021-02-02) + + +### Bug Fixes + +* **plugin-react-refresh:** do not pick up config file in react-refresh plugin ([9d560d8](https://github.com/vitejs/vite/commit/9d560d8ed23d02c8ce4ec8c4cfa2aab8d30e89f0)) + + + +## [1.2.1](https://github.com/vitejs/vite/compare/plugin-react-refresh@1.2.0...plugin-react-refresh@1.2.1) (2021-02-02) + + +### Bug Fixes + +* **plugin-react-refresh:** avoid using optional chaining for Node 12 compat ([9d9fa17](https://github.com/vitejs/vite/commit/9d9fa1787558f3dcb1866644c0ebbfaa3f208e5d)), closes [#1851](https://github.com/vitejs/vite/issues/1851) + + + +# [1.2.0](https://github.com/vitejs/vite/compare/plugin-react-refresh@1.1.3...plugin-react-refresh@1.2.0) (2021-02-02) + + +### Features + +* **plugin-react-refresh:** allow specifying additional parser plugins ([435da60](https://github.com/vitejs/vite/commit/435da60785aac2d1336cf62e3c5335523606fd7a)) + + + +## [1.1.3](https://github.com/vitejs/vite/compare/plugin-react-refresh@1.1.2...plugin-react-refresh@1.1.3) (2021-01-29) + + +### Bug Fixes + +* **plugin-react-refresh:** fix react refresh with base option ([59c4e7f](https://github.com/vitejs/vite/commit/59c4e7f824a7d7db689215568b66d68570e3f3da)), closes [#1787](https://github.com/vitejs/vite/issues/1787) + + + +## [1.1.2](https://github.com/vitejs/vite/compare/plugin-react-refresh@1.1.1...plugin-react-refresh@1.1.2) (2021-01-19) + + +### Bug Fixes + +* **plugin-react-refresh:** skip during ssr ([d1383ed](https://github.com/vitejs/vite/commit/d1383ed126b37b922a532ff6cb59b32c0a97e1a2)) + + + ## [1.1.1](https://github.com/vitejs/vite/compare/plugin-react-refresh@1.1.0...plugin-react-refresh@1.1.1) (2021-01-06) diff --git a/packages/plugin-react-refresh/README.md b/packages/plugin-react-refresh/README.md index b085d2a03d6349..cb73bfbf86d217 100644 --- a/packages/plugin-react-refresh/README.md +++ b/packages/plugin-react-refresh/README.md @@ -9,4 +9,50 @@ import reactRefresh from '@vitejs/plugin-react-refresh' export default { plugins: [reactRefresh()] } -``` \ No newline at end of file +``` + +## Specifying Additional Parser Plugins + +If you are using ES syntax that are still in proposal status (e.g. class properties), you can selectively enable them via the `parserPlugins` option: + +```js +export default { + plugins: [reactRefresh({ + parserPlugins: [ + 'classProperties', + 'classPrivateProperties + ] + })] +} +``` + +[Full list of Babel parser plugins](https://babeljs.io/docs/en/babel-parser#ecmascript-proposalshttpsgithubcombabelproposals). + +**Notes** + +- If using TSX, any TS-supported syntax will already be transpiled away so you won't need to specify them here. + +- This option only enables the plugin to parse these syntax - it does not perform any transpilation since this plugin is dev-only. + +- If you wish to transpile the syntax for production, you will need to configure the transform separately using [@rollup/plugin-babel](https://github.com/rollup/plugins/tree/master/packages/babel) as a build-only plugin. + +## Middleware Mode Notes + +When Vite is launched in **Middleware Mode**, you need to make sure your entry `index.html` file is transformed with `ViteDevServer.transformIndexHtml`. Otherwise, you may get an error prompting `Uncaught Error: vite-plugin-react can't detect preamble. Something is wrong.` + +To mitigate this issue, you can explicitly transform your `index.html` like this when configuring your express server: + +```ts +app.get('/', async (req, res, next) => { + try { + let html = fs.readFileSync( + path.resolve(root, 'index.html'), + 'utf-8' + ); + html = await viteServer.transformIndexHtml(req.url, html); + res.send(html); + } catch (e) { + return next(e); + } +}); +``` diff --git a/packages/plugin-react-refresh/index.d.ts b/packages/plugin-react-refresh/index.d.ts index 77dc36bb496444..f5197c9089f7b5 100644 --- a/packages/plugin-react-refresh/index.d.ts +++ b/packages/plugin-react-refresh/index.d.ts @@ -1,5 +1,12 @@ import { Plugin } from 'vite' +import { ParserOptions } from '@babel/core' -declare function createPlugin(): Plugin +type PluginFactory = (options?: Options) => Plugin -export = createPlugin +declare const createPlugin: PluginFactory & { preambleCode: string } + +export interface Options { + parserPlugins: ParserOptions['plugins'] +} + +export default createPlugin diff --git a/packages/plugin-react-refresh/index.js b/packages/plugin-react-refresh/index.js index f8b5c5c67adfcc..3a195caf89f1e8 100644 --- a/packages/plugin-react-refresh/index.js +++ b/packages/plugin-react-refresh/index.js @@ -21,19 +21,29 @@ exports.performReactRefresh = debounce(exports.performReactRefresh, 16) export default exports ` +const preambleCode = ` +import RefreshRuntime from "__BASE__${runtimePublicPath.slice(1)}" +RefreshRuntime.injectIntoGlobalHook(window) +window.$RefreshReg$ = () => {} +window.$RefreshSig$ = () => (type) => type +window.__vite_plugin_react_preamble_installed__ = true +` + /** * Transform plugin for transforming and injecting per-file refresh code. * - * @returns {import('vite').Plugin} + * @type {import('.').default} */ -module.exports = function reactRefreshPlugin() { +function reactRefreshPlugin(opts) { let shouldSkip = false + let base = '/' return { name: 'react-refresh', configResolved(config) { shouldSkip = config.command === 'build' || config.isProduction + base = config.base }, resolveId(id) { @@ -48,8 +58,8 @@ module.exports = function reactRefreshPlugin() { } }, - transform(code, id) { - if (shouldSkip) { + transform(code, id, ssr) { + if (shouldSkip || ssr) { return } @@ -65,6 +75,12 @@ module.exports = function reactRefreshPlugin() { const isReasonReact = id.endsWith('.bs.js') const result = transformSync(code, { + configFile: false, + parserOpts: { + sourceType: 'module', + allowAwaitOutsideFunction: true, + plugins: opts && opts.parserPlugins + }, plugins: [ require('@babel/plugin-syntax-import-meta'), [require('react-refresh/babel'), { skipEnvCheck: true }] @@ -87,7 +103,7 @@ module.exports = function reactRefreshPlugin() { if (!window.__vite_plugin_react_preamble_installed__) { throw new Error( - "vite-plugin-react can't detect preamble. Something is wrong" + + "vite-plugin-react can't detect preamble. Something is wrong. " + "See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201" ); } @@ -134,13 +150,7 @@ module.exports = function reactRefreshPlugin() { { tag: 'script', attrs: { type: 'module' }, - children: ` - import RefreshRuntime from "${runtimePublicPath}" - RefreshRuntime.injectIntoGlobalHook(window) - window.$RefreshReg$ = () => {} - window.$RefreshSig$ = () => (type) => type - window.__vite_plugin_react_preamble_installed__ = true - ` + children: preambleCode.replace(`__BASE__`, base) } ] } @@ -175,3 +185,7 @@ function isRefreshBoundary(ast) { function isComponentishName(name) { return typeof name === 'string' && name[0] >= 'A' && name[0] <= 'Z' } + +module.exports = reactRefreshPlugin +reactRefreshPlugin['default'] = reactRefreshPlugin +reactRefreshPlugin.preambleCode = preambleCode diff --git a/packages/plugin-react-refresh/package.json b/packages/plugin-react-refresh/package.json index 61a7bc46bd62f2..c493913ab907ff 100644 --- a/packages/plugin-react-refresh/package.json +++ b/packages/plugin-react-refresh/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-react-refresh", - "version": "1.1.1", + "version": "1.2.2", "license": "MIT", "author": "Evan You", "files": [ diff --git a/packages/plugin-vue-jsx/CHANGELOG.md b/packages/plugin-vue-jsx/CHANGELOG.md index 70d26f58d1cc1e..f8824dd2e240a9 100644 --- a/packages/plugin-vue-jsx/CHANGELOG.md +++ b/packages/plugin-vue-jsx/CHANGELOG.md @@ -1,3 +1,19 @@ +## [1.0.2](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.0.1...plugin-vue-jsx@1.0.2) (2021-01-12) + + +### Bug Fixes + +* **plugin-vue-jsx:** files should include `index.d.ts` ([#1473](https://github.com/vitejs/vite/issues/1473)) [skip ci] ([f3ab497](https://github.com/vitejs/vite/commit/f3ab497b762e267721ace628bc6c7c5695b0d431)) +* **plugin-vue-jsx:** fix define call check ([#1480](https://github.com/vitejs/vite/issues/1480)) ([4ea065f](https://github.com/vitejs/vite/commit/4ea065f6278f30c022ed291bfb0412a674b18dd4)) +* **plugin-vue-jsx:** fix vue jsx hmr ([#1495](https://github.com/vitejs/vite/issues/1495)) ([6bdc3eb](https://github.com/vitejs/vite/commit/6bdc3eb2d004a28d2934946e33602f832b1ad8f2)) + + +### Performance Improvements + +* **plugin-vue-jsx:** only gen source map when necessary ([bfa8530](https://github.com/vitejs/vite/commit/bfa8530fc60deada634c38cfd6a23ab8ca05d47c)) + + + ## [1.0.1](https://github.com/vitejs/vite/compare/plugin-vue-jsx@1.0.0...plugin-vue-jsx@1.0.1) (2021-01-04) diff --git a/packages/plugin-vue-jsx/index.js b/packages/plugin-vue-jsx/index.js index 40ec3eeb62ce60..86d27be65008b2 100644 --- a/packages/plugin-vue-jsx/index.js +++ b/packages/plugin-vue-jsx/index.js @@ -62,7 +62,7 @@ function vueJsxPlugin(options = {}) { // check for hmr injection /** - * @type {{ name: string, hash: string }[]} + * @type {{ name: string }[]} */ const declaredComponents = [] /** @@ -70,7 +70,6 @@ function vueJsxPlugin(options = {}) { * local: string, * exported: string, * id: string, - * hash: string * }[]} */ const hotComponents = [] @@ -91,11 +90,10 @@ function vueJsxPlugin(options = {}) { ) { hotComponents.push( ...parseComponentDecls(node.declaration, code).map( - ({ name, hash: _hash }) => ({ + ({ name }) => ({ local: name, exported: name, - id: hash(id + name), - hash: _hash + id: hash(id + name) }) ) ) @@ -112,8 +110,7 @@ function vueJsxPlugin(options = {}) { hotComponents.push({ local: spec.local.name, exported: spec.exported.name, - id: hash(id + spec.exported.name), - hash: matched.hash + id: hash(id + spec.exported.name) }) } } @@ -131,8 +128,7 @@ function vueJsxPlugin(options = {}) { hotComponents.push({ local: node.declaration.name, exported: 'default', - id: hash(id + 'default'), - hash: matched.hash + id: hash(id + 'default') }) } } else if (isDefineComponentCall(node.declaration)) { @@ -140,10 +136,7 @@ function vueJsxPlugin(options = {}) { hotComponents.push({ local: '__default__', exported: 'default', - id: hash(id + 'default'), - hash: hash( - code.slice(node.declaration.start, node.declaration.end) - ) + id: hash(id + 'default') }) } } @@ -160,14 +153,11 @@ function vueJsxPlugin(options = {}) { } let callbackCode = `` - for (const { local, exported, id, hash } of hotComponents) { + for (const { local, exported, id } of hotComponents) { code += `\n${local}.__hmrId = "${id}"` + - `\n${local}.__hmrHash = "${hash}"` + `\n__VUE_HMR_RUNTIME__.createRecord("${id}", ${local})` - callbackCode += - `\n if (__${exported}.__hmrHash !== ${local}.__hmrHash) ` + - `__VUE_HMR_RUNTIME__.reload("${id}", __${exported})` + callbackCode += `\n__VUE_HMR_RUNTIME__.reload("${id}", __${exported})` } code += `\nimport.meta.hot.accept(({${hotComponents @@ -195,8 +185,7 @@ function parseComponentDecls(node, source) { for (const decl of node.declarations) { if (decl.id.type === 'Identifier' && isDefineComponentCall(decl.init)) { names.push({ - name: decl.id.name, - hash: hash(source.slice(decl.init.start, decl.init.end)) + name: decl.id.name }) } } @@ -208,6 +197,7 @@ function parseComponentDecls(node, source) { */ function isDefineComponentCall(node) { return ( + node && node.type === 'CallExpression' && node.callee.type === 'Identifier' && node.callee.name === 'defineComponent' diff --git a/packages/plugin-vue-jsx/package.json b/packages/plugin-vue-jsx/package.json index ce7d46356b5c9c..a7a90fef1009a7 100644 --- a/packages/plugin-vue-jsx/package.json +++ b/packages/plugin-vue-jsx/package.json @@ -1,10 +1,11 @@ { "name": "@vitejs/plugin-vue-jsx", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "author": "Evan You", "files": [ - "index.js" + "index.js", + "index.d.ts" ], "main": "index.js", "types": "index.d.ts", diff --git a/packages/plugin-vue/CHANGELOG.md b/packages/plugin-vue/CHANGELOG.md index e18bf1c3b16d67..d1b15f3f8ce8d9 100644 --- a/packages/plugin-vue/CHANGELOG.md +++ b/packages/plugin-vue/CHANGELOG.md @@ -1,3 +1,58 @@ +## [1.1.4](https://github.com/vitejs/vite/compare/plugin-vue@1.1.3...plugin-vue@1.1.4) (2021-01-30) + + +### Bug Fixes + +* **plugin-vue:** handle block src pointing to dependency files ([bb7da3f](https://github.com/vitejs/vite/commit/bb7da3f0f07da6558f0e81bd82ede4cfe1785a56)), closes [#1812](https://github.com/vitejs/vite/issues/1812) + + + +## [1.1.3](https://github.com/vitejs/vite/compare/plugin-vue@1.1.2...plugin-vue@1.1.3) (2021-01-29) + + +### Bug Fixes + +* **plugin-vue:** special handling for class default export in sfc ([d3397e6](https://github.com/vitejs/vite/commit/d3397e61cd9d0761606506dcc176a1cbc845d8b5)), closes [#1476](https://github.com/vitejs/vite/issues/1476) + + + +## [1.1.2](https://github.com/vitejs/vite/compare/plugin-vue@1.1.1...plugin-vue@1.1.2) (2021-01-24) + + + +## [1.1.1](https://github.com/vitejs/vite/compare/plugin-vue@1.1.0...plugin-vue@1.1.1) (2021-01-23) + + +### Bug Fixes + +* avoid eager hmr api access ([fa37456](https://github.com/vitejs/vite/commit/fa37456584a09b52b39a61760a6d130e261886ff)) + + +### Features + +* support `base` option during dev, deprecate `build.base` ([#1556](https://github.com/vitejs/vite/issues/1556)) ([809d4bd](https://github.com/vitejs/vite/commit/809d4bd3bf62d3bc6b35f182178922d2ab2175f1)) + + + +# [1.1.0](https://github.com/vitejs/vite/compare/plugin-vue@1.0.6...plugin-vue@1.1.0) (2021-01-19) + + +### Features + +* ssr manifest for preload inference ([107e79e](https://github.com/vitejs/vite/commit/107e79e7b7d422f0d1dbe8b7b435636df7c6281c)) +* **plugin-vue:** support for vite core new ssr impl ([a93ab23](https://github.com/vitejs/vite/commit/a93ab23491ee9fee78345ddc20567e1b0ceec2a7)) + + + +## [1.0.6](https://github.com/vitejs/vite/compare/plugin-vue@1.0.5...plugin-vue@1.0.6) (2021-01-15) + + +### Bug Fixes + +* **plugin-vue:** sfc src import respect alias ([#1544](https://github.com/vitejs/vite/issues/1544)) ([d8754de](https://github.com/vitejs/vite/commit/d8754deeb16ef0d86b17dfa2a3394d0919bcd72e)), closes [#1542](https://github.com/vitejs/vite/issues/1542) + + + ## [1.0.5](https://github.com/vitejs/vite/compare/plugin-vue@1.0.4...plugin-vue@1.0.5) (2021-01-09) diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index e9f7cdef60f536..8d98fd68eba0ba 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "1.0.5", + "version": "1.1.4", "license": "MIT", "author": "Evan You", "files": [ diff --git a/packages/plugin-vue/src/handleHotUpdate.ts b/packages/plugin-vue/src/handleHotUpdate.ts index be131824da3bcd..734c6d4a8d604d 100644 --- a/packages/plugin-vue/src/handleHotUpdate.ts +++ b/packages/plugin-vue/src/handleHotUpdate.ts @@ -55,7 +55,11 @@ export async function handleHotUpdate({ // metadata will not be available since the script part isn't loaded. // in this case, reuse the compiled script from previous descriptor. if (mainModule && !affectedModules.has(mainModule)) { - setResolvedScript(descriptor, getResolvedScript(prevDescriptor)!) + setResolvedScript( + descriptor, + getResolvedScript(prevDescriptor, false)!, + false + ) } affectedModules.add(templateModule) needRerender = true diff --git a/packages/plugin-vue/src/index.ts b/packages/plugin-vue/src/index.ts index d7155d525d86e9..9ce24539c72aed 100644 --- a/packages/plugin-vue/src/index.ts +++ b/packages/plugin-vue/src/index.ts @@ -37,13 +37,16 @@ export interface Options { include?: string | RegExp | (string | RegExp)[] exclude?: string | RegExp | (string | RegExp)[] - ssr?: boolean isProduction?: boolean // options to pass on to @vue/compiler-sfc script?: Partial template?: Partial style?: Partial + /** + * @deprecated the plugin now auto-detects whether it's being invoked for ssr. + */ + ssr?: boolean } export interface ResolvedOptions extends Options { @@ -53,7 +56,6 @@ export interface ResolvedOptions extends Options { export default function vuePlugin(rawOptions: Options = {}): Plugin { let options: ResolvedOptions = { - ssr: false, isProduction: process.env.NODE_ENV === 'production', ...rawOptions, root: process.cwd() @@ -74,12 +76,15 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { return handleHotUpdate(ctx) }, - config(config) { - // provide default values for vue runtime esm defines - config.define = { - __VUE_OPTIONS_API__: true, - __VUE_PROD_DEVTOOLS__: false, - ...config.define + config() { + return { + define: { + __VUE_OPTIONS_API__: true, + __VUE_PROD_DEVTOOLS__: false + }, + ssr: { + external: ['vue', '@vue/server-renderer'] + } } }, @@ -102,7 +107,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { } }, - load(id) { + load(id, ssr = !!options.ssr) { const { filename, query } = parseVueRequest(id) // select corresponding block for subpart virtual modules if (query.vue) { @@ -113,7 +118,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin { let block: SFCBlock | null | undefined if (query.type === 'script') { // handle + ` + return (url: string, html: string): Promise => { + return applyHtmlTransforms( + html, + url, + getHtmlFilename(url, server), + [...preHooks, devHtmlHook, ...postHooks], + server + ) + } +} + +function getHtmlFilename(url: string, server: ViteDevServer) { + if (url.startsWith(FS_PREFIX)) { + return fsPathFromId(url) + } else { + return path.join(server.config.root, url.slice(1)) + } +} + +const devHtmlHook: IndexHtmlTransformHook = async ( + html, + { path: htmlPath, server } +) => { + const config = server?.config! + const base = config.base || '/' + + const s = new MagicString(html) + let scriptModuleIndex = -1 + + await traverseHtml(html, htmlPath, (node) => { + if (node.type !== NodeTypes.ELEMENT) { + return + } + + // script tags + if (node.tag === 'script') { + const { src, isModule } = getScriptInfo(node) + if (isModule) { + scriptModuleIndex++ } - return _match - }) - .replace(//g, (_, i) => comments[i]) + + if (src) { + const url = src.value?.content || '' + if (url.startsWith('/')) { + // prefix with base + s.overwrite( + src.value!.loc.start.offset, + src.value!.loc.end.offset, + `"${config.base + url.slice(1)}"` + ) + } + } else if (isModule) { + // inline js module. convert to src="proxy" + s.overwrite( + node.loc.start.offset, + node.loc.end.offset, + `` + ) + } + } + + // elements with [href/src] attrs + const assetAttrs = assetAttrsConfig[node.tag] + if (assetAttrs) { + for (const p of node.props) { + if ( + p.type === NodeTypes.ATTRIBUTE && + p.value && + assetAttrs.includes(p.name) + ) { + const url = p.value.content || '' + if (url.startsWith('/')) { + s.overwrite( + p.value.loc.start.offset, + p.value.loc.end.offset, + `"${config.base + url.slice(1)}"` + ) + } + } + } + } + }) + + html = s.toString() return { html, tags: [ { tag: 'script', - attrs: { type: 'module', src: CLIENT_PUBLIC_PATH }, + attrs: { + type: 'module', + src: path.posix.join(base, CLIENT_PUBLIC_PATH) + }, injectTo: 'head-prepend' } ] @@ -45,34 +122,17 @@ const devHtmlHook: IndexHtmlTransformHook = (html, { path }) => { } export function indexHtmlMiddleware( - server: ViteDevServer, - plugins: readonly Plugin[] + server: ViteDevServer ): Connect.NextHandleFunction { - const [preHooks, postHooks] = resolveHtmlTransforms(plugins) - return async (req, res, next) => { + const url = req.url && cleanUrl(req.url) // spa-fallback always redirects to /index.html - if ( - req.url?.endsWith('.html') && - req.headers['sec-fetch-dest'] !== 'script' - ) { - let filename - if (req.url!.startsWith(FS_PREFIX)) { - filename = req.url.slice(FS_PREFIX.length) - } else { - filename = path.join(server.config.root, req.url!.slice(1)) - } + if (url?.endsWith('.html') && req.headers['sec-fetch-dest'] !== 'script') { + const filename = getHtmlFilename(url, server) if (fs.existsSync(filename)) { try { let html = fs.readFileSync(filename, 'utf-8') - // apply transforms - html = await applyHtmlTransforms( - html, - req.url!, - filename, - [...preHooks, devHtmlHook, ...postHooks], - server - ) + html = await server.transformIndexHtml(url, html) return send(req, res, html, 'html') } catch (e) { return next(e) diff --git a/packages/vite/src/node/server/middlewares/proxy.ts b/packages/vite/src/node/server/middlewares/proxy.ts index 325e95e4eafa0f..16b352e78f1cca 100644 --- a/packages/vite/src/node/server/middlewares/proxy.ts +++ b/packages/vite/src/node/server/middlewares/proxy.ts @@ -5,6 +5,7 @@ import { HMR_HEADER } from '../ws' import { ViteDevServer } from '..' import { Connect } from 'types/connect' import { HttpProxy } from 'types/http-proxy' +import chalk from 'chalk' const debug = createDebugger('vite:proxy') @@ -39,9 +40,16 @@ export function proxyMiddleware({ Object.keys(options).forEach((context) => { let opts = options[context] if (typeof opts === 'string') { - opts = { target: opts } as ProxyOptions + opts = { target: opts, changeOrigin: true } as ProxyOptions } const proxy = httpProxy.createProxyServer(opts) as HttpProxy.Server + + proxy.on('error', (err) => { + config.logger.error(`${chalk.red(`http proxy error:`)}\n${err.stack}`, { + timestamp: true + }) + }) + if (opts.configure) { opts.configure(proxy, opts) } @@ -49,29 +57,35 @@ export function proxyMiddleware({ proxies[context] = [proxy, { ...opts }] }) - httpServer.on('upgrade', (req, socket, head) => { - const url = req.url! - for (const context in proxies) { - if (url.startsWith(context)) { - const [proxy, opts] = proxies[context] - if ( - (opts.ws || opts.target?.toString().startsWith('ws:')) && - req.headers['sec-websocket-protocol'] !== HMR_HEADER - ) { - if (opts.rewrite) { - req.url = opts.rewrite(url) + if (httpServer) { + httpServer.on('upgrade', (req, socket, head) => { + const url = req.url! + for (const context in proxies) { + if (url.startsWith(context)) { + const [proxy, opts] = proxies[context] + if ( + (opts.ws || opts.target?.toString().startsWith('ws:')) && + req.headers['sec-websocket-protocol'] !== HMR_HEADER + ) { + if (opts.rewrite) { + req.url = opts.rewrite(url) + } + proxy.ws(req, socket, head) } - proxy.ws(req, socket, head) } } - } - }) + }) + } return (req, res, next) => { const url = req.url! for (const context in proxies) { - if (url.startsWith(context)) { + if ( + (context.startsWith('^') && new RegExp(context).test(url)) || + url.startsWith(context) + ) { const [proxy, opts] = proxies[context] + const options: HttpProxy.ServerOptions = {} if (opts.bypass) { const bypassResult = opts.bypass(req, res, opts) @@ -79,6 +93,10 @@ export function proxyMiddleware({ req.url = bypassResult debug(`bypass: ${req.url} -> ${bypassResult}`) return next() + } else if (typeof bypassResult === 'object') { + Object.assign(options, bypassResult) + debug(`bypass: ${req.url} use modified opitions: %O`, options) + return next() } else if (bypassResult === false) { debug(`bypass: ${req.url} -> 404`) return res.end(404) @@ -89,7 +107,7 @@ export function proxyMiddleware({ if (opts.rewrite) { req.url = opts.rewrite(req.url!) } - proxy.web(req, res) + proxy.web(req, res, options) return } } diff --git a/packages/vite/src/node/server/middlewares/static.ts b/packages/vite/src/node/server/middlewares/static.ts index f34479fd1c2e18..01019dafea5877 100644 --- a/packages/vite/src/node/server/middlewares/static.ts +++ b/packages/vite/src/node/server/middlewares/static.ts @@ -5,62 +5,65 @@ import { Connect } from 'types/connect' import { ResolvedConfig } from '../..' import { FS_PREFIX } from '../../constants' import { cleanUrl, isImportRequest } from '../../utils' -const sirvOptions = { dev: true, etag: true } + +const sirvOptions = { dev: true, etag: true, extensions: [] } + +export function servePublicMiddleware(dir: string): Connect.NextHandleFunction { + const serve = sirv(dir, sirvOptions) + + return (req, res, next) => { + // skip import request + if (isImportRequest(req.url!)) { + return next() + } + serve(req, res, next) + } +} export function serveStaticMiddleware( dir: string, - config?: ResolvedConfig + config: ResolvedConfig ): Connect.NextHandleFunction { const serve = sirv(dir, sirvOptions) return (req, res, next) => { let url = req.url! - // skip import request - if (isImportRequest(url)) { - return next() - } - // only serve the file if it's not an html request // so that html requests can fallthrough to our html middleware for // special processing - if ( - req.headers.accept?.includes('text/html') || - path.extname(cleanUrl(url)) === '.html' - ) { + if (path.extname(cleanUrl(url)) === '.html') { return next() } - + // #1426 - url = req.url = decodeURIComponent(url) + url = req.url = decodeURI(url) // apply aliases to static requests as well - if (config) { - let redirected: string | undefined - for (const { find, replacement } of config.alias) { - const matches = - typeof find === 'string' ? url.startsWith(find) : find.test(url) - if (matches) { - redirected = url.replace(find, replacement) - break - } + let redirected: string | undefined + for (const { find, replacement } of config.alias) { + const matches = + typeof find === 'string' ? url.startsWith(find) : find.test(url) + if (matches) { + redirected = url.replace(find, replacement) + break } - if (redirected) { - // dir is pre-normalized to posix style - if (redirected.startsWith(dir)) { - redirected = redirected.slice(dir.length) - } - req.url = redirected + } + if (redirected) { + // dir is pre-normalized to posix style + if (redirected.startsWith(dir)) { + redirected = redirected.slice(dir.length) } + req.url = redirected } serve(req, res, next) } } -export function rawFsStaticMiddleware(): Connect.NextHandleFunction { +export function serveRawFsMiddleware(): Connect.NextHandleFunction { const fsRoot = - os.platform() == 'win32' ? process.cwd().split(path.sep)[0] : '/' + os.platform() == 'win32' ? process.cwd().split(path.sep)[0] + '/' : '/' const serveFromRoot = sirv(fsRoot, sirvOptions) return (req, res, next) => { @@ -70,7 +73,7 @@ export function rawFsStaticMiddleware(): Connect.NextHandleFunction { // the paths are rewritten to `/@fs/` prefixed paths and must be served by // searching based from fs root. if (url.startsWith(FS_PREFIX)) { - req.url = decodeURIComponent(url.slice(FS_PREFIX.length)) + req.url = decodeURI(url.slice(FS_PREFIX.length)) serveFromRoot(req, res, next) } else { next() diff --git a/packages/vite/src/node/server/middlewares/transform.ts b/packages/vite/src/node/server/middlewares/transform.ts index 10f74df58ccab6..17dd30cd2679fc 100644 --- a/packages/vite/src/node/server/middlewares/transform.ts +++ b/packages/vite/src/node/server/middlewares/transform.ts @@ -1,6 +1,5 @@ import { ViteDevServer } from '..' import { Connect } from 'types/connect' -import { isCSSRequest, isDirectCSSRequest } from '../../plugins/css' import { cleanUrl, createDebugger, @@ -16,11 +15,13 @@ import { transformRequest } from '../transformRequest' import { isHTMLProxy } from '../../plugins/html' import chalk from 'chalk' import { + CLIENT_PUBLIC_PATH, DEP_CACHE_DIR, DEP_VERSION_RE, - FS_PREFIX, + NULL_BYTE_PLACEHOLDER, VALID_ID_PREFIX } from '../../constants' +import { isCSSRequest, isDirectCSSRequest } from '../../plugins/css' const debugCache = createDebugger('vite:cache') const isDebug = !!process.env.DEBUG @@ -44,25 +45,34 @@ export function transformMiddleware( return next() } - let url = decodeURI(removeTimestampQuery(req.url!)) + if ( + server._pendingReload && + // always allow vite client requests so that it can trigger page reload + !req.url?.startsWith(CLIENT_PUBLIC_PATH) && + !req.url?.includes('vite/dist/client') + ) { + // missing dep pending reload, hold request until reload happens + server._pendingReload.then(() => res.end()) + return + } + + let url = decodeURI(removeTimestampQuery(req.url!)).replace( + NULL_BYTE_PLACEHOLDER, + '\0' + ) const withoutQuery = cleanUrl(url) try { const isSourceMap = withoutQuery.endsWith('.map') // since we generate source map references, handle those requests here if (isSourceMap) { - // #1323 - browser may remove // when fetching source maps - if (url.startsWith(FS_PREFIX)) { - url = FS_PREFIX + url.split(FS_PREFIX)[1].replace(/^\/?/, '/') - } const originalUrl = url.replace(/\.map($|\?)/, '$1') const map = (await moduleGraph.getModuleByUrl(originalUrl)) ?.transformResult?.map if (map) { return send(req, res, JSON.stringify(map), 'json') } else { - res.statusCode = 404 - return res.end() + return next() } } diff --git a/packages/vite/src/node/server/moduleGraph.ts b/packages/vite/src/node/server/moduleGraph.ts index 3f5cdd92293fda..813c9fa5de6b5f 100644 --- a/packages/vite/src/node/server/moduleGraph.ts +++ b/packages/vite/src/node/server/moduleGraph.ts @@ -26,6 +26,8 @@ export class ModuleNode { acceptedHmrDeps = new Set() isSelfAccepting = false transformResult: TransformResult | null = null + ssrTransformResult: TransformResult | null = null + ssrModule: Record | null = null lastHMRTimestamp = 0 constructor(url: string) { @@ -34,11 +36,19 @@ export class ModuleNode { } } +function invalidateSSRModule(mod: ModuleNode, seen: Set) { + if (seen.has(mod)) { + return + } + seen.add(mod) + mod.ssrModule = null + mod.importers.forEach((importer) => invalidateSSRModule(importer, seen)) +} export class ModuleGraph { - private urlToModuleMap = new Map() - private idToModuleMap = new Map() + urlToModuleMap = new Map() + idToModuleMap = new Map() // a single file may corresponds to multiple modules with different queries - private fileToModulesMap = new Map>() + fileToModulesMap = new Map>() container: PluginContainer constructor(container: PluginContainer) { @@ -61,12 +71,26 @@ export class ModuleGraph { onFileChange(file: string) { const mods = this.getModulesByFile(file) if (mods) { + const seen = new Set() mods.forEach((mod) => { - mod.transformResult = null + this.invalidateModule(mod, seen) }) } } + invalidateModule(mod: ModuleNode, seen: Set = new Set()) { + mod.transformResult = null + mod.ssrTransformResult = null + invalidateSSRModule(mod, seen) + } + + invalidateAll() { + const seen = new Set() + this.idToModuleMap.forEach((mod) => { + this.invalidateModule(mod, seen) + }) + } + /** * Update the module graph based on a module's updated imports information * If there are dependencies that no longer have any importers, they are diff --git a/packages/vite/src/node/server/pluginContainer.ts b/packages/vite/src/node/server/pluginContainer.ts index fc3c6b8adaf462..d17450f47b3479 100644 --- a/packages/vite/src/node/server/pluginContainer.ts +++ b/packages/vite/src/node/server/pluginContainer.ts @@ -30,8 +30,7 @@ SOFTWARE. */ import fs from 'fs' -import { resolve, relative, sep, posix, join } from 'path' -import { createHash } from 'crypto' +import { resolve, join } from 'path' import { Plugin } from '../plugin' import { InputOptions, @@ -51,13 +50,16 @@ import { } from 'rollup' import * as acorn from 'acorn' import acornClassFields from 'acorn-class-fields' +import acornNumericSeparator from 'acorn-numeric-separator' +import acornStaticClassFeatures from 'acorn-static-class-features' import merge from 'merge-source-map' import MagicString from 'magic-string' import { FSWatcher } from 'chokidar' import { - pad, createDebugger, + ensureWatchedFile, generateCodeFrame, + isExternalUrl, normalizePath, numberToPos, prettifyUrl, @@ -65,6 +67,7 @@ import { } from '../utils' import chalk from 'chalk' import { ResolvedConfig } from '../config' +import { buildErrorMessage } from './middlewares/error' export interface PluginContainerOptions { cwd?: string @@ -77,19 +80,19 @@ export interface PluginContainer { options: InputOptions buildStart(options: InputOptions): Promise watchChange(id: string, event?: ChangeEvent): void - resolveImportMeta(id: string, property: string): void resolveId( id: string, importer?: string, - skip?: Plugin[] + skip?: Plugin[], + ssr?: boolean ): Promise transform( code: string, id: string, - inMap?: SourceDescription['map'] + inMap?: SourceDescription['map'], + ssr?: boolean ): Promise - load(id: string): Promise - resolveFileUrl(referenceId: string): string | null + load(id: string, ssr?: boolean): Promise close(): Promise } @@ -107,6 +110,12 @@ type PluginContext = Omit< | 'resolveId' > +export let parser = acorn.Parser.extend( + acornClassFields, + acornStaticClassFeatures, + acornNumericSeparator +) + export async function createPluginContainer( { plugins, logger, root, build: { rollupOptions } }: ResolvedConfig, watcher?: FSWatcher @@ -124,12 +133,7 @@ export async function createPluginContainer( // --------------------------------------------------------------------------- - // counter for generating unique emitted asset IDs - let ids = 0 - let parser = acorn.Parser - const MODULES = new Map() - const files = new Map() const watchFiles = new Set() // get rollup version @@ -142,11 +146,23 @@ export async function createPluginContainer( } } + function warnIncompatibleMethod(method: string, plugin: string) { + logger.warn( + chalk.cyan(`[plugin:${plugin}] `) + + chalk.yellow( + `context method ${chalk.bold( + `${method}()` + )} is not supported in serve mode. This plugin is likely not vite-compatible.` + ) + ) + } + // we should create a new context for each async hook pipeline so that the // active plugin in that pipeline can be tracked in a concurrency-safe manner. // using a class to make creating new contexts more efficient class Context implements PluginContext { meta = minimalContext.meta + ssr = false _activePlugin: Plugin | null _activeId: string | null = null _activeCode: string | null = null @@ -160,7 +176,6 @@ export async function createPluginContainer( sourceType: 'module', ecmaVersion: 2020, locations: true, - onComment: [], ...opts }) } @@ -172,7 +187,7 @@ export async function createPluginContainer( ) { const skip = [] if (options?.skipSelf && this._activePlugin) skip.push(this._activePlugin) - let out = await container.resolveId(id, importer, skip) + let out = await container.resolveId(id, importer, skip, this.ssr) if (typeof out === 'string') out = { id: out } return out as ResolvedId | null } @@ -195,10 +210,7 @@ export async function createPluginContainer( addWatchFile(id: string) { watchFiles.add(id) - // only need to add it if file is out of root. - if (watcher && !id.startsWith(root)) { - watcher.add(id) - } + if (watcher) ensureWatchedFile(watcher, id, root) } getWatchFiles() { @@ -206,41 +218,17 @@ export async function createPluginContainer( } emitFile(assetOrFile: EmittedFile) { - const { type, name, fileName } = assetOrFile - const source = assetOrFile.type === 'asset' && assetOrFile.source - const id = String(++ids) - const filename = - fileName || generateFilename(type, name!, source, fileName) - files.set(id, { type, id, name, fileName: filename }) - if (source) { - if (type === 'chunk') { - throw Error(`emitFile({ type:"chunk" }) cannot include a source`) - } - // TODO - // if (opts.writeFile) opts.writeFile(filename, source) - // else fs.writeFile(filename, source) - } - return id + warnIncompatibleMethod(`emitFile`, this._activePlugin!.name) + return '' } - setAssetSource(assetId: string, source: string | Uint8Array) { - const asset = files.get(String(assetId)) - if (!asset) { - throw new Error( - `setAssetSource() called on non-existent asset with id ${assetId}` - ) - } - if (asset.type === 'chunk') { - throw Error(`setAssetSource() called on a chunk`) - } - asset.source = source - // TODO - // if (opts.writeFile) opts.writeFile(asset.fileName!, source) - // else fs.writeFile(asset.fileName!, source) + setAssetSource() { + warnIncompatibleMethod(`setAssetSource`, this._activePlugin!.name) } - getFileName(referenceId: string) { - return container.resolveFileUrl(referenceId)! + getFileName() { + warnIncompatibleMethod(`getFileName`, this._activePlugin!.name) + return '' } warn( @@ -248,12 +236,12 @@ export async function createPluginContainer( position?: number | { column: number; line: number } ) { const err = formatError(e, position, this) - const args = [chalk.yellow(`warning: ${err.message}`)] - if (err.plugin) args.push(` Plugin: ${chalk.magenta(err.plugin)}`) - if (err.id) args.push(` File: ${chalk.cyan(err.id)}`) - if (err.frame) args.push(chalk.yellow(pad(err.frame))) - if (err.stack) args.push(pad(err.stack)) - logger.warn(args.join('\n'), { + const msg = buildErrorMessage( + err, + [chalk.yellow(`warning: ${err.message}`)], + false + ) + logger.warn(msg, { clear: true, timestamp: true }) @@ -292,6 +280,16 @@ export async function createPluginContainer( ...numberToPos(ctx._activeCode, pos) } err.frame = err.frame || generateCodeFrame(ctx._activeCode, pos) + } else if (err.loc) { + // css preprocessors may report errors in an included file + if (!err.frame) { + let code = ctx._activeCode + if (err.loc.file) { + err.id = normalizePath(err.loc.file) + code = fs.readFileSync(err.loc.file, 'utf-8') + } + err.frame = generateCodeFrame(code, err.loc) + } } else if ((err as any).line && (err as any).column) { err.loc = { file: err.id, @@ -299,8 +297,6 @@ export async function createPluginContainer( column: (err as any).column } err.frame = err.frame || generateCodeFrame(ctx._activeCode, err.loc) - } else if (err.loc) { - err.frame = err.frame || generateCodeFrame(ctx._activeCode, err.loc) } } return err @@ -326,6 +322,12 @@ export async function createPluginContainer( let combinedMap = this.combinedMap for (let m of this.sourcemapChain) { if (typeof m === 'string') m = JSON.parse(m) + if (!('version' in (m as SourceMap))) { + // empty, nullified source map + combinedMap = this.combinedMap = null + this.sourcemapChain.length = 0 + break + } if (!combinedMap) { combinedMap = m as SourceMap } else { @@ -360,6 +362,7 @@ export async function createPluginContainer( } let nestedResolveCall = 0 + let closed = false const container: PluginContainer = { options: await (async () => { @@ -371,7 +374,11 @@ export async function createPluginContainer( } if (options.acornInjectPlugins) { parser = acorn.Parser.extend( - ...[acornClassFields].concat(options.acornInjectPlugins) + ...[ + acornClassFields, + acornStaticClassFeatures, + acornNumericSeparator + ].concat(options.acornInjectPlugins) ) } return { @@ -394,14 +401,15 @@ export async function createPluginContainer( ) }, - async resolveId(rawId, importer = join(root, 'index.html'), _skip) { + async resolveId(rawId, importer = join(root, 'index.html'), _skip, ssr) { const ctx = new Context() + ctx.ssr = !!ssr const key = `${rawId}\n${importer}` + (_skip ? _skip.map((p) => p.name).join('\n') : ``) nestedResolveCall++ - const resolveStart = Date.now() + const resolveStart = isDebug ? Date.now() : 0 let id: string | null = null const partial: Partial = {} @@ -417,9 +425,15 @@ export async function createPluginContainer( ctx._activePlugin = plugin let result - const pluginResolveStart = Date.now() + const pluginResolveStart = isDebug ? Date.now() : 0 try { - result = await plugin.resolveId.call(ctx as any, rawId, importer, {}) + result = await plugin.resolveId.call( + ctx as any, + rawId, + importer, + {}, + ssr + ) } finally { if (_skip) resolveSkips.delete(plugin, key) } @@ -461,19 +475,20 @@ export async function createPluginContainer( } if (id) { - partial.id = normalizePath(id) + partial.id = isExternalUrl(id) ? id : normalizePath(id) return partial as PartialResolvedId } else { return null } }, - async load(id) { + async load(id, ssr) { const ctx = new Context() + ctx.ssr = !!ssr for (const plugin of plugins) { if (!plugin.load) continue ctx._activePlugin = plugin - const result = await plugin.load.call(ctx as any, id) + const result = await plugin.load.call(ctx as any, id, ssr) if (result != null) { return result } @@ -481,17 +496,18 @@ export async function createPluginContainer( return null }, - async transform(code, id, inMap) { + async transform(code, id, inMap, ssr) { const ctx = new TransformContext(id, code, inMap as SourceMap) + ctx.ssr = !!ssr for (const plugin of plugins) { if (!plugin.transform) continue ctx._activePlugin = plugin ctx._activeId = id ctx._activeCode = code - const start = Date.now() + const start = isDebug ? Date.now() : 0 let result try { - result = await plugin.transform.call(ctx as any, code, id) + result = await plugin.transform.call(ctx as any, code, id, ssr) } catch (e) { ctx.error(e) } @@ -526,54 +542,8 @@ export async function createPluginContainer( } }, - resolveImportMeta(id, property) { - const ctx = new Context() - for (const plugin of plugins) { - if (!plugin.resolveImportMeta) continue - ctx._activePlugin = plugin - const result = plugin.resolveImportMeta.call(ctx as any, property, { - chunkId: '', - moduleId: id, - format: 'es' - }) - if (result) return result - } - - // handle file URLs by default - const matches = property.match(/^ROLLUP_FILE_URL_(\d+)$/) - if (matches) { - const referenceId = matches[1] - const result = container.resolveFileUrl(referenceId) - if (result) return result - } - }, - - resolveFileUrl(referenceId) { - referenceId = String(referenceId) - const file = files.get(referenceId) - if (file == null) return null - const out = resolve(root || '.', outputOptions.dir || '.') - const fileName = relative(out, file.fileName!) - const assetInfo = { - referenceId, - fileName, - // @TODO: this should be relative to the module that imported the asset - relativePath: fileName - } - const ctx = new Context() - for (const plugin of plugins) { - if (!plugin.resolveFileUrl) continue - ctx._activePlugin = plugin - // @ts-ignore - const result = plugin.resolveFileUrl.call(ctx, assetInfo) - if (result != null) { - return result - } - } - return JSON.stringify('/' + fileName.split(sep).join(posix.sep)) - }, - async close() { + if (closed) return const ctx = new Context() await Promise.all( plugins.map((p) => p.buildEnd && p.buildEnd.call(ctx as any)) @@ -581,11 +551,10 @@ export async function createPluginContainer( await Promise.all( plugins.map((p) => p.closeBundle && p.closeBundle.call(ctx as any)) ) + closed = true } } - const toPosixPath = (path: string) => path.split(sep).join(posix.sep) - function popIndex(array: any[], index: number) { const tail = array.pop() if (index !== array.length) array[index] = tail @@ -614,38 +583,5 @@ export async function createPluginContainer( } } - const outputOptions = Array.isArray(rollupOptions.output) - ? rollupOptions.output[0] - : rollupOptions.output || {} - - function generateFilename( - type: 'entry' | 'asset' | 'chunk', - name: string, - source: string | false | undefined | Uint8Array, - fileName: string | undefined - ) { - const posixName = toPosixPath(name) - if (!fileName) { - fileName = ((type === 'entry' && outputOptions.file) || - // @ts-ignore - outputOptions[`${type}FileNames`] || - '[name][extname]') as string - fileName = fileName.replace('[hash]', () => - createHash('md5').update(String(source)).digest('hex').substring(0, 5) - ) - fileName = fileName.replace('[extname]', posix.extname(posixName)) - fileName = fileName.replace( - '[ext]', - posix.extname(posixName).substring(1) - ) - fileName = fileName.replace( - '[name]', - posix.basename(posixName).replace(/\.[a-z0-9]+$/g, '') - ) - } - const result = resolve(root || '.', outputOptions.dir || '.', fileName) - return result - } - return container } diff --git a/packages/vite/src/node/server/send.ts b/packages/vite/src/node/server/send.ts index 36f3618a531e65..4d50af7cd3c624 100644 --- a/packages/vite/src/node/server/send.ts +++ b/packages/vite/src/node/server/send.ts @@ -32,7 +32,10 @@ export function send( // inject source map reference if (map && map.mappings) { if (isDebug) { - content += `\n/*${JSON.stringify(map, null, 2)}*/\n` + content += `\n/*${JSON.stringify(map, null, 2).replace( + /\*\//g, + '*\\/' + )}*/\n` } content += genSourceMapString(map) } diff --git a/packages/vite/src/node/server/transformRequest.ts b/packages/vite/src/node/server/transformRequest.ts index 1b80cd82d146c6..2ec6baece1212e 100644 --- a/packages/vite/src/node/server/transformRequest.ts +++ b/packages/vite/src/node/server/transformRequest.ts @@ -10,8 +10,11 @@ import { cleanUrl, prettifyUrl, removeTimestampQuery, - timeFrom + timeFrom, + ensureWatchedFile } from '../utils' +import { checkPublicFile } from '../plugins/asset' +import { ssrTransform } from '../ssr/ssrTransform' const debugLoad = createDebugger('vite:load') const debugTransform = createDebugger('vite:transform') @@ -21,18 +24,28 @@ const isDebug = !!process.env.DEBUG export interface TransformResult { code: string map: SourceMap | null - etag: string + etag?: string + deps?: string[] +} + +export interface TransformOptions { + ssr?: boolean } export async function transformRequest( url: string, - { config: { root }, pluginContainer, moduleGraph, watcher }: ViteDevServer + { config, pluginContainer, moduleGraph, watcher }: ViteDevServer, + options: TransformOptions = {} ): Promise { url = removeTimestampQuery(url) + const { root, logger } = config const prettyUrl = isDebug ? prettifyUrl(url, root) : '' + const ssr = !!options.ssr // check if we have a fresh cache - const cached = (await moduleGraph.getModuleByUrl(url))?.transformResult + const module = await moduleGraph.getModuleByUrl(url) + const cached = + module && (ssr ? module.ssrTransformResult : module.transformResult) if (cached) { isDebug && debugCache(`[memory] ${prettyUrl}`) return cached @@ -42,12 +55,12 @@ export async function transformRequest( const id = (await pluginContainer.resolveId(url))?.id || url const file = cleanUrl(id) - let code = null + let code: string | null = null let map: SourceDescription['map'] = null // load - const loadStart = Date.now() - const loadResult = await pluginContainer.load(id) + const loadStart = isDebug ? Date.now() : 0 + const loadResult = await pluginContainer.load(id, ssr) if (loadResult == null) { // try fallback loading it from fs as string // if the file is a binary, there should be a plugin that already loaded it @@ -61,10 +74,16 @@ export async function transformRequest( } } if (code) { - map = ( - convertSourceMap.fromSource(code) || - convertSourceMap.fromMapFileSource(code, path.dirname(file)) - )?.toObject() + try { + map = ( + convertSourceMap.fromSource(code) || + convertSourceMap.fromMapFileSource(code, path.dirname(file)) + )?.toObject() + } catch (e) { + logger.warn(`Failed to load source map for ${url}.`, { + timestamp: true + }) + } } } else { isDebug && debugLoad(`${timeFrom(loadStart)} [plugin] ${prettyUrl}`) @@ -76,21 +95,25 @@ export async function transformRequest( } } if (code == null) { - throw new Error( - `Failed to load url ${url} (resolved id: ${id}). Does the file exist?` - ) + if (checkPublicFile(url, config)) { + throw new Error( + `Failed to load url ${url} (resolved id: ${id}). ` + + `This file is in /public and will be copied as-is during build without ` + + `going through the plugin transforms, and therefore should not be ` + + `imported from source code. It can only be referenced via HTML tags.` + ) + } else { + return null + } } // ensure module in graph after successful load const mod = await moduleGraph.ensureEntryFromUrl(url) - // file is out of root, add it to the watch list - if (mod.file && !mod.file.startsWith(root + '/')) { - watcher.add(mod.file) - } + ensureWatchedFile(watcher, mod.file, root) // transform - const transformStart = Date.now() - const transformResult = await pluginContainer.transform(code, id, map) + const transformStart = isDebug ? Date.now() : 0 + const transformResult = await pluginContainer.transform(code, id, map, ssr) if ( transformResult == null || (typeof transformResult === 'object' && transformResult.code == null) @@ -102,17 +125,17 @@ export async function transformRequest( ) } else { isDebug && debugTransform(`${timeFrom(transformStart)} ${prettyUrl}`) - if (typeof transformResult === 'object') { - code = transformResult.code! - map = transformResult.map - } else { - code = transformResult - } + code = transformResult.code! + map = transformResult.map } - return (mod.transformResult = { - code, - map, - etag: getEtag(code, { weak: true }) - } as TransformResult) + if (ssr) { + return (mod.ssrTransformResult = await ssrTransform(code, map as SourceMap)) + } else { + return (mod.transformResult = { + code, + map, + etag: getEtag(code, { weak: true }) + } as TransformResult) + } } diff --git a/packages/vite/src/node/server/ws.ts b/packages/vite/src/node/server/ws.ts index e5df69a4b66123..80cf07c0492a32 100644 --- a/packages/vite/src/node/server/ws.ts +++ b/packages/vite/src/node/server/ws.ts @@ -2,7 +2,7 @@ import chalk from 'chalk' import { Server } from 'http' import WebSocket from 'ws' import { ErrorPayload, HMRPayload } from 'types/hmrPayload' -import { Logger } from '../logger' +import { ResolvedConfig } from '..' export const HMR_HEADER = 'vite-hmr' @@ -12,18 +12,28 @@ export interface WebSocketServer { } export function createWebSocketServer( - server: Server, - logger: Logger + server: Server | null, + config: ResolvedConfig ): WebSocketServer { - const wss = new WebSocket.Server({ noServer: true }) + let wss: WebSocket.Server - server.on('upgrade', (req, socket, head) => { - if (req.headers['sec-websocket-protocol'] === HMR_HEADER) { - wss.handleUpgrade(req, socket, head, (ws) => { - wss.emit('connection', ws, req) - }) - } - }) + if (server) { + wss = new WebSocket.Server({ noServer: true }) + server.on('upgrade', (req, socket, head) => { + if (req.headers['sec-websocket-protocol'] === HMR_HEADER) { + wss.handleUpgrade(req, socket, head, (ws) => { + wss.emit('connection', ws, req) + }) + } + }) + } else { + // vite dev server in middleware mode + wss = new WebSocket.Server({ + port: + (typeof config.server.hmr === 'object' && config.server.hmr.port) || + 24678 + }) + } wss.on('connection', (socket) => { socket.send(JSON.stringify({ type: 'connected' })) @@ -35,7 +45,7 @@ export function createWebSocketServer( wss.on('error', (e: Error & { code: string }) => { if (e.code !== 'EADDRINUSE') { - logger.error( + config.logger.error( chalk.red(`WebSocket server error:\n${e.stack || e.message}`) ) } diff --git a/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts new file mode 100644 index 00000000000000..e948f0b7fbb5e5 --- /dev/null +++ b/packages/vite/src/node/ssr/__tests__/ssrTransform.spec.ts @@ -0,0 +1,131 @@ +import { traverseHtml } from '../../plugins/html' +import { ssrTransform } from '../ssrTransform' + +test('default import', async () => { + expect( + (await ssrTransform(`import foo from 'vue';console.log(foo.bar)`, null)) + .code + ).toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = __vite_ssr_import__(\\"vue\\") + console.log(__vite_ssr_import_0__.default.bar)" + `) +}) + +test('named import', async () => { + expect( + ( + await ssrTransform( + `import { ref } from 'vue';function foo() { return ref(0) }`, + null + ) + ).code + ).toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = __vite_ssr_import__(\\"vue\\") + function foo() { return __vite_ssr_import_0__.ref(0) }" + `) +}) + +test('namespace import', async () => { + expect( + ( + await ssrTransform( + `import * as vue from 'vue';function foo() { return vue.ref(0) }`, + null + ) + ).code + ).toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = __vite_ssr_import__(\\"vue\\") + function foo() { return __vite_ssr_import_0__.ref(0) }" + `) +}) + +test('export function decl', async () => { + expect((await ssrTransform(`export function foo() {}`, null)).code) + .toMatchInlineSnapshot(` + "function foo() {} + Object.defineProperty(__vite_ssr_exports__, \\"foo\\", { get(){ return foo }})" + `) +}) + +test('export class decl', async () => { + expect((await ssrTransform(`export class foo {}`, null)).code) + .toMatchInlineSnapshot(` + "class foo {} + Object.defineProperty(__vite_ssr_exports__, \\"foo\\", { get(){ return foo }})" + `) +}) + +test('export var decl', async () => { + expect((await ssrTransform(`export const a = 1, b = 2`, null)).code) + .toMatchInlineSnapshot(` + "const a = 1, b = 2 + Object.defineProperty(__vite_ssr_exports__, \\"a\\", { get(){ return a }}) + Object.defineProperty(__vite_ssr_exports__, \\"b\\", { get(){ return b }})" + `) +}) + +test('export named', async () => { + expect( + (await ssrTransform(`const a = 1, b = 2; export { a, b as c }`, null)).code + ).toMatchInlineSnapshot(` + "const a = 1, b = 2; + Object.defineProperty(__vite_ssr_exports__, \\"a\\", { get(){ return a }}) + Object.defineProperty(__vite_ssr_exports__, \\"c\\", { get(){ return b }})" + `) +}) + +test('export named from', async () => { + expect( + (await ssrTransform(`export { ref, computed as c } from 'vue'`, null)).code + ).toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = __vite_ssr_import__(\\"vue\\") + + Object.defineProperty(__vite_ssr_exports__, \\"ref\\", { get(){ return __vite_ssr_import_0__.ref }}) + Object.defineProperty(__vite_ssr_exports__, \\"c\\", { get(){ return __vite_ssr_import_0__.computed }})" + `) +}) + +test('named exports of imported binding', async () => { + expect( + ( + await ssrTransform( + `import {createApp} from 'vue';export {createApp}`, + null + ) + ).code + ).toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = __vite_ssr_import__(\\"vue\\") + + Object.defineProperty(__vite_ssr_exports__, \\"createApp\\", { get(){ return __vite_ssr_import_0__.createApp }})" + `) +}) + +test('export * from', async () => { + expect((await ssrTransform(`export * from 'vue'`, null)).code) + .toMatchInlineSnapshot(` + "const __vite_ssr_import_0__ = __vite_ssr_import__(\\"vue\\") + + __vite_ssr_exportAll__(__vite_ssr_import_0__)" + `) +}) + +test('export default', async () => { + expect( + (await ssrTransform(`export default {}`, null)).code + ).toMatchInlineSnapshot(`"__vite_ssr_exports__.default = {}"`) +}) + +test('import.meta', async () => { + expect( + (await ssrTransform(`console.log(import.meta.url)`, null)).code + ).toMatchInlineSnapshot(`"console.log(__vite_ssr_import_meta__.url)"`) +}) + +test('dynamic import', async () => { + expect( + (await ssrTransform(`export const i = () => import('./foo')`, null)).code + ).toMatchInlineSnapshot(` + "const i = () => __vite_ssr_dynamic_import__('./foo') + Object.defineProperty(__vite_ssr_exports__, \\"i\\", { get(){ return i }})" + `) +}) diff --git a/packages/vite/src/node/ssr/ssrExternal.ts b/packages/vite/src/node/ssr/ssrExternal.ts new file mode 100644 index 00000000000000..b65bf7fce520c2 --- /dev/null +++ b/packages/vite/src/node/ssr/ssrExternal.ts @@ -0,0 +1,108 @@ +import fs from 'fs' +import path from 'path' +import { tryNodeResolve, ResolveOptions } from '../plugins/resolve' +import { lookupFile, resolveFrom } from '../utils' +import { ResolvedConfig } from '..' + +/** + * Heuristics for determining whether a dependency should be externalized for + * server-side rendering. + * + * TODO right now externals are imported using require(), we probably need to + * rework this when more libraries ship native ESM distributions for Node. + */ +export function resolveSSRExternal( + config: ResolvedConfig, + ssrExternals: Set = new Set() +): string[] { + const { root } = config + const pkgContent = lookupFile(root, ['package.json']) + if (!pkgContent) { + return [] + } + const pkg = JSON.parse(pkgContent) + const devDeps = Object.keys(pkg.devDependencies || {}) + const deps = Object.keys(pkg.dependencies || {}) + + for (const id of devDeps) { + ssrExternals.add(id) + } + + const resolveOptions: ResolveOptions = { + root, + isProduction: false, + isBuild: true + } + + for (const id of deps) { + let entry + let requireEntry + try { + entry = tryNodeResolve(id, undefined, resolveOptions)?.id + requireEntry = require.resolve(id, { paths: [root] }) + } catch (e) { + // resolve failed, assume include + continue + } + if (!entry) { + // no esm entry but has require entry (is this even possible?) + ssrExternals.add(id) + continue + } + // node resolve and esm resolve resolves to the same file + if (path.extname(entry) !== '.js') { + // entry is not js, cannot externalize + continue + } + if (!entry.includes('node_modules')) { + // entry is not a node dep, possibly linked - don't externalize + // instead, trace its dependencies. + const depRoot = path.dirname(resolveFrom(`${id}/package.json`, root)) + resolveSSRExternal( + { + ...config, + root: depRoot + }, + ssrExternals + ) + continue + } + if (entry !== requireEntry) { + // has separate esm/require entry, assume require entry is cjs + ssrExternals.add(id) + } else { + // node resolve and esm resolve resolves to the same file. + // check if the entry is cjs + const content = fs.readFileSync(entry, 'utf-8') + if (/\bmodule\.exports\b|\bexports[.\[]|\brequire\s*\(/.test(content)) { + ssrExternals.add(id) + } + } + } + + if (config.ssr?.external) { + config.ssr.external.forEach((id) => ssrExternals.add(id)) + } + let externals = [...ssrExternals] + if (config.ssr?.noExternal) { + externals = externals.filter((id) => !config.ssr!.noExternal!.includes(id)) + } + return externals.filter((id) => id !== 'vite') +} + +export function shouldExternalizeForSSR( + id: string, + externals: string[] +): boolean { + const should = externals.some((e) => { + if (id === e) { + return true + } + // deep imports, check ext before externalizing - only externalize + // extension-less imports and explicit .js imports + if (id.startsWith(e + '/') && (!path.extname(id) || id.endsWith('.js'))) { + return true + } + }) + return should +} diff --git a/packages/vite/src/node/ssr/ssrManifestPlugin.ts b/packages/vite/src/node/ssr/ssrManifestPlugin.ts new file mode 100644 index 00000000000000..8b05f949a69a63 --- /dev/null +++ b/packages/vite/src/node/ssr/ssrManifestPlugin.ts @@ -0,0 +1,39 @@ +import { ResolvedConfig } from '..' +import { Plugin } from '../plugin' +import { chunkToEmittedCssFileMap } from '../plugins/css' + +export function ssrManifestPlugin(config: ResolvedConfig): Plugin { + // module id => preload assets mapping + const ssrManifest: Record = {} + const base = config.base + + return { + name: 'vite:manifest', + generateBundle(_options, bundle) { + for (const file in bundle) { + const chunk = bundle[file] + if (chunk.type === 'chunk' && !chunk.isEntry) { + // links for entry chunks are already generated in static HTML + // so we only need to record info for non-entry chunks + // TODO: also include non-CSS assets + const cssFiles = chunkToEmittedCssFileMap.get(chunk) + for (const id in chunk.modules) { + const mappedChunks = ssrManifest[id] || (ssrManifest[id] = []) + mappedChunks.push(base + chunk.fileName) + if (cssFiles) { + cssFiles.forEach((file) => { + mappedChunks.push(base + file) + }) + } + } + } + } + + this.emitFile({ + fileName: 'ssr-manifest.json', + type: 'asset', + source: JSON.stringify(ssrManifest, null, 2) + }) + } + } +} diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts new file mode 100644 index 00000000000000..40013e6bd133cc --- /dev/null +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -0,0 +1,154 @@ +import path from 'path' +import { ViteDevServer } from '..' +import { resolveFrom } from '../utils' +import { ssrRewriteStacktrace } from './ssrStacktrace' +import { + ssrExportAllKey, + ssrModuleExportsKey, + ssrImportKey, + ssrImportMetaKey, + ssrDynamicImportKey +} from './ssrTransform' +import { transformRequest } from '../server/transformRequest' + +interface SSRContext { + global: NodeJS.Global +} + +export async function ssrLoadModule( + url: string, + server: ViteDevServer, + isolated: boolean, + context: SSRContext = { global: isolated ? Object.create(global) : global }, + urlStack: string[] = [] +): Promise> { + if (urlStack.includes(url)) { + server.config.logger.warn( + `Circular dependency: ${urlStack.join(' -> ')} -> ${url}` + ) + return {} + } + + const { moduleGraph } = server + const mod = await moduleGraph.ensureEntryFromUrl(url) + + if (!isolated && mod.ssrModule) { + return mod.ssrModule + } + + const result = + mod.ssrTransformResult || + (await transformRequest(url, server, { ssr: true })) + if (!result) { + // TODO more info? is this even necessary? + throw new Error(`failed to load module for ssr: ${url}`) + } + + const isExternal = (dep: string) => dep[0] !== '.' && dep[0] !== '/' + + await Promise.all( + result.deps!.map((dep) => { + if (!isExternal(dep)) { + return ssrLoadModule( + dep, + server, + isolated, + context, + urlStack.concat(url) + ) + } + }) + ) + + const ssrModule = { + [Symbol.toStringTag]: 'Module' + } + Object.defineProperty(ssrModule, '__esModule', { value: true }) + + const ssrImportMeta = { url } + + const ssrImport = (dep: string) => { + if (isExternal(dep)) { + return nodeRequire(dep, mod.file) + } else { + return moduleGraph.urlToModuleMap.get(dep)?.ssrModule + } + } + + const ssrDynamicImport = (dep: string) => { + if (isExternal(dep)) { + return Promise.resolve(nodeRequire(dep, mod.file)) + } else { + return ssrLoadModule(dep, server, isolated, context, urlStack.concat(url)) + } + } + + function ssrExportAll(sourceModule: any) { + for (const key in sourceModule) { + if (key !== 'default') { + Object.defineProperty(ssrModule, key, { + get() { + return sourceModule[key] + } + }) + } + } + } + + try { + new Function( + `global`, + ssrModuleExportsKey, + ssrImportMetaKey, + ssrImportKey, + ssrDynamicImportKey, + ssrExportAllKey, + result.code + `\n//# sourceURL=${mod.url}` + )( + context.global, + ssrModule, + ssrImportMeta, + ssrImport, + ssrDynamicImport, + ssrExportAll + ) + } catch (e) { + e.stack = ssrRewriteStacktrace(e.stack, moduleGraph) + server.config.logger.error( + `Error when evaluating SSR module ${url}:\n${e.stack}`, + { + timestamp: true, + clear: true + } + ) + } + + mod.ssrModule = ssrModule + return ssrModule +} + +function nodeRequire(id: string, importer: string | null) { + const mod = importer ? require(resolve(id, importer)) : require(id) + const defaultExport = mod.__esModule ? mod.default : mod + // rollup-style default import interop for cjs + return new Proxy(mod, { + get(mod, prop) { + if (prop === 'default') return defaultExport + return mod[prop] + } + }) +} + +const resolveCache = new Map() + +function resolve(id: string, importer: string) { + const dir = path.dirname(importer) + const key = id + dir + const cached = resolveCache.get(key) + if (cached) { + return cached + } + const resolved = resolveFrom(id, dir, true) + resolveCache.set(key, resolved) + return resolved +} diff --git a/packages/vite/src/node/ssr/ssrStacktrace.ts b/packages/vite/src/node/ssr/ssrStacktrace.ts new file mode 100644 index 00000000000000..c4b59fbf086da1 --- /dev/null +++ b/packages/vite/src/node/ssr/ssrStacktrace.ts @@ -0,0 +1,46 @@ +import { SourceMapConsumer, RawSourceMap } from 'source-map' +import { ModuleGraph } from '../server/moduleGraph' + +export function ssrRewriteStacktrace(stack: string, moduleGraph: ModuleGraph) { + return stack + .split('\n') + .map((line) => { + return line.replace( + /^ {4}at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?)\)?/, + (input, varName, url, line, column) => { + if (!url) return input + + const mod = moduleGraph.urlToModuleMap.get(url) + const rawSourceMap = mod?.ssrTransformResult?.map + + if (!rawSourceMap) { + return input + } + + const consumer = new SourceMapConsumer( + (rawSourceMap as any) as RawSourceMap + ) + + const pos = consumer.originalPositionFor({ + // source map lines generated via new Function() in Node.js is always + // incremented by 2 due to the function wrapper + line: Number(line) - 2, + column: Number(column), + bias: SourceMapConsumer.LEAST_UPPER_BOUND + }) + + if (!pos.source) { + return input + } + + const source = `${pos.source}:${pos.line || 0}:${pos.column || 0}` + if (!varName || varName === 'eval') { + return ` at ${source}` + } else { + return ` at ${varName} (${source})` + } + } + ) + }) + .join('\n') +} diff --git a/packages/vite/src/node/ssr/ssrTransform.ts b/packages/vite/src/node/ssr/ssrTransform.ts new file mode 100644 index 00000000000000..6c49d3f933e8f8 --- /dev/null +++ b/packages/vite/src/node/ssr/ssrTransform.ts @@ -0,0 +1,370 @@ +import MagicString from 'magic-string' +import { SourceMap } from 'rollup' +import { TransformResult } from '../server/transformRequest' +import { parser } from '../server/pluginContainer' +import { + Identifier, + Node as _Node, + Property, + Function as FunctionNode +} from 'estree' +import { extract_names as extractNames } from 'periscopic' +import { walk as eswalk } from 'estree-walker' +import merge from 'merge-source-map' + +type Node = _Node & { + start: number + end: number +} + +export const ssrModuleExportsKey = `__vite_ssr_exports__` +export const ssrImportKey = `__vite_ssr_import__` +export const ssrDynamicImportKey = `__vite_ssr_dynamic_import__` +export const ssrExportAllKey = `__vite_ssr_exportAll__` +export const ssrImportMetaKey = `__vite_ssr_import_meta__` + +export async function ssrTransform( + code: string, + inMap: SourceMap | null +): Promise { + const s = new MagicString(code) + + const ast = parser.parse(code, { + sourceType: 'module', + ecmaVersion: 2020, + locations: true + }) as any + + let uid = 0 + const deps = new Set() + const idToImportMap = new Map() + + function defineImport(node: Node, source: string) { + deps.add(source) + const importId = `__vite_ssr_import_${uid++}__` + s.appendLeft( + node.start, + `const ${importId} = ${ssrImportKey}(${JSON.stringify(source)})\n` + ) + return importId + } + + function defineExport(name: string, local = name) { + s.append( + `\nObject.defineProperty(${ssrModuleExportsKey}, "${name}", ` + + `{ get(){ return ${local} }})` + ) + } + + // 1. check all import statements and record id -> importName map + for (const node of ast.body as Node[]) { + // import foo from 'foo' --> foo -> __import_foo__.default + // import { baz } from 'foo' --> baz -> __import_foo__.baz + // import * as ok from 'foo' --> ok -> __import_foo__ + if (node.type === 'ImportDeclaration') { + const importId = defineImport(node, node.source.value as string) + for (const spec of node.specifiers) { + if (spec.type === 'ImportSpecifier') { + idToImportMap.set( + spec.local.name, + `${importId}.${spec.imported.name}` + ) + } else if (spec.type === 'ImportDefaultSpecifier') { + idToImportMap.set(spec.local.name, `${importId}.default`) + } else { + // namespace specifier + idToImportMap.set(spec.local.name, importId) + } + } + s.remove(node.start, node.end) + } + } + + // 2. check all export statements and define exports + for (const node of ast.body as Node[]) { + // named exports + if (node.type === 'ExportNamedDeclaration') { + if (node.declaration) { + if ( + node.declaration.type === 'FunctionDeclaration' || + node.declaration.type === 'ClassDeclaration' + ) { + // export function foo() {} + defineExport(node.declaration.id!.name) + } else { + // export const foo = 1, bar = 2 + for (const decl of node.declaration.declarations) { + const names = extractNames(decl.id as any) + for (const name of names) { + defineExport(name) + } + } + } + s.remove(node.start, (node.declaration as Node).start) + } else if (node.source) { + // export { foo, bar } from './foo' + const importId = defineImport(node, node.source.value as string) + for (const spec of node.specifiers) { + defineExport(spec.exported.name, `${importId}.${spec.local.name}`) + } + s.remove(node.start, node.end) + } else { + // export { foo, bar } + for (const spec of node.specifiers) { + const local = spec.local.name + const binding = idToImportMap.get(local) + defineExport(spec.exported.name, binding || local) + } + s.remove(node.start, node.end) + } + } + + // default export + if (node.type === 'ExportDefaultDeclaration') { + s.overwrite( + node.start, + node.start + 14, + `${ssrModuleExportsKey}.default =` + ) + } + + // export * from './foo' + if (node.type === 'ExportAllDeclaration') { + const importId = defineImport(node, node.source.value as string) + s.remove(node.start, node.end) + s.append(`\n${ssrExportAllKey}(${importId})`) + } + } + + // 2. convert references to import bindings & import.meta references + walk(ast, { + onIdentifier(id, parent, parentStack) { + const binding = idToImportMap.get(id.name) + if (!binding) { + return + } + if (isStaticProperty(parent) && parent.shorthand) { + // let binding used in a property shorthand + // { foo } -> { foo: __import_x__.foo } + // skip for destructure patterns + if ( + !(parent as any).inPattern || + isInDestructureAssignment(parent, parentStack) + ) { + s.appendLeft(id.end, `: ${binding}`) + } + } else { + s.overwrite(id.start, id.end, binding) + } + }, + onImportMeta(node) { + s.overwrite(node.start, node.end, ssrImportMetaKey) + }, + onDynamicImport(node) { + s.overwrite(node.start, node.start + 6, ssrDynamicImportKey) + } + }) + + let map = s.generateMap({ hires: true }) + if (inMap && inMap.mappings) { + map = merge(inMap, { + ...map, + sources: inMap.sources, + sourcesContent: inMap.sourcesContent + }) as SourceMap + } + + return { + code: s.toString(), + map, + deps: [...deps] + } +} + +interface Visitors { + onIdentifier: ( + node: Identifier & { + start: number + end: number + }, + parent: Node, + parentStack: Node[] + ) => void + onImportMeta: (node: Node) => void + onDynamicImport: (node: Node) => void +} + +/** + * Same logic from \@vue/compiler-core & \@vue/compiler-sfc + * Except this is using acorn AST + */ +function walk( + root: Node, + { onIdentifier, onImportMeta, onDynamicImport }: Visitors +) { + const parentStack: Node[] = [] + const scope: Record = Object.create(null) + const scopeMap = new WeakMap<_Node, Set>() + + ;(eswalk as any)(root, { + enter(node: Node, parent: Node | null) { + parent && parentStack.push(parent) + + if (node.type === 'ImportDeclaration') { + return this.skip() + } + + if (node.type === 'MetaProperty' && node.meta.name === 'import') { + onImportMeta(node) + } else if (node.type === 'ImportExpression') { + onDynamicImport(node) + } + + if (node.type === 'Identifier') { + if (!scope[node.name] && isRefIdentifier(node, parent!, parentStack)) { + onIdentifier(node, parent!, parentStack) + } + } else if (isFunction(node)) { + // walk function expressions and add its arguments to known identifiers + // so that we don't prefix them + node.params.forEach((p) => + (eswalk as any)(p, { + enter(child: Node, parent: Node) { + if ( + child.type === 'Identifier' && + // do not record as scope variable if is a destructured key + !isStaticPropertyKey(child, parent) && + // do not record if this is a default value + // assignment of a destructured variable + !( + parent && + parent.type === 'AssignmentPattern' && + parent.right === child + ) + ) { + const { name } = child + let scopeIds = scopeMap.get(node) + if (scopeIds && scopeIds.has(name)) { + return + } + if (name in scope) { + scope[name]++ + } else { + scope[name] = 1 + } + if (!scopeIds) { + scopeIds = new Set() + scopeMap.set(node, scopeIds) + } + scopeIds.add(name) + } + } + }) + ) + } else if (node.type === 'Property' && parent!.type === 'ObjectPattern') { + // mark property in destructure pattern + ;(node as any).inPattern = true + } + }, + + leave(node: Node, parent: Node | null) { + parent && parentStack.pop() + const scopeIds = scopeMap.get(node) + if (scopeIds) { + scopeIds.forEach((id: string) => { + scope[id]-- + if (scope[id] === 0) { + delete scope[id] + } + }) + } + } + }) +} + +function isRefIdentifier(id: Identifier, parent: _Node, parentStack: _Node[]) { + // declaration id + if ( + (parent.type === 'VariableDeclarator' || + parent.type === 'ClassDeclaration') && + parent.id === id + ) { + return false + } + + if (isFunction(parent)) { + // function decalration/expression id + if ((parent as any).id === id) { + return false + } + // params list + if (parent.params.includes(id)) { + return false + } + } + + // property key + // this also covers object destructure pattern + if (isStaticPropertyKey(id, parent)) { + return false + } + + // non-assignment array destructure pattern + if ( + parent.type === 'ArrayPattern' && + !isInDestructureAssignment(parent, parentStack) + ) { + return false + } + + // member expression property + if ( + parent.type === 'MemberExpression' && + parent.property === id && + !parent.computed + ) { + return false + } + + if (parent.type === 'ExportSpecifier') { + return false + } + + // is a special keyword but parsed as identifier + if (id.name === 'arguments') { + return false + } + + return true +} + +const isStaticProperty = (node: _Node): node is Property => + node && node.type === 'Property' && !node.computed + +const isStaticPropertyKey = (node: _Node, parent: _Node) => + isStaticProperty(parent) && parent.key === node + +function isFunction(node: _Node): node is FunctionNode { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type) +} + +function isInDestructureAssignment( + parent: _Node, + parentStack: _Node[] +): boolean { + if ( + parent && + (parent.type === 'Property' || parent.type === 'ArrayPattern') + ) { + let i = parentStack.length + while (i--) { + const p = parentStack[i] + if (p.type === 'AssignmentExpression') { + return true + } else if (p.type !== 'Property' && !p.type.endsWith('Pattern')) { + break + } + } + } + return false +} diff --git a/packages/vite/src/node/utils.ts b/packages/vite/src/node/utils.ts index 1518b5c8d38a88..00d8111879215c 100644 --- a/packages/vite/src/node/utils.ts +++ b/packages/vite/src/node/utils.ts @@ -7,19 +7,29 @@ import { parse as parseUrl } from 'url' import slash from 'slash' import { FS_PREFIX, SUPPORTED_EXTS } from './constants' import resolve from 'resolve' +import builtins from 'builtin-modules' +import { FSWatcher } from 'chokidar' -export const bareImportRE = /^[\w@]/ +export const flattenId = (id: string) => id.replace(/[\/\.]/g, '_') + +export function isBuiltin(id: string): boolean { + return builtins.includes(id) +} + +export const bareImportRE = /^[\w@](?!.*:\/\/)/ export const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\// -let isRunningWithYarnPnp: boolean +export let isRunningWithYarnPnp: boolean try { isRunningWithYarnPnp = Boolean(require('pnpapi')) } catch {} -export function resolveFrom(id: string, basedir: string) { +const ssrExtensions = ['.js', '.json', '.node'] + +export function resolveFrom(id: string, basedir: string, ssr = false) { return resolve.sync(id, { basedir, - extensions: SUPPORTED_EXTS, + extensions: ssr ? ssrExtensions : SUPPORTED_EXTS, // necessary to work with pnpm preserveSymlinks: isRunningWithYarnPnp || false }) @@ -53,15 +63,18 @@ const isWindows = os.platform() === 'win32' const VOLUME_RE = /^[A-Z]:/i export function normalizePath(id: string): string { - if (isWindows) { - return path.posix.normalize(slash(id.replace(VOLUME_RE, ''))) - } - return path.posix.normalize(id) + return path.posix.normalize(isWindows ? slash(id) : id) } export function fsPathFromId(id: string): string { const fsPath = normalizePath(id.slice(FS_PREFIX.length)) - return fsPath.startsWith('/') ? fsPath : `/${fsPath}` + return fsPath.startsWith('/') || fsPath.match(VOLUME_RE) + ? fsPath + : `/${fsPath}` +} + +export function ensureVolumeInPath(file: string): string { + return isWindows ? path.resolve(file) : file } export const queryRE = /\?.*$/ @@ -70,21 +83,30 @@ export const hashRE = /#.*$/ export const cleanUrl = (url: string) => url.replace(hashRE, '').replace(queryRE, '') -const externalRE = /^(https?:)?\/\// +export const externalRE = /^(https?:)?\/\// export const isExternalUrl = (url: string) => externalRE.test(url) -const dataUrlRE = /^\s*data:/i +export const dataUrlRE = /^\s*data:/i export const isDataUrl = (url: string) => dataUrlRE.test(url) const knownJsSrcRE = /\.((j|t)sx?|mjs|vue)($|\?)/ -export const isJSRequest = (url: string) => - knownJsSrcRE.test(url) || (!path.extname(url) && !url.endsWith('/')) +export const isJSRequest = (url: string) => { + if (knownJsSrcRE.test(url)) { + return true + } + url = cleanUrl(url) + if (!path.extname(url) && !url.endsWith('/')) { + return true + } + return false +} -const importQueryRE = /(\?|&)import(&|$)/ +const importQueryRE = /(\?|&)import(?:&|$)/ +const trailingSeparatorRE = /[\?&]$/ export const isImportRequest = (url: string) => importQueryRE.test(url) export function removeImportQuery(url: string) { - return url.replace(importQueryRE, '$1').replace(/\?$/, '') + return url.replace(importQueryRE, '$1').replace(trailingSeparatorRE, '') } export function injectQuery(url: string, queryToInject: string) { @@ -94,8 +116,9 @@ export function injectQuery(url: string, queryToInject: string) { }` } +const timestampRE = /\bt=\d{13}&?\b/ export function removeTimestampQuery(url: string) { - return url.replace(/\bt=\d{13}&?\b/, '').replace(/\?$/, '') + return url.replace(timestampRE, '').replace(trailingSeparatorRE, '') } export async function asyncReplace( @@ -193,7 +216,7 @@ export function posToNumber( const { line, column } = pos let start = 0 for (let i = 0; i < line - 1; i++) { - start += lines[i].length + start += lines[i].length + 1 } return start + column } @@ -302,3 +325,21 @@ export function copyDir(srcDir: string, destDir: string) { } } } + +export function ensureWatchedFile( + watcher: FSWatcher, + file: string | null, + root: string +) { + if ( + file && + // only need to watch if out of root + !file.startsWith(root + '/') && + // some rollup plugins use null bytes for private resolved Ids + !file.includes('\0') && + fs.existsSync(file) + ) { + // resolve file to normalized system path + watcher.add(path.resolve(file)) + } +} diff --git a/packages/vite/types/chokidar.d.ts b/packages/vite/types/chokidar.d.ts index a1ca6af2a05c15..743c2cb3e19d5b 100644 --- a/packages/vite/types/chokidar.d.ts +++ b/packages/vite/types/chokidar.d.ts @@ -154,7 +154,7 @@ export interface WatchOptions { /** * Whether to use the `fsevents` watching interface if available. When set to `true` explicitly - * and `fsevents` is available this supercedes the `usePolling` setting. When set to `false` on + * and `fsevents` is available this supersedes the `usePolling` setting. When set to `false` on * OS X, `usePolling: true` becomes the default. */ useFsEvents?: boolean diff --git a/packages/vite/types/commonjs.d.ts b/packages/vite/types/commonjs.d.ts new file mode 100644 index 00000000000000..3ae7db8236bd17 --- /dev/null +++ b/packages/vite/types/commonjs.d.ts @@ -0,0 +1,150 @@ +/** + * https://github.com/rollup/plugins/blob/master/packages/commonjs/types/index.d.ts + * + * This source code is licensed under the MIT license found in the + * LICENSE file at + * https://github.com/rollup/plugins/blob/master/LICENSE + */ +export interface RollupCommonJSOptions { + /** + * 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`. + * @default undefined + */ + include?: string | RegExp | readonly (string | RegExp)[] + /** + * 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. + * @default undefined + */ + exclude?: string | RegExp | readonly (string | RegExp)[] + /** + * For extensionless imports, search for extensions other than .js in the + * order specified. Note that you need to make sure that non-JavaScript files + * are transpiled by another plugin first. + * @default [ '.js' ] + */ + extensions?: ReadonlyArray + /** + * If true then uses of `global` won't be dealt with by this plugin + * @default false + */ + ignoreGlobal?: boolean + /** + * If false, skips source map generation for CommonJS modules. This will improve performance. + * @default true + */ + sourceMap?: boolean + /** + * Instructs the plugin whether to enable mixed module transformations. This + * is useful in scenarios with modules that contain a mix of ES `import` + * statements and CommonJS `require` expressions. Set to `true` if `require` + * calls should be transformed to imports in mixed modules, or `false` if the + * `require` expressions should survive the transformation. The latter can be + * important if the code contains environment detection, or you are coding + * for an environment with special treatment for `require` calls such as + * ElectronJS. See also the `ignore` option. + * @default false + */ + transformMixedEsModules?: boolean + /** + * Sometimes you have to leave require statements unconverted. Pass an array + * containing the IDs or a `id => boolean` function. + * @default [] + */ + ignore?: ReadonlyArray | ((id: string) => boolean) + /** + * Controls how to render imports from external dependencies. By default, + * this plugin assumes that all external dependencies are CommonJS. This + * means they are rendered as default imports to be compatible with e.g. + * NodeJS where ES modules can only import a default export from a CommonJS + * dependency. + * + * If you set `esmExternals` to `true`, this plugins assumes that all + * external dependencies are ES modules and respect the + * `requireReturnsDefault` option. If that option is not set, they will be + * rendered as namespace imports. + * + * You can also supply an array of ids to be treated as ES modules, or a + * function that will be passed each external id to determine if it is an ES + * module. + * @default false + */ + esmExternals?: boolean | ReadonlyArray | ((id: string) => boolean) + /** + * Controls what is returned when requiring an ES module from a CommonJS file. + * When using the `esmExternals` option, this will also apply to external + * modules. By default, this plugin will render those imports as namespace + * imports i.e. + * + * ```js + * // input + * const foo = require('foo'); + * + * // output + * import * as foo from 'foo'; + * ``` + * + * However there are some situations where this may not be desired. + * For these situations, you can change Rollup's behaviour either globally or + * per module. To change it globally, set the `requireReturnsDefault` option + * to one of the following values: + * + * - `false`: This is the default, requiring an ES module returns its + * namespace. This is the only option that will also add a marker + * `__esModule: true` to the namespace to support interop patterns in + * CommonJS modules that are transpiled ES modules. + * - `"namespace"`: Like `false`, requiring an ES module returns its + * namespace, but the plugin does not add the `__esModule` marker and thus + * creates more efficient code. For external dependencies when using + * `esmExternals: true`, no additional interop code is generated. + * - `"auto"`: This is complementary to how `output.exports: "auto"` works in + * Rollup: If a module has a default export and no named exports, requiring + * that module returns the default export. In all other cases, the namespace + * is returned. For external dependencies when using `esmExternals: true`, a + * corresponding interop helper is added. + * - `"preferred"`: If a module has a default export, requiring that module + * always returns the default export, no matter whether additional named + * exports exist. This is similar to how previous versions of this plugin + * worked. Again for external dependencies when using `esmExternals: true`, + * an interop helper is added. + * - `true`: This will always try to return the default export on require + * without checking if it actually exists. This can throw at build time if + * there is no default export. This is how external dependencies are handled + * when `esmExternals` is not used. The advantage over the other options is + * that, like `false`, this does not add an interop helper for external + * dependencies, keeping the code lean. + * + * To change this for individual modules, you can supply a function for + * `requireReturnsDefault` instead. This function will then be called once for + * each required ES module or external dependency with the corresponding id + * and allows you to return different values for different modules. + * @default false + */ + requireReturnsDefault?: + | boolean + | 'auto' + | 'preferred' + | 'namespace' + | ((id: string) => boolean | 'auto' | 'preferred' | 'namespace') + /** + * 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. + * + * Note: In extreme cases, this feature may result in some paths being + * rendered as absolute in the final bundle. The plugin tries to avoid + * exposing paths from the local machine, but if you are `dynamicRequirePaths` + * with paths that are far away from your project's folder, that may require + * replacing strings like `"/Users/John/Desktop/foo-project/"` -\> `"/"`. + */ + dynamicRequireTargets?: string | ReadonlyArray +} diff --git a/packages/vite/types/shims.d.ts b/packages/vite/types/shims.d.ts index 5f4b61afaf104c..8a0e94ee8ee10e 100644 --- a/packages/vite/types/shims.d.ts +++ b/packages/vite/types/shims.d.ts @@ -22,6 +22,16 @@ declare module 'acorn-class-fields' { export = plugin } +declare module 'acorn-static-class-features' { + const plugin: any + export default plugin +} + +declare module 'acorn-numeric-separator' { + const plugin: any + export default plugin +} + declare module 'connect-history-api-fallback' { const plugin: any export = plugin @@ -50,7 +60,13 @@ declare module 'postcss-load-config' { declare module 'postcss-import' { import { Plugin } from 'postcss' - const plugin: () => Plugin + const plugin: (options: { + resolve: ( + id: string, + basedir: string, + importOptions: any + ) => string | string[] | Promise + }) => Plugin export = plugin } @@ -88,7 +104,16 @@ declare module 'rollup-plugin-web-worker-loader' { export default p } -declare module 'isbuiltin' { - function isBuiltin(moduleName: string): boolean - export default isBuiltin +declare module 'minimatch' { + function match(path: string, pattern: string): boolean + export default match +} + +declare module 'compression' { + function compression(): any + export default compression } + +// LESS' types somewhat references this which doesn't make sense in Node, +// so we have to shim it +declare interface HTMLLinkElement {} diff --git a/scripts/jestEnv.js b/scripts/jestEnv.js index 2a7c9e50425548..e3b0cee4789dfe 100644 --- a/scripts/jestEnv.js +++ b/scripts/jestEnv.js @@ -7,8 +7,9 @@ const { chromium } = require('playwright-chromium') const DIR = path.join(os.tmpdir(), 'jest_playwright_global_setup') module.exports = class PlaywrightEnvironment extends NodeEnvironment { - constructor(config) { + constructor(config, context) { super(config) + this.testPath = context.testPath } async setup() { @@ -17,6 +18,12 @@ module.exports = class PlaywrightEnvironment extends NodeEnvironment { if (!wsEndpoint) { throw new Error('wsEndpoint not found') } + + // skip browser setup for non-playground tests + if (!this.testPath.includes('playground')) { + return + } + const browser = (this.browser = await chromium.connect({ wsEndpoint })) @@ -33,7 +40,9 @@ module.exports = class PlaywrightEnvironment extends NodeEnvironment { } async teardown() { - await this.browser.close() + if (this.browser) { + await this.browser.close() + } await super.teardown() } } diff --git a/scripts/jestPerTestSetup.ts b/scripts/jestPerTestSetup.ts index dc7c6b28ca7bdd..d9426d10f224ad 100644 --- a/scripts/jestPerTestSetup.ts +++ b/scripts/jestPerTestSetup.ts @@ -1,6 +1,6 @@ import fs from 'fs-extra' import * as http from 'http' -import { resolve } from 'path' +import { resolve, dirname } from 'path' import slash from 'slash' import sirv from 'sirv' import { createServer, build, ViteDevServer, UserConfig } from 'vite' @@ -9,7 +9,14 @@ import { Page } from 'playwright-chromium' const isBuildTest = !!process.env.VITE_TEST_BUILD // injected by the test env -declare const page: Page +declare global { + namespace NodeJS { + interface Global { + page?: Page + viteTestUrl?: string + } + } +} let server: ViteDevServer | http.Server let tempDir: string @@ -21,6 +28,10 @@ const onConsole = (msg) => { } beforeAll(async () => { + const page = global.page + if (!page) { + return + } try { page.on('console', onConsole) @@ -45,6 +56,14 @@ beforeAll(async () => { } }) + const testCustomServe = resolve(dirname(testPath), 'serve.js') + if (fs.existsSync(testCustomServe)) { + // test has custom server configuration. + const { serve } = require(testCustomServe) + server = await serve(tempDir, isBuildTest) + return + } + const options: UserConfig = { root: tempDir, logLevel: 'error', @@ -66,13 +85,14 @@ beforeAll(async () => { if (!isBuildTest) { process.env.VITE_INLINE = 'inline-serve' server = await (await createServer(options)).listen() - // use resolved port from server - const url = ((global as any).viteTestUrl = `http://localhost:${server.config.server.port}`) + // use resolved port/base from server + const base = server.config.base === '/' ? '' : server.config.base + const url = (global.viteTestUrl = `http://localhost:${server.config.server.port}${base}`) await page.goto(url) } else { process.env.VITE_INLINE = 'inline-build' await build(options) - const url = ((global as any).viteTestUrl = await startStaticServer()) + const url = (global.viteTestUrl = await startStaticServer()) await page.goto(url) } } @@ -84,7 +104,7 @@ beforeAll(async () => { }) afterAll(async () => { - page.off('console', onConsole) + global.page && global.page.off('console', onConsole) if (server) { await server.close() } @@ -100,7 +120,7 @@ function startStaticServer(): Promise { try { config = require(configFile) } catch (e) {} - const base = config?.build?.base || '' + const base = (config?.base || '/') === '/' ? '' : config.base // @ts-ignore if (config && config.__test__) { diff --git a/yarn.lock b/yarn.lock index 37bfcd6b84f3e9..2d7ec7094260fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,135 +2,135 @@ # yarn lockfile v1 -"@algolia/cache-browser-local-storage@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.8.3.tgz#79cc502892c83f378b8f1a87f78020268806f5c3" - integrity sha512-Cwc03hikHSUI+xvgUdN+H+f6jFyoDsC9fegzXzJ2nPn1YSN9EXzDMBnbrgl0sbl9iLGXe0EIGMYqR2giCv1wMQ== - dependencies: - "@algolia/cache-common" "4.8.3" - -"@algolia/cache-common@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.8.3.tgz#7aca2644159ec791921dc8b296817e5b532b3464" - integrity sha512-Cf7zZ2i6H+tLSBTkFePHhYvlgc9fnMPKsF9qTmiU38kFIGORy/TN2Fx5n1GBuRLIzaSXvcf+oHv1HvU0u1gE1g== - -"@algolia/cache-in-memory@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.8.3.tgz#3d2692b895e9b8da47249b2b8dc638f53d6328ee" - integrity sha512-+N7tkvmijXiDy2E7u1mM73AGEgGPWFmEmPeJS96oT46I98KXAwVPNYbcAqBE79YlixdXpkYJk41cFcORzNh+Iw== - dependencies: - "@algolia/cache-common" "4.8.3" - -"@algolia/client-account@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.8.3.tgz#4abc270dbd136644e69cc6b1ca1d0d14c9822aaf" - integrity sha512-Uku8LqnXBwfDCtsTCDYTUOz2/2oqcAQCKgaO0uGdIR8DTQENBXFQvzziambHdn9KuFuY+6Et9k1+cjpTPBDTBg== - dependencies: - "@algolia/client-common" "4.8.3" - "@algolia/client-search" "4.8.3" - "@algolia/transporter" "4.8.3" - -"@algolia/client-analytics@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.8.3.tgz#578b6e6fa33818a0417298438066642e584e1de9" - integrity sha512-9ensIWmjYJprZ+YjAVSZdWUG05xEnbytENXp508X59tf34IMIX8BR2xl0RjAQODtxBdAteGxuKt5THX6U9tQLA== - dependencies: - "@algolia/client-common" "4.8.3" - "@algolia/client-search" "4.8.3" - "@algolia/requester-common" "4.8.3" - "@algolia/transporter" "4.8.3" - -"@algolia/client-common@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.8.3.tgz#d8ea3368a5b98ce907e4be0eed804c3301cd91de" - integrity sha512-TU3623AEFAWUQlDTznkgAMSYo8lfS9pNs5QYDQzkvzWdqK0GBDWthwdRfo9iIsfxiR9qdCMHqwEu+AlZMVhNSA== - dependencies: - "@algolia/requester-common" "4.8.3" - "@algolia/transporter" "4.8.3" - -"@algolia/client-recommendation@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/client-recommendation/-/client-recommendation-4.8.3.tgz#fc15688bf9d0fc0111a6c56d247e33dc3fcf8190" - integrity sha512-qysGbmkcc6Agt29E38KWJq9JuxjGsyEYoKuX9K+P5HyQh08yR/BlRYrA8mB7vT/OIUHRGFToGO6Vq/rcg0NIOQ== - dependencies: - "@algolia/client-common" "4.8.3" - "@algolia/requester-common" "4.8.3" - "@algolia/transporter" "4.8.3" - -"@algolia/client-search@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.8.3.tgz#c70e09935e2cf25da356d59794e6a5a95f9a4cc8" - integrity sha512-rAnvoy3GAhbzOQVniFcKVn1eM2NX77LearzYNCbtFrFYavG+hJI187bNVmajToiuGZ10FfJvK99X2OB1AzzezQ== - dependencies: - "@algolia/client-common" "4.8.3" - "@algolia/requester-common" "4.8.3" - "@algolia/transporter" "4.8.3" - -"@algolia/logger-common@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.8.3.tgz#449e8767863466528de7d18017417b319e4782d3" - integrity sha512-03wksHRbhl2DouEKnqWuUb64s1lV6kDAAabMCQ2Du1fb8X/WhDmxHC4UXMzypeOGlH5BZBsgVwSB7vsZLP3MZg== - -"@algolia/logger-console@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.8.3.tgz#e4bcda8ac6477ecf143a1d536be2b747b84b7047" - integrity sha512-Npt+hI4UF8t3TLMluL5utr9Gc11BjL5kDnGZOhDOAz5jYiSO2nrHMFmnpLT4Cy/u7a5t7EB5dlypuC4/AGStkA== - dependencies: - "@algolia/logger-common" "4.8.3" - -"@algolia/requester-browser-xhr@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.8.3.tgz#f2fe880d261e33bce1c6d613be074fd87af9f7e6" - integrity sha512-/LTTIpgEmEwkyhn8yXxDdBWqXqzlgw5w2PtTpIwkSlP2/jDwdR/9w1TkFzhNbJ81ki6LAEQM5mSwoTTnbIIecg== - dependencies: - "@algolia/requester-common" "4.8.3" - -"@algolia/requester-common@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.8.3.tgz#633b6782ae3fcf1743507c0ef207db5c62737443" - integrity sha512-+Yo9vBkofoKR1SCqqtMnmnfq9yt/BiaDewY/6bYSMNxSYCnu2Fw1JKSIaf/4zos09PMSsxGpLohZwGas3+0GDQ== - -"@algolia/requester-node-http@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.8.3.tgz#81c8e5d02f16a57cebfa2309a931fad6de84eb6d" - integrity sha512-k2fiKIeMIFqgC01FnzII6kqC2GQBAfbNaUX4k7QCPa6P8t4sp2xE6fImOUiztLnnL3C9X9ZX6Fw3L+cudi7jvQ== - dependencies: - "@algolia/requester-common" "4.8.3" - -"@algolia/transporter@4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.8.3.tgz#6ad10b4be16653d667bb4727df27478931631fe8" - integrity sha512-nU7fy2iU8snxATlsks0MjMyv97QJWQmOVwTjDc+KZ4+nue8CLcgm4LA4dsTBqvxeCQIoEtt3n72GwXcaqiJSjQ== - dependencies: - "@algolia/cache-common" "4.8.3" - "@algolia/logger-common" "4.8.3" - "@algolia/requester-common" "4.8.3" +"@algolia/cache-browser-local-storage@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.8.4.tgz#6a03ffc6b0b5b5aa7f74732bf8091a0f3d2b0986" + integrity sha512-qSS3VMP3oMhcLrYIFveRyt3F5XB6MqWogF4Vooj8KvOvqv6jBmYwkAueSXCF5pkJEaA72VL9+9NbBpfC8ez2ww== + dependencies: + "@algolia/cache-common" "4.8.4" + +"@algolia/cache-common@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.8.4.tgz#b105bdfe3fa0ba15db936177c4db420befed2ab7" + integrity sha512-5+dLmj6qFy4WOtnNQuFRfWTIIDdpUigv+dXaKMFplNPBvZHGFy3hcRjWqYzGcqaeLqcXbN8cU5r75mvrlJIxcw== + +"@algolia/cache-in-memory@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.8.4.tgz#e978935dd8c4bbd555820e9b9fc863a24f3d38dd" + integrity sha512-PBN4YKxn/L+HjVKqUE5rtLiFKqzm4qnUoF7QvCFFmFAViCdYwZSMFVmDobstqWY3KULfsEqaeD4eU4jxZbKhEA== + dependencies: + "@algolia/cache-common" "4.8.4" + +"@algolia/client-account@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.8.4.tgz#a0af429e3587b33a988fec98ce0c739fd16143aa" + integrity sha512-mrsOnGV4O2b+t1CumUH72+Psw9d9qwngBEp2le7IMSceJQywQvNCyJ4B4qyoozHsIGapXfcVAOhRxqUsNQ6U6g== + dependencies: + "@algolia/client-common" "4.8.4" + "@algolia/client-search" "4.8.4" + "@algolia/transporter" "4.8.4" + +"@algolia/client-analytics@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.8.4.tgz#77c81b699909b50ecd9bf97997f014cfeb358fc3" + integrity sha512-Xy70njSUgG/QTv5+rPjsTIzBF/bjxseS5h9SawrQGzovTosbJbu9JBlg4YwVJnYvjovzpr7S39+gPIPc8M7+Rg== + dependencies: + "@algolia/client-common" "4.8.4" + "@algolia/client-search" "4.8.4" + "@algolia/requester-common" "4.8.4" + "@algolia/transporter" "4.8.4" + +"@algolia/client-common@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.8.4.tgz#a1b35645253c7f96925bfe91bac486e755329b77" + integrity sha512-sQlRa+KWFn+D8AOEZb4kj6RE/i6DnPwVOF4AnNf9IjNB0mUUhLWw96cQN6GDx0KE4lhW67t+qR39ZuuDBgR9ww== + dependencies: + "@algolia/requester-common" "4.8.4" + "@algolia/transporter" "4.8.4" + +"@algolia/client-recommendation@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/client-recommendation/-/client-recommendation-4.8.4.tgz#1aaa9735e96865ff06321a8bc850829445c945d1" + integrity sha512-CE0CVqLGWotVOaUXyU33FVD9FZ/7rqcbwFPH5MgSjVdE0B1YWVedhR0s2BNKodXLcIGVLVYfXR05CLdvOlTw+A== + dependencies: + "@algolia/client-common" "4.8.4" + "@algolia/requester-common" "4.8.4" + "@algolia/transporter" "4.8.4" + +"@algolia/client-search@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.8.4.tgz#0320c4a109d2cc220a9d1002f9ec64655a4494dc" + integrity sha512-eH2tRPnDU3tqpp0BSqP6coRRQe8fceqsupuf/1ho+Mcs5DM13mEuFmNOyPywHRlYLVPmbbCPRhDr5rB8QoN7XQ== + dependencies: + "@algolia/client-common" "4.8.4" + "@algolia/requester-common" "4.8.4" + "@algolia/transporter" "4.8.4" + +"@algolia/logger-common@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.8.4.tgz#42ecab3c92388a0d81b8532cefb47670da46cdd3" + integrity sha512-6hOaFG75Onmant9adcaeCZgvPYfnif7n0H1ycbixm6/WH3SmxqPMG+CMiW8mTNTRrrAEceQVrq6tDHD8jdnOOw== + +"@algolia/logger-console@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.8.4.tgz#adfac58df84848443bff1326986a0ca98db866b9" + integrity sha512-+9T3t/eB9vseANFz9YbFHG0cHjzVP/DVfGqzTAkeSlvMHP69JzJga9Wb0Ai6J3xXE3d4k9K+k6t+kkjCQjzEqg== + dependencies: + "@algolia/logger-common" "4.8.4" + +"@algolia/requester-browser-xhr@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.8.4.tgz#30c5c9d129fafd863b7c9c7a988c36ec5754b973" + integrity sha512-BYa8O/pht0UL2bcm0ZkLZiyC+5dHrbc6gvKIo+OgqxmDb/K4KrVo6RIof3BVpR8fgcfxQJohjNVHKXHxEUhBCQ== + dependencies: + "@algolia/requester-common" "4.8.4" + +"@algolia/requester-common@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.8.4.tgz#670f5e43e4d09ff9a3b9bfda7ac0c03476a9e4b1" + integrity sha512-br3LXb6srfAy7F04axwExmrkPOlXCDckgTFoLFv/RT9Oo28SpoyvHqktyBovQLdzdTs+Laglf+LtOHr0iUrZJg== + +"@algolia/requester-node-http@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.8.4.tgz#8af2cceb45e5bb2b9e7ed3b7daa34f3c2580912a" + integrity sha512-o5Cc4UxYPn3IBHQSDBNFFhq1LQLv40eYvCvK0FPJ8xZkrnNXhjPvaLCu/lQTHpk/HX7DaE6fQ/KboU0OSPKevQ== + dependencies: + "@algolia/requester-common" "4.8.4" + +"@algolia/transporter@4.8.4": + version "4.8.4" + resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.8.4.tgz#09452334e380ff0706676303e6642e76b72ae0bf" + integrity sha512-EvXFYICxrr9QEO6m6awUeNOBstOxePQ2Fy0jtYlS1v9TY2P5HqKRzkxmaZjeYRBsXOImpVjgQIzTzj1Au4br2w== + dependencies: + "@algolia/cache-common" "4.8.4" + "@algolia/logger-common" "4.8.4" + "@algolia/requester-common" "4.8.4" "@arr/every@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@arr/every/-/every-1.0.1.tgz#22fe1f8e6355beca6c7c7bde965eb15cf994387b" integrity sha512-UQFQ6SgyJ6LX42W8rHCs8KVc0JS0tzVL9ct4XYedJukskYVWTo49tNiMEK9C2HTyarbNiT/RVIRSY82vH+6sTg== -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== dependencies: - "@babel/highlight" "^7.10.4" + "@babel/highlight" "^7.12.13" "@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.7.5": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" - integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.10" - "@babel/helper-module-transforms" "^7.12.1" - "@babel/helpers" "^7.12.5" - "@babel/parser" "^7.12.10" - "@babel/template" "^7.12.7" - "@babel/traverse" "^7.12.10" - "@babel/types" "^7.12.10" + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.13.tgz#b73a87a3a3e7d142a66248bf6ad88b9ceb093425" + integrity sha512-BQKE9kXkPlXHPeqissfxo0lySWJcYdEP0hdtJOH/iJfDdhOCcgtNCjftCJg3qqauB4h+lz2N6ixM++b9DN1Tcw== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.12.13" + "@babel/helper-module-transforms" "^7.12.13" + "@babel/helpers" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -139,134 +139,134 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" - integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== +"@babel/generator@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.13.tgz#5f6ebe6c85db99886db2d7b044409196f872a503" + integrity sha512-9qQ8Fgo8HaSvHEt6A5+BATP7XktD/AdAnObUeTRz5/e2y3kbrxZgz32qUJJsdmwUvBJzF4AeV21nGTNwv05Mpw== dependencies: - "@babel/types" "^7.12.11" + "@babel/types" "^7.12.13" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-create-class-features-plugin@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" - integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== +"@babel/helper-create-class-features-plugin@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.13.tgz#0f1707c2eec1a4604f2a22a6fb209854ef2a399a" + integrity sha512-Vs/e9wv7rakKYeywsmEBSRC9KtmE7Px+YBlESekLeJOF0zbGUicGfXSNi3o+tfXSNS48U/7K9mIOOCR79Cl3+Q== dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-member-expression-to-functions" "^7.12.1" - "@babel/helper-optimise-call-expression" "^7.10.4" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.10.4" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-member-expression-to-functions" "^7.12.13" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/helper-replace-supers" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" -"@babel/helper-function-name@^7.10.4", "@babel/helper-function-name@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" - integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== dependencies: - "@babel/helper-get-function-arity" "^7.12.10" - "@babel/template" "^7.12.7" - "@babel/types" "^7.12.11" + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/helper-get-function-arity@^7.12.10": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" - integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== dependencies: - "@babel/types" "^7.12.10" + "@babel/types" "^7.12.13" -"@babel/helper-member-expression-to-functions@^7.12.1", "@babel/helper-member-expression-to-functions@^7.12.7": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" - integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== +"@babel/helper-member-expression-to-functions@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.13.tgz#c5715695b4f8bab32660dbdcdc2341dec7e3df40" + integrity sha512-B+7nN0gIL8FZ8SvMcF+EPyB21KnCcZHQZFczCxbiNGV/O0rsrSBlWGLzmtBJ3GMjSVMIm4lpFhR+VdVBuIsUcQ== dependencies: - "@babel/types" "^7.12.7" + "@babel/types" "^7.12.13" -"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.1": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" - integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" + integrity sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== dependencies: - "@babel/types" "^7.12.5" + "@babel/types" "^7.12.13" -"@babel/helper-module-transforms@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" - integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== - dependencies: - "@babel/helper-module-imports" "^7.12.1" - "@babel/helper-replace-supers" "^7.12.1" - "@babel/helper-simple-access" "^7.12.1" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/helper-validator-identifier" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.1" - "@babel/types" "^7.12.1" +"@babel/helper-module-transforms@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.13.tgz#01afb052dcad2044289b7b20beb3fa8bd0265bea" + integrity sha512-acKF7EjqOR67ASIlDTupwkKM1eUisNAjaSduo5Cz+793ikfnpe7p4Q7B7EWU2PCoSTPWsQkR7hRUWEIZPiVLGA== + dependencies: + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-replace-supers" "^7.12.13" + "@babel/helper-simple-access" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" lodash "^4.17.19" -"@babel/helper-optimise-call-expression@^7.10.4", "@babel/helper-optimise-call-expression@^7.12.10": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" - integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== +"@babel/helper-optimise-call-expression@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" + integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA== dependencies: - "@babel/types" "^7.12.10" + "@babel/types" "^7.12.13" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" - integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.8.0": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.12.13.tgz#174254d0f2424d8aefb4dd48057511247b0a9eeb" + integrity sha512-C+10MXCXJLiR6IeG9+Wiejt9jmtFpxUc3MQqCmPY8hfCjyUGl9kT+B2okzEZrtykiwrc4dbCPdDoz0A/HQbDaA== -"@babel/helper-replace-supers@^7.12.1": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d" - integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA== +"@babel/helper-replace-supers@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.13.tgz#00ec4fb6862546bd3d0aff9aac56074277173121" + integrity sha512-pctAOIAMVStI2TMLhozPKbf5yTEXc0OJa0eENheb4w09SrgOWEs+P4nTOZYJQCqs8JlErGLDPDJTiGIp3ygbLg== dependencies: - "@babel/helper-member-expression-to-functions" "^7.12.7" - "@babel/helper-optimise-call-expression" "^7.12.10" - "@babel/traverse" "^7.12.10" - "@babel/types" "^7.12.11" + "@babel/helper-member-expression-to-functions" "^7.12.13" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/helper-simple-access@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" - integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== +"@babel/helper-simple-access@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" + integrity sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== dependencies: - "@babel/types" "^7.12.1" + "@babel/types" "^7.12.13" -"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" - integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== +"@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== dependencies: - "@babel/types" "^7.12.11" + "@babel/types" "^7.12.13" -"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": +"@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== -"@babel/helpers@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" - integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== +"@babel/helpers@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.13.tgz#3c75e993632e4dadc0274eae219c73eb7645ba47" + integrity sha512-oohVzLRZ3GQEk4Cjhfs9YkJA4TdIDTObdBEZGrd6F/T0GPSnuV6l22eMcxlvcvzVIPH3VTtxbseudM1zIE+rPQ== dependencies: - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.12.5" - "@babel/types" "^7.12.5" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== +"@babel/highlight@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" + integrity sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" - integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.13", "@babel/parser@^7.6.0", "@babel/parser@^7.9.6": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.13.tgz#3ee7be4131fe657ba9143d5c5b3a9f253fdb75e9" + integrity sha512-z7n7ybOUzaRc3wwqLpAX8UFIXsrVXUJhtNGBwAnLz6d1KUapqyq7ad2La8gZ6CXhHmGAIL32cop8Tst4/PNWLw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -283,11 +283,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.8.3": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" - integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -304,11 +304,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.0.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926" - integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz#044fb81ebad6698fe62c478875575bcbb9b70f15" + integrity sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -353,92 +353,68 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-top-level-await@^7.8.3": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" - integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178" + integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-typescript@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.1.tgz#460ba9d77077653803c3dd2e673f76d66b4029e5" - integrity sha512-UZNEcCY+4Dp9yYRCAHrHDU+9ZXLYaY9MgBXSRLkB9WjYFRR6quJBumfVrEkUxrePPBwFcpWfNKXqVRQQtm7mMA== +"@babel/plugin-syntax-typescript@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" + integrity sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-transform-typescript@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.1.tgz#d92cc0af504d510e26a754a7dbc2e5c8cd9c7ab4" - integrity sha512-VrsBByqAIntM+EYMqSm59SiMEf7qkmI9dqMt6RbD/wlwueWmYcI0FFK5Fj47pP6DRZm+3teXjosKlwcZJ5lIMw== + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.13.tgz#8bcb5dd79cb8bba690d6920e19992d9228dfed48" + integrity sha512-z1VWskPJxK9tfxoYvePWvzSJC+4pxXr8ArmRm5ofqgi+mwpKg6lvtomkIngBYMJVnKhsFYVysCQLDn//v2RHcg== dependencies: - "@babel/helper-create-class-features-plugin" "^7.12.1" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-typescript" "^7.12.1" + "@babel/helper-create-class-features-plugin" "^7.12.13" + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/plugin-syntax-typescript" "^7.12.13" -"@babel/runtime@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" - integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== +"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.13.tgz#0a21452352b02542db0ffb928ac2d3ca7cb6d66d" + integrity sha512-8+3UMPBrjFa/6TtKi/7sehPKqfAm4g6K+YQjyyFOLUTxzOngcRZTlAVY8sc2CORJYqdHQY8gRPHmn+qo15rCBw== dependencies: regenerator-runtime "^0.13.4" "@babel/standalone@^7.12.12": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.12.12.tgz#f858ab1c76d9c4c23fe0783a0330ad37755f0176" - integrity sha512-sHuNDN9NvPHsDAmxPD3RpsIeqCoFSW+ySa6+3teInrYe9y0Gn5swLQ2ZE7Zk6L8eBBESZM2ob1l98qWauQfDMA== - -"@babel/template@^7.0.0", "@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.3.3": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" - integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" - -"@babel/traverse@^7.0.0": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" - integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== - dependencies: - "@babel/code-frame" "^7.12.11" - "@babel/generator" "^7.12.11" - "@babel/helper-function-name" "^7.12.11" - "@babel/helper-split-export-declaration" "^7.12.11" - "@babel/parser" "^7.12.11" - "@babel/types" "^7.12.12" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" - integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.10" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.10" - "@babel/types" "^7.12.10" + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.12.13.tgz#99650a35132de1a13e377d4a63b7286fd95c7e1b" + integrity sha512-GCI57RGfODuEv69t3HRv0ZGsZYHZf9Wb2dwne8BXod0UOcTN3HWAunSrSTR42fHTIQD1yj1r8Zx0AINSYz97Ew== + +"@babel/template@^7.0.0", "@babel/template@^7.12.13", "@babel/template@^7.3.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" + +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.13.tgz#689f0e4b4c08587ad26622832632735fb8c4e0c0" + integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.12.13" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.6.1", "@babel/types@^7.9.6": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.11.tgz#a86e4d71e30a9b6ee102590446c98662589283ce" - integrity sha512-ukA9SQtKThINm++CX1CwmliMrE54J6nIYB5XTwL5f/CLFW9owfls+YSU8tVW15RQ2w+a3fSbPjC6HdQNtWZkiA== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.12.12": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" - integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== +"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.13", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.6.1", "@babel/types@^7.9.6": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.13.tgz#8be1aa8f2c876da11a9cf650c0ecf656913ad611" + integrity sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ== dependencies: "@babel/helper-validator-identifier" "^7.12.11" lodash "^4.17.19" @@ -480,10 +456,10 @@ "@francoischalifour/autocomplete-preset-algolia" "^1.0.0-alpha.28" algoliasearch "^4.0.0" -"@eslint/eslintrc@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76" - integrity sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ== +"@eslint/eslintrc@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" + integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -492,7 +468,7 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -702,9 +678,9 @@ "@rushstack/node-core-library" "3.35.2" "@microsoft/api-extractor@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.12.1.tgz#4204be6c9f845d7d1796b6d51c58bcb25e7267e9" - integrity sha512-lleLrKkqiRvOQeoRMSHQY0wl/j9SxRVd9+Btyh/WWw0kHNy7nAKyzGmejvlz2XTn13H0elJWV6C3dxhaQy4mtA== + version "7.13.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.13.0.tgz#13900fc7596c29daeecd3f33ed8960cfc5250107" + integrity sha512-T+14VIhB91oJIett5AZ02VWYmz/01VHFWkcAOWiErIQ8AiFhJZoGqTjGxoi8ZpEEBuAj2EGVYojORwLc/+aiDQ== dependencies: "@microsoft/api-extractor-model" "7.12.1" "@microsoft/tsdoc" "0.12.24" @@ -716,32 +692,32 @@ resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.0.5" + typescript "~4.1.3" "@microsoft/tsdoc@0.12.24": version "0.12.24" resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.24.tgz#30728e34ebc90351dd3aff4e18d038eed2c3e098" integrity sha512-Mfmij13RUTmHEMi9vRUhMXD7rnGR2VvxeNYtaGtaJ4redwwjT4UXYJ+nzmVJF7hhd4pn/Fx5sncDKxMVFJSWPg== -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== dependencies: - "@nodelib/fs.stat" "2.0.3" + "@nodelib/fs.stat" "2.0.4" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== "@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== dependencies: - "@nodelib/fs.scandir" "2.1.3" + "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" "@polka/url@^0.5.0": @@ -755,16 +731,16 @@ integrity sha512-3NsZsJIA/22P3QUyrEDNA2D133H4j224twJrdipXN38dpnIOzAbUDtOwkcJ5pXmn75w7LSQDjA4tO9dm1XlqlA== "@rollup/plugin-alias@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.1.tgz#bb96cf37fefeb0a953a6566c284855c7d1cd290c" - integrity sha512-hNcQY4bpBUIvxekd26DBPgF7BT4mKVNDF5tBG4Zi+3IgwLxGYRY0itHs9D0oLVwXM5pvJDWJlBQro+au8WaUWw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.2.tgz#c585b05be4a7782d269c69d13def56f44e417772" + integrity sha512-wzDnQ6v7CcoRzS0qVwFPrFdYA4Qlr+ookA217Y2Z3DPZE1R8jrFNM3jvGgOf6o6DMjbnQIn5lCIJgHPe1Bt3uw== dependencies: slash "^3.0.0" "@rollup/plugin-commonjs@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.0.0.tgz#2ae2228354cf0fbba6cf9f06f30b2c66a974324c" - integrity sha512-/omBIJG1nHQc+bgkYDuLpb/V08QyutP9amOrJRUSlYJZP+b/68gM//D8sxJe3Yry2QnYIr3QjR3x4AlxJEN3GA== + version "17.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-17.1.0.tgz#757ec88737dffa8aa913eb392fade2e45aef2a2d" + integrity sha512-PoMdXCw0ZyvjpCMT5aV4nkL0QywxP29sODQsSGeDpr/oI49Qq9tRtAsb/LbYbDzFlOydVEqHmmZWFtXJEAX9ew== dependencies: "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" @@ -792,9 +768,9 @@ "@rollup/pluginutils" "^3.0.8" "@rollup/plugin-node-resolve@^11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.1.tgz#d3765eec4bccf960801439a999382aed2dca959b" - integrity sha512-ltlsj/4Bhwwhb+Nb5xCz/6vieuEj2/BAkkqVIKmZwC7pIdl8srmgmglE4S0jFlZa32K4qvdQ6NHdmpRKD/LwoQ== + version "11.1.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.1.tgz#47bc34252914794a1b06fb50371d7520a03f91f3" + integrity sha512-zlBXR4eRS+2m79TsUZWhsd0slrHUYdRx4JF+aVQm+MI0wsKdlpC2vlDVjmlGvtZY1vsefOT9w3JxvmWSBei+Lg== dependencies: "@rollup/pluginutils" "^3.1.0" "@types/resolve" "1.17.1" @@ -804,9 +780,9 @@ resolve "^1.19.0" "@rollup/plugin-typescript@^8.0.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.1.0.tgz#b7bbbbb4fd1324834f37844efd48b3844d912742" - integrity sha512-pyQlcGQYRsONUDwXK3ckGPHjPzmjlq4sinzr7emW8ZMb2oZjg9WLcdcP8wyHSvBjvHrLzMayyPy079RROqb4vw== + version "8.1.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.1.1.tgz#cadd6c381a92cc7e8148cc8b1eeba146020635d0" + integrity sha512-DPFy0SV8/GgHFL31yPFVo0G1T3yzwdw6R9KisBfO2zCYbDHUqDChSWr1KmtpGz/TmutpoGJjIvu80p9HzCEF0A== dependencies: "@rollup/pluginutils" "^3.1.0" resolve "^1.17.0" @@ -863,9 +839,9 @@ string-argv "~0.3.1" "@sinonjs/commons@^1.7.0": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" - integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== + version "1.8.2" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" + integrity sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw== dependencies: type-detect "4.0.8" @@ -937,16 +913,21 @@ resolved "https://registry.yarnpkg.com/@types/es-module-lexer/-/es-module-lexer-0.3.0.tgz#9fee3f19f64e6b3f999eeb3a70bd177a4d57a6cb" integrity sha512-XI3MGSejUQIJ3wzY0i5IHy5J3eb36M/ytgG8jIOssP08ovtRPcjpjXQqrx51AHBNBOisTS/NQNWJitI17+EwzQ== -"@types/estree@*", "@types/estree@^0.0.45": - version "0.0.45" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" - integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== +"@types/estree@*": + version "0.0.46" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" + integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/estree@^0.0.45": + version "0.0.45" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" + integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== + "@types/etag@^1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@types/etag/-/etag-1.8.0.tgz#37f0b1f3ea46da7ae319bbedb607e375b4c99f7e" @@ -955,9 +936,9 @@ "@types/node" "*" "@types/fs-extra@^9.0.5": - version "9.0.5" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.5.tgz#2afb76a43a4bef80a363b94b314d0ca1694fc4f8" - integrity sha512-wr3t7wIW1c0A2BIJtdVp4EflriVaVVAsCAIHVzzh8B+GiFv9X1xeJjCs4upRXtzp7kQ6lP5xvskjoD4awJ1ZeA== + version "9.0.6" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.6.tgz#488e56b77299899a608b8269719c1d133027a6ab" + integrity sha512-ecNRHw4clCkowNOBJH1e77nvbPxHYnWIXMv1IAoG/9+MYGkgoyr3Ppxr7XYFNL41V422EDhyV4/4SSK8L2mlig== dependencies: "@types/node" "*" @@ -993,13 +974,18 @@ "@types/istanbul-lib-report" "*" "@types/jest@26.x", "@types/jest@^26.0.19": - version "26.0.19" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790" - integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ== + version "26.0.20" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" + integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" +"@types/less@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/less/-/less-3.0.2.tgz#2761d477678c8374cb9897666871662eb1d1115e" + integrity sha512-62vfe65cMSzYaWmpmhqCMMNl0khen89w57mByPi1OseGfcV/LV03fO8YVrNj7rFQsRWNJo650WWyh6m7p8vZmA== + "@types/mime@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.3.tgz#c893b73721db73699943bfc3653b1deb7faa4a3a" @@ -1011,9 +997,9 @@ integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== "@types/node@*", "@types/node@^14.14.10": - version "14.14.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.14.tgz#f7fd5f3cc8521301119f63910f0fb965c7d761ae" - integrity sha512-UHnOPWVWV1z+VV8k6L1HhG7UbGBgIdghqF3l9Ny9ApPghbjICXkUJSd/b9gOgQfjM1r+37cipdw/HJ3F6ICEnQ== + version "14.14.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" + integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== "@types/node@10.17.13": version "10.17.13" @@ -1031,17 +1017,31 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@^2.0.0": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.5.tgz#b6ab3bba29e16b821d84e09ecfaded462b816b00" - integrity sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ== + version "2.1.6" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.6.tgz#f4b1efa784e8db479cdb8b14403e2144b1e9ff03" + integrity sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA== -"@types/resolve@1.17.1", "@types/resolve@^1.17.1": +"@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw== dependencies: "@types/node" "*" +"@types/resolve@^1.17.1": + version "1.19.0" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.19.0.tgz#75c729aedd9a0de60650facb16eb33239d3c407a" + integrity sha512-NikKq+D2KJzmaWbcz4JLVT34ybtCC4c3jV6XRGWOQvOkXka9QblEmC+sPf3vRa3lmcURkVbCk2V2BDyCO7jbXg== + dependencies: + "@types/node" "*" + +"@types/sass@^1.16.0": + version "1.16.0" + resolved "https://registry.yarnpkg.com/@types/sass/-/sass-1.16.0.tgz#b41ac1c17fa68ffb57d43e2360486ef526b3d57d" + integrity sha512-2XZovu4NwcqmtZtsBR5XYLw18T8cBCnU2USFHTnYLLHz9fkhnoEMoDsqShJIOFsFhn5aJHjweiUUdTrDGujegA== + dependencies: + "@types/node" "*" + "@types/semver@^7.3.4": version "7.3.4" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" @@ -1060,14 +1060,14 @@ "@types/node" "*" "@types/yargs-parser@*": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" - integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== + version "20.2.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9" + integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA== "@types/yargs@^15.0.0": - version "15.0.12" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.12.tgz#6234ce3e3e3fa32c5db301a170f96a599c960d74" - integrity sha512-f+fD/fQAo3BCbCDlrUpznF1A5Zp9rB0noS5vnoormHSIPFKL0Z2DcUJ3Gxp5ytH4uLRNxy7AwYUC9exZzqGMAw== + version "15.0.13" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.13.tgz#34f7fec8b389d7f3c1fd08026a5763e072d3c6dc" + integrity sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ== dependencies: "@types/yargs-parser" "*" @@ -1079,35 +1079,35 @@ "@types/node" "*" "@typescript-eslint/parser@^4.9.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.11.0.tgz#1dd3d7e42708c10ce9f3aa64c63c0ab99868b4e2" - integrity sha512-NBTtKCC7ZtuxEV5CrHUO4Pg2s784pvavc3cnz6V+oJvVbK4tH9135f/RBP6eUA2KHiFKAollSrgSctQGmHbqJQ== + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.2.tgz#31e216e4baab678a56e539f9db9862e2542c98d0" + integrity sha512-ipqSP6EuUsMu3E10EZIApOJgWSpcNXeKZaFeNKQyzqxnQl8eQCbV+TSNsl+s2GViX2d18m1rq3CWgnpOxDPgHg== dependencies: - "@typescript-eslint/scope-manager" "4.11.0" - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/typescript-estree" "4.11.0" + "@typescript-eslint/scope-manager" "4.14.2" + "@typescript-eslint/types" "4.14.2" + "@typescript-eslint/typescript-estree" "4.14.2" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.11.0.tgz#2d906537db8a3a946721699e4fc0833810490254" - integrity sha512-6VSTm/4vC2dHM3ySDW9Kl48en+yLNfVV6LECU8jodBHQOhO8adAVizaZ1fV0QGZnLQjQ/y0aBj5/KXPp2hBTjA== +"@typescript-eslint/scope-manager@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.2.tgz#64cbc9ca64b60069aae0c060b2bf81163243b266" + integrity sha512-cuV9wMrzKm6yIuV48aTPfIeqErt5xceTheAgk70N1V4/2Ecj+fhl34iro/vIssJlb7XtzcaD07hWk7Jk0nKghg== dependencies: - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/visitor-keys" "4.11.0" + "@typescript-eslint/types" "4.14.2" + "@typescript-eslint/visitor-keys" "4.14.2" -"@typescript-eslint/types@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.11.0.tgz#86cf95e7eac4ccfd183f9fcf1480cece7caf4ca4" - integrity sha512-XXOdt/NPX++txOQHM1kUMgJUS43KSlXGdR/aDyEwuAEETwuPt02Nc7v+s57PzuSqMbNLclblQdv3YcWOdXhQ7g== +"@typescript-eslint/types@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.2.tgz#d96da62be22dc9dc6a06647f3633815350fb3174" + integrity sha512-LltxawRW6wXy4Gck6ZKlBD05tCHQUj4KLn4iR69IyRiDHX3d3NCAhO+ix5OR2Q+q9bjCrHE/HKt+riZkd1At8Q== -"@typescript-eslint/typescript-estree@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.11.0.tgz#1144d145841e5987d61c4c845442a24b24165a4b" - integrity sha512-eA6sT5dE5RHAFhtcC+b5WDlUIGwnO9b0yrfGa1mIOIAjqwSQCpXbLiFmKTdRbQN/xH2EZkGqqLDrKUuYOZ0+Hg== +"@typescript-eslint/typescript-estree@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.2.tgz#9c5ebd8cae4d7b014f890acd81e8e17f309c9df9" + integrity sha512-ESiFl8afXxt1dNj8ENEZT12p+jl9PqRur+Y19m0Z/SPikGL6rqq4e7Me60SU9a2M28uz48/8yct97VQYaGl0Vg== dependencies: - "@typescript-eslint/types" "4.11.0" - "@typescript-eslint/visitor-keys" "4.11.0" + "@typescript-eslint/types" "4.14.2" + "@typescript-eslint/visitor-keys" "4.14.2" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -1115,45 +1115,34 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.11.0.tgz#906669a50f06aa744378bb84c7d5c4fdbc5b7d51" - integrity sha512-tRYKyY0i7cMk6v4UIOCjl1LhuepC/pc6adQqJk4Is3YcC6k46HvsV9Wl7vQoLbm9qADgeujiT7KdLrylvFIQ+A== +"@typescript-eslint/visitor-keys@4.14.2": + version "4.14.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.2.tgz#997cbe2cb0690e1f384a833f64794e98727c70c6" + integrity sha512-KBB+xLBxnBdTENs/rUgeUKO0UkPBRs2vD09oMRRIkj5BEN8PX1ToXV532desXfpQnZsYTyLLviS7JrPhdL154w== dependencies: - "@typescript-eslint/types" "4.11.0" + "@typescript-eslint/types" "4.14.2" eslint-visitor-keys "^2.0.0" -"@vue/babel-helper-vue-transform-on@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.0.0.tgz#8cbec6bbcae53626ad70139061be5e73403c9a62" - integrity sha512-svFuKPoXP92TJ76ztENOglOsLjcMGUXkdeQhYDxl6KBnZCpqFjqx6RodUPWFg1bj4zsUVsfoIh1RibLO86fUUQ== +"@vue/babel-helper-vue-transform-on@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.0.2.tgz#9b9c691cd06fc855221a2475c3cc831d774bc7dc" + integrity sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA== "@vue/babel-plugin-jsx@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.1.tgz#8ece4e521888fabe2c96adca428606e5cea55f54" - integrity sha512-pE1YlINZBzqaLeSNfrvo0nNvYjtWTBU+sXUrx65sLW7DL+nDCZcAVeVkMFDcpT1jIahx4hI3EzOcGZE6oLPLoA== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.2.tgz#6bfd8e39c48e53391a56705649f81a35fe20b6a1" + integrity sha512-1uZlQCLCeuqJgDYLCmg3qfsvTVtOQiXh278ES4bvPTYYbv2Bi/rElLETK6AdjI9xxzyTUf5n1QEiH8Xxz0eZrg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/plugin-syntax-jsx" "^7.0.0" "@babel/template" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" - "@vue/babel-helper-vue-transform-on" "^1.0.0" + "@vue/babel-helper-vue-transform-on" "^1.0.2" camelcase "^6.0.0" html-tags "^3.1.0" svg-tags "^1.0.0" -"@vue/compiler-core@3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.4.tgz#0122aca6eada4cb28b39ed930af917444755e330" - integrity sha512-snpMICsbWTZqBFnPB03qr4DtiSxVYfDF3DvbDSkN9Z9NTM8Chl8E/lYhKBSsvauq91DAWAh8PU3lr9vrLyQsug== - dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/shared" "3.0.4" - estree-walker "^2.0.1" - source-map "^0.6.1" - "@vue/compiler-core@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.5.tgz#a6e54cabe9536e74c6513acd2649f311af1d43ac" @@ -1165,15 +1154,7 @@ estree-walker "^2.0.1" source-map "^0.6.1" -"@vue/compiler-dom@3.0.4", "@vue/compiler-dom@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.4.tgz#834fd4b15c5698cf9f4505c2bfbccca058a843eb" - integrity sha512-FOxbHBIkkGjYQeTz1DlXQjS1Ms8EPXQWsdTdTPeohoS0KzCz6RiOjiAG+jLtMi6Nr5GX2h0TlCvcnI8mcsicFQ== - dependencies: - "@vue/compiler-core" "3.0.4" - "@vue/shared" "3.0.4" - -"@vue/compiler-dom@3.0.5": +"@vue/compiler-dom@3.0.5", "@vue/compiler-dom@^3.0.4": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.5.tgz#7885a13e6d18f64dde8ebceec052ed2c102696c2" integrity sha512-HSOSe2XSPuCkp20h4+HXSiPH9qkhz6YbW9z9ZtL5vef2T2PMugH7/osIFVSrRZP/Ul5twFZ7MIRlp8tPX6e4/g== @@ -1181,29 +1162,7 @@ "@vue/compiler-core" "3.0.5" "@vue/shared" "3.0.5" -"@vue/compiler-sfc@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.4.tgz#2119fe1e68d2c268aafa20461c82c139a9adf8e0" - integrity sha512-brDn6HTuK6R3oBCjtMPPsIpyJEZFinlnxjtBXww/goFJOJBAU9CrsdegwyZItNnixCFUIg4CLv4Nj1Eg/eKlfg== - dependencies: - "@babel/parser" "^7.12.0" - "@babel/types" "^7.12.0" - "@vue/compiler-core" "3.0.4" - "@vue/compiler-dom" "3.0.4" - "@vue/compiler-ssr" "3.0.4" - "@vue/shared" "3.0.4" - consolidate "^0.16.0" - estree-walker "^2.0.1" - hash-sum "^2.0.0" - lru-cache "^5.1.1" - magic-string "^0.25.7" - merge-source-map "^1.1.0" - postcss "^7.0.32" - postcss-modules "^3.2.2" - postcss-selector-parser "^6.0.4" - source-map "^0.6.1" - -"@vue/compiler-sfc@^3.0.5": +"@vue/compiler-sfc@^3.0.4", "@vue/compiler-sfc@^3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.5.tgz#3ae08e60244a72faf9598361874fb7bdb5b1d37c" integrity sha512-uOAC4X0Gx3SQ9YvDC7YMpbDvoCmPvP0afVhJoxRotDdJ+r8VO3q4hFf/2f7U62k4Vkdftp6DVni8QixrfYzs+w== @@ -1225,14 +1184,6 @@ postcss-selector-parser "^6.0.4" source-map "^0.6.1" -"@vue/compiler-ssr@3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.4.tgz#ccbd1f55734d51d1402fad825ac102002a7a07c7" - integrity sha512-4aYWQEL4+LS4+D44K9Z7xMOWMEjBsz4Li9nMcj2rxRQ35ewK6uFPodvs6ORP60iBDSkwUFZoldFlNemQlu1BFw== - dependencies: - "@vue/compiler-dom" "3.0.4" - "@vue/shared" "3.0.4" - "@vue/compiler-ssr@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.5.tgz#7661ad891a0be948726c7f7ad1e425253c587b83" @@ -1241,13 +1192,6 @@ "@vue/compiler-dom" "3.0.5" "@vue/shared" "3.0.5" -"@vue/reactivity@3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.4.tgz#b6599dd8271a745960a03f05744ccf7991ba5d8d" - integrity sha512-AFTABrLhUYZY2on3ea9FxeXal7w3f6qIp9gT+/oG93H7dFTL5LvVnxygCopv7tvkIl/GSGQb/yK1D1gmXx1Pww== - dependencies: - "@vue/shared" "3.0.4" - "@vue/reactivity@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.5.tgz#e3789e4d523d845f9ae0b4d770e2b45594742fd2" @@ -1255,14 +1199,6 @@ dependencies: "@vue/shared" "3.0.5" -"@vue/runtime-core@3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.4.tgz#a5b9a001560b1fd8c01a43f68b764c555de7836c" - integrity sha512-qH9e4kqU7b3u1JewvLmGmoAGY+mnuBqz7aEKb2mhpEgwa1yFv496BRuUfMXXMCix3+TndUVMJ8jt41FSdNppwg== - dependencies: - "@vue/reactivity" "3.0.4" - "@vue/shared" "3.0.4" - "@vue/runtime-core@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.5.tgz#da6331d5f300d5794e9e0ebdc8a8bd72a9e19962" @@ -1271,15 +1207,6 @@ "@vue/reactivity" "3.0.5" "@vue/shared" "3.0.5" -"@vue/runtime-dom@3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.4.tgz#6f81aec545f24511d2c28a315aa3391420b69c68" - integrity sha512-BGIoiTSESzWUhN0Ofi2X/q+HN8f6IUFmUEyyBGKbmx7DTAJNZhFfjqsepfXQrM5IGeTfJLB1ZEVyroDQJNXq3g== - dependencies: - "@vue/runtime-core" "3.0.4" - "@vue/shared" "3.0.4" - csstype "^2.6.8" - "@vue/runtime-dom@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.5.tgz#1ce2c9c449e26ab06963da0064096e882a7a8935" @@ -1297,11 +1224,6 @@ "@vue/compiler-ssr" "3.0.5" "@vue/shared" "3.0.5" -"@vue/shared@3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.4.tgz#6dc50f593bdfdeaa6183d1dbc15e2d45e7c6b8b3" - integrity sha512-Swfbz31AaMX48CpFl+YmIrqOH9MgJMTrltG9e26A4ZxYx9LjGuMV+41WnxFzS3Bc9nbrc6sDPM37G6nIT8NJSg== - "@vue/shared@3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.5.tgz#c131d88bd6713cc4d93b3bb1372edb1983225ff0" @@ -1320,7 +1242,7 @@ abab@^2.0.3: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== -accepts@~1.3.5: +accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== @@ -1348,11 +1270,23 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== +acorn-numeric-separator@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/acorn-numeric-separator/-/acorn-numeric-separator-0.3.6.tgz#af7f0abaf8e74bd9ca1117602954d0a3b75804f3" + integrity sha512-jUr5esgChu4k7VzesH/Nww3EysuyGJJcTEEiXqILUFKpO96PNyEXmK21M6nE0TSqGA1PeEg1MzgqJaoFsn9JMw== + acorn-private-class-elements@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/acorn-private-class-elements/-/acorn-private-class-elements-0.2.7.tgz#b14902c705bcff267adede1c9f61c1a317ef95d2" integrity sha512-+GZH2wOKNZOBI4OOPmzpo4cs6mW297sn6fgIk1dUI08jGjhAaEwvC39mN2gJAg2lmAQJ1rBkFqKWonL3Zz6PVA== +acorn-static-class-features@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/acorn-static-class-features/-/acorn-static-class-features-0.2.4.tgz#a0f5261dd483f25196716854f2d7652a1deb39ee" + integrity sha512-5X4mpYq5J3pdndLmIB0+WtFd/mKWnNYpuTlTzj32wUu/PMmEGOiayQ5UrqgwdBNiaZBtDDh5kddpP7Yg2QaQYA== + dependencies: + acorn-private-class-elements "^0.2.7" + acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" @@ -1364,9 +1298,9 @@ acorn@^7.1.1, acorn@^7.4.0: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.0.4: - version "8.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.4.tgz#7a3ae4191466a6984eee0fe3407a4f3aa9db8354" - integrity sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ== + version "8.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.5.tgz#a3bfb872a74a6a7f661bc81b9849d9cac12601b7" + integrity sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg== add-stream@^1.0.0: version "1.0.0" @@ -1398,25 +1332,35 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.0.4.tgz#827e5f5ae32f5e5c1637db61f253a112229b5e2f" + integrity sha512-xzzzaqgEQfmuhbhAoqjJ8T/1okb6gAzXn/eQRNpAN1AEUoHJTNF9xCDRTtf/s3SKldtZfa+RJeTs+BQq+eZ/sw== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + algoliasearch@^4.0.0: - version "4.8.3" - resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.8.3.tgz#f76b824423e4264506fb6ba6a6709feb08ab9954" - integrity sha512-pljX9jEE2TQ3i1JayhG8afNdE8UuJg3O9c7unW6QO67yRWCKr6b0t5aKC3hSVtjt7pA2TQXLKoAISb4SHx9ozQ== - dependencies: - "@algolia/cache-browser-local-storage" "4.8.3" - "@algolia/cache-common" "4.8.3" - "@algolia/cache-in-memory" "4.8.3" - "@algolia/client-account" "4.8.3" - "@algolia/client-analytics" "4.8.3" - "@algolia/client-common" "4.8.3" - "@algolia/client-recommendation" "4.8.3" - "@algolia/client-search" "4.8.3" - "@algolia/logger-common" "4.8.3" - "@algolia/logger-console" "4.8.3" - "@algolia/requester-browser-xhr" "4.8.3" - "@algolia/requester-common" "4.8.3" - "@algolia/requester-node-http" "4.8.3" - "@algolia/transporter" "4.8.3" + version "4.8.4" + resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.8.4.tgz#ac2fc9335dfe06f55b9bd4faf6050ea0c8e0feea" + integrity sha512-QbXpFvBKj/QhKWE7xBoqaWOWyw7ni6W6THSuFJHOcADRrInhjFCBYjrv+YsIhv9huCepKXWpfV4UJup9BslVhQ== + dependencies: + "@algolia/cache-browser-local-storage" "4.8.4" + "@algolia/cache-common" "4.8.4" + "@algolia/cache-in-memory" "4.8.4" + "@algolia/client-account" "4.8.4" + "@algolia/client-analytics" "4.8.4" + "@algolia/client-common" "4.8.4" + "@algolia/client-recommendation" "4.8.4" + "@algolia/client-search" "4.8.4" + "@algolia/logger-common" "4.8.4" + "@algolia/logger-console" "4.8.4" + "@algolia/requester-browser-xhr" "4.8.4" + "@algolia/requester-common" "4.8.4" + "@algolia/requester-node-http" "4.8.4" + "@algolia/transporter" "4.8.4" ansi-colors@^4.1.1: version "4.1.1" @@ -1502,6 +1446,11 @@ array-find-index@^1.0.1, array-find-index@^1.0.2: resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" @@ -1690,9 +1639,9 @@ big.js@^5.2.2: integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== bl@^4.0.3: version "4.0.3" @@ -1708,6 +1657,22 @@ bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1783,21 +1748,21 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - -builtin-modules@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" - integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== +builtin-modules@^3.1.0, builtin-modules@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" + integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + cac@^6.6.1: version "6.7.1" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.1.tgz#0609d28a31d887746de4b66a15e3914f106f880c" @@ -1818,13 +1783,13 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -call-bind@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce" - integrity sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w== +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== dependencies: function-bind "^1.1.1" - get-intrinsic "^1.0.0" + get-intrinsic "^1.0.2" callsites@^3.0.0: version "3.1.0" @@ -1839,15 +1804,6 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase-keys@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" - integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= - dependencies: - camelcase "^4.1.0" - map-obj "^2.0.0" - quick-lru "^1.0.0" - camelcase-keys@^6.2.2: version "6.2.2" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" @@ -1862,11 +1818,6 @@ camelcase@^2.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - camelcase@^5.0.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -1930,9 +1881,9 @@ character-parser@^2.2.0: is-regex "^1.0.3" "chokidar@>=2.0.0 <4.0.0", chokidar@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -1942,7 +1893,7 @@ character-parser@^2.2.0: normalize-path "~3.0.0" readdirp "~3.5.0" optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.1" ci-info@^1.5.0: version "1.6.0" @@ -2008,7 +1959,7 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" -clipboard@^2.0.0: +clipboard@^2.0.0, clipboard@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.6.tgz#52921296eec0fdf77ead1749421b21c968647376" integrity sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg== @@ -2095,7 +2046,7 @@ commander@^2.20.0, commander@^2.7.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^6.2.0: +commander@^6.1.0, commander@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== @@ -2178,6 +2129,18 @@ constantinople@^4.0.1: "@babel/parser" "^7.6.0" "@babel/types" "^7.6.1" +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + conventional-changelog-angular@^5.0.12: version "5.0.12" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" @@ -2221,16 +2184,16 @@ conventional-changelog-conventionalcommits@^4.5.0: q "^1.5.1" conventional-changelog-core@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.1.tgz#f811ad98ab2ff080becafc61407509420c9b447d" - integrity sha512-8cH8/DEoD3e5Q6aeogdR5oaaKs0+mG6+f+Om0ZYt3PNv7Zo0sQhu4bMDRsqAF+UTekTAtP1W/C41jH/fkm8Jtw== + version "4.2.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.2.tgz#f0897df6d53b5d63dec36b9442bd45354f8b3ce5" + integrity sha512-7pDpRUiobQDNkwHyJG7k9f6maPo9tfPzkSWbRq97GGiZqisElhnvUZSvyQH20ogfOjntB5aadvv6NNcKL1sReg== dependencies: add-stream "^1.0.0" conventional-changelog-writer "^4.0.18" conventional-commits-parser "^3.2.0" dateformat "^3.0.0" get-pkg-repo "^1.0.0" - git-raw-commits "2.0.0" + git-raw-commits "^2.0.8" git-remote-origin-url "^2.0.0" git-semver-tags "^4.1.1" lodash "^4.17.15" @@ -2283,9 +2246,9 @@ conventional-changelog-preset-loader@^2.3.4: integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== conventional-changelog-writer@^4.0.18: - version "4.0.18" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.18.tgz#10b73baa59c7befc69b360562f8b9cd19e63daf8" - integrity sha512-mAQDCKyB9HsE8Ko5cCM1Jn1AWxXPYV0v8dFPabZRkvsiWUul2YyAqbIaoMKF88Zf2ffnOPSvKhboLf3fnjo5/A== + version "4.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f" + integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw== dependencies: compare-func "^2.0.0" conventional-commits-filter "^2.0.7" @@ -2343,6 +2306,16 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + copy-anything@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.1.tgz#2afbce6da684bdfcbec93752fa762819cb480d9a" @@ -2356,9 +2329,9 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.8.2.tgz#0a1fd6709246da9ca8eff5bb0cbd15fba9ac7044" - integrity sha512-FfApuSRgrR6G5s58casCBd9M2k+4ikuu4wbW6pJyYU7bd9zvFc9qf7vr5xmrZOhT9nn+8uwlH1oRR9jTnFoA3A== + version "3.8.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.8.3.tgz#c21906e1f14f3689f93abcc6e26883550dd92dd0" + integrity sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -2425,6 +2398,10 @@ css-color-names@^1.0.1: resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-1.0.1.tgz#6ff7ee81a823ad46e020fa2fd6ab40a887e2ba67" integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== +"css-dep@link:./packages/playground/css/css-dep": + version "0.0.0" + uid "" + cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -2459,12 +2436,10 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -dargs@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" - integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= - dependencies: - number-is-nan "^1.0.0" +dargs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" + integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== dashdash@^1.12.0: version "1.14.1" @@ -2501,7 +2476,14 @@ debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1: dependencies: ms "2.1.2" -decamelize-keys@^1.0.0, decamelize-keys@^1.1.0: +debug@^3.2.6: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= @@ -2585,6 +2567,28 @@ delegate@^3.1.2: resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== +"dep-cjs-named-only@link:./packages/playground/optimize-deps/dep-cjs-named-only": + version "0.0.0" + uid "" + +"dep-linked-include@link:./packages/playground/optimize-deps/dep-linked-include": + version "0.0.0" + uid "" + +"dep-linked@link:./packages/playground/optimize-deps/dep-linked": + version "0.0.0" + uid "" + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2715,22 +2719,24 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68" - integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== + version "1.18.0-next.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.2.tgz#088101a55f0541f595e7e057199e27ddc8f3a5c2" + integrity sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw== dependencies: + call-bind "^1.0.2" es-to-primitive "^1.2.1" function-bind "^1.1.1" + get-intrinsic "^1.0.2" has "^1.0.3" has-symbols "^1.0.1" is-callable "^1.2.2" - is-negative-zero "^2.0.0" + is-negative-zero "^2.0.1" is-regex "^1.1.1" - object-inspect "^1.8.0" + object-inspect "^1.9.0" object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.3" + string.prototype.trimstart "^1.0.3" es-module-lexer@^0.3.26: version "0.3.26" @@ -2746,10 +2752,10 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.8.26: - version "0.8.26" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.26.tgz#a85491617ebd2bd35ca4bf479239487eb6819d71" - integrity sha512-u3MMHOOumdWoAKF+073GHPpzvVB2cM+y9VD4ZwYs1FAQ6atRPISya35dbrbOu/mM68mQ42P+nwPzQVBTfQhkvQ== +esbuild@^0.8.34: + version "0.8.39" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.39.tgz#18b84a3d56173c55ee8f45bc6c7b5374b0a98ecb" + integrity sha512-/do5H74a5ChyeKRWfkDh3EpICXpsz6dWTtFFbotb7BlIHvWqnRrZYDb8IBubOHdEtKzuiksilRO19aBtp3/HHQ== escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" @@ -2824,12 +2830,12 @@ eslint-visitor-keys@^2.0.0: integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== eslint@^7.15.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.16.0.tgz#a761605bf9a7b32d24bb7cde59aeb0fd76f06092" - integrity sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw== + version "7.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.19.0.tgz#6719621b196b5fad72e43387981314e5d0dc3f41" + integrity sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.2" + "@eslint/eslintrc" "^0.3.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -2853,7 +2859,7 @@ eslint@^7.15.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -2909,7 +2915,7 @@ estree-walker@^1.0.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== -estree-walker@^2.0.1: +estree-walker@^2.0.1, estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== @@ -2919,7 +2925,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@^1.8.1: +etag@^1.8.1, etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= @@ -3020,6 +3026,42 @@ expect@^26.6.2: jest-message-util "^26.6.2" jest-regex-util "^26.0.0" +express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -3081,9 +3123,9 @@ fast-deep-equal@^3.1.1: integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.1.1, fast-glob@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.4.tgz#d20aefbf99579383e7f3cc66529158c9b98554d3" - integrity sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ== + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -3103,9 +3145,9 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastq@^1.6.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.0.tgz#74dbefccade964932cdf500473ef302719c652bb" - integrity sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA== + version "1.10.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.1.tgz#8b8f2ac8bf3632d67afcd65dac248d5fdc45385e" + integrity sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA== dependencies: reusify "^1.0.4" @@ -3154,7 +3196,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.1.2: +finalhandler@1.1.2, finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== @@ -3199,14 +3241,14 @@ flat-cache@^3.0.4: rimraf "^3.0.2" flatted@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.0.tgz#a5d06b4a8b01e3a63771daa5cb7a1903e2e57067" - integrity sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" + integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== follow-redirects@^1.0.0, follow-redirects@^1.10.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.1.tgz#5f69b813376cee4fd0474a3aba835df04ab763b7" - integrity sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg== + version "1.13.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" + integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== for-in@^1.0.2: version "1.0.2" @@ -3227,6 +3269,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -3234,15 +3281,20 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + fs-extra@^9.0.0, fs-extra@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" - integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== dependencies: at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" - universalify "^1.0.0" + universalify "^2.0.0" fs-extra@~7.0.1: version "7.0.1" @@ -3258,10 +3310,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.1.2: - version "2.2.1" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.2.1.tgz#1fb02ded2036a8ac288d507a65962bd87b97628d" - integrity sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA== +fsevents@^2.1.2, fsevents@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" + integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== fsevents@~2.1.2: version "2.1.3" @@ -3295,10 +3347,10 @@ get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49" - integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg== +get-intrinsic@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.0.tgz#892e62931e6938c8a23ea5aaebcfb67bd97da97e" + integrity sha512-M11rgtQp5GZMZzDL7jLTNxbDfurpzuau5uqRWDPvlHjfvg3TdScAZo96GLvhMjImrmR8uAt0FS2RLoMrfWGKlg== dependencies: function-bind "^1.1.1" has "^1.0.3" @@ -3366,16 +3418,16 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -git-raw-commits@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" - integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== +git-raw-commits@^2.0.8: + version "2.0.10" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" + integrity sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ== dependencies: - dargs "^4.0.1" - lodash.template "^4.0.2" - meow "^4.0.0" - split2 "^2.0.0" - through2 "^2.0.0" + dargs "^7.0.0" + lodash "^4.17.15" + meow "^8.0.0" + split2 "^3.0.0" + through2 "^4.0.0" git-remote-origin-url@^2.0.0: version "2.0.0" @@ -3432,9 +3484,9 @@ globals@^12.1.0: type-fest "^0.8.1" globby@^11.0.0, globby@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" - integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ== + version "11.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.2.tgz#1af538b766a3b540ebfb58a32b2e2d5897321d83" + integrity sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -3450,7 +3502,7 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -3565,15 +3617,34 @@ hash-sum@^2.0.0: resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-2.0.0.tgz#81d01bb5de8ea4a214ad5d6ead1b523460b0b45a" integrity sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg== +history@^4.9.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" + integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^3.0.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^1.0.1" + +hoist-non-react-statics@^3.1.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== hosted-git-info@^3.0.6: - version "3.0.7" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.7.tgz#a30727385ea85acfcee94e0aad9e368c792e036c" - integrity sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ== + version "3.0.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" + integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== dependencies: lru-cache "^6.0.0" @@ -3594,6 +3665,28 @@ html-tags@^3.1.0: resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140" integrity sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg== +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + http-proxy@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" @@ -3630,7 +3723,7 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -iconv-lite@0.4.24: +iconv-lite@0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -3721,11 +3814,6 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= - indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" @@ -3744,11 +3832,16 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + ini@^1.3.2: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -3764,6 +3857,11 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -3796,9 +3894,9 @@ is-buffer@^1.1.5: integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-callable@^1.1.4, is-callable@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" - integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== is-ci@^1.0.10: version "1.2.1" @@ -3920,7 +4018,7 @@ is-module@^1.0.0: resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= -is-negative-zero@^2.0.0: +is-negative-zero@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== @@ -3969,7 +4067,7 @@ is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== -is-reference@^1.2.1: +is-reference@^1.1.4, is-reference@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== @@ -3977,10 +4075,11 @@ is-reference@^1.2.1: "@types/estree" "*" is-regex@^1.0.3, is-regex@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" - integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" + integrity sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg== dependencies: + call-bind "^1.0.2" has-symbols "^1.0.1" is-regexp@^1.0.0: @@ -4039,18 +4138,16 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -isbuiltin@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isbuiltin/-/isbuiltin-1.0.0.tgz#4453b2915690cb47c0cb9c9255a0807778315c96" - integrity sha1-RFOykVaQy0fAy5ySVaCAd3gxXJY= - dependencies: - builtin-modules "^1.1.1" - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -4493,9 +4590,9 @@ jju@~1.4.0: integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= jpeg-js@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.2.tgz#8b345b1ae4abde64c2da2fe67ea216a114ac279d" - integrity sha512-+az2gi/hvex7eLTMTlbRLOhH6P6WFdk2ITI8HJsaH2VqYO0I594zXSYEP+tf4FW+8Cy68ScDXoAsQdyQanv3sw== + version "0.4.3" + resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.3.tgz#6158e09f1983ad773813704be80680550eff977b" + integrity sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q== js-stringify@^1.0.2: version "1.0.2" @@ -4572,6 +4669,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -4588,9 +4690,9 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@2.x, json5@^2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" - integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" @@ -4670,9 +4772,9 @@ kleur@^3.0.3: integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== kolorist@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.2.9.tgz#ccd5c68827c0385f0b26588321c3b6c4433dd2ab" - integrity sha512-mba6w9rkNlcMSSsGM1Xb9rgGFCDEL1APijLIkgtjsORyr9bKaSvQg/2fP8k7lwEiTh8WlMCHWREvf1ndguIKIQ== + version "1.2.10" + resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.2.10.tgz#0f97a3f3a1dd75e980765c7cec8a1de258e580c6" + integrity sha512-S3QtGjCHyINclP4LSClgHw4gi/NxTFcSorqD9SWfrREHKtMyGfi6pyDCTbpQaqyZrMAjB4Exde8eco6kejkqQg== launch-editor-middleware@^2.2.1: version "2.2.1" @@ -4705,6 +4807,23 @@ less@^3.13.0: native-request "^1.0.5" source-map "~0.6.0" +less@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/less/-/less-4.1.1.tgz#15bf253a9939791dc690888c3ff424f3e6c7edba" + integrity sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw== + dependencies: + copy-anything "^2.0.1" + parse-node-version "^1.0.1" + tslib "^1.10.0" + optionalDependencies: + errno "^0.1.1" + graceful-fs "^4.1.2" + image-size "~0.5.0" + make-dir "^2.1.0" + mime "^1.4.1" + needle "^2.5.2" + source-map "~0.6.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -4760,9 +4879,9 @@ lint-staged@^10.5.3: stringify-object "^3.3.0" listr2@^3.2.2: - version "3.2.3" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.2.3.tgz#ef9e0d790862f038dde8a9837be552b1adfd1c07" - integrity sha512-vUb80S2dSUi8YxXahO8/I/s29GqnOL8ozgHVLjfWQXa03BNEeS1TpBLjh2ruaqq5ufx46BRGvfymdBSuoXET5w== + version "3.3.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.3.1.tgz#87b57cc0b8541fa794b814c8bcb76f1211cfbf5c" + integrity sha512-8Zoxe7s/8nNr4bJ8bdAduHD8uJce+exmMmUWTXlq0WuUdffnH3muisHPHPFtW2vvOfohIsq7FGCaguUxN/h3Iw== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" @@ -4772,6 +4891,7 @@ listr2@^3.2.2: p-map "^4.0.0" rxjs "^6.6.3" through "^2.3.8" + wrap-ansi "^7.0.0" load-json-file@^1.0.0: version "1.1.0" @@ -4823,11 +4943,6 @@ lodash-es@^4.17.20: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.20.tgz#29f6332eefc60e849f869c264bc71126ad61e8f7" integrity sha512-JD1COMZsq8maT6mnuz1UMV0jvYD0E0aUsSOdrr1/nAG3dhqQXwRRgeW0cSqH1U43INKcqxaiVIQNOUDld7gRDA== -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -4848,37 +4963,17 @@ lodash.ismatch@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc= -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash.template@^4.0.2: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash@4.17.19: version "4.17.19" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== -lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17.15: +lodash@4.x, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@~4.17.15: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== @@ -4900,7 +4995,7 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" -loose-envify@^1.1.0: +loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -4981,11 +5076,6 @@ map-obj@^1.0.0, map-obj@^1.0.1: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= -map-obj@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" - integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= - map-obj@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" @@ -5041,6 +5131,11 @@ mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -5062,25 +5157,10 @@ meow@^3.3.0: redent "^1.0.0" trim-newlines "^1.0.0" -meow@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" - integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== - dependencies: - camelcase-keys "^4.0.0" - decamelize-keys "^1.0.0" - loud-rejection "^1.0.0" - minimist "^1.1.3" - minimist-options "^3.0.1" - normalize-package-data "^2.3.4" - read-pkg-up "^3.0.0" - redent "^2.0.0" - trim-newlines "^2.0.0" - meow@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.0.tgz#0fcaa267e35e4d58584b8205923df6021ddcc7ba" - integrity sha512-fNWkgM1UVMey2kf24yLiccxLihc5W+6zVus3/N0b+VfnJgxV99E9u04X6NAiKdg6ED7DAQBX5sy36NM0QJZkWA== + version "8.1.2" + resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" + integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== dependencies: "@types/minimist" "^1.2.0" camelcase-keys "^6.2.2" @@ -5094,6 +5174,11 @@ meow@^8.0.0: type-fest "^0.18.0" yargs-parser "^20.2.3" +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + merge-source-map@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" @@ -5111,6 +5196,11 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -5138,32 +5228,27 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -mime-db@1.44.0: - version "1.44.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" - integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - -"mime-db@>= 1.43.0 < 2": +mime-db@1.45.0, "mime-db@>= 1.43.0 < 2": version "1.45.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.27" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" - integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== dependencies: - mime-db "1.44.0" + mime-db "1.45.0" -mime@^1.4.1: +mime@1.6.0, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.3.1, mime@^2.4.6, mime@^2.4.7: - version "2.4.7" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.7.tgz#962aed9be0ed19c91fd7dc2ece5d7f4e89a90d74" - integrity sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.0.tgz#2b4af934401779806ee98026bb42e8c1ae1876b1" + integrity sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag== mimic-fn@^2.1.0: version "2.1.0" @@ -5175,6 +5260,14 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== +mini-create-react-context@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz#072171561bfdc922da08a60c2197a497cc2d1d5e" + integrity sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ== + dependencies: + "@babel/runtime" "^7.12.1" + tiny-warning "^1.0.3" + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -5191,14 +5284,6 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist-options@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" - integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== - dependencies: - arrify "^1.0.1" - is-plain-obj "^1.1.0" - minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -5232,11 +5317,21 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + nanoid@^3.1.20: version "3.1.20" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" @@ -5269,6 +5364,15 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= +needle@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.6.0.tgz#24dbb55f2509e2324b4a99d61f413982013ccdbe" + integrity sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -5284,6 +5388,11 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + node-forge@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" @@ -5382,11 +5491,6 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -5411,7 +5515,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.8.0: +object-inspect@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== @@ -5428,7 +5532,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.1: +object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== @@ -5485,9 +5589,9 @@ open-in-editor@^2.2.0: os-homedir "~1.0.2" open@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/open/-/open-7.3.0.tgz#45461fdee46444f3645b6e14eb3ca94b82e1be69" - integrity sha512-mgLwQIx2F/ye9SmbrUkurZCnkoXyXyu9EbHtJZrICjVAJfyMArdHp3KkixGdZx1ZHFPNIwl0DDM1dFFqXbTLZw== + version "7.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-7.4.0.tgz#ad95b98f871d9acb0ec8fecc557082cc9986626b" + integrity sha512-PGoBCX/lclIWlpS/R2PQuIR4NJoXh6X5AwVzE7WXnWRGvHg7+4TBCgsujUgiPpm0K1y4qvQeWnCWVTpTKZBtvA== dependencies: is-docker "^2.0.0" is-wsl "^2.1.1" @@ -5517,9 +5621,9 @@ optionator@^0.9.1: word-wrap "^1.2.3" ora@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ora/-/ora-5.2.0.tgz#de10bfd2d15514384af45f3fa9d9b1aaf344fda1" - integrity sha512-+wG2v8TUU8EgzPHun1k/n45pXquQ9fHnbXVetl9rRgO6kjZszGGbraF3XPTIdgeA+s1lbRjSEftAnyT0w8ZMvQ== + version "5.3.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f" + integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g== dependencies: bl "^4.0.3" chalk "^4.1.0" @@ -5623,15 +5727,20 @@ parse-json@^4.0.0: json-parse-better-errors "^1.0.1" parse-json@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" - integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-node-version@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" @@ -5684,6 +5793,18 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -5715,6 +5836,19 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +periscopic@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/periscopic/-/periscopic-2.0.3.tgz#326e16c46068172ca9a9d20af1a684cd0796fa99" + integrity sha512-FuCZe61mWxQOJAQFEfmt9FjzebRlcpFz8sFPbyaCKtdusPkMEbA9ey0eARnRav5zAhmXznhaQkKGFAPn7X9NUw== + dependencies: + estree-walker "^2.0.2" + is-reference "^1.1.4" + +phoenix@^1.5.7: + version "1.5.7" + resolved "https://registry.yarnpkg.com/phoenix/-/phoenix-1.5.7.tgz#86775bc51271e49930fd7d879ec3ec2addd6bf08" + integrity sha512-RgVdTRsK5NpnUPkjPyLg9P8qQQvuDaUsazH06t+ARu9EnPryQ7asE76VDjVZ43fqjY/p8er6y6OQb17YViG47g== + picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" @@ -5767,10 +5901,11 @@ pkg-dir@^4.2.0: find-up "^4.0.0" playwright-chromium@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/playwright-chromium/-/playwright-chromium-1.7.0.tgz#d22b0f879d4ce753a42528f2357b756c4ef00402" - integrity sha512-m88/bTwguxseNq2IIKwnKcFRG4DSV+sVJpbC7VnGB+cVmrPVx9pMOCSlqN5ldHrMR9hmhMea96b/BcTReCHpKg== + version "1.8.0" + resolved "https://registry.yarnpkg.com/playwright-chromium/-/playwright-chromium-1.8.0.tgz#5e68b07ee27e5fe132f758c40a5ee37a0e501288" + integrity sha512-DMyWmFPXkW0Tm5yBx2pV3m5F8qBSk29+DuZd21liwnG8qNZX43zEY1QpsS51zWPYFgi+nHkRr343GycyAoSUzQ== dependencies: + commander "^6.1.0" debug "^4.1.1" extract-zip "^2.0.1" https-proxy-agent "^5.0.0" @@ -5947,18 +6082,18 @@ postcss@^7.0.14, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: supports-color "^6.1.0" postcss@^8.2.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.1.tgz#eabc5557c4558059b9d9e5b15bce7ffa9089c2a8" - integrity sha512-RhsqOOAQzTgh1UB/IZdca7F9WDb7SUCR2Vnv1x7DbvuuggQIpoDwjK+q0rzoPffhYvWNKX5JSwS4so4K3UC6vA== + version "8.2.4" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.4.tgz#20a98a39cf303d15129c2865a9ec37eda0031d04" + integrity sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg== dependencies: colorette "^1.2.1" nanoid "^3.1.20" source-map "^0.6.1" preact@^10.0.0: - version "10.5.8" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.8.tgz#96e71e2caadf60b5ff901f0e4772a46ba0756336" - integrity sha512-8d0FfBX3O0ay34i15mTckXicSsvaQLemPUByXTyfQUxDeFqZhbtnftVZMNqX3zEJLHcy1bqRu9t+V4GqJtG1TQ== + version "10.5.12" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.12.tgz#6a8ee8bf40a695c505df9abebacd924e4dd37704" + integrity sha512-r6siDkuD36oszwlCkcqDJCAKBQxGoeEGytw2DGMD5A/GGdu5Tymw+N2OBXwvOLxg6d1FeY8MgMV3cc5aVQo4Cg== prelude-ls@^1.2.1: version "1.2.1" @@ -5986,9 +6121,9 @@ pretty-format@^26.0.0, pretty-format@^26.6.2: react-is "^17.0.1" prismjs@^1.20.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa" - integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w== + version "1.23.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33" + integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA== optionalDependencies: clipboard "^2.0.0" @@ -6017,15 +6152,32 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +prop-types@^15.6.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + proper-lockfile@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.1.tgz#284cf9db9e30a90e647afad69deb7cb06881262c" - integrity sha512-1w6rxXodisVpn7QYvLk706mzprPTAPCYAqxMvctmPN3ekuRk/kuGkGc82pangZiAt4R3lwSuUzheTTn0/Yb7Zg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== dependencies: - graceful-fs "^4.1.11" + graceful-fs "^4.2.4" retry "^0.12.0" signal-exit "^3.0.2" +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" @@ -6167,21 +6319,36 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -quick-lru@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" - integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= - quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + react-dom@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.1.tgz#1de2560474ec9f0e334285662ede52dbc5426fc6" @@ -6191,6 +6358,11 @@ react-dom@^17.0.1: object-assign "^4.1.1" scheduler "^0.20.1" +react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + react-is@^17.0.1: version "17.0.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" @@ -6201,6 +6373,35 @@ react-refresh@^0.9.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.9.0.tgz#71863337adc3e5c2f8a6bfddd12ae3bfe32aafbf" integrity sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ== +react-router-dom@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" + integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + loose-envify "^1.3.1" + prop-types "^15.6.2" + react-router "5.2.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + +react-router@5.2.0, react-router@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" + integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + hoist-non-react-statics "^3.1.0" + loose-envify "^1.3.1" + mini-create-react-context "^0.4.0" + path-to-regexp "^1.7.0" + prop-types "^15.6.2" + react-is "^16.6.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + react@17.0.0: version "17.0.0" resolved "https://registry.yarnpkg.com/react/-/react-17.0.0.tgz#ad96d5fa1a33bb9b06d0cc52672f7992d84aa662" @@ -6277,7 +6478,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@3, readable-stream@^3.4.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.4.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -6321,14 +6522,6 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -redent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" - integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= - dependencies: - indent-string "^3.0.0" - strip-indent "^2.0.0" - redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -6424,6 +6617,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -6463,11 +6661,21 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-pathname@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" + integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= +resolve.exports@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.0.2.tgz#98c82ba8a4d3f9fcc32cbfa6f950b803d77b6c21" + integrity sha512-1+PDdTR3xrGWB/NzXLkzS1+PQlJ+BOR2baBGJSVat4HasiY1mnkyAQws3FUTmBDB79oK54QFaDM8Ig9nUtJwvQ== + resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" @@ -6539,11 +6747,11 @@ rollup-plugin-license@^2.2.0: spdx-satisfies "5.0.0" rollup@^2.35.1: - version "2.35.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.35.1.tgz#e6bc8d10893556a638066f89e8c97f422d03968c" - integrity sha512-q5KxEyWpprAIcainhVy6HfRttD9kutQpHbeqDTWnqAFNJotiojetK6uqmcydNMymBEtC4I8bCYR+J3mTMqeaUA== + version "2.38.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.38.4.tgz#1b84ea8728c73b1a00a6a6e9c630ec8c3fe48cea" + integrity sha512-B0LcJhjiwKkTl79aGVF/u5KdzsH8IylVfV56Ut6c9ouWLJcUK17T83aZBetNYSnZtXf2OHD4+2PbmRW+Fp5ulg== optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.1" rsvp@^4.8.4: version "4.8.5" @@ -6599,13 +6807,18 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sass@^1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.30.0.tgz#60bbbbaf76ba10117e61c6c24f00161c3d60610e" - integrity sha512-26EUhOXRLaUY7+mWuRFqGeGGNmhB1vblpTENO1Z7mAzzIZeVxZr9EZoaY1kyGLFWdSOZxRMAufiN2mkbO6dAlw== +sass@^1.30.0, sass@^1.32.5: + version "1.32.6" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.6.tgz#e3646c8325cd97ff75a8a15226007f3ccd221393" + integrity sha512-1bcDHDcSqeFtMr0JXI3xc/CXX6c4p0wHHivJdru8W7waM7a1WjKMm4m/Z5sY7CbVw4Whi2Chpcw6DFfSWwGLzQ== dependencies: chokidar ">=2.0.0 <4.0.0" +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + saxes@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" @@ -6663,6 +6876,35 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@1.14.1, serve-static@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -6678,6 +6920,11 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -6727,9 +6974,9 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== sirv@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.10.tgz#3e591f5a9ae2520f50d5830f5fae38d97e7be194" - integrity sha512-H5EZCoZaggEUQy8ocKsF7WAToGuZhjJlLvM3XOef46CbdIgbNeQ1p32N1PCuCjkVYwrAVOSMacN6CXXgIzuspg== + version "1.0.11" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.11.tgz#81c19a29202048507d6ec0d8ba8910fda52eb5a4" + integrity sha512-SR36i3/LSWja7AJNRBz4fF/Xjpn7lQFI30tZ434dIy+bitLYSP+ZEenHg36i23V2SGEz+kqjksg0uOGZ5LPiqg== dependencies: "@polka/url" "^1.0.0-next.9" mime "^2.3.1" @@ -6813,9 +7060,9 @@ source-map-support@^0.5.19, source-map-support@^0.5.6, source-map-support@~0.5.1 source-map "^0.6.0" source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" @@ -6907,6 +7154,13 @@ split2@^2.0.0: dependencies: through2 "^2.0.2" +split2@^3.0.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" @@ -6949,7 +7203,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -statuses@~1.5.0: +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -6995,7 +7249,7 @@ string.prototype.padend@^3.0.0: define-properties "^1.1.3" es-abstract "^1.18.0-next.1" -string.prototype.trimend@^1.0.1: +string.prototype.trimend@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== @@ -7003,7 +7257,7 @@ string.prototype.trimend@^1.0.1: call-bind "^1.0.0" define-properties "^1.1.3" -string.prototype.trimstart@^1.0.1: +string.prototype.trimstart@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== @@ -7154,11 +7408,11 @@ systemjs@^6.8.3: integrity sha512-UcTY+FEA1B7e+bpJk1TI+a9Na6LG7wFEqW7ED16cLqLuQfI/9Ri0rsXm3tKlIgNoHyLHZycjdAOijzNbzelgwA== table@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/table/-/table-6.0.4.tgz#c523dd182177e926c723eb20e1b341238188aa0d" - integrity sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw== + version "6.0.7" + resolved "https://registry.yarnpkg.com/table/-/table-6.0.7.tgz#e45897ffbcc1bcf9e8a87bf420f2c9e5a7a52a34" + integrity sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g== dependencies: - ajv "^6.12.4" + ajv "^7.0.2" lodash "^4.17.20" slice-ansi "^4.0.0" string-width "^4.2.0" @@ -7247,6 +7501,16 @@ tiny-emitter@^2.0.0: resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== +tiny-invariant@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" + integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== + +tiny-warning@^1.0.0, tiny-warning@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" + integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -7289,6 +7553,11 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + token-stream@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-1.0.0.tgz#cc200eab2613f4166d27ff9afc7ca56d49df6eb4" @@ -7328,11 +7597,6 @@ trim-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= -trim-newlines@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" - integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= - trim-newlines@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" @@ -7351,9 +7615,9 @@ trouter@^2.0.1: matchit "^1.0.0" ts-jest@^26.4.4: - version "26.4.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.4.tgz#61f13fb21ab400853c532270e52cc0ed7e502c49" - integrity sha512-3lFWKbLxJm34QxyVNNCgXX1u4o/RV0myvA2y2Bxm46iGIjKlaY0own9gIckbjZJPn+WaJEnfPPJ20HHGpoq4yg== + version "26.5.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.0.tgz#3e3417d91bc40178a6716d7dacc5b0505835aa21" + integrity sha512-Ya4IQgvIFNa2Mgq52KaO8yBw2W8tWp61Ecl66VjF0f5JaV8u50nGoptHVILOPGoI7SDnShmEqnYQEmyHdQ+56g== dependencies: "@types/jest" "26.x" bs-logger "0.x" @@ -7361,7 +7625,7 @@ ts-jest@^26.4.4: fast-json-stable-stringify "2.x" jest-util "^26.1.0" json5 "2.x" - lodash.memoize "4.x" + lodash "4.x" make-error "1.x" mkdirp "1.x" semver "7.x" @@ -7373,14 +7637,14 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" - integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== tsutils@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" - integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + version "3.20.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.20.0.tgz#ea03ea45462e146b53d70ce0893de453ff24f698" + integrity sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg== dependencies: tslib "^1.8.1" @@ -7435,6 +7699,14 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -7446,25 +7718,20 @@ typedarray-to-buffer@^3.1.5: version "0.0.0" uid "" -typescript@^4.1.2: +typescript@^4.1.2, typescript@~4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== -typescript@~4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389" - integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== uglify-js@^3.1.4: - version "3.12.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.3.tgz#bb26c4abe0e68c55e9776bca9bed99a4df73facf" - integrity sha512-feZzR+kIcSVuLi3s/0x0b2Tx4Iokwqt+8PJM7yRHKuldg4MLdam4TCFeICv+lgDtuYiCtdmrtIP+uN9LWvDasw== + version "3.12.6" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.6.tgz#f884584fcc42e10bca70db5cb32e8625c2c42535" + integrity sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw== union-value@^1.0.0: version "1.0.1" @@ -7486,17 +7753,12 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== -universalify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" - integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== - universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unpipe@~1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= @@ -7510,9 +7772,9 @@ unset-value@^1.0.0: isobject "^3.0.0" uri-js@^4.2.2: - version "4.4.0" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602" - integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" @@ -7552,9 +7814,9 @@ v8-compile-cache@^2.0.3: integrity sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== v8-to-istanbul@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz#b4fe00e35649ef7785a9b7fcebcea05f37c332fc" - integrity sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA== + version "7.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz#5b95cef45c0f83217ec79f8fc7ee1c8b486aee07" + integrity sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -7573,6 +7835,11 @@ validator@^8.0.0: resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== +value-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" + integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== + vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -7587,14 +7854,14 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vitepress@^0.10.7: - version "0.10.7" - resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-0.10.7.tgz#53ce1f735cf765fc50ed07cb0a7d5ae4fb92ef29" - integrity sha512-6ZnH3WIYL58E5ddKCDzihI2UKUOD24e15jfi2YEbiMI3Eb6cZwfFehiZUoSVFQ38sJ6/Vh9p8SzH92w+OlXXFQ== +vitepress@^0.11.4: + version "0.11.5" + resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-0.11.5.tgz#1973058ff50fab8702438361c5a5f1c1df336be1" + integrity sha512-QElAGDxXcvn3G1UrW6VKWX6hd748+07cU1mMH5/gRN/QDdXTVAyt5Ulxmo+IXAmrZQhN5nvvY7jCWWJIDNXQOA== dependencies: "@docsearch/css" "^1.0.0-alpha.28" "@docsearch/js" "^1.0.0-alpha.28" - "@vitejs/plugin-vue" "^1.0.3" + "@vitejs/plugin-vue" "^1.1.0" "@vue/compiler-sfc" "^3.0.5" "@vue/server-renderer" "^3.0.5" chalk "^4.1.0" @@ -7617,7 +7884,7 @@ vitepress@^0.10.7: prismjs "^1.20.0" sirv "^1.0.10" slash "^3.0.0" - vite "^2.0.0-beta.8" + vite "^2.0.0-beta.56" vue "^3.0.5" void-elements@^3.1.0: @@ -7625,14 +7892,10 @@ void-elements@^3.1.0: resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" integrity sha1-YU9/v42AHwu18GYfWy9XhXUOTwk= -vue@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.4.tgz#872c65c143f5717bd5387c61613d9f55f4cc0f43" - integrity sha512-2o+AiQF8sAupyhbyl3oxVCl3WCwC/n5NI7VMM+gVQ231qvSB8eI7sCBloloqDJK6yA367EEtmRSeSCf4sxCC+A== - dependencies: - "@vue/compiler-dom" "3.0.4" - "@vue/runtime-dom" "3.0.4" - "@vue/shared" "3.0.4" +vue-router@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.3.tgz#8b26050c88b2dec7e27a88835f71046b365823ec" + integrity sha512-AD1OjtVPyQHTSpoRsEGfPpxRQwhAhxcacOYO3zJ3KNkYP/r09mileSp6kdMQKhZWP2cFsPR3E2M3PZguSN5/ww== vue@^3.0.5: version "3.0.5" @@ -7643,6 +7906,11 @@ vue@^3.0.5: "@vue/runtime-dom" "3.0.5" "@vue/shared" "3.0.5" +vuex@^4.0.0-rc.2: + version "4.0.0" + resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.0.tgz#ac877aa76a9c45368c979471e461b520d38e6cf5" + integrity sha512-56VPujlHscP5q/e7Jlpqc40sja4vOhC4uJD1llBCWolVI8ND4+VzisDVkUMl+z5y0MpIImW6HjhNc+ZvuizgOw== + w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -7750,6 +8018,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7766,9 +8043,9 @@ write-file-atomic@^3.0.0: typedarray-to-buffer "^3.1.5" ws@^7.2.3, ws@^7.3.1, ws@^7.4.1: - version "7.4.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.1.tgz#a333be02696bd0e54cea0434e21dcc8a9ac294bb" - integrity sha512-pTsP8UAfhy3sk1lSk/O/s4tjD0CRwvMnzvwr4OKGX7ZvqZtUyx4KIJB5JWbkykPoc55tixMGgTNoh3k4FkNGFQ== + version "7.4.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.3.tgz#1f9643de34a543b8edb124bdcbc457ae55a6e5cd" + integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA== xml-name-validator@^3.0.0: version "3.0.0"