From db9d9f7f081d3970f87d69af016a767f948be7ba Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 1 May 2020 15:24:12 +0200 Subject: [PATCH 1/5] packages/storybook: use ts-loader for JS too --- packages/storybook/.storybook/main.js | 54 +++++++++++++++------------ packages/storybook/tsconfig.json | 5 +++ 2 files changed, 36 insertions(+), 23 deletions(-) create mode 100644 packages/storybook/tsconfig.json diff --git a/packages/storybook/.storybook/main.js b/packages/storybook/.storybook/main.js index 56c00d533f..d93ff20679 100644 --- a/packages/storybook/.storybook/main.js +++ b/packages/storybook/.storybook/main.js @@ -12,36 +12,44 @@ module.exports = { 'storybook-dark-mode/register', ], webpackFinal: async config => { + const coreSrc = path.resolve(__dirname, '../../core/src'); + config.resolve.alias = { ...config.resolve.alias, + // Point to dist version of theme and any other packages that might be needed in the future '@backstage/theme': path.resolve(__dirname, '../../theme'), }; - config.resolve.modules.push(path.resolve(__dirname, '../../core/src')); - config.module.rules.push( - { - test: /\.(ts|tsx)$/, - use: [ - { - loader: require.resolve('ts-loader'), - options: { - transpileOnly: true, - }, - }, - ], - }, - { - test: /\.(js|jsx)$/, - loader: 'babel-loader', - options: { - presets: ['@babel/preset-react'], - plugins: ['@babel/plugin-proposal-class-properties'], - }, - }, - ); + config.resolve.modules.push(coreSrc); + + // Remove the default babel-loader for js files, we're using ts-loader instead + const [jsLoader] = config.module.rules.splice(0, 1); + if (jsLoader.use[0].loader !== 'babel-loader') { + throw new Error( + `Unexpected loader removed from storybook config, ${jsonLoader.use[0].loader}`, + ); + } + config.resolve.extensions.push('.ts', '.tsx'); + // Use ts-loader for all JS/TS files + config.module.rules.push({ + test: /\.(ts|tsx|mjs|js|jsx)$/, + include: [__dirname, coreSrc], + exclude: /node_modules/, + use: [ + { + loader: require.resolve('ts-loader'), + options: { + transpileOnly: true, + }, + }, + ], + }); + // Disable ProgressPlugin which logs verbose webpack build progress. Warnings and Errors are still logged. - config.plugins = config.plugins.filter(({ constructor }) => constructor.name !== "ProgressPlugin") + config.plugins = config.plugins.filter( + ({ constructor }) => constructor.name !== 'ProgressPlugin', + ); return config; }, diff --git a/packages/storybook/tsconfig.json b/packages/storybook/tsconfig.json new file mode 100644 index 0000000000..87132f9b4f --- /dev/null +++ b/packages/storybook/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "include": [".storybook/**/*"], + "compilerOptions": {} +} From 5448e54e949d015fa29286397d31ae4f662e88a6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 1 May 2020 15:25:03 +0200 Subject: [PATCH 2/5] packages/storybook: make local core imports resolve to core src --- packages/storybook/.storybook/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/storybook/.storybook/main.js b/packages/storybook/.storybook/main.js index d93ff20679..5a3eafa532 100644 --- a/packages/storybook/.storybook/main.js +++ b/packages/storybook/.storybook/main.js @@ -16,6 +16,8 @@ module.exports = { config.resolve.alias = { ...config.resolve.alias, + // Resolves imports of @backstage/core inside the storybook config, pointing to src + '@backstage/core': coreSrc, // Point to dist version of theme and any other packages that might be needed in the future '@backstage/theme': path.resolve(__dirname, '../../theme'), }; From b87d266c74f6580c0def0268830abcaa2f1345d4 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 26 Apr 2020 21:10:53 +0200 Subject: [PATCH 3/5] packages/cli: target modern browsers and switch output to module --- packages/cli/config/tsconfig.json | 3 ++- packages/cli/src/commands/plugin/rollup.config.ts | 4 ++-- .../templates/default-app/plugins/welcome/package.json.hbs | 2 +- packages/cli/templates/default-plugin/package.json.hbs | 2 +- packages/core/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/test-utils-core/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/theme/package.json | 2 +- plugins/graphiql/package.json | 2 +- plugins/home-page/package.json | 2 +- plugins/inventory/package.json | 2 +- plugins/lighthouse/package.json | 2 +- plugins/tech-radar/package.json | 2 +- plugins/welcome/package.json | 2 +- 15 files changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/cli/config/tsconfig.json b/packages/cli/config/tsconfig.json index a70ede280b..32f83edc9d 100644 --- a/packages/cli/config/tsconfig.json +++ b/packages/cli/config/tsconfig.json @@ -6,7 +6,8 @@ "noEmit": false, "declarationMap": true, "incremental": true, - "module": "es6", + "target": "ES2019", + "module": "ESNext", "resolveJsonModule": true, "esModuleInterop": true, "types": ["node", "jest"] diff --git a/packages/cli/src/commands/plugin/rollup.config.ts b/packages/cli/src/commands/plugin/rollup.config.ts index e267bb9582..95077e2df3 100644 --- a/packages/cli/src/commands/plugin/rollup.config.ts +++ b/packages/cli/src/commands/plugin/rollup.config.ts @@ -27,8 +27,8 @@ import { paths } from 'lib/paths'; export default { input: 'src/index.ts', output: { - file: 'dist/index.cjs.js', - format: 'cjs', + file: 'dist/index.esm.js', + format: 'module', }, plugins: [ peerDepsExternal({ diff --git a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs index 0f2cb3e1d0..d936bb0784 100644 --- a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs +++ b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs @@ -1,7 +1,7 @@ { "name": "plugin-welcome", "version": "0.0.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "private": true, "scripts": { diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 7603d24618..dad663ce2c 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-{{id}}", "version": "{{version}}", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "license": "Apache-2.0", "private": true, diff --git a/packages/core/package.json b/packages/core/package.json index a5f7c35c16..1d4372f15c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -16,7 +16,7 @@ "backstage" ], "license": "Apache-2.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 2a241f6a9a..bafbab2e32 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -16,7 +16,7 @@ "backstage" ], "license": "Apache-2.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/test-utils-core/package.json b/packages/test-utils-core/package.json index 4d695f2d61..33c27dba62 100644 --- a/packages/test-utils-core/package.json +++ b/packages/test-utils-core/package.json @@ -16,7 +16,7 @@ "backstage" ], "license": "Apache-2.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 5326cc2e07..e34a750ae0 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -16,7 +16,7 @@ "backstage" ], "license": "Apache-2.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/theme/package.json b/packages/theme/package.json index 0a30f884e0..c3f7f6c57b 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -16,7 +16,7 @@ "backstage" ], "license": "Apache-2.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 2db84d275a..086c639bc1 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -16,7 +16,7 @@ "backstage" ], "license": "Apache-2.0", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/plugins/home-page/package.json b/plugins/home-page/package.json index 17c973bd35..6bd38a265a 100644 --- a/plugins/home-page/package.json +++ b/plugins/home-page/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home-page", "version": "0.1.1-alpha.4", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/inventory/package.json b/plugins/inventory/package.json index 8a260d2778..85ebe7fc34 100644 --- a/plugins/inventory/package.json +++ b/plugins/inventory/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-inventory", "version": "0.1.1-alpha.4", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 01e3e5c81b..852fe0f881 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "version": "0.1.1-alpha.4", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index dd1747b02d..3d51d2ef8d 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "version": "0.1.1-alpha.4", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index fd093f685b..007151e8dc 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-welcome", "version": "0.1.1-alpha.4", - "main": "dist/index.cjs.js", + "main": "dist/index.esm.js", "types": "dist/index.d.ts", "private": true, "license": "Apache-2.0", From 85452a02b734f3070bda058e674d66a878157a8f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 26 Apr 2020 21:32:51 +0200 Subject: [PATCH 4/5] plugins/graphiql: use dynamic import to load graphiql --- .../GraphiQLBrowser/GraphiQLBrowser.tsx | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx b/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx index e914fd9649..c5a003a496 100644 --- a/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx +++ b/plugins/graphiql/src/components/GraphiQLBrowser/GraphiQLBrowser.tsx @@ -14,14 +14,16 @@ * limitations under the License. */ -import React, { FC, useState } from 'react'; +import React, { FC, useState, Suspense } from 'react'; import { Tabs, Tab, makeStyles, Typography, Divider } from '@material-ui/core'; import 'graphiql/graphiql.css'; -import GraphiQL from 'graphiql'; import { StorageBucket } from 'lib/storage'; import { GraphQLEndpoint } from 'lib/api'; +import { Progress } from '@backstage/core'; import { BackstageTheme } from '@backstage/theme'; +const GraphiQL = React.lazy(() => import('graphiql')); + const useStyles = makeStyles(theme => ({ root: { height: '100%', @@ -58,20 +60,22 @@ export const GraphiQLBrowser: FC = ({ endpoints }) => { return (
- setTabIndex(value)} - indicatorColor="primary" - > - {endpoints.map(({ title }, index) => ( - - ))} - - -
- -
+ }> + setTabIndex(value)} + indicatorColor="primary" + > + {endpoints.map(({ title }, index) => ( + + ))} + + +
+ +
+
); }; From 2068829f4f94e37a1ac6b003990e7631cad4269a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 27 Apr 2020 12:59:23 +0200 Subject: [PATCH 5/5] packages/cli: added jest transform for .esm.js files --- packages/cli/config/jest.js | 7 ++ packages/cli/package.json | 1 + yarn.lock | 124 ++++++++++++++++++++++-------------- 3 files changed, 85 insertions(+), 47 deletions(-) diff --git a/packages/cli/config/jest.js b/packages/cli/config/jest.js index fc067edd30..77f345a0dd 100644 --- a/packages/cli/config/jest.js +++ b/packages/cli/config/jest.js @@ -29,6 +29,13 @@ if (fs.existsSync('jest.config.js')) { moduleNameMapper: { '\\.(css|less|scss|sss|styl)$': require.resolve('jest-css-modules'), }, + // We build .esm.js files with plugin:build, so to be able to load these in tests they need to be transformed + // TODO: jest is working on module support, it's possible that we can remove this in the future + transform: { + '\\.esm\\.js$': require.resolve('jest-esm-transformer'), + }, + // Default behaviour is to not apply transforms for node_modules, but we still want to tranform .esm.js files + transformIgnorePatterns: ['/node_modules/(?!.*\\.esm\\.js$)'], }; // Use src/setupTests.ts as the default location for configuring test env diff --git a/packages/cli/package.json b/packages/cli/package.json index 45d323f748..bc1a349aa3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -67,6 +67,7 @@ "inquirer": "^7.0.4", "jest": "^25.1.0", "jest-css-modules": "^2.1.0", + "jest-esm-transformer": "^1.0.0", "ora": "^4.0.3", "react": "^16.0.0", "react-dev-utils": "^10.2.0", diff --git a/yarn.lock b/yarn.lock index f53b4f5651..79eac2cb21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,7 +25,7 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@7.9.0", "@babel/core@^7.1.0", "@babel/core@^7.4.5", "@babel/core@^7.7.5": +"@babel/core@7.9.0": version "7.9.0" resolved "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== @@ -47,12 +47,34 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.9.0.tgz#0f67adea4ec39dad6e63345f70eec33014d78c89" - integrity sha512-onl4Oy46oGCzymOXtKMQpI7VXtCbTSHK1kqBydZ6AmzuNcacEVqGk9tZtAS+48IA9IstZcDCgIg8hQKnb7suRw== +"@babel/core@^7.1.0", "@babel/core@^7.4.4", "@babel/core@^7.4.5", "@babel/core@^7.7.5": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz#d9aa1f580abf3b2286ef40b6904d390904c63376" + integrity sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg== dependencies: - "@babel/types" "^7.9.0" + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.9.6" + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helpers" "^7.9.6" + "@babel/parser" "^7.9.6" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.4.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.6": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz#5408c82ac5de98cda0d77d8124e99fa1f2170a43" + integrity sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ== + dependencies: + "@babel/types" "^7.9.6" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -147,14 +169,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-function-name@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" - integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== +"@babel/helper-function-name@^7.8.3", "@babel/helper-function-name@^7.9.5": + version "7.9.5" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" + integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== dependencies: "@babel/helper-get-function-arity" "^7.8.3" "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/types" "^7.9.5" "@babel/helper-get-function-arity@^7.8.3": version "7.8.3" @@ -252,10 +274,10 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-validator-identifier@^7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" - integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== +"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5": + version "7.9.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== "@babel/helper-wrap-function@^7.8.3": version "7.8.3" @@ -267,14 +289,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== +"@babel/helpers@^7.9.0", "@babel/helpers@^7.9.6": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz#092c774743471d0bb6c7de3ad465ab3d3486d580" + integrity sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/highlight@^7.0.0", "@babel/highlight@^7.8.3": version "7.9.0" @@ -285,10 +307,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.2" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.9.2.tgz#4e767f424b479c514077544484d1f9bdba7f1158" - integrity sha512-2jyvKdoOS1aWAFL2rjJZmamyDDkPCx/AAz4/Wh1Dfxvw8qqnOvek/ZlHQ2noO/o8JpnXa/WiUUFOv48meBKkpA== +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0", "@babel/parser@^7.9.6": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -606,15 +628,15 @@ "@babel/helper-plugin-utils" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@^7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" - integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== +"@babel/plugin-transform-modules-commonjs@^7.4.4", "@babel/plugin-transform-modules-commonjs@^7.9.0": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz#64b7474a4279ee588cacd1906695ca721687c277" + integrity sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-simple-access" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-systemjs@^7.9.0": version "7.9.0" @@ -935,27 +957,27 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" - integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0", "@babel/traverse@^7.9.6": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz#5540d7577697bf619cc57b92aa0f1c231a94f442" + integrity sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" - "@babel/helper-function-name" "^7.8.3" + "@babel/generator" "^7.9.6" + "@babel/helper-function-name" "^7.9.5" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/parser" "^7.9.6" + "@babel/types" "^7.9.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7", "@babel/types@^7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" - integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== dependencies: - "@babel/helper-validator-identifier" "^7.9.0" + "@babel/helper-validator-identifier" "^7.9.5" lodash "^4.17.13" to-fast-properties "^2.0.0" @@ -5432,10 +5454,10 @@ babel-plugin-add-react-displayname@^0.0.5: resolved "https://registry.npmjs.org/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz#339d4cddb7b65fd62d1df9db9fe04de134122bd5" integrity sha1-M51M3be2X9YtHfnbn+BN4TQSK9U= -babel-plugin-dynamic-import-node@^2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" - integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== +babel-plugin-dynamic-import-node@^2.3.0, babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" @@ -12139,6 +12161,14 @@ jest-environment-node@^25.1.0: jest-mock "^25.1.0" jest-util "^25.1.0" +jest-esm-transformer@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/jest-esm-transformer/-/jest-esm-transformer-1.0.0.tgz#b6c58f496aa48194f96361a52f5c578fd2209726" + integrity sha512-FoPgeMMwy1/CEsc8tBI41i83CEO3x85RJuZi5iAMmWoARXhfgk6Jd7y+4d+z+HCkTKNVDvSWKGRhwjzU9PUbrw== + dependencies: + "@babel/core" "^7.4.4" + "@babel/plugin-transform-modules-commonjs" "^7.4.4" + jest-fetch-mock@^3.0.3: version "3.0.3" resolved "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz#31749c456ae27b8919d69824f1c2bd85fe0a1f3b"