From d66e9f0595954720bd558174dd683fe9be077d01 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 15 Jan 2023 09:59:48 -0800 Subject: [PATCH] Improve webpack config refector common configuration. --- package.json | 12 + packages/core-js/package.json | 3 - packages/core-js/webpack.common.js | 24 +- packages/editor/package.json | 8 +- packages/editor/webpack.common.js | 37 +- packages/mindplot/package.json | 14 +- packages/mindplot/src/components/Designer.ts | 5 +- packages/mindplot/webpack.common.js | 33 +- packages/web2d/package.json | 2 - packages/web2d/webpack.common.js | 24 +- packages/webapp/package.json | 2 - packages/webapp/webpack.common.js | 32 +- webpack.common.js | 33 +- yarn.lock | 401 +++---------------- 14 files changed, 134 insertions(+), 496 deletions(-) diff --git a/package.json b/package.json index ca9ec7a1..61772b1d 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,13 @@ "@babel/preset-env": "^7.14.7", "@babel/preset-typescript": "^7.16.5", "@babel/register": "^7.16.0", + "@formatjs/cli": "^5.1.3", + "@types/jest": "^29.0.5", "@typescript-eslint/eslint-plugin": "^5.48.0 ", "@typescript-eslint/parser": "^5.48.0", "babel-loader": "^9.1.2", + "copy-webpack-plugin": "^10.2.4", + "css-loader": "^6.7.3", "eslint": "^8.4.1", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^8.5.0", @@ -31,10 +35,18 @@ "eslint-plugin-react-hooks": "^4.6.0", "html-webpack-plugin": "^5.3.2", "husky": "^8.0.0", + "jest": "^29.3.1", + "jest-diff": "^29.3.1", + "jest-environment-jsdom": "^29.3.1", + "jest-webpack": "^0.5.1", "lerna": "^3.16.4", "lint-staged": "^10.5.4", "prettier": "^2.7.1", "start-server-and-test": "^1.14.0", + "style-loader": "^3.3.1", + "ts-jest": "^29.0.5", + "ts-loader": "^9.4.2", + "ts-node": "^10.9.1", "typescript": "^4.8.4", "webpack": "^5.75.0", "webpack-bundle-analyzer": "^4.5.0", diff --git a/packages/core-js/package.json b/packages/core-js/package.json index 04aacd25..2c6f0389 100644 --- a/packages/core-js/package.json +++ b/packages/core-js/package.json @@ -18,8 +18,5 @@ "scripts": { "build": "webpack --config webpack.prod.js", "dev": "webpack --mode development --config webpack.dev.js" - }, - "devDependencies": { - "core-js": "^3.15.2" } } diff --git a/packages/core-js/webpack.common.js b/packages/core-js/webpack.common.js index 2e72181d..f92cb988 100644 --- a/packages/core-js/webpack.common.js +++ b/packages/core-js/webpack.common.js @@ -1,5 +1,8 @@ const path = require('path'); -module.exports = { +const { merge } = require('webpack-merge'); +const common = require('../../webpack.common'); + +const prodConfig = { output: { path: path.resolve(__dirname, 'dist'), filename: 'core.js', @@ -9,19 +12,8 @@ module.exports = { }, }, target: 'web', - optimization: { - usedExports: true, - }, - module: { - rules: [ - { - use: 'babel-loader', - test: /.js$/, - exclude: [/node_modules/], - }, - ], - }, - resolve: { - extensions: ['.js'], - } + + }; + +module.exports = merge(common, prodConfig); diff --git a/packages/editor/package.json b/packages/editor/package.json index 11b1a39a..ad40a14c 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -18,19 +18,13 @@ "author": "Paulo Veiga , Ezequiel Bergamaschi ", "license": "MIT", "devDependencies": { - "@formatjs/cli": "^5.1.3", "@testing-library/react": "^13.4.0", "@types/cypress-image-snapshot": "^3.1.6", - "@types/jest": "^29.0.0", "babel-polyfill": "^6.26.0", - "copy-webpack-plugin": "^10.2.1", - "css-loader": "^6.7.1", "cypress": "^12.3.0", "cypress-image-snapshot": "^4.0.1", "jest-transform-stub": "^2.0.0", - "react": "^18.2.0", - "style-loader": "^3.3.1", - "ts-jest": "^29.0.3" + "react": "^18.2.0" }, "dependencies": { "@wisemapping/mindplot": "^5.0.15", diff --git a/packages/editor/webpack.common.js b/packages/editor/webpack.common.js index 3fb5870a..e1b14062 100644 --- a/packages/editor/webpack.common.js +++ b/packages/editor/webpack.common.js @@ -1,6 +1,9 @@ +/** @type {import('webpack').Configuration} */ +const { merge } = require('webpack-merge'); +const common = require('../../webpack.common'); const path = require('path'); -module.exports = { +const prodConfig = { output: { path: path.resolve(__dirname, 'dist'), filename: '[name].js', @@ -15,35 +18,7 @@ module.exports = { 'editor.bundle': path.join(__dirname, 'src', 'index.tsx'), }, mode: 'development', - devtool: 'source-map', target: 'web', - resolve: { - extensions: ['.ts', '.tsx', '.js', '.jsx'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: '/node_modules/', - }, - { - test: /\.(png|jpe?g|gif|svg)$/, - type: 'asset/inline', - }, - { - test: /\.(js|jsx)$/, - exclude: /node_modules/, - use: ['babel-loader'], - }, - { - test: /\.css$/i, - loader: 'style-loader', - }, - { - test: /\.css$/, - loader: 'css-loader', - }, - ], - }, }; + +module.exports = merge(common, prodConfig); diff --git a/packages/mindplot/package.json b/packages/mindplot/package.json index dbab028c..901d52ed 100644 --- a/packages/mindplot/package.json +++ b/packages/mindplot/package.json @@ -35,26 +35,14 @@ "@wisemapping/core-js": "^0.4.0", "@wisemapping/web2d": "^0.4.0", "emoji-picker-react": "^4.4.3", - "jest": "^29.3.1", "jquery": "3.6.0", "lodash": "^4.17.21", "xml-formatter": "^2.6.1" }, "devDependencies": { - "@types/jest": "^29.2.5", - "@types/node": "^18.11.9", "blob-polyfill": "^6.0.20211015", - "compression-webpack-plugin": "^9.2.0", - "copy-webpack-plugin": "^10.0.0", - "core-js": "^3.15.2", "cypress": "^12.3.0", "cypress-image-snapshot": "^4.0.1", - "jest-diff": "^29.3.1", - "jest-environment-jsdom": "^29.3.1", - "jest-webpack": "^0.5.1", - "mocha": "^9.1.3", - "ts-jest": "^29.0.3", - "ts-loader": "^9.2.6", - "ts-node": "^10.4.0" + "mocha": "^9.1.3" } } diff --git a/packages/mindplot/src/components/Designer.ts b/packages/mindplot/src/components/Designer.ts index 4dc0de55..59724523 100644 --- a/packages/mindplot/src/components/Designer.ts +++ b/packages/mindplot/src/components/Designer.ts @@ -463,10 +463,7 @@ class Designer extends Events { // Charge position to avoid overlap ... children.forEach((m) => { const pos = m.getPosition(); - m.setPosition( - pos.x * Math.sign(pos.x) + Math.random() * 60, - pos.y + Math.random() * 30, - ); + m.setPosition(pos.x + Math.random() * 60, pos.y + Math.random() * 30); }); // Finally, add the node ... diff --git a/packages/mindplot/webpack.common.js b/packages/mindplot/webpack.common.js index 1bcfd5c6..4d5a4706 100644 --- a/packages/mindplot/webpack.common.js +++ b/packages/mindplot/webpack.common.js @@ -1,6 +1,8 @@ const path = require('path'); +const { merge } = require('webpack-merge'); +const common = require('../../webpack.common'); -module.exports = { +const prodConfig = { output: { path: path.resolve(__dirname, 'dist'), filename: '[name].js', @@ -12,38 +14,11 @@ module.exports = { mindplot: './src/index.ts', loader: './src/indexLoader.ts', }, - stats: { - errorDetails: true, - }, mode: 'production', - devtool: 'source-map', - module: { - rules: [ - { - test: /.(js$)/, - use: ['babel-loader'], - exclude: [/node_modules/], - enforce: 'pre', - }, - { - test: /\.(ts)$/, - use: 'ts-loader', - exclude: '/node_modules/', - }, - { - test: /\.(png|svg)$/i, - type: 'asset/inline', - }, - { - test: /\.css$/, - loader: 'css-loader', - }, - ], - }, resolve: { alias: { '@libraries': path.resolve(__dirname, '../../libraries/'), }, - extensions: ['.js', '.ts', '.json'], }, }; +module.exports = merge(common, prodConfig); diff --git a/packages/web2d/package.json b/packages/web2d/package.json index 004933c4..b02c1990 100644 --- a/packages/web2d/package.json +++ b/packages/web2d/package.json @@ -31,12 +31,10 @@ }, "dependencies": { "@wisemapping/core-js": "^0.4.0", - "core-js": "^3.15.2", "jquery": "^3.6.0" }, "peerDependencies": { "@wisemapping/core-js": "^0.4.0", - "core-js": "^3.15.2", "jquery": "^3.6.0" } } diff --git a/packages/web2d/webpack.common.js b/packages/web2d/webpack.common.js index 069eec52..1545f316 100644 --- a/packages/web2d/webpack.common.js +++ b/packages/web2d/webpack.common.js @@ -1,6 +1,10 @@ -const path = require('path'); +/** @type {import('webpack').Configuration} */ -module.exports = { +const path = require('path'); +const { merge } = require('webpack-merge'); +const common = require('../../webpack.common'); + +const prodConfig = { output: { path: path.resolve(__dirname, 'dist'), filename: 'web2d.js', @@ -8,17 +12,7 @@ module.exports = { library: { type: 'umd', }, - }, - optimization: { - usedExports: true, - }, - module: { - rules: [ - { - use: ['babel-loader'], - test: /.(js)$/, - exclude: [/node_modules/], - }, - ], - }, + } }; + +module.exports = merge(common, prodConfig); diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 69af0e1a..51faf17e 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -22,11 +22,9 @@ "author": "Paulo Veiga , Ezequiel Bergamaschi ", "license": "MIT", "devDependencies": { - "@formatjs/cli": "^2.13.15", "@testing-library/cypress": "^8.0.3", "@types/testing-library__cypress": "^5.0.8", "@welldone-software/why-did-you-render": "^7.0.1", - "copy-webpack-plugin": "^7.0.0", "cypress": "^12.3.0", "cypress-image-snapshot": "^4.0.1" }, diff --git a/packages/webapp/webpack.common.js b/packages/webapp/webpack.common.js index 7cc4245f..b4d5e297 100644 --- a/packages/webapp/webpack.common.js +++ b/packages/webapp/webpack.common.js @@ -1,46 +1,28 @@ -/* eslint-disable no-undef */ -const path = require('path'); -const webpack = require('webpack'); +/** @type {import('webpack').Configuration} */ +const path = require('path'); +const { merge } = require('webpack-merge'); +const common = require('../../webpack.common'); const CopyWebpackPlugin = require('copy-webpack-plugin'); -webpack; - -module.exports = { +const prodConfig = { entry: { app: path.join(__dirname, 'src', 'index.tsx'), }, target: 'web', - resolve: { - extensions: ['.ts', '.tsx', '.js', '.jsx'], - }, output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist'), }, module: { rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: '/node_modules/', - }, - { - test: /\.(png|jpe?g|gif|svg)$/, - type: 'asset/inline', - }, { test: /\.wxml$/i, type: 'asset/source', - }, - { - test: /\.css$/, - loader: 'css-loader', - }, + } ], }, optimization: { - usedExports: true, chunkIds: 'named', splitChunks: { cacheGroups: { @@ -66,3 +48,5 @@ module.exports = { }), ], }; + +module.exports = merge(common, prodConfig); diff --git a/webpack.common.js b/webpack.common.js index a6c0a7c3..30357fa7 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,5 +1,36 @@ /** @type {import('webpack').Configuration} */ module.exports = { - + resolve: { + extensions: ['.ts', '.tsx', '.js', '.jsx'], + }, + optimization: { + usedExports: true, + }, + stats: { + errorDetails: true, + }, + devtool: 'source-map', + module: { + rules: [ + { + test: /\.(tsx|ts)?$/, + use: 'ts-loader', + exclude: '/node_modules/', + }, + { + test: /\.(png|jpe?g|gif|svg)$/, + type: 'asset/inline', + }, + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + use: ['babel-loader'], + }, + { + test: /\.css$/, + use: ["style-loader", "css-loader"], + } + ], + }, }; diff --git a/yarn.lock b/yarn.lock index bcf00195..02d525dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -429,7 +429,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.16.4, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.20.1, @babel/parser@npm:^7.20.2": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.10, @babel/parser@npm:^7.20.1, @babel/parser@npm:^7.20.2": version: 7.20.3 resolution: "@babel/parser@npm:7.20.3" bin: @@ -1821,33 +1821,6 @@ __metadata: languageName: node linkType: hard -"@formatjs/cli@npm:^2.13.15": - version: 2.15.0 - resolution: "@formatjs/cli@npm:2.15.0" - dependencies: - "@formatjs/ts-transformer": 2.13.0 - "@types/json-stable-stringify": ^1.0.32 - "@types/lodash": ^4.14.150 - "@types/loud-rejection": ^2.0.0 - "@types/node": 14 - "@vue/compiler-core": ^3.0.0 - "@vue/compiler-sfc": ^3.0.5 - chalk: ^4.0.0 - commander: ^6.1.0 - fast-glob: ^3.2.4 - fs-extra: ^9.0.0 - intl-messageformat-parser: 6.1.2 - json-stable-stringify: ^1.0.1 - lodash: ^4.17.15 - loud-rejection: ^2.2.0 - tslib: ^2.0.1 - typescript: ^4.0 - bin: - formatjs: bin/formatjs - checksum: e27b56d29e66ddb5eebe656cce95d673886be1cce405dce5983fc39cc09c14eab607aee4aadb90a965c89718e11e31f673142ab4b050987987b6955a882dc119 - languageName: node - linkType: hard - "@formatjs/cli@npm:^5.1.3": version: 5.1.3 resolution: "@formatjs/cli@npm:5.1.3" @@ -1872,15 +1845,6 @@ __metadata: languageName: node linkType: hard -"@formatjs/ecma402-abstract@npm:1.5.0": - version: 1.5.0 - resolution: "@formatjs/ecma402-abstract@npm:1.5.0" - dependencies: - tslib: ^2.0.1 - checksum: e6c43c5ca44f2f9ebd835cc76bc0490275b3e1f2e18e942f3dae81443e7543c34efb6dd9d1aa2f4bc32503d5d1a2f6708a260ab790444108c2cbbf60847da5fc - languageName: node - linkType: hard - "@formatjs/fast-memoize@npm:1.2.6": version: 1.2.6 resolution: "@formatjs/fast-memoize@npm:1.2.6" @@ -1962,22 +1926,6 @@ __metadata: languageName: node linkType: hard -"@formatjs/ts-transformer@npm:2.13.0": - version: 2.13.0 - resolution: "@formatjs/ts-transformer@npm:2.13.0" - dependencies: - intl-messageformat-parser: 6.1.2 - tslib: ^2.0.1 - typescript: ^4.0 - peerDependencies: - ts-jest: ^26.4.0 - peerDependenciesMeta: - ts-jest: - optional: true - checksum: d04efabcffa09202d66285bbc2a32100c0e48afa4aed7953266955703158a8ee22b1ecd386e4f1255637a8d8281387d53ca1a43807ad1c06be149b2255861f7e - languageName: node - linkType: hard - "@gar/promisify@npm:^1.1.3": version: 1.1.3 resolution: "@gar/promisify@npm:1.1.3" @@ -3998,17 +3946,7 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^29.0.0": - version: 29.2.2 - resolution: "@types/jest@npm:29.2.2" - dependencies: - expect: ^29.0.0 - pretty-format: ^29.0.0 - checksum: 13b1a48858c8c451109c2838205fdcee6f41d672674d2f0e3cada35e94f133370aba4f4b5c3f5b174f3e16244d76d7d718afa7cc67d4d6f90d1b87951f4c87c3 - languageName: node - linkType: hard - -"@types/jest@npm:^29.2.5": +"@types/jest@npm:^29.0.5": version: 29.2.5 resolution: "@types/jest@npm:29.2.5" dependencies: @@ -4045,13 +3983,6 @@ __metadata: languageName: node linkType: hard -"@types/json-stable-stringify@npm:^1.0.32": - version: 1.0.34 - resolution: "@types/json-stable-stringify@npm:1.0.34" - checksum: 45767ecef0f6aae5680c3be6488d5c493f16046e34f182d7e6a2c69a667aab035799752c6f03017c883b134ad3f80e3f78d7e7da81a9c1f3d01676126baf5d0e - languageName: node - linkType: hard - "@types/json5@npm:^0.0.29": version: 0.0.29 resolution: "@types/json5@npm:0.0.29" @@ -4059,22 +3990,6 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:^4.14.150": - version: 4.14.188 - resolution: "@types/lodash@npm:4.14.188" - checksum: 89c32f0a18e0da6ae914b430e76b3d0451c4c85b9c838b440c0c9a8d4966c8e2a76dbb30964c7126402856b2997ec56a8c36d8d6461ec14387689ec37594f09f - languageName: node - linkType: hard - -"@types/loud-rejection@npm:^2.0.0": - version: 2.0.0 - resolution: "@types/loud-rejection@npm:2.0.0" - dependencies: - loud-rejection: "*" - checksum: 929daf718647d508c39b39c269186a35a185227f80173c6e3503bd39981c8ee9260fc709bbf096824b073d1df65fc589f96d4bf812dd8a45f0961970e6e78f7c - languageName: node - linkType: hard - "@types/mime@npm:*": version: 3.0.1 resolution: "@types/mime@npm:3.0.1" @@ -4096,14 +4011,14 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:>= 8, @types/node@npm:^18.11.9": +"@types/node@npm:*, @types/node@npm:>= 8": version: 18.11.9 resolution: "@types/node@npm:18.11.9" checksum: cc0aae109e9b7adefc32eecb838d6fad931663bb06484b5e9cbbbf74865c721b03d16fd8d74ad90e31dbe093d956a7c2c306ba5429ba0c00f3f7505103d7a496 languageName: node linkType: hard -"@types/node@npm:14, @types/node@npm:^14.14.31": +"@types/node@npm:^14.14.31": version: 14.18.33 resolution: "@types/node@npm:14.18.33" checksum: 4e23f95186d8ae1d38c999bc6b46fe94e790da88744b0a3bfeedcbd0d9ffe2cb0ff39e85f43014f6739e5270292c1a1f6f97a1fc606fd573a0c17fda9a1d42de @@ -4459,76 +4374,6 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-core@npm:3.2.45, @vue/compiler-core@npm:^3.0.0": - version: 3.2.45 - resolution: "@vue/compiler-core@npm:3.2.45" - dependencies: - "@babel/parser": ^7.16.4 - "@vue/shared": 3.2.45 - estree-walker: ^2.0.2 - source-map: ^0.6.1 - checksum: e3c687b24c16c2b320c02ed38960f8bee7dcb88bddb09e60a80d2d4dc004070cbbd4eccbc99cc168d48d753ff60d0b9eefba835e1dec3b7f233a98c89af31c07 - languageName: node - linkType: hard - -"@vue/compiler-dom@npm:3.2.45": - version: 3.2.45 - resolution: "@vue/compiler-dom@npm:3.2.45" - dependencies: - "@vue/compiler-core": 3.2.45 - "@vue/shared": 3.2.45 - checksum: 89115538635f0da9cce615de5488d2759256fa573976a09a049536dbb94e9b5086b46f2f11e743cf0a7b14837161b3191c67611e0493054a5d4c4b96a322c901 - languageName: node - linkType: hard - -"@vue/compiler-sfc@npm:^3.0.5": - version: 3.2.45 - resolution: "@vue/compiler-sfc@npm:3.2.45" - dependencies: - "@babel/parser": ^7.16.4 - "@vue/compiler-core": 3.2.45 - "@vue/compiler-dom": 3.2.45 - "@vue/compiler-ssr": 3.2.45 - "@vue/reactivity-transform": 3.2.45 - "@vue/shared": 3.2.45 - estree-walker: ^2.0.2 - magic-string: ^0.25.7 - postcss: ^8.1.10 - source-map: ^0.6.1 - checksum: bec375faa0012e953dc0887482cc01d52003ad424b6a8a9c8a2506fd4f0197ad62be22f77ce5691c2306068ae7bc0028399f25399e7d4beee668285d431f4d8f - languageName: node - linkType: hard - -"@vue/compiler-ssr@npm:3.2.45": - version: 3.2.45 - resolution: "@vue/compiler-ssr@npm:3.2.45" - dependencies: - "@vue/compiler-dom": 3.2.45 - "@vue/shared": 3.2.45 - checksum: 830c475506d2b6d1a6872b3fde1024ef5132f725121fd9c34832c5cefcc8cfddf0dcaa3acc9b2da4754162fccdff48b3275b9ff31415a7793b224c04355dc632 - languageName: node - linkType: hard - -"@vue/reactivity-transform@npm:3.2.45": - version: 3.2.45 - resolution: "@vue/reactivity-transform@npm:3.2.45" - dependencies: - "@babel/parser": ^7.16.4 - "@vue/compiler-core": 3.2.45 - "@vue/shared": 3.2.45 - estree-walker: ^2.0.2 - magic-string: ^0.25.7 - checksum: 401040818947eb04c782487a7861d3ba20f95c9f3ca14282b3d7624002bfe6000547bb48c561afe87ae6d302143fec71a7e0bc3ed3ae2bfad8a228adf7fd90d6 - languageName: node - linkType: hard - -"@vue/shared@npm:3.2.45": - version: 3.2.45 - resolution: "@vue/shared@npm:3.2.45" - checksum: ff3205056caed2a965aa0980e21319515ce13c859a9b269fdab0ee8b3c9f3d8eec7eefdb7fd6c6b47c12acdc7bf23c6c187b6191054221b4a29108139b20c221 - languageName: node - linkType: hard - "@webassemblyjs/ast@npm:1.11.1": version: 1.11.1 resolution: "@webassemblyjs/ast@npm:1.11.1" @@ -4727,8 +4572,6 @@ __metadata: "@wisemapping/core-js@^0.4.0, @wisemapping/core-js@workspace:packages/core-js": version: 0.0.0-use.local resolution: "@wisemapping/core-js@workspace:packages/core-js" - dependencies: - core-js: ^3.15.2 languageName: unknown linkType: soft @@ -4736,14 +4579,10 @@ __metadata: version: 0.0.0-use.local resolution: "@wisemapping/editor@workspace:packages/editor" dependencies: - "@formatjs/cli": ^5.1.3 "@testing-library/react": ^13.4.0 "@types/cypress-image-snapshot": ^3.1.6 - "@types/jest": ^29.0.0 "@wisemapping/mindplot": ^5.0.15 babel-polyfill: ^6.26.0 - copy-webpack-plugin: ^10.2.1 - css-loader: ^6.7.1 cypress: ^12.3.0 cypress-image-snapshot: ^4.0.1 emoji-picker-react: ^4.4.7 @@ -4751,8 +4590,6 @@ __metadata: react: ^18.2.0 react-color: ^2.19.3 react-loader-spinner: ^5.3.4 - style-loader: ^3.3.1 - ts-jest: ^29.0.3 peerDependencies: "@emotion/react": ^11.10.5 "@emotion/styled": ^11.10.5 @@ -4769,28 +4606,16 @@ __metadata: version: 0.0.0-use.local resolution: "@wisemapping/mindplot@workspace:packages/mindplot" dependencies: - "@types/jest": ^29.2.5 "@types/jquery": ^3.5.11 - "@types/node": ^18.11.9 "@wisemapping/core-js": ^0.4.0 "@wisemapping/web2d": ^0.4.0 blob-polyfill: ^6.0.20211015 - compression-webpack-plugin: ^9.2.0 - copy-webpack-plugin: ^10.0.0 - core-js: ^3.15.2 cypress: ^12.3.0 cypress-image-snapshot: ^4.0.1 emoji-picker-react: ^4.4.3 - jest: ^29.3.1 - jest-diff: ^29.3.1 - jest-environment-jsdom: ^29.3.1 - jest-webpack: ^0.5.1 jquery: 3.6.0 lodash: ^4.17.21 mocha: ^9.1.3 - ts-jest: ^29.0.3 - ts-loader: ^9.2.6 - ts-node: ^10.4.0 xml-formatter: ^2.6.1 languageName: unknown linkType: soft @@ -4800,13 +4625,11 @@ __metadata: resolution: "@wisemapping/web2d@workspace:packages/web2d" dependencies: "@wisemapping/core-js": ^0.4.0 - core-js: ^3.15.2 cypress: 12.3.0 cypress-image-snapshot: ^4.0.1 jquery: ^3.6.0 peerDependencies: "@wisemapping/core-js": ^0.4.0 - core-js: ^3.15.2 jquery: ^3.6.0 languageName: unknown linkType: soft @@ -4817,7 +4640,6 @@ __metadata: dependencies: "@emotion/react": ^11.10.4 "@emotion/styled": ^11.10.5 - "@formatjs/cli": ^2.13.15 "@mui/icons-material": ^5.9.3 "@mui/lab": ^5.0.0-alpha.98 "@mui/material": ^5.10.11 @@ -4827,7 +4649,6 @@ __metadata: "@welldone-software/why-did-you-render": ^7.0.1 "@wisemapping/editor": ^0.4.0 axios: ^0.27.2 - copy-webpack-plugin: ^7.0.0 cypress: ^12.3.0 cypress-image-snapshot: ^4.0.1 dayjs: ^1.10.7 @@ -5773,13 +5594,6 @@ __metadata: languageName: node linkType: hard -"big.js@npm:^5.2.2": - version: 5.2.2 - resolution: "big.js@npm:5.2.2" - checksum: b89b6e8419b097a8fb4ed2399a1931a68c612bce3cfd5ca8c214b2d017531191070f990598de2fc6f3f993d91c0f08aa82697717f6b3b8732c9731866d233c9e - languageName: node - linkType: hard - "binary-extensions@npm:^2.0.0": version: 2.2.0 resolution: "binary-extensions@npm:2.2.0" @@ -6625,7 +6439,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^6.1.0, commander@npm:^6.2.0": +"commander@npm:^6.2.0": version: 6.2.1 resolution: "commander@npm:6.2.1" checksum: d7090410c0de6bc5c67d3ca41c41760d6d268f3c799e530aafb73b7437d1826bbf0d2a3edac33f8b57cc9887b4a986dce307fa5557e109be40eadb7c43b21742 @@ -6693,18 +6507,6 @@ __metadata: languageName: node linkType: hard -"compression-webpack-plugin@npm:^9.2.0": - version: 9.2.0 - resolution: "compression-webpack-plugin@npm:9.2.0" - dependencies: - schema-utils: ^4.0.0 - serialize-javascript: ^6.0.0 - peerDependencies: - webpack: ^5.1.0 - checksum: 50ef78d0973f87ed8d7c30fdb31b009d409c288a77ee842d9b3b5b2348048f55148f510d3a0bd30b5c954e6701ed9fc08c3616ce46ad1eec8e0954b336a5f4b9 - languageName: node - linkType: hard - "compression@npm:^1.7.4": version: 1.7.4 resolution: "compression@npm:1.7.4" @@ -6949,7 +6751,7 @@ __metadata: languageName: node linkType: hard -"copy-webpack-plugin@npm:^10.0.0, copy-webpack-plugin@npm:^10.2.1": +"copy-webpack-plugin@npm:^10.2.4": version: 10.2.4 resolution: "copy-webpack-plugin@npm:10.2.4" dependencies: @@ -6965,24 +6767,6 @@ __metadata: languageName: node linkType: hard -"copy-webpack-plugin@npm:^7.0.0": - version: 7.0.0 - resolution: "copy-webpack-plugin@npm:7.0.0" - dependencies: - fast-glob: ^3.2.4 - glob-parent: ^5.1.1 - globby: ^11.0.1 - loader-utils: ^2.0.0 - normalize-path: ^3.0.0 - p-limit: ^3.0.2 - schema-utils: ^3.0.0 - serialize-javascript: ^5.0.1 - peerDependencies: - webpack: ^5.1.0 - checksum: c0f75e93595e1e3ce1cdd2d6ec3a2f4d1d8b0b15e5a9f0f70e06c0e51494cba2c1285cb0a6473afb959e6a7816b3e7c736f29541002d8ed8859c77445d1ac5f3 - languageName: node - linkType: hard - "core-js-compat@npm:^3.25.1": version: 3.26.0 resolution: "core-js-compat@npm:3.26.0" @@ -7006,13 +6790,6 @@ __metadata: languageName: node linkType: hard -"core-js@npm:^3.15.2": - version: 3.26.0 - resolution: "core-js@npm:3.26.0" - checksum: 0149eb9d3909fde9c17626af3a6e625c326e8598d0bb5e6c5b48a18e5fcd4eaf48d4964d873667d8148542ff590fb98eb3f93618da114ca54999d6bc0349734b - languageName: node - linkType: hard - "core-util-is@npm:1.0.2": version: 1.0.2 resolution: "core-util-is@npm:1.0.2" @@ -7101,21 +6878,21 @@ __metadata: languageName: node linkType: hard -"css-loader@npm:^6.7.1": - version: 6.7.1 - resolution: "css-loader@npm:6.7.1" +"css-loader@npm:^6.7.3": + version: 6.7.3 + resolution: "css-loader@npm:6.7.3" dependencies: icss-utils: ^5.1.0 - postcss: ^8.4.7 + postcss: ^8.4.19 postcss-modules-extract-imports: ^3.0.0 postcss-modules-local-by-default: ^4.0.0 postcss-modules-scope: ^3.0.0 postcss-modules-values: ^4.0.0 postcss-value-parser: ^4.2.0 - semver: ^7.3.5 + semver: ^7.3.8 peerDependencies: webpack: ^5.0.0 - checksum: 170fdbc630a05a43679ef60fa97694766b568dbde37adccc0faafa964fc675f08b976bc68837bb73b61d60240e8d2cbcbf51540fe94ebc9dafc56e7c46ba5527 + checksum: 473cc32b6c837c2848e2051ad1ba331c1457449f47442e75a8c480d9891451434ada241f7e3de2347e57de17fcd84610b3bcfc4a9da41102cdaedd1e17902d31 languageName: node linkType: hard @@ -7916,13 +7693,6 @@ __metadata: languageName: node linkType: hard -"emojis-list@npm:^3.0.0": - version: 3.0.0 - resolution: "emojis-list@npm:3.0.0" - checksum: ddaaa02542e1e9436c03970eeed445f4ed29a5337dfba0fe0c38dfdd2af5da2429c2a0821304e8a8d1cadf27fdd5b22ff793571fa803ae16852a6975c65e8e70 - languageName: node - linkType: hard - "encodeurl@npm:~1.0.2": version: 1.0.2 resolution: "encodeurl@npm:1.0.2" @@ -8500,13 +8270,6 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^2.0.2": - version: 2.0.2 - resolution: "estree-walker@npm:2.0.2" - checksum: 6151e6f9828abe2259e57f5fd3761335bb0d2ebd76dc1a01048ccee22fabcfef3c0859300f6d83ff0d1927849368775ec5a6d265dde2f6de5a1be1721cd94efc - languageName: node - linkType: hard - "esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -8816,7 +8579,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.4, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" dependencies: @@ -9193,7 +8956,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^9.0.0, fs-extra@npm:^9.1.0": +"fs-extra@npm:^9.1.0": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" dependencies: @@ -9557,7 +9320,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.0.0, glob-parent@npm:^5.1.1, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.0.0, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -9655,7 +9418,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.1, globby@npm:^11.1.0": +"globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -10462,16 +10225,6 @@ __metadata: languageName: node linkType: hard -"intl-messageformat-parser@npm:6.1.2": - version: 6.1.2 - resolution: "intl-messageformat-parser@npm:6.1.2" - dependencies: - "@formatjs/ecma402-abstract": 1.5.0 - tslib: ^2.0.1 - checksum: 64f7215624e9e6bc8add3a42ffc9aab348bb090e638a9b83a492adcfbdde6ad0d06811a50155184017736de3afb2011aae57f4b87675bb11da4e018254090333 - languageName: node - linkType: hard - "intl-messageformat@npm:10.2.1": version: 10.2.1 resolution: "intl-messageformat@npm:10.2.1" @@ -11861,15 +11614,6 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify@npm:^1.0.1": - version: 1.0.2 - resolution: "json-stable-stringify@npm:1.0.2" - dependencies: - jsonify: ^0.0.1 - checksum: ec10863493fb728481ed7576551382768a173d5b884758db530def00523b862083a3fd70fee24b39e2f47f5f502e22f9a1489dd66da3535b63bf6241dbfca800 - languageName: node - linkType: hard - "json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -11888,7 +11632,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.1.2, json5@npm:^2.2.1": +"json5@npm:^2.2.1": version: 2.2.1 resolution: "json5@npm:2.2.1" bin: @@ -11897,7 +11641,7 @@ __metadata: languageName: node linkType: hard -"json5@npm:^2.2.2": +"json5@npm:^2.2.2, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" bin: @@ -11931,13 +11675,6 @@ __metadata: languageName: node linkType: hard -"jsonify@npm:^0.0.1": - version: 0.0.1 - resolution: "jsonify@npm:0.0.1" - checksum: 027287e1c0294fce15f18c0ff990cfc2318e7f01fb76515f784d5cd0784abfec6fc5c2355c3a2f2cb0ad7f4aa2f5b74ebbfe4e80476c35b2d13cabdb572e1134 - languageName: node - linkType: hard - "jsonparse@npm:^1.2.0": version: 1.3.1 resolution: "jsonparse@npm:1.3.1" @@ -12187,17 +11924,6 @@ __metadata: languageName: node linkType: hard -"loader-utils@npm:^2.0.0": - version: 2.0.4 - resolution: "loader-utils@npm:2.0.4" - dependencies: - big.js: ^5.2.2 - emojis-list: ^3.0.0 - json5: ^2.1.2 - checksum: a5281f5fff1eaa310ad5e1164095689443630f3411e927f95031ab4fb83b4a98f388185bb1fe949e8ab8d4247004336a625e9255c22122b815bb9a4c5d8fc3b7 - languageName: node - linkType: hard - "locate-path@npm:^2.0.0": version: 2.0.0 resolution: "locate-path@npm:2.0.0" @@ -12379,16 +12105,6 @@ __metadata: languageName: node linkType: hard -"loud-rejection@npm:*, loud-rejection@npm:^2.2.0": - version: 2.2.0 - resolution: "loud-rejection@npm:2.2.0" - dependencies: - currently-unhandled: ^0.4.1 - signal-exit: ^3.0.2 - checksum: 2499c593d9a09a6fd305c6185826bcf546144b445ce730bdc275433674d1f411c23ce5dfcc7971feb22add7b47dc7e5f8c89c589f3720944d7e6945b617e392e - languageName: node - linkType: hard - "loud-rejection@npm:^1.0.0": version: 1.6.0 resolution: "loud-rejection@npm:1.6.0" @@ -12459,15 +12175,6 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.25.7": - version: 0.25.9 - resolution: "magic-string@npm:0.25.9" - dependencies: - sourcemap-codec: ^1.4.8 - checksum: 9a0e55a15c7303fc360f9572a71cffba1f61451bc92c5602b1206c9d17f492403bf96f946dfce7483e66822d6b74607262e24392e87b0ac27b786e69a40e9b1a - languageName: node - linkType: hard - "make-dir@npm:^1.0.0": version: 1.3.0 resolution: "make-dir@npm:1.3.0" @@ -14412,12 +14119,12 @@ __metadata: linkType: hard "postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4": - version: 6.0.10 - resolution: "postcss-selector-parser@npm:6.0.10" + version: 6.0.11 + resolution: "postcss-selector-parser@npm:6.0.11" dependencies: cssesc: ^3.0.0 util-deprecate: ^1.0.2 - checksum: 46afaa60e3d1998bd7adf6caa374baf857cc58d3ff944e29459c9a9e4680a7fe41597bd5b755fc81d7c388357e9bf67c0251d047c640a09f148e13606b8a8608 + checksum: 0b01aa9c2d2c8dbeb51e9b204796b678284be9823abc8d6d40a8b16d4149514e922c264a8ed4deb4d6dbced564b9be390f5942c058582d8656351516d6c49cde languageName: node linkType: hard @@ -14428,14 +14135,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.1.10, postcss@npm:^8.4.7": - version: 8.4.19 - resolution: "postcss@npm:8.4.19" +"postcss@npm:^8.4.19": + version: 8.4.21 + resolution: "postcss@npm:8.4.21" dependencies: nanoid: ^3.3.4 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 62782723a385f92b7525f66d29614624de7c5643855423db3a5efd9287e677650300192749adddbbb6734cea9b1d5f5fd4f6ea00ca3f9a95dbbb88f835f5ca64 + checksum: e39ac60ccd1542d4f9d93d894048aac0d686b3bb38e927d8386005718e6793dbbb46930f0a523fe382f1bbd843c6d980aaea791252bf5e176180e5a4336d9679 languageName: node linkType: hard @@ -15729,7 +15436,7 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.0, schema-utils@npm:^3.1.1": +"schema-utils@npm:^3.1.0, schema-utils@npm:^3.1.1": version: 3.1.1 resolution: "schema-utils@npm:3.1.1" dependencies: @@ -15784,7 +15491,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7": +"semver@npm:7.x, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8": version: 7.3.8 resolution: "semver@npm:7.3.8" dependencies: @@ -15834,15 +15541,6 @@ __metadata: languageName: node linkType: hard -"serialize-javascript@npm:^5.0.1": - version: 5.0.1 - resolution: "serialize-javascript@npm:5.0.1" - dependencies: - randombytes: ^2.1.0 - checksum: bb45a427690c3d2711e28499de0fbf25036af1e23c63c6a9237ed0aa572fd0941fcdefe50a2dccf26d9df8c8b86ae38659e19d8ba7afd3fbc1f1c7539a2a48d2 - languageName: node - linkType: hard - "serve-index@npm:^1.9.1": version: 1.9.1 resolution: "serve-index@npm:1.9.1" @@ -16209,13 +15907,6 @@ __metadata: languageName: node linkType: hard -"sourcemap-codec@npm:^1.4.8": - version: 1.4.8 - resolution: "sourcemap-codec@npm:1.4.8" - checksum: b57981c05611afef31605732b598ccf65124a9fcb03b833532659ac4d29ac0f7bfacbc0d6c5a28a03e84c7510e7e556d758d0bb57786e214660016fb94279316 - languageName: node - linkType: hard - "spdx-correct@npm:^3.0.0": version: 3.1.1 resolution: "spdx-correct@npm:3.1.1" @@ -17164,14 +16855,14 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:^29.0.3": - version: 29.0.3 - resolution: "ts-jest@npm:29.0.3" +"ts-jest@npm:^29.0.5": + version: 29.0.5 + resolution: "ts-jest@npm:29.0.5" dependencies: bs-logger: 0.x fast-json-stable-stringify: 2.x jest-util: ^29.0.0 - json5: ^2.2.1 + json5: ^2.2.3 lodash.memoize: 4.x make-error: 1.x semver: 7.x @@ -17193,13 +16884,13 @@ __metadata: optional: true bin: ts-jest: cli.js - checksum: 541e51776d367fa2279af47f75af94b03e0538f1839ea9983de0f4ad7f188002f6eb1fc72440651d96daa62d25a7bc679a129c14e6ef291277eea9346751d56b + checksum: f60f129c2287f4c963d9ee2677132496c5c5a5d39c27ad234199a1140c26318a7d5bda34890ab0e30636ec42a8de28f84487c09e9dcec639c9c67812b3a38373 languageName: node linkType: hard -"ts-loader@npm:^9.2.6": - version: 9.4.1 - resolution: "ts-loader@npm:9.4.1" +"ts-loader@npm:^9.4.2": + version: 9.4.2 + resolution: "ts-loader@npm:9.4.2" dependencies: chalk: ^4.1.0 enhanced-resolve: ^5.0.0 @@ -17208,11 +16899,11 @@ __metadata: peerDependencies: typescript: "*" webpack: ^5.0.0 - checksum: b8947f6d396621cc3f6ba8d4c14fa09eba03c4b7eeabbc429481e923a973c244fb80feb44e900f03fc1010755a6bf14fc561c574fb79e324f39b5b6ef1dcca6c + checksum: 6f306ee4c615c2a159fb177561e3fb86ca2cbd6c641e710d408a64b4978e1ff3f2c9733df07bff27d3f82efbfa7c287523d4306049510c7485ac2669a9c37eb0 languageName: node linkType: hard -"ts-node@npm:^10.4.0": +"ts-node@npm:^10.9.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1" dependencies: @@ -17276,7 +16967,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0": +"tslib@npm:^2.0.3, tslib@npm:^2.1.0": version: 2.4.1 resolution: "tslib@npm:2.4.1" checksum: 19480d6e0313292bd6505d4efe096a6b31c70e21cf08b5febf4da62e95c265c8f571f7b36fcc3d1a17e068032f59c269fab3459d6cd3ed6949eafecf64315fca @@ -17394,7 +17085,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.0, typescript@npm:^4.8.4": +"typescript@npm:^4.8.4": version: 4.8.4 resolution: "typescript@npm:4.8.4" bin: @@ -17404,7 +17095,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^4.0#~builtin, typescript@patch:typescript@^4.8.4#~builtin": +"typescript@patch:typescript@^4.8.4#~builtin": version: 4.8.4 resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin::version=4.8.4&hash=0102e9" bin: @@ -18178,9 +17869,13 @@ __metadata: "@babel/preset-env": ^7.14.7 "@babel/preset-typescript": ^7.16.5 "@babel/register": ^7.16.0 + "@formatjs/cli": ^5.1.3 + "@types/jest": ^29.0.5 "@typescript-eslint/eslint-plugin": "^5.48.0 " "@typescript-eslint/parser": ^5.48.0 babel-loader: ^9.1.2 + copy-webpack-plugin: ^10.2.4 + css-loader: ^6.7.3 eslint: ^8.4.1 eslint-config-airbnb-base: ^14.2.1 eslint-config-prettier: ^8.5.0 @@ -18192,10 +17887,18 @@ __metadata: eslint-plugin-react-hooks: ^4.6.0 html-webpack-plugin: ^5.3.2 husky: ^8.0.0 + jest: ^29.3.1 + jest-diff: ^29.3.1 + jest-environment-jsdom: ^29.3.1 + jest-webpack: ^0.5.1 lerna: ^3.16.4 lint-staged: ^10.5.4 prettier: ^2.7.1 start-server-and-test: ^1.14.0 + style-loader: ^3.3.1 + ts-jest: ^29.0.5 + ts-loader: ^9.4.2 + ts-node: ^10.9.1 typescript: ^4.8.4 webpack: ^5.75.0 webpack-bundle-analyzer: ^4.5.0