From eb16f51e355368d55a99c1f9897572db5a09cbe1 Mon Sep 17 00:00:00 2001 From: Joe Farro Date: Sat, 16 Mar 2019 03:51:42 -0400 Subject: [PATCH 1/5] Remove neutrino from plexus, export plexus types Signed-off-by: Joe Farro --- .eslintignore | 5 +- BUILD.md | 14 +- packages/jaeger-ui/package.json | 2 +- packages/plexus/.eslintrc.js | 4 + packages/plexus/.gitignore | 4 +- packages/plexus/.neutrinorc.js | 100 ---- packages/plexus/BUILD.md | 99 +++- packages/plexus/babel.config.js | 53 +++ packages/plexus/demo/src/index.tsx | 1 + packages/plexus/demo/template.ejs | 13 + packages/plexus/package.json | 46 +- packages/plexus/src/DirectedGraph/MiniMap.tsx | 2 +- .../plexus/src/LayoutManager/Coordinator.tsx | 2 +- .../LayoutManager/layout.worker.bundled.d.ts | 21 + packages/plexus/tsconfig.json | 37 ++ packages/plexus/webpack-factory.js | 255 +++++++++++ ...ebpack.config.js => webpack.dev.config.js} | 13 +- .../plexus/webpack.layout-worker.config.js | 18 + packages/plexus/webpack.umd.config.js | 18 + scripts/check-license.sh | 2 +- tsconfig.json | 3 +- typings/custom.d.ts | 15 - yarn.lock | 430 +++++++++--------- 23 files changed, 765 insertions(+), 392 deletions(-) delete mode 100644 packages/plexus/.neutrinorc.js create mode 100644 packages/plexus/babel.config.js create mode 100644 packages/plexus/demo/template.ejs create mode 100644 packages/plexus/src/LayoutManager/layout.worker.bundled.d.ts create mode 100644 packages/plexus/tsconfig.json create mode 100644 packages/plexus/webpack-factory.js rename packages/plexus/{webpack.config.js => webpack.dev.config.js} (64%) create mode 100644 packages/plexus/webpack.layout-worker.config.js create mode 100644 packages/plexus/webpack.umd.config.js diff --git a/.eslintignore b/.eslintignore index a9c000174d..942ad8fea2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ -build/**/*.js -coverage/**/*.js +build +coverage +packages/plexus/src/LayoutManager/layout.worker*js* diff --git a/BUILD.md b/BUILD.md index 51624edea3..0e0cbda14c 100644 --- a/BUILD.md +++ b/BUILD.md @@ -12,7 +12,9 @@ ESLint is being used to lint the repo, as a whole. Within `./packages/plexus` (f #### `typescript` -The TypeScript package (e.g. `typescript`) is **not for compiling** TypeScript source but is included for the purpose of bolstering the linting of TypeScript files. `tsc` catches quite a few issues that ESLint does not pick up on. +In the project root, `typescript` is used to bolster the linting of TypeScript files. `tsc` catches quite a few issues that ESLint does not pick up on. + +In `./packages/plexus`, `typescript` is used to generate type declarations for the ES module build. See [`./packages/plexus/BUILD.md`](packages/plexus/BUILD.md#TODO) for details. ### Workspaces @@ -66,7 +68,7 @@ Runs the `lint` and `test` scripts. ## `.eslintrc.js` -Pretty basic. Needs to be cleaned up. The `airbnb` configuration needs to be updated. +Pretty basic. Note: This configuration is extended by `./packages/plexus/.eslintrc.js`. @@ -96,16 +98,14 @@ A few notable [compiler settings](http://www.typescriptlang.org/docs/handbook/co * [dom.iterable](https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.iterable.d.ts) * [webworker](https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts) * `skipLibCheck` - Maybe worth reevaluating in the future -* `strict` - Very important +* `strict` - Important * `noEmit` - We're using this for linting, after all * `include` - We've included `./typgings` here because it turned out to be a lot simpler than configuring `types`, `typeRoots` and `paths` ## `typings/{custom.d.ts, index.d.ts}` -This is relevant for `./packages/plexus/src/LayoutManager/layout.worker.js` and the `viz.js` package. +This is relevant for `./packages/plexus/src/LayoutManager/getLayout.tsx` and the `viz.js` package. I wasn't able to get much in the line of error messaging, so I'm pretty vague on this. -The version of `viz.js` in use (1.8.1) ships with an `index.d.ts` file, but it has some issues. I was able to define alternate type declarations for `viz.js` in `./typings/custom.d.ts` and referring `./typings/index.d.ts` to `./typings/custom.d.ts`. I also changed the import for `viz.js` to `viz.js/viz.js`, which is importing it's main file, directly, instead of implicitly. - -For `./packages/plexus/src/LayoutManager/layout.worker.js`, webpack (in `./packages/plexus`) is set up to use the [`worker-loader`](https://github.com/webpack-contrib/worker-loader) to load the file. This converts it to a `WebWorker` by instantiating the `WebWorker` with the source as a `Blob`. Consequently, `layout.worker.js` is implemented in the context of a `WorkerGlobalScope` but consumed as if it's a regular class that extends `Worker`. To deal with this mismatch, a **webpack alias** was created mapping `worker-alias/` to `./packages/plexus/src`. This allowed a type declaration to be defined for `worker-alias/*` as a subclass of `Worker`. +The version of `viz.js` in use (1.8.1) ships with an `index.d.ts` file, but it has some issues. `./typings/custom.d.ts` defines an alternate type declaration for `viz.js` by targeting `viz.js/viz.js`. It was necessary use `./typings/index.d.ts` to refer to `./typings/custom.d.ts`. Then, importing the modules main file, which is `viz.js/viz.js`, will use the alternate type declaration. diff --git a/packages/jaeger-ui/package.json b/packages/jaeger-ui/package.json index b6e80674b7..6c02be4ecd 100644 --- a/packages/jaeger-ui/package.json +++ b/packages/jaeger-ui/package.json @@ -33,7 +33,7 @@ "source-map-explorer": "^1.6.0" }, "dependencies": { - "@jaegertracing/plexus": "0.0.1-dev.4", + "@jaegertracing/plexus": "0.0.2-dev.0", "antd": "3.8.0", "chance": "^1.0.10", "classnames": "^2.2.5", diff --git a/packages/plexus/.eslintrc.js b/packages/plexus/.eslintrc.js index bb1b187f66..a66b77f791 100644 --- a/packages/plexus/.eslintrc.js +++ b/packages/plexus/.eslintrc.js @@ -29,9 +29,13 @@ module.exports = { 'prettier/@typescript-eslint', ], rules: { + // use @typescript-eslint/no-useless-constructor to avoid null error on *.d.ts files + 'no-useless-constructor': 0, + '@typescript-eslint/explicit-function-return-type': 0, '@typescript-eslint/explicit-member-accessibility': 0, '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-useless-constructor': 1, '@typescript-eslint/prefer-interface': 0, }, }; diff --git a/packages/plexus/.gitignore b/packages/plexus/.gitignore index 378eac25d3..3882f00a19 100644 --- a/packages/plexus/.gitignore +++ b/packages/plexus/.gitignore @@ -1 +1,3 @@ -build +dist +lib +src/LayoutManager/layout.worker*js* diff --git a/packages/plexus/.neutrinorc.js b/packages/plexus/.neutrinorc.js deleted file mode 100644 index 1384f74b00..0000000000 --- a/packages/plexus/.neutrinorc.js +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// 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. - -const { join } = require('path'); - -module.exports = neutrino => { - neutrino.use([ - '@neutrinojs/react-components', - // Note: webpack.config.js adds the appropriate entry point. - { - // don't use a 'components' folder - components: '.', - include: [], - exclude: [], - babel: { - presets: [ - '@babel/preset-typescript', - [ - '@babel/preset-env', - { - // this should match the settings in jaeger-ui/package.json - targets: ['>0.5%', 'not dead', 'not ie <= 11', 'not op_mini all'], - }, - ], - ], - }, - ruleId: 'compile', - useId: 'babel', - hot: false, - }, - ]); - - // also compile TypeScript files - neutrino.config.resolve.extensions.add('.tsx'); - neutrino.config.resolve.extensions.add('.ts'); - - const extensions = neutrino.config.resolve.extensions - .values() - .map(ext => (ext[0] === '.' ? ext.slice(1) : ext)); - - // the compile rule needs to be informed of the new extensions after - // @neutrinojs/react-components is added via .use(...), and configuring in - // the .use(...) call doesn't work - const compileTest = new RegExp(`\\.(${extensions.join('|')})$`); - neutrino.config.module.rule('compile').test(compileTest); - - // Add the demo directory as a valid source folder. - // Note: webpack.config.js adds `demo/index.tsx` as the entry point for the - // demo when starting for "development". - neutrino.config.module.rule('compile').include.add(join(__dirname, 'demo')); - - // these have to be stubbed / mocked - neutrino.config.node.set('module', 'empty'); - neutrino.config.node.set('Buffer', 'mock'); - - // by default, the banner plugin adds the following (and a lot of headaches) - // require('source-map-support').install(); - neutrino.config.plugins.delete('banner'); - - // placeholder - neutrino.use(['@neutrinojs/jest']); - - // worker filenames match the format .worker.tsx - const workerTest = new RegExp(`worker\\.(${extensions.join('|')})$`); - neutrino.config.module - .rule('worker') - .test(workerTest) - .use('worker') - // use the webpack worker-loader loader - .loader(require.resolve('worker-loader')) - .options({ - inline: true, - fallback: false, - name: '[name].js', - }); - - // babel compilation has to happen as "pre" in terms of loader ordering - neutrino.config.module.rule('compile').enforce('pre'); - - // nothing but headaches from HMR - neutrino.config.plugins.delete('hot'); - - // In order to Type the web worker, it needs to be treated as an external - // module with a local type definition, in TypeScript. Local files can't be - // treated as external modules, so using "worker" as an alias for - // /src allows TS to see local workers as a file in an external - // package. - neutrino.config.resolve.alias.set('worker-alias', join(__dirname, 'src')); -}; diff --git a/packages/plexus/BUILD.md b/packages/plexus/BUILD.md index 72264580f4..a66fa7eca6 100644 --- a/packages/plexus/BUILD.md +++ b/packages/plexus/BUILD.md @@ -1,44 +1,97 @@ # Build Considerations: `./packages/plexus` -The package is implemented in TypeScript and must be compiled to JavaScript. The build output goes into `./build` as one main file, `./build/index.js`. +**Note:** File references are relative to `./packages/plexus`; `./` refers to `./packages/plexus`. -**Note:** File references are relative to `./packages/plexus`. E.g. `./` is actually referring to `./packages/plexus`, relative to the project root. +The package is implemented in TypeScript and must be compiled to JavaScript. -## Neutrino +There are three build scenarios and one pre-step common to all of them. -[Neutrino](https://master.neutrinojs.org/) is used to build `plexus`. The [release candidate for `v9`](https://github.com/neutrinojs/neutrino/milestone/6) is used. +Pre-step: -While Neutrino intends to allow for "zero initial configuration", that turned out not to be the case for `plexus`. +* Bundle `./src/LayoutManager/layout.worker.tsx` to a UMD module which can initialize a `WebWorker` from a `Blob` URL -`.neutrinorc.js` has a fair bit of configuration. It's well commented, so it won't be rehashed, here. +Build scenarios: -### `webpack.config.js` +* Production ES modules + * **This is the project's default export as `./lib/index.js`.** This build is not bundled and therefore does not use Webpack. +* Production UMD module +* Webpack dev server + * Runs `./demo/src/index.tsx` which has a few example graphs. -**Configures the webpack entry point.** Neutrino is used to generate the webpack config, but there were challenges in using it to set a non-Neutrino default entry point. +The pre-step, which they all require, is to bundle `./src/LayoutManager/layout.worker.tsx` via the `worker-loader` Webpack loader. -### `worker-alias` +## Babel -`worker-alias` is set up as a webpack alias in `.neutrinorc.js`. This alias matches a declaration in the project root: `../../typings/custom.d.ts`. See `../../BUILD.md` for details. +Babel is used to transpile the TypeScript for all scenarios and the pre-step. See `babel.config.js` for specifics. -## `package.json` +The production ES module build is not bundled and therefore does not use Webpack. -### Script `prepublishOnly` +## Webpack -Executed after `yarn install` is run in the project root. +Webpack is used to: -### Dependencies (dev and otherwise) +* Bundle `./src/LayoutManager/layout.worker.tsx` so we can have a `WebWorker` without forcing folks to deal with an additional JavaScript asset +* Bundle the production UMD module +* Run the Webpack dev server during development -#### `viz.js@1.8.1` +`./webpack-factory.js` is used to generate the Webpack configurations for each scenario. -This specific version of [viz.js](https://github.com/mdaines/viz.js) is used to avoid a regression. Meanwhile, [looks like `2.x.x`](https://github.com/mdaines/viz.js/issues/120#issuecomment-389281407) has recovered a lot of ground; [GitHub ticket](https://github.com/jaegertracing/jaeger-ui/issues/339) to upgrade. +## TypeScript `--emitDeclarationOnly` + +Compiling TypeScript via Babel does not allow for type declarations to be generated. So, `tsc` is used with `./tsconfig.json` to generate the type defs. + +This only applies to the ES module production build, output to `./lib`. + +Note: `./tsconfig.json` does not extend `../../tsconfig.json`. + +## Pre-step: `layout.worker` -#### `worker-loader` +`./src/LayoutManager/layout.worker.tsx` is intended to be loaded as a `WebWorker`. To be able to load it as a `Worker` without requiring an extra JS file, Webpack and the [`worker-loader`](https://github.com/webpack-contrib/worker-loader) loader are used to bundle it into a UMD module, `./src/LayoutManager/layout.worker.bundled.js`. -[`worker-loader`](https://github.com/webpack-contrib/worker-loader) is a webpack plugin that allows a file to be imported as a class which, when instantiated, creates a WebWorker from the underlying source. +Within the UMD module, `layout.worker.tsx` (and everything bundled into it) is turned into a `Blob` URL that's used to initialize a `WebWorker`. -#### `@babel/preset-typescript` +The resultant UMD module can be initialized as a class: -TypeScript is compiled through Babel via [`@babel/preset-typescript`](https://babeljs.io/docs/en/babel-preset-typescript). **The TypeScript compiler is not used to compile TS files.** Note: `tsc` is used to compliment the use of ESLint to lint TypeScript, though. +```ts +import LayoutWorker from './layout.worker.bundled'; + +const leWorker = new LayoutWorker(); + +leWorker.postMessage(...); +``` + +> It's all fun and games until type checking loses an eye. + +To make sure we don't end up with an implicit `any`, `layout.worker.bundled.d.ts` provides a type declaration: + +```ts +class LayoutWorker extends Worker { ... } +``` + +## `package.json` + +### Scripts + +* `build` — Generates the UMD bundle and ES module production builds +* `prepublishOnly` — Executed after `yarn install` is run in the project root; runs the `build` script +* `start` — Starts the Webpack dev server and watches all files, including `layout.worker` + +The `_tasks/*` scripts are not intended to be run, directly. + +* `_tasks/clean/*` + * Remove generated files +* `_tasks/bundle-worker` + * Generates the `layout.worker` UMD bundle +* `_tasks/build/*` + * Generates the production ES and UMD builds +* `_tasks/dev-server` + * Starts the Webpack dev server + +### Dependencies (dev and otherwise) + +#### `viz.js@1.8.1` + +This specific version of [viz.js](https://github.com/mdaines/viz.js) is used to avoid a regression. Meanwhile, [looks like `2.x.x`](https://github.com/mdaines/viz.js/issues/120#issuecomment-389281407) has recovered a lot of ground; [GitHub ticket](https://github.com/jaegertracing/jaeger-ui/issues/339) to upgrade. #### `jest@23.6.0` @@ -48,8 +101,8 @@ Jest is not actually be used, yet. Present as a placeholder. ([Ticket](https://g Configures ESLint for TypeScript. ESLint is executed from the project root, but this file is merged with the project root `.eslintrc.js` and overrides where there is overlap. -Uses [`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) as the parser. +`prettier/@typescript-eslint` needs to be last in the `extends` so it overrides the formatting rules from `plugin:@typescript-eslint/recommended`. -It's worth noting that the `tsconfig.json` is in the project root and `tsconfigRootDir: '.'` refers to the project root. +Uses [`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) as the parser. -`prettier/@typescript-eslint` needs to be last in the `extends` so it overrides the formatting rules from `plugin:@typescript-eslint/recommended`. +The `tsconfigRootDir: '.'` refers to the project root because that is where ESLint is executed, from. And, the `tsconfig.json` referred to by `./.eslintrc.js` is that in the project root. diff --git a/packages/plexus/babel.config.js b/packages/plexus/babel.config.js new file mode 100644 index 0000000000..c012385845 --- /dev/null +++ b/packages/plexus/babel.config.js @@ -0,0 +1,53 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// 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. + +function getBabelConfig(api) { + const env = api.env(); + return { + plugins: [ + '@babel/plugin-syntax-dynamic-import', + [ + 'babel-plugin-transform-react-remove-prop-types', + { + removeImport: true, + }, + ], + [ + '@babel/plugin-proposal-class-properties', + { + loose: true, + }, + ], + ], + presets: [ + [ + '@babel/preset-env', + { + // this should match the settings in jaeger-ui/package.json + targets: ['>0.5%', 'not dead', 'not ie <= 11', 'not op_mini all'], + }, + ], + [ + '@babel/preset-react', + { + development: env === 'development', + useBuiltIns: true, + }, + ], + '@babel/preset-typescript', + ], + }; +} + +module.exports = getBabelConfig; diff --git a/packages/plexus/demo/src/index.tsx b/packages/plexus/demo/src/index.tsx index d8bb367934..12bde37ecf 100644 --- a/packages/plexus/demo/src/index.tsx +++ b/packages/plexus/demo/src/index.tsx @@ -122,3 +122,4 @@ function Demo() { } render(, document.querySelector('#root')); +console.log('yar'); diff --git a/packages/plexus/demo/template.ejs b/packages/plexus/demo/template.ejs new file mode 100644 index 0000000000..0e97b43d5b --- /dev/null +++ b/packages/plexus/demo/template.ejs @@ -0,0 +1,13 @@ + + + + + + <%= htmlWebpackPlugin.options.title %> + + + +
+ + + \ No newline at end of file diff --git a/packages/plexus/package.json b/packages/plexus/package.json index 7a5c5016e8..6dd76ffdd5 100644 --- a/packages/plexus/package.json +++ b/packages/plexus/package.json @@ -1,28 +1,41 @@ { "name": "@jaegertracing/plexus", "license": "Apache-2.0", - "version": "0.0.1-dev.4", - "description": "Direct Graph React component", - "main": "build/index.js", - "files": ["build"], + "version": "0.0.2-dev.0", + "description": "Directed Graph React component", + "main": "lib/index.js", + "files": ["lib", "dist"], "devDependencies": { + "@babel/cli": "7.2.3", + "@babel/core": "7.3.4", + "@babel/plugin-proposal-class-properties": "7.3.4", + "@babel/plugin-syntax-dynamic-import": "7.2.0", + "@babel/preset-env": "7.3.4", "@babel/preset-react": "7.0.0", "@babel/preset-typescript": "7.1.0", - "@neutrinojs/compile-loader": "9.0.0-rc.0", - "@neutrinojs/jest": "9.0.0-rc.0", - "@neutrinojs/react-components": "9.0.0-rc.0", "@types/d3-zoom": "1.7.3", "@types/react": "^16.7.20", "@types/react-dom": "^16.0.11", + "babel-loader": "8.0.5", + "babel-plugin-transform-react-remove-prop-types": "0.4.24", + "clean-webpack-plugin": "2.0.1", + "css-loader": "2.1.1", "enzyme": "3.8.0", + "file-loader": "3.0.1", + "html-loader": "0.5.5", + "html-webpack-plugin": "3.2.0", "jest": "23.6.0", - "neutrino": "9.0.0-rc.0", + "npm-run-all": "4.1.5", "react": "^16.7.0", - "react-dom": "^16.7.0", "react-addons-test-utils": "15.6.2", + "react-dom": "^16.7.0", + "rimraf": "2.6.3", + "style-loader": "0.23.1", + "url-loader": "1.1.2", "webpack": "^4.28.4", "webpack-cli": "^3.2.1", "webpack-dev-server": "^3.1.14", + "webpack-node-externals": "1.7.2", "worker-loader": "2.0.0" }, "peerDependencies": { @@ -34,10 +47,19 @@ "viz.js": "1.8.1" }, "scripts": { - "build": "webpack --mode production", + "_tasks/build/lib/js": "node_modules/.bin/babel src --extensions '.tsx,.js' --out-dir lib", + "_tasks/build/lib/types": "../../node_modules/.bin/tsc", + "_tasks/build/umd": "webpack --mode $NODE_ENV --config webpack.umd.config.js", + "_tasks/clean/dirs": "rimraf lib dist", + "_tasks/clean/worker": "rimraf src/LayoutManager/layout.worker*js*", + "_tasks/bundle-worker": "webpack --mode $NODE_ENV --config webpack.layout-worker.config.js", + "_tasks/dev-server": "webpack-dev-server --mode $NODE_ENV --config webpack.dev.config.js", + "build": + "NODE_ENV=production npm-run-all -ln --serial _tasks/clean/* _tasks/bundle-worker --parallel _tasks/build/**", "coverage": "echo 'NO TESTS YET'", - "prepublishOnly": "webpack --mode production", - "start": "webpack-dev-server --mode development", + "prepublishOnly": "$npm_execpath build", + "start": + "NODE_ENV='development' npm-run-all -ln --serial _tasks/clean/worker --parallel '_tasks/bundle-worker --watch' _tasks/dev-server", "test": "echo 'NO TESTS YET'" } } diff --git a/packages/plexus/src/DirectedGraph/MiniMap.tsx b/packages/plexus/src/DirectedGraph/MiniMap.tsx index 905e992458..46c832532a 100644 --- a/packages/plexus/src/DirectedGraph/MiniMap.tsx +++ b/packages/plexus/src/DirectedGraph/MiniMap.tsx @@ -79,7 +79,7 @@ function getClassNames(props: TProps) { }; } -function MiniMap(props: TProps) { +export function MiniMap(props: TProps) { const css = getClassNames(props); const mapSize = getMapSize(props); const activeXform = getViewTransform(props, mapSize); diff --git a/packages/plexus/src/LayoutManager/Coordinator.tsx b/packages/plexus/src/LayoutManager/Coordinator.tsx index 3379b1616b..af1234e267 100644 --- a/packages/plexus/src/LayoutManager/Coordinator.tsx +++ b/packages/plexus/src/LayoutManager/Coordinator.tsx @@ -17,7 +17,7 @@ import * as convCoord from './dot/conv-coord'; import { matchEdges, matchVertices } from './match-inputs'; // eslint-disable-next-line import/order, import/no-unresolved -import LayoutWorker from 'worker-alias/LayoutManager/layout.worker'; +import LayoutWorker from './layout.worker.bundled'; import { ECoordinatorPhase, diff --git a/packages/plexus/src/LayoutManager/layout.worker.bundled.d.ts b/packages/plexus/src/LayoutManager/layout.worker.bundled.d.ts new file mode 100644 index 0000000000..ad1c8129b3 --- /dev/null +++ b/packages/plexus/src/LayoutManager/layout.worker.bundled.d.ts @@ -0,0 +1,21 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// 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 default class LayoutkWorker extends Worker { + id: number; + constructor(); + // `onmessageerror` is missing from the TypeScript type def for workers + // https://html.spec.whatwg.org/multipage/workers.html#dedicated-workers-and-the-worker-interface + onmessageerror: ((this: Worker, event: ErrorEvent) => any | void) | null; +} diff --git a/packages/plexus/tsconfig.json b/packages/plexus/tsconfig.json new file mode 100644 index 0000000000..dddf7535f0 --- /dev/null +++ b/packages/plexus/tsconfig.json @@ -0,0 +1,37 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// 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. + +{ + "compilerOptions": { + "target": "es2016", + "lib": ["es2017", "dom", "dom.iterable", "webworker"], + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "declaration": true, + "emitDeclarationOnly": true, + "jsx": "preserve", + "outDir": "lib" + }, + "include": [ + "src", + // easier to add `./typings` here than deal with typeRoots, paths, etc. + "../../typings" + ] +} diff --git a/packages/plexus/webpack-factory.js b/packages/plexus/webpack-factory.js new file mode 100644 index 0000000000..a728d7bffd --- /dev/null +++ b/packages/plexus/webpack-factory.js @@ -0,0 +1,255 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// 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. + +/* eslint-disable import/no-extraneous-dependencies */ +/* eslint-disable @typescript-eslint/no-var-requires */ + +const { join } = require('path'); +const CleanWebpackPlugin = require('clean-webpack-plugin'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const nodeExternals = require('webpack-node-externals'); + +const babelConfigPath = require.resolve('./babel.config'); + +// Note: Do not allow *.ts files +const extensions = ['.js', '.json', '.tsx']; +const extensionsRx = /\.(js|json|tsx)$/; +const extensionsWorkerRx = /\.worker\.(js|json|tsx)$/; + +function makeBaseConfig() { + return { + mode: 'production', + target: 'web', + context: __dirname, + stats: { + children: false, + entrypoints: false, + modules: false, + }, + externals: [nodeExternals()], + resolve: { extensions }, + module: { + rules: [ + { + // + // Note: This `pre` is crucial (and not at all obvious) + // + enforce: 'pre', + test: extensionsRx, + include: [join(__dirname, 'src'), join(__dirname, 'demo')], + use: [ + { + loader: 'babel-loader', + options: { + cacheDirectory: true, + babelrc: false, + configFile: babelConfigPath, + }, + }, + ], + }, + ], + }, + }; +} + +function makeDevConfig() { + const config = { + mode: 'development', + devtool: 'cheap-module-eval-source-map', + output: { + path: join(__dirname, 'build'), + publicPath: '/', + filename: 'assets/[name].js', + }, + entry: { index: join(__dirname, 'demo/src/index') }, + devServer: { + port: 5000, + hot: false, + historyApiFallback: true, + overlay: true, + stats: { + all: false, + errors: true, + timings: true, + warnings: true, + }, + }, + plugins: [ + new HtmlWebpackPlugin({ + template: join(__dirname, 'demo/template.ejs'), + appMountId: 'root', + lang: 'en', + meta: { + viewport: 'width=device-width, initial-scale=1', + }, + filename: 'index.html', + chunks: ['index'], + title: 'React Preview', + }), + ], + }; + + const rules = [ + { + test: /\.html$/, + use: [ + { + loader: 'html-loader', + options: { + attrs: ['img:src', 'link:href'], + }, + }, + ], + }, + { + test: /\.css$/, + exclude: [/\.module\.css$/], + use: [ + { + loader: 'style-loader', + }, + { + loader: 'css-loader', + options: { + importLoaders: 0, + }, + }, + ], + }, + { + test: /\.module\.css$/, + use: [ + { + loader: 'style-loader', + }, + { + loader: 'css-loader', + options: { + importLoaders: 0, + modules: true, + }, + }, + ], + }, + { + test: /\.(eot|ttf|woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, + use: [ + { + loader: 'file-loader', + options: { + name: 'assets/[name].[ext]', + }, + }, + ], + }, + { + test: /\.(ico|png|jpg|jpeg|gif|svg|webp)(\?v=\d+\.\d+\.\d+)?$/, + use: [ + { + loader: 'url-loader', + options: { + limit: 8192, + name: 'assets/[name].[ext]', + }, + }, + ], + }, + ]; + return { config, rules }; +} + +function makeCommonProdConfig() { + return { + devtool: 'source-map', + optimization: { + minimize: true, + splitChunks: false, + runtimeChunk: false, + }, + }; +} + +function makeWorkerConfig() { + const layoutDir = join(__dirname, 'src/LayoutManager'); + const config = { + ...makeCommonProdConfig(), + output: { + path: layoutDir, + publicPath: '/', + filename: '[name].bundled.js', + library: 'layout.worker.bundled', + libraryTarget: 'umd', + umdNamedDefine: true, + }, + entry: { + 'layout.worker': join(layoutDir, 'layout.worker.tsx'), + }, + }; + const rules = [ + { + test: extensionsWorkerRx, + use: [ + { + loader: 'worker-loader', + options: { + inline: true, + fallback: false, + name: '[name].js', + }, + }, + ], + }, + ]; + return { config, rules }; +} + +function makeUmdConfig() { + const config = { + ...makeCommonProdConfig(), + output: { + path: join(__dirname, 'dist'), + publicPath: '/', + filename: 'index.js', + library: 'plexus', + libraryTarget: 'umd', + umdNamedDefine: true, + }, + entry: join(__dirname, 'src/index'), + plugins: [new CleanWebpackPlugin()], + }; + return { config, rules: [] }; +} + +const FACTORIES = { + development: makeDevConfig, + 'layout-worker': makeWorkerConfig, + umd: makeUmdConfig, +}; + +function makeWebpackConfig(mode) { + const factory = FACTORIES[mode]; + if (!factory) { + throw new Error(`Invalid config type: ${mode}`); + } + const { config, rules } = factory(); + const baseConfig = makeBaseConfig(); + baseConfig.module.rules.push(...rules); + return { + ...baseConfig, + ...config, + }; +} + +module.exports = makeWebpackConfig; diff --git a/packages/plexus/webpack.config.js b/packages/plexus/webpack.dev.config.js similarity index 64% rename from packages/plexus/webpack.config.js rename to packages/plexus/webpack.dev.config.js index 17a6b33abe..14d43d8698 100644 --- a/packages/plexus/webpack.config.js +++ b/packages/plexus/webpack.dev.config.js @@ -12,14 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -/* eslint-disable @typescript-eslint/no-var-requires */ -const { join } = require('path'); -const neutrino = require('neutrino'); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const factory = require('./webpack-factory'); -const config = neutrino().webpack(); -const folder = config.mode === 'development' ? join('demo', 'src') : 'src'; -config.entry = { - index: join(__dirname, folder, 'index'), -}; - -module.exports = [config]; +module.exports = factory('development'); diff --git a/packages/plexus/webpack.layout-worker.config.js b/packages/plexus/webpack.layout-worker.config.js new file mode 100644 index 0000000000..6c58452cff --- /dev/null +++ b/packages/plexus/webpack.layout-worker.config.js @@ -0,0 +1,18 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// 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. + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const factory = require('./webpack-factory'); + +module.exports = factory('layout-worker'); diff --git a/packages/plexus/webpack.umd.config.js b/packages/plexus/webpack.umd.config.js new file mode 100644 index 0000000000..a0544feddc --- /dev/null +++ b/packages/plexus/webpack.umd.config.js @@ -0,0 +1,18 @@ +// Copyright (c) 2019 Uber Technologies, Inc. +// +// 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. + +// eslint-disable-next-line @typescript-eslint/no-var-requires +const factory = require('./webpack-factory'); + +module.exports = factory('umd'); diff --git a/scripts/check-license.sh b/scripts/check-license.sh index 90065c3b0c..65af19ab1a 100755 --- a/scripts/check-license.sh +++ b/scripts/check-license.sh @@ -1,7 +1,7 @@ #!/bin/sh licRes=$( -for file in $(find scripts typings packages/*/src packages/plexus/demo -type f -iregex '.*\.[cjt]ss*x*$'); do +for file in $(find scripts typings packages/*/src packages/plexus/demo -type f -iregex '.*\.[cjt]ss*x*$' \! -name 'layout.worker.bundled.js'); do head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED)" || echo " ${file}" done;) if [ -n "${licRes}" ]; then diff --git a/tsconfig.json b/tsconfig.json index 0941f63b62..a8a926aebb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,5 +22,6 @@ "packages/plexus/src", // easier to add `./typings` here than deal with typeRoots, paths, etc. "typings" - ] + ], + "exclude": ["./packages/plexus/src/LayoutManager/layout.worker.bundled.js"] } diff --git a/typings/custom.d.ts b/typings/custom.d.ts index bc37fc2baf..768bf24d1b 100644 --- a/typings/custom.d.ts +++ b/typings/custom.d.ts @@ -15,21 +15,6 @@ // Note: These type defs cannot be in the typings/index.d.ts file (due to // TypeScript automagic?). -// The webpack config (via neutrino.rc.js) has "worker" as an alias for -// /src. Thus, all TS files imported as "worker/*" are acutally -// local files. They should be web-worker files. The following custom type-def -// allows them to be treated as `Worker`s. -declare module "worker-alias/*" { - class WebpackWorker extends Worker { - id: number; - constructor(); - // `onmessageerror` is missing from the TypeScript type def for workers - // https://html.spec.whatwg.org/multipage/workers.html#dedicated-workers-and-the-worker-interface - onmessageerror: ((this: Worker, event: ErrorEvent) => any | void) | null; - } - export default WebpackWorker; -} - // Type def for the viz.js module, which doesn't ship with usable TypeScript // types. declare module "viz.js/viz.js" { diff --git a/yarn.lock b/yarn.lock index 2f87c6e2ac..379062d7e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,22 @@ # yarn lockfile v1 +"@babel/cli@7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.3.tgz#1b262e42a3e959d28ab3d205ba2718e1923cfee6" + dependencies: + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.0.0" + lodash "^4.17.10" + mkdirp "^0.5.1" + output-file-sync "^2.0.0" + slash "^2.0.0" + source-map "^0.5.0" + optionalDependencies: + chokidar "^2.0.3" + "@babel/code-frame@7.0.0", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35", "@babel/code-frame@^7.0.0-beta.38": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" @@ -46,7 +62,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.0.0-beta.49", "@babel/core@^7.0.1", "@babel/core@^7.1.6": +"@babel/core@7.3.4", "@babel/core@^7.0.1": version "7.3.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.3.4.tgz#921a5a13746c21e32445bf0798680e9d11a6530b" dependencies: @@ -264,7 +280,7 @@ "@babel/helper-create-class-features-plugin" "^7.3.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-proposal-class-properties@^7.1.0": +"@babel/plugin-proposal-class-properties@7.3.4": version "7.3.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.4.tgz#410f5173b3dc45939f9ab30ca26684d72901405e" dependencies: @@ -327,7 +343,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-dynamic-import@7.2.0", "@babel/plugin-syntax-dynamic-import@^7.0.0": +"@babel/plugin-syntax-dynamic-import@7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" dependencies: @@ -682,7 +698,7 @@ js-levenshtein "^1.1.3" semver "^5.3.0" -"@babel/preset-env@^7.0.0", "@babel/preset-env@^7.1.6": +"@babel/preset-env@7.3.4", "@babel/preset-env@^7.0.0": version "7.3.4" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.3.4.tgz#887cf38b6d23c82f19b5135298bdb160062e33e1" dependencies: @@ -1367,112 +1383,6 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@neutrinojs/banner@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/banner/-/banner-9.0.0-rc.0.tgz#1303a9dac1b8ee1be2d619cb2c1f36fce55155a9" - -"@neutrinojs/clean@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/clean/-/clean-9.0.0-rc.0.tgz#a7a7cf4141a554dcbc5b79c8d5d86dbc2eb0b2f3" - dependencies: - clean-webpack-plugin "^1.0.0" - -"@neutrinojs/compile-loader@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/compile-loader/-/compile-loader-9.0.0-rc.0.tgz#201bfe0df030e8772760cf0222fbb8916c46cc87" - dependencies: - "@babel/core" "^7.1.6" - babel-loader "^8.0.4" - -"@neutrinojs/dev-server@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/dev-server/-/dev-server-9.0.0-rc.0.tgz#398033327fe7ec8d16a43ab7d3659ccb791a0acc" - -"@neutrinojs/font-loader@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/font-loader/-/font-loader-9.0.0-rc.0.tgz#bf288764c09beb2f047f444f11265c5d946cdea9" - dependencies: - file-loader "^2.0.0" - -"@neutrinojs/html-loader@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/html-loader/-/html-loader-9.0.0-rc.0.tgz#85b28517da001a70fd4e52cabf0b048b47dadbf3" - dependencies: - html-loader "^0.5.5" - -"@neutrinojs/html-template@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/html-template/-/html-template-9.0.0-rc.0.tgz#53bbeb48804168dca539b63edc7c54d213473f28" - dependencies: - html-webpack-plugin "4.0.0-beta.4" - -"@neutrinojs/image-loader@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/image-loader/-/image-loader-9.0.0-rc.0.tgz#bbb3c446a4e12410c7875947751b4231b9dbdff1" - dependencies: - file-loader "^2.0.0" - url-loader "^1.1.2" - -"@neutrinojs/jest@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/jest/-/jest-9.0.0-rc.0.tgz#3c74fc53fe3f032beb53c9846e2ce1291aac4bc3" - dependencies: - "@babel/core" "^7.1.6" - babel-core "^7.0.0-bridge.0" - babel-jest "^23.6.0" - deepmerge "^1.5.2" - eslint-plugin-jest "^22.0.1" - -"@neutrinojs/react-components@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/react-components/-/react-components-9.0.0-rc.0.tgz#7a82783384c83479c1dc4286584a6dca32487cc3" - dependencies: - "@neutrinojs/banner" "9.0.0-rc.0" - "@neutrinojs/react" "9.0.0-rc.0" - deepmerge "^1.5.2" - webpack-node-externals "^1.7.2" - -"@neutrinojs/react@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/react/-/react-9.0.0-rc.0.tgz#5c73369794066b0f1b6910ce0faa7a839acf1c49" - dependencies: - "@babel/core" "^7.1.6" - "@babel/plugin-proposal-class-properties" "^7.1.0" - "@babel/preset-react" "^7.0.0" - "@neutrinojs/web" "9.0.0-rc.0" - babel-merge "^2.0.1" - babel-plugin-transform-react-remove-prop-types "^0.4.20" - deepmerge "^1.5.2" - eslint-plugin-react "^7.11.1" - -"@neutrinojs/style-loader@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/style-loader/-/style-loader-9.0.0-rc.0.tgz#62753918c2a0647a0a8c6cd929971d1e15d8693b" - dependencies: - css-loader "^1.0.1" - deepmerge "^1.5.2" - mini-css-extract-plugin "^0.4.5" - style-loader "^0.23.1" - -"@neutrinojs/web@9.0.0-rc.0": - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/@neutrinojs/web/-/web-9.0.0-rc.0.tgz#c032b9c02de56b2d12948168c001736ce8e76df4" - dependencies: - "@babel/core" "^7.1.6" - "@babel/plugin-syntax-dynamic-import" "^7.0.0" - "@babel/preset-env" "^7.1.6" - "@neutrinojs/clean" "9.0.0-rc.0" - "@neutrinojs/compile-loader" "9.0.0-rc.0" - "@neutrinojs/dev-server" "9.0.0-rc.0" - "@neutrinojs/font-loader" "9.0.0-rc.0" - "@neutrinojs/html-loader" "9.0.0-rc.0" - "@neutrinojs/html-template" "9.0.0-rc.0" - "@neutrinojs/image-loader" "9.0.0-rc.0" - "@neutrinojs/style-loader" "9.0.0-rc.0" - babel-merge "^2.0.1" - deepmerge "^1.5.2" - webpack-manifest-plugin "^2.0.4" - "@nodelib/fs.stat@^1.1.2": version "1.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" @@ -2348,7 +2258,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-core@7.0.0-bridge.0, babel-core@^7.0.0-bridge.0: +babel-core@7.0.0-bridge.0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" @@ -2440,7 +2350,7 @@ babel-loader@8.0.4: mkdirp "^0.5.1" util.promisify "^1.0.0" -babel-loader@8.0.5, babel-loader@^8.0.4: +babel-loader@8.0.5: version "8.0.5" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.5.tgz#225322d7509c2157655840bba52e46b6c2f2fe33" dependencies: @@ -2449,14 +2359,6 @@ babel-loader@8.0.5, babel-loader@^8.0.4: mkdirp "^0.5.1" util.promisify "^1.0.0" -babel-merge@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/babel-merge/-/babel-merge-2.0.1.tgz#6b2dfad78a655df66e3418eb37b1c3c5e676ad1a" - dependencies: - "@babel/core" "^7.0.0-beta.49" - deepmerge "^2.1.0" - object.omit "^3.0.0" - babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" @@ -2511,7 +2413,7 @@ babel-plugin-transform-object-rest-spread@^6.26.0: babel-plugin-syntax-object-rest-spread "^6.8.0" babel-runtime "^6.26.0" -babel-plugin-transform-react-remove-prop-types@0.4.24, babel-plugin-transform-react-remove-prop-types@^0.4.20: +babel-plugin-transform-react-remove-prop-types@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a" @@ -2649,6 +2551,10 @@ bfj@6.1.1: hoopy "^0.1.2" tryer "^1.0.0" +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -3002,7 +2908,7 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -camelcase@^5.0.0: +camelcase@^5.0.0, camelcase@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.2.0.tgz#e7522abda5ed94cc0489e1b8466610e88404cf45" @@ -3086,7 +2992,7 @@ cheerio@^1.0.0-rc.2: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.4: +chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.0.4: version "2.1.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.2.tgz#9c23ea40b01638439e0513864d362aeacc5ad058" dependencies: @@ -3152,11 +3058,11 @@ clean-css@4.2.x: dependencies: source-map "~0.6.0" -clean-webpack-plugin@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-1.0.1.tgz#b16ee2f1386aea403010236e632447c7d3505f5a" +clean-webpack-plugin@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-2.0.1.tgz#2241526b0030aa0249e78714471298f867fc2829" dependencies: - rimraf "^2.6.1" + del "^4.0.0" clear@^0.0.1: version "0.0.1" @@ -3308,7 +3214,7 @@ commander@2.17.x, commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" -commander@^2.11.0, commander@^2.19.0: +commander@^2.11.0, commander@^2.19.0, commander@^2.8.1: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -3675,22 +3581,21 @@ css-loader@1.0.0: postcss-value-parser "^3.3.0" source-list-map "^2.0.0" -css-loader@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-1.0.1.tgz#6885bb5233b35ec47b006057da01cc640b6b79fe" +css-loader@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" dependencies: - babel-code-frame "^6.26.0" - css-selector-tokenizer "^0.7.0" - icss-utils "^2.1.0" - loader-utils "^1.0.2" - lodash "^4.17.11" - postcss "^6.0.23" - postcss-modules-extract-imports "^1.2.0" - postcss-modules-local-by-default "^1.2.0" - postcss-modules-scope "^1.1.0" - postcss-modules-values "^1.3.0" + camelcase "^5.2.0" + icss-utils "^4.1.0" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.14" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^2.0.6" + postcss-modules-scope "^2.1.0" + postcss-modules-values "^2.0.0" postcss-value-parser "^3.3.0" - source-list-map "^2.0.0" + schema-utils "^1.0.0" css-select-base-adapter@^0.1.1: version "0.1.1" @@ -3760,6 +3665,10 @@ cssesc@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + cssmin@0.3.x: version "0.3.2" resolved "https://registry.yarnpkg.com/cssmin/-/cssmin-0.3.2.tgz#ddce4c547b510ae0d594a8f1fbf8aaf8e2c5c00d" @@ -4137,14 +4046,6 @@ deepmerge@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.2.0.tgz#58ef463a57c08d376547f8869fdc5bcee957f44e" -deepmerge@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" - -deepmerge@^2.1.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" - default-gateway@^2.6.0: version "2.7.2" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-2.7.2.tgz#b7ef339e5e024b045467af403d50348db4642d0f" @@ -4207,6 +4108,17 @@ del@^3.0.0: pify "^3.0.0" rimraf "^2.2.8" +del@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/del/-/del-4.0.0.tgz#4fa27e92c366cb45b9bdaa56a9b8703dced17437" + dependencies: + globby "^6.1.0" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.2" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -4651,7 +4563,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.10.0, es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.5.0, es-abstract@^1.5.1, es-abstract@^1.7.0: +es-abstract@^1.10.0, es-abstract@^1.11.0, es-abstract@^1.12.0, es-abstract@^1.4.3, es-abstract@^1.5.0, es-abstract@^1.5.1, es-abstract@^1.7.0: version "1.13.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" dependencies: @@ -4810,10 +4722,6 @@ eslint-plugin-import@2.16.0: read-pkg-up "^2.0.0" resolve "^1.9.0" -eslint-plugin-jest@^22.0.1: - version "22.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.3.0.tgz#a10f10dedfc92def774ec9bb5bfbd2fb8e1c96d2" - eslint-plugin-jsx-a11y@6.1.2: version "6.1.2" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.1.2.tgz#69bca4890b36dcf0fe16dd2129d2d88b98f33f88" @@ -4850,7 +4758,7 @@ eslint-plugin-react@7.11.1: jsx-ast-utils "^2.0.1" prop-types "^15.6.2" -eslint-plugin-react@7.12.4, eslint-plugin-react@^7.11.1: +eslint-plugin-react@7.12.4: version "7.12.4" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz#b1ecf26479d61aee650da612e425c53a99f48c8c" dependencies: @@ -5321,13 +5229,20 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-loader@2.0.0, file-loader@^2.0.0: +file-loader@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-2.0.0.tgz#39749c82f020b9e85901dcff98e8004e6401cfde" dependencies: loader-utils "^1.0.2" schema-utils "^1.0.0" +file-loader@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-3.0.1.tgz#f8e0ba0b599918b51adfe45d66d1e771ad560faa" + dependencies: + loader-utils "^1.0.2" + schema-utils "^1.0.0" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -5570,6 +5485,10 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -5760,7 +5679,7 @@ glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" -glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: +glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: @@ -6141,7 +6060,7 @@ html-entities@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" -html-loader@^0.5.5: +html-loader@0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-0.5.5.tgz#6356dbeb0c49756d8ebd5ca327f16ff06ab5faea" dependencies: @@ -6151,7 +6070,7 @@ html-loader@^0.5.5: loader-utils "^1.1.0" object-assign "^4.1.1" -html-minifier@^3.2.3, html-minifier@^3.5.20, html-minifier@^3.5.8: +html-minifier@^3.2.3, html-minifier@^3.5.8: version "3.5.21" resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" dependencies: @@ -6163,6 +6082,18 @@ html-minifier@^3.2.3, html-minifier@^3.5.20, html-minifier@^3.5.8: relateurl "0.2.x" uglify-js "3.4.x" +html-webpack-plugin@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + html-webpack-plugin@4.0.0-alpha.2: version "4.0.0-alpha.2" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-alpha.2.tgz#7745967e389a57a098e26963f328ebe4c19b598d" @@ -6175,17 +6106,6 @@ html-webpack-plugin@4.0.0-alpha.2: tapable "^1.0.0" util.promisify "1.0.0" -html-webpack-plugin@4.0.0-beta.4: - version "4.0.0-beta.4" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.4.tgz#4a996abc66ccccad2816998741dad2589858716c" - dependencies: - html-minifier "^3.5.20" - loader-utils "^1.1.0" - lodash "^4.17.11" - pretty-error "^2.1.1" - tapable "^1.1.0" - util.promisify "1.0.0" - htmlparser2@^3.3.0, htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" @@ -6313,6 +6233,12 @@ icss-utils@^2.1.0: dependencies: postcss "^6.0.1" +icss-utils@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.0.tgz#339dbbffb9f8729a243b701e1c29d4cc58c52f0e" + dependencies: + postcss "^7.0.14" + identity-obj-proxy@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14" @@ -6654,7 +6580,7 @@ is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" -is-extendable@^1.0.0, is-extendable@^1.0.1: +is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" dependencies: @@ -6738,12 +6664,22 @@ is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" +is-path-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.0.0.tgz#d4777a8e227a00096a31f030db3770f84b116c02" + is-path-in-cwd@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" dependencies: is-path-inside "^1.0.0" +is-path-in-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.0.0.tgz#68e452a6eec260500cec21e029c0a44cc0dcd2ea" + dependencies: + is-path-inside "^1.0.0" + is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" @@ -6944,10 +6880,6 @@ istanbul-reports@^1.5.1: dependencies: handlebars "^4.0.3" -javascript-stringify@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-1.6.0.tgz#142d111f3a6e3dae8f4a9afd77d45855b5a9cce3" - jest-changed-files@^23.4.2: version "23.4.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" @@ -7426,7 +7358,7 @@ json3@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" -json5@^0.5.1: +json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -7683,7 +7615,7 @@ loader-runner@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" -loader-utils@1.2.3, loader-utils@^1.0.0, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0: +loader-utils@1.2.3, loader-utils@^1.0.0, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" dependencies: @@ -7691,6 +7623,15 @@ loader-utils@1.2.3, loader-utils@^1.0.0, loader-utils@^1.0.1, loader-utils@^1.0. emojis-list "^2.0.0" json5 "^1.0.1" +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -7829,7 +7770,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@4.17.11, lodash@4.x, "lodash@>=3.5 <5", lodash@^3.10.0, lodash@^4.15.0, lodash@^4.16.5, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: +lodash@4.17.11, lodash@4.x, "lodash@>=3.5 <5", lodash@^3.10.0, lodash@^4.15.0, lodash@^4.16.5, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -7990,6 +7931,10 @@ memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: errno "^0.1.3" readable-stream "^2.0.1" +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -8132,14 +8077,6 @@ mini-css-extract-plugin@0.4.3: schema-utils "^1.0.0" webpack-sources "^1.1.0" -mini-css-extract-plugin@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.5.tgz#c99e9e78d54f3fa775633aee5933aeaa4e80719a" - dependencies: - loader-utils "^1.1.0" - schema-utils "^1.0.0" - webpack-sources "^1.1.0" - mini-store@^1.0.2, mini-store@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/mini-store/-/mini-store-1.1.2.tgz#cc150e0878e080ca58219d47fccefefe2c9aea3e" @@ -8362,16 +8299,6 @@ neo-async@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" -neutrino@9.0.0-rc.0: - version "9.0.0-rc.0" - resolved "https://registry.yarnpkg.com/neutrino/-/neutrino-9.0.0-rc.0.tgz#7fc5d1c55779778f2f9e46ee4c7fd9fa356fc789" - dependencies: - deepmerge "^1.5.2" - is-plain-object "^2.0.4" - lodash.clonedeep "^4.5.0" - webpack-chain "^5.0.1" - yargs-parser "^11.1.1" - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -8587,6 +8514,20 @@ npm-registry-fetch@^3.8.0, npm-registry-fetch@^3.9.0: make-fetch-happen "^4.0.1" npm-package-arg "^6.1.0" +npm-run-all@4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" + dependencies: + ansi-styles "^3.2.1" + chalk "^2.4.1" + cross-spawn "^6.0.5" + memorystream "^0.3.1" + minimatch "^3.0.4" + pidtree "^0.3.0" + read-pkg "^3.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -8699,12 +8640,6 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -object.omit@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-3.0.0.tgz#0e3edc2fce2ba54df5577ff529f6d97bd8a522af" - dependencies: - is-extendable "^1.0.0" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -8839,6 +8774,14 @@ osenv@0, osenv@^0.1.4, osenv@^0.1.5: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +output-file-sync@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" + dependencies: + graceful-fs "^4.1.11" + is-plain-obj "^1.1.0" + mkdirp "^0.5.1" + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -8885,6 +8828,10 @@ p-map@^1.1.1, p-map@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" +p-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.0.0.tgz#be18c5a5adeb8e156460651421aceca56c213a50" + p-pipe@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" @@ -9124,6 +9071,10 @@ performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" +pidtree@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.3.0.tgz#f6fada10fccc9f99bf50e90d0b23d72c9ebc2e6b" + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -9132,6 +9083,10 @@ pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -9473,6 +9428,12 @@ postcss-modules-extract-imports@^1.2.0: dependencies: postcss "^6.0.1" +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + dependencies: + postcss "^7.0.5" + postcss-modules-local-by-default@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" @@ -9480,6 +9441,14 @@ postcss-modules-local-by-default@^1.2.0: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" +postcss-modules-local-by-default@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz#dd9953f6dd476b5fd1ef2d8830c8929760b56e63" + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + postcss-value-parser "^3.3.1" + postcss-modules-scope@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" @@ -9487,6 +9456,13 @@ postcss-modules-scope@^1.1.0: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" +postcss-modules-scope@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz#ad3f5bf7856114f6fcab901b0502e2a2bc39d4eb" + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + postcss-modules-values@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" @@ -9494,6 +9470,13 @@ postcss-modules-values@^1.3.0: icss-replace-symbols "^1.1.0" postcss "^6.0.1" +postcss-modules-values@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^7.0.6" + postcss-nesting@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-7.0.0.tgz#6e26a770a0c8fcba33782a6b6f350845e1a448f6" @@ -9705,6 +9688,14 @@ postcss-selector-parser@^5.0.0, postcss-selector-parser@^5.0.0-rc.3, postcss-sel indexes-of "^1.0.1" uniq "^1.0.1" +postcss-selector-parser@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" + dependencies: + cssesc "^3.0.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + postcss-svgo@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" @@ -9742,7 +9733,7 @@ postcss@^6.0.1, postcss@^6.0.23: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.5: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.5, postcss@^7.0.6: version "7.0.14" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.14.tgz#4527ed6b1ca0d82c53ce5ec1a2041c2346bbd6e5" dependencies: @@ -9770,7 +9761,7 @@ pretty-bytes@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" -pretty-error@^2.0.2, pretty-error@^2.1.1: +pretty-error@^2.0.2: version "2.1.1" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" dependencies: @@ -11504,7 +11495,7 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shell-quote@1.6.1: +shell-quote@1.6.1, shell-quote@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" dependencies: @@ -11933,6 +11924,14 @@ string-width@^3.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string.prototype.padend@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.4.3" + function-bind "^1.0.2" + string.prototype.trim@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" @@ -12035,7 +12034,7 @@ style-loader@0.23.0: loader-utils "^1.1.0" schema-utils "^0.4.5" -style-loader@^0.23.1: +style-loader@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" dependencies: @@ -12327,6 +12326,10 @@ topo@2.x.x: dependencies: hoek "4.x.x" +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -12570,7 +12573,7 @@ url-loader@1.1.1: mime "^2.0.3" schema-utils "^1.0.0" -url-loader@^1.1.2: +url-loader@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8" dependencies: @@ -12751,13 +12754,6 @@ webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" -webpack-chain@^5.0.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/webpack-chain/-/webpack-chain-5.2.1.tgz#0e8f5e5ddba35d263ac357cf5ae7ec84138d57c5" - dependencies: - deepmerge "^1.5.2" - javascript-stringify "^1.6.0" - webpack-cli@^3.2.1: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.2.3.tgz#13653549adfd8ccd920ad7be1ef868bacc22e346" @@ -12867,7 +12863,7 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-manifest-plugin@2.0.4, webpack-manifest-plugin@^2.0.4: +webpack-manifest-plugin@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-2.0.4.tgz#e4ca2999b09557716b8ba4475fb79fab5986f0cd" dependencies: @@ -12875,7 +12871,7 @@ webpack-manifest-plugin@2.0.4, webpack-manifest-plugin@^2.0.4: lodash ">=3.5 <5" tapable "^1.0.0" -webpack-node-externals@^1.7.2: +webpack-node-externals@1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.7.2.tgz#6e1ee79ac67c070402ba700ef033a9b8d52ac4e3" From d315e1462fea58070fd8f2f8a9aabbdf59e2c6ef Mon Sep 17 00:00:00 2001 From: Joe Farro Date: Sat, 16 Mar 2019 04:10:28 -0400 Subject: [PATCH 2/5] Misc cleanup, fix BUILD.md link Signed-off-by: Joe Farro --- BUILD.md | 2 +- packages/plexus/demo/src/index.tsx | 1 - packages/plexus/demo/template.ejs | 2 +- packages/plexus/src/types/index.tsx | 8 -------- packages/plexus/webpack-factory.js | 2 +- tsconfig.json | 1 - 6 files changed, 3 insertions(+), 13 deletions(-) diff --git a/BUILD.md b/BUILD.md index 0e0cbda14c..ccf5c315e6 100644 --- a/BUILD.md +++ b/BUILD.md @@ -14,7 +14,7 @@ ESLint is being used to lint the repo, as a whole. Within `./packages/plexus` (f In the project root, `typescript` is used to bolster the linting of TypeScript files. `tsc` catches quite a few issues that ESLint does not pick up on. -In `./packages/plexus`, `typescript` is used to generate type declarations for the ES module build. See [`./packages/plexus/BUILD.md`](packages/plexus/BUILD.md#TODO) for details. +In `./packages/plexus`, `typescript` is used to generate type declarations for the ES module build. See [`./packages/plexus/BUILD.md`](packages/plexus/BUILD.md#typescript---emitdeclarationonly) for details. ### Workspaces diff --git a/packages/plexus/demo/src/index.tsx b/packages/plexus/demo/src/index.tsx index 12bde37ecf..d8bb367934 100644 --- a/packages/plexus/demo/src/index.tsx +++ b/packages/plexus/demo/src/index.tsx @@ -122,4 +122,3 @@ function Demo() { } render(, document.querySelector('#root')); -console.log('yar'); diff --git a/packages/plexus/demo/template.ejs b/packages/plexus/demo/template.ejs index 0e97b43d5b..7d354a2896 100644 --- a/packages/plexus/demo/template.ejs +++ b/packages/plexus/demo/template.ejs @@ -10,4 +10,4 @@
- \ No newline at end of file + diff --git a/packages/plexus/src/types/index.tsx b/packages/plexus/src/types/index.tsx index 7f6cfde02e..bcfeaa85e9 100644 --- a/packages/plexus/src/types/index.tsx +++ b/packages/plexus/src/types/index.tsx @@ -69,14 +69,6 @@ export type TLayoutDone = { vertices: TLayoutVertex[]; }; -// TODO(joe): delete if this is not needed -// export type TLayout = { -// isCancelled: boolean, -// edges?: TLayoutEdge[], -// graph?: TLayoutGraph, -// vertices?: TLayoutVertex[], -// }; - export type TPendingLayoutResult = { positions: Promise; layout: Promise; diff --git a/packages/plexus/webpack-factory.js b/packages/plexus/webpack-factory.js index a728d7bffd..ac69ac47d5 100644 --- a/packages/plexus/webpack-factory.js +++ b/packages/plexus/webpack-factory.js @@ -43,7 +43,7 @@ function makeBaseConfig() { rules: [ { // - // Note: This `pre` is crucial (and not at all obvious) + // Note: This `pre` is crucial (and not exactly obvious) // enforce: 'pre', test: extensionsRx, diff --git a/tsconfig.json b/tsconfig.json index a8a926aebb..82641b6374 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,6 @@ "jsx": "preserve" }, "include": [ - // TODO(joef) "packages/plexus/demo", "packages/plexus/src", // easier to add `./typings` here than deal with typeRoots, paths, etc. From 76a95525cb5eae1bb8086412709abb993f402835 Mon Sep 17 00:00:00 2001 From: Joe Farro Date: Sat, 16 Mar 2019 04:28:28 -0400 Subject: [PATCH 3/5] Do not lint layout.worker.bundled.js Signed-off-by: Joe Farro --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 132f2bfac1..26baf05064 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,9 @@ "prepare": "lerna run --stream --sort prepublishOnly", "prettier-comment": "https://github.com/yarnpkg/yarn/issues/6300", "prettier": - "./node_modules/prettier/bin-prettier.js --write '{.,scripts}/*.{js,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(react-vis).{css,js,json,md,ts,tsx}' 'packages/*/*.{css,js,json,md,ts,tsx}'", + "./node_modules/prettier/bin-prettier.js --write '{.,scripts}/*.{js,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,json,md,ts,tsx}' 'packages/*/*.{css,js,json,md,ts,tsx}'", "prettier-lint": - "./node_modules/prettier/bin-prettier.js --list-different '{.,scripts}/*.{js,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(react-vis).{css,js,json,md,ts,tsx}' 'packages/*/*.{css,js,json,md,ts,tsx}'", + "./node_modules/prettier/bin-prettier.js --list-different '{.,scripts}/*.{js,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,json,md,ts,tsx}' 'packages/*/*.{css,js,json,md,ts,tsx}'", "test": "lerna run test", "tsc-lint": "tsc", "tsc-lint-debug": "tsc --listFiles", From e70b024a6ce01a56311a3871c1c0e6779bd08b4b Mon Sep 17 00:00:00 2001 From: Joe Farro Date: Sat, 16 Mar 2019 19:01:50 -0400 Subject: [PATCH 4/5] Use reasonable versions for plexus package Signed-off-by: Joe Farro --- packages/plexus/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plexus/package.json b/packages/plexus/package.json index 6dd76ffdd5..534671c667 100644 --- a/packages/plexus/package.json +++ b/packages/plexus/package.json @@ -1,7 +1,7 @@ { "name": "@jaegertracing/plexus", "license": "Apache-2.0", - "version": "0.0.2-dev.0", + "version": "0.1.0", "description": "Directed Graph React component", "main": "lib/index.js", "files": ["lib", "dist"], From 6a998e8544d60c00926defd6227c4c40ffa2a461 Mon Sep 17 00:00:00 2001 From: Joe Farro Date: Sat, 16 Mar 2019 21:10:28 -0400 Subject: [PATCH 5/5] Use reasonable versions for plexus package Signed-off-by: Joe Farro --- packages/jaeger-ui/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jaeger-ui/package.json b/packages/jaeger-ui/package.json index 6c02be4ecd..e63f5c3b52 100644 --- a/packages/jaeger-ui/package.json +++ b/packages/jaeger-ui/package.json @@ -33,7 +33,7 @@ "source-map-explorer": "^1.6.0" }, "dependencies": { - "@jaegertracing/plexus": "0.0.2-dev.0", + "@jaegertracing/plexus": "0.1.0", "antd": "3.8.0", "chance": "^1.0.10", "classnames": "^2.2.5",