From 011552210d6211fd811976321005ceb08a745bab Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 11 Dec 2020 10:35:37 -0500 Subject: [PATCH] wip: react refresh --- packages/playground/App.jsx | 29 +++ packages/playground/index.html | 6 +- packages/playground/main.js | 26 --- packages/playground/main.jsx | 8 + packages/playground/package.json | 3 + packages/playground/vite.config.ts | 7 +- packages/plugin-react-refresh/index.js | 175 ++++++++++++++++ packages/plugin-react-refresh/package.json | 12 ++ packages/plugin-react/package.json | 4 - packages/vite/package.json | 2 +- packages/vite/src/node/cli.ts | 3 +- packages/vite/src/node/config.ts | 7 +- packages/vite/src/node/plugins/index.ts | 2 + packages/vite/src/node/plugins/rewrite.ts | 27 ++- packages/vite/src/node/server/moduleGraph.ts | 11 + yarn.lock | 210 ++++++++++++++++++- 16 files changed, 475 insertions(+), 57 deletions(-) create mode 100644 packages/playground/App.jsx delete mode 100644 packages/playground/main.js create mode 100644 packages/playground/main.jsx create mode 100644 packages/plugin-react-refresh/index.js create mode 100644 packages/plugin-react-refresh/package.json delete mode 100644 packages/plugin-react/package.json diff --git a/packages/playground/App.jsx b/packages/playground/App.jsx new file mode 100644 index 00000000000000..5354ae02a20fb8 --- /dev/null +++ b/packages/playground/App.jsx @@ -0,0 +1,29 @@ +import React, { useState } from 'react' + +function App() { + const [count, setCount] = useState(0) + + return ( +
+
+

Hello Vite + React!

+

+ +

+

+ Edit App.jsx and save to test HMR updates?!@#. +

+ + Learn React + +
+
+ ) +} + +export default App diff --git a/packages/playground/index.html b/packages/playground/index.html index 2e361d01c6de66..8af422c0776309 100644 --- a/packages/playground/index.html +++ b/packages/playground/index.html @@ -1,9 +1,7 @@ -

hello world fsef

