From af934d41736d463aae1aa58f6449ae9d1e1f9099 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 15 May 2020 17:58:15 +0200 Subject: [PATCH 01/69] docs: add docs for how to create and use custom themes --- docs/getting-started/app-custom-theme.md | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/getting-started/app-custom-theme.md diff --git a/docs/getting-started/app-custom-theme.md b/docs/getting-started/app-custom-theme.md new file mode 100644 index 0000000000..3b8b1c5315 --- /dev/null +++ b/docs/getting-started/app-custom-theme.md @@ -0,0 +1,47 @@ +# Custom App Themes + +Backstage ships with a default theme with a light and dark mode variant. The themes are provided as +a part of the [@backstage/theme](https://www.npmjs.com/package/@backstage/theme) package, which also includes +utilities for customizing the default theme, or creating completely new themes. + +## Creating a Custom Theme + +The easiest way to create a new theme is to use the `createTheme` function exported by the [@backstage/theme](https://www.npmjs.com/package/@backstage/theme) package. You can use it to override so basic parameters of the default theme such as the color palette and font. + +For example, you can create a new theme based on the default light theme like this: + +```ts +import { createTheme, lightTheme } from '@backstage/theme'; + +const myTheme = createTheme({ + palette: lightTheme.palette, + fontFamily: 'Comic Sans MS', +}); +``` + +If you want more control over the theme, and for example customize font sizes and margins, you can use the lower-level `createThemeOverrides` function exported by [@backstage/theme](https://www.npmjs.com/package/@backstage/theme) in combination with [createMuiTheme](https://material-ui.com/customization/theming/#createmuitheme-options-args-theme) from [@material-ui/core](https://www.npmjs.com/package/@material-ui/core). See the [@backstage/theme source](https://github.com/spotify/backstage/tree/master/packages/theme/src) and the implementation of the `createTheme` function for how this is done. + +You can also create a theme from scratch that matches the `BackstageTheme` type exported by [@backstage/theme](https://www.npmjs.com/package/@backstage/theme). See the [material-ui docs on theming](https://material-ui.com/customization/theming/) for more information about how that can be done. + +## Using your Custom Theme + +To add a custom theme to your Backstage app, you pass it as configuration to `createApp`. + +For example, adding the theme that we created in the previous section can be done like this: + +```ts +import { createApp } from '@backstage/core'; + +const app = createApp({ + apis: ..., + plugins: ..., + themes: [{ + id: 'my-theme', + title: 'My Custom Theme', + variant: 'light', + theme: myTheme, + }] +}) +``` + +Note that your list of custom themes overrides the default themes. If you still want to use the default themes, they are exported as `lightTheme` and `darkTheme` from [@backstage/theme](https://www.npmjs.com/package/@backstage/theme). From 34ad05575e73025694510f2e17cfa9b4112edbc6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 12:07:30 +0200 Subject: [PATCH 02/69] packages/cli: move plugin serve config into lib --- .../plugin/{serve/index.ts => serve.ts} | 4 ++-- .../plugin/serve => lib/bundle}/config.ts | 10 ++++++++-- packages/cli/src/lib/bundle/index.ts | 17 +++++++++++++++++ .../plugin/serve => lib/bundle}/paths.ts | 6 +++--- .../plugin/serve => lib/bundle}/server.ts | 6 +++--- 5 files changed, 33 insertions(+), 10 deletions(-) rename packages/cli/src/commands/plugin/{serve/index.ts => serve.ts} (88%) rename packages/cli/src/{commands/plugin/serve => lib/bundle}/config.ts (94%) create mode 100644 packages/cli/src/lib/bundle/index.ts rename packages/cli/src/{commands/plugin/serve => lib/bundle}/paths.ts (91%) rename packages/cli/src/{commands/plugin/serve => lib/bundle}/server.ts (92%) diff --git a/packages/cli/src/commands/plugin/serve/index.ts b/packages/cli/src/commands/plugin/serve.ts similarity index 88% rename from packages/cli/src/commands/plugin/serve/index.ts rename to packages/cli/src/commands/plugin/serve.ts index 9bdd46dc84..fb95d5e02b 100644 --- a/packages/cli/src/commands/plugin/serve/index.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { startDevServer } from './server'; -import { watchDeps } from '../../../lib/watchDeps'; +import { startDevServer } from '../../lib/bundle'; +import { watchDeps } from '../../lib/watchDeps'; export default async () => { await watchDeps({ build: true }); diff --git a/packages/cli/src/commands/plugin/serve/config.ts b/packages/cli/src/lib/bundle/config.ts similarity index 94% rename from packages/cli/src/commands/plugin/serve/config.ts rename to packages/cli/src/lib/bundle/config.ts index 47d7918270..b802712a52 100644 --- a/packages/cli/src/commands/plugin/serve/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -18,14 +18,20 @@ import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; -import { Paths } from './paths'; +import { BundlingPaths } from './paths'; // import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; // import ModuleNotFoundPlugin from 'react-dev-utils/ModuleNotFoundPlugin'; // import errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware'; // import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; // import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; -export function createConfig(paths: Paths): webpack.Configuration { +type BundlingOptions = { + paths: BundlingPaths; +}; + +export function createConfig(options: BundlingOptions): webpack.Configuration { + const { paths } = options; + return { mode: 'development', profile: false, diff --git a/packages/cli/src/lib/bundle/index.ts b/packages/cli/src/lib/bundle/index.ts new file mode 100644 index 0000000000..e304e1d00d --- /dev/null +++ b/packages/cli/src/lib/bundle/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './server'; diff --git a/packages/cli/src/commands/plugin/serve/paths.ts b/packages/cli/src/lib/bundle/paths.ts similarity index 91% rename from packages/cli/src/commands/plugin/serve/paths.ts rename to packages/cli/src/lib/bundle/paths.ts index 56c3f6ffb7..d98f7ed5de 100644 --- a/packages/cli/src/commands/plugin/serve/paths.ts +++ b/packages/cli/src/lib/bundle/paths.ts @@ -15,9 +15,9 @@ */ import { existsSync } from 'fs'; -import { paths } from '../../../lib/paths'; +import { paths } from '../paths'; -export function getPaths() { +export function resolveBundlingPaths() { const resolveTargetModule = (path: string) => { for (const ext of ['mjs', 'js', 'ts', 'tsx', 'jsx']) { const filePath = paths.resolveTarget(`${path}.${ext}`); @@ -46,4 +46,4 @@ export function getPaths() { }; } -export type Paths = ReturnType; +export type BundlingPaths = ReturnType; diff --git a/packages/cli/src/commands/plugin/serve/server.ts b/packages/cli/src/lib/bundle/server.ts similarity index 92% rename from packages/cli/src/commands/plugin/serve/server.ts rename to packages/cli/src/lib/bundle/server.ts index 066f741406..2dcd3b3a8a 100644 --- a/packages/cli/src/commands/plugin/serve/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -18,7 +18,7 @@ import webpack from 'webpack'; import WebpackDevServer from 'webpack-dev-server'; import openBrowser from 'react-dev-utils/openBrowser'; import { choosePort, prepareUrls } from 'react-dev-utils/WebpackDevServerUtils'; -import { getPaths } from './paths'; +import { resolveBundlingPaths } from './paths'; import { createConfig } from './config'; export async function startDevServer() { @@ -33,8 +33,8 @@ export async function startDevServer() { const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; const urls = prepareUrls(protocol, host, port); - const paths = getPaths(); - const config = createConfig(paths); + const paths = resolveBundlingPaths(); + const config = createConfig({ paths }); const compiler = webpack(config); const server = new WebpackDevServer(compiler, { hot: true, From fb78fb2da45c42373b4f43872a59e87a515a6c98 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 12:15:07 +0200 Subject: [PATCH 03/69] packages,plugins: add main:src package.json field to all built packages --- .../cli/templates/default-app/plugins/welcome/package.json.hbs | 1 + packages/cli/templates/default-plugin/package.json.hbs | 1 + packages/core/package.json | 1 + packages/dev-utils/package.json | 1 + packages/test-utils-core/package.json | 1 + packages/test-utils/package.json | 1 + packages/theme/package.json | 1 + plugins/catalog/package.json | 1 + plugins/explore/package.json | 1 + plugins/graphiql/package.json | 1 + plugins/home-page/package.json | 1 + plugins/lighthouse/package.json | 1 + plugins/register-component/package.json | 1 + plugins/scaffolder/package.json | 1 + plugins/tech-radar/package.json | 1 + plugins/welcome/package.json | 1 + 16 files changed, 16 insertions(+) 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 c814473826..dcd0d7eaa7 100644 --- a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs +++ b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs @@ -2,6 +2,7 @@ "name": "plugin-welcome", "version": "0.0.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.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 0a0ecc7e76..cbd084c3e3 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -2,6 +2,7 @@ "name": "@backstage/plugin-{{id}}", "version": "{{version}}", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/packages/core/package.json b/packages/core/package.json index 295b95050c..60052a50c3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,6 +17,7 @@ ], "license": "Apache-2.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index aea4f9b6ae..bd532bdd50 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -17,6 +17,7 @@ ], "license": "Apache-2.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/test-utils-core/package.json b/packages/test-utils-core/package.json index 8509763333..162615fee8 100644 --- a/packages/test-utils-core/package.json +++ b/packages/test-utils-core/package.json @@ -17,6 +17,7 @@ ], "license": "Apache-2.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 0367036610..4c21516795 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -17,6 +17,7 @@ ], "license": "Apache-2.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/packages/theme/package.json b/packages/theme/package.json index be43eb616a..7a65ab9a4c 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -17,6 +17,7 @@ ], "license": "Apache-2.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 5cdb6b715e..48515a429d 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-catalog", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 50c7e0be84..5e8719e033 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-explore", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index a90bd27a1f..b5550478bb 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -17,6 +17,7 @@ ], "license": "Apache-2.0", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "scripts": { "build": "backstage-cli plugin:build", diff --git a/plugins/home-page/package.json b/plugins/home-page/package.json index bd97a6ec4f..9ec448aef5 100644 --- a/plugins/home-page/package.json +++ b/plugins/home-page/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-home-page", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 89a9d3709f..b147aede88 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-lighthouse", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/register-component/package.json b/plugins/register-component/package.json index 8df06e518b..2999d31a4a 100644 --- a/plugins/register-component/package.json +++ b/plugins/register-component/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-register-component", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 3d6be66644..5594442c34 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-scaffolder", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index ecf863a881..ca516d3a70 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-tech-radar", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index 91053a31f7..3e5e54d15f 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-welcome", "version": "0.1.1-alpha.5", "main": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "private": true, "license": "Apache-2.0", From a6376ee7f506b6e9537e88f60a1514921673c145 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 12:33:14 +0200 Subject: [PATCH 04/69] packages/cli: make plugin:serve point to src of deps --- packages/cli/src/commands/plugin/serve.ts | 3 --- packages/cli/src/lib/bundle/config.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/cli/src/commands/plugin/serve.ts b/packages/cli/src/commands/plugin/serve.ts index fb95d5e02b..b06871ce9d 100644 --- a/packages/cli/src/commands/plugin/serve.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -15,11 +15,8 @@ */ import { startDevServer } from '../../lib/bundle'; -import { watchDeps } from '../../lib/watchDeps'; export default async () => { - await watchDeps({ build: true }); - await startDevServer(); // Wait for interrupt signal diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index b802712a52..031b1effe3 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -45,6 +45,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { ], resolve: { extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'], + mainFields: ['main:src', 'browser', 'module', 'main'], plugins: [ new ModuleScopePlugin( [paths.targetSrc, paths.targetDev], @@ -67,7 +68,6 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { }, { test: /\.(tsx?|jsx?|mjs)$/, - include: [paths.targetSrc, paths.targetDev], exclude: /node_modules/, loader: 'ts-loader', options: { From 3643faf3d47d445fc0961b1e6c77435edcbefe29 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 15:56:32 +0200 Subject: [PATCH 05/69] packages/cli: switch bundling config to use sucrase --- packages/cli/package.json | 2 ++ packages/cli/src/lib/bundle/config.ts | 15 +++++++--- packages/core/src/api/navTargets/index.ts | 2 +- packages/core/src/components/Table/index.ts | 3 +- packages/core/src/index.ts | 6 ++-- packages/core/src/layout/BottomLink/index.ts | 3 +- packages/core/src/layout/Page/index.ts | 3 +- yarn.lock | 30 ++++++++++++++++++-- 8 files changed, 51 insertions(+), 13 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 7183320136..c74b6b502b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -35,6 +35,7 @@ "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@spotify/web-scripts": "^6.0.0", + "@sucrase/webpack-loader": "^2.0.0", "chalk": "^4.0.0", "chokidar": "^3.3.1", "commander": "^4.1.1", @@ -61,6 +62,7 @@ "rollup-plugin-peer-deps-external": "^2.2.2", "rollup-plugin-postcss": "^3.1.1", "rollup-plugin-typescript2": "^0.26.0", + "sucrase": "^3.14.0", "tar": "^6.0.1", "ts-loader": "^7.0.4", "webpack": "^4.41.6", diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 031b1effe3..f172746ce3 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -67,12 +67,19 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { }, }, { - test: /\.(tsx?|jsx?|mjs)$/, + test: /\.(tsx?)$/, exclude: /node_modules/, - loader: 'ts-loader', + loader: '@sucrase/webpack-loader', options: { - // disable type checker - handled by ForkTsCheckerWebpackPlugin - transpileOnly: true, + transforms: ['typescript', 'jsx'], + }, + }, + { + test: /\.(jsx?|mjs)$/, + exclude: /node_modules/, + loader: '@sucrase/webpack-loader', + options: { + transforms: ['jsx'], }, }, { diff --git a/packages/core/src/api/navTargets/index.ts b/packages/core/src/api/navTargets/index.ts index 6c2c899f89..c5d0cc4289 100644 --- a/packages/core/src/api/navTargets/index.ts +++ b/packages/core/src/api/navTargets/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export type { NavTarget, NavTargetConfig, NavTargetOverrideConfig } from './types'; +export * from './types'; export { createNavTarget } from './NavTarget'; diff --git a/packages/core/src/components/Table/index.ts b/packages/core/src/components/Table/index.ts index 7ea3ead808..b46d3e3c2b 100644 --- a/packages/core/src/components/Table/index.ts +++ b/packages/core/src/components/Table/index.ts @@ -15,5 +15,6 @@ */ export { default } from './Table'; -export type { TableColumn } from './Table'; +import type { TableColumn } from './Table'; +export type { TableColumn }; export { default as SubvalueCell } from './SubvalueCell'; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 1bd35f67c3..41cb4c7906 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -17,7 +17,8 @@ export * from './api'; export { default as Page } from './layout/Page'; export { gradients, pageTheme } from './layout/Page'; -export type { PageTheme } from './layout/Page'; +import type { PageTheme } from './layout/Page'; +export type { PageTheme }; export { default as Content } from './layout/Content/Content'; export { default as ContentHeader } from './layout/ContentHeader/ContentHeader'; export { default as Header } from './layout/Header/Header'; @@ -37,7 +38,8 @@ export { OAuthRequestDialog } from './components/OAuthRequestDialog'; export { AlphaLabel, BetaLabel } from './components/Lifecycle'; export { default as SupportButton } from './components/SupportButton'; export { default as Table, SubvalueCell } from './components/Table'; -export type { TableColumn } from './components/Table/Table'; +import type { TableColumn } from './components/Table/Table'; +export type { TableColumn }; export { default as StructuredMetadataTable } from './components/StructuredMetadataTable'; export { default as TrendLine } from './components/TrendLine'; export { FeatureCalloutCircular } from './components/FeatureDiscovery/FeatureCalloutCircular'; diff --git a/packages/core/src/layout/BottomLink/index.ts b/packages/core/src/layout/BottomLink/index.ts index 6f2055f4f7..d622ce0fe9 100644 --- a/packages/core/src/layout/BottomLink/index.ts +++ b/packages/core/src/layout/BottomLink/index.ts @@ -15,4 +15,5 @@ */ export { default } from './BottomLink'; -export type { Props } from './BottomLink'; +import type { Props } from './BottomLink'; +export type { Props }; diff --git a/packages/core/src/layout/Page/index.ts b/packages/core/src/layout/Page/index.ts index 50899fa036..38fc349e95 100644 --- a/packages/core/src/layout/Page/index.ts +++ b/packages/core/src/layout/Page/index.ts @@ -16,4 +16,5 @@ export { default } from './Page'; export { gradients, pageTheme } from './PageThemeProvider'; -export type { PageTheme } from './PageThemeProvider'; +import type { PageTheme } from './PageThemeProvider'; +export type { PageTheme }; diff --git a/yarn.lock b/yarn.lock index 08a530db89..123ea40293 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3628,6 +3628,13 @@ "@styled-system/core" "^5.1.2" "@styled-system/css" "^5.1.5" +"@sucrase/webpack-loader@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@sucrase/webpack-loader/-/webpack-loader-2.0.0.tgz#b8a70b8d3df3eeb570e6a3315e1a9c6b723e4a37" + integrity sha512-KUfWr83g70Qm+ZqjGL+M4tX01taDP3BldQcI6NSMlDf7WTDfuo0RvLlS0ekF6dPVslNyZhbFFBy2OBTB6Sa6+Q== + dependencies: + loader-utils "^1.1.0" + "@svgr/babel-plugin-add-jsx-attribute@^4.2.0": version "4.2.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1" @@ -7152,7 +7159,7 @@ commander@^2.11.0, commander@^2.19.0, commander@^2.20.0, commander@~2.20.3: resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.0.1, commander@^4.1.1: +commander@^4.0.0, commander@^4.0.1, commander@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -10555,7 +10562,7 @@ glob@7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -15049,7 +15056,7 @@ mute-stream@0.0.8, mute-stream@~0.0.4: resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.5.0: +mz@^2.5.0, mz@^2.7.0: version "2.7.0" resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== @@ -20353,6 +20360,18 @@ stylis@3.5.0: resolved "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz#016fa239663d77f868fef5b67cf201c4b7c701e1" integrity sha512-pP7yXN6dwMzAR29Q0mBrabPCe0/mNO1MSr93bhay+hcZondvMMTpeGyd8nbhYJdyperNT2DRxONQuUGcJr5iPw== +sucrase@^3.14.0: + version "3.14.0" + resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.14.0.tgz#4364f4da5d57465acba364ef65b14ca78672d500" + integrity sha512-sWyDtHMD0Q1wv4GpL3Jp10Pxi8ht4qrYeo1tAtHJ21BaMjl3PCrIM22FudoKRVY90r+lj3ytvIcf6WkYqt7TJg== + dependencies: + commander "^4.0.0" + glob "7.1.6" + lines-and-columns "^1.1.6" + mz "^2.7.0" + pirates "^4.0.1" + ts-interface-checker "^0.1.9" + superagent@^3.8.3: version "3.8.3" resolved "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128" @@ -20950,6 +20969,11 @@ ts-easing@^0.2.0: resolved "https://registry.npmjs.org/ts-easing/-/ts-easing-0.2.0.tgz#c8a8a35025105566588d87dbda05dd7fbfa5a4ec" integrity sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ== +ts-interface-checker@^0.1.9: + version "0.1.10" + resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.10.tgz#b68a49e37e90a05797e590f08494dd528bf383cf" + integrity sha512-UJYuKET7ez7ry0CnvfY6fPIUIZDw+UI3qvTUQeS2MyI4TgEeWAUBqy185LeaHcdJ9zG2dgFpPJU/AecXU0Afug== + ts-jest@^25.2.1: version "25.2.1" resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-25.2.1.tgz#49bf05da26a8b7fbfbc36b4ae2fcdc2fef35c85d" From 90aee3b1aa628b5af5ca788763af862b596b5e1a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 16:07:18 +0200 Subject: [PATCH 06/69] packages/cli,dev-utils: add react hot loading support --- packages/cli/package.json | 2 ++ packages/cli/src/lib/bundle/config.ts | 13 +++++----- packages/dev-utils/package.json | 1 + packages/dev-utils/src/devApp/render.tsx | 5 ++-- yarn.lock | 30 +++++++++++++++++++++--- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index c74b6b502b..52b4d23aa2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -29,6 +29,7 @@ "backstage-cli": "bin/backstage-cli" }, "dependencies": { + "@hot-loader/react-dom": "^16.13.0", "@lerna/package-graph": "^3.18.5", "@lerna/project": "^3.18.0", "@rollup/plugin-commonjs": "^11.0.2", @@ -54,6 +55,7 @@ "ora": "^4.0.3", "react": "^16.0.0", "react-dev-utils": "^10.2.0", + "react-hot-loader": "^4.12.21", "react-scripts": "^3.4.1", "recursive-readdir": "^2.2.2", "replace-in-file": "^6.0.0", diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index f172746ce3..fc2dbc3173 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -38,11 +38,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { bail: false, devtool: 'cheap-module-eval-source-map', context: paths.targetPath, - entry: [ - `${require.resolve('webpack-dev-server/client')}?/`, - require.resolve('webpack/hot/dev-server'), - paths.targetDevEntry, - ], + entry: [require.resolve('react-hot-loader/patch'), paths.targetDevEntry], resolve: { extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'], mainFields: ['main:src', 'browser', 'module', 'main'], @@ -52,6 +48,9 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { [paths.targetPackageJson], ), ], + alias: { + 'react-dom': '@hot-loader/react-dom', + }, }, module: { rules: [ @@ -71,7 +70,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { exclude: /node_modules/, loader: '@sucrase/webpack-loader', options: { - transforms: ['typescript', 'jsx'], + transforms: ['typescript', 'jsx', 'react-hot-loader'], }, }, { @@ -79,7 +78,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { exclude: /node_modules/, loader: '@sucrase/webpack-loader', options: { - transforms: ['jsx'], + transforms: ['jsx', 'react-hot-loader'], }, }, { diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index bd532bdd50..1733392696 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -41,6 +41,7 @@ "@types/node": "^12.0.0", "react": "^16.12.0", "react-dom": "^16.12.0", + "react-hot-loader": "^4.12.21", "react-router": "^5.2.0", "react-router-dom": "^5.2.0" }, diff --git a/packages/dev-utils/src/devApp/render.tsx b/packages/dev-utils/src/devApp/render.tsx index 90a0847b4d..b251ebfb6d 100644 --- a/packages/dev-utils/src/devApp/render.tsx +++ b/packages/dev-utils/src/devApp/render.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import { hot } from 'react-hot-loader/root'; import React, { FC, ComponentType } from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; @@ -90,10 +91,10 @@ class DevAppBuilder { } /** - * Build and render directory to #root element + * Build and render directory to #root element, with react hot loading. */ render(): void { - const DevApp = this.build(); + const DevApp = hot(this.build()); const paths = this.findPluginPaths(this.plugins); diff --git a/yarn.lock b/yarn.lock index 123ea40293..0bfef7c122 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1427,6 +1427,16 @@ dependencies: "@hapi/hoek" "^8.3.0" +"@hot-loader/react-dom@^16.13.0": + version "16.13.0" + resolved "https://registry.npmjs.org/@hot-loader/react-dom/-/react-dom-16.13.0.tgz#de245b42358110baf80aaf47a0592153d4047997" + integrity sha512-lJZrmkucz2MrQJTQtJobx5MICXcfQvKihszqv655p557HPi0hMOWxrNpiHv3DWD8ugNWjtWcVWqRnFvwsHq1mQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.19.0" + "@iarna/cli@^1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@iarna/cli/-/cli-1.2.0.tgz#0f7af5e851afe895104583c4ca07377a8094d641" @@ -9689,7 +9699,7 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -10624,7 +10634,7 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -global@^4.3.2, global@^4.4.0: +global@^4.3.0, global@^4.3.2, global@^4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== @@ -17983,6 +17993,20 @@ react-hook-form@^5.7.2: resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-5.7.2.tgz#a84e259e5d37dd30949af4f79c4dac31101b79ac" integrity sha512-bJvY348vayIvEUmSK7Fvea/NgqbT2racA2IbnJz/aPlQ3GBtaTeDITH6rtCa6y++obZzG6E3Q8VuoXPir7QYUg== +react-hot-loader@^4.12.21: + version "4.12.21" + resolved "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.21.tgz#332e830801fb33024b5a147d6b13417f491eb975" + integrity sha512-Ynxa6ROfWUeKWsTHxsrL2KMzujxJVPjs385lmB2t5cHUxdoRPGind9F00tOkdc1l5WBleOF4XEAMILY1KPIIDA== + dependencies: + fast-levenshtein "^2.0.6" + global "^4.3.0" + hoist-non-react-statics "^3.3.0" + loader-utils "^1.1.0" + prop-types "^15.6.1" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.1.0" + source-map "^0.7.3" + react-hotkeys@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/react-hotkeys/-/react-hotkeys-2.0.0.tgz#a7719c7340cbba888b0e9184f806a9ec0ac2c53f" @@ -19184,7 +19208,7 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -scheduler@^0.19.1: +scheduler@^0.19.0, scheduler@^0.19.1: version "0.19.1" resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== From 9c3de313fcc2e4d45faf487bfd96a8a8618b337e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 16:08:12 +0200 Subject: [PATCH 07/69] packages/cli: remove redundant eslint-loader from bundle config --- packages/cli/src/lib/bundle/config.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index fc2dbc3173..97755ba892 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -54,17 +54,6 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { }, module: { rules: [ - { - test: /\.(tsx?|jsx?|mjs)$/, - enforce: 'pre', - include: [paths.targetSrc, paths.targetDev], - use: { - loader: 'eslint-loader', - options: { - emitWarning: true, - }, - }, - }, { test: /\.(tsx?)$/, exclude: /node_modules/, From 0f718ca55878ac8aa9b4866f4d87a8cc8a883b95 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 16:36:14 +0200 Subject: [PATCH 08/69] packages/cli: use asset loader for bundling all assets --- packages/cli/src/lib/bundle/config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 97755ba892..277a5d6684 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -73,7 +73,6 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { { test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.frag/, /\.xml/], loader: 'url-loader', - include: paths.targetAssets, options: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]', From 8e8808993c4c7a6b65250fbd543d5d31af58d127 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 16:41:03 +0200 Subject: [PATCH 09/69] packages/cli: split bundle loaders into separate module --- packages/cli/src/lib/bundle/config.ts | 40 +----------------- packages/cli/src/lib/bundle/loaders.ts | 58 ++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 38 deletions(-) create mode 100644 packages/cli/src/lib/bundle/loaders.ts diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 277a5d6684..11b9e7aa2f 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -19,6 +19,7 @@ import HtmlWebpackPlugin from 'html-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; import { BundlingPaths } from './paths'; +import { loaders } from './loaders'; // import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; // import ModuleNotFoundPlugin from 'react-dev-utils/ModuleNotFoundPlugin'; // import errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware'; @@ -53,44 +54,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { }, }, module: { - rules: [ - { - test: /\.(tsx?)$/, - exclude: /node_modules/, - loader: '@sucrase/webpack-loader', - options: { - transforms: ['typescript', 'jsx', 'react-hot-loader'], - }, - }, - { - test: /\.(jsx?|mjs)$/, - exclude: /node_modules/, - loader: '@sucrase/webpack-loader', - options: { - transforms: ['jsx', 'react-hot-loader'], - }, - }, - { - test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.frag/, /\.xml/], - loader: 'url-loader', - options: { - limit: 10000, - name: 'static/media/[name].[hash:8].[ext]', - }, - }, - { - test: /\.ya?ml$/, - use: 'yml-loader', - }, - { - include: /\.(md)$/, - use: 'raw-loader', - }, - { - test: /\.css$/i, - use: ['style-loader', 'css-loader'], - }, - ], + rules: loaders(), }, output: { publicPath: '/', diff --git a/packages/cli/src/lib/bundle/loaders.ts b/packages/cli/src/lib/bundle/loaders.ts new file mode 100644 index 0000000000..173776272a --- /dev/null +++ b/packages/cli/src/lib/bundle/loaders.ts @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Module } from 'webpack'; + +export const loaders = (): Module['rules'] => { + return [ + { + test: /\.(tsx?)$/, + exclude: /node_modules/, + loader: '@sucrase/webpack-loader', + options: { + transforms: ['typescript', 'jsx', 'react-hot-loader'], + }, + }, + { + test: /\.(jsx?|mjs)$/, + exclude: /node_modules/, + loader: '@sucrase/webpack-loader', + options: { + transforms: ['jsx', 'react-hot-loader'], + }, + }, + { + test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.frag/, /\.xml/], + loader: 'url-loader', + options: { + limit: 10000, + name: 'static/media/[name].[hash:8].[ext]', + }, + }, + { + test: /\.ya?ml$/, + use: 'yml-loader', + }, + { + include: /\.(md)$/, + use: 'raw-loader', + }, + { + test: /\.css$/i, + use: ['style-loader', 'css-loader'], + }, + ]; +}; From 9a123ac0a905944df2e646fcf924233f1daa4a36 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 16:47:22 +0200 Subject: [PATCH 10/69] packages/cli: add bundle chunk splitting optimization --- packages/cli/src/lib/bundle/config.ts | 2 + packages/cli/src/lib/bundle/optimization.ts | 59 +++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 packages/cli/src/lib/bundle/optimization.ts diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 11b9e7aa2f..2d39570339 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -20,6 +20,7 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; import { BundlingPaths } from './paths'; import { loaders } from './loaders'; +import { optimization } from './optimization'; // import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; // import ModuleNotFoundPlugin from 'react-dev-utils/ModuleNotFoundPlugin'; // import errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware'; @@ -60,6 +61,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { publicPath: '/', filename: 'bundle.js', }, + optimization: optimization(), plugins: [ new HtmlWebpackPlugin({ template: paths.targetHtml, diff --git a/packages/cli/src/lib/bundle/optimization.ts b/packages/cli/src/lib/bundle/optimization.ts new file mode 100644 index 0000000000..89679c8026 --- /dev/null +++ b/packages/cli/src/lib/bundle/optimization.ts @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Options } from 'webpack'; + +export const optimization = (): Options.Optimization => { + return { + runtimeChunk: 'single', + splitChunks: { + automaticNameDelimiter: '-', + cacheGroups: { + default: false, + // Put all vendor code needed for initial page load in individual files if they're big + // enough, if they're smaller they end up in the main + packages: { + chunks: 'initial', + test: /[\\/]node_modules[\\/]/, + name(module: any) { + // get the name. E.g. node_modules/packageName/not/this/part.js + // or node_modules/packageName + const packageName = module.context.match( + /[\\/]node_modules[\\/](.*?)([\\/]|$)/, + )[1]; + + // npm package names are URL-safe, but some servers don't like @ symbols + return packageName.replace('@', ''); + }, + filename: 'module-[name].[chunkhash:8].js', + priority: 10, + minSize: 100000, + minChunks: 1, + maxAsyncRequests: Infinity, + maxInitialRequests: Infinity, + } as any, // filename is not included in type, but we need it + // Group together the smallest modules + vendor: { + chunks: 'initial', + test: /[\\/]node_modules[\\/]/, + name: 'vendor', + priority: 5, + enforce: true, + }, + }, + }, + }; +}; From c744f5e4a38b58d48420aa135dc7ff8915b61e6c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 17:23:39 +0200 Subject: [PATCH 11/69] packages/cli: better HTTPS switch for bundle --- packages/cli/package.json | 3 ++- packages/cli/src/lib/bundle/server.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 52b4d23aa2..623b042142 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -68,7 +68,8 @@ "tar": "^6.0.1", "ts-loader": "^7.0.4", "webpack": "^4.41.6", - "webpack-dev-server": "^3.10.3" + "webpack-dev-server": "^3.10.3", + "yn": "^4.0.0" }, "devDependencies": { "@types/diff": "^4.0.2", diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundle/server.ts index 2dcd3b3a8a..333db1394e 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import yn from 'yn'; import webpack from 'webpack'; import WebpackDevServer from 'webpack-dev-server'; import openBrowser from 'react-dev-utils/openBrowser'; @@ -30,7 +31,7 @@ export async function startDevServer() { return; } - const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; + const protocol = yn(process.env.HTTPS, { default: false }) ? 'https' : 'http'; const urls = prepareUrls(protocol, host, port); const paths = resolveBundlingPaths(); From 989b13ca75bbf8e40a49a9d2eaa547921696efc9 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 17:36:23 +0200 Subject: [PATCH 12/69] packages/cli: tweak bundle dev server setup --- packages/cli/src/lib/bundle/server.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundle/server.ts index 333db1394e..651c9fa236 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -41,7 +41,8 @@ export async function startDevServer() { hot: true, publicPath: '/', historyApiFallback: true, - quiet: true, + clientLogLevel: 'warning', + stats: 'errors-warnings', https: protocol === 'https', host, port, @@ -54,6 +55,13 @@ export async function startDevServer() { return; } + for (const signal of ['SIGINT', 'SIGTERM'] as const) { + process.on(signal, () => { + server.close(); + process.exit(); + }); + } + openBrowser(urls.localUrlForBrowser); resolve(); }); From afae83ba8d3a536ccc6e32cfb9d0071684f3d211 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 17:49:04 +0200 Subject: [PATCH 13/69] packages/cli: make it possible to configure bundle entrypoint --- packages/cli/src/commands/plugin/serve.ts | 2 +- packages/cli/src/lib/bundle/config.ts | 11 ++++------- packages/cli/src/lib/bundle/paths.ts | 11 +++++++++-- packages/cli/src/lib/bundle/server.ts | 8 ++++---- packages/cli/src/lib/bundle/types.ts | 19 +++++++++++++++++++ 5 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 packages/cli/src/lib/bundle/types.ts diff --git a/packages/cli/src/commands/plugin/serve.ts b/packages/cli/src/commands/plugin/serve.ts index b06871ce9d..1c732cfc9a 100644 --- a/packages/cli/src/commands/plugin/serve.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -17,7 +17,7 @@ import { startDevServer } from '../../lib/bundle'; export default async () => { - await startDevServer(); + await startDevServer({ entry: 'dev/index' }); // Wait for interrupt signal await new Promise(() => {}); diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 2d39570339..f7ef31dcba 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -18,21 +18,18 @@ import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; -import { BundlingPaths } from './paths'; +import { resolveBundlingPaths } from './paths'; import { loaders } from './loaders'; import { optimization } from './optimization'; +import { BundlingOptions } from './types'; // import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; // import ModuleNotFoundPlugin from 'react-dev-utils/ModuleNotFoundPlugin'; // import errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware'; // import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; // import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; -type BundlingOptions = { - paths: BundlingPaths; -}; - export function createConfig(options: BundlingOptions): webpack.Configuration { - const { paths } = options; + const paths = resolveBundlingPaths(options); return { mode: 'development', @@ -40,7 +37,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { bail: false, devtool: 'cheap-module-eval-source-map', context: paths.targetPath, - entry: [require.resolve('react-hot-loader/patch'), paths.targetDevEntry], + entry: [require.resolve('react-hot-loader/patch'), paths.targetEntry], resolve: { extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'], mainFields: ['main:src', 'browser', 'module', 'main'], diff --git a/packages/cli/src/lib/bundle/paths.ts b/packages/cli/src/lib/bundle/paths.ts index d98f7ed5de..9a030d21c1 100644 --- a/packages/cli/src/lib/bundle/paths.ts +++ b/packages/cli/src/lib/bundle/paths.ts @@ -17,7 +17,14 @@ import { existsSync } from 'fs'; import { paths } from '../paths'; -export function resolveBundlingPaths() { +export type BundlingPathsOptions = { + // bundle entrypoint, e.g. 'src/index' + entry: string; +}; + +export function resolveBundlingPaths(options: BundlingPathsOptions) { + const { entry } = options; + const resolveTargetModule = (path: string) => { for (const ext of ['mjs', 'js', 'ts', 'tsx', 'jsx']) { const filePath = paths.resolveTarget(`${path}.${ext}`); @@ -39,7 +46,7 @@ export function resolveBundlingPaths() { targetAssets: paths.resolveTarget('assets'), targetSrc: paths.resolveTarget('src'), targetDev: paths.resolveTarget('dev'), - targetDevEntry: resolveTargetModule('dev/index'), + targetEntry: resolveTargetModule(entry), targetTsConfig: paths.resolveTarget('tsconfig.json'), targetNodeModules: paths.resolveTarget('node_modules'), targetPackageJson: paths.resolveTarget('package.json'), diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundle/server.ts index 651c9fa236..64960fa3a6 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -19,10 +19,10 @@ import webpack from 'webpack'; import WebpackDevServer from 'webpack-dev-server'; import openBrowser from 'react-dev-utils/openBrowser'; import { choosePort, prepareUrls } from 'react-dev-utils/WebpackDevServerUtils'; -import { resolveBundlingPaths } from './paths'; import { createConfig } from './config'; +import { BundlingOptions } from './types'; -export async function startDevServer() { +export async function startDevServer(options: BundlingOptions) { const host = process.env.HOST ?? '0.0.0.0'; const defaultPort = parseInt(process.env.PORT ?? '', 10) || 3000; @@ -34,9 +34,9 @@ export async function startDevServer() { const protocol = yn(process.env.HTTPS, { default: false }) ? 'https' : 'http'; const urls = prepareUrls(protocol, host, port); - const paths = resolveBundlingPaths(); - const config = createConfig({ paths }); + const config = createConfig(options); const compiler = webpack(config); + const server = new WebpackDevServer(compiler, { hot: true, publicPath: '/', diff --git a/packages/cli/src/lib/bundle/types.ts b/packages/cli/src/lib/bundle/types.ts new file mode 100644 index 0000000000..8a01d74402 --- /dev/null +++ b/packages/cli/src/lib/bundle/types.ts @@ -0,0 +1,19 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BundlingPathsOptions } from './paths'; + +export type BundlingOptions = BundlingPathsOptions & {}; From 5cb37b504a08551a924c54ac2ba2dabc0c04dca5 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 17:50:32 +0200 Subject: [PATCH 14/69] packages/cli: use bundle instead of react-scripts for app:start --- packages/cli/src/commands/app/serve.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/cli/src/commands/app/serve.ts b/packages/cli/src/commands/app/serve.ts index 1d0ccfc465..7215c71b04 100644 --- a/packages/cli/src/commands/app/serve.ts +++ b/packages/cli/src/commands/app/serve.ts @@ -14,20 +14,11 @@ * limitations under the License. */ -import { run } from '../../lib/run'; -import { createLogFunc } from '../../lib/logging'; -import { watchDeps } from '../../lib/watchDeps'; +import { startDevServer } from '../../lib/bundle'; export default async () => { - // Start dynamic watch and build of dependencies, then serve the app - await watchDeps({ build: true }); + await startDevServer({ entry: 'src/index' }); - await run('react-scripts', ['start'], { - env: { - EXTEND_ESLINT: 'true', - SKIP_PREFLIGHT_CHECK: 'true', - }, - // We need to avoid clearing the terminal, or the build feedback of dependencies will be lost - stdoutLogFunc: createLogFunc(process.stdout), - }); + // Wait for interrupt signal + await new Promise(() => {}); }; From 0fb2440d972c1298db2f047c796edc9df9129a3d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 18:04:26 +0200 Subject: [PATCH 15/69] packages/cli: add flag for toggling type checking as a part of plugin and app serve --- packages/cli/src/commands/app/serve.ts | 8 +++- packages/cli/src/commands/plugin/serve.ts | 8 +++- packages/cli/src/index.ts | 4 +- packages/cli/src/lib/bundle/config.ts | 50 ++++++++++++++--------- packages/cli/src/lib/bundle/index.ts | 3 +- packages/cli/src/lib/bundle/paths.ts | 1 + packages/cli/src/lib/bundle/server.ts | 4 +- packages/cli/src/lib/bundle/types.ts | 4 +- 8 files changed, 54 insertions(+), 28 deletions(-) diff --git a/packages/cli/src/commands/app/serve.ts b/packages/cli/src/commands/app/serve.ts index 7215c71b04..cc892d6669 100644 --- a/packages/cli/src/commands/app/serve.ts +++ b/packages/cli/src/commands/app/serve.ts @@ -15,9 +15,13 @@ */ import { startDevServer } from '../../lib/bundle'; +import { Command } from 'commander'; -export default async () => { - await startDevServer({ entry: 'src/index' }); +export default async (cmd: Command) => { + await startDevServer({ + entry: 'src/index', + checksEnabled: cmd.check, + }); // Wait for interrupt signal await new Promise(() => {}); diff --git a/packages/cli/src/commands/plugin/serve.ts b/packages/cli/src/commands/plugin/serve.ts index 1c732cfc9a..1616e15415 100644 --- a/packages/cli/src/commands/plugin/serve.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -15,9 +15,13 @@ */ import { startDevServer } from '../../lib/bundle'; +import { Command } from 'commander'; -export default async () => { - await startDevServer({ entry: 'dev/index' }); +export default async (cmd: Command) => { + await startDevServer({ + entry: 'dev/index', + checksEnabled: cmd.check, + }); // Wait for interrupt signal await new Promise(() => {}); diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index cf89a3c47d..9ed6361ba8 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -35,6 +35,7 @@ const main = (argv: string[]) => { program .command('app:serve') .description('Serve an app for local development') + .option('--check', 'Enable type checking and linting') .action(actionHandler(() => require('./commands/app/serve'))); program @@ -60,6 +61,7 @@ const main = (argv: string[]) => { program .command('plugin:serve') .description('Serves the dev/ folder of a plugin') + .option('--check', 'Enable type checking and linting') .action(actionHandler(() => require('./commands/plugin/serve'))); program @@ -155,7 +157,7 @@ function actionHandler( }; } -process.on('unhandledRejection', (rejection) => { +process.on('unhandledRejection', rejection => { if (rejection instanceof Error) { exitWithError(rejection); } else { diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index f7ef31dcba..2d01587c19 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -18,7 +18,7 @@ import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; -import { resolveBundlingPaths } from './paths'; +import { BundlingPaths } from './paths'; import { loaders } from './loaders'; import { optimization } from './optimization'; import { BundlingOptions } from './types'; @@ -28,8 +28,34 @@ import { BundlingOptions } from './types'; // import evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware'; // import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; -export function createConfig(options: BundlingOptions): webpack.Configuration { - const paths = resolveBundlingPaths(options); +export function createConfig( + paths: BundlingPaths, + options: BundlingOptions, +): webpack.Configuration { + const { checksEnabled } = options; + + const plugins = [ + new HtmlWebpackPlugin({ + template: paths.targetHtml, + }), + new webpack.HotModuleReplacementPlugin(), + ]; + + if (checksEnabled) { + plugins.push( + new ForkTsCheckerWebpackPlugin({ + tsconfig: paths.targetTsConfig, + eslint: true, + eslintOptions: { + parserOptions: { + project: paths.targetTsConfig, + tsconfigRootDir: paths.targetPath, + }, + }, + reportFiles: ['**', '!**/__tests__/**', '!**/?(*.)(spec|test).*'], + }), + ); + } return { mode: 'development', @@ -59,23 +85,7 @@ export function createConfig(options: BundlingOptions): webpack.Configuration { filename: 'bundle.js', }, optimization: optimization(), - plugins: [ - new HtmlWebpackPlugin({ - template: paths.targetHtml, - }), - new ForkTsCheckerWebpackPlugin({ - tsconfig: paths.targetTsConfig, - eslint: true, - eslintOptions: { - parserOptions: { - project: paths.targetTsConfig, - tsconfigRootDir: paths.targetPath, - }, - }, - reportFiles: ['**', '!**/__tests__/**', '!**/?(*.)(spec|test).*'], - }), - new webpack.HotModuleReplacementPlugin(), - ], + plugins, node: { module: 'empty', dgram: 'empty', diff --git a/packages/cli/src/lib/bundle/index.ts b/packages/cli/src/lib/bundle/index.ts index e304e1d00d..51b92483da 100644 --- a/packages/cli/src/lib/bundle/index.ts +++ b/packages/cli/src/lib/bundle/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ -export * from './server'; +export { bundle } from './bundle'; +export { startDevServer } from './server'; diff --git a/packages/cli/src/lib/bundle/paths.ts b/packages/cli/src/lib/bundle/paths.ts index 9a030d21c1..5d9c6b98c9 100644 --- a/packages/cli/src/lib/bundle/paths.ts +++ b/packages/cli/src/lib/bundle/paths.ts @@ -43,6 +43,7 @@ export function resolveBundlingPaths(options: BundlingPathsOptions) { return { targetHtml, targetPath: paths.resolveTarget('.'), + targetDist: paths.resolveTarget('dist'), targetAssets: paths.resolveTarget('assets'), targetSrc: paths.resolveTarget('src'), targetDev: paths.resolveTarget('dev'), diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundle/server.ts index 64960fa3a6..40bd5be823 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -21,6 +21,7 @@ import openBrowser from 'react-dev-utils/openBrowser'; import { choosePort, prepareUrls } from 'react-dev-utils/WebpackDevServerUtils'; import { createConfig } from './config'; import { BundlingOptions } from './types'; +import { resolveBundlingPaths } from './paths'; export async function startDevServer(options: BundlingOptions) { const host = process.env.HOST ?? '0.0.0.0'; @@ -34,7 +35,8 @@ export async function startDevServer(options: BundlingOptions) { const protocol = yn(process.env.HTTPS, { default: false }) ? 'https' : 'http'; const urls = prepareUrls(protocol, host, port); - const config = createConfig(options); + const paths = resolveBundlingPaths(options); + const config = createConfig(paths, options); const compiler = webpack(config); const server = new WebpackDevServer(compiler, { diff --git a/packages/cli/src/lib/bundle/types.ts b/packages/cli/src/lib/bundle/types.ts index 8a01d74402..d5e5a0a96a 100644 --- a/packages/cli/src/lib/bundle/types.ts +++ b/packages/cli/src/lib/bundle/types.ts @@ -16,4 +16,6 @@ import { BundlingPathsOptions } from './paths'; -export type BundlingOptions = BundlingPathsOptions & {}; +export type BundlingOptions = BundlingPathsOptions & { + checksEnabled: boolean; +}; From 0de24c3ce946afcc2631166b20694670dbbba138 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 18:50:38 +0200 Subject: [PATCH 16/69] packages/cli: add basic bundle build and use for app:build --- packages/cli/package.json | 1 + packages/cli/src/commands/app/build.ts | 18 ++--- packages/cli/src/index.ts | 1 + packages/cli/src/lib/bundle/bundle.ts | 108 +++++++++++++++++++++++++ packages/cli/src/lib/bundle/index.ts | 2 +- packages/cli/src/lib/bundle/server.ts | 4 +- packages/cli/src/lib/bundle/types.ts | 10 ++- yarn.lock | 25 ++++++ 8 files changed, 156 insertions(+), 13 deletions(-) create mode 100644 packages/cli/src/lib/bundle/bundle.ts diff --git a/packages/cli/package.json b/packages/cli/package.json index 623b042142..0c19c7f7dd 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -37,6 +37,7 @@ "@rollup/plugin-node-resolve": "^7.1.1", "@spotify/web-scripts": "^6.0.0", "@sucrase/webpack-loader": "^2.0.0", + "bfj": "^7.0.2", "chalk": "^4.0.0", "chokidar": "^3.3.1", "commander": "^4.1.1", diff --git a/packages/cli/src/commands/app/build.ts b/packages/cli/src/commands/app/build.ts index 362f79a7fa..8b104d353c 100644 --- a/packages/cli/src/commands/app/build.ts +++ b/packages/cli/src/commands/app/build.ts @@ -14,15 +14,15 @@ * limitations under the License. */ -import { run } from '../../lib/run'; +import { buildBundle } from '../../lib/bundle'; +import { Command } from 'commander'; -export default async () => { - const args = ['build']; - - await run('react-scripts', args, { - env: { - EXTEND_ESLINT: 'true', - SKIP_PREFLIGHT_CHECK: 'true', - }, +export default async (cmd: Command) => { + await buildBundle({ + entry: 'src/index', + statsJsonEnabled: cmd.stats, }); + + // Wait for interrupt signal + await new Promise(() => {}); }; diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 9ed6361ba8..0e3cfaacef 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -30,6 +30,7 @@ const main = (argv: string[]) => { program .command('app:build') .description('Build an app for a production release') + .option('--stats', 'Write bundle stats to output directory') .action(actionHandler(() => require('./commands/app/build'))); program diff --git a/packages/cli/src/lib/bundle/bundle.ts b/packages/cli/src/lib/bundle/bundle.ts new file mode 100644 index 0000000000..1f2d3f214b --- /dev/null +++ b/packages/cli/src/lib/bundle/bundle.ts @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import yn from 'yn'; +import fs from 'fs-extra'; +import { resolve as resolvePath } from 'path'; +import webpack from 'webpack'; +import { + measureFileSizesBeforeBuild, + printFileSizesAfterBuild, +} from 'react-dev-utils/FileSizeReporter'; +import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; +import { createConfig } from './config'; +import { BuildOptions } from './types'; +import { resolveBundlingPaths } from './paths'; +import chalk from 'chalk'; + +// TODO(Rugvip): Limits from CRA, we might want to tweak these though. +const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024; +const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024; + +export async function buildBundle(options: BuildOptions) { + const { statsJsonEnabled } = options; + + const paths = resolveBundlingPaths(options); + const config = createConfig(paths, { ...options, checksEnabled: false }); + const compiler = webpack(config); + + const isCi = yn(process.env.CI, { default: false }); + + const previousFileSizes = await measureFileSizesBeforeBuild(paths.targetDist); + await fs.emptyDir(paths.targetDist); + + const { stats } = await build(compiler, isCi).catch(error => { + console.log(chalk.red('Failed to compile.\n')); + throw new Error(`Failed to compile.\n${error.message || error}`); + }); + + if (statsJsonEnabled) { + // No @types/bfj + await require('bfj').write( + resolvePath(paths.targetDist, 'bundle-stats.json'), + stats.toJson(), + ); + } + + printFileSizesAfterBuild( + stats, + previousFileSizes, + paths.targetDist, + WARN_AFTER_BUNDLE_GZIP_SIZE, + WARN_AFTER_CHUNK_GZIP_SIZE, + ); +} + +async function build(compiler: webpack.Compiler, isCi: boolean) { + const stats = await new Promise((resolve, reject) => { + compiler.run((err, buildStats) => { + if (err) { + if (err.message) { + const { errors } = formatWebpackMessages({ + errors: [err.message], + warnings: new Array(), + } as webpack.Stats.ToJsonOutput); + + throw new Error(errors[0]); + } else { + reject(err); + } + } else { + resolve(buildStats); + } + }); + }); + + const { errors, warnings } = formatWebpackMessages( + stats.toJson({ all: false, warnings: true, errors: true }), + ); + + if (errors.length) { + // Only keep the first error. Others are often indicative + // of the same problem, but confuse the reader with noise. + throw new Error(errors[0]); + } + if (isCi && warnings.length) { + console.log( + chalk.yellow( + '\nTreating warnings as errors because process.env.CI = true.\n', + ), + ); + throw new Error(warnings.join('\n\n')); + } + + return { stats }; +} diff --git a/packages/cli/src/lib/bundle/index.ts b/packages/cli/src/lib/bundle/index.ts index 51b92483da..7a1303f980 100644 --- a/packages/cli/src/lib/bundle/index.ts +++ b/packages/cli/src/lib/bundle/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export { bundle } from './bundle'; +export { buildBundle } from './bundle'; export { startDevServer } from './server'; diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundle/server.ts index 40bd5be823..907c52ecdf 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -20,10 +20,10 @@ import WebpackDevServer from 'webpack-dev-server'; import openBrowser from 'react-dev-utils/openBrowser'; import { choosePort, prepareUrls } from 'react-dev-utils/WebpackDevServerUtils'; import { createConfig } from './config'; -import { BundlingOptions } from './types'; +import { ServeOptions } from './types'; import { resolveBundlingPaths } from './paths'; -export async function startDevServer(options: BundlingOptions) { +export async function startDevServer(options: ServeOptions) { const host = process.env.HOST ?? '0.0.0.0'; const defaultPort = parseInt(process.env.PORT ?? '', 10) || 3000; diff --git a/packages/cli/src/lib/bundle/types.ts b/packages/cli/src/lib/bundle/types.ts index d5e5a0a96a..44abb47cb9 100644 --- a/packages/cli/src/lib/bundle/types.ts +++ b/packages/cli/src/lib/bundle/types.ts @@ -16,6 +16,14 @@ import { BundlingPathsOptions } from './paths'; -export type BundlingOptions = BundlingPathsOptions & { +export type BundlingOptions = { checksEnabled: boolean; }; + +export type ServeOptions = BundlingPathsOptions & { + checksEnabled: boolean; +}; + +export type BuildOptions = BundlingPathsOptions & { + statsJsonEnabled: boolean; +}; diff --git a/yarn.lock b/yarn.lock index 0bfef7c122..feae845c4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6105,6 +6105,16 @@ before-after-hook@^2.0.0, before-after-hook@^2.1.0: resolved "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== +bfj@^7.0.2: + version "7.0.2" + resolved "https://registry.npmjs.org/bfj/-/bfj-7.0.2.tgz#1988ce76f3add9ac2913fd8ba47aad9e651bfbb2" + integrity sha512-+e/UqUzwmzJamNF50tBV6tZPTORow7gQ96iFow+8b562OdMpEK0BcJEq2OSPEDmAbSMBQ7PKZ87ubFkgxpYWgw== + dependencies: + bluebird "^3.5.5" + check-types "^11.1.1" + hoopy "^0.1.4" + tryer "^1.0.1" + big.js@^3.1.3: version "3.2.0" resolved "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" @@ -6741,6 +6751,11 @@ check-more-types@2.24.0: resolved "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= +check-types@^11.1.1: + version "11.1.2" + resolved "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz#86a7c12bf5539f6324eb0e70ca8896c0e38f3e2f" + integrity sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ== + chokidar@^2.0.4, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -11091,6 +11106,11 @@ hook-std@^2.0.0: resolved "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz#ff9aafdebb6a989a354f729bb6445cf4a3a7077c" integrity sha512-zZ6T5WcuBMIUVh49iPQS9t977t7C0l7OtHrpeMb5uk48JdflRX0NSFvCekfYNmGQETnLq9W/isMyHl69kxGi8g== +hoopy@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" + integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== + hosted-git-info@^2.1.4, hosted-git-info@^2.7.1, hosted-git-info@^2.8.8: version "2.8.8" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -20983,6 +21003,11 @@ trough@^1.0.0: resolved "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== +tryer@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" + integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== + ts-dedent@^1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/ts-dedent/-/ts-dedent-1.1.1.tgz#68fad040d7dbd53a90f545b450702340e17d18f3" From 1694bbd7ccd35ea07b52d48a76cc6f219a4b0f2e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 18:53:33 +0200 Subject: [PATCH 17/69] packages/cli: separate dev and prod config --- packages/cli/src/lib/bundle/bundle.ts | 6 +++++- packages/cli/src/lib/bundle/config.ts | 8 ++++---- packages/cli/src/lib/bundle/optimization.ts | 12 ++++++++++-- packages/cli/src/lib/bundle/server.ts | 2 +- packages/cli/src/lib/bundle/types.ts | 1 + 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/lib/bundle/bundle.ts b/packages/cli/src/lib/bundle/bundle.ts index 1f2d3f214b..c7860c0f42 100644 --- a/packages/cli/src/lib/bundle/bundle.ts +++ b/packages/cli/src/lib/bundle/bundle.ts @@ -36,7 +36,11 @@ export async function buildBundle(options: BuildOptions) { const { statsJsonEnabled } = options; const paths = resolveBundlingPaths(options); - const config = createConfig(paths, { ...options, checksEnabled: false }); + const config = createConfig(paths, { + ...options, + checksEnabled: false, + isDev: false, + }); const compiler = webpack(config); const isCi = yn(process.env.CI, { default: false }); diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 2d01587c19..7d7d41dc5f 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -32,7 +32,7 @@ export function createConfig( paths: BundlingPaths, options: BundlingOptions, ): webpack.Configuration { - const { checksEnabled } = options; + const { checksEnabled, isDev } = options; const plugins = [ new HtmlWebpackPlugin({ @@ -58,10 +58,10 @@ export function createConfig( } return { - mode: 'development', + mode: isDev ? 'development' : 'production', profile: false, bail: false, - devtool: 'cheap-module-eval-source-map', + devtool: isDev ? 'cheap-module-eval-source-map' : 'source-map', context: paths.targetPath, entry: [require.resolve('react-hot-loader/patch'), paths.targetEntry], resolve: { @@ -84,7 +84,7 @@ export function createConfig( publicPath: '/', filename: 'bundle.js', }, - optimization: optimization(), + optimization: optimization(options), plugins, node: { module: 'empty', diff --git a/packages/cli/src/lib/bundle/optimization.ts b/packages/cli/src/lib/bundle/optimization.ts index 89679c8026..03168b376d 100644 --- a/packages/cli/src/lib/bundle/optimization.ts +++ b/packages/cli/src/lib/bundle/optimization.ts @@ -15,9 +15,15 @@ */ import { Options } from 'webpack'; +import { BundlingOptions } from './types'; + +export const optimization = ( + options: BundlingOptions, +): Options.Optimization => { + const { isDev } = options; -export const optimization = (): Options.Optimization => { return { + minimize: !isDev, runtimeChunk: 'single', splitChunks: { automaticNameDelimiter: '-', @@ -38,7 +44,9 @@ export const optimization = (): Options.Optimization => { // npm package names are URL-safe, but some servers don't like @ symbols return packageName.replace('@', ''); }, - filename: 'module-[name].[chunkhash:8].js', + filename: isDev + ? 'module-[name].js' + : 'module-[name].[chunkhash:8].js', priority: 10, minSize: 100000, minChunks: 1, diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundle/server.ts index 907c52ecdf..4bbdfde581 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundle/server.ts @@ -36,7 +36,7 @@ export async function startDevServer(options: ServeOptions) { const urls = prepareUrls(protocol, host, port); const paths = resolveBundlingPaths(options); - const config = createConfig(paths, options); + const config = createConfig(paths, { ...options, isDev: true }); const compiler = webpack(config); const server = new WebpackDevServer(compiler, { diff --git a/packages/cli/src/lib/bundle/types.ts b/packages/cli/src/lib/bundle/types.ts index 44abb47cb9..4182226d69 100644 --- a/packages/cli/src/lib/bundle/types.ts +++ b/packages/cli/src/lib/bundle/types.ts @@ -18,6 +18,7 @@ import { BundlingPathsOptions } from './paths'; export type BundlingOptions = { checksEnabled: boolean; + isDev: boolean; }; export type ServeOptions = BundlingPathsOptions & { From 65220f3ef0334348857f10f111e0c41035f6e87b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 19:01:20 +0200 Subject: [PATCH 18/69] packages/cli: nicer bundle and chunk names for bundler --- packages/cli/src/lib/bundle/config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 7d7d41dc5f..7fe6f2e585 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -81,8 +81,12 @@ export function createConfig( rules: loaders(), }, output: { + path: paths.targetDist, publicPath: '/', - filename: 'bundle.js', + filename: isDev ? '[name].js' : '[name].[hash:8].js', + chunkFilename: isDev + ? '[name].chunk.js' + : '[name].[chunkhash:8].chunk.js', }, optimization: optimization(options), plugins, From f3b54ae6180419951f927098ff9b044a852b503b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 19:04:51 +0200 Subject: [PATCH 19/69] packages/cli: pick up bundle html template from next to index --- packages/cli/src/lib/bundle/paths.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/lib/bundle/paths.ts b/packages/cli/src/lib/bundle/paths.ts index 5d9c6b98c9..d5201c3171 100644 --- a/packages/cli/src/lib/bundle/paths.ts +++ b/packages/cli/src/lib/bundle/paths.ts @@ -35,7 +35,7 @@ export function resolveBundlingPaths(options: BundlingPathsOptions) { return paths.resolveTarget(`${path}.js`); }; - let targetHtml = paths.resolveTarget('dev/index.html'); + let targetHtml = paths.resolveTarget(`${entry}.html`); if (!existsSync(targetHtml)) { targetHtml = paths.resolveOwn('templates/serve_index.html'); } From 33df212ae7f939a9188ebf0028f72ae6da9ef065 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 20:25:49 +0200 Subject: [PATCH 20/69] packages/cli: remove react-scripts dependency --- packages/cli/package.json | 6 +- packages/cli/src/lib/bundle/loaders.ts | 12 +- yarn.lock | 2250 ++---------------------- 3 files changed, 195 insertions(+), 2073 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 0c19c7f7dd..483ae52ae4 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -41,6 +41,7 @@ "chalk": "^4.0.0", "chokidar": "^3.3.1", "commander": "^4.1.1", + "css-loader": "^3.5.3", "dashify": "^2.0.0", "diff": "^4.0.2", "eslint-plugin-import": "^2.20.2", @@ -54,10 +55,10 @@ "jest-css-modules": "^2.1.0", "jest-esm-transformer": "^1.0.0", "ora": "^4.0.3", + "raw-loader": "^4.0.1", "react": "^16.0.0", "react-dev-utils": "^10.2.0", "react-hot-loader": "^4.12.21", - "react-scripts": "^3.4.1", "recursive-readdir": "^2.2.2", "replace-in-file": "^6.0.0", "rollup": "^2.3.2", @@ -65,11 +66,14 @@ "rollup-plugin-peer-deps-external": "^2.2.2", "rollup-plugin-postcss": "^3.1.1", "rollup-plugin-typescript2": "^0.26.0", + "style-loader": "^1.2.1", "sucrase": "^3.14.0", "tar": "^6.0.1", "ts-loader": "^7.0.4", + "url-loader": "^4.1.0", "webpack": "^4.41.6", "webpack-dev-server": "^3.10.3", + "yml-loader": "^2.1.0", "yn": "^4.0.0" }, "devDependencies": { diff --git a/packages/cli/src/lib/bundle/loaders.ts b/packages/cli/src/lib/bundle/loaders.ts index 173776272a..730ba2496a 100644 --- a/packages/cli/src/lib/bundle/loaders.ts +++ b/packages/cli/src/lib/bundle/loaders.ts @@ -21,7 +21,7 @@ export const loaders = (): Module['rules'] => { { test: /\.(tsx?)$/, exclude: /node_modules/, - loader: '@sucrase/webpack-loader', + loader: require.resolve('@sucrase/webpack-loader'), options: { transforms: ['typescript', 'jsx', 'react-hot-loader'], }, @@ -29,14 +29,14 @@ export const loaders = (): Module['rules'] => { { test: /\.(jsx?|mjs)$/, exclude: /node_modules/, - loader: '@sucrase/webpack-loader', + loader: require.resolve('@sucrase/webpack-loader'), options: { transforms: ['jsx', 'react-hot-loader'], }, }, { test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.frag/, /\.xml/], - loader: 'url-loader', + loader: require.resolve('url-loader'), options: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]', @@ -44,15 +44,15 @@ export const loaders = (): Module['rules'] => { }, { test: /\.ya?ml$/, - use: 'yml-loader', + use: require.resolve('yml-loader'), }, { include: /\.(md)$/, - use: 'raw-loader', + use: require.resolve('raw-loader'), }, { test: /\.css$/i, - use: ['style-loader', 'css-loader'], + use: [require.resolve('style-loader'), require.resolve('css-loader')], }, ]; }; diff --git a/yarn.lock b/yarn.lock index feae845c4e..26b8391dcf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,28 +25,6 @@ invariant "^2.2.4" semver "^5.5.0" -"@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== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" - "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" - 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/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" @@ -69,7 +47,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.6": +"@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== @@ -289,7 +267,7 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.9.0", "@babel/helpers@^7.9.6": +"@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== @@ -307,7 +285,7 @@ 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", "@babel/parser@^7.9.6": +"@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@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== @@ -321,7 +299,7 @@ "@babel/helper-remap-async-to-generator" "^7.8.3" "@babel/plugin-syntax-async-generators" "^7.8.0" -"@babel/plugin-proposal-class-properties@7.8.3", "@babel/plugin-proposal-class-properties@^7.7.0": +"@babel/plugin-proposal-class-properties@^7.7.0": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" integrity sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA== @@ -329,15 +307,6 @@ "@babel/helper-create-class-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-proposal-decorators@7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.8.3.tgz#2156860ab65c5abf068c3f67042184041066543e" - integrity sha512-e3RvdvS4qPJVTe288DlXjwKflpfy1hr0j5dz5WpIYYeP7vQZg2WfAEIp8k5/Lwis/m5REXEteIz6rrcDtXXG7w== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-decorators" "^7.8.3" - "@babel/plugin-proposal-dynamic-import@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054" @@ -354,7 +323,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-json-strings" "^7.8.0" -"@babel/plugin-proposal-nullish-coalescing-operator@7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw== @@ -362,7 +331,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" -"@babel/plugin-proposal-numeric-separator@7.8.3", "@babel/plugin-proposal-numeric-separator@^7.8.3": +"@babel/plugin-proposal-numeric-separator@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8" integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ== @@ -386,7 +355,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@7.9.0", "@babel/plugin-proposal-optional-chaining@^7.9.0": +"@babel/plugin-proposal-optional-chaining@^7.9.0": version "7.9.0" resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58" integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w== @@ -416,13 +385,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-decorators@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.8.3.tgz#8d2c15a9f1af624b0025f961682a9d53d3001bda" - integrity sha512-8Hg4dNNT9/LcA1zQlfwuKR8BUc/if7Q7NkTam9sGTcJphLwpf2g4S42uhspQrIrR+dpzE0dtTqBVFoHl8GtnnQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-dynamic-import@^7.2.0", "@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" @@ -493,13 +455,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-typescript@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz#c1f659dda97711a569cef75275f7e15dcaa6cabc" - integrity sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-arrow-functions@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" @@ -582,7 +537,7 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-flow-strip-types@7.9.0", "@babel/plugin-transform-flow-strip-types@^7.9.0": +"@babel/plugin-transform-flow-strip-types@^7.9.0": version "7.9.0" resolved "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.9.0.tgz#8a3538aa40434e000b8f44a3c5c9ac7229bd2392" integrity sha512-7Qfg0lKQhEHs93FChxVLAvhBshOPQDtJUTVHr/ZwQNRccCm4O9D79r9tVSoV8iNwjP1YgfD+e/fgHcPkN1qEQg== @@ -701,7 +656,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-react-display-name@7.8.3", "@babel/plugin-transform-react-display-name@^7.8.3": +"@babel/plugin-transform-react-display-name@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz#70ded987c91609f78353dd76d2fb2a0bb991e8e5" integrity sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A== @@ -757,16 +712,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-runtime@7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b" - integrity sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw== - dependencies: - "@babel/helper-module-imports" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - resolve "^1.8.1" - semver "^5.5.1" - "@babel/plugin-transform-shorthand-properties@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8" @@ -804,15 +749,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-typescript@^7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.0.tgz#8b52649c81cb7dee117f760952ab46675a258836" - integrity sha512-GRffJyCu16H3tEhbt9Q4buVFFBqrgS8FzTuhqSxlXNgmqD8aw2xmwtRwrvWXXlw7gHs664uqacsJymHJ9SUE/Q== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-typescript" "^7.8.3" - "@babel/plugin-transform-unicode-regex@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" @@ -821,7 +757,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/preset-env@7.9.0", "@babel/preset-env@^7.4.5": +"@babel/preset-env@^7.4.5": version "7.9.0" resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== @@ -906,7 +842,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@7.9.1", "@babel/preset-react@^7.0.0": +"@babel/preset-react@^7.0.0": version "7.9.1" resolved "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.9.1.tgz#b346403c36d58c3bb544148272a0cefd9c28677a" integrity sha512-aJBYF23MPj0RNdp/4bHnAP0NVqqZRr9kl0NAOP4nJCex6OYVio59+dnQzsAWFuogdLyeaKA1hmfUIVZkY5J+TQ== @@ -918,14 +854,6 @@ "@babel/plugin-transform-react-jsx-self" "^7.9.0" "@babel/plugin-transform-react-jsx-source" "^7.9.0" -"@babel/preset-typescript@7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz#87705a72b1f0d59df21c179f7c3d2ef4b16ce192" - integrity sha512-S4cueFnGrIbvYJgwsVFKdvOmpiL0XGw9MFW9D0vgRys5g36PBhZRL8NX8Gr2akz8XRtzq6HuDXPD/1nniagNUg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-typescript" "^7.9.0" - "@babel/runtime-corejs2@^7.4.4": version "7.9.2" resolved "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.9.2.tgz#f11d074ff99b9b4319b5ecf0501f12202bf2bf4d" @@ -942,13 +870,6 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@7.9.0": - version "7.9.0" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.0.tgz#337eda67401f5b066a6f205a3113d4ac18ba495b" - integrity sha512-cTIudHnzuWLS56ik4DnRnqqNf8MkdUzV4iFFI1h7Jo9xvrpQROYaAnaSd2mHLQAzzZAPfATynX5ord6YlNYNMA== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.4", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2", "@babel/runtime@^7.9.6": version "7.9.6" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" @@ -956,7 +877,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": +"@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== @@ -965,7 +886,7 @@ "@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", "@babel/traverse@^7.9.6": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@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== @@ -980,7 +901,7 @@ 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", "@babel/types@^7.9.5", "@babel/types@^7.9.6": +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@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== @@ -1132,16 +1053,6 @@ dependencies: find-up "^4.0.0" -"@csstools/convert-colors@^1.4.0": - version "1.4.0" - resolved "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" - integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw== - -"@csstools/normalize.css@^10.1.0": - version "10.1.0" - resolved "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18" - integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg== - "@cypress/listr-verbose-renderer@0.4.1": version "0.4.1" resolved "https://registry.npmjs.org/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#a77492f4b11dcc7c446a34b3e28721afd33c642a" @@ -1374,36 +1285,21 @@ unique-filename "^1.1.1" which "^1.3.1" -"@hapi/address@2.x.x", "@hapi/address@^2.1.2": +"@hapi/address@^2.1.2": version "2.1.4" resolved "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== -"@hapi/bourne@1.x.x": - version "1.3.2" - resolved "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a" - integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA== - "@hapi/formula@^1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz#994649c7fea1a90b91a0a1e6d983523f680e10cd" integrity sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA== -"@hapi/hoek@8.x.x", "@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0": +"@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0": version "8.5.1" resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== -"@hapi/joi@^15.0.0": - version "15.1.1" - resolved "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7" - integrity sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ== - dependencies: - "@hapi/address" "2.x.x" - "@hapi/bourne" "1.x.x" - "@hapi/hoek" "8.x.x" - "@hapi/topo" "3.x.x" - "@hapi/joi@^16.1.8": version "16.1.8" resolved "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz#84c1f126269489871ad4e2decc786e0adef06839" @@ -1420,7 +1316,7 @@ resolved "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz#025b7a36dbbf4d35bf1acd071c26b20ef41e0d13" integrity sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ== -"@hapi/topo@3.x.x", "@hapi/topo@^3.1.3": +"@hapi/topo@^3.1.3": version "3.1.6" resolved "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== @@ -1461,15 +1357,6 @@ resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^24.7.1", "@jest/console@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" - integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== - dependencies: - "@jest/source-map" "^24.9.0" - chalk "^2.0.1" - slash "^2.0.0" - "@jest/console@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/console/-/console-25.1.0.tgz#1fc765d44a1e11aec5029c08e798246bd37075ab" @@ -1480,40 +1367,6 @@ jest-util "^25.1.0" slash "^3.0.0" -"@jest/core@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz#2ceccd0b93181f9c4850e74f2a9ad43d351369c4" - integrity sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A== - dependencies: - "@jest/console" "^24.7.1" - "@jest/reporters" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - ansi-escapes "^3.0.0" - chalk "^2.0.1" - exit "^0.1.2" - graceful-fs "^4.1.15" - jest-changed-files "^24.9.0" - jest-config "^24.9.0" - jest-haste-map "^24.9.0" - jest-message-util "^24.9.0" - jest-regex-util "^24.3.0" - jest-resolve "^24.9.0" - jest-resolve-dependencies "^24.9.0" - jest-runner "^24.9.0" - jest-runtime "^24.9.0" - jest-snapshot "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - jest-watcher "^24.9.0" - micromatch "^3.1.10" - p-each-series "^1.0.0" - realpath-native "^1.1.0" - rimraf "^2.5.4" - slash "^2.0.0" - strip-ansi "^5.0.0" - "@jest/core@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/core/-/core-25.1.0.tgz#3d4634fc3348bb2d7532915d67781cdac0869e47" @@ -1548,16 +1401,6 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^24.3.0", "@jest/environment@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz#21e3afa2d65c0586cbd6cbefe208bafade44ab18" - integrity sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ== - dependencies: - "@jest/fake-timers" "^24.9.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - jest-mock "^24.9.0" - "@jest/environment@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/environment/-/environment-25.1.0.tgz#4a97f64770c9d075f5d2b662b5169207f0a3f787" @@ -1567,15 +1410,6 @@ "@jest/types" "^25.1.0" jest-mock "^25.1.0" -"@jest/fake-timers@^24.3.0", "@jest/fake-timers@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" - integrity sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A== - dependencies: - "@jest/types" "^24.9.0" - jest-message-util "^24.9.0" - jest-mock "^24.9.0" - "@jest/fake-timers@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-25.1.0.tgz#a1e0eff51ffdbb13ee81f35b52e0c1c11a350ce8" @@ -1587,33 +1421,6 @@ jest-util "^25.1.0" lolex "^5.0.0" -"@jest/reporters@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz#86660eff8e2b9661d042a8e98a028b8d631a5b43" - integrity sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw== - dependencies: - "@jest/environment" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.2" - istanbul-lib-coverage "^2.0.2" - istanbul-lib-instrument "^3.0.1" - istanbul-lib-report "^2.0.4" - istanbul-lib-source-maps "^3.0.1" - istanbul-reports "^2.2.6" - jest-haste-map "^24.9.0" - jest-resolve "^24.9.0" - jest-runtime "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.6.0" - node-notifier "^5.4.2" - slash "^2.0.0" - source-map "^0.6.0" - string-length "^2.0.0" - "@jest/reporters@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-25.1.0.tgz#9178ecf136c48f125674ac328f82ddea46e482b0" @@ -1647,15 +1454,6 @@ optionalDependencies: node-notifier "^6.0.0" -"@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" - integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.1.15" - source-map "^0.6.0" - "@jest/source-map@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-25.1.0.tgz#b012e6c469ccdbc379413f5c1b1ffb7ba7034fb0" @@ -1665,15 +1463,6 @@ graceful-fs "^4.2.3" source-map "^0.6.0" -"@jest/test-result@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" - integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== - dependencies: - "@jest/console" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/istanbul-lib-coverage" "^2.0.0" - "@jest/test-result@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-25.1.0.tgz#847af2972c1df9822a8200457e64be4ff62821f7" @@ -1685,16 +1474,6 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz#f8f334f35b625a4f2f355f2fe7e6036dad2e6b31" - integrity sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A== - dependencies: - "@jest/test-result" "^24.9.0" - jest-haste-map "^24.9.0" - jest-runner "^24.9.0" - jest-runtime "^24.9.0" - "@jest/test-sequencer@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-25.1.0.tgz#4df47208542f0065f356fcdb80026e3c042851ab" @@ -1705,28 +1484,6 @@ jest-runner "^25.1.0" jest-runtime "^25.1.0" -"@jest/transform@^24.9.0": - version "24.9.0" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz#4ae2768b296553fadab09e9ec119543c90b16c56" - integrity sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^24.9.0" - babel-plugin-istanbul "^5.1.0" - chalk "^2.0.1" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.15" - jest-haste-map "^24.9.0" - jest-regex-util "^24.9.0" - jest-util "^24.9.0" - micromatch "^3.1.10" - pirates "^4.0.1" - realpath-native "^1.1.0" - slash "^2.0.0" - source-map "^0.6.1" - write-file-atomic "2.4.1" - "@jest/transform@^25.1.0": version "25.1.0" resolved "https://registry.npmjs.org/@jest/transform/-/transform-25.1.0.tgz#221f354f512b4628d88ce776d5b9e601028ea9da" @@ -1749,7 +1506,7 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^24.3.0", "@jest/types@^24.9.0": +"@jest/types@^24.9.0": version "24.9.0" resolved "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== @@ -3734,7 +3491,7 @@ merge-deep "^3.0.2" svgo "^1.2.2" -"@svgr/webpack@4.3.3", "@svgr/webpack@^4.0.3": +"@svgr/webpack@^4.0.3": version "4.3.3" resolved "https://registry.npmjs.org/@svgr/webpack/-/webpack-4.3.3.tgz#13cc2423bf3dff2d494f16b17eb7eacb86895017" integrity sha512-bjnWolZ6KVsHhgyCoYRFmbd26p8XVbulCzSG53BDQqAr+JOAderYK7CuYrB3bDjHJuF6LJ7Wrr42+goLRV9qIg== @@ -4654,7 +4411,7 @@ resolved "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== -"@typescript-eslint/eslint-plugin@^2.10.0", "@typescript-eslint/eslint-plugin@^2.14.0": +"@typescript-eslint/eslint-plugin@^2.14.0": version "2.24.0" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz#a86cf618c965a462cddf3601f594544b134d6d68" integrity sha512-wJRBeaMeT7RLQ27UQkDFOu25MqFOBus8PtOa9KaT5ZuxC1kAsd7JEHqWt4YXuY9eancX0GK9C68i5OROnlIzBA== @@ -4674,7 +4431,7 @@ "@typescript-eslint/typescript-estree" "2.24.0" eslint-scope "^5.0.0" -"@typescript-eslint/parser@^2.10.0", "@typescript-eslint/parser@^2.14.0": +"@typescript-eslint/parser@^2.14.0": version "2.24.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.24.0.tgz#2cf0eae6e6dd44d162486ad949c126b887f11eb8" integrity sha512-H2Y7uacwSSg8IbVxdYExSI3T7uM1DzmOn2COGtCahCC3g8YtM1xYAPi2MAHyfPs61VKxP/J/UiSctcRgw4G8aw== @@ -4697,15 +4454,6 @@ semver "^6.3.0" tsutils "^3.17.1" -"@webassemblyjs/ast@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" - integrity sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ== - dependencies: - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/wast-parser" "1.8.5" - "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -4715,43 +4463,21 @@ "@webassemblyjs/helper-wasm-bytecode" "1.9.0" "@webassemblyjs/wast-parser" "1.9.0" -"@webassemblyjs/floating-point-hex-parser@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz#1ba926a2923613edce496fd5b02e8ce8a5f49721" - integrity sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ== - "@webassemblyjs/floating-point-hex-parser@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== -"@webassemblyjs/helper-api-error@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz#c49dad22f645227c5edb610bdb9697f1aab721f7" - integrity sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA== - "@webassemblyjs/helper-api-error@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== -"@webassemblyjs/helper-buffer@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz#fea93e429863dd5e4338555f42292385a653f204" - integrity sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q== - "@webassemblyjs/helper-buffer@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== -"@webassemblyjs/helper-code-frame@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz#9a740ff48e3faa3022b1dff54423df9aa293c25e" - integrity sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ== - dependencies: - "@webassemblyjs/wast-printer" "1.8.5" - "@webassemblyjs/helper-code-frame@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" @@ -4759,24 +4485,11 @@ dependencies: "@webassemblyjs/wast-printer" "1.9.0" -"@webassemblyjs/helper-fsm@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz#ba0b7d3b3f7e4733da6059c9332275d860702452" - integrity sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow== - "@webassemblyjs/helper-fsm@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== -"@webassemblyjs/helper-module-context@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz#def4b9927b0101dc8cbbd8d1edb5b7b9c82eb245" - integrity sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g== - dependencies: - "@webassemblyjs/ast" "1.8.5" - mamacro "^0.0.3" - "@webassemblyjs/helper-module-context@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" @@ -4784,26 +4497,11 @@ dependencies: "@webassemblyjs/ast" "1.9.0" -"@webassemblyjs/helper-wasm-bytecode@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz#537a750eddf5c1e932f3744206551c91c1b93e61" - integrity sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ== - "@webassemblyjs/helper-wasm-bytecode@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== -"@webassemblyjs/helper-wasm-section@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz#74ca6a6bcbe19e50a3b6b462847e69503e6bfcbf" - integrity sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-buffer" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/wasm-gen" "1.8.5" - "@webassemblyjs/helper-wasm-section@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" @@ -4814,13 +4512,6 @@ "@webassemblyjs/helper-wasm-bytecode" "1.9.0" "@webassemblyjs/wasm-gen" "1.9.0" -"@webassemblyjs/ieee754@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz#712329dbef240f36bf57bd2f7b8fb9bf4154421e" - integrity sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g== - dependencies: - "@xtuc/ieee754" "^1.2.0" - "@webassemblyjs/ieee754@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" @@ -4828,13 +4519,6 @@ dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz#044edeb34ea679f3e04cd4fd9824d5e35767ae10" - integrity sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A== - dependencies: - "@xtuc/long" "4.2.2" - "@webassemblyjs/leb128@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" @@ -4842,30 +4526,11 @@ dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz#a8bf3b5d8ffe986c7c1e373ccbdc2a0915f0cedc" - integrity sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw== - "@webassemblyjs/utf8@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== -"@webassemblyjs/wasm-edit@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz#962da12aa5acc1c131c81c4232991c82ce56e01a" - integrity sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-buffer" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/helper-wasm-section" "1.8.5" - "@webassemblyjs/wasm-gen" "1.8.5" - "@webassemblyjs/wasm-opt" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - "@webassemblyjs/wast-printer" "1.8.5" - "@webassemblyjs/wasm-edit@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" @@ -4880,17 +4545,6 @@ "@webassemblyjs/wasm-parser" "1.9.0" "@webassemblyjs/wast-printer" "1.9.0" -"@webassemblyjs/wasm-gen@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz#54840766c2c1002eb64ed1abe720aded714f98bc" - integrity sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/ieee754" "1.8.5" - "@webassemblyjs/leb128" "1.8.5" - "@webassemblyjs/utf8" "1.8.5" - "@webassemblyjs/wasm-gen@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" @@ -4902,16 +4556,6 @@ "@webassemblyjs/leb128" "1.9.0" "@webassemblyjs/utf8" "1.9.0" -"@webassemblyjs/wasm-opt@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz#b24d9f6ba50394af1349f510afa8ffcb8a63d264" - integrity sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-buffer" "1.8.5" - "@webassemblyjs/wasm-gen" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - "@webassemblyjs/wasm-opt@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" @@ -4922,18 +4566,6 @@ "@webassemblyjs/wasm-gen" "1.9.0" "@webassemblyjs/wasm-parser" "1.9.0" -"@webassemblyjs/wasm-parser@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz#21576f0ec88b91427357b8536383668ef7c66b8d" - integrity sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-api-error" "1.8.5" - "@webassemblyjs/helper-wasm-bytecode" "1.8.5" - "@webassemblyjs/ieee754" "1.8.5" - "@webassemblyjs/leb128" "1.8.5" - "@webassemblyjs/utf8" "1.8.5" - "@webassemblyjs/wasm-parser@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" @@ -4946,18 +4578,6 @@ "@webassemblyjs/leb128" "1.9.0" "@webassemblyjs/utf8" "1.9.0" -"@webassemblyjs/wast-parser@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz#e10eecd542d0e7bd394f6827c49f3df6d4eefb8c" - integrity sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/floating-point-hex-parser" "1.8.5" - "@webassemblyjs/helper-api-error" "1.8.5" - "@webassemblyjs/helper-code-frame" "1.8.5" - "@webassemblyjs/helper-fsm" "1.8.5" - "@xtuc/long" "4.2.2" - "@webassemblyjs/wast-parser@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" @@ -4970,15 +4590,6 @@ "@webassemblyjs/helper-fsm" "1.9.0" "@xtuc/long" "4.2.2" -"@webassemblyjs/wast-printer@1.8.5": - version "1.8.5" - resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz#114bbc481fd10ca0e23b3560fa812748b0bae5bc" - integrity sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/wast-parser" "1.8.5" - "@xtuc/long" "4.2.2" - "@webassemblyjs/wast-printer@1.9.0": version "1.9.0" resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" @@ -5038,7 +4649,7 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-globals@^4.1.0, acorn-globals@^4.3.0, acorn-globals@^4.3.2: +acorn-globals@^4.1.0, acorn-globals@^4.3.2: version "4.3.4" resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== @@ -5061,7 +4672,7 @@ acorn@^5.5.3: resolved "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^6.0.1, acorn@^6.0.4, acorn@^6.2.1, acorn@^6.4.1: +acorn@^6.0.1, acorn@^6.4.1: version "6.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -5076,17 +4687,6 @@ address@1.1.2, address@^1.0.1: resolved "https://registry.npmjs.org/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== -adjust-sourcemap-loader@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-2.0.0.tgz#6471143af75ec02334b219f54bc7970c52fb29a4" - integrity sha512-4hFsTsn58+YjrU9qKzML2JSSDqKvN8mUGQ0nNIrfPi8hmIONT4L3uUaT6MKdMsZ9AjsU6D2xDkZxCkbQPxChrA== - dependencies: - assert "1.4.1" - camelcase "5.0.0" - loader-utils "1.2.3" - object-path "0.11.4" - regex-parser "2.2.10" - agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -5356,11 +4956,6 @@ aria-query@^4.0.2: "@babel/runtime" "^7.7.4" "@babel/runtime-corejs3" "^7.7.4" -arity-n@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/arity-n/-/arity-n-1.0.4.tgz#d9e76b11733e08569c0847ae7b39b2860b30b745" - integrity sha1-2edrEXM+CFacCEeuezmyhgswt0U= - arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -5479,7 +5074,7 @@ arrify@^1.0.1: resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -asap@^2.0.0, asap@~2.0.6: +asap@^2.0.0: version "2.0.6" resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= @@ -5505,13 +5100,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@1.4.1: - version "1.4.1" - resolved "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= - dependencies: - util "0.10.3" - assert@^1.1.1: version "1.5.0" resolved "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" @@ -5587,7 +5175,7 @@ atob@^2.1.2: resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@^9.6.1, autoprefixer@^9.7.2: +autoprefixer@^9.7.2: version "9.7.4" resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz#f8bf3e06707d047f0641d87aee8cfb174b2a5378" integrity sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g== @@ -5624,25 +5212,6 @@ babel-code-frame@^6.22.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-eslint@10.1.0: - version "10.1.0" - resolved "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" - integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.0" - "@babel/traverse" "^7.7.0" - "@babel/types" "^7.7.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" - -babel-extract-comments@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz#0a2aedf81417ed391b85e18b4614e693a0351a21" - integrity sha512-qWWzi4TlddohA91bFwgt6zO/J0X+io7Qp184Fw0m2JYRSTZnJbFR8+07KmzudHCZgOiKRCrjhylwv9Xd8gfhVQ== - dependencies: - babylon "^6.18.0" - babel-helper-evaluate-path@^0.5.0: version "0.5.0" resolved "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.5.0.tgz#a62fa9c4e64ff7ea5cea9353174ef023a900a67c" @@ -5678,19 +5247,6 @@ babel-helper-to-multiple-sequence-expressions@^0.5.0: resolved "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz#a3f924e3561882d42fcf48907aa98f7979a4588d" integrity sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA== -babel-jest@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54" - integrity sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw== - dependencies: - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/babel__core" "^7.1.0" - babel-plugin-istanbul "^5.1.0" - babel-preset-jest "^24.9.0" - chalk "^2.4.2" - slash "^2.0.0" - babel-jest@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-25.1.0.tgz#206093ac380a4b78c4404a05b3277391278f80fb" @@ -5704,17 +5260,6 @@ babel-jest@^25.1.0: chalk "^3.0.0" slash "^3.0.0" -babel-loader@8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" - integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw== - dependencies: - find-cache-dir "^2.1.0" - loader-utils "^1.4.0" - mkdirp "^0.5.3" - pify "^4.0.1" - schema-utils "^2.6.5" - babel-plugin-add-react-displayname@^0.0.5: version "0.0.5" resolved "https://registry.npmjs.org/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz#339d4cddb7b65fd62d1df9db9fe04de134122bd5" @@ -5743,16 +5288,6 @@ babel-plugin-emotion@^10.0.20, babel-plugin-emotion@^10.0.27: find-root "^1.1.0" source-map "^0.5.7" -babel-plugin-istanbul@^5.1.0: - version "5.2.0" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" - integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - find-up "^3.0.0" - istanbul-lib-instrument "^3.3.0" - test-exclude "^5.2.3" - babel-plugin-istanbul@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" @@ -5764,13 +5299,6 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz#4f837091eb407e01447c8843cbec546d0002d756" - integrity sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw== - dependencies: - "@types/babel__traverse" "^7.0.6" - babel-plugin-jest-hoist@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.1.0.tgz#fb62d7b3b53eb36c97d1bc7fec2072f9bd115981" @@ -5778,7 +5306,7 @@ babel-plugin-jest-hoist@^25.1.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@2.8.0, babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.7.0: +babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.7.0: version "2.8.0" resolved "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -5863,7 +5391,7 @@ babel-plugin-minify-type-constructors@^0.4.3: dependencies: babel-helper-is-void-0 "^0.4.3" -babel-plugin-named-asset-import@^0.3.1, babel-plugin-named-asset-import@^0.3.6: +babel-plugin-named-asset-import@^0.3.1: version "0.3.6" resolved "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.6.tgz#c9750a1b38d85112c9e166bf3ef7c5dbc605f4be" integrity sha512-1aGDUfL1qOOIoqk9QKGIo2lANk+C7ko/fqH0uIyC71x3PEGz0uVP8ISgfEsFuG+FKmjHTvFK/nNM8dowpmUxLA== @@ -5882,11 +5410,6 @@ babel-plugin-syntax-jsx@^6.18.0: resolved "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= -babel-plugin-syntax-object-rest-spread@^6.8.0: - version "6.13.0" - resolved "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= - babel-plugin-transform-inline-consecutive-adds@^0.4.3: version "0.4.3" resolved "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz#323d47a3ea63a83a7ac3c811ae8e6941faf2b0d1" @@ -5907,14 +5430,6 @@ babel-plugin-transform-minify-booleans@^6.9.4: resolved "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz#acbb3e56a3555dd23928e4b582d285162dd2b198" integrity sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg= -babel-plugin-transform-object-rest-spread@^6.26.0: - version "6.26.0" - resolved "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" - integrity sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY= - dependencies: - babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.26.0" - babel-plugin-transform-property-literals@^6.9.4: version "6.9.4" resolved "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz#98c1d21e255736573f93ece54459f6ce24985d39" @@ -5922,11 +5437,6 @@ babel-plugin-transform-property-literals@^6.9.4: dependencies: esutils "^2.0.2" -babel-plugin-transform-react-remove-prop-types@0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a" - integrity sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA== - babel-plugin-transform-regexp-constructors@^0.4.3: version "0.4.3" resolved "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz#58b7775b63afcf33328fae9a5f88fbd4fb0b4965" @@ -5968,14 +5478,6 @@ babel-polyfill@6.26.0: core-js "^2.5.0" regenerator-runtime "^0.10.5" -babel-preset-jest@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc" - integrity sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg== - dependencies: - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - babel-plugin-jest-hoist "^24.9.0" - babel-preset-jest@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-25.1.0.tgz#d0aebfebb2177a21cde710996fce8486d34f1d33" @@ -6014,27 +5516,6 @@ babel-preset-jest@^25.1.0: babel-plugin-transform-undefined-to-void "^6.9.4" lodash "^4.17.11" -babel-preset-react-app@^9.1.2: - version "9.1.2" - resolved "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-9.1.2.tgz#54775d976588a8a6d1a99201a702befecaf48030" - integrity sha512-k58RtQOKH21NyKtzptoAvtAODuAJJs3ZhqBMl456/GnXEQ/0La92pNmwgWoMn5pBTrsvk3YYXdY7zpY4e3UIxA== - dependencies: - "@babel/core" "7.9.0" - "@babel/plugin-proposal-class-properties" "7.8.3" - "@babel/plugin-proposal-decorators" "7.8.3" - "@babel/plugin-proposal-nullish-coalescing-operator" "7.8.3" - "@babel/plugin-proposal-numeric-separator" "7.8.3" - "@babel/plugin-proposal-optional-chaining" "7.9.0" - "@babel/plugin-transform-flow-strip-types" "7.9.0" - "@babel/plugin-transform-react-display-name" "7.8.3" - "@babel/plugin-transform-runtime" "7.9.0" - "@babel/preset-env" "7.9.0" - "@babel/preset-react" "7.9.1" - "@babel/preset-typescript" "7.9.0" - "@babel/runtime" "7.9.0" - babel-plugin-macros "2.8.0" - babel-plugin-transform-react-remove-prop-types "0.4.24" - babel-runtime@6.26.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -6043,11 +5524,6 @@ babel-runtime@6.26.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: core-js "^2.4.0" regenerator-runtime "^0.11.0" -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - bail@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" @@ -6355,7 +5831,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.10.0, browserslist@^4.0.0, browserslist@^4.6.2, browserslist@^4.6.4, browserslist@^4.8.3, browserslist@^4.9.1: +browserslist@4.10.0, browserslist@^4.0.0, browserslist@^4.8.3, browserslist@^4.9.1: version "4.10.0" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.10.0.tgz#f179737913eaf0d2b98e4926ac1ca6a15cbcc6a9" integrity sha512-TpfK0TDgv71dzuTsEAlQiHeWQ/tiPqgNZVdv046fvNtBZrjbv2O3TsWCDU0AWGJJKCF/KsjNdLzR9hXOsh/CfA== @@ -6615,16 +6091,6 @@ camelcase-keys@^4.0.0: map-obj "^2.0.0" quick-lru "^1.0.0" -camelcase@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== - -camelcase@5.3.1, camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - camelcase@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" @@ -6635,6 +6101,11 @@ camelcase@^4.0.0, camelcase@^4.1.0: resolved "https://registry.npmjs.org/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.npmjs.org/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + camelize@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" @@ -6655,7 +6126,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001035: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001035: version "1.0.30001035" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz#2bb53b8aa4716b2ed08e088d4dc816a5fe089a1e" integrity sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ== @@ -6680,7 +6151,7 @@ cardinal@^2.1.1: ansicolors "~0.3.2" redeyed "~2.1.0" -case-sensitive-paths-webpack-plugin@2.3.0, case-sensitive-paths-webpack-plugin@^2.2.0: +case-sensitive-paths-webpack-plugin@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz#23ac613cc9a856e4f88ff8bb73bbb5e989825cf7" integrity sha512-/4YgnZS8y1UXXmC02xD5rRrBEu6T5ub+mQHLNRj0fzTRbgdBYhsNo2V5EqwgqrExjxsjtF/OpAKAMkKsxbD5XQ== @@ -7220,7 +6691,7 @@ commitizen@^4.0.3: strip-bom "4.0.0" strip-json-comments "3.0.1" -common-tags@1.8.0, common-tags@^1.8.0: +common-tags@1.8.0: version "1.8.0" resolved "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== @@ -7248,13 +6719,6 @@ component-emitter@^1.2.0, component-emitter@^1.2.1: resolved "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== -compose-function@3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/compose-function/-/compose-function-3.0.3.tgz#9ed675f13cc54501d30950a486ff6a7ba3ab185f" - integrity sha1-ntZ18TzFRQHTCVCkhv9qe6OrGF8= - dependencies: - arity-n "^1.0.4" - compressible@~2.0.16: version "2.0.18" resolved "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" @@ -7339,11 +6803,6 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -confusing-browser-globals@^1.0.9: - version "1.0.9" - resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" - integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== - connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -7496,18 +6955,13 @@ conventional-recommended-bump@^5.0.0: meow "^4.0.0" q "^1.5.1" -convert-source-map@1.7.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" -convert-source-map@^0.3.3: - version "0.3.5" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz#f1d802950af7dd2631a1febe0596550c86ab3190" - integrity sha1-8dgClQr33SYxof6+BZZVDIarMZA= - cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" @@ -7565,7 +7019,7 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5: resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== -core-js@^3.0.1, core-js@^3.0.4, core-js@^3.5.0: +core-js@^3.0.1, core-js@^3.0.4: version "3.6.4" resolved "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== @@ -7736,13 +7190,6 @@ crypto-random-string@^2.0.0: resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -css-blank-pseudo@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5" - integrity sha512-LHz35Hr83dnFeipc7oqFDmsjHdljj3TQtxGGiNWSOsTLIAubSm4TEz8qCaKFpk7idaQ1GfWscF4E6mgpBysA1w== - dependencies: - postcss "^7.0.5" - css-box-model@^1.1.2: version "1.2.0" resolved "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.0.tgz#3a26377b4162b3200d2ede4b064ec5b6a75186d0" @@ -7763,14 +7210,6 @@ css-declaration-sorter@^4.0.1: postcss "^7.0.1" timsort "^0.3.0" -css-has-pseudo@^0.10.0: - version "0.10.0" - resolved "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-0.10.0.tgz#3c642ab34ca242c59c41a125df9105841f6966ee" - integrity sha512-Z8hnfsZu4o/kt+AuFzeGpLVhFOGO9mluyHBaA2bA8aCGTwah5sT3WV/fTHH8UNZUytOIImuGPrl/prlb4oX4qQ== - dependencies: - postcss "^7.0.6" - postcss-selector-parser "^5.0.0-rc.4" - css-in-js-utils@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-2.0.1.tgz#3b472b398787291b47cfe3e44fecfdd9e914ba99" @@ -7779,7 +7218,7 @@ css-in-js-utils@^2.0.0: hyphenate-style-name "^1.0.2" isobject "^3.0.1" -css-loader@3.4.2, css-loader@^3.0.0: +css-loader@^3.0.0: version "3.4.2" resolved "https://registry.npmjs.org/css-loader/-/css-loader-3.4.2.tgz#d3fdb3358b43f233b78501c5ed7b1c6da6133202" integrity sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA== @@ -7797,6 +7236,25 @@ css-loader@3.4.2, css-loader@^3.0.0: postcss-value-parser "^4.0.2" schema-utils "^2.6.0" +css-loader@^3.5.3: + version "3.5.3" + resolved "https://registry.npmjs.org/css-loader/-/css-loader-3.5.3.tgz#95ac16468e1adcd95c844729e0bb167639eb0bcf" + integrity sha512-UEr9NH5Lmi7+dguAm+/JSPovNjYbm2k3TK58EiwQHzOHH5Jfq1Y+XoP2bQO6TMn7PptMd0opxxedAWcaSTRKHw== + dependencies: + camelcase "^5.3.1" + cssesc "^3.0.0" + icss-utils "^4.1.1" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.27" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^3.0.2" + postcss-modules-scope "^2.2.0" + postcss-modules-values "^3.0.0" + postcss-value-parser "^4.0.3" + schema-utils "^2.6.6" + semver "^6.3.0" + css-modules-loader-core@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/css-modules-loader-core/-/css-modules-loader-core-1.1.0.tgz#5908668294a1becd261ae0a4ce21b0b551f21d16" @@ -7809,13 +7267,6 @@ css-modules-loader-core@^1.1.0: postcss-modules-scope "1.1.0" postcss-modules-values "1.3.0" -css-prefers-color-scheme@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz#6f830a2714199d4f0d0d0bb8a27916ed65cff1f4" - integrity sha512-MTu6+tMs9S3EUqzmqLXEcgNRbNkkD/TGFvowpeoWJn5Vfq7FMgsmRQs9X5NXAURiOBmOxm/lLjsDNXDE6k9bhg== - dependencies: - postcss "^7.0.5" - css-select-base-adapter@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" @@ -7889,7 +7340,7 @@ css.escape@^1.5.1: resolved "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= -css@^2.0.0, css@^2.2.3: +css@^2.2.3: version "2.2.4" resolved "https://registry.npmjs.org/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== @@ -7899,16 +7350,6 @@ css@^2.0.0, css@^2.2.3: source-map-resolve "^0.5.2" urix "^0.1.0" -cssdb@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/cssdb/-/cssdb-4.4.0.tgz#3bf2f2a68c10f5c6a08abd92378331ee803cddb0" - integrity sha512-LsTAR1JPEM9TpGhl/0p3nQecC2LJ0kD8X5YARu1hk/9I1gril5vDtMZyNxcEpxxDj34YNck/ucjuoUd66K03oQ== - -cssesc@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" - integrity sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg== - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -7989,7 +7430,7 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.37" -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0", cssom@^0.3.4, cssom@~0.3.6: +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0", cssom@~0.3.6: version "0.3.8" resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== @@ -7999,7 +7440,7 @@ cssom@^0.4.1: resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== -cssstyle@^1.0.0, cssstyle@^1.1.1: +cssstyle@^1.0.0: version "1.4.0" resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== @@ -8135,14 +7576,6 @@ d3-timer@1: resolved "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5" integrity sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw== -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - damerau-levenshtein@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791" @@ -8735,7 +8168,7 @@ dotenv-defaults@^1.0.2: dependencies: dotenv "^6.2.0" -dotenv-expand@5.1.0, dotenv-expand@^5.1.0: +dotenv-expand@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== @@ -8747,11 +8180,6 @@ dotenv-webpack@^1.7.0: dependencies: dotenv-defaults "^1.0.2" -dotenv@8.2.0, dotenv@^8.0.0: - version "8.2.0" - resolved "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" - integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== - dotenv@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" @@ -8762,6 +8190,11 @@ dotenv@^6.2.0: resolved "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + duplexer2@~0.1.0: version "0.1.4" resolved "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" @@ -9009,29 +8442,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.53" - resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" - integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" - es5-shim@^4.5.13: version "4.5.13" resolved "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.13.tgz#5d88062de049f8969f83783f4a4884395f21d28b" integrity sha512-xi6hh6gsvDE0MaW4Vp1lgNEBpVcCXRWfPXj5egDvtgLz4L9MEvNwYEMdJH+JJinWkwa8c3c3o5HduV7dB/e1Hw== -es6-iterator@2.0.3, es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -9049,14 +8464,6 @@ es6-shim@^0.35.5: resolved "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.5.tgz#46f59dc0a84a1c5029e8ff1166ca0a902077a9ab" integrity sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg== -es6-symbol@^3.1.1, es6-symbol@~3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" @@ -9077,7 +8484,7 @@ escape-string-regexp@2.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.11.0, escodegen@^1.11.1, escodegen@^1.9.1: +escodegen@^1.11.1, escodegen@^1.9.1: version "1.14.1" resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== @@ -9096,13 +8503,6 @@ eslint-config-prettier@^6.0.0: dependencies: get-stdin "^6.0.0" -eslint-config-react-app@^5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-5.2.1.tgz#698bf7aeee27f0cea0139eaef261c7bf7dd623df" - integrity sha512-pGIZ8t0mFLcV+6ZirRgYK6RVqUIKRIi9MmgzUEmrIknsn3AdO0I32asO86dJgloHq+9ZPl8UIg8mYrvgP5u2wQ== - dependencies: - confusing-browser-globals "^1.0.9" - eslint-import-resolver-node@^0.3.2: version "0.3.3" resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" @@ -9111,17 +8511,6 @@ eslint-import-resolver-node@^0.3.2: debug "^2.6.9" resolve "^1.13.1" -eslint-loader@3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/eslint-loader/-/eslint-loader-3.0.3.tgz#e018e3d2722381d982b1201adb56819c73b480ca" - integrity sha512-+YRqB95PnNvxNp1HEjQmvf9KNvCin5HXYYseOXVC2U0KEcw4IkQ2IQEBG46j7+gW39bMzeu0GsUhVbBY3Votpw== - dependencies: - fs-extra "^8.1.0" - loader-fs-cache "^1.0.2" - loader-utils "^1.2.3" - object-hash "^2.0.1" - schema-utils "^2.6.1" - eslint-module-utils@^2.1.1: version "2.6.0" resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" @@ -9145,31 +8534,6 @@ eslint-plugin-cypress@^2.10.3: dependencies: globals "^11.12.0" -eslint-plugin-flowtype@4.6.0: - version "4.6.0" - resolved "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.6.0.tgz#82b2bd6f21770e0e5deede0228e456cb35308451" - integrity sha512-W5hLjpFfZyZsXfo5anlu7HM970JBDqbEshAJUkeczP6BFCIfJXuiIBQXyberLRtOStT0OGPF8efeTbxlHk4LpQ== - dependencies: - lodash "^4.17.15" - -eslint-plugin-import@2.20.1: - version "2.20.1" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz#802423196dcb11d9ce8435a5fc02a6d3b46939b3" - integrity sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw== - dependencies: - array-includes "^3.0.3" - array.prototype.flat "^1.2.1" - contains-path "^0.1.0" - debug "^2.6.9" - doctrine "1.5.0" - eslint-import-resolver-node "^0.3.2" - eslint-module-utils "^2.4.1" - has "^1.0.3" - minimatch "^3.0.4" - object.values "^1.1.0" - read-pkg-up "^2.0.0" - resolve "^1.12.0" - eslint-plugin-import@^2.20.2: version "2.20.2" resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz#91fc3807ce08be4837141272c8b99073906e588d" @@ -9195,7 +8559,7 @@ eslint-plugin-jest@^23.6.0: dependencies: "@typescript-eslint/experimental-utils" "^2.5.0" -eslint-plugin-jsx-a11y@6.2.3, eslint-plugin-jsx-a11y@^6.2.1: +eslint-plugin-jsx-a11y@^6.2.1: version "6.2.3" resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz#b872a09d5de51af70a97db1eea7dc933043708aa" integrity sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg== @@ -9232,12 +8596,7 @@ eslint-plugin-notice@^0.9.10: lodash "^4.17.15" metric-lcs "^0.1.2" -eslint-plugin-react-hooks@^1.6.1: - version "1.7.0" - resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04" - integrity sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA== - -eslint-plugin-react@7.19.0, eslint-plugin-react@^7.12.4: +eslint-plugin-react@^7.12.4: version "7.19.0" resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666" integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ== @@ -9278,12 +8637,12 @@ eslint-utils@^1.4.3: dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@^6.6.0, eslint@^6.8.0: +eslint@^6.8.0: version "6.8.0" resolved "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== @@ -9536,18 +8895,6 @@ expect-ct@0.2.0: resolved "https://registry.npmjs.org/expect-ct/-/expect-ct-0.2.0.tgz#3a54741b6ed34cc7a93305c605f63cd268a54a62" integrity sha512-6SK3MG/Bbhm8MsgyJAylg+ucIOU71/FzyFalcfu5nY19dH8y/z0tBJU0wrNBXD4B27EoQtqPF/9wqH0iYAd04g== -expect@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca" - integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q== - dependencies: - "@jest/types" "^24.9.0" - ansi-styles "^3.2.0" - jest-get-type "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-regex-util "^24.9.0" - expect@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/expect/-/expect-25.1.0.tgz#7e8d7b06a53f7d66ec927278db3304254ee683ee" @@ -9605,13 +8952,6 @@ express@^4.17.0, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" -ext@^1.1.2: - version "1.4.0" - resolved "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== - dependencies: - type "^2.0.0" - extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -9825,7 +9165,7 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-loader@4.3.0, file-loader@^4.2.0: +file-loader@^4.2.0: version "4.3.0" resolved "https://registry.npmjs.org/file-loader/-/file-loader-4.3.0.tgz#780f040f729b3d18019f20605f723e844b8a58af" integrity sha512-aKrYPYjF1yG3oX0kWRrqrSMfgftm7oJW5M+m4owoldH5C51C0RkIwB++JbRvEW3IU6/ZG5n8UvEcdgwOt2UOWA== @@ -9892,15 +9232,6 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" - integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= - dependencies: - commondir "^1.0.1" - mkdirp "^0.5.1" - pkg-dir "^1.0.0" - find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -10014,11 +9345,6 @@ flatted@^2.0.0: resolved "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== -flatten@^1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" - integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== - flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" @@ -10210,24 +9536,6 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^7.0.0: - version "7.0.1" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^9.0.0: version "9.0.0" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3" @@ -10276,11 +9584,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@2.1.2, fsevents@^2.1.2, fsevents@~2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== - fsevents@^1.2.7: version "1.2.12" resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" @@ -10289,6 +9592,11 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" +fsevents@^2.1.2, fsevents@~2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -11213,18 +10521,6 @@ html-to-react@^1.3.4: lodash.camelcase "^4.3.0" ramda "^0.26" -html-webpack-plugin@4.0.0-beta.11: - version "4.0.0-beta.11" - resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.11.tgz#3059a69144b5aecef97708196ca32f9e68677715" - integrity sha512-4Xzepf0qWxf8CGg7/WQM5qBB2Lc/NFI7MhU59eUDTkuQp3skZczH4UA1d6oQyDEIoMDgERVhRyTdtUPZ5s5HBg== - dependencies: - html-minifier-terser "^5.0.1" - loader-utils "^1.2.3" - lodash "^4.17.15" - pretty-error "^2.1.1" - tapable "^1.1.3" - util.promisify "1.0.0" - html-webpack-plugin@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" @@ -12382,29 +11678,11 @@ issue-parser@^6.0.0: lodash.isstring "^4.0.1" lodash.uniqby "^4.7.0" -istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" - integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== - istanbul-lib-coverage@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== -istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" - integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== - dependencies: - "@babel/generator" "^7.4.0" - "@babel/parser" "^7.4.3" - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.3" - "@babel/types" "^7.4.0" - istanbul-lib-coverage "^2.0.5" - semver "^6.0.0" - istanbul-lib-instrument@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" @@ -12418,15 +11696,6 @@ istanbul-lib-instrument@^4.0.0: istanbul-lib-coverage "^3.0.0" semver "^6.3.0" -istanbul-lib-report@^2.0.4: - version "2.0.8" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" - integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== - dependencies: - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - supports-color "^6.1.0" - istanbul-lib-report@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" @@ -12436,17 +11705,6 @@ istanbul-lib-report@^3.0.0: make-dir "^3.0.0" supports-color "^7.1.0" -istanbul-lib-source-maps@^3.0.1: - version "3.0.6" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" - integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - rimraf "^2.6.3" - source-map "^0.6.1" - istanbul-lib-source-maps@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" @@ -12456,13 +11714,6 @@ istanbul-lib-source-maps@^4.0.0: istanbul-lib-coverage "^3.0.0" source-map "^0.6.1" -istanbul-reports@^2.2.6: - version "2.2.7" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz#5d939f6237d7b48393cc0959eab40cd4fd056931" - integrity sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg== - dependencies: - html-escaper "^2.0.0" - istanbul-reports@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.0.tgz#d4d16d035db99581b6194e119bbf36c963c5eb70" @@ -12489,15 +11740,6 @@ java-properties@^1.0.0: resolved "https://registry.npmjs.org/java-properties/-/java-properties-1.0.2.tgz#ccd1fa73907438a5b5c38982269d0e771fe78211" integrity sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ== -jest-changed-files@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz#08d8c15eb79a7fa3fc98269bc14b451ee82f8039" - integrity sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg== - dependencies: - "@jest/types" "^24.9.0" - execa "^1.0.0" - throat "^4.0.0" - jest-changed-files@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-25.1.0.tgz#73dae9a7d9949fdfa5c278438ce8f2ff3ec78131" @@ -12507,25 +11749,6 @@ jest-changed-files@^25.1.0: execa "^3.2.0" throat "^5.0.0" -jest-cli@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz#ad2de62d07472d419c6abc301fc432b98b10d2af" - integrity sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg== - dependencies: - "@jest/core" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - exit "^0.1.2" - import-local "^2.0.0" - is-ci "^2.0.0" - jest-config "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - prompts "^2.0.1" - realpath-native "^1.1.0" - yargs "^13.3.0" - jest-cli@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-25.1.0.tgz#75f0b09cf6c4f39360906bf78d580be1048e4372" @@ -12545,29 +11768,6 @@ jest-cli@^25.1.0: realpath-native "^1.1.0" yargs "^15.0.0" -jest-config@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz#fb1bbc60c73a46af03590719efa4825e6e4dd1b5" - integrity sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^24.9.0" - "@jest/types" "^24.9.0" - babel-jest "^24.9.0" - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^24.9.0" - jest-environment-node "^24.9.0" - jest-get-type "^24.9.0" - jest-jasmine2 "^24.9.0" - jest-regex-util "^24.3.0" - jest-resolve "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - micromatch "^3.1.10" - pretty-format "^24.9.0" - realpath-native "^1.1.0" - jest-config@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-config/-/jest-config-25.1.0.tgz#d114e4778c045d3ef239452213b7ad3ec1cbea90" @@ -12618,13 +11818,6 @@ jest-diff@^25.1.0, jest-diff@^25.2.1: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-docblock@^24.3.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz#7970201802ba560e1c4092cc25cbedf5af5a8ce2" - integrity sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA== - dependencies: - detect-newline "^2.1.0" - jest-docblock@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-25.1.0.tgz#0f44bea3d6ca6dfc38373d465b347c8818eccb64" @@ -12632,17 +11825,6 @@ jest-docblock@^25.1.0: dependencies: detect-newline "^3.0.0" -jest-each@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz#eb2da602e2a610898dbc5f1f6df3ba86b55f8b05" - integrity sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog== - dependencies: - "@jest/types" "^24.9.0" - chalk "^2.0.1" - jest-get-type "^24.9.0" - jest-util "^24.9.0" - pretty-format "^24.9.0" - jest-each@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-each/-/jest-each-25.1.0.tgz#a6b260992bdf451c2d64a0ccbb3ac25e9b44c26a" @@ -12654,30 +11836,6 @@ jest-each@^25.1.0: jest-util "^25.1.0" pretty-format "^25.1.0" -jest-environment-jsdom-fourteen@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/jest-environment-jsdom-fourteen/-/jest-environment-jsdom-fourteen-1.0.1.tgz#4cd0042f58b4ab666950d96532ecb2fc188f96fb" - integrity sha512-DojMX1sY+at5Ep+O9yME34CdidZnO3/zfPh8UW+918C5fIZET5vCjfkegixmsi7AtdYfkr4bPlIzmWnlvQkP7Q== - dependencies: - "@jest/environment" "^24.3.0" - "@jest/fake-timers" "^24.3.0" - "@jest/types" "^24.3.0" - jest-mock "^24.0.0" - jest-util "^24.0.0" - jsdom "^14.1.0" - -jest-environment-jsdom@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz#4b0806c7fc94f95edb369a69cc2778eec2b7375b" - integrity sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA== - dependencies: - "@jest/environment" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/types" "^24.9.0" - jest-mock "^24.9.0" - jest-util "^24.9.0" - jsdom "^11.5.1" - jest-environment-jsdom@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-25.1.0.tgz#6777ab8b3e90fd076801efd3bff8e98694ab43c3" @@ -12690,17 +11848,6 @@ jest-environment-jsdom@^25.1.0: jest-util "^25.1.0" jsdom "^15.1.1" -jest-environment-node@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz#333d2d2796f9687f2aeebf0742b519f33c1cbfd3" - integrity sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA== - dependencies: - "@jest/environment" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/types" "^24.9.0" - jest-mock "^24.9.0" - jest-util "^24.9.0" - jest-environment-node@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-25.1.0.tgz#797bd89b378cf0bd794dc8e3dca6ef21126776db" @@ -12743,25 +11890,6 @@ jest-get-type@^25.2.6: resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== -jest-haste-map@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" - integrity sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ== - dependencies: - "@jest/types" "^24.9.0" - anymatch "^2.0.0" - fb-watchman "^2.0.0" - graceful-fs "^4.1.15" - invariant "^2.2.4" - jest-serializer "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.9.0" - micromatch "^3.1.10" - sane "^4.0.3" - walker "^1.0.7" - optionalDependencies: - fsevents "^1.2.7" - jest-haste-map@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-25.1.0.tgz#ae12163d284f19906260aa51fd405b5b2e5a4ad3" @@ -12780,28 +11908,6 @@ jest-haste-map@^25.1.0: optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz#1f7b1bd3242c1774e62acabb3646d96afc3be6a0" - integrity sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^24.9.0" - is-generator-fn "^2.0.0" - jest-each "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-runtime "^24.9.0" - jest-snapshot "^24.9.0" - jest-util "^24.9.0" - pretty-format "^24.9.0" - throat "^4.0.0" - jest-jasmine2@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-25.1.0.tgz#681b59158a430f08d5d0c1cce4f01353e4b48137" @@ -12836,14 +11942,6 @@ jest-junit@^10.0.0: uuid "^3.3.3" xml "^1.0.1" -jest-leak-detector@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz#b665dea7c77100c5c4f7dfcb153b65cf07dcf96a" - integrity sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA== - dependencies: - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - jest-leak-detector@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-25.1.0.tgz#ed6872d15aa1c72c0732d01bd073dacc7c38b5c6" @@ -12852,7 +11950,7 @@ jest-leak-detector@^25.1.0: jest-get-type "^25.1.0" pretty-format "^25.1.0" -jest-matcher-utils@^24.0.0, jest-matcher-utils@^24.9.0: +jest-matcher-utils@^24.0.0: version "24.9.0" resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073" integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== @@ -12872,20 +11970,6 @@ jest-matcher-utils@^25.1.0: jest-get-type "^25.1.0" pretty-format "^25.1.0" -jest-message-util@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" - integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/stack-utils" "^1.0.1" - chalk "^2.0.1" - micromatch "^3.1.10" - slash "^2.0.0" - stack-utils "^1.0.1" - jest-message-util@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-25.1.0.tgz#702a9a5cb05c144b9aa73f06e17faa219389845e" @@ -12900,13 +11984,6 @@ jest-message-util@^25.1.0: slash "^3.0.0" stack-utils "^1.0.1" -jest-mock@^24.0.0, jest-mock@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" - integrity sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w== - dependencies: - "@jest/types" "^24.9.0" - jest-mock@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-25.1.0.tgz#411d549e1b326b7350b2e97303a64715c28615fd" @@ -12919,25 +11996,11 @@ jest-pnp-resolver@^1.2.1: resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-regex-util@^24.3.0, jest-regex-util@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636" - integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== - jest-regex-util@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-25.1.0.tgz#efaf75914267741838e01de24da07b2192d16d87" integrity sha512-9lShaDmDpqwg+xAd73zHydKrBbbrIi08Kk9YryBEBybQFg/lBWR/2BDjjiSE7KIppM9C5+c03XiDaZ+m4Pgs1w== -jest-resolve-dependencies@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz#ad055198959c4cfba8a4f066c673a3f0786507ab" - integrity sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g== - dependencies: - "@jest/types" "^24.9.0" - jest-regex-util "^24.3.0" - jest-snapshot "^24.9.0" - jest-resolve-dependencies@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-25.1.0.tgz#8a1789ec64eb6aaa77fd579a1066a783437e70d2" @@ -12947,17 +12010,6 @@ jest-resolve-dependencies@^25.1.0: jest-regex-util "^25.1.0" jest-snapshot "^25.1.0" -jest-resolve@24.9.0, jest-resolve@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz#dff04c7687af34c4dd7e524892d9cf77e5d17321" - integrity sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ== - dependencies: - "@jest/types" "^24.9.0" - browser-resolve "^1.11.3" - chalk "^2.0.1" - jest-pnp-resolver "^1.2.1" - realpath-native "^1.1.0" - jest-resolve@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-25.1.0.tgz#23d8b6a4892362baf2662877c66aa241fa2eaea3" @@ -12969,31 +12021,6 @@ jest-resolve@^25.1.0: jest-pnp-resolver "^1.2.1" realpath-native "^1.1.0" -jest-runner@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz#574fafdbd54455c2b34b4bdf4365a23857fcdf42" - integrity sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg== - dependencies: - "@jest/console" "^24.7.1" - "@jest/environment" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.4.2" - exit "^0.1.2" - graceful-fs "^4.1.15" - jest-config "^24.9.0" - jest-docblock "^24.3.0" - jest-haste-map "^24.9.0" - jest-jasmine2 "^24.9.0" - jest-leak-detector "^24.9.0" - jest-message-util "^24.9.0" - jest-resolve "^24.9.0" - jest-runtime "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.6.0" - source-map-support "^0.5.6" - throat "^4.0.0" - jest-runner@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-25.1.0.tgz#fef433a4d42c89ab0a6b6b268e4a4fbe6b26e812" @@ -13019,35 +12046,6 @@ jest-runner@^25.1.0: source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz#9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac" - integrity sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw== - dependencies: - "@jest/console" "^24.7.1" - "@jest/environment" "^24.9.0" - "@jest/source-map" "^24.3.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/yargs" "^13.0.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.1.15" - jest-config "^24.9.0" - jest-haste-map "^24.9.0" - jest-message-util "^24.9.0" - jest-mock "^24.9.0" - jest-regex-util "^24.3.0" - jest-resolve "^24.9.0" - jest-snapshot "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - realpath-native "^1.1.0" - slash "^2.0.0" - strip-bom "^3.0.0" - yargs "^13.3.0" - jest-runtime@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-25.1.0.tgz#02683218f2f95aad0f2ec1c9cdb28c1dc0ec0314" @@ -13079,35 +12077,11 @@ jest-runtime@^25.1.0: strip-bom "^4.0.0" yargs "^15.0.0" -jest-serializer@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" - integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== - jest-serializer@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-25.1.0.tgz#73096ba90e07d19dec4a0c1dd89c355e2f129e5d" integrity sha512-20Wkq5j7o84kssBwvyuJ7Xhn7hdPeTXndnwIblKDR2/sy1SUm6rWWiG9kSCgJPIfkDScJCIsTtOKdlzfIHOfKA== -jest-snapshot@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz#ec8e9ca4f2ec0c5c87ae8f925cf97497b0e951ba" - integrity sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew== - dependencies: - "@babel/types" "^7.0.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - expect "^24.9.0" - jest-diff "^24.9.0" - jest-get-type "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-resolve "^24.9.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^24.9.0" - semver "^6.2.0" - jest-snapshot@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-25.1.0.tgz#d5880bd4b31faea100454608e15f8d77b9d221d9" @@ -13127,24 +12101,6 @@ jest-snapshot@^25.1.0: pretty-format "^25.1.0" semver "^7.1.1" -jest-util@^24.0.0, jest-util@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" - integrity sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg== - dependencies: - "@jest/console" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/source-map" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - callsites "^3.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.15" - is-ci "^2.0.0" - mkdirp "^0.5.1" - slash "^2.0.0" - source-map "^0.6.0" - jest-util@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-util/-/jest-util-25.1.0.tgz#7bc56f7b2abd534910e9fa252692f50624c897d9" @@ -13179,32 +12135,6 @@ jest-validate@^25.1.0: leven "^3.1.0" pretty-format "^25.1.0" -jest-watch-typeahead@0.4.2: - version "0.4.2" - resolved "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.4.2.tgz#e5be959698a7fa2302229a5082c488c3c8780a4a" - integrity sha512-f7VpLebTdaXs81rg/oj4Vg/ObZy2QtGzAmGLNsqUS5G5KtSN68tFcIsbvNODfNyQxU78g7D8x77o3bgfBTR+2Q== - dependencies: - ansi-escapes "^4.2.1" - chalk "^2.4.1" - jest-regex-util "^24.9.0" - jest-watcher "^24.3.0" - slash "^3.0.0" - string-length "^3.1.0" - strip-ansi "^5.0.0" - -jest-watcher@^24.3.0, jest-watcher@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz#4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b" - integrity sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw== - dependencies: - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/yargs" "^13.0.0" - ansi-escapes "^3.0.0" - chalk "^2.0.1" - jest-util "^24.9.0" - string-length "^2.0.0" - jest-watcher@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-25.1.0.tgz#97cb4a937f676f64c9fad2d07b824c56808e9806" @@ -13217,14 +12147,6 @@ jest-watcher@^25.1.0: jest-util "^25.1.0" string-length "^3.1.0" -jest-worker@^24.6.0, jest-worker@^24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" - integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== - dependencies: - merge-stream "^2.0.0" - supports-color "^6.1.0" - jest-worker@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-25.1.0.tgz#75d038bad6fdf58eba0d2ec1835856c497e3907a" @@ -13233,14 +12155,6 @@ jest-worker@^25.1.0: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@24.9.0: - version "24.9.0" - resolved "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz#987d290c05a08b52c56188c1002e368edb007171" - integrity sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw== - dependencies: - import-local "^2.0.0" - jest-cli "^24.9.0" - jest@^25.1.0: version "25.1.0" resolved "https://registry.npmjs.org/jest/-/jest-25.1.0.tgz#b85ef1ddba2fdb00d295deebbd13567106d35be9" @@ -13265,7 +12179,7 @@ js-tokens@^3.0.2: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.13.1: +js-yaml@^3.13.1, js-yaml@^3.8.3: version "3.13.1" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -13278,7 +12192,7 @@ jsbn@~0.1.0: resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@11.12.0, jsdom@^11.5.1: +jsdom@11.12.0: version "11.12.0" resolved "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== @@ -13310,38 +12224,6 @@ jsdom@11.12.0, jsdom@^11.5.1: ws "^5.2.0" xml-name-validator "^3.0.0" -jsdom@^14.1.0: - version "14.1.0" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-14.1.0.tgz#916463b6094956b0a6c1782c94e380cd30e1981b" - integrity sha512-O901mfJSuTdwU2w3Sn+74T+RnDVP+FuV5fH8tcPWyqrseRAb0s5xOtPgCFiPOtLcyK7CLIJwPyD83ZqQWvA5ng== - dependencies: - abab "^2.0.0" - acorn "^6.0.4" - acorn-globals "^4.3.0" - array-equal "^1.0.0" - cssom "^0.3.4" - cssstyle "^1.1.1" - data-urls "^1.1.0" - domexception "^1.0.1" - escodegen "^1.11.0" - html-encoding-sniffer "^1.0.2" - nwsapi "^2.1.3" - parse5 "5.1.0" - pn "^1.1.0" - request "^2.88.0" - request-promise-native "^1.0.5" - saxes "^3.1.9" - symbol-tree "^3.2.2" - tough-cookie "^2.5.0" - w3c-hr-time "^1.0.1" - w3c-xmlserializer "^1.1.2" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^7.0.0" - ws "^6.1.2" - xml-name-validator "^3.0.0" - jsdom@^15.1.1: version "15.2.1" resolved "https://registry.npmjs.org/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" @@ -13409,13 +12291,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -13468,11 +12343,6 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -13648,14 +12518,6 @@ kuler@1.0.x: dependencies: colornames "^1.1.1" -last-call-webpack-plugin@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz#9742df0e10e3cf46e5c0381c2de90d3a7a2d7555" - integrity sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w== - dependencies: - lodash "^4.17.5" - webpack-sources "^1.1.0" - latest-version@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" @@ -14048,14 +12910,6 @@ load-json-file@^5.3.0: strip-bom "^3.0.0" type-fest "^0.3.0" -loader-fs-cache@^1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.3.tgz#f08657646d607078be2f0a032f8bd69dd6f277d9" - integrity sha512-ldcgZpjNJj71n+2Mf6yetz+c9bM4xpKtNds4LbqXzU/PTdeAX0g3ytnU1AJMEcTk2Lex4Smpe3Q/eCTsvUBxbA== - dependencies: - find-cache-dir "^0.1.1" - mkdirp "^0.5.1" - loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -14080,7 +12934,7 @@ loader-utils@^0.2.16: json5 "^0.5.0" object-assign "^4.0.1" -loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: +loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.4.0" resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -14089,6 +12943,15 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4 emojis-list "^3.0.0" json5 "^1.0.1" +loader-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -14231,7 +13094,7 @@ lodash.sortby@^4.7.0: resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash.template@^4.0.2, lodash.template@^4.4.0, lodash.template@^4.5.0: +lodash.template@^4.0.2, lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== @@ -14276,7 +13139,7 @@ lodash.without@~4.4.0: resolved "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@4.17.15, "lodash@>=3.5 <5", lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: +lodash@4.17.15, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.1: version "4.17.15" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -14470,11 +13333,6 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -mamacro@^0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" - integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== - map-age-cleaner@^0.1.1: version "0.1.3" resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" @@ -14786,6 +13644,11 @@ mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.26" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" @@ -14793,6 +13656,13 @@ mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: dependencies: mime-db "1.43.0" +mime-types@^2.1.26: + version "2.1.27" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + mime@1.6.0, mime@^1.4.1: version "1.6.0" resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -14838,16 +13708,6 @@ mini-create-react-context@^0.4.0: "@babel/runtime" "^7.5.5" tiny-warning "^1.0.3" -mini-css-extract-plugin@0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz#47f2cf07aa165ab35733b1fc97d4c46c0564339e" - integrity sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A== - dependencies: - loader-utils "^1.1.0" - normalize-url "1.9.1" - schema-utils "^1.0.0" - webpack-sources "^1.1.0" - mini-css-extract-plugin@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.7.0.tgz#5ba8290fbb4179a43dd27cca444ba150bee743a0" @@ -15160,11 +14020,6 @@ nerf-dart@^1.0.0: resolved "https://registry.npmjs.org/nerf-dart/-/nerf-dart-1.0.0.tgz#e6dab7febf5ad816ea81cf5c629c5a0ebde72c1a" integrity sha1-5tq3/r9a2Bbqgc9cYpxaDr3nLBo= -next-tick@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -15284,17 +14139,6 @@ node-modules-regexp@^1.0.0: resolved "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^5.4.2: - version "5.4.3" - resolved "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" - integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q== - dependencies: - growly "^1.3.0" - is-wsl "^1.1.0" - semver "^5.5.0" - shellwords "^0.1.1" - which "^1.3.0" - node-notifier@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/node-notifier/-/node-notifier-6.0.0.tgz#cea319e06baa16deec8ce5cd7f133c4a46b68e12" @@ -15680,7 +14524,7 @@ number-is-nan@^1.0.0: resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nwsapi@^2.0.7, nwsapi@^2.1.3, nwsapi@^2.2.0: +nwsapi@^2.0.7, nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== @@ -15704,11 +14548,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-hash@^2.0.1: - version "2.0.3" - resolved "https://registry.npmjs.org/object-hash/-/object-hash-2.0.3.tgz#d12db044e03cd2ca3d77c0570d87225b02e1e6ea" - integrity sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg== - object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" @@ -15724,11 +14563,6 @@ object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-path@0.11.4: - version "0.11.4" - resolved "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz#370ae752fbf37de3ea70a861c23bba8915691949" - integrity sha1-NwrnUvvzfePqcKhhwju6iRVpGUk= - object-visit@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -15902,14 +14736,6 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optimize-css-assets-webpack-plugin@5.0.3: - version "5.0.3" - resolved "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz#e2f1d4d94ad8c0af8967ebd7cf138dcb1ef14572" - integrity sha512-q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA== - dependencies: - cssnano "^4.1.10" - last-call-webpack-plugin "^3.0.0" - optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -16007,13 +14833,6 @@ p-defer@^1.0.0: resolved "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= -p-each-series@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" - integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E= - dependencies: - p-reduce "^1.0.0" - p-each-series@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" @@ -16569,13 +15388,6 @@ pkg-conf@^2.1.0: find-up "^2.0.0" load-json-file "^4.0.0" -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" - integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= - dependencies: - find-up "^1.0.0" - pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" @@ -16630,13 +15442,6 @@ pnp-webpack-plugin@1.5.0: dependencies: ts-pnp "^1.1.2" -pnp-webpack-plugin@1.6.4: - version "1.6.4" - resolved "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149" - integrity sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg== - dependencies: - ts-pnp "^1.1.6" - polished@^3.3.1: version "3.5.0" resolved "https://registry.npmjs.org/polished/-/polished-3.5.0.tgz#bffb0db79025c61d1f735f9bb77a379f5fc46345" @@ -16663,21 +15468,6 @@ posix-character-classes@^0.1.0: resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss-attribute-case-insensitive@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.2.tgz#d93e46b504589e94ac7277b0463226c68041a880" - integrity sha512-clkFxk/9pcdb4Vkn0hAHq3YnxBQ2p0CGD1dy24jN+reBck+EWxMbxSUqN4Yj7t0w8csl87K6p0gxBe1utkJsYA== - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^6.0.2" - -postcss-browser-comments@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-browser-comments/-/postcss-browser-comments-3.0.0.tgz#1248d2d935fb72053c8e1f61a84a57292d9f65e9" - integrity sha512-qfVjLfq7HFd2e0HW4s1dvU8X080OZdG46fFbIBFjW7US7YPDcWfRvdElvwMJr2LI6hMmD+7LnH2HcmXTs+uOig== - dependencies: - postcss "^7" - postcss-calc@^7.0.1: version "7.0.2" resolved "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.2.tgz#504efcd008ca0273120568b0792b16cdcde8aac1" @@ -16687,48 +15477,6 @@ postcss-calc@^7.0.1: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.2" -postcss-color-functional-notation@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-2.0.1.tgz#5efd37a88fbabeb00a2966d1e53d98ced93f74e0" - integrity sha512-ZBARCypjEDofW4P6IdPVTLhDNXPRn8T2s1zHbZidW6rPaaZvcnCS2soYFIQJrMZSxiePJ2XIYTlcb2ztr/eT2g== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-color-gray@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/postcss-color-gray/-/postcss-color-gray-5.0.0.tgz#532a31eb909f8da898ceffe296fdc1f864be8547" - integrity sha512-q6BuRnAGKM/ZRpfDascZlIZPjvwsRye7UDNalqVz3s7GDxMtqPY6+Q871liNxsonUw8oC61OG+PSaysYpl1bnw== - dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.5" - postcss-values-parser "^2.0.0" - -postcss-color-hex-alpha@^5.0.3: - version "5.0.3" - resolved "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-5.0.3.tgz#a8d9ca4c39d497c9661e374b9c51899ef0f87388" - integrity sha512-PF4GDel8q3kkreVXKLAGNpHKilXsZ6xuu+mOQMHWHLPNyjiUBOr75sp5ZKJfmv1MCus5/DWUGcK9hm6qHEnXYw== - dependencies: - postcss "^7.0.14" - postcss-values-parser "^2.0.1" - -postcss-color-mod-function@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/postcss-color-mod-function/-/postcss-color-mod-function-3.0.3.tgz#816ba145ac11cc3cb6baa905a75a49f903e4d31d" - integrity sha512-YP4VG+xufxaVtzV6ZmhEtc+/aTXH3d0JLpnYfxqTvwZPbJhWqp8bSY3nfNzNRFLgB4XSaBA82OE4VjOOKpCdVQ== - dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-color-rebeccapurple@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-4.0.1.tgz#c7a89be872bb74e45b1e3022bfe5748823e6de77" - integrity sha512-aAe3OhkS6qJXBbqzvZth2Au4V3KieR5sRQ4ptb2b2O8wgvB3SJBsdG+jsn2BZbbwekDG8nTfcCNKcSfe/lEy8g== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - postcss-colormin@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" @@ -16748,37 +15496,6 @@ postcss-convert-values@^4.0.1: postcss "^7.0.0" postcss-value-parser "^3.0.0" -postcss-custom-media@^7.0.8: - version "7.0.8" - resolved "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-7.0.8.tgz#fffd13ffeffad73621be5f387076a28b00294e0c" - integrity sha512-c9s5iX0Ge15o00HKbuRuTqNndsJUbaXdiNsksnVH8H4gdc+zbLzr/UasOwNG6CTDpLFekVY4672eWdiiWu2GUg== - dependencies: - postcss "^7.0.14" - -postcss-custom-properties@^8.0.11: - version "8.0.11" - resolved "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-8.0.11.tgz#2d61772d6e92f22f5e0d52602df8fae46fa30d97" - integrity sha512-nm+o0eLdYqdnJ5abAJeXp4CEU1c1k+eB2yMCvhgzsds/e0umabFrN6HoTy/8Q4K5ilxERdl/JD1LO5ANoYBeMA== - dependencies: - postcss "^7.0.17" - postcss-values-parser "^2.0.1" - -postcss-custom-selectors@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-5.1.2.tgz#64858c6eb2ecff2fb41d0b28c9dd7b3db4de7fba" - integrity sha512-DSGDhqinCqXqlS4R7KGxL1OSycd1lydugJ1ky4iRXPHdBRiozyMHrdu0H3o7qNOCiZwySZTUI5MV0T8QhCLu+w== - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" - -postcss-dir-pseudo-class@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-5.0.0.tgz#6e3a4177d0edb3abcc85fdb6fbb1c26dabaeaba2" - integrity sha512-3pm4oq8HYWMZePJY+5ANriPs3P07q+LW6FAdTlkFH2XqDdP4HeeJYMOzn0HYLhRSjBO3fhiqSwwU9xEULSrPgw== - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" - postcss-discard-comments@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" @@ -16807,29 +15524,6 @@ postcss-discard-overridden@^4.0.1: dependencies: postcss "^7.0.0" -postcss-double-position-gradients@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-1.0.0.tgz#fc927d52fddc896cb3a2812ebc5df147e110522e" - integrity sha512-G+nV8EnQq25fOI8CH/B6krEohGWnF5+3A6H/+JEpOncu5dCnkS1QQ6+ct3Jkaepw1NGVqqOZH6lqrm244mCftA== - dependencies: - postcss "^7.0.5" - postcss-values-parser "^2.0.0" - -postcss-env-function@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/postcss-env-function/-/postcss-env-function-2.0.2.tgz#0f3e3d3c57f094a92c2baf4b6241f0b0da5365d7" - integrity sha512-rwac4BuZlITeUbiBq60h/xbLzXY43qOsIErngWa4l7Mt+RaSkT7QBjXVGTcBHupykkblHMDrBFh30zchYPaOUw== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-flexbugs-fixes@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.1.0.tgz#e094a9df1783e2200b7b19f875dcad3b3aff8b20" - integrity sha512-jr1LHxQvStNNAHlgco6PzY308zvLklh7SJVYuWUwyUQncofaAlD2l+P/gxKHOdqWKe7xJSkVLFF/2Tp+JqMSZA== - dependencies: - postcss "^7.0.0" - postcss-flexbugs-fixes@^4.1.0: version "4.2.0" resolved "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.0.tgz#662b3dcb6354638b9213a55eed8913bcdc8d004a" @@ -16837,59 +15531,6 @@ postcss-flexbugs-fixes@^4.1.0: dependencies: postcss "^7.0.26" -postcss-focus-visible@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-focus-visible/-/postcss-focus-visible-4.0.0.tgz#477d107113ade6024b14128317ade2bd1e17046e" - integrity sha512-Z5CkWBw0+idJHSV6+Bgf2peDOFf/x4o+vX/pwcNYrWpXFrSfTkQ3JQ1ojrq9yS+upnAlNRHeg8uEwFTgorjI8g== - dependencies: - postcss "^7.0.2" - -postcss-focus-within@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-3.0.0.tgz#763b8788596cee9b874c999201cdde80659ef680" - integrity sha512-W0APui8jQeBKbCGZudW37EeMCjDeVxKgiYfIIEo8Bdh5SpB9sxds/Iq8SEuzS0Q4YFOlG7EPFulbbxujpkrV2w== - dependencies: - postcss "^7.0.2" - -postcss-font-variant@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-4.0.0.tgz#71dd3c6c10a0d846c5eda07803439617bbbabacc" - integrity sha512-M8BFYKOvCrI2aITzDad7kWuXXTm0YhGdP9Q8HanmN4EF1Hmcgs1KK5rSHylt/lUJe8yLxiSwWAHdScoEiIxztg== - dependencies: - postcss "^7.0.2" - -postcss-gap-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-2.0.0.tgz#431c192ab3ed96a3c3d09f2ff615960f902c1715" - integrity sha512-QZSqDaMgXCHuHTEzMsS2KfVDOq7ZFiknSpkrPJY6jmxbugUPTuSzs/vuE5I3zv0WAS+3vhrlqhijiprnuQfzmg== - dependencies: - postcss "^7.0.2" - -postcss-image-set-function@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/postcss-image-set-function/-/postcss-image-set-function-3.0.1.tgz#28920a2f29945bed4c3198d7df6496d410d3f288" - integrity sha512-oPTcFFip5LZy8Y/whto91L9xdRHCWEMs3e1MdJxhgt4jy2WYXfhkng59fH5qLXSCPN8k4n94p1Czrfe5IOkKUw== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-initial@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/postcss-initial/-/postcss-initial-3.0.2.tgz#f018563694b3c16ae8eaabe3c585ac6319637b2d" - integrity sha512-ugA2wKonC0xeNHgirR4D3VWHs2JcU08WAi1KFLVcnb7IN89phID6Qtg2RIctWbnvp1TM2BOmDtX8GGLCKdR8YA== - dependencies: - lodash.template "^4.5.0" - postcss "^7.0.2" - -postcss-lab-function@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz#bb51a6856cd12289ab4ae20db1e3821ef13d7d2e" - integrity sha512-whLy1IeZKY+3fYdqQFuDBf8Auw+qFuVnChWjmxm/UhHWqNHZx+B99EwxTvGYmUBqe3Fjxs4L1BoZTJmPu6usVg== - dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - postcss-load-config@^2.0.0, postcss-load-config@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" @@ -16898,7 +15539,7 @@ postcss-load-config@^2.0.0, postcss-load-config@^2.1.0: cosmiconfig "^5.0.0" import-cwd "^2.0.0" -postcss-loader@3.0.0, postcss-loader@^3.0.0: +postcss-loader@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" integrity sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA== @@ -16908,20 +15549,6 @@ postcss-loader@3.0.0, postcss-loader@^3.0.0: postcss-load-config "^2.0.0" schema-utils "^1.0.0" -postcss-logical@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-logical/-/postcss-logical-3.0.0.tgz#2495d0f8b82e9f262725f75f9401b34e7b45d5b5" - integrity sha512-1SUKdJc2vuMOmeItqGuNaC+N8MzBWFWEkAnRnLpFYj1tGGa7NqyVBujfRtgNa2gXR+6RkGUiB2O5Vmh7E2RmiA== - dependencies: - postcss "^7.0.2" - -postcss-media-minmax@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-4.0.0.tgz#b75bb6cbc217c8ac49433e12f22048814a4f5ed5" - integrity sha512-fo9moya6qyxsjbFAYl97qKO9gyre3qvbMnkOZeZwlsW6XYFsvs2DMGDlchVLfAd8LHPZDxivu/+qW2SMQeTHBw== - dependencies: - postcss "^7.0.2" - postcss-merge-longhand@^4.0.11: version "4.0.11" resolved "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" @@ -17024,7 +15651,7 @@ postcss-modules-scope@1.1.0: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" -postcss-modules-scope@^2.1.1: +postcss-modules-scope@^2.1.1, postcss-modules-scope@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== @@ -17059,13 +15686,6 @@ postcss-modules@^2.0.0: postcss "^7.0.1" string-hash "^1.1.1" -postcss-nesting@^7.0.0: - version "7.0.1" - resolved "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.1.tgz#b50ad7b7f0173e5b5e3880c3501344703e04c052" - integrity sha512-FrorPb0H3nuVq0Sff7W2rnc3SmIcruVC6YwpcS+k687VxyxO33iE1amna7wHuRVzM8vfiYofXSBHNAZ3QhLvYg== - dependencies: - postcss "^7.0.2" - postcss-normalize-charset@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" @@ -17147,17 +15767,6 @@ postcss-normalize-whitespace@^4.0.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" -postcss-normalize@8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/postcss-normalize/-/postcss-normalize-8.0.1.tgz#90e80a7763d7fdf2da6f2f0f82be832ce4f66776" - integrity sha512-rt9JMS/m9FHIRroDDBGSMsyW1c0fkvOJPy62ggxSHUldJO7B195TqFMqIf+lY5ezpDcYOV4j86aUp3/XbxzCCQ== - dependencies: - "@csstools/normalize.css" "^10.1.0" - browserslist "^4.6.2" - postcss "^7.0.17" - postcss-browser-comments "^3.0.0" - sanitize.css "^10.0.0" - postcss-ordered-values@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" @@ -17167,79 +15776,6 @@ postcss-ordered-values@^4.1.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" -postcss-overflow-shorthand@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-2.0.0.tgz#31ecf350e9c6f6ddc250a78f0c3e111f32dd4c30" - integrity sha512-aK0fHc9CBNx8jbzMYhshZcEv8LtYnBIRYQD5i7w/K/wS9c2+0NSR6B3OVMu5y0hBHYLcMGjfU+dmWYNKH0I85g== - dependencies: - postcss "^7.0.2" - -postcss-page-break@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-2.0.0.tgz#add52d0e0a528cabe6afee8b46e2abb277df46bf" - integrity sha512-tkpTSrLpfLfD9HvgOlJuigLuk39wVTbbd8RKcy8/ugV2bNBUW3xU+AIqyxhDrQr1VUj1RmyJrBn1YWrqUm9zAQ== - dependencies: - postcss "^7.0.2" - -postcss-place@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-place/-/postcss-place-4.0.1.tgz#e9f39d33d2dc584e46ee1db45adb77ca9d1dcc62" - integrity sha512-Zb6byCSLkgRKLODj/5mQugyuj9bvAAw9LqJJjgwz5cYryGeXfFZfSXoP1UfveccFmeq0b/2xxwcTEVScnqGxBg== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-preset-env@6.7.0: - version "6.7.0" - resolved "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz#c34ddacf8f902383b35ad1e030f178f4cdf118a5" - integrity sha512-eU4/K5xzSFwUFJ8hTdTQzo2RBLbDVt83QZrAvI07TULOkmyQlnYlpwep+2yIK+K+0KlZO4BvFcleOCCcUtwchg== - dependencies: - autoprefixer "^9.6.1" - browserslist "^4.6.4" - caniuse-lite "^1.0.30000981" - css-blank-pseudo "^0.1.4" - css-has-pseudo "^0.10.0" - css-prefers-color-scheme "^3.1.1" - cssdb "^4.4.0" - postcss "^7.0.17" - postcss-attribute-case-insensitive "^4.0.1" - postcss-color-functional-notation "^2.0.1" - postcss-color-gray "^5.0.0" - postcss-color-hex-alpha "^5.0.3" - postcss-color-mod-function "^3.0.3" - postcss-color-rebeccapurple "^4.0.1" - postcss-custom-media "^7.0.8" - postcss-custom-properties "^8.0.11" - postcss-custom-selectors "^5.1.2" - postcss-dir-pseudo-class "^5.0.0" - postcss-double-position-gradients "^1.0.0" - postcss-env-function "^2.0.2" - postcss-focus-visible "^4.0.0" - postcss-focus-within "^3.0.0" - postcss-font-variant "^4.0.0" - postcss-gap-properties "^2.0.0" - postcss-image-set-function "^3.0.1" - postcss-initial "^3.0.0" - postcss-lab-function "^2.0.1" - postcss-logical "^3.0.0" - postcss-media-minmax "^4.0.0" - postcss-nesting "^7.0.0" - postcss-overflow-shorthand "^2.0.0" - postcss-page-break "^2.0.0" - postcss-place "^4.0.1" - postcss-pseudo-class-any-link "^6.0.0" - postcss-replace-overflow-wrap "^3.0.0" - postcss-selector-matches "^4.0.0" - postcss-selector-not "^4.0.0" - -postcss-pseudo-class-any-link@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-6.0.0.tgz#2ed3eed393b3702879dec4a87032b210daeb04d1" - integrity sha512-lgXW9sYJdLqtmw23otOzrtbDXofUdfYzNm4PIpNE322/swES3VU9XlXHeJS46zT2onFO7V1QFdD4Q9LiZj8mew== - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" - postcss-reduce-initial@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" @@ -17260,36 +15796,6 @@ postcss-reduce-transforms@^4.0.2: postcss "^7.0.0" postcss-value-parser "^3.0.0" -postcss-replace-overflow-wrap@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-3.0.0.tgz#61b360ffdaedca84c7c918d2b0f0d0ea559ab01c" - integrity sha512-2T5hcEHArDT6X9+9dVSPQdo7QHzG4XKclFT8rU5TzJPDN7RIRTbO9c4drUISOVemLj03aezStHCR2AIcr8XLpw== - dependencies: - postcss "^7.0.2" - -postcss-safe-parser@4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.1.tgz#8756d9e4c36fdce2c72b091bbc8ca176ab1fcdea" - integrity sha512-xZsFA3uX8MO3yAda03QrG3/Eg1LN3EPfjjf07vke/46HERLZyHrTsQ9E1r1w1W//fWEhtYNndo2hQplN2cVpCQ== - dependencies: - postcss "^7.0.0" - -postcss-selector-matches@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-selector-matches/-/postcss-selector-matches-4.0.0.tgz#71c8248f917ba2cc93037c9637ee09c64436fcff" - integrity sha512-LgsHwQR/EsRYSqlwdGzeaPKVT0Ml7LAT6E75T8W8xLJY62CE4S/l03BWIt3jT8Taq22kXP08s2SfTSzaraoPww== - dependencies: - balanced-match "^1.0.0" - postcss "^7.0.2" - -postcss-selector-not@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-4.0.0.tgz#c68ff7ba96527499e832724a2674d65603b645c0" - integrity sha512-W+bkBZRhqJaYN8XAnbbZPLWMvZD1wKTu0UxtFKdhtGjWYmxhkUneoeOhRJKdAE5V7ZTlnbHfCR+6bNwK9e1dTQ== - dependencies: - balanced-match "^1.0.0" - postcss "^7.0.2" - postcss-selector-parser@^3.0.0: version "3.1.2" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" @@ -17299,15 +15805,6 @@ postcss-selector-parser@^3.0.0: indexes-of "^1.0.1" uniq "^1.0.1" -postcss-selector-parser@^5.0.0-rc.3, postcss-selector-parser@^5.0.0-rc.4: - version "5.0.0" - resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" - integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ== - dependencies: - cssesc "^2.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" - postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" @@ -17346,16 +15843,12 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== -postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" - integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg== - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" +postcss-value-parser@^4.0.3: + version "4.1.0" + resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -"postcss@5 - 7", postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.23, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: +"postcss@5 - 7", postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.23, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: version "7.0.27" resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== @@ -17373,15 +15866,6 @@ postcss@6.0.1: source-map "^0.5.6" supports-color "^3.2.3" -postcss@7.0.21: - version "7.0.21" - resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" - integrity sha512-uIFtJElxJo29QC753JzhidoAhvp/e/Exezkdhfmt8AymWT6/5B7W1WmponYWkHk2eg6sONyTch0A3nkMPun3SQ== - dependencies: - chalk "^2.4.2" - source-map "^0.6.1" - supports-color "^6.1.0" - postcss@^6.0.1: version "6.0.23" resolved "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" @@ -17416,7 +15900,7 @@ prettier@^2.0.5: resolved "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== -pretty-bytes@5.3.0, pretty-bytes@^5.1.0: +pretty-bytes@5.3.0: version "5.3.0" resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz#f2849e27db79fb4d6cfe24764fc4134f165989f2" integrity sha512-hjGrh+P926p4R4WbaB6OckyRtO0F0/lQBiT+0gnxjV+5kjPBrfVBFCsCLbMqVQeydvIoouYTCmmEURiH3R1Bdg== @@ -17531,13 +16015,6 @@ promise.series@^0.2.0: resolved "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" integrity sha1-LMfr6Vn8OmYZwEq029yeRS2GS70= -promise@^8.0.3: - version "8.1.0" - resolved "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" - integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== - dependencies: - asap "~2.0.6" - prompts@^2.0.1: version "2.3.2" resolved "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz#480572d89ecf39566d2bd3fe2c9fccb7c4c0b068" @@ -17757,13 +16234,6 @@ raf-schd@^4.0.0: resolved "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.2.tgz#bd44c708188f2e84c810bf55fcea9231bcaed8a0" integrity sha512-VhlMZmGy6A6hrkJWHLNTGl5gtgMUm+xfGza6wbwnE914yeQ5Ybm18vgM734RZhMgfw4tacUrWseGZlpUrrakEQ== -raf@^3.4.1: - version "3.4.1" - resolved "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" - integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== - dependencies: - performance-now "^2.1.0" - ramda@0.26.1, ramda@^0.26: version "0.26.1" resolved "https://registry.npmjs.org/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" @@ -17812,6 +16282,14 @@ raw-loader@^3.1.0: loader-utils "^1.1.0" schema-utils "^2.0.1" +raw-loader@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.1.tgz#14e1f726a359b68437e183d5a5b7d33a3eba6933" + integrity sha512-baolhQBSi3iNh1cglJjA0mYzga+wePk7vdEX//1dTFd+v4TsQlQE0jitJSNF1OIP82rdYulH7otaVmdlDaJ64A== + dependencies: + loader-utils "^2.0.0" + schema-utils "^2.6.5" + rc-progress@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/rc-progress/-/rc-progress-3.0.0.tgz#cea324ce8fc31421cd815d94a4649a8a29f8f8db" @@ -17834,18 +16312,6 @@ react-addons-text-content@0.0.4: resolved "https://registry.npmjs.org/react-addons-text-content/-/react-addons-text-content-0.0.4.tgz#d2e259fdc951d1d8906c08902002108dce8792e5" integrity sha1-0uJZ/clR0diQbAiQIAIQjc6HkuU= -react-app-polyfill@^1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.6.tgz#890f8d7f2842ce6073f030b117de9130a5f385f0" - integrity sha512-OfBnObtnGgLGfweORmdZbyEz+3dgVePQBb3zipiaDsMHV1NpWm0rDFYIVXFV/AK+x4VIIfWHhrdMIeoTLyRr2g== - dependencies: - core-js "^3.5.0" - object-assign "^4.1.1" - promise "^8.0.3" - raf "^3.4.1" - regenerator-runtime "^0.13.3" - whatwg-fetch "^3.0.0" - react-beautiful-dnd@11.0.3: version "11.0.3" resolved "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-11.0.3.tgz#5678bb3e725d8b56cb7cf57f56e952105fc4f2af" @@ -17867,7 +16333,7 @@ react-clientside-effect@^1.2.2: dependencies: "@babel/runtime" "^7.0.0" -react-dev-utils@^10.2.0, react-dev-utils@^10.2.1: +react-dev-utils@^10.2.0: version "10.2.1" resolved "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-10.2.1.tgz#f6de325ae25fa4d546d09df4bb1befdc6dd19c19" integrity sha512-XxTbgJnYZmxuPtY3y/UV0D8/65NKkmaia4rXzViknVnZeVlklSh8u6TnaEYPfAi/Gh1TP4mEOXHI6jQOPbeakQ== @@ -18128,66 +16594,6 @@ react-router@5.2.0, react-router@^5.2.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-scripts@^3.4.1: - version "3.4.1" - resolved "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.1.tgz#f551298b5c71985cc491b9acf3c8e8c0ae3ada0a" - integrity sha512-JpTdi/0Sfd31mZA6Ukx+lq5j1JoKItX7qqEK4OiACjVQletM1P38g49d9/D0yTxp9FrSF+xpJFStkGgKEIRjlQ== - dependencies: - "@babel/core" "7.9.0" - "@svgr/webpack" "4.3.3" - "@typescript-eslint/eslint-plugin" "^2.10.0" - "@typescript-eslint/parser" "^2.10.0" - babel-eslint "10.1.0" - babel-jest "^24.9.0" - babel-loader "8.1.0" - babel-plugin-named-asset-import "^0.3.6" - babel-preset-react-app "^9.1.2" - camelcase "^5.3.1" - case-sensitive-paths-webpack-plugin "2.3.0" - css-loader "3.4.2" - dotenv "8.2.0" - dotenv-expand "5.1.0" - eslint "^6.6.0" - eslint-config-react-app "^5.2.1" - eslint-loader "3.0.3" - eslint-plugin-flowtype "4.6.0" - eslint-plugin-import "2.20.1" - eslint-plugin-jsx-a11y "6.2.3" - eslint-plugin-react "7.19.0" - eslint-plugin-react-hooks "^1.6.1" - file-loader "4.3.0" - fs-extra "^8.1.0" - html-webpack-plugin "4.0.0-beta.11" - identity-obj-proxy "3.0.0" - jest "24.9.0" - jest-environment-jsdom-fourteen "1.0.1" - jest-resolve "24.9.0" - jest-watch-typeahead "0.4.2" - mini-css-extract-plugin "0.9.0" - optimize-css-assets-webpack-plugin "5.0.3" - pnp-webpack-plugin "1.6.4" - postcss-flexbugs-fixes "4.1.0" - postcss-loader "3.0.0" - postcss-normalize "8.0.1" - postcss-preset-env "6.7.0" - postcss-safe-parser "4.0.1" - react-app-polyfill "^1.0.6" - react-dev-utils "^10.2.1" - resolve "1.15.0" - resolve-url-loader "3.1.1" - sass-loader "8.0.2" - semver "6.3.0" - style-loader "0.23.1" - terser-webpack-plugin "2.3.5" - ts-pnp "1.1.6" - url-loader "2.3.0" - webpack "4.42.0" - webpack-dev-server "3.10.3" - webpack-manifest-plugin "2.2.0" - workbox-webpack-plugin "4.3.1" - optionalDependencies: - fsevents "2.1.2" - react-side-effect@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.2.0.tgz#0e940c78faba0c73b9b0eba9cd3dda8dfb7e7dae" @@ -18346,14 +16752,6 @@ read-pkg-up@^3.0.0: find-up "^2.0.0" read-pkg "^3.0.0" -read-pkg-up@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" - integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== - dependencies: - find-up "^3.0.0" - read-pkg "^3.0.0" - read-pkg-up@^7.0.0, read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" @@ -18592,11 +16990,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regex-parser@2.2.10: - version "2.2.10" - resolved "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.10.tgz#9e66a8f73d89a107616e63b39d4deddfee912b37" - integrity sha512-8t6074A68gHfU8Neftl0Le6KTDwfGAj7IyjPIMSfikI2wJUTHDMaIq42bUsfVnj8mhx0R+45rdUXHGpN164avA== - regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" @@ -18864,22 +17257,6 @@ resolve-pathname@^3.0.0: resolved "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== -resolve-url-loader@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.1.tgz#28931895fa1eab9be0647d3b2958c100ae3c0bf0" - integrity sha512-K1N5xUjj7v0l2j/3Sgs5b8CjrrgtC70SmdCuZiJ8tSyb5J+uk3FoeZ4b7yTnH6j7ngI+Bc5bldHJIa8hYdu2gQ== - dependencies: - adjust-sourcemap-loader "2.0.0" - camelcase "5.3.1" - compose-function "3.0.3" - convert-source-map "1.7.0" - es6-iterator "2.0.3" - loader-utils "1.2.3" - postcss "7.0.21" - rework "1.0.1" - rework-visit "1.0.0" - source-map "0.6.1" - resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -18890,13 +17267,6 @@ resolve@1.1.7: resolved "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.15.0: - version "1.15.0" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" - integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== - dependencies: - path-parse "^1.0.6" - resolve@1.15.1: version "1.15.1" resolved "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" @@ -18904,7 +17274,7 @@ resolve@1.15.1: dependencies: path-parse "^1.0.6" -resolve@1.x, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.16.1, resolve@^1.3.2, resolve@^1.8.1: +resolve@1.x, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.15.1, resolve@^1.16.1, resolve@^1.3.2: version "1.17.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -18962,19 +17332,6 @@ reusify@^1.0.4: resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rework-visit@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/rework-visit/-/rework-visit-1.0.0.tgz#9945b2803f219e2f7aca00adb8bc9f640f842c9a" - integrity sha1-mUWygD8hni96ygCtuLyfZA+ELJo= - -rework@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz#30806a841342b54510aa4110850cd48534144aa7" - integrity sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc= - dependencies: - convert-source-map "^0.3.3" - css "^2.0.0" - rgb-regex@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" @@ -19200,22 +17557,6 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sanitize.css@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/sanitize.css/-/sanitize.css-10.0.0.tgz#b5cb2547e96d8629a60947544665243b1dc3657a" - integrity sha512-vTxrZz4dX5W86M6oVWVdOVe72ZiPs41Oi7Z6Km4W5Turyz28mrXSJhhEBZoRtzJWIv3833WKVwLSDWWkEfupMg== - -sass-loader@8.0.2: - version "8.0.2" - resolved "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz#debecd8c3ce243c76454f2e8290482150380090d" - integrity sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ== - dependencies: - clone-deep "^4.0.1" - loader-utils "^1.2.3" - neo-async "^2.6.1" - schema-utils "^2.6.1" - semver "^6.3.0" - sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -19245,7 +17586,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.1, schema-utils@^2.6.4, schema-utils@^2.6.5: +schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.4: version "2.6.5" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== @@ -19253,6 +17594,14 @@ schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6 ajv "^6.12.0" ajv-keywords "^3.4.1" +schema-utils@^2.6.5, schema-utils@^2.6.6: + version "2.6.6" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.6.tgz#299fe6bd4a3365dc23d99fd446caff8f1d6c330c" + integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA== + dependencies: + ajv "^6.12.0" + ajv-keywords "^3.4.1" + screenfull@^5.0.0: version "5.0.2" resolved "https://registry.npmjs.org/screenfull/-/screenfull-5.0.2.tgz#b9acdcf1ec676a948674df5cd0ff66b902b0bed7" @@ -19760,16 +18109,16 @@ source-map@0.5.6: resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= -source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + source-map@^0.7.3: version "0.7.3" resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" @@ -20121,14 +18470,6 @@ string-hash@^1.1.1: resolved "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= -string-length@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= - dependencies: - astral-regex "^1.0.0" - strip-ansi "^4.0.0" - string-length@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/string-length/-/string-length-3.1.0.tgz#107ef8c23456e187a8abd4a61162ff4ac6e25837" @@ -20294,14 +18635,6 @@ strip-bom@^3.0.0: resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= -strip-comments@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/strip-comments/-/strip-comments-1.0.2.tgz#82b9c45e7f05873bee53f37168af930aa368679d" - integrity sha512-kL97alc47hoyIQSV165tTt9rG5dn4w1dNnBhOQ3bOU1Nc1hel09jnXANaHJ7vzHLd4Ju8kseDGzlev96pghLFw== - dependencies: - babel-extract-comments "^1.0.0" - babel-plugin-transform-object-rest-spread "^6.26.0" - strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -20355,14 +18688,6 @@ style-inject@^0.3.0: resolved "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" integrity sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw== -style-loader@0.23.1: - version "0.23.1" - resolved "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" - integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg== - dependencies: - loader-utils "^1.1.0" - schema-utils "^1.0.0" - style-loader@^1.0.0: version "1.1.3" resolved "https://registry.npmjs.org/style-loader/-/style-loader-1.1.3.tgz#9e826e69c683c4d9bf9db924f85e9abb30d5e200" @@ -20371,6 +18696,14 @@ style-loader@^1.0.0: loader-utils "^1.2.3" schema-utils "^2.6.4" +style-loader@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/style-loader/-/style-loader-1.2.1.tgz#c5cbbfbf1170d076cfdd86e0109c5bba114baa1a" + integrity sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg== + dependencies: + loader-utils "^2.0.0" + schema-utils "^2.6.6" + styled-system@^5.1.5: version "5.1.5" resolved "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz#e362d73e1dbb5641a2fd749a6eba1263dc85075e" @@ -20660,21 +18993,6 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@2.3.5, terser-webpack-plugin@^2.1.2: - version "2.3.5" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" - integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== - dependencies: - cacache "^13.0.1" - find-cache-dir "^3.2.0" - jest-worker "^25.1.0" - p-limit "^2.2.2" - schema-utils "^2.6.4" - serialize-javascript "^2.1.2" - source-map "^0.6.1" - terser "^4.4.3" - webpack-sources "^1.4.3" - terser-webpack-plugin@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" @@ -20690,6 +19008,21 @@ terser-webpack-plugin@^1.4.3: webpack-sources "^1.4.0" worker-farm "^1.7.0" +terser-webpack-plugin@^2.1.2: + version "2.3.5" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" + integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== + dependencies: + cacache "^13.0.1" + find-cache-dir "^3.2.0" + jest-worker "^25.1.0" + p-limit "^2.2.2" + schema-utils "^2.6.4" + serialize-javascript "^2.1.2" + source-map "^0.6.1" + terser "^4.4.3" + webpack-sources "^1.4.3" + terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: version "4.6.7" resolved "https://registry.npmjs.org/terser/-/terser-4.6.7.tgz#478d7f9394ec1907f0e488c5f6a6a9a2bad55e72" @@ -20699,16 +19032,6 @@ terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -test-exclude@^5.2.3: - version "5.2.3" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" - integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== - dependencies: - glob "^7.1.3" - minimatch "^3.0.4" - read-pkg-up "^4.0.0" - require-main-filename "^2.0.0" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -20759,11 +19082,6 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -throat@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= - throat@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" @@ -20939,7 +19257,7 @@ touch@^3.1.0: dependencies: nopt "~1.0.10" -tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.5.0, tough-cookie@~2.5.0: +tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== @@ -21061,7 +19379,7 @@ ts-node@^8.6.2: source-map-support "^0.5.6" yn "3.1.1" -ts-pnp@1.1.6, ts-pnp@^1.1.2, ts-pnp@^1.1.6: +ts-pnp@^1.1.2: version "1.1.6" resolved "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.6.tgz#389a24396d425a0d3162e96d2b4638900fdc289a" integrity sha512-CrG5GqAAzMT7144Cl+UIFP7mz/iIhiy+xQ6GGcnjTezhALT02uPMRw7tgDSESgB5MsfKt55+GPWw4ir1kVtMIQ== @@ -21156,16 +19474,6 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -type@^1.0.1: - version "1.2.0" - resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" - integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== - typed-styles@^0.0.7: version "0.0.7" resolved "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9" @@ -21482,7 +19790,7 @@ url-join@^4.0.0: resolved "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== -url-loader@2.3.0, url-loader@^2.0.1: +url-loader@^2.0.1: version "2.3.0" resolved "https://registry.npmjs.org/url-loader/-/url-loader-2.3.0.tgz#e0e2ef658f003efb8ca41b0f3ffbf76bab88658b" integrity sha512-goSdg8VY+7nPZKUEChZSEtW5gjbS66USIGCeSJ1OVOJ7Yfuh/36YxCwMi5HVEJh6mqUYOoy3NJ0vlOMrWsSHog== @@ -21491,6 +19799,15 @@ url-loader@2.3.0, url-loader@^2.0.1: mime "^2.4.4" schema-utils "^2.5.0" +url-loader@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/url-loader/-/url-loader-4.1.0.tgz#c7d6b0d6b0fccd51ab3ffc58a78d32b8d89a7be2" + integrity sha512-IzgAAIC8wRrg6NYkFIJY09vtktQcsvU8V6HhtQj9PTefbYImzLB1hufqo4m+RyM5N3mLx5BqJKccgxJS+W3kqw== + dependencies: + loader-utils "^2.0.0" + mime-types "^2.1.26" + schema-utils "^2.6.5" + url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -21757,7 +20074,7 @@ warning@^4.0.2, warning@^4.0.3: dependencies: loose-envify "^1.0.0" -watchpack@^1.6.0, watchpack@^1.6.1: +watchpack@^1.6.1: version "1.6.1" resolved "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== @@ -21796,7 +20113,7 @@ webpack-dev-middleware@^3.7.0, webpack-dev-middleware@^3.7.2: range-parser "^1.2.1" webpack-log "^2.0.0" -webpack-dev-server@3.10.3, webpack-dev-server@^3.10.3: +webpack-dev-server@^3.10.3: version "3.10.3" resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0" integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ== @@ -21853,16 +20170,6 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-manifest-plugin@2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-2.2.0.tgz#19ca69b435b0baec7e29fbe90fb4015de2de4f16" - integrity sha512-9S6YyKKKh/Oz/eryM1RyLVDVmy3NSPV0JXMRhZ18fJsq+AwGxUY34X54VNwkzYcEmEkDwNxuEOboCZEebJXBAQ== - dependencies: - fs-extra "^7.0.0" - lodash ">=3.5 <5" - object.entries "^1.1.0" - tapable "^1.0.0" - webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" @@ -21878,35 +20185,6 @@ webpack-virtual-modules@^0.2.0: dependencies: debug "^3.0.0" -webpack@4.42.0: - version "4.42.0" - resolved "https://registry.npmjs.org/webpack/-/webpack-4.42.0.tgz#b901635dd6179391d90740a63c93f76f39883eb8" - integrity sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w== - dependencies: - "@webassemblyjs/ast" "1.8.5" - "@webassemblyjs/helper-module-context" "1.8.5" - "@webassemblyjs/wasm-edit" "1.8.5" - "@webassemblyjs/wasm-parser" "1.8.5" - acorn "^6.2.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.1" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" - webpack-sources "^1.4.1" - webpack@^4.33.0, webpack@^4.38.0, webpack@^4.41.6: version "4.43.0" resolved "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" @@ -21957,7 +20235,7 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" -whatwg-fetch@3.0.0, whatwg-fetch@^3.0.0: +whatwg-fetch@3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== @@ -22070,141 +20348,6 @@ wordwrap@~0.0.2: resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= -workbox-background-sync@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-4.3.1.tgz#26821b9bf16e9e37fd1d640289edddc08afd1950" - integrity sha512-1uFkvU8JXi7L7fCHVBEEnc3asPpiAL33kO495UMcD5+arew9IbKW2rV5lpzhoWcm/qhGB89YfO4PmB/0hQwPRg== - dependencies: - workbox-core "^4.3.1" - -workbox-broadcast-update@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-4.3.1.tgz#e2c0280b149e3a504983b757606ad041f332c35b" - integrity sha512-MTSfgzIljpKLTBPROo4IpKjESD86pPFlZwlvVG32Kb70hW+aob4Jxpblud8EhNb1/L5m43DUM4q7C+W6eQMMbA== - dependencies: - workbox-core "^4.3.1" - -workbox-build@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-build/-/workbox-build-4.3.1.tgz#414f70fb4d6de47f6538608b80ec52412d233e64" - integrity sha512-UHdwrN3FrDvicM3AqJS/J07X0KXj67R8Cg0waq1MKEOqzo89ap6zh6LmaLnRAjpB+bDIz+7OlPye9iii9KBnxw== - dependencies: - "@babel/runtime" "^7.3.4" - "@hapi/joi" "^15.0.0" - common-tags "^1.8.0" - fs-extra "^4.0.2" - glob "^7.1.3" - lodash.template "^4.4.0" - pretty-bytes "^5.1.0" - stringify-object "^3.3.0" - strip-comments "^1.0.2" - workbox-background-sync "^4.3.1" - workbox-broadcast-update "^4.3.1" - workbox-cacheable-response "^4.3.1" - workbox-core "^4.3.1" - workbox-expiration "^4.3.1" - workbox-google-analytics "^4.3.1" - workbox-navigation-preload "^4.3.1" - workbox-precaching "^4.3.1" - workbox-range-requests "^4.3.1" - workbox-routing "^4.3.1" - workbox-strategies "^4.3.1" - workbox-streams "^4.3.1" - workbox-sw "^4.3.1" - workbox-window "^4.3.1" - -workbox-cacheable-response@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-4.3.1.tgz#f53e079179c095a3f19e5313b284975c91428c91" - integrity sha512-Rp5qlzm6z8IOvnQNkCdO9qrDgDpoPNguovs0H8C+wswLuPgSzSp9p2afb5maUt9R1uTIwOXrVQMmPfPypv+npw== - dependencies: - workbox-core "^4.3.1" - -workbox-core@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-core/-/workbox-core-4.3.1.tgz#005d2c6a06a171437afd6ca2904a5727ecd73be6" - integrity sha512-I3C9jlLmMKPxAC1t0ExCq+QoAMd0vAAHULEgRZ7kieCdUd919n53WC0AfvokHNwqRhGn+tIIj7vcb5duCjs2Kg== - -workbox-expiration@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-4.3.1.tgz#d790433562029e56837f341d7f553c4a78ebe921" - integrity sha512-vsJLhgQsQouv9m0rpbXubT5jw0jMQdjpkum0uT+d9tTwhXcEZks7qLfQ9dGSaufTD2eimxbUOJfWLbNQpIDMPw== - dependencies: - workbox-core "^4.3.1" - -workbox-google-analytics@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-4.3.1.tgz#9eda0183b103890b5c256e6f4ea15a1f1548519a" - integrity sha512-xzCjAoKuOb55CBSwQrbyWBKqp35yg1vw9ohIlU2wTy06ZrYfJ8rKochb1MSGlnoBfXGWss3UPzxR5QL5guIFdg== - dependencies: - workbox-background-sync "^4.3.1" - workbox-core "^4.3.1" - workbox-routing "^4.3.1" - workbox-strategies "^4.3.1" - -workbox-navigation-preload@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-4.3.1.tgz#29c8e4db5843803b34cd96dc155f9ebd9afa453d" - integrity sha512-K076n3oFHYp16/C+F8CwrRqD25GitA6Rkd6+qAmLmMv1QHPI2jfDwYqrytOfKfYq42bYtW8Pr21ejZX7GvALOw== - dependencies: - workbox-core "^4.3.1" - -workbox-precaching@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-4.3.1.tgz#9fc45ed122d94bbe1f0ea9584ff5940960771cba" - integrity sha512-piSg/2csPoIi/vPpp48t1q5JLYjMkmg5gsXBQkh/QYapCdVwwmKlU9mHdmy52KsDGIjVaqEUMFvEzn2LRaigqQ== - dependencies: - workbox-core "^4.3.1" - -workbox-range-requests@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-4.3.1.tgz#f8a470188922145cbf0c09a9a2d5e35645244e74" - integrity sha512-S+HhL9+iTFypJZ/yQSl/x2Bf5pWnbXdd3j57xnb0V60FW1LVn9LRZkPtneODklzYuFZv7qK6riZ5BNyc0R0jZA== - dependencies: - workbox-core "^4.3.1" - -workbox-routing@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-routing/-/workbox-routing-4.3.1.tgz#a675841af623e0bb0c67ce4ed8e724ac0bed0cda" - integrity sha512-FkbtrODA4Imsi0p7TW9u9MXuQ5P4pVs1sWHK4dJMMChVROsbEltuE79fBoIk/BCztvOJ7yUpErMKa4z3uQLX+g== - dependencies: - workbox-core "^4.3.1" - -workbox-strategies@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-4.3.1.tgz#d2be03c4ef214c115e1ab29c9c759c9fe3e9e646" - integrity sha512-F/+E57BmVG8dX6dCCopBlkDvvhg/zj6VDs0PigYwSN23L8hseSRwljrceU2WzTvk/+BSYICsWmRq5qHS2UYzhw== - dependencies: - workbox-core "^4.3.1" - -workbox-streams@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-streams/-/workbox-streams-4.3.1.tgz#0b57da70e982572de09c8742dd0cb40a6b7c2cc3" - integrity sha512-4Kisis1f/y0ihf4l3u/+ndMkJkIT4/6UOacU3A4BwZSAC9pQ9vSvJpIi/WFGQRH/uPXvuVjF5c2RfIPQFSS2uA== - dependencies: - workbox-core "^4.3.1" - -workbox-sw@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-sw/-/workbox-sw-4.3.1.tgz#df69e395c479ef4d14499372bcd84c0f5e246164" - integrity sha512-0jXdusCL2uC5gM3yYFT6QMBzKfBr2XTk0g5TPAV4y8IZDyVNDyj1a8uSXy3/XrvkVTmQvLN4O5k3JawGReXr9w== - -workbox-webpack-plugin@4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-4.3.1.tgz#47ff5ea1cc074b6c40fb5a86108863a24120d4bd" - integrity sha512-gJ9jd8Mb8wHLbRz9ZvGN57IAmknOipD3W4XNE/Lk/4lqs5Htw4WOQgakQy/o/4CoXQlMCYldaqUg+EJ35l9MEQ== - dependencies: - "@babel/runtime" "^7.0.0" - json-stable-stringify "^1.0.1" - workbox-build "^4.3.1" - -workbox-window@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/workbox-window/-/workbox-window-4.3.1.tgz#ee6051bf10f06afa5483c9b8dfa0531994ede0f3" - integrity sha512-C5gWKh6I58w3GeSc0wp2Ne+rqVw8qwcmZnQGpjiek8A2wpbxSJb1FdCoQVO+jDJs35bFgo/WETgl1fqgsxN0Hg== - dependencies: - workbox-core "^4.3.1" - worker-farm@^1.6.0, worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" @@ -22258,15 +20401,6 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@2.4.1: - version "2.4.1" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" - integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2, write-file-atomic@^2.4.3: version "2.4.3" resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" @@ -22445,14 +20579,6 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^15.0.1: version "15.0.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" @@ -22527,22 +20653,6 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" -yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - yargs@^14.2.2: version "14.2.3" resolved "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" @@ -22604,6 +20714,14 @@ yauzl@2.10.0, yauzl@^2.10.0: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +yml-loader@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/yml-loader/-/yml-loader-2.1.0.tgz#b976b8691b537b6d3dc7d92a9a7d34b90de10870" + integrity sha512-mo42d5FQWlXxpyTEpYywPu1LzK3F69pPPCOB8WKgJi8s+aqaogQP7XnXTjSobbKzzlZ/wXm7kg9CkP4x4ZnVMw== + dependencies: + js-yaml "^3.8.3" + loader-utils "^1.1.0" + yn@3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From d911db4105d9f599406ef43c7b4048c67a09f678 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 22:59:11 +0200 Subject: [PATCH 21/69] packages/cli: rename bundle loaders to transforms and include plugins --- packages/cli/src/lib/bundle/config.ts | 12 ++----- .../lib/bundle/{loaders.ts => transforms.ts} | 33 +++++++++++++++++-- 2 files changed, 33 insertions(+), 12 deletions(-) rename packages/cli/src/lib/bundle/{loaders.ts => transforms.ts} (70%) diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundle/config.ts index 7fe6f2e585..cdd16fec2e 100644 --- a/packages/cli/src/lib/bundle/config.ts +++ b/packages/cli/src/lib/bundle/config.ts @@ -15,11 +15,10 @@ */ import webpack from 'webpack'; -import HtmlWebpackPlugin from 'html-webpack-plugin'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; import ModuleScopePlugin from 'react-dev-utils/ModuleScopePlugin'; import { BundlingPaths } from './paths'; -import { loaders } from './loaders'; +import { transforms } from './transforms'; import { optimization } from './optimization'; import { BundlingOptions } from './types'; // import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; @@ -34,12 +33,7 @@ export function createConfig( ): webpack.Configuration { const { checksEnabled, isDev } = options; - const plugins = [ - new HtmlWebpackPlugin({ - template: paths.targetHtml, - }), - new webpack.HotModuleReplacementPlugin(), - ]; + const { plugins, loaders } = transforms(paths, options); if (checksEnabled) { plugins.push( @@ -78,7 +72,7 @@ export function createConfig( }, }, module: { - rules: loaders(), + rules: loaders, }, output: { path: paths.targetDist, diff --git a/packages/cli/src/lib/bundle/loaders.ts b/packages/cli/src/lib/bundle/transforms.ts similarity index 70% rename from packages/cli/src/lib/bundle/loaders.ts rename to packages/cli/src/lib/bundle/transforms.ts index 730ba2496a..ad7cdd4f25 100644 --- a/packages/cli/src/lib/bundle/loaders.ts +++ b/packages/cli/src/lib/bundle/transforms.ts @@ -14,10 +14,23 @@ * limitations under the License. */ -import { Module } from 'webpack'; +import webpack, { Module, Plugin } from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import { BundlingOptions } from './types'; +import { BundlingPaths } from './paths'; -export const loaders = (): Module['rules'] => { - return [ +type Transforms = { + loaders: Module['rules']; + plugins: Plugin[]; +}; + +export const transforms = ( + paths: BundlingPaths, + options: BundlingOptions, +): Transforms => { + const { isDev } = options; + + const loaders = [ { test: /\.(tsx?)$/, exclude: /node_modules/, @@ -55,4 +68,18 @@ export const loaders = (): Module['rules'] => { use: [require.resolve('style-loader'), require.resolve('css-loader')], }, ]; + + const plugins = new Array(); + + plugins.push( + new HtmlWebpackPlugin({ + template: paths.targetHtml, + }), + ); + + if (isDev) { + plugins.push(new webpack.HotModuleReplacementPlugin()); + } + + return { loaders, plugins }; }; From d1939be66417825245be519937a530ce628e91a2 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 16 May 2020 23:45:53 +0200 Subject: [PATCH 22/69] packages/cli: extract css in bundle prod builds --- packages/cli/package.json | 2 ++ packages/cli/src/lib/bundle/transforms.ts | 28 ++++++++++++++++++++++- yarn.lock | 17 ++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 483ae52ae4..dcd3d15a49 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -54,6 +54,7 @@ "jest": "^25.1.0", "jest-css-modules": "^2.1.0", "jest-esm-transformer": "^1.0.0", + "mini-css-extract-plugin": "^0.9.0", "ora": "^4.0.3", "raw-loader": "^4.0.1", "react": "^16.0.0", @@ -81,6 +82,7 @@ "@types/fs-extra": "^8.1.0", "@types/html-webpack-plugin": "^3.2.2", "@types/inquirer": "^6.5.0", + "@types/mini-css-extract-plugin": "^0.9.1", "@types/node": "^13.7.2", "@types/ora": "^3.2.0", "@types/react-dev-utils": "^9.0.4", diff --git a/packages/cli/src/lib/bundle/transforms.ts b/packages/cli/src/lib/bundle/transforms.ts index ad7cdd4f25..f87ba3b6e3 100644 --- a/packages/cli/src/lib/bundle/transforms.ts +++ b/packages/cli/src/lib/bundle/transforms.ts @@ -16,6 +16,7 @@ import webpack, { Module, Plugin } from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; +import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { BundlingOptions } from './types'; import { BundlingPaths } from './paths'; @@ -65,7 +66,25 @@ export const transforms = ( }, { test: /\.css$/i, - use: [require.resolve('style-loader'), require.resolve('css-loader')], + use: [ + isDev + ? { + loader: require.resolve('style-loader'), + options: { + attrs: { origin: 'main' }, + }, + } + : { + loader: MiniCssExtractPlugin.loader, + }, + + { + loader: require.resolve('css-loader'), + options: { + sourceMap: true, + }, + }, + ], }, ]; @@ -79,6 +98,13 @@ export const transforms = ( if (isDev) { plugins.push(new webpack.HotModuleReplacementPlugin()); + } else { + plugins.push( + new MiniCssExtractPlugin({ + filename: '[name].[contenthash:8].css', + chunkFilename: '[name].[id].[contenthash:8].css', + }), + ); } return { loaders, plugins }; diff --git a/yarn.lock b/yarn.lock index 26b8391dcf..08637cf946 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3995,6 +3995,13 @@ resolved "https://registry.npmjs.org/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== +"@types/mini-css-extract-plugin@^0.9.1": + version "0.9.1" + resolved "https://registry.npmjs.org/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.1.tgz#d4bdde5197326fca039d418f4bdda03dc74dc451" + integrity sha512-+mN04Oszdz9tGjUP/c1ReVwJXxSniLd7lF++sv+8dkABxVNthg6uccei+4ssKxRHGoMmPxdn7uBdJWONSJGTGQ== + dependencies: + "@types/webpack" "*" + "@types/minimatch@*", "@types/minimatch@3.0.3": version "3.0.3" resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -13718,6 +13725,16 @@ mini-css-extract-plugin@^0.7.0: schema-utils "^1.0.0" webpack-sources "^1.1.0" +mini-css-extract-plugin@^0.9.0: + version "0.9.0" + resolved "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz#47f2cf07aa165ab35733b1fc97d4c46c0564339e" + integrity sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A== + dependencies: + loader-utils "^1.1.0" + normalize-url "1.9.1" + schema-utils "^1.0.0" + webpack-sources "^1.1.0" + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" From f202e30c2c01ed74a0ca244a6e63499e28df17d9 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 10:57:32 +0200 Subject: [PATCH 23/69] packages/cli: removed plugin:build watch mode --- packages/cli/src/commands/plugin/build.ts | 30 ++--------------------- packages/cli/src/index.ts | 1 - 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/packages/cli/src/commands/plugin/build.ts b/packages/cli/src/commands/plugin/build.ts index fcda3f424b..45379ba757 100644 --- a/packages/cli/src/commands/plugin/build.ts +++ b/packages/cli/src/commands/plugin/build.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import { rollup, watch, OutputOptions } from 'rollup'; -import { Command } from 'commander'; +import { rollup, OutputOptions } from 'rollup'; import chalk from 'chalk'; import { withCache, getDefaultCacheOptions } from '../../lib/buildCache'; import { paths } from '../../lib/paths'; @@ -56,32 +55,7 @@ function logError(error: any) { } } -export default async (cmd: Command) => { - if (cmd.watch) { - // We're not resolving this promise because watch() doesn't have any exit event. - // Instead we just wait until the user sends an interrupt signal. - await new Promise(() => { - const watcher = watch(conf); - watcher.on('event', (event) => { - // START — the watcher is (re)starting - // BUNDLE_START — building an individual bundle - // BUNDLE_END — finished building a bundle - // END — finished building all bundles - // ERROR — encountered an error while bundling - - if (event.code === 'ERROR') { - logError(event.error); - } else if (event.code === 'BUNDLE_START') { - console.log(chalk.dim(`building ${event.input}`)); - } else if (event.code === 'BUNDLE_END') { - const { input, duration } = event; - const s = (duration / 1000).toFixed(1); - console.log(chalk.green(`built ${input} in ${s}s`)); - } - }); - }); - } - +export default async () => { await withCache(getDefaultCacheOptions(), async () => { try { const bundle = await rollup({ diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 0e3cfaacef..d09ad61ed5 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -55,7 +55,6 @@ const main = (argv: string[]) => { program .command('plugin:build') - .option('--watch', 'Enable watch mode') .description('Build a plugin') .action(actionHandler(() => require('./commands/plugin/build'))); From 590276c67779ed9df8d7ec9aa97a2530c115f8dc Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 11:06:39 +0200 Subject: [PATCH 24/69] packages/cli: move rollup build to lib/packager --- packages/cli/src/commands/plugin/build.ts | 52 +------------- .../cli/src/commands/plugin/rollup.config.ts | 63 ----------------- packages/cli/src/lib/packager/config.ts | 65 ++++++++++++++++++ packages/cli/src/lib/packager/index.ts | 17 +++++ packages/cli/src/lib/packager/packager.ts | 67 +++++++++++++++++++ 5 files changed, 151 insertions(+), 113 deletions(-) delete mode 100644 packages/cli/src/commands/plugin/rollup.config.ts create mode 100644 packages/cli/src/lib/packager/config.ts create mode 100644 packages/cli/src/lib/packager/index.ts create mode 100644 packages/cli/src/lib/packager/packager.ts diff --git a/packages/cli/src/commands/plugin/build.ts b/packages/cli/src/commands/plugin/build.ts index 45379ba757..9af79028f4 100644 --- a/packages/cli/src/commands/plugin/build.ts +++ b/packages/cli/src/commands/plugin/build.ts @@ -14,59 +14,11 @@ * limitations under the License. */ -import { rollup, OutputOptions } from 'rollup'; -import chalk from 'chalk'; import { withCache, getDefaultCacheOptions } from '../../lib/buildCache'; -import { paths } from '../../lib/paths'; -import conf from './rollup.config'; - -function logError(error: any) { - console.log(''); - - if (error.code === 'PLUGIN_ERROR') { - // typescript2 plugin has a complete message with all codeframes - if (error.plugin === 'rpt2') { - console.log(error.message); - } else { - // Log which plugin is causing errors to make it easier to identity. - // If we see these in logs we likely want to provide some custom error - // output for those plugins too. - console.log(`(plugin ${error.plugin}) ${error}`); - } - } else { - // Generic rollup errors, log what's available - if (error.loc) { - const file = `${paths.resolveTarget((error.loc.file || error.id)!)}`; - const pos = `${error.loc.line}:${error.loc.column}`; - console.log(`${file} [${pos}]`); - } else if (error.id) { - console.log(paths.resolveTarget(error.id)); - } - - console.log(String(error)); - - if (error.url) { - console.log(chalk.cyan(error.url)); - } - - if (error.frame) { - console.log(chalk.dim(error.frame)); - } - } -} +import { buildPackage } from '../../lib/packager'; export default async () => { await withCache(getDefaultCacheOptions(), async () => { - try { - const bundle = await rollup({ - input: conf.input, - plugins: conf.plugins, - }); - await bundle.generate(conf.output as OutputOptions); - await bundle.write(conf.output as OutputOptions); - } catch (error) { - logError(error); - process.exit(1); - } + await buildPackage(); }); }; diff --git a/packages/cli/src/commands/plugin/rollup.config.ts b/packages/cli/src/commands/plugin/rollup.config.ts deleted file mode 100644 index 36b43bf5a7..0000000000 --- a/packages/cli/src/commands/plugin/rollup.config.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import typescript from 'rollup-plugin-typescript2'; -import commonjs from '@rollup/plugin-commonjs'; -import resolve from '@rollup/plugin-node-resolve'; -import postcss from 'rollup-plugin-postcss'; -import imageFiles from 'rollup-plugin-image-files'; -import json from '@rollup/plugin-json'; -import { RollupWatchOptions } from 'rollup'; -import { paths } from '../../lib/paths'; - -export default { - input: 'src/index.ts', - output: { - file: 'dist/index.esm.js', - format: 'module', - }, - plugins: [ - peerDepsExternal({ - includeDependencies: true, - }), - resolve({ - mainFields: ['browser', 'module', 'main'], - }), - commonjs({ - include: ['node_modules/**', '../../node_modules/**'], - exclude: ['**/*.stories.*', '**/*.test.*'], - }), - postcss(), - imageFiles(), - json(), - typescript({ - include: `${paths.resolveTarget('src')}/**/*.{js,jsx,ts,tsx}`, - tsconfigOverride: { - // The dev folder is for the local plugin serve, ignore it in the build - // If we don't do this we get a folder structure similar to dist/{src,dev}/... - exclude: ['dev'], - compilerOptions: { - // Use absolute path to src dir as root for declarations, relying on the default - // seems to produce declaration maps that are relative to dist/ instead of src/ - // Using a relative path like ../src doesn't work either becaus it will be used as is in subdirs. - sourceRoot: paths.resolveTarget('src'), - }, - }, - clean: true, - }), - ], -} as RollupWatchOptions; diff --git a/packages/cli/src/lib/packager/config.ts b/packages/cli/src/lib/packager/config.ts new file mode 100644 index 0000000000..602b662f5c --- /dev/null +++ b/packages/cli/src/lib/packager/config.ts @@ -0,0 +1,65 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import peerDepsExternal from 'rollup-plugin-peer-deps-external'; +import typescript from 'rollup-plugin-typescript2'; +import commonjs from '@rollup/plugin-commonjs'; +import resolve from '@rollup/plugin-node-resolve'; +import postcss from 'rollup-plugin-postcss'; +import imageFiles from 'rollup-plugin-image-files'; +import json from '@rollup/plugin-json'; +import { RollupWatchOptions } from 'rollup'; +import { paths } from '../paths'; + +export const makeConfig = (): RollupWatchOptions => { + return { + input: 'src/index.ts', + output: { + file: 'dist/index.esm.js', + format: 'module', + }, + plugins: [ + peerDepsExternal({ + includeDependencies: true, + }), + resolve({ + mainFields: ['browser', 'module', 'main'], + }), + commonjs({ + include: ['node_modules/**', '../../node_modules/**'], + exclude: ['**/*.stories.*', '**/*.test.*'], + }), + postcss(), + imageFiles(), + json(), + typescript({ + include: `${paths.resolveTarget('src')}/**/*.{js,jsx,ts,tsx}`, + tsconfigOverride: { + // The dev folder is for the local plugin serve, ignore it in the build + // If we don't do this we get a folder structure similar to dist/{src,dev}/... + exclude: ['dev'], + compilerOptions: { + // Use absolute path to src dir as root for declarations, relying on the default + // seems to produce declaration maps that are relative to dist/ instead of src/ + // Using a relative path like ../src doesn't work either becaus it will be used as is in subdirs. + sourceRoot: paths.resolveTarget('src'), + }, + }, + clean: true, + }), + ], + }; +}; diff --git a/packages/cli/src/lib/packager/index.ts b/packages/cli/src/lib/packager/index.ts new file mode 100644 index 0000000000..e639599af9 --- /dev/null +++ b/packages/cli/src/lib/packager/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { buildPackage } from './packager'; diff --git a/packages/cli/src/lib/packager/packager.ts b/packages/cli/src/lib/packager/packager.ts new file mode 100644 index 0000000000..cf12b517eb --- /dev/null +++ b/packages/cli/src/lib/packager/packager.ts @@ -0,0 +1,67 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { rollup, OutputOptions } from 'rollup'; +import chalk from 'chalk'; +import { paths } from '../paths'; +import { makeConfig } from './config'; + +function logError(error: any) { + console.log(''); + + if (error.code === 'PLUGIN_ERROR') { + // typescript2 plugin has a complete message with all codeframes + if (error.plugin === 'rpt2') { + console.log(error.message); + } else { + // Log which plugin is causing errors to make it easier to identity. + // If we see these in logs we likely want to provide some custom error + // output for those plugins too. + console.log(`(plugin ${error.plugin}) ${error}`); + } + } else { + // Generic rollup errors, log what's available + if (error.loc) { + const file = `${paths.resolveTarget((error.loc.file || error.id)!)}`; + const pos = `${error.loc.line}:${error.loc.column}`; + console.log(`${file} [${pos}]`); + } else if (error.id) { + console.log(paths.resolveTarget(error.id)); + } + + console.log(String(error)); + + if (error.url) { + console.log(chalk.cyan(error.url)); + } + + if (error.frame) { + console.log(chalk.dim(error.frame)); + } + } +} + +export const buildPackage = async () => { + try { + const config = makeConfig(); + const bundle = await rollup(config); + await bundle.generate(config.output as OutputOptions); + await bundle.write(config.output as OutputOptions); + } catch (error) { + logError(error); + process.exit(1); + } +}; From b071dc0e9440be4883f8c3c0a5cabb8c8f18718b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 11:12:52 +0200 Subject: [PATCH 25/69] packages/cli: throw error message in packages instead of exit --- packages/cli/src/lib/packager/packager.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/cli/src/lib/packager/packager.ts b/packages/cli/src/lib/packager/packager.ts index cf12b517eb..0e00812d17 100644 --- a/packages/cli/src/lib/packager/packager.ts +++ b/packages/cli/src/lib/packager/packager.ts @@ -19,39 +19,40 @@ import chalk from 'chalk'; import { paths } from '../paths'; import { makeConfig } from './config'; -function logError(error: any) { - console.log(''); +function formatErrorMessage(error: any) { + let msg = ''; if (error.code === 'PLUGIN_ERROR') { // typescript2 plugin has a complete message with all codeframes if (error.plugin === 'rpt2') { - console.log(error.message); + msg += `${error.message}\n`; } else { // Log which plugin is causing errors to make it easier to identity. // If we see these in logs we likely want to provide some custom error // output for those plugins too. - console.log(`(plugin ${error.plugin}) ${error}`); + msg += `(plugin ${error.plugin}) ${error}\n`; } } else { // Generic rollup errors, log what's available if (error.loc) { const file = `${paths.resolveTarget((error.loc.file || error.id)!)}`; const pos = `${error.loc.line}:${error.loc.column}`; - console.log(`${file} [${pos}]`); + msg += `${file} [${pos}]\n`; } else if (error.id) { - console.log(paths.resolveTarget(error.id)); + msg += `${paths.resolveTarget(error.id)}\n`; } - console.log(String(error)); + msg += `${error}\n`; if (error.url) { - console.log(chalk.cyan(error.url)); + msg += `${chalk.cyan(error.url)}\n`; } if (error.frame) { - console.log(chalk.dim(error.frame)); + msg += `${chalk.dim(error.frame)}\n`; } } + return msg; } export const buildPackage = async () => { @@ -61,7 +62,6 @@ export const buildPackage = async () => { await bundle.generate(config.output as OutputOptions); await bundle.write(config.output as OutputOptions); } catch (error) { - logError(error); - process.exit(1); + throw new Error(formatErrorMessage(error)); } }; From 1f159c0f99a4d1ecb08bbf711197c4e9e814c747 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 11:48:42 +0200 Subject: [PATCH 26/69] packages/cli: switch rollup to use esbuild --- .../cli/@types/rollup-plugin-esbuild.d.ts | 17 +++++++++++++++++ packages/cli/package.json | 1 + packages/cli/src/lib/packager/config.ts | 19 +++---------------- packages/cli/src/lib/packager/packager.ts | 16 ++++++++++++++-- ....test.js => HorizontalScrollGrid.test.jsx} | 0 ...ogress.test.js => CircleProgress.test.jsx} | 0 ...ressCard.test.js => ProgressCard.test.jsx} | 0 ...st.js => StructuredMetadataTable.test.jsx} | 0 .../ErrorPage/{MicDrop.js => MicDrop.jsx} | 0 .../components/Radar/{Radar.js => Radar.jsx} | 0 .../{RadarBubble.js => RadarBubble.jsx} | 0 .../{RadarEntry.js => RadarEntry.jsx} | 0 .../{RadarFooter.js => RadarFooter.jsx} | 0 .../RadarGrid/{RadarGrid.js => RadarGrid.jsx} | 0 .../{RadarLegend.js => RadarLegend.jsx} | 0 .../RadarPlot/{RadarPlot.js => RadarPlot.jsx} | 0 yarn.lock | 15 ++++++++++++++- 17 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 packages/cli/@types/rollup-plugin-esbuild.d.ts rename packages/core/src/components/HorizontalScrollGrid/{HorizontalScrollGrid.test.js => HorizontalScrollGrid.test.jsx} (100%) rename packages/core/src/components/ProgressBars/{CircleProgress.test.js => CircleProgress.test.jsx} (100%) rename packages/core/src/components/ProgressBars/{ProgressCard.test.js => ProgressCard.test.jsx} (100%) rename packages/core/src/components/StructuredMetadataTable/{StructuredMetadataTable.test.js => StructuredMetadataTable.test.jsx} (100%) rename packages/core/src/layout/ErrorPage/{MicDrop.js => MicDrop.jsx} (100%) rename plugins/tech-radar/src/components/Radar/{Radar.js => Radar.jsx} (100%) rename plugins/tech-radar/src/components/RadarBubble/{RadarBubble.js => RadarBubble.jsx} (100%) rename plugins/tech-radar/src/components/RadarEntry/{RadarEntry.js => RadarEntry.jsx} (100%) rename plugins/tech-radar/src/components/RadarFooter/{RadarFooter.js => RadarFooter.jsx} (100%) rename plugins/tech-radar/src/components/RadarGrid/{RadarGrid.js => RadarGrid.jsx} (100%) rename plugins/tech-radar/src/components/RadarLegend/{RadarLegend.js => RadarLegend.jsx} (100%) rename plugins/tech-radar/src/components/RadarPlot/{RadarPlot.js => RadarPlot.jsx} (100%) diff --git a/packages/cli/@types/rollup-plugin-esbuild.d.ts b/packages/cli/@types/rollup-plugin-esbuild.d.ts new file mode 100644 index 0000000000..6637e75bcb --- /dev/null +++ b/packages/cli/@types/rollup-plugin-esbuild.d.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +declare module 'rollup-plugin-esbuild'; diff --git a/packages/cli/package.json b/packages/cli/package.json index dcd3d15a49..e4c4117a3e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -63,6 +63,7 @@ "recursive-readdir": "^2.2.2", "replace-in-file": "^6.0.0", "rollup": "^2.3.2", + "rollup-plugin-esbuild": "^1.4.1", "rollup-plugin-image-files": "^1.4.2", "rollup-plugin-peer-deps-external": "^2.2.2", "rollup-plugin-postcss": "^3.1.1", diff --git a/packages/cli/src/lib/packager/config.ts b/packages/cli/src/lib/packager/config.ts index 602b662f5c..5d0c3af9c5 100644 --- a/packages/cli/src/lib/packager/config.ts +++ b/packages/cli/src/lib/packager/config.ts @@ -15,14 +15,13 @@ */ import peerDepsExternal from 'rollup-plugin-peer-deps-external'; -import typescript from 'rollup-plugin-typescript2'; import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; import postcss from 'rollup-plugin-postcss'; +import esbuild from 'rollup-plugin-esbuild'; import imageFiles from 'rollup-plugin-image-files'; import json from '@rollup/plugin-json'; import { RollupWatchOptions } from 'rollup'; -import { paths } from '../paths'; export const makeConfig = (): RollupWatchOptions => { return { @@ -45,20 +44,8 @@ export const makeConfig = (): RollupWatchOptions => { postcss(), imageFiles(), json(), - typescript({ - include: `${paths.resolveTarget('src')}/**/*.{js,jsx,ts,tsx}`, - tsconfigOverride: { - // The dev folder is for the local plugin serve, ignore it in the build - // If we don't do this we get a folder structure similar to dist/{src,dev}/... - exclude: ['dev'], - compilerOptions: { - // Use absolute path to src dir as root for declarations, relying on the default - // seems to produce declaration maps that are relative to dist/ instead of src/ - // Using a relative path like ../src doesn't work either becaus it will be used as is in subdirs. - sourceRoot: paths.resolveTarget('src'), - }, - }, - clean: true, + esbuild({ + target: 'es2019', }), ], }; diff --git a/packages/cli/src/lib/packager/packager.ts b/packages/cli/src/lib/packager/packager.ts index 0e00812d17..41b7635106 100644 --- a/packages/cli/src/lib/packager/packager.ts +++ b/packages/cli/src/lib/packager/packager.ts @@ -16,6 +16,7 @@ import { rollup, OutputOptions } from 'rollup'; import chalk from 'chalk'; +import { relative as relativePath } from 'path'; import { paths } from '../paths'; import { makeConfig } from './config'; @@ -24,8 +25,19 @@ function formatErrorMessage(error: any) { if (error.code === 'PLUGIN_ERROR') { // typescript2 plugin has a complete message with all codeframes - if (error.plugin === 'rpt2') { - msg += `${error.message}\n`; + if (error.plugin === 'esbuild') { + msg += `${error.message}\n\n`; + for (const { text, location } of error.errors) { + const { line, column } = location; + const path = relativePath(paths.targetDir, error.id); + const loc = chalk.cyan(`${path}:${line}:${column}`); + + if (text === 'Unexpected "<"' && error.id.endsWith('.js')) { + msg += `${loc}: ${text}, JavaScript files with JSX should use a .jsx extension`; + } else { + msg += `${loc}: ${text}`; + } + } } else { // Log which plugin is causing errors to make it easier to identity. // If we see these in logs we likely want to provide some custom error diff --git a/packages/core/src/components/HorizontalScrollGrid/HorizontalScrollGrid.test.js b/packages/core/src/components/HorizontalScrollGrid/HorizontalScrollGrid.test.jsx similarity index 100% rename from packages/core/src/components/HorizontalScrollGrid/HorizontalScrollGrid.test.js rename to packages/core/src/components/HorizontalScrollGrid/HorizontalScrollGrid.test.jsx diff --git a/packages/core/src/components/ProgressBars/CircleProgress.test.js b/packages/core/src/components/ProgressBars/CircleProgress.test.jsx similarity index 100% rename from packages/core/src/components/ProgressBars/CircleProgress.test.js rename to packages/core/src/components/ProgressBars/CircleProgress.test.jsx diff --git a/packages/core/src/components/ProgressBars/ProgressCard.test.js b/packages/core/src/components/ProgressBars/ProgressCard.test.jsx similarity index 100% rename from packages/core/src/components/ProgressBars/ProgressCard.test.js rename to packages/core/src/components/ProgressBars/ProgressCard.test.jsx diff --git a/packages/core/src/components/StructuredMetadataTable/StructuredMetadataTable.test.js b/packages/core/src/components/StructuredMetadataTable/StructuredMetadataTable.test.jsx similarity index 100% rename from packages/core/src/components/StructuredMetadataTable/StructuredMetadataTable.test.js rename to packages/core/src/components/StructuredMetadataTable/StructuredMetadataTable.test.jsx diff --git a/packages/core/src/layout/ErrorPage/MicDrop.js b/packages/core/src/layout/ErrorPage/MicDrop.jsx similarity index 100% rename from packages/core/src/layout/ErrorPage/MicDrop.js rename to packages/core/src/layout/ErrorPage/MicDrop.jsx diff --git a/plugins/tech-radar/src/components/Radar/Radar.js b/plugins/tech-radar/src/components/Radar/Radar.jsx similarity index 100% rename from plugins/tech-radar/src/components/Radar/Radar.js rename to plugins/tech-radar/src/components/Radar/Radar.jsx diff --git a/plugins/tech-radar/src/components/RadarBubble/RadarBubble.js b/plugins/tech-radar/src/components/RadarBubble/RadarBubble.jsx similarity index 100% rename from plugins/tech-radar/src/components/RadarBubble/RadarBubble.js rename to plugins/tech-radar/src/components/RadarBubble/RadarBubble.jsx diff --git a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.js b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.jsx similarity index 100% rename from plugins/tech-radar/src/components/RadarEntry/RadarEntry.js rename to plugins/tech-radar/src/components/RadarEntry/RadarEntry.jsx diff --git a/plugins/tech-radar/src/components/RadarFooter/RadarFooter.js b/plugins/tech-radar/src/components/RadarFooter/RadarFooter.jsx similarity index 100% rename from plugins/tech-radar/src/components/RadarFooter/RadarFooter.js rename to plugins/tech-radar/src/components/RadarFooter/RadarFooter.jsx diff --git a/plugins/tech-radar/src/components/RadarGrid/RadarGrid.js b/plugins/tech-radar/src/components/RadarGrid/RadarGrid.jsx similarity index 100% rename from plugins/tech-radar/src/components/RadarGrid/RadarGrid.js rename to plugins/tech-radar/src/components/RadarGrid/RadarGrid.jsx diff --git a/plugins/tech-radar/src/components/RadarLegend/RadarLegend.js b/plugins/tech-radar/src/components/RadarLegend/RadarLegend.jsx similarity index 100% rename from plugins/tech-radar/src/components/RadarLegend/RadarLegend.js rename to plugins/tech-radar/src/components/RadarLegend/RadarLegend.jsx diff --git a/plugins/tech-radar/src/components/RadarPlot/RadarPlot.js b/plugins/tech-radar/src/components/RadarPlot/RadarPlot.jsx similarity index 100% rename from plugins/tech-radar/src/components/RadarPlot/RadarPlot.js rename to plugins/tech-radar/src/components/RadarPlot/RadarPlot.jsx diff --git a/yarn.lock b/yarn.lock index 08637cf946..2c2b9eb6ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2557,7 +2557,7 @@ is-module "^1.0.0" resolve "^1.14.2" -"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.8": +"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.10", "@rollup/pluginutils@^3.0.8": version "3.0.10" resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz#a659b9025920378494cd8f8c59fbf9b3a50d5f12" integrity sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw== @@ -8471,6 +8471,11 @@ es6-shim@^0.35.5: resolved "https://registry.npmjs.org/es6-shim/-/es6-shim-0.35.5.tgz#46f59dc0a84a1c5029e8ff1166ca0a902077a9ab" integrity sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg== +esbuild@^0.3.0: + version "0.3.3" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.3.3.tgz#7791f4c8d7db77fe7fef304a7ed1e09749b24594" + integrity sha512-RFl1rLwo8MPHjq1G2EfPYbt6a0cvi74H+sPzkiNPq9mkQJj2d1U78j+ukZMDayZah9MptCM0rDuxFC+WUi2xUQ== + escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" @@ -17400,6 +17405,14 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-esbuild@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-1.4.1.tgz#b388ebd4cda1198208d7746feea7656d485019b0" + integrity sha512-gTzKtVo/OiOOe6pwRFHQCyCtEeYxcxLmjpqMiT4TnwXtPdF8RNP9c5wh/NZPztQydcMdEe1W+TO7poXwbLQekw== + dependencies: + "@rollup/pluginutils" "^3.0.10" + esbuild "^0.3.0" + rollup-plugin-image-files@^1.4.2: version "1.4.2" resolved "https://registry.npmjs.org/rollup-plugin-image-files/-/rollup-plugin-image-files-1.4.2.tgz#0a329723bace95168a9a6efdacb51370c14fbfe5" From 0ccff561c0c997612e458a3c4c835e0a645102bb Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 12:45:58 +0200 Subject: [PATCH 27/69] added patches for bad types in dependencies --- package.json | 2 + patches/README.md | 15 ++++++++ patches/graphiql+1.0.0-alpha.8.patch | 49 ++++++++++++++++++++++++ patches/material-table+1.57.2.patch | 12 ++++++ yarn.lock | 56 ++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 patches/README.md create mode 100644 patches/graphiql+1.0.0-alpha.8.patch create mode 100644 patches/material-table+1.57.2.patch diff --git a/package.json b/package.json index f98ac41ad2..624c29065e 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "remove-plugin": "backstage-cli remove-plugin", "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push; fi", "lerna": "lerna", + "postinstall": "patch-package", "storybook": "yarn workspace storybook start" }, "workspaces": { @@ -33,6 +34,7 @@ "husky": "^4.2.3", "lerna": "^3.20.2", "lint-staged": "^10.1.0", + "patch-package": "^6.2.2", "prettier": "^2.0.5" }, "husky": { diff --git a/patches/README.md b/patches/README.md new file mode 100644 index 0000000000..5cebd1f222 --- /dev/null +++ b/patches/README.md @@ -0,0 +1,15 @@ +# patches + +This folder contains patches for dependency type declarations. Typescript doesn't provide a way to override of fix types that are installed as a part of the dependent package itself. + +Do not add any more patches here, these patches were added as a part of getting the entire repo type-checked, and we depended on some packages with bad types. + +As soon as the below issues are fixed, we should remove the patching functionality completely. + +## graphiql + +Some bad TS config in the alpha release - tracked here: https://github.com/graphql/graphiql/issues/1530 + +## material-table + +Fixed in master but not released yet, tracked here: https://github.com/mbrn/material-table/pull/1624 diff --git a/patches/graphiql+1.0.0-alpha.8.patch b/patches/graphiql+1.0.0-alpha.8.patch new file mode 100644 index 0000000000..4634aab64e --- /dev/null +++ b/patches/graphiql+1.0.0-alpha.8.patch @@ -0,0 +1,49 @@ +diff --git a/node_modules/graphiql/dist/components/HistoryQuery.d.ts b/node_modules/graphiql/dist/components/HistoryQuery.d.ts +index c903bde..761b76b 100644 +--- a/node_modules/graphiql/dist/components/HistoryQuery.d.ts ++++ b/node_modules/graphiql/dist/components/HistoryQuery.d.ts +@@ -1,5 +1,5 @@ + import React from 'react'; +-import { QueryStoreItem } from 'src/utility/QueryStore'; ++import { QueryStoreItem } from '../utility/QueryStore'; + export declare type HandleEditLabelFn = (query?: string, variables?: string, operationName?: string, label?: string, favorite?: boolean) => void; + export declare type HandleToggleFavoriteFn = (query?: string, variables?: string, operationName?: string, label?: string, favorite?: boolean) => void; + export declare type HandleSelectQueryFn = (query?: string, variables?: string, operationName?: string, label?: string) => void; +diff --git a/node_modules/graphiql/dist/components/QueryEditor.d.ts b/node_modules/graphiql/dist/components/QueryEditor.d.ts +index b508e92..35e7fb7 100644 +--- a/node_modules/graphiql/dist/components/QueryEditor.d.ts ++++ b/node_modules/graphiql/dist/components/QueryEditor.d.ts +@@ -1,7 +1,7 @@ + import React from 'react'; + import * as CM from 'codemirror'; + import { GraphQLSchema, GraphQLType } from 'graphql'; +-import { SizerComponent } from 'src/utility/CodeMirrorSizer'; ++import { SizerComponent } from '../utility/CodeMirrorSizer'; + declare type QueryEditorProps = { + schema?: GraphQLSchema; + value?: string; +diff --git a/node_modules/graphiql/dist/components/QueryHistory.d.ts b/node_modules/graphiql/dist/components/QueryHistory.d.ts +index 409af29..9362657 100644 +--- a/node_modules/graphiql/dist/components/QueryHistory.d.ts ++++ b/node_modules/graphiql/dist/components/QueryHistory.d.ts +@@ -1,7 +1,7 @@ + import React from 'react'; + import QueryStore, { QueryStoreItem } from '../utility/QueryStore'; + import { HandleEditLabelFn, HandleToggleFavoriteFn, HandleSelectQueryFn } from './HistoryQuery'; +-import StorageAPI from 'src/utility/StorageAPI'; ++import StorageAPI from '../utility/StorageAPI'; + declare type QueryHistoryProps = { + query?: string; + variables?: string; +diff --git a/node_modules/graphiql/dist/components/ResultViewer.d.ts b/node_modules/graphiql/dist/components/ResultViewer.d.ts +index 55976f5..11b725a 100644 +--- a/node_modules/graphiql/dist/components/ResultViewer.d.ts ++++ b/node_modules/graphiql/dist/components/ResultViewer.d.ts +@@ -1,6 +1,6 @@ + import React, { Component, FunctionComponent } from 'react'; + import * as CM from 'codemirror'; +-import { SizerComponent } from 'src/utility/CodeMirrorSizer'; ++import { SizerComponent } from '../utility/CodeMirrorSizer'; + import { ImagePreview as ImagePreviewComponent } from './ImagePreview'; + declare type ResultViewerProps = { + value?: string; diff --git a/patches/material-table+1.57.2.patch b/patches/material-table+1.57.2.patch new file mode 100644 index 0000000000..5751243775 --- /dev/null +++ b/patches/material-table+1.57.2.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/material-table/types/index.d.ts b/node_modules/material-table/types/index.d.ts +index 06b700b..5b3c765 100644 +--- a/node_modules/material-table/types/index.d.ts ++++ b/node_modules/material-table/types/index.d.ts +@@ -228,7 +228,6 @@ export interface Options { + showTitle?: boolean; + showTextRowsSelected?: boolean; + search?: boolean; +- searchText?: string; + searchFieldAlignment?: 'left' | 'right'; + searchFieldStyle?: React.CSSProperties; + searchText?: string; diff --git a/yarn.lock b/yarn.lock index 2c2b9eb6ba..07ab5e1707 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4621,6 +4621,11 @@ resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + "@zkochan/cmd-shim@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" @@ -9317,6 +9322,14 @@ find-versions@^3.0.0, find-versions@^3.2.0: dependencies: semver-regex "^2.0.0" +find-yarn-workspace-root@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" + integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== + dependencies: + fs-extra "^4.0.3" + micromatch "^3.1.4" + findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" @@ -9548,6 +9561,24 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" +fs-extra@^4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^9.0.0: version "9.0.0" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3" @@ -12490,6 +12521,13 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klaw-sync@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" + integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== + dependencies: + graceful-fs "^4.1.11" + klaw@^1.0.0: version "1.3.1" resolved "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" @@ -15221,6 +15259,24 @@ pascalcase@^0.1.1: resolved "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +patch-package@^6.2.2: + version "6.2.2" + resolved "https://registry.npmjs.org/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" + integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^1.2.1" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + path-browserify@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" From 3445778b2b4b501fc048c23099e650f39c7f2664 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 12:46:41 +0200 Subject: [PATCH 28/69] plugins/{auth,catalog}-backend: type fix --- plugins/auth-backend/src/service/router.ts | 2 +- plugins/catalog-backend/src/service/router.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index 6d0282738a..f238d973aa 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -28,7 +28,7 @@ export async function createRouter( const logger = options.logger.child({ plugin: 'auth' }); const router = Router(); - router.get('/ping', async (req, res) => { + router.get('/ping', async (_req, res) => { res.status(200).send('pong'); }); diff --git a/plugins/catalog-backend/src/service/router.ts b/plugins/catalog-backend/src/service/router.ts index 479c4c2c1f..d2fda8a587 100644 --- a/plugins/catalog-backend/src/service/router.ts +++ b/plugins/catalog-backend/src/service/router.ts @@ -36,7 +36,7 @@ export async function createRouter( if (itemsCatalog) { // Components router - .get('/components', async (req, res) => { + .get('/components', async (_req, res) => { const components = await itemsCatalog.components(); res.status(200).send(components); }) @@ -55,7 +55,7 @@ export async function createRouter( const output = await locationsCatalog.addLocation(input); res.status(201).send(output); }) - .get('/locations', async (req, res) => { + .get('/locations', async (_req, res) => { const output = await locationsCatalog.locations(); res.status(200).send(output); }) From c9f435638ae5d3a878d498fd6eddc3d406d5a672 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 12:46:57 +0200 Subject: [PATCH 29/69] plugins/graphiql: add missing codemirror types --- plugins/graphiql/package.json | 1 + yarn.lock | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index b5550478bb..dbbf75af70 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -48,6 +48,7 @@ "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", + "@types/codemirror": "^0.0.93", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/yarn.lock b/yarn.lock index 07ab5e1707..856a9f7352 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3720,6 +3720,13 @@ dependencies: "@types/node" "*" +"@types/codemirror@^0.0.93": + version "0.0.93" + resolved "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.93.tgz#74ce5e1132325cb2c88a9bb91fd819294fe0c8ed" + integrity sha512-7F2ksY4U5amV/bIkMTev0n22RWcFO2BBuFuFYmAJIT19gr3kDElr1phgjPsNKV/Pj301bujnMjSy5GlWla+cow== + dependencies: + "@types/tern" "*" + "@types/color-convert@*": version "1.9.0" resolved "https://registry.npmjs.org/@types/color-convert/-/color-convert-1.9.0.tgz#bfa8203e41e7c65471e9841d7e306a7cd8b5172d" @@ -4288,6 +4295,13 @@ "@types/minipass" "*" "@types/node" "*" +"@types/tern@*": + version "0.23.3" + resolved "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz#4b54538f04a88c9ff79de1f6f94f575a7f339460" + integrity sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w== + dependencies: + "@types/estree" "*" + "@types/testing-library__cypress@^5.0.3": version "5.0.3" resolved "https://registry.npmjs.org/@types/testing-library__cypress/-/testing-library__cypress-5.0.3.tgz#94969b7c1eea96e09d8e023a1d225590fa75a1fe" From c0336122c05a1e751737d467c0f948c19af51205 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 12:48:38 +0200 Subject: [PATCH 30/69] tsconfig: switch to top-level type checking --- package.json | 3 ++- tsconfig.json | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 624c29065e..151b1f39ff 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "start": "yarn workspace example-app start", "bundle": "yarn build && yarn workspace example-app bundle", "build": "lerna run build", - "clean": "lerna run clean", + "tsc": "tsc", + "clean": "backstage-cli clean && lerna run clean", "diff": "lerna run diff --", "test": "yarn build && lerna run test --since origin/master -- --coverage", "test:all": "yarn build && lerna run test -- --coverage", diff --git a/tsconfig.json b/tsconfig.json index f278b2777d..dbd26b8c94 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,10 @@ { - "extends": "@backstage/cli/config/tsconfig.json" + "extends": "@backstage/cli/config/tsconfig.json", + "include": ["packages/*/src", "plugins/*/src", "plugins/*/dev"], + "exclude": ["**/node_modules"], + "compilerOptions": { + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "dist" + } } From 07cb8ed190c4515486c833049fa5edffcaf47f64 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 12:50:30 +0200 Subject: [PATCH 31/69] packages/cli: rename lib/bundle to bundler + serveBundle --- packages/cli/src/commands/app/build.ts | 2 +- packages/cli/src/commands/app/serve.ts | 4 ++-- packages/cli/src/commands/plugin/serve.ts | 4 ++-- packages/cli/src/lib/{bundle => bundler}/bundle.ts | 0 packages/cli/src/lib/{bundle => bundler}/config.ts | 0 packages/cli/src/lib/{bundle => bundler}/index.ts | 2 +- packages/cli/src/lib/{bundle => bundler}/optimization.ts | 0 packages/cli/src/lib/{bundle => bundler}/paths.ts | 0 packages/cli/src/lib/{bundle => bundler}/server.ts | 2 +- packages/cli/src/lib/{bundle => bundler}/transforms.ts | 0 packages/cli/src/lib/{bundle => bundler}/types.ts | 0 11 files changed, 7 insertions(+), 7 deletions(-) rename packages/cli/src/lib/{bundle => bundler}/bundle.ts (100%) rename packages/cli/src/lib/{bundle => bundler}/config.ts (100%) rename packages/cli/src/lib/{bundle => bundler}/index.ts (93%) rename packages/cli/src/lib/{bundle => bundler}/optimization.ts (100%) rename packages/cli/src/lib/{bundle => bundler}/paths.ts (100%) rename packages/cli/src/lib/{bundle => bundler}/server.ts (97%) rename packages/cli/src/lib/{bundle => bundler}/transforms.ts (100%) rename packages/cli/src/lib/{bundle => bundler}/types.ts (100%) diff --git a/packages/cli/src/commands/app/build.ts b/packages/cli/src/commands/app/build.ts index 8b104d353c..482159e773 100644 --- a/packages/cli/src/commands/app/build.ts +++ b/packages/cli/src/commands/app/build.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { buildBundle } from '../../lib/bundle'; +import { buildBundle } from '../../lib/bundler'; import { Command } from 'commander'; export default async (cmd: Command) => { diff --git a/packages/cli/src/commands/app/serve.ts b/packages/cli/src/commands/app/serve.ts index cc892d6669..143e4139e5 100644 --- a/packages/cli/src/commands/app/serve.ts +++ b/packages/cli/src/commands/app/serve.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { startDevServer } from '../../lib/bundle'; +import { serveBundle } from '../../lib/bundler'; import { Command } from 'commander'; export default async (cmd: Command) => { - await startDevServer({ + await serveBundle({ entry: 'src/index', checksEnabled: cmd.check, }); diff --git a/packages/cli/src/commands/plugin/serve.ts b/packages/cli/src/commands/plugin/serve.ts index 1616e15415..79a540d879 100644 --- a/packages/cli/src/commands/plugin/serve.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { startDevServer } from '../../lib/bundle'; +import { serveBundle } from '../../lib/bundler'; import { Command } from 'commander'; export default async (cmd: Command) => { - await startDevServer({ + await serveBundle({ entry: 'dev/index', checksEnabled: cmd.check, }); diff --git a/packages/cli/src/lib/bundle/bundle.ts b/packages/cli/src/lib/bundler/bundle.ts similarity index 100% rename from packages/cli/src/lib/bundle/bundle.ts rename to packages/cli/src/lib/bundler/bundle.ts diff --git a/packages/cli/src/lib/bundle/config.ts b/packages/cli/src/lib/bundler/config.ts similarity index 100% rename from packages/cli/src/lib/bundle/config.ts rename to packages/cli/src/lib/bundler/config.ts diff --git a/packages/cli/src/lib/bundle/index.ts b/packages/cli/src/lib/bundler/index.ts similarity index 93% rename from packages/cli/src/lib/bundle/index.ts rename to packages/cli/src/lib/bundler/index.ts index 7a1303f980..cdfb5f3897 100644 --- a/packages/cli/src/lib/bundle/index.ts +++ b/packages/cli/src/lib/bundler/index.ts @@ -15,4 +15,4 @@ */ export { buildBundle } from './bundle'; -export { startDevServer } from './server'; +export { serveBundle } from './server'; diff --git a/packages/cli/src/lib/bundle/optimization.ts b/packages/cli/src/lib/bundler/optimization.ts similarity index 100% rename from packages/cli/src/lib/bundle/optimization.ts rename to packages/cli/src/lib/bundler/optimization.ts diff --git a/packages/cli/src/lib/bundle/paths.ts b/packages/cli/src/lib/bundler/paths.ts similarity index 100% rename from packages/cli/src/lib/bundle/paths.ts rename to packages/cli/src/lib/bundler/paths.ts diff --git a/packages/cli/src/lib/bundle/server.ts b/packages/cli/src/lib/bundler/server.ts similarity index 97% rename from packages/cli/src/lib/bundle/server.ts rename to packages/cli/src/lib/bundler/server.ts index 4bbdfde581..ea29b04459 100644 --- a/packages/cli/src/lib/bundle/server.ts +++ b/packages/cli/src/lib/bundler/server.ts @@ -23,7 +23,7 @@ import { createConfig } from './config'; import { ServeOptions } from './types'; import { resolveBundlingPaths } from './paths'; -export async function startDevServer(options: ServeOptions) { +export async function serveBundle(options: ServeOptions) { const host = process.env.HOST ?? '0.0.0.0'; const defaultPort = parseInt(process.env.PORT ?? '', 10) || 3000; diff --git a/packages/cli/src/lib/bundle/transforms.ts b/packages/cli/src/lib/bundler/transforms.ts similarity index 100% rename from packages/cli/src/lib/bundle/transforms.ts rename to packages/cli/src/lib/bundler/transforms.ts diff --git a/packages/cli/src/lib/bundle/types.ts b/packages/cli/src/lib/bundler/types.ts similarity index 100% rename from packages/cli/src/lib/bundle/types.ts rename to packages/cli/src/lib/bundler/types.ts From a2db7ff37d46c70bc0991bc3a2e95ba968086e44 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 13:05:13 +0200 Subject: [PATCH 32/69] packages/cli: support multiple packager configs --- packages/cli/src/lib/packager/config.ts | 54 ++++++++++++----------- packages/cli/src/lib/packager/packager.ts | 20 ++++++--- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/packages/cli/src/lib/packager/config.ts b/packages/cli/src/lib/packager/config.ts index 5d0c3af9c5..ccaaf9aec5 100644 --- a/packages/cli/src/lib/packager/config.ts +++ b/packages/cli/src/lib/packager/config.ts @@ -21,32 +21,34 @@ import postcss from 'rollup-plugin-postcss'; import esbuild from 'rollup-plugin-esbuild'; import imageFiles from 'rollup-plugin-image-files'; import json from '@rollup/plugin-json'; -import { RollupWatchOptions } from 'rollup'; +import { RollupOptions } from 'rollup'; -export const makeConfig = (): RollupWatchOptions => { - return { - input: 'src/index.ts', - output: { - file: 'dist/index.esm.js', - format: 'module', +export const makeConfigs = (): RollupOptions[] => { + return [ + { + input: 'src/index.ts', + output: { + file: 'dist/index.esm.js', + format: 'module', + }, + plugins: [ + peerDepsExternal({ + includeDependencies: true, + }), + resolve({ + mainFields: ['browser', 'module', 'main'], + }), + commonjs({ + include: ['node_modules/**', '../../node_modules/**'], + exclude: ['**/*.stories.*', '**/*.test.*'], + }), + postcss(), + imageFiles(), + json(), + esbuild({ + target: 'es2019', + }), + ], }, - plugins: [ - peerDepsExternal({ - includeDependencies: true, - }), - resolve({ - mainFields: ['browser', 'module', 'main'], - }), - commonjs({ - include: ['node_modules/**', '../../node_modules/**'], - exclude: ['**/*.stories.*', '**/*.test.*'], - }), - postcss(), - imageFiles(), - json(), - esbuild({ - target: 'es2019', - }), - ], - }; + ]; }; diff --git a/packages/cli/src/lib/packager/packager.ts b/packages/cli/src/lib/packager/packager.ts index 41b7635106..e1d88bf7d9 100644 --- a/packages/cli/src/lib/packager/packager.ts +++ b/packages/cli/src/lib/packager/packager.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { rollup, OutputOptions } from 'rollup'; +import { rollup, RollupOptions } from 'rollup'; import chalk from 'chalk'; import { relative as relativePath } from 'path'; import { paths } from '../paths'; -import { makeConfig } from './config'; +import { makeConfigs } from './config'; function formatErrorMessage(error: any) { let msg = ''; @@ -67,13 +67,21 @@ function formatErrorMessage(error: any) { return msg; } -export const buildPackage = async () => { +async function build(config: RollupOptions) { try { - const config = makeConfig(); const bundle = await rollup(config); - await bundle.generate(config.output as OutputOptions); - await bundle.write(config.output as OutputOptions); + if (config.output) { + for (const output of [config.output].flat()) { + await bundle.generate(output); + await bundle.write(output); + } + } } catch (error) { throw new Error(formatErrorMessage(error)); } +} + +export const buildPackage = async () => { + const configs = makeConfigs(); + await Promise.all(configs.map(build)); }; From 7170a8c174432c9126238e2d09ab8ea6c0162a28 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 13:25:17 +0200 Subject: [PATCH 33/69] packages/cli: added d.ts rollup build to packager --- packages/cli/package.json | 1 + packages/cli/src/lib/packager/config.ts | 29 ++++++++++++++++++++++- packages/cli/src/lib/packager/packager.ts | 2 +- yarn.lock | 7 ++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index e4c4117a3e..5e028e72a8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -63,6 +63,7 @@ "recursive-readdir": "^2.2.2", "replace-in-file": "^6.0.0", "rollup": "^2.3.2", + "rollup-plugin-dts": "^1.4.6", "rollup-plugin-esbuild": "^1.4.1", "rollup-plugin-image-files": "^1.4.2", "rollup-plugin-peer-deps-external": "^2.2.2", diff --git a/packages/cli/src/lib/packager/config.ts b/packages/cli/src/lib/packager/config.ts index ccaaf9aec5..df91f8067a 100644 --- a/packages/cli/src/lib/packager/config.ts +++ b/packages/cli/src/lib/packager/config.ts @@ -14,16 +14,35 @@ * limitations under the License. */ +import fs from 'fs-extra'; +import { relative as relativePath } from 'path'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; import postcss from 'rollup-plugin-postcss'; import esbuild from 'rollup-plugin-esbuild'; import imageFiles from 'rollup-plugin-image-files'; +import dts from 'rollup-plugin-dts'; import json from '@rollup/plugin-json'; import { RollupOptions } from 'rollup'; -export const makeConfigs = (): RollupOptions[] => { +import { paths } from '../paths'; + +export const makeConfigs = async (): Promise => { + const typesInput = paths.resolveTargetRoot( + 'dist', + relativePath(paths.targetRoot, paths.targetDir), + 'src/index.d.ts', + ); + + const declarationsExist = await fs.pathExists(typesInput); + if (!declarationsExist) { + const path = relativePath(paths.targetDir, typesInput); + throw new Error( + `No declaration files found at ${path}, be sure to run tsc to generate .d.ts files before packaging`, + ); + } + return [ { input: 'src/index.ts', @@ -50,5 +69,13 @@ export const makeConfigs = (): RollupOptions[] => { }), ], }, + { + input: typesInput, + output: { + file: 'dist/index.d.ts', + format: 'es', + }, + plugins: [dts()], + }, ]; }; diff --git a/packages/cli/src/lib/packager/packager.ts b/packages/cli/src/lib/packager/packager.ts index e1d88bf7d9..e6f71e270b 100644 --- a/packages/cli/src/lib/packager/packager.ts +++ b/packages/cli/src/lib/packager/packager.ts @@ -82,6 +82,6 @@ async function build(config: RollupOptions) { } export const buildPackage = async () => { - const configs = makeConfigs(); + const configs = await makeConfigs(); await Promise.all(configs.map(build)); }; diff --git a/yarn.lock b/yarn.lock index 856a9f7352..47b54d2f7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17475,6 +17475,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rollup-plugin-dts@^1.4.6: + version "1.4.6" + resolved "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-1.4.6.tgz#26e3da11ec647cfffee9658b63fa41d67e7840b9" + integrity sha512-1o5+eI97Ne8zXJrgdasn/xGi0xKuovCQwZRtPI2Lfl/c6qa9jQTFbn60NwOx3gWJ89K265/6kpDuahnBbplyWA== + optionalDependencies: + "@babel/code-frame" "^7.8.3" + rollup-plugin-esbuild@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-1.4.1.tgz#b388ebd4cda1198208d7746feea7656d485019b0" From 1595bf11ddc85fe76cee9a6251a8f80c30527577 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 15:15:24 +0200 Subject: [PATCH 34/69] packages/cli: update jest config to point to src and use sucrase --- packages/cli/config/jest.js | 65 +++++++++++++++++++++++++------------ packages/cli/package.json | 1 + yarn.lock | 9 ++++- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/packages/cli/config/jest.js b/packages/cli/config/jest.js index 77f345a0dd..53e0f98f18 100644 --- a/packages/cli/config/jest.js +++ b/packages/cli/config/jest.js @@ -14,44 +14,67 @@ * limitations under the License. */ -const fs = require('fs'); +const fs = require('fs-extra'); const path = require('path'); -// If the package has it's own jest config, we use that instead. It will have to -// manually extend @spotify/web-scripts/config/jest.config.js that is desired -if (fs.existsSync('jest.config.js')) { - module.exports = require(path.resolve('jest.config.js')); -} else if (fs.existsSync('jest.config.ts')) { - module.exports = require(path.resolve('jest.config.ts')); -} else { - const extraOptions = { - modulePaths: [''], - moduleNameMapper: { - '\\.(css|less|scss|sss|styl)$': require.resolve('jest-css-modules'), - }, +async function getConfig() { + // If the package has it's own jest config, we use that instead. + if (await fs.pathExists('jest.config.js')) { + return require(path.resolve('jest.config.js')); + } else if (await fs.pathExists('jest.config.ts')) { + return require(path.resolve('jest.config.ts')); + } + + const moduleNameMapper = { + '\\.(css|less|scss|sss|styl)$': require.resolve('jest-css-modules'), + }; + + // Only point to src/ if we're not in CI, there we just build packages first anyway + if (!process.env.CI) { + const LernaProject = require('@lerna/project'); + const project = new LernaProject(path.resolve('.')); + const packages = await project.getPackages(); + + // To avoid having to build all deps inside the monorepo before running tests, + // we point directory to src/ where applicable. + for (const pkg of packages) { + const mainSrc = pkg.get('main:src'); + if (mainSrc) { + moduleNameMapper[pkg.name] = path.resolve(pkg.location, mainSrc); + } + } + } + + const options = { + rootDir: path.resolve('src'), + coverageDirectory: path.resolve('coverage'), + collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts'], + moduleNameMapper, + // 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'), + '\\.(js|jsx|ts|tsx)': require.resolve('@sucrase/jest-plugin'), }, - // Default behaviour is to not apply transforms for node_modules, but we still want to tranform .esm.js files + + // Default behaviour is to not apply transforms for node_modules, but we still want + // to apply the esm-transformer to .esm.js files, since that's what we use in backstage packages. transformIgnorePatterns: ['/node_modules/(?!.*\\.esm\\.js$)'], }; // Use src/setupTests.ts as the default location for configuring test env if (fs.existsSync('src/setupTests.ts')) { - extraOptions.setupFilesAfterEnv = ['/setupTests.ts']; + options.setupFilesAfterEnv = ['/setupTests.ts']; } - module.exports = { - // We base the jest config on web-scripts, it's pretty flat so we skip any complex merging of config objects - // Config can be found here: https://github.com/spotify/web-scripts/blob/master/packages/web-scripts/config/jest.config.js - ...require('@spotify/web-scripts/config/jest.config.js'), - - ...extraOptions, + return { + ...options, // If the package has a jest object in package.json we merge that config in. This is the recommended // location for configuring tests. ...require(path.resolve('package.json')).jest, }; } + +module.exports = getConfig(); diff --git a/packages/cli/package.json b/packages/cli/package.json index 5e028e72a8..f3f9b04667 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -36,6 +36,7 @@ "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@spotify/web-scripts": "^6.0.0", + "@sucrase/jest-plugin": "^2.0.0", "@sucrase/webpack-loader": "^2.0.0", "bfj": "^7.0.2", "chalk": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 47b54d2f7a..13820ed3e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3395,6 +3395,13 @@ "@styled-system/core" "^5.1.2" "@styled-system/css" "^5.1.5" +"@sucrase/jest-plugin@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@sucrase/jest-plugin/-/jest-plugin-2.0.0.tgz#bcca4d877f5013fd66d4092e4c8ba475b18228e4" + integrity sha512-UqmtOnj2OliwV1qKFCQsci41vPX665wGvf5YosRjL+l6jF69HrgB3T8gGnCcF4tAmRycYw8t59x+Dgz64szXWA== + dependencies: + sucrase "^3.0.0" + "@sucrase/webpack-loader@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@sucrase/webpack-loader/-/webpack-loader-2.0.0.tgz#b8a70b8d3df3eeb570e6a3315e1a9c6b723e4a37" @@ -18844,7 +18851,7 @@ stylis@3.5.0: resolved "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz#016fa239663d77f868fef5b67cf201c4b7c701e1" integrity sha512-pP7yXN6dwMzAR29Q0mBrabPCe0/mNO1MSr93bhay+hcZondvMMTpeGyd8nbhYJdyperNT2DRxONQuUGcJr5iPw== -sucrase@^3.14.0: +sucrase@^3.0.0, sucrase@^3.14.0: version "3.14.0" resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.14.0.tgz#4364f4da5d57465acba364ef65b14ca78672d500" integrity sha512-sWyDtHMD0Q1wv4GpL3Jp10Pxi8ht4qrYeo1tAtHJ21BaMjl3PCrIM22FudoKRVY90r+lj3ytvIcf6WkYqt7TJg== From 04c66c14df94f26277ac74c62c048776e130e315 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 16:13:20 +0200 Subject: [PATCH 35/69] packages/cli: revert jest tranform to use ts-jest, as sucrase doesn't hoist mocks --- packages/cli/config/jest.js | 2 +- packages/cli/package.json | 1 - yarn.lock | 9 +-------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/cli/config/jest.js b/packages/cli/config/jest.js index 53e0f98f18..e0b82da2bb 100644 --- a/packages/cli/config/jest.js +++ b/packages/cli/config/jest.js @@ -55,7 +55,7 @@ async function getConfig() { // 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'), - '\\.(js|jsx|ts|tsx)': require.resolve('@sucrase/jest-plugin'), + '\\.(js|jsx|ts|tsx)': require.resolve('ts-jest'), }, // Default behaviour is to not apply transforms for node_modules, but we still want diff --git a/packages/cli/package.json b/packages/cli/package.json index f3f9b04667..5e028e72a8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -36,7 +36,6 @@ "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@spotify/web-scripts": "^6.0.0", - "@sucrase/jest-plugin": "^2.0.0", "@sucrase/webpack-loader": "^2.0.0", "bfj": "^7.0.2", "chalk": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 13820ed3e8..47b54d2f7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3395,13 +3395,6 @@ "@styled-system/core" "^5.1.2" "@styled-system/css" "^5.1.5" -"@sucrase/jest-plugin@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@sucrase/jest-plugin/-/jest-plugin-2.0.0.tgz#bcca4d877f5013fd66d4092e4c8ba475b18228e4" - integrity sha512-UqmtOnj2OliwV1qKFCQsci41vPX665wGvf5YosRjL+l6jF69HrgB3T8gGnCcF4tAmRycYw8t59x+Dgz64szXWA== - dependencies: - sucrase "^3.0.0" - "@sucrase/webpack-loader@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@sucrase/webpack-loader/-/webpack-loader-2.0.0.tgz#b8a70b8d3df3eeb570e6a3315e1a9c6b723e4a37" @@ -18851,7 +18844,7 @@ stylis@3.5.0: resolved "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz#016fa239663d77f868fef5b67cf201c4b7c701e1" integrity sha512-pP7yXN6dwMzAR29Q0mBrabPCe0/mNO1MSr93bhay+hcZondvMMTpeGyd8nbhYJdyperNT2DRxONQuUGcJr5iPw== -sucrase@^3.0.0, sucrase@^3.14.0: +sucrase@^3.14.0: version "3.14.0" resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.14.0.tgz#4364f4da5d57465acba364ef65b14ca78672d500" integrity sha512-sWyDtHMD0Q1wv4GpL3Jp10Pxi8ht4qrYeo1tAtHJ21BaMjl3PCrIM22FudoKRVY90r+lj3ytvIcf6WkYqt7TJg== From 8cee042e13a685ed02b4e9ed67c08e2c974a68ce Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 16:23:23 +0200 Subject: [PATCH 36/69] packages/storybook: point to src/ and use sucrase --- packages/storybook/.storybook/main.js | 41 +++++++++++++-------------- packages/storybook/package.json | 4 +-- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/packages/storybook/.storybook/main.js b/packages/storybook/.storybook/main.js index 7243452357..5f9bde16c3 100644 --- a/packages/storybook/.storybook/main.js +++ b/packages/storybook/.storybook/main.js @@ -15,15 +15,10 @@ module.exports = { webpackFinal: async (config) => { const coreSrc = path.resolve(__dirname, '../../core/src'); - 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'), - }; + // Mirror config in packages/cli/src/lib/bundler + config.resolve.mainFields = ['main:src', 'browser', 'module', 'main']; - // Remove the default babel-loader for js files, we're using ts-loader instead + // Remove the default babel-loader for js files, we're using sucrase instead const [jsLoader] = config.module.rules.splice(0, 1); if (jsLoader.use[0].loader !== 'babel-loader') { throw new Error( @@ -33,20 +28,24 @@ module.exports = { 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, - }, + config.module.rules.push( + { + test: /\.(tsx?)$/, + exclude: /node_modules/, + loader: require.resolve('@sucrase/webpack-loader'), + options: { + transforms: ['typescript', 'jsx', 'react-hot-loader'], }, - ], - }); + }, + { + test: /\.(jsx?|mjs)$/, + exclude: /node_modules/, + loader: require.resolve('@sucrase/webpack-loader'), + options: { + transforms: ['jsx', 'react-hot-loader'], + }, + }, + ); // Disable ProgressPlugin which logs verbose webpack build progress. Warnings and Errors are still logged. config.plugins = config.plugins.filter( diff --git a/packages/storybook/package.json b/packages/storybook/package.json index 64be72bdcf..be449f91ed 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -4,8 +4,8 @@ "description": "Storybook build for core package", "private": true, "scripts": { - "start": "backstage-cli watch-deps --build -- start-storybook -p 6006", - "build-storybook": "backstage-cli watch-deps --build -- build-storybook --output-dir dist" + "start": "start-storybook -p 6006", + "build-storybook": "build-storybook --output-dir dist" }, "workspaces": { "nohoist": [ From 1dd33e8e33345157c91101e9376b4ab4644d35bd Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 16:44:47 +0200 Subject: [PATCH 37/69] packages,plugins: remove extra tsconfig files --- packages/app/tsconfig.json | 21 ------------------- packages/cli/config/tsconfig.json | 1 + .../templates/default-plugin/tsconfig.json | 5 ----- packages/cli/tsconfig.build.json | 4 +++- packages/cli/tsconfig.json | 5 ----- packages/core/tsconfig.json | 5 ----- packages/dev-utils/tsconfig.json | 5 ----- packages/storybook/tsconfig.json | 5 ----- packages/test-utils-core/tsconfig.json | 5 ----- packages/test-utils/tsconfig.json | 5 ----- packages/theme/tsconfig.json | 5 ----- plugins/catalog/tsconfig.json | 5 ----- plugins/explore/tsconfig.json | 5 ----- plugins/graphiql/tsconfig.json | 5 ----- plugins/home-page/tsconfig.json | 5 ----- plugins/lighthouse/tsconfig.json | 5 ----- plugins/scaffolder/tsconfig.json | 5 ----- plugins/tech-radar/tsconfig.json | 5 ----- plugins/welcome/tsconfig.json | 5 ----- tsconfig.json | 2 -- 20 files changed, 4 insertions(+), 104 deletions(-) delete mode 100644 packages/app/tsconfig.json delete mode 100644 packages/cli/templates/default-plugin/tsconfig.json delete mode 100644 packages/cli/tsconfig.json delete mode 100644 packages/core/tsconfig.json delete mode 100644 packages/dev-utils/tsconfig.json delete mode 100644 packages/storybook/tsconfig.json delete mode 100644 packages/test-utils-core/tsconfig.json delete mode 100644 packages/test-utils/tsconfig.json delete mode 100644 packages/theme/tsconfig.json delete mode 100644 plugins/catalog/tsconfig.json delete mode 100644 plugins/explore/tsconfig.json delete mode 100644 plugins/graphiql/tsconfig.json delete mode 100644 plugins/home-page/tsconfig.json delete mode 100644 plugins/lighthouse/tsconfig.json delete mode 100644 plugins/scaffolder/tsconfig.json delete mode 100644 plugins/tech-radar/tsconfig.json delete mode 100644 plugins/welcome/tsconfig.json diff --git a/packages/app/tsconfig.json b/packages/app/tsconfig.json deleted file mode 100644 index 43ab6d4006..0000000000 --- a/packages/app/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "@spotify/web-scripts/config/tsconfig.json", - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "react", - "incremental": false, - "types": ["node", "jest"] - }, - "include": ["src"] -} diff --git a/packages/cli/config/tsconfig.json b/packages/cli/config/tsconfig.json index f905dcb771..cb295b45f6 100644 --- a/packages/cli/config/tsconfig.json +++ b/packages/cli/config/tsconfig.json @@ -4,6 +4,7 @@ "compilerOptions": { "allowJs": true, "noEmit": false, + "emitDeclarationOnly": true, "incremental": true, "target": "ES2019", "module": "ESNext", diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/packages/cli/templates/default-plugin/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index 1ef5cdace5..aa31be5dee 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -1,8 +1,10 @@ { - "extends": "./tsconfig.json", + "extends": "./config/tsconfig.json", + "include": ["src"], "exclude": ["**/*.test.*"], "compilerOptions": { "outDir": "dist", + "emitDeclarationOnly": false, "module": "CommonJS" } } diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json deleted file mode 100644 index 5a3931ffce..0000000000 --- a/packages/cli/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": {} -} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json deleted file mode 100644 index 5a3931ffce..0000000000 --- a/packages/core/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": {} -} diff --git a/packages/dev-utils/tsconfig.json b/packages/dev-utils/tsconfig.json deleted file mode 100644 index 5a3931ffce..0000000000 --- a/packages/dev-utils/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": {} -} diff --git a/packages/storybook/tsconfig.json b/packages/storybook/tsconfig.json deleted file mode 100644 index 87132f9b4f..0000000000 --- a/packages/storybook/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": [".storybook/**/*"], - "compilerOptions": {} -} diff --git a/packages/test-utils-core/tsconfig.json b/packages/test-utils-core/tsconfig.json deleted file mode 100644 index 5a3931ffce..0000000000 --- a/packages/test-utils-core/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": {} -} diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json deleted file mode 100644 index 5a3931ffce..0000000000 --- a/packages/test-utils/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": {} -} diff --git a/packages/theme/tsconfig.json b/packages/theme/tsconfig.json deleted file mode 100644 index 5a3931ffce..0000000000 --- a/packages/theme/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": {} -} diff --git a/plugins/catalog/tsconfig.json b/plugins/catalog/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/catalog/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/explore/tsconfig.json b/plugins/explore/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/explore/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/graphiql/tsconfig.json b/plugins/graphiql/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/graphiql/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/home-page/tsconfig.json b/plugins/home-page/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/home-page/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/lighthouse/tsconfig.json b/plugins/lighthouse/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/lighthouse/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/scaffolder/tsconfig.json b/plugins/scaffolder/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/scaffolder/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/tech-radar/tsconfig.json b/plugins/tech-radar/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/tech-radar/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/plugins/welcome/tsconfig.json b/plugins/welcome/tsconfig.json deleted file mode 100644 index b663b01fa2..0000000000 --- a/plugins/welcome/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src", "dev"], - "compilerOptions": {} -} diff --git a/tsconfig.json b/tsconfig.json index dbd26b8c94..52cdd1e825 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,6 @@ "include": ["packages/*/src", "plugins/*/src", "plugins/*/dev"], "exclude": ["**/node_modules"], "compilerOptions": { - "noEmit": false, - "emitDeclarationOnly": true, "outDir": "dist" } } From 176085e7a1c907318a305668025b6d819009847d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 16:53:23 +0200 Subject: [PATCH 38/69] packages/cli: skip caching of plugin builds --- packages/cli/src/commands/plugin/build.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/cli/src/commands/plugin/build.ts b/packages/cli/src/commands/plugin/build.ts index 9af79028f4..561d79ed55 100644 --- a/packages/cli/src/commands/plugin/build.ts +++ b/packages/cli/src/commands/plugin/build.ts @@ -14,11 +14,8 @@ * limitations under the License. */ -import { withCache, getDefaultCacheOptions } from '../../lib/buildCache'; import { buildPackage } from '../../lib/packager'; export default async () => { - await withCache(getDefaultCacheOptions(), async () => { - await buildPackage(); - }); + await buildPackage(); }; From 7cb0bdb282979d6ef17a5d01a24afecc9c182b56 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 16:56:17 +0200 Subject: [PATCH 39/69] packages/cli: fix bad bundler loader options --- packages/cli/src/lib/bundler/transforms.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/cli/src/lib/bundler/transforms.ts b/packages/cli/src/lib/bundler/transforms.ts index f87ba3b6e3..0856b2fc9d 100644 --- a/packages/cli/src/lib/bundler/transforms.ts +++ b/packages/cli/src/lib/bundler/transforms.ts @@ -67,17 +67,7 @@ export const transforms = ( { test: /\.css$/i, use: [ - isDev - ? { - loader: require.resolve('style-loader'), - options: { - attrs: { origin: 'main' }, - }, - } - : { - loader: MiniCssExtractPlugin.loader, - }, - + isDev ? require.resolve('style-loader') : MiniCssExtractPlugin.loader, { loader: require.resolve('css-loader'), options: { From 65805ca70bec0d330fa6d23ae78f44c55aac132f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 17:41:51 +0200 Subject: [PATCH 40/69] packages: update root package.json and template tsconfig --- package.json | 6 +++--- packages/cli/templates/default-app/package.json.hbs | 11 +++++++---- packages/cli/templates/default-app/tsconfig.json | 7 ++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 151b1f39ff..e5028bfd2f 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ }, "scripts": { "start": "yarn workspace example-app start", - "bundle": "yarn build && yarn workspace example-app bundle", + "bundle": "yarn workspace example-app bundle", "build": "lerna run build", "tsc": "tsc", "clean": "backstage-cli clean && lerna run clean", "diff": "lerna run diff --", - "test": "yarn build && lerna run test --since origin/master -- --coverage", - "test:all": "yarn build && lerna run test -- --coverage", + "test": "lerna run test --since origin/master -- --coverage", + "test:all": "lerna run test -- --coverage", "lint": "lerna run lint --since origin/master --", "lint:all": "lerna run lint --", "docker-build": "yarn bundle && docker build . -t spotify/backstage", diff --git a/packages/cli/templates/default-app/package.json.hbs b/packages/cli/templates/default-app/package.json.hbs index 231194a54e..1712584a87 100644 --- a/packages/cli/templates/default-app/package.json.hbs +++ b/packages/cli/templates/default-app/package.json.hbs @@ -7,14 +7,17 @@ }, "scripts": { "start": "yarn workspace app start", - "bundle": "yarn build && yarn workspace app bundle", + "bundle": "yarn workspace app bundle", "build": "lerna run build", - "test": "yarn build && lerna run test --since origin/master -- --coverage", - "test:all": "yarn build && lerna run test -- --coverage", + "tsc": "tsc", + "clean": "backstage-cli clean && lerna run clean", + "diff": "lerna run diff --", + "test": "lerna run test --since origin/master -- --coverage", + "test:all": "lerna run test -- --coverage", "lint": "lerna run lint --since origin/master --", "lint:all": "lerna run lint --", "create-plugin": "backstage-cli create-plugin", - "clean": "lerna run clean" + "remove-plugin": "backstage-cli remove-plugin" }, "workspaces": { "packages": [ diff --git a/packages/cli/templates/default-app/tsconfig.json b/packages/cli/templates/default-app/tsconfig.json index f278b2777d..52cdd1e825 100644 --- a/packages/cli/templates/default-app/tsconfig.json +++ b/packages/cli/templates/default-app/tsconfig.json @@ -1,3 +1,8 @@ { - "extends": "@backstage/cli/config/tsconfig.json" + "extends": "@backstage/cli/config/tsconfig.json", + "include": ["packages/*/src", "plugins/*/src", "plugins/*/dev"], + "exclude": ["**/node_modules"], + "compilerOptions": { + "outDir": "dist" + } } From 12ef5f6764380107d0af094e5dad986174f583e4 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 17:42:18 +0200 Subject: [PATCH 41/69] packages/cli: make create-app patch entrypoints of local deps --- .../cli/src/commands/create-app/createApp.ts | 88 ++++++++++++++----- 1 file changed, 64 insertions(+), 24 deletions(-) diff --git a/packages/cli/src/commands/create-app/createApp.ts b/packages/cli/src/commands/create-app/createApp.ts index bfb78762d9..b638c22353 100644 --- a/packages/cli/src/commands/create-app/createApp.ts +++ b/packages/cli/src/commands/create-app/createApp.ts @@ -26,6 +26,16 @@ import { paths } from '../../lib/paths'; import { version } from '../../lib/version'; const exec = promisify(execCb); +// List of local packages that we need to modify as a part of an E2E test +const PATCH_PACKAGES = [ + 'cli', + 'core', + 'dev-utils', + 'test-utils', + 'test-utils-core', + 'theme', +]; + async function checkExists(rootDir: string, name: string) { await Task.forItem('checking', name, async () => { const destination = resolvePath(rootDir, name); @@ -57,19 +67,34 @@ async function cleanUp(tempDir: string) { }); } -async function buildApp(appFolder: string) { - const commands = ['yarn install', 'yarn build']; - for (const command of commands) { - await Task.forItem('executing', command, async () => { - process.chdir(appFolder); +async function buildApp(appDir: string) { + const runCmd = async (cmd: string) => { + await Task.forItem('executing', cmd, async () => { + process.chdir(appDir); - await exec(command).catch((error) => { + await exec(cmd).catch((error) => { process.stdout.write(error.stderr); process.stdout.write(error.stdout); - throw new Error(`Could not execute command ${chalk.cyan(command)}`); + throw new Error(`Could not execute command ${chalk.cyan(cmd)}`); }); }); + }; + + // e2e testing needs special treatment + if (process.env.BACKSTAGE_E2E_CLI_TEST) { + Task.section('Linking packages locally for e2e tests'); + await patchPackageResolutions(appDir); } + + await runCmd('yarn install'); + + if (process.env.BACKSTAGE_E2E_CLI_TEST) { + Task.section('Patchling local dependencies for e2e tests'); + await patchLocalDependencies(appDir); + } + + await runCmd('yarn tsc'); + await runCmd('yarn build'); } export async function moveApp( @@ -86,23 +111,14 @@ export async function moveApp( }); } -async function addPackageResolutions(appDir: string) { +async function patchPackageResolutions(appDir: string) { const pkgJsonPath = resolvePath(appDir, 'package.json'); const pkgJson = await fs.readJson(pkgJsonPath); pkgJson.resolutions = pkgJson.resolutions || {}; pkgJson.dependencies = pkgJson.dependencies || {}; - const depNames = [ - 'cli', - 'core', - 'dev-utils', - 'test-utils', - 'test-utils-core', - 'theme', - ]; - - for (const name of depNames) { + for (const name of PATCH_PACKAGES) { await Task.forItem( 'adding', `@backstage/${name} link to package.json`, @@ -124,6 +140,36 @@ async function addPackageResolutions(appDir: string) { } } +async function patchLocalDependencies(appDir: string) { + for (const name of PATCH_PACKAGES) { + await Task.forItem( + 'patching', + `node_modules/@backstage/${name} package.json`, + async () => { + const depJsonPath = resolvePath( + appDir, + 'node_modules/@backstage', + name, + 'package.json', + ); + const depJson = await fs.readJson(depJsonPath); + + // We want dist to be used for e2e tests + delete depJson['main:src']; + depJson.types = 'dist/index.d.ts'; + + await fs + .writeJSON(depJsonPath, depJson, { encoding: 'utf8', spaces: 2 }) + .catch((error) => { + throw new Error( + `Failed to add resolutions to package.json: ${error.message}`, + ); + }); + }, + ); + } +} + export default async () => { const questions: Question[] = [ { @@ -164,12 +210,6 @@ export default async () => { Task.section('Moving to final location'); await moveApp(tempDir, appDir, answers.name); - // e2e testing needs special treatment - if (process.env.BACKSTAGE_E2E_CLI_TEST) { - Task.section('Linking packages locally for e2e tests'); - await addPackageResolutions(appDir); - } - Task.section('Building the app'); await buildApp(appDir); From 281f7d512e33f776e4b3781cfb7e0438121e5983 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 17:42:33 +0200 Subject: [PATCH 42/69] packages/core: list types as dependencies --- packages/core/package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 60052a50c3..d444fc0fee 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -31,6 +31,13 @@ "@backstage/theme": "^0.1.1-alpha.5", "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", + "@types/classnames": "^2.2.9", + "@types/google-protobuf": "^3.7.2", + "@types/jest": "^25.2.1", + "@types/node": "^12.0.0", + "@types/react-helmet": "^5.0.15", + "@types/react-sparklines": "^1.7.0", + "@types/zen-observable": "^0.8.0", "classnames": "^2.2.6", "clsx": "^1.1.0", "lodash": "^4.17.15", @@ -54,14 +61,7 @@ "@backstage/test-utils-core": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", - "@types/classnames": "^2.2.9", - "@types/google-protobuf": "^3.7.2", - "@types/jest": "^25.2.1", - "@types/node": "^12.0.0", - "@types/react-helmet": "^5.0.15", - "@types/react-sparklines": "^1.7.0", - "@types/zen-observable": "^0.8.0" + "@testing-library/user-event": "^7.1.2" }, "files": [ "dist/**/*.{js,d.ts}" From 5d61636f7f85734d2afd0a2b1eaf1ab754c82538 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 20:59:50 +0200 Subject: [PATCH 43/69] packages/cli: update app template for new build system --- packages/cli/templates/default-app/package.json.hbs | 4 +++- packages/cli/templates/default-app/patches/README.md | 11 +++++++++++ .../default-app/patches/material-table+1.57.2.patch | 12 ++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 packages/cli/templates/default-app/patches/README.md create mode 100644 packages/cli/templates/default-app/patches/material-table+1.57.2.patch diff --git a/packages/cli/templates/default-app/package.json.hbs b/packages/cli/templates/default-app/package.json.hbs index 1712584a87..589e20e298 100644 --- a/packages/cli/templates/default-app/package.json.hbs +++ b/packages/cli/templates/default-app/package.json.hbs @@ -17,7 +17,8 @@ "lint": "lerna run lint --since origin/master --", "lint:all": "lerna run lint --", "create-plugin": "backstage-cli create-plugin", - "remove-plugin": "backstage-cli remove-plugin" + "remove-plugin": "backstage-cli remove-plugin", + "postinstall": "patch-package" }, "workspaces": { "packages": [ @@ -28,6 +29,7 @@ "devDependencies": { "@backstage/cli": "^{{version}}", "lerna": "^3.20.2", + "patch-package": "^6.2.2", "prettier": "^1.19.1" } } diff --git a/packages/cli/templates/default-app/patches/README.md b/packages/cli/templates/default-app/patches/README.md new file mode 100644 index 0000000000..980729c4cd --- /dev/null +++ b/packages/cli/templates/default-app/patches/README.md @@ -0,0 +1,11 @@ +# patches + +This folder contains patches for dependency type declarations. Typescript doesn't provide a way to override of fix types that are installed as a part of the dependent package itself. + +Do not add any more patches here, these patches were added as a part of getting the entire repo type-checked, and we depended on some packages with bad types. + +As soon as the below issues are fixed, we should remove the patching functionality completely. + +## material-table + +Fixed in master but not released yet, tracked here: https://github.com/mbrn/material-table/pull/1624 diff --git a/packages/cli/templates/default-app/patches/material-table+1.57.2.patch b/packages/cli/templates/default-app/patches/material-table+1.57.2.patch new file mode 100644 index 0000000000..5751243775 --- /dev/null +++ b/packages/cli/templates/default-app/patches/material-table+1.57.2.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/material-table/types/index.d.ts b/node_modules/material-table/types/index.d.ts +index 06b700b..5b3c765 100644 +--- a/node_modules/material-table/types/index.d.ts ++++ b/node_modules/material-table/types/index.d.ts +@@ -228,7 +228,6 @@ export interface Options { + showTitle?: boolean; + showTextRowsSelected?: boolean; + search?: boolean; +- searchText?: string; + searchFieldAlignment?: 'left' | 'right'; + searchFieldStyle?: React.CSSProperties; + searchText?: string; From 1d6b9564b3db0358698d98953d884342f3c22598 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 21:13:13 +0200 Subject: [PATCH 44/69] packages/cli: common yarn install for e2e tests + point to dist --- .../cli/src/commands/create-app/createApp.ts | 85 +-------------- .../commands/create-plugin/createPlugin.ts | 6 +- packages/cli/src/lib/tasks.ts | 101 +++++++++++++++++- 3 files changed, 103 insertions(+), 89 deletions(-) diff --git a/packages/cli/src/commands/create-app/createApp.ts b/packages/cli/src/commands/create-app/createApp.ts index b638c22353..e28cb376b9 100644 --- a/packages/cli/src/commands/create-app/createApp.ts +++ b/packages/cli/src/commands/create-app/createApp.ts @@ -21,21 +21,11 @@ import inquirer, { Answers, Question } from 'inquirer'; import { exec as execCb } from 'child_process'; import { resolve as resolvePath } from 'path'; import os from 'os'; -import { Task, templatingTask } from '../../lib/tasks'; +import { Task, templatingTask, installWithLocalDeps } from '../../lib/tasks'; import { paths } from '../../lib/paths'; import { version } from '../../lib/version'; const exec = promisify(execCb); -// List of local packages that we need to modify as a part of an E2E test -const PATCH_PACKAGES = [ - 'cli', - 'core', - 'dev-utils', - 'test-utils', - 'test-utils-core', - 'theme', -]; - async function checkExists(rootDir: string, name: string) { await Task.forItem('checking', name, async () => { const destination = resolvePath(rootDir, name); @@ -80,19 +70,7 @@ async function buildApp(appDir: string) { }); }; - // e2e testing needs special treatment - if (process.env.BACKSTAGE_E2E_CLI_TEST) { - Task.section('Linking packages locally for e2e tests'); - await patchPackageResolutions(appDir); - } - - await runCmd('yarn install'); - - if (process.env.BACKSTAGE_E2E_CLI_TEST) { - Task.section('Patchling local dependencies for e2e tests'); - await patchLocalDependencies(appDir); - } - + await installWithLocalDeps(appDir); await runCmd('yarn tsc'); await runCmd('yarn build'); } @@ -111,65 +89,6 @@ export async function moveApp( }); } -async function patchPackageResolutions(appDir: string) { - const pkgJsonPath = resolvePath(appDir, 'package.json'); - const pkgJson = await fs.readJson(pkgJsonPath); - - pkgJson.resolutions = pkgJson.resolutions || {}; - pkgJson.dependencies = pkgJson.dependencies || {}; - - for (const name of PATCH_PACKAGES) { - await Task.forItem( - 'adding', - `@backstage/${name} link to package.json`, - async () => { - const pkgPath = paths.resolveOwnRoot('packages', name); - // Add to both resolutions and dependencies, or transitive dependencies will still be fetched from the registry. - pkgJson.dependencies[`@backstage/${name}`] = `file:${pkgPath}`; - pkgJson.resolutions[`@backstage/${name}`] = `file:${pkgPath}`; - - await fs - .writeJSON(pkgJsonPath, pkgJson, { encoding: 'utf8', spaces: 2 }) - .catch((error) => { - throw new Error( - `Failed to add resolutions to package.json: ${error.message}`, - ); - }); - }, - ); - } -} - -async function patchLocalDependencies(appDir: string) { - for (const name of PATCH_PACKAGES) { - await Task.forItem( - 'patching', - `node_modules/@backstage/${name} package.json`, - async () => { - const depJsonPath = resolvePath( - appDir, - 'node_modules/@backstage', - name, - 'package.json', - ); - const depJson = await fs.readJson(depJsonPath); - - // We want dist to be used for e2e tests - delete depJson['main:src']; - depJson.types = 'dist/index.d.ts'; - - await fs - .writeJSON(depJsonPath, depJson, { encoding: 'utf8', spaces: 2 }) - .catch((error) => { - throw new Error( - `Failed to add resolutions to package.json: ${error.message}`, - ); - }); - }, - ); - } -} - export default async () => { const questions: Question[] = [ { diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index b0bf1d85b5..1441b16d05 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -28,7 +28,7 @@ import { } from '../../lib/codeowners'; import { paths } from '../../lib/paths'; import { version } from '../../lib/version'; -import { Task, templatingTask } from '../../lib/tasks'; +import { Task, templatingTask, installWithLocalDeps } from '../../lib/tasks'; const exec = promisify(execCb); async function checkExists(rootDir: string, id: string) { @@ -141,7 +141,9 @@ async function cleanUp(tempDir: string) { } async function buildPlugin(pluginFolder: string) { - const commands = ['yarn install', 'yarn build']; + await installWithLocalDeps(paths.targetRoot); + + const commands = ['yarn tsc', 'yarn build']; for (const command of commands) { await Task.forItem('executing', command, async () => { process.chdir(pluginFolder); diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 0753301b78..2fa6220f18 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -18,8 +18,12 @@ import chalk from 'chalk'; import fs from 'fs-extra'; import handlebars from 'handlebars'; import ora from 'ora'; -import { basename, dirname } from 'path'; +import { resolve as resolvePath, basename, dirname } from 'path'; import recursive from 'recursive-readdir'; +import { promisify } from 'util'; +import { exec as execCb } from 'child_process'; +import { paths } from './paths'; +const exec = promisify(execCb); const TASK_NAME_MAX_LENGTH = 14; @@ -69,7 +73,7 @@ export async function templatingTask( destinationDir: string, context: any, ) { - const files = await recursive(templateDir).catch(error => { + const files = await recursive(templateDir).catch((error) => { throw new Error(`Failed to read template directory: ${error.message}`); }); @@ -85,7 +89,7 @@ export async function templatingTask( const compiled = handlebars.compile(template.toString()); const contents = compiled({ name: basename(destination), ...context }); - await fs.writeFile(destination, contents).catch(error => { + await fs.writeFile(destination, contents).catch((error) => { throw new Error( `Failed to create file: ${destination}: ${error.message}`, ); @@ -93,7 +97,7 @@ export async function templatingTask( }); } else { await Task.forItem('copying', basename(file), async () => { - await fs.copyFile(file, destinationFile).catch(error => { + await fs.copyFile(file, destinationFile).catch((error) => { const destination = destinationFile; throw new Error( `Failed to copy file to ${destination} : ${error.message}`, @@ -103,3 +107,92 @@ export async function templatingTask( } } } + +// List of local packages that we need to modify as a part of an E2E test +const PATCH_PACKAGES = [ + 'cli', + 'core', + 'dev-utils', + 'test-utils', + 'test-utils-core', + 'theme', +]; + +export async function installWithLocalDeps(dir: string) { + // e2e testing needs special treatment + if (process.env.BACKSTAGE_E2E_CLI_TEST) { + Task.section('Linking packages locally for e2e tests'); + + const pkgJsonPath = resolvePath(dir, 'package.json'); + const pkgJson = await fs.readJson(pkgJsonPath); + + pkgJson.resolutions = pkgJson.resolutions || {}; + pkgJson.dependencies = pkgJson.dependencies || {}; + + if (!pkgJson.resolutions[`@backstage/${PATCH_PACKAGES[0]}`]) { + for (const name of PATCH_PACKAGES) { + await Task.forItem( + 'adding', + `@backstage/${name} link to package.json`, + async () => { + const pkgPath = paths.resolveOwnRoot('packages', name); + // Add to both resolutions and dependencies, or transitive dependencies will still be fetched from the registry. + pkgJson.dependencies[`@backstage/${name}`] = `file:${pkgPath}`; + pkgJson.resolutions[`@backstage/${name}`] = `file:${pkgPath}`; + + await fs + .writeJSON(pkgJsonPath, pkgJson, { encoding: 'utf8', spaces: 2 }) + .catch((error) => { + throw new Error( + `Failed to add resolutions to package.json: ${error.message}`, + ); + }); + }, + ); + } + } + } + + await Task.forItem('executing', 'yarn install', async () => { + await exec('yarn install', { cwd: dir }).catch((error) => { + process.stdout.write(error.stderr); + process.stdout.write(error.stdout); + throw new Error( + `Could not execute command ${chalk.cyan('yarn install')}`, + ); + }); + }); + + if (process.env.BACKSTAGE_E2E_CLI_TEST) { + Task.section('Patchling local dependencies for e2e tests'); + + for (const name of PATCH_PACKAGES) { + await Task.forItem( + 'patching', + `node_modules/@backstage/${name} package.json`, + async () => { + const depJsonPath = resolvePath( + dir, + 'node_modules/@backstage', + name, + 'package.json', + ); + console.log('DEBUG: depJsonPath =', depJsonPath); + const depJson = await fs.readJson(depJsonPath); + + // We want dist to be used for e2e tests + delete depJson['main:src']; + depJson.types = 'dist/index.d.ts'; + + await fs + .writeJSON(depJsonPath, depJson, { encoding: 'utf8', spaces: 2 }) + .catch((error) => { + throw new Error( + `Failed to add resolutions to package.json: ${error.message}`, + ); + }); + }, + ); + } + } +} From d1d7c564e76333cab848fa6ba2f53f25e70e6757 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 17 May 2020 23:26:13 +0200 Subject: [PATCH 45/69] github/workflows: update to new build setup --- .github/workflows/frontend.yml | 22 +++++++++++++++------- .github/workflows/master.yml | 3 +++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index c19583b653..bf47d26d6d 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -56,14 +56,19 @@ jobs: - name: yarn install run: yarn install --frozen-lockfile - - name: verify plugin template - run: yarn lerna -- run diff -- --check - - name: lint run: yarn lerna -- run lint --since origin/master - - name: build - run: yarn build + - name: type checking and declarations + run: yarn tsc --incremental false + + - name: build changed packages + if: ${{ steps.yarn-lock.outcome == 'success' }} + run: yarn lerna -- run build --since origin/master + + - name: build all packages + if: ${{ steps.yarn-lock.outcome == 'failure' }} + run: yarn lerna -- run build -- --coverage - name: test changed packages if: ${{ steps.yarn-lock.outcome == 'success' }} @@ -73,8 +78,11 @@ jobs: if: ${{ steps.yarn-lock.outcome == 'failure' }} run: yarn lerna -- run test -- --coverage - - name: yarn bundle, if app was changed - run: git diff --quiet origin/master HEAD -- yarn.lock packages/app packages/core || yarn bundle + - name: verify plugin template + run: yarn lerna -- run diff -- --check + + - name: bundle example app + run: yarn bundle - name: verify storybook run: yarn workspace storybook build-storybook diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 6df9738bbc..a41f25c262 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -54,6 +54,9 @@ jobs: - name: lint run: yarn lerna -- run lint + - name: type checking and declarations + run: yarn tsc --incremental false + - name: build run: yarn build From 738704f1d18141a53aa8533ccb7fec0f50389825 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:05:32 +0200 Subject: [PATCH 46/69] packages/cli: fix for bundler looking for tsconfig in the wrong place --- packages/cli/src/lib/bundler/paths.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/lib/bundler/paths.ts b/packages/cli/src/lib/bundler/paths.ts index d5201c3171..ee24e9f4d2 100644 --- a/packages/cli/src/lib/bundler/paths.ts +++ b/packages/cli/src/lib/bundler/paths.ts @@ -48,7 +48,7 @@ export function resolveBundlingPaths(options: BundlingPathsOptions) { targetSrc: paths.resolveTarget('src'), targetDev: paths.resolveTarget('dev'), targetEntry: resolveTargetModule(entry), - targetTsConfig: paths.resolveTarget('tsconfig.json'), + targetTsConfig: paths.resolveTargetRoot('tsconfig.json'), targetNodeModules: paths.resolveTarget('node_modules'), targetPackageJson: paths.resolveTarget('package.json'), }; From 78a75669270bef8e8783c85a684ed76db59fbb02 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:14:56 +0200 Subject: [PATCH 47/69] docs: added more docs explaining the build setup --- README.md | 7 ++-- docs/getting-started/create-a-plugin.md | 9 +++++ .../development-environment.md | 36 +++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d2a0bbd3a9..fe73c1257c 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,12 @@ To run a Backstage app, you will need to have the following installed: - [NodeJS](https://nodejs.org/en/download/) - Active LTS Release, currently v12 - [yarn](https://classic.yarnpkg.com/en/docs/install) -After cloning this repo, open a terminal window and start the web app using the following commands from the project root: +After cloning this repo, open a terminal window and start the example app using the following commands from the project root: ```bash -yarn install -yarn start +yarn install # Install dependencies + +yarn start # Start dev server, use --check to enable linting and type-checks ``` The final `yarn start` command should open a local instance of Backstage in your browser, otherwise open one of the URLs printed in the terminal. diff --git a/docs/getting-started/create-a-plugin.md b/docs/getting-started/create-a-plugin.md index 7b8a7cf29b..64412c8b89 100644 --- a/docs/getting-started/create-a-plugin.md +++ b/docs/getting-started/create-a-plugin.md @@ -24,6 +24,15 @@ plugin directly by navigating to `http://localhost:3000/my-plugin`._ my plugin

+You can also serve the plugin in isolation by running `yarn start` in the plugin directory. Or by using the yarn workspace command, for example: + +```bash +yarn workspace @backstage/plugin-welcome start # Also supports --check +``` + +This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. +It is only meant for local development, and the setup for it can be found inside the plugin's `dev/` directory. + [Next Step - Structure of a plugin](structure-of-a-plugin.md) [Back to Getting Started](README.md) diff --git a/docs/getting-started/development-environment.md b/docs/getting-started/development-environment.md index 7f6e2bcb44..4dd2f7c9c7 100644 --- a/docs/getting-started/development-environment.md +++ b/docs/getting-started/development-environment.md @@ -1,5 +1,7 @@ # Development Environment +## Serving the Example App + Open a terminal window and start the web app using the following commands from the project root: ```bash @@ -21,6 +23,40 @@ You can now view example-app in the browser. On Your Network: http://192.168.1.224:8080 ``` +## Editor + +The Backstage development environment does not require any specific editor, but it is intended to be used with one that has built-in linting and type-checking. The development server does not include any checks by default, but they can be enabled using the `--check` flag. Note that using the flag may consume more system resources and slow things down. + +## Package Scripts + +There are many commands to be found in the root [package.json](package.json), here are some useful ones: + +```python +yarn start # Start serving the example app, use --check to include type checks and linting + +yarn storybook # Start local storybook, useful for working on components in @backstage/core + +yarn workspace @backstage/plugin-welcome start # Serve welcome plugin only, also supports --check + +yarn tsc # Run typecheck, use --watch for watch mode + +yarn build # Build published versions of packages, depends on tsc + +yarn lint # lint packages that have changed since later commit on origin/master +yarn lint:all # lint all packages + +yarn test # test packages that have changed since later commit on origin/master +yarn test:all # test all packages + +yarn clean # Remove all output folders and @backstage/cli cache + +yarn bundle # Build a production bundle of the example app + +yarn diff # Make sure all plugins are up to date with the latest plugin template + +yarn create-plugin # Create a new plugin +``` + ### (Optional)Try on Docker Run the following commands if you have Docker environment From 5d11dba5dba32370ae54f0a668db7aefe844a8af Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:19:27 +0200 Subject: [PATCH 48/69] packages/cli: keep comments in ts declarations --- packages/cli/config/tsconfig.json | 1 + packages/cli/tsconfig.build.json | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/cli/config/tsconfig.json b/packages/cli/config/tsconfig.json index cb295b45f6..652e990387 100644 --- a/packages/cli/config/tsconfig.json +++ b/packages/cli/config/tsconfig.json @@ -8,6 +8,7 @@ "incremental": true, "target": "ES2019", "module": "ESNext", + "removeComments": false, "resolveJsonModule": true, "esModuleInterop": true, "lib": ["DOM", "DOM.Iterable", "ScriptHost", "ES2019"], diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index aa31be5dee..ae42e652e6 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -5,6 +5,7 @@ "compilerOptions": { "outDir": "dist", "emitDeclarationOnly": false, + "removeComments": true, "module": "CommonJS" } } From 296a7871602c59fdbfc4bc9e3fd94f31210f3c04 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:45:57 +0200 Subject: [PATCH 49/69] plugins/auth-,catalog-backend: point types to src --- plugins/auth-backend/package.json | 3 +++ plugins/catalog-backend/package.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 99998dc6ba..c043bb990c 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-auth-backend", "version": "0.1.1-alpha.5", "main": "dist", + "types": "src/index.ts", "license": "Apache-2.0", "private": true, "scripts": { @@ -9,6 +10,8 @@ "build": "tsc", "lint": "backstage-cli lint", "test": "backstage-cli test", + "prepack": "backstage-cli prepack", + "postpack": "backstage-cli postpack", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 629f4c6d18..fcf15e03af 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -2,6 +2,7 @@ "name": "@backstage/plugin-catalog-backend", "version": "0.1.1-alpha.5", "main": "dist", + "types": "src/index.ts", "license": "Apache-2.0", "private": true, "scripts": { @@ -9,6 +10,8 @@ "build": "tsc", "lint": "backstage-cli lint", "test": "backstage-cli test", + "prepack": "backstage-cli prepack", + "postpack": "backstage-cli postpack", "clean": "backstage-cli clean" }, "dependencies": { From 53211aa6d57af87a63265488fc74cd77798b12ea Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:46:44 +0200 Subject: [PATCH 50/69] github/workflows: run tsc in cli build --- .github/workflows/cli.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 10330976d7..07ed78743c 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -41,6 +41,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: yarn install run: yarn install --frozen-lockfile + - run: yarn tsc - run: yarn build - name: verify app and plugin creation on Windows working-directory: ${{ runner.temp }} From 5649632bde4559f506451acd54f3d8f6997db737 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:51:16 +0200 Subject: [PATCH 51/69] github/workflows: no --coverage flag for build --- .github/workflows/frontend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index bf47d26d6d..4ee0f5246b 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -68,7 +68,7 @@ jobs: - name: build all packages if: ${{ steps.yarn-lock.outcome == 'failure' }} - run: yarn lerna -- run build -- --coverage + run: yarn lerna -- run build - name: test changed packages if: ${{ steps.yarn-lock.outcome == 'success' }} From 8232b0931f1383eb9106873c82cda41bf6e7731d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 00:59:33 +0200 Subject: [PATCH 52/69] plugins/graphiql: fix src-relative mock in test --- .../graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx index d07155d338..fb401494eb 100644 --- a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx +++ b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.test.tsx @@ -22,7 +22,7 @@ import { ApiProvider, ApiRegistry } from '@backstage/core'; import { renderWithEffects } from '@backstage/test-utils'; import { GraphQLBrowseApi, graphQlBrowseApiRef } from '../../lib/api'; -jest.mock('components/GraphiQLBrowser', () => ({ +jest.mock('../GraphiQLBrowser', () => ({ GraphiQLBrowser: () => '', })); From fe28a4ccf8749072a2d9256c5614dfc67659f710 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 01:04:03 +0200 Subject: [PATCH 53/69] packages/cli: bump sucrase and revert re-export syntax changes --- packages/cli/package.json | 2 +- packages/core/src/components/Table/index.ts | 3 +-- packages/core/src/index.ts | 6 ++---- packages/core/src/layout/BottomLink/index.ts | 3 +-- packages/core/src/layout/Page/index.ts | 3 +-- yarn.lock | 8 ++++---- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 5e028e72a8..c3d768eec2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -70,7 +70,7 @@ "rollup-plugin-postcss": "^3.1.1", "rollup-plugin-typescript2": "^0.26.0", "style-loader": "^1.2.1", - "sucrase": "^3.14.0", + "sucrase": "^3.14.1", "tar": "^6.0.1", "ts-loader": "^7.0.4", "url-loader": "^4.1.0", diff --git a/packages/core/src/components/Table/index.ts b/packages/core/src/components/Table/index.ts index b46d3e3c2b..7ea3ead808 100644 --- a/packages/core/src/components/Table/index.ts +++ b/packages/core/src/components/Table/index.ts @@ -15,6 +15,5 @@ */ export { default } from './Table'; -import type { TableColumn } from './Table'; -export type { TableColumn }; +export type { TableColumn } from './Table'; export { default as SubvalueCell } from './SubvalueCell'; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 41cb4c7906..1bd35f67c3 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -17,8 +17,7 @@ export * from './api'; export { default as Page } from './layout/Page'; export { gradients, pageTheme } from './layout/Page'; -import type { PageTheme } from './layout/Page'; -export type { PageTheme }; +export type { PageTheme } from './layout/Page'; export { default as Content } from './layout/Content/Content'; export { default as ContentHeader } from './layout/ContentHeader/ContentHeader'; export { default as Header } from './layout/Header/Header'; @@ -38,8 +37,7 @@ export { OAuthRequestDialog } from './components/OAuthRequestDialog'; export { AlphaLabel, BetaLabel } from './components/Lifecycle'; export { default as SupportButton } from './components/SupportButton'; export { default as Table, SubvalueCell } from './components/Table'; -import type { TableColumn } from './components/Table/Table'; -export type { TableColumn }; +export type { TableColumn } from './components/Table/Table'; export { default as StructuredMetadataTable } from './components/StructuredMetadataTable'; export { default as TrendLine } from './components/TrendLine'; export { FeatureCalloutCircular } from './components/FeatureDiscovery/FeatureCalloutCircular'; diff --git a/packages/core/src/layout/BottomLink/index.ts b/packages/core/src/layout/BottomLink/index.ts index d622ce0fe9..6f2055f4f7 100644 --- a/packages/core/src/layout/BottomLink/index.ts +++ b/packages/core/src/layout/BottomLink/index.ts @@ -15,5 +15,4 @@ */ export { default } from './BottomLink'; -import type { Props } from './BottomLink'; -export type { Props }; +export type { Props } from './BottomLink'; diff --git a/packages/core/src/layout/Page/index.ts b/packages/core/src/layout/Page/index.ts index 38fc349e95..50899fa036 100644 --- a/packages/core/src/layout/Page/index.ts +++ b/packages/core/src/layout/Page/index.ts @@ -16,5 +16,4 @@ export { default } from './Page'; export { gradients, pageTheme } from './PageThemeProvider'; -import type { PageTheme } from './PageThemeProvider'; -export type { PageTheme }; +export type { PageTheme } from './PageThemeProvider'; diff --git a/yarn.lock b/yarn.lock index 47b54d2f7a..8ff295be56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18844,10 +18844,10 @@ stylis@3.5.0: resolved "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz#016fa239663d77f868fef5b67cf201c4b7c701e1" integrity sha512-pP7yXN6dwMzAR29Q0mBrabPCe0/mNO1MSr93bhay+hcZondvMMTpeGyd8nbhYJdyperNT2DRxONQuUGcJr5iPw== -sucrase@^3.14.0: - version "3.14.0" - resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.14.0.tgz#4364f4da5d57465acba364ef65b14ca78672d500" - integrity sha512-sWyDtHMD0Q1wv4GpL3Jp10Pxi8ht4qrYeo1tAtHJ21BaMjl3PCrIM22FudoKRVY90r+lj3ytvIcf6WkYqt7TJg== +sucrase@^3.14.1: + version "3.14.1" + resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.14.1.tgz#ae948ced2887696637606f8d8f405e9ac9b6936c" + integrity sha512-f6aomLv8u9kBfJvO06a93kYBvdYg0WxlrrbOCN31FI/hOzAvZMS9WFPj77hT2EMWsrPyxE1TdepkKiOarRlX/g== dependencies: commander "^4.0.0" glob "7.1.6" From 9977724144225f2792354dbc48041e65055d127e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 01:15:00 +0200 Subject: [PATCH 54/69] packages/cli: disabled bundler performance hints --- packages/cli/src/lib/bundler/config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index cdd16fec2e..a35c22e3bd 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -55,6 +55,9 @@ export function createConfig( mode: isDev ? 'development' : 'production', profile: false, bail: false, + performance: { + hints: false, // we check the gzip size instead + }, devtool: isDev ? 'cheap-module-eval-source-map' : 'source-map', context: paths.targetPath, entry: [require.resolve('react-hot-loader/patch'), paths.targetEntry], From b49e6a9a4b982c84c5be3620fe31fd6fe73e15af Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 18 May 2020 09:04:42 +0000 Subject: [PATCH 55/69] build(deps): bump @rollup/plugin-commonjs from 11.0.2 to 11.1.0 Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins) from 11.0.2 to 11.1.0. - [Release notes](https://github.com/rollup/plugins/releases) - [Commits](https://github.com/rollup/plugins/compare/commonjs-v11.0.2...commonjs-v11.1.0) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3bf0d9c1e3..281d2fa491 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2529,12 +2529,14 @@ react-lifecycles-compat "^3.0.4" "@rollup/plugin-commonjs@^11.0.2": - version "11.0.2" - resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz#837cc6950752327cb90177b608f0928a4e60b582" - integrity sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g== + version "11.1.0" + resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz#60636c7a722f54b41e419e1709df05c7234557ef" + integrity sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA== dependencies: - "@rollup/pluginutils" "^3.0.0" + "@rollup/pluginutils" "^3.0.8" + commondir "^1.0.1" estree-walker "^1.0.1" + glob "^7.1.2" is-reference "^1.1.2" magic-string "^0.25.2" resolve "^1.11.0" @@ -2557,7 +2559,7 @@ is-module "^1.0.0" resolve "^1.14.2" -"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.10", "@rollup/pluginutils@^3.0.8": +"@rollup/pluginutils@^3.0.10", "@rollup/pluginutils@^3.0.8": version "3.0.10" resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz#a659b9025920378494cd8f8c59fbf9b3a50d5f12" integrity sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw== From 5da07d5bbf03f6f86e1c5a496fb1815f6623555e Mon Sep 17 00:00:00 2001 From: Victor Viale Date: Mon, 18 May 2020 11:56:11 +0200 Subject: [PATCH 56/69] Improve side navigation (#589) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Implement sidebar items * Add intro component * Add user badge component * Add Sidebar simple story component Co-authored-by: Victor Viale Co-authored-by: Stefan Ålund --- packages/app/src/components/Root/Root.tsx | 28 ++- packages/core/src/layout/Sidebar/Bar.tsx | 4 +- packages/core/src/layout/Sidebar/Intro.tsx | 170 ++++++++++++++ packages/core/src/layout/Sidebar/Items.tsx | 208 +++++++++++++----- .../src/layout/Sidebar/Sidebar.stories.tsx | 60 +++++ .../core/src/layout/Sidebar/UserBadge.tsx | 72 ++++++ packages/core/src/layout/Sidebar/config.ts | 33 ++- packages/core/src/layout/Sidebar/index.ts | 2 + yarn.lock | 6 +- 9 files changed, 516 insertions(+), 67 deletions(-) create mode 100644 packages/core/src/layout/Sidebar/Intro.tsx create mode 100644 packages/core/src/layout/Sidebar/Sidebar.stories.tsx create mode 100644 packages/core/src/layout/Sidebar/UserBadge.tsx diff --git a/packages/app/src/components/Root/Root.tsx b/packages/app/src/components/Root/Root.tsx index 3945befb73..c26336c18b 100644 --- a/packages/app/src/components/Root/Root.tsx +++ b/packages/app/src/components/Root/Root.tsx @@ -19,27 +19,30 @@ import PropTypes from 'prop-types'; import { Link, makeStyles, Typography } from '@material-ui/core'; import HomeIcon from '@material-ui/icons/Home'; import ExploreIcon from '@material-ui/icons/Explore'; -import AccountCircle from '@material-ui/icons/AccountCircle'; import CreateComponentIcon from '@material-ui/icons/AddCircleOutline'; import AccountTreeIcon from '@material-ui/icons/AccountTree'; + import { Sidebar, SidebarPage, sidebarConfig, SidebarContext, SidebarItem, - SidebarSpacer, SidebarDivider, + SidebarSearchField, SidebarSpace, + SidebarUserBadge, SidebarThemeToggle, } from '@backstage/core'; const useSidebarLogoStyles = makeStyles({ root: { - height: sidebarConfig.drawerWidthClosed, + width: sidebarConfig.drawerWidthClosed, + height: 3 * sidebarConfig.logoHeight, display: 'flex', flexFlow: 'row nowrap', alignItems: 'center', + marginBottom: -14, }, logoContainer: { width: sidebarConfig.drawerWidthClosed, @@ -48,9 +51,9 @@ const useSidebarLogoStyles = makeStyles({ justifyContent: 'center', }, title: { - fontSize: 24, + fontSize: sidebarConfig.logoHeight, fontWeight: 'bold', - marginLeft: 22, + marginLeft: 20, whiteSpace: 'nowrap', color: '#fff', }, @@ -61,7 +64,7 @@ const useSidebarLogoStyles = makeStyles({ const SidebarLogo: FC<{}> = () => { const classes = useSidebarLogoStyles(); - const isOpen = useContext(SidebarContext); + const { isOpen } = useContext(SidebarContext); return (
@@ -75,21 +78,30 @@ const SidebarLogo: FC<{}> = () => { ); }; +const handleSearch = (query: string): void => { + // XXX (@koroeskohr): for testing purposes + // eslint-disable-next-line no-console + console.log(query); +}; + const Root: FC<{}> = ({ children }) => ( - + + {/* Global nav, not org-specific */} + {/* End global nav */} - + + {children} diff --git a/packages/core/src/layout/Sidebar/Bar.tsx b/packages/core/src/layout/Sidebar/Bar.tsx index b32101a270..a03a33ce09 100644 --- a/packages/core/src/layout/Sidebar/Bar.tsx +++ b/packages/core/src/layout/Sidebar/Bar.tsx @@ -20,7 +20,7 @@ import React, { FC, useRef, useState } from 'react'; import { sidebarConfig, SidebarContext } from './config'; import { BackstageTheme } from '@backstage/theme'; -const useStyles = makeStyles(theme => ({ +const useStyles = makeStyles((theme) => ({ root: { zIndex: 1000, position: 'relative', @@ -115,7 +115,7 @@ export const Sidebar: FC = ({ onBlur={handleClose} data-testid="sidebar-root" > - +
(theme => ({ + introCard: { + color: '#b5b5b5', + // XXX (@koroeskohr): should I be using a Mui theme variable? + fontSize: 12, + width: sidebarConfig.drawerWidthOpen, + marginTop: 18, + marginBottom: 12, + paddingLeft: sidebarConfig.iconPadding, + paddingRight: sidebarConfig.iconPadding, + }, + introDismiss: { + display: 'flex', + justifyContent: 'flex-end', + alignItems: 'center', + marginTop: 12, + }, + introDismissLink: { + color: '#dddddd', + display: 'flex', + alignItems: 'center', + marginBottom: 4, + '&:hover': { + color: theme.palette.linkHover, + transition: theme.transitions.create('color', { + easing: theme.transitions.easing.sharp, + duration: theme.transitions.duration.shortest, + }), + }, + }, + introDismissText: { + fontSize: '0.7rem', + fontWeight: 'bold', + textTransform: 'uppercase', + letterSpacing: 1, + }, + introDismissIcon: { + width: 18, + height: 18, + marginRight: 12, + }, +})); + +type IntroCardProps = { + text: string; + onClose: () => void; +}; + +export const IntroCard: FC = props => { + const classes = useStyles(); + const { text, onClose } = props; + const handleClose = () => onClose(); + + return ( +
+ {text} +
+ + + + Dismiss + + +
+
+ ); +}; + +type SidebarIntroLocalStorage = { + starredItemsDismissed: boolean; + recentlyViewedItemsDismissed: boolean; +}; + +type SidebarIntroCardProps = { + text: string; + onDismiss: () => void; +}; + +const SidebarIntroCard: FC = props => { + const {text, onDismiss} = props + const [collapsing, setCollapsing] = useState(false) + const startDismissing = () => { + setCollapsing(true) + } + return ( + + + + ); +}; + +const starredIntroText = `Fun fact! As you explore all the awesome plugins in Backstage, you can actually pin them to this side nav. +Keep an eye out for the little star icon (⭐) next to the plugin name and give it a click!`; +const recentlyViewedIntroText = + 'And your recently viewed plugins will pop up here!'; + +export const SidebarIntro: FC = () => { + const { isOpen } = useContext(SidebarContext); + const [ + { starredItemsDismissed, recentlyViewedItemsDismissed }, + setDismissedIntro, + ] = useLocalStorage(SIDEBAR_INTRO_LOCAL_STORAGE, { + starredItemsDismissed: false, + recentlyViewedItemsDismissed: false, + }); + + const dismissStarred = () => { + setDismissedIntro(state => ({ ...state, starredItemsDismissed: true })); + }; + const dismissRecentlyViewed = () => { + setDismissedIntro(state => ({ + ...state, + recentlyViewedItemsDismissed: true, + })); + }; + + if (!isOpen) { + return null; + } + + return ( + <> + {!starredItemsDismissed && ( + <> + + + + )} + {!recentlyViewedItemsDismissed && ( + + )} + + ); +}; diff --git a/packages/core/src/layout/Sidebar/Items.tsx b/packages/core/src/layout/Sidebar/Items.tsx index 62f02ca58b..60132f0bc9 100644 --- a/packages/core/src/layout/Sidebar/Items.tsx +++ b/packages/core/src/layout/Sidebar/Items.tsx @@ -14,87 +14,196 @@ * limitations under the License. */ -import { Link, makeStyles, styled, Theme, Typography } from '@material-ui/core'; +import { + makeStyles, + styled, + TextField, + Theme, + Typography, + Badge, +} from '@material-ui/core'; +import SearchIcon from '@material-ui/icons/Search'; import clsx from 'clsx'; -import React, { FC, useContext } from 'react'; +import React, { FC, useContext, useState, KeyboardEventHandler } from 'react'; +import { NavLink } from 'react-router-dom'; import { sidebarConfig, SidebarContext } from './config'; import { IconComponent } from '../../icons'; -const useStyles = makeStyles((theme) => ({ - root: { - color: '#b5b5b5', - display: 'flex', - flexFlow: 'row nowrap', - alignItems: 'center', - height: 40, - cursor: 'pointer', - }, - closed: { - width: sidebarConfig.drawerWidthClosed, - justifyContent: 'center', - }, - open: { - width: sidebarConfig.drawerWidthOpen, - }, - label: { - fontWeight: 'bolder', - whiteSpace: 'nowrap', - lineHeight: 1.0, - marginLeft: theme.spacing(1), - }, - iconContainer: { - height: '100%', - width: sidebarConfig.drawerWidthClosed, - marginRight: -theme.spacing(2), - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - }, -})); +const useStyles = makeStyles((theme) => { + const { + selectedIndicatorWidth, + drawerWidthClosed, + drawerWidthOpen, + iconContainerWidth, + iconSize, + } = sidebarConfig; + + return { + root: { + color: '#b5b5b5', + display: 'flex', + flexFlow: 'row nowrap', + alignItems: 'center', + height: 48, + cursor: 'pointer', + }, + closed: { + width: drawerWidthClosed, + justifyContent: 'center', + }, + open: { + width: drawerWidthOpen, + }, + label: { + // XXX (@koroeskohr): I can't seem to achieve the desired font-weight from the designs + fontWeight: 'bold', + whiteSpace: 'nowrap', + lineHeight: 1.0, + }, + iconContainer: { + boxSizing: 'border-box', + height: '100%', + width: iconContainerWidth, + marginRight: -theme.spacing(2), + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }, + icon: { + width: iconSize, + height: iconSize, + }, + searchRoot: { + marginBottom: 12, + }, + searchField: { + color: '#b5b5b5', + fontWeight: 'bold', + fontSize: theme.typography.fontSize, + }, + searchContainer: { + width: drawerWidthOpen - iconContainerWidth, + }, + selected: { + '&$root': { + borderLeft: `solid ${selectedIndicatorWidth}px #9BF0E1`, + color: '#ffffff', + }, + '&$closed': { + width: drawerWidthClosed - selectedIndicatorWidth, + }, + '& $iconContainer': { + marginLeft: -selectedIndicatorWidth, + }, + }, + }; +}); type SidebarItemProps = { icon: IconComponent; - text: string; + text?: string; to?: string; + disableSelected?: boolean; + hasNotifications?: boolean; onClick?: () => void; }; export const SidebarItem: FC = ({ icon: Icon, text, - to, + to = '#', + disableSelected = false, + hasNotifications = false, onClick, + children, }) => { const classes = useStyles(); - const isOpen = useContext(SidebarContext); + // XXX (@koroeskohr): unsure this is optimal. But I just really didn't want to have the item component + // depend on the current location, and at least have it being optionally forced to selected. + // Still waiting on a Q answered to fine tune the implementation + const { isOpen } = useContext(SidebarContext); + + const itemIcon = ( + + + + ); if (!isOpen) { return ( - match && !disableSelected} + exact + to={to} onClick={onClick} - underline="none" > - - + {itemIcon} + ); } return ( - match && !disableSelected} + exact + to={to} onClick={onClick} - underline="none" >
- + {itemIcon}
- - {text} - - + {text && ( + + {text} + + )} + {children} + + ); +}; + +type SidebarSearchFieldProps = { + onSearch: (input: string) => void; +}; + +export const SidebarSearchField: FC = (props) => { + const [input, setInput] = useState(''); + const classes = useStyles(); + + const handleEnter: KeyboardEventHandler = (ev) => { + if (ev.key === 'Enter') { + props.onSearch(input); + } + }; + + const handleInput = (ev: React.ChangeEvent) => { + setInput(ev.target.value); + }; + + return ( +
+ + + +
); }; @@ -111,4 +220,5 @@ export const SidebarDivider = styled('hr')({ width: '100%', background: '#383838', border: 'none', + margin: 0, }); diff --git a/packages/core/src/layout/Sidebar/Sidebar.stories.tsx b/packages/core/src/layout/Sidebar/Sidebar.stories.tsx new file mode 100644 index 0000000000..fc0025caca --- /dev/null +++ b/packages/core/src/layout/Sidebar/Sidebar.stories.tsx @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { + Sidebar, + SidebarIntro, + SidebarItem, + SidebarDivider, + SidebarSearchField, + SidebarSpace, + SidebarUserBadge, +} from '.'; +import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined'; +import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline'; +import { MemoryRouter } from 'react-router-dom'; + +export default { + title: 'Sidebar', + component: Sidebar, + decorators: [ + (storyFn: () => JSX.Element) => ( + {storyFn()} + ), + ], +}; + +const handleSearch = (input: string) => { + // eslint-disable-next-line no-console + console.log(input); +}; + +export const SampleSidebar = () => ( + + {/* */} + + + + + + + + + + + +); diff --git a/packages/core/src/layout/Sidebar/UserBadge.tsx b/packages/core/src/layout/Sidebar/UserBadge.tsx new file mode 100644 index 0000000000..1614558ab9 --- /dev/null +++ b/packages/core/src/layout/Sidebar/UserBadge.tsx @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React, { FC, useContext } from 'react'; +import { Avatar, makeStyles, Theme, Typography } from '@material-ui/core'; +import People from '@material-ui/icons/People'; +import { sidebarConfig, SidebarContext } from './config'; +import { SidebarItem } from './Items'; + +const useStyles = makeStyles(() => { + const { drawerWidthOpen, userBadgeDiameter } = sidebarConfig; + return { + root: { + width: drawerWidthOpen, + display: 'flex', + alignItems: 'center', + color: '#b5b5b5', + paddingLeft: 18, + paddingTop: 14, + paddingBottom: 14, + }, + avatar: { + width: userBadgeDiameter, + height: userBadgeDiameter, + marginRight: 8, + }, + }; +}); + +type Props = { + imageUrl: string; + name: string; + hideName?: boolean; +}; + +export const UserBadge: FC = ({ imageUrl, name, hideName = false }) => { + const classes = useStyles(); + + return ( +
+ + {!hideName && {name}} +
+ ); +}; + +export const SidebarUserBadge: FC = () => { + const { isOpen } = useContext(SidebarContext); + const isUserLoggedIn = false; + return isUserLoggedIn ? ( + + ) : ( + + ); +}; diff --git a/packages/core/src/layout/Sidebar/config.ts b/packages/core/src/layout/Sidebar/config.ts index 7695e695d7..e101153bfb 100644 --- a/packages/core/src/layout/Sidebar/config.ts +++ b/packages/core/src/layout/Sidebar/config.ts @@ -16,11 +16,34 @@ import { createContext } from 'react'; +const drawerWidthClosed = 72; +const iconPadding = 24; +const userBadgePadding = 18; + export const sidebarConfig = { - drawerWidthClosed: 64, - drawerWidthOpen: 220, - defaultOpenDelayMs: 400, - defaultCloseDelayMs: 200, + drawerWidthClosed, + drawerWidthOpen: 224, + // As per NN/g's guidance on timing for exposing hidden content + // See https://www.nngroup.com/articles/timing-exposing-content/ + defaultOpenDelayMs: 300, + defaultCloseDelayMs: 0, + defaultFadeDuration: 200, + logoHeight: 32, + iconContainerWidth: drawerWidthClosed, + iconSize: drawerWidthClosed - iconPadding * 2, + iconPadding, + selectedIndicatorWidth: 3, + userBadgePadding, + userBadgeDiameter: drawerWidthClosed - userBadgePadding * 2, }; -export const SidebarContext = createContext(false); +export const SIDEBAR_INTRO_LOCAL_STORAGE = + '@backstage/core/sidebar-intro-dismissed'; + +type SidebarContextType = { + isOpen: boolean; +}; + +export const SidebarContext = createContext({ + isOpen: false, +}); diff --git a/packages/core/src/layout/Sidebar/index.ts b/packages/core/src/layout/Sidebar/index.ts index f3f1a8872b..731d117ce3 100644 --- a/packages/core/src/layout/Sidebar/index.ts +++ b/packages/core/src/layout/Sidebar/index.ts @@ -17,5 +17,7 @@ export * from './Bar'; export * from './Page'; export * from './Items'; +export * from './Intro'; +export * from './UserBadge'; export * from './config'; export { SidebarThemeToggle } from './SidebarThemeToggle'; diff --git a/yarn.lock b/yarn.lock index 281d2fa491..4d4f3a23da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4327,9 +4327,9 @@ pretty-format "^25.1.0" "@types/testing-library__jest-dom@^5.0.4": - version "5.0.4" - resolved "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.0.4.tgz#c7bfbafb920cd1ce40506474e70ee73637f33701" - integrity sha512-Ns69aaNvlxvXkPxIwsqeaWH5vJpwa/pdBIlf8LGkRnbV3tiqUgifs13moLXg1NQ2AM23qRR5CtHarNshvRyEdA== + version "5.6.0" + resolved "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.6.0.tgz#325e97aacb7e4a66693e7face8a2c04f936f4a4b" + integrity sha512-VRl4kIzvtySjscCpMul3mz0UgEd40nG/jWluaXIYi5UG8cOOLD56u8IIgHZk+gSKmccRCsVv7AAg1HBmE7OQ2w== dependencies: "@types/jest" "*" From 74d25d1550ca1517366a95bcb8fa65343e8ea38e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 12:10:56 +0200 Subject: [PATCH 57/69] github/workflows: fix build step to include dependencies as well --- .github/workflows/frontend.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 4ee0f5246b..d916141588 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -64,7 +64,8 @@ jobs: - name: build changed packages if: ${{ steps.yarn-lock.outcome == 'success' }} - run: yarn lerna -- run build --since origin/master + # Need to build all dependencies as well to be able to run tests later + run: yarn lerna -- run build --since origin/master --include-dependencies - name: build all packages if: ${{ steps.yarn-lock.outcome == 'failure' }} From 33c412d961de540e3e1eaf303f1b57b416218317 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 12:25:55 +0200 Subject: [PATCH 58/69] packages/core: fix type issues in sidebar --- packages/core/src/layout/Sidebar/Items.tsx | 4 ++-- packages/core/src/layout/Sidebar/Sidebar.stories.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/layout/Sidebar/Items.tsx b/packages/core/src/layout/Sidebar/Items.tsx index 60132f0bc9..bd5faa5631 100644 --- a/packages/core/src/layout/Sidebar/Items.tsx +++ b/packages/core/src/layout/Sidebar/Items.tsx @@ -139,7 +139,7 @@ export const SidebarItem: FC = ({ match && !disableSelected} + isActive={(match) => Boolean(match && !disableSelected)} exact to={to} onClick={onClick} @@ -153,7 +153,7 @@ export const SidebarItem: FC = ({ match && !disableSelected} + isActive={(match) => Boolean(match && !disableSelected)} exact to={to} onClick={onClick} diff --git a/packages/core/src/layout/Sidebar/Sidebar.stories.tsx b/packages/core/src/layout/Sidebar/Sidebar.stories.tsx index fc0025caca..1b9ba5bbab 100644 --- a/packages/core/src/layout/Sidebar/Sidebar.stories.tsx +++ b/packages/core/src/layout/Sidebar/Sidebar.stories.tsx @@ -48,7 +48,7 @@ export const SampleSidebar = () => ( {/* */} - + From 1362820792cd705b87555d15b182259a756a8e78 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 12:39:30 +0200 Subject: [PATCH 59/69] packages/core: export sidebar context type --- packages/core/src/layout/Sidebar/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/layout/Sidebar/config.ts b/packages/core/src/layout/Sidebar/config.ts index e101153bfb..8ea6cc94f9 100644 --- a/packages/core/src/layout/Sidebar/config.ts +++ b/packages/core/src/layout/Sidebar/config.ts @@ -40,7 +40,7 @@ export const sidebarConfig = { export const SIDEBAR_INTRO_LOCAL_STORAGE = '@backstage/core/sidebar-intro-dismissed'; -type SidebarContextType = { +export type SidebarContextType = { isOpen: boolean; }; From fb3e003272a7db2b8a714756e8221e11d79b9317 Mon Sep 17 00:00:00 2001 From: Marcus Eide Date: Mon, 18 May 2020 12:59:58 +0200 Subject: [PATCH 60/69] Bump testing-library/user-event to 10.2.4 --- packages/app/package.json | 2 +- .../templates/default-app/packages/app/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/package.json | 2 +- plugins/catalog/package.json | 2 +- plugins/explore/package.json | 2 +- plugins/graphiql/package.json | 2 +- plugins/home-page/package.json | 2 +- plugins/lighthouse/package.json | 2 +- plugins/register-component/package.json | 2 +- plugins/scaffolder/package.json | 2 +- plugins/tech-radar/package.json | 2 +- plugins/welcome/package.json | 2 +- yarn.lock | 8 ++++---- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index e3b71820b6..dd184eb790 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -28,7 +28,7 @@ "@testing-library/cypress": "^6.0.0", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/jquery": "^3.3.34", "@types/node": "^12.0.0", diff --git a/packages/cli/templates/default-app/packages/app/package.json.hbs b/packages/cli/templates/default-app/packages/app/package.json.hbs index 5596eb9151..b0cf41117f 100644 --- a/packages/cli/templates/default-app/packages/app/package.json.hbs +++ b/packages/cli/templates/default-app/packages/app/package.json.hbs @@ -18,7 +18,7 @@ "devDependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/react-router-dom": "^5.1.3", diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index cbd084c3e3..910bbddd56 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -34,7 +34,7 @@ "@backstage/dev-utils": "^{{version}}", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/packages/core/package.json b/packages/core/package.json index d444fc0fee..17f85eb41d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -61,7 +61,7 @@ "@backstage/test-utils-core": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2" + "@testing-library/user-event": "^10.2.4" }, "files": [ "dist/**/*.{js,d.ts}" diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 1733392696..230aa42334 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -36,7 +36,7 @@ "@material-ui/icons": "^4.9.1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "react": "^16.12.0", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 4c21516795..a82b6f7c4f 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -34,7 +34,7 @@ "@material-ui/core": "^4.9.1", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "react": "^16.12.0", diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 48515a429d..79bf5fe00c 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -32,7 +32,7 @@ "@backstage/test-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 5e8719e033..f73da27beb 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -33,7 +33,7 @@ "@backstage/test-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index dbbf75af70..2720a6e77b 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -47,7 +47,7 @@ "@backstage/test-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/codemirror": "^0.0.93", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", diff --git a/plugins/home-page/package.json b/plugins/home-page/package.json index 9ec448aef5..1d5b98bb28 100644 --- a/plugins/home-page/package.json +++ b/plugins/home-page/package.json @@ -31,7 +31,7 @@ "@backstage/dev-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index b147aede88..bebf882b9b 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -34,7 +34,7 @@ "@backstage/test-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/plugins/register-component/package.json b/plugins/register-component/package.json index 2999d31a4a..fbcb39d4d7 100644 --- a/plugins/register-component/package.json +++ b/plugins/register-component/package.json @@ -32,7 +32,7 @@ "@backstage/dev-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 5594442c34..1743f57c3c 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -31,7 +31,7 @@ "@backstage/dev-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index ca516d3a70..f4ccbdab5f 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -35,7 +35,7 @@ "@backstage/dev-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/color": "^3.0.1", "@types/d3-force": "^1.2.1", "@types/jest": "^25.2.1", diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index 3e5e54d15f..1c25a9aabc 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -32,7 +32,7 @@ "@backstage/dev-utils": "^0.1.1-alpha.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", + "@testing-library/user-event": "^10.2.4", "@types/jest": "^25.2.1", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", diff --git a/yarn.lock b/yarn.lock index 281d2fa491..ffcea67dc9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3571,10 +3571,10 @@ "@testing-library/dom" "^6.15.0" "@types/testing-library__react" "^9.1.2" -"@testing-library/user-event@^7.1.2": - version "7.2.1" - resolved "https://registry.npmjs.org/@testing-library/user-event/-/user-event-7.2.1.tgz#2ad4e844175a3738cb9e7064be5ea070b8863a1c" - integrity sha512-oZ0Ib5I4Z2pUEcoo95cT1cr6slco9WY7yiPpG+RGNkj8YcYgJnM7pXmYmorNOReh8MIGcKSqXyeGjxnr8YiZbA== +"@testing-library/user-event@^10.2.4": + version "10.3.1" + resolved "https://registry.npmjs.org/@testing-library/user-event/-/user-event-10.3.1.tgz#8ed6fbfa40fbb866fa4666c9a62d7f7ff151f93b" + integrity sha512-HozvWlr/xHmkoJrrDdZBbUOXAC/STAeXGyNU+g5KgEwWBpLJi1RPCHJKbTjwz8hp2jDFsk/jjfD0530eZjcFEg== "@theme-ui/color-modes@^0.3.1": version "0.3.1" From e8f2b8899081bd4e93b4622d0b50b51d29073cfe Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 12:48:59 +0200 Subject: [PATCH 61/69] packages/cli: remove redundant type declarations for rollup-plugin-esbuild --- packages/cli/@types/rollup-plugin-esbuild.d.ts | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 packages/cli/@types/rollup-plugin-esbuild.d.ts diff --git a/packages/cli/@types/rollup-plugin-esbuild.d.ts b/packages/cli/@types/rollup-plugin-esbuild.d.ts deleted file mode 100644 index 6637e75bcb..0000000000 --- a/packages/cli/@types/rollup-plugin-esbuild.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -declare module 'rollup-plugin-esbuild'; From a1efd0d76db620dd41dd1d56012dcd74f89df847 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 11:29:54 +0200 Subject: [PATCH 62/69] packages/cli: nicer handling of waiting for bundler to exit --- packages/cli/src/commands/app/build.ts | 3 --- packages/cli/src/commands/app/serve.ts | 5 ++--- packages/cli/src/commands/plugin/serve.ts | 5 ++--- packages/cli/src/lib/bundler/server.ts | 24 +++++++++++++++-------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/packages/cli/src/commands/app/build.ts b/packages/cli/src/commands/app/build.ts index 482159e773..c654baa439 100644 --- a/packages/cli/src/commands/app/build.ts +++ b/packages/cli/src/commands/app/build.ts @@ -22,7 +22,4 @@ export default async (cmd: Command) => { entry: 'src/index', statsJsonEnabled: cmd.stats, }); - - // Wait for interrupt signal - await new Promise(() => {}); }; diff --git a/packages/cli/src/commands/app/serve.ts b/packages/cli/src/commands/app/serve.ts index 143e4139e5..182e338287 100644 --- a/packages/cli/src/commands/app/serve.ts +++ b/packages/cli/src/commands/app/serve.ts @@ -18,11 +18,10 @@ import { serveBundle } from '../../lib/bundler'; import { Command } from 'commander'; export default async (cmd: Command) => { - await serveBundle({ + const waitForExit = await serveBundle({ entry: 'src/index', checksEnabled: cmd.check, }); - // Wait for interrupt signal - await new Promise(() => {}); + await waitForExit(); }; diff --git a/packages/cli/src/commands/plugin/serve.ts b/packages/cli/src/commands/plugin/serve.ts index 79a540d879..5700992644 100644 --- a/packages/cli/src/commands/plugin/serve.ts +++ b/packages/cli/src/commands/plugin/serve.ts @@ -18,11 +18,10 @@ import { serveBundle } from '../../lib/bundler'; import { Command } from 'commander'; export default async (cmd: Command) => { - await serveBundle({ + const waitForExit = await serveBundle({ entry: 'dev/index', checksEnabled: cmd.check, }); - // Wait for interrupt signal - await new Promise(() => {}); + await waitForExit(); }; diff --git a/packages/cli/src/lib/bundler/server.ts b/packages/cli/src/lib/bundler/server.ts index ea29b04459..3aaf5968f5 100644 --- a/packages/cli/src/lib/bundler/server.ts +++ b/packages/cli/src/lib/bundler/server.ts @@ -29,7 +29,7 @@ export async function serveBundle(options: ServeOptions) { const port = await choosePort(host, defaultPort); if (!port) { - return; + throw new Error(`Invalid or no port set: '${port}'`); } const protocol = yn(process.env.HTTPS, { default: false }) ? 'https' : 'http'; @@ -57,15 +57,23 @@ export async function serveBundle(options: ServeOptions) { return; } - for (const signal of ['SIGINT', 'SIGTERM'] as const) { - process.on(signal, () => { - server.close(); - process.exit(); - }); - } - openBrowser(urls.localUrlForBrowser); resolve(); }); }); + + const waitForExit = async () => { + for (const signal of ['SIGINT', 'SIGTERM'] as const) { + process.on(signal, () => { + server.close(); + // exit instead of resolve. The process is shutting down and resolving a promise here logs an error + process.exit(); + }); + } + + // Block indefinitely and wait for the interrupt signal + return new Promise(() => {}); + }; + + return waitForExit; } From 0242c8a3442f3a74f48569dbcdb7a864516afef1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 11:35:08 +0200 Subject: [PATCH 63/69] packages/cli: add more explanations to installWithLocalDeps + remove console.log --- packages/cli/src/lib/tasks.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 2fa6220f18..721e1a355b 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -118,8 +118,11 @@ const PATCH_PACKAGES = [ 'theme', ]; +// This runs a `yarn install` task, but with special treatment for e2e tests export async function installWithLocalDeps(dir: string) { - // e2e testing needs special treatment + // This makes us install any package inside this repo as a local file dependency. + // For example, instead of trying to fetch @backstage/core from npm, we point it + // to /packages/core. This makes yarn use a simple file copy to install it instead. if (process.env.BACKSTAGE_E2E_CLI_TEST) { Task.section('Linking packages locally for e2e tests'); @@ -163,6 +166,11 @@ export async function installWithLocalDeps(dir: string) { }); }); + // This takes care of pointing all the installed packages from this repo to + // dist instead of the local src. + // For example node_modules/@backstage/core/packages.json is rewritten to point + // types to dist/index.d.ts and the main:src field is removed. + // Without this we get type checking errors in the e2e test if (process.env.BACKSTAGE_E2E_CLI_TEST) { Task.section('Patchling local dependencies for e2e tests'); @@ -177,7 +185,6 @@ export async function installWithLocalDeps(dir: string) { name, 'package.json', ); - console.log('DEBUG: depJsonPath =', depJsonPath); const depJson = await fs.readJson(depJsonPath); // We want dist to be used for e2e tests From 26e259d7bd793cc7bda229dcd32ebb38c8e2b286 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 11:41:38 +0200 Subject: [PATCH 64/69] packages/cli: remove old comment in packager --- packages/cli/src/lib/packager/packager.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/lib/packager/packager.ts b/packages/cli/src/lib/packager/packager.ts index e6f71e270b..d3e88d8c3d 100644 --- a/packages/cli/src/lib/packager/packager.ts +++ b/packages/cli/src/lib/packager/packager.ts @@ -24,7 +24,6 @@ function formatErrorMessage(error: any) { let msg = ''; if (error.code === 'PLUGIN_ERROR') { - // typescript2 plugin has a complete message with all codeframes if (error.plugin === 'esbuild') { msg += `${error.message}\n\n`; for (const { text, location } of error.errors) { From 9b3e7b345d665a4caa3e5977f2d758823551fe35 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 18 May 2020 11:44:52 +0200 Subject: [PATCH 65/69] packages/cli: clarify jest module mapper config --- packages/cli/config/jest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/config/jest.js b/packages/cli/config/jest.js index e0b82da2bb..3f37a0df4c 100644 --- a/packages/cli/config/jest.js +++ b/packages/cli/config/jest.js @@ -37,6 +37,7 @@ async function getConfig() { // To avoid having to build all deps inside the monorepo before running tests, // we point directory to src/ where applicable. + // For example, @backstage/core = /packages/core/src/index.ts is added to moduleNameMapper for (const pkg of packages) { const mainSrc = pkg.get('main:src'); if (mainSrc) { From 06bf6fa6aa81e9c024092984ce5b49a7c5de7df6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 15 May 2020 13:36:49 +0200 Subject: [PATCH 66/69] packages/core: add basic implementations of bahavior and publish RX subjects --- .../src/api/apis/implementations/lib/index.ts | 17 ++ .../apis/implementations/lib/subjects.test.ts | 178 +++++++++++++++ .../api/apis/implementations/lib/subjects.ts | 202 ++++++++++++++++++ 3 files changed, 397 insertions(+) create mode 100644 packages/core/src/api/apis/implementations/lib/index.ts create mode 100644 packages/core/src/api/apis/implementations/lib/subjects.test.ts create mode 100644 packages/core/src/api/apis/implementations/lib/subjects.ts diff --git a/packages/core/src/api/apis/implementations/lib/index.ts b/packages/core/src/api/apis/implementations/lib/index.ts new file mode 100644 index 0000000000..aa2202858c --- /dev/null +++ b/packages/core/src/api/apis/implementations/lib/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './subjects'; diff --git a/packages/core/src/api/apis/implementations/lib/subjects.test.ts b/packages/core/src/api/apis/implementations/lib/subjects.test.ts new file mode 100644 index 0000000000..31ed26d97d --- /dev/null +++ b/packages/core/src/api/apis/implementations/lib/subjects.test.ts @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { PublishSubject, BehaviorSubject } from './subjects'; + +function observerSpy() { + return { + next: jest.fn(), + error: jest.fn(), + complete: jest.fn(), + }; +} + +describe('PublishSubject', () => { + it('should be completed', async () => { + const subj = new PublishSubject(); + subj.complete(); + + const spy = observerSpy(); + subj.subscribe(spy); + await 'a tick'; + + expect(spy.next).not.toHaveBeenCalled(); + expect(spy.error).not.toHaveBeenCalled(); + expect(spy.complete).toHaveBeenCalledTimes(1); + + expect(() => subj.next(1)).toThrow('PublishSubject is closed'); + expect(() => subj.error(new Error())).toThrow('PublishSubject is closed'); + expect(() => subj.complete()).toThrow('PublishSubject is closed'); + + expect(subj.closed).toBe(true); + }); + + it('should forward values to all subscribers', async () => { + const subj = new PublishSubject(); + + const spy1 = observerSpy(); + const spy2 = observerSpy(); + subj.subscribe(spy1); + const sub = subj.subscribe(spy2); + + subj.next(42); + + expect(spy1.next).toHaveBeenCalledTimes(1); + expect(spy1.next).toHaveBeenCalledWith(42); + expect(spy2.next).toHaveBeenCalledTimes(1); + expect(spy2.next).toHaveBeenCalledWith(42); + + sub.unsubscribe(); + + subj.next(1337); + + expect(spy1.next).toHaveBeenCalledTimes(2); + expect(spy1.next).toHaveBeenCalledWith(1337); + expect(spy2.next).toHaveBeenCalledTimes(1); + + expect(spy1.error).not.toHaveBeenCalled(); + expect(spy2.error).not.toHaveBeenCalled(); + expect(spy1.complete).not.toHaveBeenCalled(); + expect(spy2.complete).not.toHaveBeenCalled(); + + expect(subj.closed).toBe(false); + }); + + it('should forward errors', async () => { + const subj = new PublishSubject(); + + const spy1 = observerSpy(); + subj.subscribe(spy1); + + const error = new Error('NOPE'); + subj.error(error); + expect(spy1.error).toHaveBeenCalledWith(error); + expect(spy1.next).not.toHaveBeenCalled(); + expect(spy1.complete).not.toHaveBeenCalled(); + + const spy2 = observerSpy(); + subj.subscribe(spy2); + await 'a tick'; + expect(spy2.error).toHaveBeenCalledWith(error); + expect(spy2.next).not.toHaveBeenCalled(); + expect(spy2.complete).not.toHaveBeenCalled(); + + expect(subj.closed).toBe(true); + }); +}); + +describe('BehaviorSubject', () => { + it('should be completed', async () => { + const subj = new BehaviorSubject(0); + subj.complete(); + + const next = jest.fn(); + const complete = jest.fn(); + subj.subscribe({ next, complete }); + await 'a tick'; + + expect(complete).toHaveBeenCalledTimes(1); + + expect(() => subj.next(1)).toThrow('BehaviorSubject is closed'); + expect(() => subj.error(new Error())).toThrow('BehaviorSubject is closed'); + expect(() => subj.complete()).toThrow('BehaviorSubject is closed'); + + expect(subj.closed).toBe(true); + }); + + it('should forward values to all subscribers', async () => { + const subj = new BehaviorSubject(0); + + const obs1 = jest.fn(); + const obs2 = jest.fn(); + subj.subscribe(obs1); + const sub = subj.subscribe(obs2); + await 'a tick'; + + expect(obs1).toHaveBeenCalledTimes(1); + expect(obs1).toHaveBeenCalledWith(0); + expect(obs2).toHaveBeenCalledTimes(1); + expect(obs2).toHaveBeenCalledWith(0); + + subj.next(42); + + expect(obs1).toHaveBeenCalledTimes(2); + expect(obs1).toHaveBeenCalledWith(42); + expect(obs2).toHaveBeenCalledTimes(2); + expect(obs2).toHaveBeenCalledWith(42); + + sub.unsubscribe(); + + subj.next(1337); + + expect(obs1).toHaveBeenCalledTimes(3); + expect(obs1).toHaveBeenCalledWith(1337); + expect(obs2).toHaveBeenCalledTimes(2); + + expect(subj.closed).toBe(false); + }); + + it('should forward errors', async () => { + const subj = new BehaviorSubject(0); + + const spy1 = observerSpy(); + subj.subscribe(spy1); + await 'a tick'; + + expect(spy1.error).not.toHaveBeenCalled(); + expect(spy1.next).toHaveBeenCalledWith(0); + + const error = new Error('NOPE'); + subj.error(error); + expect(spy1.error).toHaveBeenCalledWith(error); + expect(spy1.next).toHaveBeenCalledWith(0); + expect(spy1.next).toHaveBeenCalledTimes(1); + expect(spy1.complete).not.toHaveBeenCalled(); + + const spy2 = observerSpy(); + subj.subscribe(spy2); + await 'a tick'; + expect(spy2.error).toHaveBeenCalledWith(error); + expect(spy2.next).not.toHaveBeenCalled(); + expect(spy2.complete).not.toHaveBeenCalled(); + + expect(subj.closed).toBe(true); + }); +}); diff --git a/packages/core/src/api/apis/implementations/lib/subjects.ts b/packages/core/src/api/apis/implementations/lib/subjects.ts new file mode 100644 index 0000000000..b33df70a65 --- /dev/null +++ b/packages/core/src/api/apis/implementations/lib/subjects.ts @@ -0,0 +1,202 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Observable } from '../../../types'; +import ObservableImpl from 'zen-observable'; + +// TODO(Rugvip): These are stopgap and probably incomplete implementations of subjects. +// If we add a more complete Observables library they should be replaced. + +/** + * A basic implementation of ReactiveX publish subjects. + * + * A subject is a convenient way to create an observable when you want + * to fan out a single value to all subscribers. + * + * See http://reactivex.io/documentation/subject.html + */ +export class PublishSubject + implements Observable, ZenObservable.SubscriptionObserver { + private isClosed = false; + private terminatingError?: Error; + + private readonly observable = new ObservableImpl((subscriber) => { + if (this.isClosed) { + if (this.terminatingError) { + subscriber.error(this.terminatingError); + } else { + subscriber.complete(); + } + return () => {}; + } + + this.subscribers.add(subscriber); + return () => { + this.subscribers.delete(subscriber); + }; + }); + + private readonly subscribers = new Set< + ZenObservable.SubscriptionObserver + >(); + + get closed() { + return this.isClosed; + } + + next(value: T) { + if (this.isClosed) { + throw new Error('PublishSubject is closed'); + } + this.subscribers.forEach((subscriber) => subscriber.next(value)); + } + + error(error: Error) { + if (this.isClosed) { + throw new Error('PublishSubject is closed'); + } + this.isClosed = true; + this.terminatingError = error; + this.subscribers.forEach((subscriber) => subscriber.error(error)); + } + + complete() { + if (this.isClosed) { + throw new Error('PublishSubject is closed'); + } + this.isClosed = true; + this.subscribers.forEach((subscriber) => subscriber.complete()); + } + + subscribe(observer: ZenObservable.Observer): ZenObservable.Subscription; + subscribe( + onNext: (value: T) => void, + onError?: (error: any) => void, + onComplete?: () => void, + ): ZenObservable.Subscription; + subscribe( + onNext: ZenObservable.Observer | ((value: T) => void), + onError?: (error: any) => void, + onComplete?: () => void, + ): ZenObservable.Subscription { + const observer = + typeof onNext === 'function' + ? { + next: onNext, + error: onError, + complete: onComplete, + } + : onNext; + + return this.observable.subscribe(observer); + } +} + +/** + * A basic implementation of ReactiveX behavior subjects. + * + * A subject is a convenient way to create an observable when you want + * to fan out a single value to all subscribers. + * + * The BehaviorSubject will emit the most recently emitted value or error + * whenever a new observer subscribes to the subject. + * + * See http://reactivex.io/documentation/subject.html + */ +export class BehaviorSubject + implements Observable, ZenObservable.SubscriptionObserver { + private isClosed = false; + private currentValue: T; + private terminatingError?: Error; + + constructor(value: T) { + this.currentValue = value; + } + + private readonly observable = new ObservableImpl((subscriber) => { + if (this.isClosed) { + if (this.terminatingError) { + subscriber.error(this.terminatingError); + } else { + subscriber.complete(); + } + return () => {}; + } + + subscriber.next(this.currentValue); + + this.subscribers.add(subscriber); + return () => { + this.subscribers.delete(subscriber); + }; + }); + + private readonly subscribers = new Set< + ZenObservable.SubscriptionObserver + >(); + + get closed() { + return this.isClosed; + } + + next(value: T) { + if (this.isClosed) { + throw new Error('BehaviorSubject is closed'); + } + this.currentValue = value; + this.subscribers.forEach((subscriber) => subscriber.next(value)); + } + + error(error: Error) { + if (this.isClosed) { + throw new Error('BehaviorSubject is closed'); + } + this.isClosed = true; + this.terminatingError = error; + this.subscribers.forEach((subscriber) => subscriber.error(error)); + } + + complete() { + if (this.isClosed) { + throw new Error('BehaviorSubject is closed'); + } + this.isClosed = true; + this.subscribers.forEach((subscriber) => subscriber.complete()); + } + + subscribe(observer: ZenObservable.Observer): ZenObservable.Subscription; + subscribe( + onNext: (value: T) => void, + onError?: (error: any) => void, + onComplete?: () => void, + ): ZenObservable.Subscription; + subscribe( + onNext: ZenObservable.Observer | ((value: T) => void), + onError?: (error: any) => void, + onComplete?: () => void, + ): ZenObservable.Subscription { + const observer = + typeof onNext === 'function' + ? { + next: onNext, + error: onError, + complete: onComplete, + } + : onNext; + + return this.observable.subscribe(observer); + } +} From 73f478380cb1fb5e5884bb2ec728e435698594a6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 15 May 2020 13:39:47 +0200 Subject: [PATCH 67/69] packages/core: use BehavorSubject in AppThemeSelector --- .../AppThemeSelector/AppThemeSelector.ts | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/packages/core/src/api/apis/implementations/AppThemeSelector/AppThemeSelector.ts b/packages/core/src/api/apis/implementations/AppThemeSelector/AppThemeSelector.ts index cc1146b336..7f6659e641 100644 --- a/packages/core/src/api/apis/implementations/AppThemeSelector/AppThemeSelector.ts +++ b/packages/core/src/api/apis/implementations/AppThemeSelector/AppThemeSelector.ts @@ -14,8 +14,9 @@ * limitations under the License. */ -import Observable from 'zen-observable'; import { AppThemeApi, AppTheme } from '../../definitions'; +import { BehaviorSubject } from '../lib'; +import { Observable } from '../../../types'; const STORAGE_KEY = 'theme'; @@ -50,34 +51,17 @@ export class AppThemeSelector implements AppThemeApi { return selector; } - private readonly themes: AppTheme[]; - private activeThemeId: string | undefined; + private readonly subject = new BehaviorSubject(undefined); - private readonly observable: Observable; - private readonly subscribers = new Set< - ZenObservable.SubscriptionObserver - >(); - - constructor(themes: AppTheme[]) { - this.themes = themes; - - this.observable = new Observable((subscriber) => { - subscriber.next(this.activeThemeId); - - this.subscribers.add(subscriber); - return () => { - this.subscribers.delete(subscriber); - }; - }); - } + constructor(private readonly themes: AppTheme[]) {} getInstalledThemes(): AppTheme[] { return this.themes.slice(); } activeThemeId$(): Observable { - return this.observable; + return this.subject; } getActiveThemeId(): string | undefined { @@ -86,6 +70,6 @@ export class AppThemeSelector implements AppThemeApi { setActiveThemeId(themeId?: string): void { this.activeThemeId = themeId; - this.subscribers.forEach((subscriber) => subscriber.next(themeId)); + this.subject.next(themeId); } } From df8aac9739d2be6b123281baf974878992593c8a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 15 May 2020 14:19:12 +0200 Subject: [PATCH 68/69] packages/core: use BehavorSubject in OAuthRequestManager --- .../OAuthPendingRequests.ts | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthPendingRequests.ts b/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthPendingRequests.ts index 6348262022..96aada1864 100644 --- a/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthPendingRequests.ts +++ b/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthPendingRequests.ts @@ -14,8 +14,9 @@ * limitations under the License. */ -import Observable from 'zen-observable'; import { OAuthScopes } from '../../definitions'; +import { BehaviorSubject } from '../lib'; +import { Observable } from '../../../types'; type RequestQueueEntry = { scopes: OAuthScopes; @@ -44,16 +45,15 @@ export type OAuthPendingRequestsApi = { export class OAuthPendingRequests implements OAuthPendingRequestsApi { private requests: RequestQueueEntry[] = []; - private listeners: ZenObservable.SubscriptionObserver< - PendingRequest - >[] = []; + private subject = new BehaviorSubject>( + this.getCurrentPending(), + ); request(scopes: OAuthScopes): Promise { return new Promise((resolve, reject) => { this.requests.push({ scopes, resolve, reject }); - const pending = this.getCurrentPending(); - this.listeners.forEach((listener) => listener.next(pending)); + this.subject.next(this.getCurrentPending()); }); } @@ -66,26 +66,18 @@ export class OAuthPendingRequests return true; }); - const pending = this.getCurrentPending(); - this.listeners.forEach((listener) => listener.next(pending)); + this.subject.next(this.getCurrentPending()); } reject(error: Error) { this.requests.forEach((request) => request.reject(error)); this.requests = []; - const pending = this.getCurrentPending(); - this.listeners.forEach((listener) => listener.next(pending)); + this.subject.next(this.getCurrentPending()); } pending(): Observable> { - return new Observable((subscriber) => { - this.listeners.push(subscriber); - subscriber.next(this.getCurrentPending()); - return () => { - this.listeners = this.listeners.filter((l) => l !== subscriber); - }; - }); + return this.subject; } private getCurrentPending(): PendingRequest { From 98816d648af41c423be4feb28adcd8801c9f2792 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 15 May 2020 14:55:32 +0200 Subject: [PATCH 69/69] packages/core: use BehaviorSubject in OAuthRequestManager --- .../OAuthRequestManager.ts | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthRequestManager.ts b/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthRequestManager.ts index 02d89b9546..632ec059eb 100644 --- a/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthRequestManager.ts +++ b/packages/core/src/api/apis/implementations/OAuthRequestManager/OAuthRequestManager.ts @@ -21,8 +21,9 @@ import { AuthRequester, AuthRequesterOptions, } from '../../definitions'; -import Observable from 'zen-observable'; import { OAuthPendingRequests, PendingRequest } from './OAuthPendingRequests'; +import { BehaviorSubject } from '../lib'; +import { Observable } from '../../../types'; /** * The OAuthRequestManager is an implementation of the OAuthRequestApi. @@ -32,24 +33,10 @@ import { OAuthPendingRequests, PendingRequest } from './OAuthPendingRequests'; * them all together into a single request for each OAuth provider. */ export class OAuthRequestManager implements OAuthRequestApi { - private readonly request$: Observable; - private readonly observers = new Set< - ZenObservable.SubscriptionObserver - >(); + private readonly subject = new BehaviorSubject([]); private currentRequests: PendingAuthRequest[] = []; private handlerCount = 0; - constructor() { - this.request$ = new Observable((observer) => { - observer.next(this.currentRequests); - - this.observers.add(observer); - return () => { - this.observers.delete(observer); - }; - }).map((requests) => requests.filter(Boolean)); // Convert from sparse array to array of present items only - } - createAuthRequester(options: AuthRequesterOptions): AuthRequester { const handler = new OAuthPendingRequests(); @@ -66,7 +53,8 @@ export class OAuthRequestManager implements OAuthRequestApi { newRequests[index] = request; } this.currentRequests = newRequests; - this.observers.forEach((observer) => observer.next(newRequests)); + // Convert from sparse array to array of present items only + this.subject.next(newRequests.filter(Boolean)); }, }); @@ -100,7 +88,7 @@ export class OAuthRequestManager implements OAuthRequestApi { } authRequest$(): Observable { - return this.request$; + return this.subject; } async showLoginPopup(options: LoginPopupOptions): Promise {