-
- + diff --git a/packages/playground/main.js b/packages/playground/main.js deleted file mode 100644 index e528eb475eb669..00000000000000 --- a/packages/playground/main.js +++ /dev/null @@ -1,26 +0,0 @@ -// import { h, render } from 'vue' -// import './test.jsx' -// import pkg from '/@fs/Users/evan/Vue/vite/package.json' -// // import '/non-existent' -import css from './imported.css' -// import './test.scss' -// import { redText } from './foo.module.css' -// import url from './public/logo.png' -// import html from './index.html?raw' - -// console.log(html) -// console.log(url) -// console.log(css) -// console.log(pkg) - -// import './hmr' - -import { createApp } from 'vue' -import Test from './Test.vue' - -createApp(Test).mount('#app') - -// render( -// h('h2', { class: redText }, 'Hello World?'), -// document.getElementById('app') -// ) diff --git a/packages/playground/main.jsx b/packages/playground/main.jsx new file mode 100644 index 00000000000000..4aab64bf16ed0f --- /dev/null +++ b/packages/playground/main.jsx @@ -0,0 +1,8 @@ +import React from 'react' +import ReactDOM from 'react-dom' +import App from './App.jsx' + +ReactDOM.render( + , + document.getElementById('app') +); diff --git a/packages/playground/package.json b/packages/playground/package.json index 033aaa8996faab..03e2d1df3a36c2 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -9,11 +9,14 @@ "debug": "node --inspect-brk ../vite/bin/vite.js" }, "devDependencies": { + "@vitejs/plugin-react-refresh": "^1.0.0", "rollup-plugin-vue": "^6.0.0", "sass": "^1.30.0", "sirv-cli": "^1.0.9" }, "dependencies": { + "@pika/react": "^16.13.1", + "@pika/react-dom": "^16.13.1", "lodash-es": "^4.17.15", "preact": "^10.5.7", "vue": "^3.0.4" diff --git a/packages/playground/vite.config.ts b/packages/playground/vite.config.ts index 8c8c175b3ccb08..8a6cb9e3ee7e1b 100644 --- a/packages/playground/vite.config.ts +++ b/packages/playground/vite.config.ts @@ -1,13 +1,14 @@ import { defineConfig } from 'vite' import vue from 'rollup-plugin-vue' +import reactRefresh from '@vitejs/plugin-react-refresh' export default defineConfig({ // @ts-ignore (when linked locally the types of different rollup installations // conflicts, but for end user this will work properly) - plugins: [vue()], + plugins: [reactRefresh], esbuild: { - jsxFactory: 'h', - jsxFragment: 'Fragment' + // jsxFactory: 'h', + // jsxFragment: 'Fragment' }, server: { proxy: { diff --git a/packages/plugin-react-refresh/index.js b/packages/plugin-react-refresh/index.js new file mode 100644 index 00000000000000..833d047fb06328 --- /dev/null +++ b/packages/plugin-react-refresh/index.js @@ -0,0 +1,175 @@ +// @ts-check +const fs = require('fs') + +const runtimePublicPath = '/@react-refresh.js' +const runtimeFilePath = require.resolve( + 'react-refresh/cjs/react-refresh-runtime.development.js' +) + +function debounce(fn, delay) { + let handle + return () => { + clearTimeout(handle) + handle = setTimeout(fn, delay) + } +} + +const runtimeCode = ` +const exports = {} +${fs.readFileSync(runtimeFilePath, 'utf-8')} +${debounce.toString()} +exports.performReactRefresh = debounce(exports.performReactRefresh, 16) +export default exports +` + +/** + * @type { import('vite').Plugin } + */ +const resolve = { + name: 'react-refresh-resolve', + resolveId(id) { + if (id === 'react') { + return this.resolve('@pika/react/source.development.js') + } + if (id === 'react-dom') { + return this.resolve('@pika/react-dom/source.development.js') + } + if (id === runtimePublicPath) { + return runtimeFilePath + } + }, + + load(id) { + if (id === runtimeFilePath) { + return runtimeCode + } + } +} + +/** + * @type { import('vite').Plugin } + */ +const transform = { + name: 'react-refresh-transform', + + // make sure this is applied after vite's internal esbuild transform + // which handles (j|t)sx + enforce: 'post', + + transform(code, id) { + // @ts-ignore + if (!this.serverContext) { + return + } + if (!/\.(t|j)sx?$/.test(id) || id.includes('node_modules')) { + return + } + + const isReasonReact = id.endsWith('.bs.js') + const result = require('@babel/core').transformSync(code, { + plugins: [ + require('@babel/plugin-syntax-import-meta'), + require('react-refresh/babel') + ], + ast: !isReasonReact, + sourceMaps: true, + sourceFileName: id + }) + + if (!/\$RefreshReg\$\(/.test(result.code)) { + // no component detected in the file + return code + } + + const header = ` + import RefreshRuntime from "${runtimePublicPath}"; + + let prevRefreshReg; + let prevRefreshSig; + + if (!window.__vite_plugin_react_preamble_installed__) { + throw new Error( + "vite-plugin-react can't detect preamble. Something is wrong. See https://github.com/vitejs/vite-plugin-react/pull/11#discussion_r430879201" + ); + } + + if (import.meta.hot) { + prevRefreshReg = window.$RefreshReg$; + prevRefreshSig = window.$RefreshSig$; + window.$RefreshReg$ = (type, id) => { + RefreshRuntime.register(type, ${JSON.stringify(id)} + " " + id) + }; + window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform; + }`.replace(/[\n]+/gm, '') + + const footer = ` + if (import.meta.hot) { + window.$RefreshReg$ = prevRefreshReg; + window.$RefreshSig$ = prevRefreshSig; + + ${ + isReasonReact || isRefreshBoundary(result.ast) + ? `import.meta.hot.accept();` + : `` + } + if (!window.__vite_plugin_react_timeout) { + window.__vite_plugin_react_timeout = setTimeout(() => { + window.__vite_plugin_react_timeout = 0; + RefreshRuntime.performReactRefresh(); + }, 30); + } + }` + + return { + code: `${header}${result.code}${footer}`, + map: result.map + } + }, + + transformIndexHtml() { + return [ + { + 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 + ` + } + ] + } +} + +/** + * @param {import('@babel/types').File} ast + */ +function isRefreshBoundary(ast) { + // Every export must be a React component. + return ast.program.body.every((node) => { + if (node.type !== 'ExportNamedDeclaration') { + return true + } + const { declaration, specifiers } = node + if (declaration && declaration.type === 'VariableDeclaration') { + return declaration.declarations.every( + ({ id }) => id.type === 'Identifier' && isComponentishName(id.name) + ) + } + return specifiers.every( + ({ exported }) => + exported.type === 'Identifier' && isComponentishName(exported.name) + ) + }) +} + +/** + * @param {string} name + */ +function isComponentishName(name) { + return typeof name === 'string' && name[0] >= 'A' && name[0] <= 'Z' +} + +module.exports = [resolve, transform] diff --git a/packages/plugin-react-refresh/package.json b/packages/plugin-react-refresh/package.json new file mode 100644 index 00000000000000..5823f464a23a27 --- /dev/null +++ b/packages/plugin-react-refresh/package.json @@ -0,0 +1,12 @@ +{ + "name": "@vitejs/plugin-react-refresh", + "version": "1.0.0", + "dependencies": { + "@babel/core": "^7.12.10", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "react-refresh": "^0.9.0" + }, + "devDependencies": { + "@babel/types": "^7.12.10" + } +} diff --git a/packages/plugin-react/package.json b/packages/plugin-react/package.json deleted file mode 100644 index ba67cafe220263..00000000000000 --- a/packages/plugin-react/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "@vitejs/plugin-react", - "version": "1.0.0" -} diff --git a/packages/vite/package.json b/packages/vite/package.json index 0a3ffe49923bb0..e47f1df54f7766 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "2.0.0-beta.1", + "version": "2.0.0-alpha.1", "license": "MIT", "author": "Evan You", "description": "Native-ESM powered web dev build tool", diff --git a/packages/vite/src/node/cli.ts b/packages/vite/src/node/cli.ts index 82737e64105392..0142b747a8ab12 100644 --- a/packages/vite/src/node/cli.ts +++ b/packages/vite/src/node/cli.ts @@ -59,7 +59,8 @@ cli options.mode, options.config ).catch((e) => { - console.error(chalk.red(e.toString())) + console.log(chalk.red('[vite] failed to start dev server')) + console.error(e.stack) process.exit(1) }) }) diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index dd996115d118fb..dc5b6df28018f9 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -62,7 +62,7 @@ export interface UserConfig { /** * List of vite plugins to use. */ - plugins?: Plugin[] + plugins?: (Plugin | Plugin[])[] /** * Universal rollup options (used in both serve and build) * Use function config to use conditional options for serve/build @@ -184,7 +184,7 @@ export async function resolveConfig( const normalPlugins: Plugin[] = [] if (plugins) { - plugins.forEach((p) => { + plugins.flat().forEach((p) => { if (p.enforce === 'pre') prePlugins.push(p) else if (p.enforce === 'post') postPlugins.push(p) else normalPlugins.push(p) @@ -220,7 +220,8 @@ export async function resolveConfig( resolved.plugins = resolvePlugins( command, resolved, - [...prePlugins, ...normalPlugins], + prePlugins, + normalPlugins, postPlugins ) diff --git a/packages/vite/src/node/plugins/index.ts b/packages/vite/src/node/plugins/index.ts index a1af35f483354e..9666ea04f63dda 100644 --- a/packages/vite/src/node/plugins/index.ts +++ b/packages/vite/src/node/plugins/index.ts @@ -11,12 +11,14 @@ export function resolvePlugins( command: 'build' | 'serve', config: ResolvedConfig, prePlugins: Plugin[], + normalPlugins: Plugin[], postPlugins: Plugin[] ): Plugin[] { const isBuild = command === 'build' return [ ...prePlugins, + ...normalPlugins, resolvePlugin(config), nodeResolve({ extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json'], diff --git a/packages/vite/src/node/plugins/rewrite.ts b/packages/vite/src/node/plugins/rewrite.ts index a904c651de749f..9d9b40d4aa8cc3 100644 --- a/packages/vite/src/node/plugins/rewrite.ts +++ b/packages/vite/src/node/plugins/rewrite.ts @@ -193,8 +193,10 @@ export function rewritePlugin(config: ResolvedConfig): Plugin { } } - // update the module graph for HMR analysis - moduleGraph.updateModuleInfo(importerModule, importedUrls, isHMRBoundary) + if (hasEnv) { + // inject import.meta.env + str().prepend(`import.meta.env = ${JSON.stringify(config.env)};\n`) + } if (hasHMR) { debugHmr( @@ -206,26 +208,31 @@ export function rewritePlugin(config: ResolvedConfig): Plugin { ) // inject hot context str().prepend( - `import { createHotContext } from "${HMR_CLIENT_PATH}";` + + `import { createHotContext } from "${HMR_CLIENT_PATH}";\n` + `import.meta.hot = createHotContext(${JSON.stringify( importerModule.url - )});` + )});\n` ) } - if (hasEnv) { - // inject import.meta.env - str().prepend(`import.meta.env = ${JSON.stringify(config.env)};`) - } + // update the module graph for HMR analysis + moduleGraph.updateModuleInfo(importerModule, importedUrls, isHMRBoundary) - const result = s ? s.toString() : source isDebug && debugRewrite( `${timeFrom(rewriteStart, timeSpentResolving)} ${chalk.dim( prettyImporter )}` ) - return result + + if (s) { + return { + code: s.toString(), + map: s.generateMap({ hires: true }) + } + } else { + return source + } } } } diff --git a/packages/vite/src/node/server/moduleGraph.ts b/packages/vite/src/node/server/moduleGraph.ts index b4e8566709bbe5..82132c73aed114 100644 --- a/packages/vite/src/node/server/moduleGraph.ts +++ b/packages/vite/src/node/server/moduleGraph.ts @@ -26,6 +26,11 @@ export class ModuleNode { } } +const REQUIRE_EXT_MSG = + `ModuleGraph url keys must be resolved with extensions to ensure mapping ` + + `consistency. Call container.resolveId() first and append the necessary ` + + `extension before passing the url to ModuleGraph methods.` + export class ModuleGraph { private urlToModuleMap = new Map() private idToModuleMap = new Map() @@ -33,6 +38,9 @@ export class ModuleGraph { private fileToModulesMap = new Map>() getModuleByUrl(url: string) { + if (!url.includes('.')) { + throw new Error(REQUIRE_EXT_MSG) + } return this.urlToModuleMap.get(removeTimestampQuery(url)) } @@ -75,6 +83,9 @@ export class ModuleGraph { } ensureEntry(url: string, resolvedId?: string) { + if (!url.includes('.')) { + throw new Error(REQUIRE_EXT_MSG) + } url = removeTimestampQuery(url) let mod = this.urlToModuleMap.get(url) if (!mod) { diff --git a/yarn.lock b/yarn.lock index 2b4d3fd4922f8d..877c31cf86ee95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,11 +9,131 @@ dependencies: "@babel/highlight" "^7.10.4" +"@babel/core@^7.12.10": + 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" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.10.tgz#2b188fc329fb8e4f762181703beffc0fe6df3460" + integrity sha512-6mCdfhWgmqLdtTkhXjnIz0LcdVCd26wS2JXRtj2XY0u5klDsXBREA/pG5NVOuVnF2LUrBGNFtQkIqqTbblg0ww== + dependencies: + "@babel/types" "^7.12.10" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-function-name@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a" + integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== + dependencies: + "@babel/helper-get-function-arity" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-get-function-arity@^7.10.4": + 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== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-member-expression-to-functions@^7.12.1": + 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== + dependencies: + "@babel/types" "^7.12.7" + +"@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== + dependencies: + "@babel/types" "^7.12.5" + +"@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" + lodash "^4.17.19" + +"@babel/helper-optimise-call-expression@^7.10.4": + 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== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-plugin-utils@^7.10.4": + 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-replace-supers@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9" + integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.12.1" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + +"@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== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-split-export-declaration@^7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" + integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== + dependencies: + "@babel/types" "^7.11.0" + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@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== + dependencies: + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + "@babel/highlight@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" @@ -23,12 +143,43 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.0": +"@babel/parser@^7.12.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.7": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA== -"@babel/types@^7.12.0": +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/template@^7.10.4", "@babel/template@^7.12.7": + 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.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" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.12.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.7": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.10.tgz#7965e4a7260b26f09c56bcfcb0498af1f6d9b260" integrity sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw== @@ -104,6 +255,16 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@pika/react-dom@^16.13.1": + version "16.13.1" + resolved "https://registry.yarnpkg.com/@pika/react-dom/-/react-dom-16.13.1.tgz#8e684617ea2e3e0741e418954f74e8ec1c93f81d" + integrity sha512-tCROpA6uP7caCNodaOUcqmauQmpVOmFXsaaKUJgLOMiZdlW+L02ItK3WAqGSOw25rM0bbwDXNC/x9PpfiQ9ESg== + +"@pika/react@^16.13.1": + version "16.13.1" + resolved "https://registry.yarnpkg.com/@pika/react/-/react-16.13.1.tgz#20e47997d2a2f1e5da39a8e28b75db2ec77d99c6" + integrity sha512-v33Ub2QxntNpDFRnkj3tCbT6jMb7Etu7LOMQO/YAulLRIDtDvJdMwuOVJDdPYUmDtWjfWOB5xSP7nl7k0BApbQ== + "@polka/url@^1.0.0-next.9": version "1.0.0-next.11" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71" @@ -761,6 +922,13 @@ console-clear@^1.1.0: resolved "https://registry.yarnpkg.com/console-clear/-/console-clear-1.1.1.tgz#995e20cbfbf14dd792b672cde387bd128d674bf7" integrity sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ== +convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -831,7 +999,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@^4.0.1, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== @@ -1406,6 +1574,11 @@ generic-names@^2.0.1: dependencies: loader-utils "^1.1.0" +gensync@^1.0.0-beta.1: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + get-intrinsic@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.1.tgz#94a9768fcbdd0595a1c9273aacf4c89d075631be" @@ -1466,6 +1639,11 @@ glob@^7.1.3, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + globals@^12.1.0: version "12.4.0" resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" @@ -1899,6 +2077,11 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -1926,6 +2109,13 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +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== + dependencies: + minimist "^1.2.5" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -2640,6 +2830,11 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +react-refresh@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.9.0.tgz#71863337adc3e5c2f8a6bfddd12ae3bfe32aafbf" + integrity sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ== + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" @@ -2810,6 +3005,11 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -2841,7 +3041,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -3023,7 +3223,7 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=