From 42a093941ab39035087542fa0f2fec3ea1101b11 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 09:55:15 +0200 Subject: [PATCH 01/29] fix babel-loader using resolve --- packages/icons/webpack.umd.js | 2 +- tools/scripts-build-cdn/build.js | 15 +++++++-------- .../config/webpack.config.common.js | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/icons/webpack.umd.js b/packages/icons/webpack.umd.js index 7041f9b3804..866ff086f79 100644 --- a/packages/icons/webpack.umd.js +++ b/packages/icons/webpack.umd.js @@ -19,7 +19,7 @@ module.exports = (env = {}) => ({ test: /\.(js|jsx)$/, exclude: /node_modules/, use: { - loader: 'babel-loader', + loader: require.resolve('babel-loader'), }, }, { diff --git a/tools/scripts-build-cdn/build.js b/tools/scripts-build-cdn/build.js index e2bed28478f..cabb7d47b28 100755 --- a/tools/scripts-build-cdn/build.js +++ b/tools/scripts-build-cdn/build.js @@ -60,10 +60,7 @@ async function main(args) { const patchPath = `${__dirname}/patch/${packageName}/${version}`; const UMDFileName = packageCdnConfig.path.replace(`/${TARGET}/`, ''); - if ( - fs.existsSync(`${packagePath}/${version}/${TARGET}/${UMDFileName}`) && - !program.force - ) { + if (fs.existsSync(`${packagePath}/${version}/${TARGET}/${UMDFileName}`) && !program.force) { await cleanup(packagePath, version); continue; } @@ -73,7 +70,7 @@ async function main(args) { } const devDependencies = { - 'd3': '^6.5.0' // so we can support d3-x babel plugin + d3: '^6.5.0', // so we can support d3-x babel plugin }; if (packageName.includes('react') || packageName.includes('rc-')) { @@ -129,7 +126,7 @@ module.exports = { { test: /\.js$/, use: { - loader: 'babel-loader', + loader: require.resolve('babel-loader'), options: { plugins: ['@talend/babel-plugin-import-d3'] } @@ -156,7 +153,7 @@ module.exports = { `${packagePath}/${version}/webpack.index.js`, `export { default } from '${packageName}'; export * from '${packageName}'; - ` + `, ); } @@ -167,7 +164,9 @@ module.exports = { console.error(error); return; } - const info = require(`${process.cwd()}/${packagePath}/${version}/node_modules/${packageName}/package.json`); + const info = require( + `${process.cwd()}/${packagePath}/${version}/node_modules/${packageName}/package.json`, + ); if (info.peerDependencies) { pjson.devDependencies = Object.keys(info.peerDependencies).reduce((acc, key) => { acc[key] = info.peerDependencies[key]; diff --git a/tools/scripts-config-react-webpack/config/webpack.config.common.js b/tools/scripts-config-react-webpack/config/webpack.config.common.js index 77d9917e5d2..b17399ae820 100644 --- a/tools/scripts-config-react-webpack/config/webpack.config.common.js +++ b/tools/scripts-config-react-webpack/config/webpack.config.common.js @@ -58,7 +58,7 @@ function getCommonStyleLoaders(enableModules, isEnvDevelopmentServe) { function getJSAndTSLoader() { return [ { - loader: 'babel-loader', + loader: require.resolve('babel-loader'), options: getBabelLoaderOptions(babelConfig), }, ].filter(Boolean); From c2567d8034e524f27a84054c41ca557525c762fa Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 10:06:46 +0200 Subject: [PATCH 02/29] fix all loaders --- packages/icons/webpack.config.js | 6 +++--- packages/storybook-docs/webpack.custom.js | 14 ++++++++++---- packages/theme/webpack.config.js | 10 +++++----- .../config/webpack.config.common.js | 12 +++++++----- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/packages/icons/webpack.config.js b/packages/icons/webpack.config.js index 79f91dd811a..370970eeb26 100644 --- a/packages/icons/webpack.config.js +++ b/packages/icons/webpack.config.js @@ -27,14 +27,14 @@ module.exports = { { // The replacer is used to create relative local paths instead of paths relative // to publicPath, because it makes it processable by webpack. - loader: 'string-replace-loader', + loader: require.resolve('string-replace-loader'), options: { search: /url\(\\"\//g, // The CSS output by css-loader is stringified, so the quotes are escaped replace: 'url(\\"./', }, }, { - loader: 'css-loader', + loader: require.resolve('css-loader'), options: { url: false, }, @@ -44,7 +44,7 @@ module.exports = { }, { test: /\.(woff|eot|ttf|svg)$/, - loader: 'url-loader', + loader: require.resolve('url-loader'), }, ], }, diff --git a/packages/storybook-docs/webpack.custom.js b/packages/storybook-docs/webpack.custom.js index 73c46a8a9b5..06526b8dca2 100644 --- a/packages/storybook-docs/webpack.custom.js +++ b/packages/storybook-docs/webpack.custom.js @@ -20,9 +20,12 @@ module.exports = { exclude: /node_modules/, use: [ { loader: MiniCssExtractPlugin.loader, options: { esModule: false } }, - { loader: 'css-loader', options: { sourceMap: true } }, { - loader: 'postcss-loader', + loader: require.resolve('css-loader'), + options: { sourceMap: true }, + }, + { + loader: require.resolve('postcss-loader'), options: { postcssOptions: { plugins: ['autoprefixer'], @@ -30,9 +33,12 @@ module.exports = { }, }, }, - { loader: 'resolve-url-loader', options: { sourceMap: true } }, { - loader: 'sass-loader', + loader: require.resolve('resolve-url-loader'), + options: { sourceMap: true }, + }, + { + loader: require.resolve('sass-loader'), options: { sourceMap: true }, }, ], diff --git a/packages/theme/webpack.config.js b/packages/theme/webpack.config.js index ccf1f08de1c..2ffb9d6c2da 100644 --- a/packages/theme/webpack.config.js +++ b/packages/theme/webpack.config.js @@ -25,7 +25,7 @@ module.exports = (env, argv) => { test: /\.woff(2)?(\?[a-z0-9=&.]+)?$/, use: [ { - loader: 'file-loader', + loader: require.resolve('file-loader'), options: { outputPath: 'fonts', name: '[name].[ext]', @@ -38,17 +38,17 @@ module.exports = (env, argv) => { test: /bootstrap\.scss$/, use: [ { - loader: isDev ? 'style-loader' : MiniCssExtractPlugin.loader, + loader: isDev ? require.resolve('style-loader') : MiniCssExtractPlugin.loader, }, { - loader: 'css-loader', + loader: require.resolve('css-loader'), options: { importLoaders: 3, sourceMap: true, }, }, { - loader: 'postcss-loader', + loader: require.resolve('postcss-loader'), options: { postcssOptions: { plugins: [postcssPresetEnv({ browsers: 'last 2 versions' })], @@ -57,7 +57,7 @@ module.exports = (env, argv) => { }, }, { - loader: 'sass-loader', + loader: require.resolve('sass-loader'), options: { sourceMap: true, }, diff --git a/tools/scripts-config-react-webpack/config/webpack.config.common.js b/tools/scripts-config-react-webpack/config/webpack.config.common.js index b17399ae820..18b78c1e0a9 100644 --- a/tools/scripts-config-react-webpack/config/webpack.config.common.js +++ b/tools/scripts-config-react-webpack/config/webpack.config.common.js @@ -39,12 +39,14 @@ function getCommonStyleLoaders(enableModules, isEnvDevelopmentServe) { importLoaders: 1, }; } - const styleLoader = isEnvDevelopmentServe ? 'style-loader' : MiniCssExtractPlugin.loader; + const styleLoader = isEnvDevelopmentServe + ? require.resolve('style-loader') + : MiniCssExtractPlugin.loader; return [ { loader: styleLoader, options: { esModule: false } }, - { loader: 'css-loader', options: cssOptions }, + { loader: require.resolve('css-loader'), options: cssOptions }, { - loader: 'postcss-loader', + loader: require.resolve('postcss-loader'), options: { postcssOptions: { plugins: ['autoprefixer'], @@ -67,9 +69,9 @@ function getJSAndTSLoader() { function getSassLoaders(enableModules, sassData, isEnvDevelopmentServe) { const sourceMap = true; return getCommonStyleLoaders(enableModules, isEnvDevelopmentServe).concat( - { loader: 'resolve-url-loader', options: { sourceMap } }, + { loader: require.resolve('resolve-url-loader'), options: { sourceMap } }, { - loader: 'sass-loader', + loader: require.resolve('sass-loader'), options: { sourceMap, additionalData: sassData }, }, ); From 3bd4691eb867cae32c771a7b55333deb9308cb24 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 10:27:00 +0200 Subject: [PATCH 03/29] fix test:umd for design-tokens --- packages/design-tokens/jest.config.js | 6 ++++++ packages/design-tokens/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 packages/design-tokens/jest.config.js diff --git a/packages/design-tokens/jest.config.js b/packages/design-tokens/jest.config.js new file mode 100644 index 00000000000..b11b3a7a160 --- /dev/null +++ b/packages/design-tokens/jest.config.js @@ -0,0 +1,6 @@ +const defaults = require('@talend/scripts-config-jest/jest.config.js'); + +module.exports = { + ...defaults, + testRegex: '(/__tests__/.*|src/|scripts/).*\\.test.(js|ts|tsx)$', +}; diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index f479fcadadd..57974bd901b 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -12,7 +12,7 @@ "build:lib": "talend-scripts build && pnpm build:umd:dev && pnpm build:umd:prod && pnpm test:umd", "test": "echo no test for @talend/design-tokens", "test:cov": "echo no test for @talend/design-tokens", - "test:umd": "jest scripts/umd.test.js", + "test:umd": "talend-scripts test scripts/umd.test.js", "lint": "talend-scripts lint" }, "keywords": [ From f73cdb94b8462a7ded2cb10adb937b533b7facf8 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 10:45:30 +0200 Subject: [PATCH 04/29] fix jest script --- tools/scripts-core/src/scripts/test.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/scripts-core/src/scripts/test.js b/tools/scripts-core/src/scripts/test.js index ad54cb7b06d..d98d56c66e6 100755 --- a/tools/scripts-core/src/scripts/test.js +++ b/tools/scripts-core/src/scripts/test.js @@ -22,9 +22,12 @@ export default async function test(env, presetApi, options) { const jestConfigPath = getUserConfigFile('jest.config.js') || path.join(configPath, 'jest.config.js'); - const jest = utils.path.resolveBin('jest'); - return utils.process.spawn(jest, ['--config', jestConfigPath].concat(options), { - stdio: 'inherit', - env, - }); + return utils.process.spawn( + new URL(import.meta.resolve('jest-cli/bin/jest')).pathname, + ['--config', jestConfigPath].concat(options), + { + stdio: 'inherit', + env, + }, + ); } From f706b51a5ca5b8b8432376eceb6605d1da2cdf6c Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 10:49:48 +0200 Subject: [PATCH 05/29] add jest-cli to scripts-core --- pnpm-lock.yaml | 3 +++ tools/scripts-core/package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c03fed13cb..bca062b4be6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2746,6 +2746,9 @@ importers: jest: specifier: ^29.7.0 version: 29.7.0 + jest-cli: + specifier: ^29.7.0 + version: 29.7.0 lodash: specifier: ^4.17.21 version: 4.17.21 diff --git a/tools/scripts-core/package.json b/tools/scripts-core/package.json index 25101ab5989..1f900a0d857 100644 --- a/tools/scripts-core/package.json +++ b/tools/scripts-core/package.json @@ -44,6 +44,7 @@ "@talend/scripts-config-typescript": "^11.1.0", "babel-loader": "^9.1.3", "jest": "^29.7.0", + "jest-cli": "^29.7.0", "cpx2": "^3.0.2", "fs-extra": "^10.1.0", "lodash": "^4.17.21", From d25413fb66d709010436720e5271f2fd10de8779 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 10:56:09 +0200 Subject: [PATCH 06/29] add types to assets-api, add babel-core to icons --- packages/assets-api/package.json | 2 ++ packages/icons/package.json | 1 + pnpm-lock.yaml | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/packages/assets-api/package.json b/packages/assets-api/package.json index 5e93a804ace..fcec3312221 100644 --- a/packages/assets-api/package.json +++ b/packages/assets-api/package.json @@ -32,6 +32,8 @@ "@talend/scripts-core": "^15.0.0", "@talend/scripts-config-react-webpack": "^16.0.0", "@talend/scripts-config-typescript": "^11.1.0", + "@types/node": "^6.14.13", + "@types/jest": "^29.5.5", "read-pkg-up": "^7.0.1" }, "publishConfig": { diff --git a/packages/icons/package.json b/packages/icons/package.json index a17675cb8f3..07261692738 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -40,6 +40,7 @@ "url": "https://github.com/Talend/ui.git" }, "devDependencies": { + "@babel/core": "^7.23.2", "@babel/preset-env": "^7.22.20", "@babel/preset-react": "^7.22.15", "@svgr/webpack": "^5.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bca062b4be6..7269432d5a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -249,6 +249,12 @@ importers: '@talend/scripts-core': specifier: ^15.0.0 version: link:../../tools/scripts-core + '@types/jest': + specifier: ^29.5.5 + version: 29.5.5 + '@types/node': + specifier: ^6.14.13 + version: 6.14.13 read-pkg-up: specifier: ^7.0.1 version: 7.0.1 @@ -1559,6 +1565,9 @@ importers: packages/icons: devDependencies: + '@babel/core': + specifier: ^7.23.2 + version: 7.23.2 '@babel/preset-env': specifier: ^7.22.20 version: 7.23.2(@babel/core@7.23.2) From 18486f87423421bc9db76f3645f130c9518795f1 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 11:13:01 +0200 Subject: [PATCH 07/29] fix babel config --- tools/scripts-config-babel/.babelrc.json | 23 --------------------- tools/scripts-config-babel/babel.config.js | 24 ++++++++++++++++++++++ tools/scripts-config-babel/index.js | 2 +- 3 files changed, 25 insertions(+), 24 deletions(-) delete mode 100644 tools/scripts-config-babel/.babelrc.json create mode 100644 tools/scripts-config-babel/babel.config.js diff --git a/tools/scripts-config-babel/.babelrc.json b/tools/scripts-config-babel/.babelrc.json deleted file mode 100644 index f6748ec496e..00000000000 --- a/tools/scripts-config-babel/.babelrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": "last 1 year, not ie > 0, not samsung > 0, not opera > 0, not ios > 0, not op_mob > 0, not android > 0, not and_chr > 0, not and_ff > 0, not and_qq > 0" - } - ], - ["@babel/preset-react", { "runtime": "automatic" }], - ["@babel/preset-typescript", { "allExtensions": true, "isTSX": true }] - ], - "plugins": [ - "@talend/babel-plugin-import-from-index", - "@talend/babel-plugin-assets-api", - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-transform-object-assign", - "@babel/plugin-proposal-optional-chaining", - ["angularjs-annotate", { "explicitOnly": true }] - ] -} diff --git a/tools/scripts-config-babel/babel.config.js b/tools/scripts-config-babel/babel.config.js new file mode 100644 index 00000000000..34a55627570 --- /dev/null +++ b/tools/scripts-config-babel/babel.config.js @@ -0,0 +1,24 @@ +module.exports = { + presets: [ + [ + require.resolve('@babel/preset-env'), + { + targets: + 'last 1 year, not ie > 0, not samsung > 0, not opera > 0, not ios > 0, not op_mob > 0, not android > 0, not and_chr > 0, not and_ff > 0, not and_qq > 0', + }, + ], + [require.resolve('@babel/preset-react'), { runtime: 'automatic' }], + [require.resolve('@babel/preset-typescript'), { allExtensions: true, isTSX: true }], + ], + plugins: [ + require.resolve('@talend/babel-plugin-import-from-index'), + require.resolve('@talend/babel-plugin-assets-api'), + require.resolve('@babel/plugin-proposal-nullish-coalescing-operator'), + require.resolve('@babel/plugin-proposal-class-properties'), + require.resolve('@babel/plugin-proposal-export-default-from'), + require.resolve('@babel/plugin-proposal-export-namespace-from'), + require.resolve('@babel/plugin-transform-object-assign'), + require.resolve('@babel/plugin-proposal-optional-chaining'), + ['angularjs-annotate', { explicitOnly: true }], + ], +}; diff --git a/tools/scripts-config-babel/index.js b/tools/scripts-config-babel/index.js index 9e314debedd..b76123ca373 100644 --- a/tools/scripts-config-babel/index.js +++ b/tools/scripts-config-babel/index.js @@ -1 +1 @@ -module.exports = require('./.babelrc.json'); +module.exports = require('./babel.config'); From dd7cc38e08be0dd4d0dafc5c0f10fe782a0384a0 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 11:21:53 +0200 Subject: [PATCH 08/29] fix babel config using resolve + fix all extends --- fork/react-bootstrap/.babelrc | 2 +- packages/cmf-cqrs/.babelrc.json | 2 +- packages/cmf-router/.babelrc.json | 2 +- packages/cmf/.babelrc.json | 2 +- packages/components/.babelrc.json | 2 +- packages/containers/.babelrc.json | 2 +- packages/dataviz/.babelrc.json | 2 +- packages/design-docs/.babelrc.json | 2 +- packages/design-docs/.storybook/.babelrc | 2 +- packages/design-system/.babelrc | 2 +- packages/faceted-search/.babelrc | 2 +- packages/forms/.babelrc.json | 2 +- packages/http/.babelrc | 2 +- packages/icons/.babelrc.json | 2 +- packages/icons/scripts/react.js | 2 +- packages/playground/.babelrc.json | 2 +- packages/router-bridge/.babelrc.json | 2 +- packages/sagas/.babelrc.json | 2 +- packages/stepper/.babelrc.json | 2 +- packages/storybook-cmf/.babelrc | 2 +- packages/storybook-docs/.babelrc | 2 +- packages/storybook-one/.babelrc.json | 2 +- packages/storybook-one/.storybook/.babelrc.json | 2 +- tools/cmf-webpack-plugin/.babelrc.json | 2 +- tools/scripts-config-babel/CHANGELOG.md | 2 +- tools/scripts-config-babel/babel-resolver.js | 4 ++-- tools/scripts-config-babel/test/nullish.test.js | 2 +- tools/scripts-config-react-webpack/config/inject.js | 2 +- tools/scripts-core/src/scripts/build-lib.js | 2 +- tools/scripts-core/src/scripts/extends.js | 4 ++-- tools/scripts-utils/.babelrc | 2 +- 31 files changed, 33 insertions(+), 33 deletions(-) diff --git a/fork/react-bootstrap/.babelrc b/fork/react-bootstrap/.babelrc index 1d6655372aa..abd323e11de 100644 --- a/fork/react-bootstrap/.babelrc +++ b/fork/react-bootstrap/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/cmf-cqrs/.babelrc.json b/packages/cmf-cqrs/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/cmf-cqrs/.babelrc.json +++ b/packages/cmf-cqrs/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/cmf-router/.babelrc.json b/packages/cmf-router/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/cmf-router/.babelrc.json +++ b/packages/cmf-router/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/cmf/.babelrc.json b/packages/cmf/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/cmf/.babelrc.json +++ b/packages/cmf/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/components/.babelrc.json b/packages/components/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/components/.babelrc.json +++ b/packages/components/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/containers/.babelrc.json b/packages/containers/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/containers/.babelrc.json +++ b/packages/containers/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/dataviz/.babelrc.json b/packages/dataviz/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/dataviz/.babelrc.json +++ b/packages/dataviz/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/design-docs/.babelrc.json b/packages/design-docs/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/design-docs/.babelrc.json +++ b/packages/design-docs/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/design-docs/.storybook/.babelrc b/packages/design-docs/.storybook/.babelrc index 1d6655372aa..abd323e11de 100644 --- a/packages/design-docs/.storybook/.babelrc +++ b/packages/design-docs/.storybook/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/design-system/.babelrc b/packages/design-system/.babelrc index 02add252488..269d2ec2cfe 100644 --- a/packages/design-system/.babelrc +++ b/packages/design-system/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/faceted-search/.babelrc b/packages/faceted-search/.babelrc index 02add252488..269d2ec2cfe 100644 --- a/packages/faceted-search/.babelrc +++ b/packages/faceted-search/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/forms/.babelrc.json b/packages/forms/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/forms/.babelrc.json +++ b/packages/forms/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/http/.babelrc b/packages/http/.babelrc index 02add252488..269d2ec2cfe 100644 --- a/packages/http/.babelrc +++ b/packages/http/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/icons/.babelrc.json b/packages/icons/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/icons/.babelrc.json +++ b/packages/icons/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/icons/scripts/react.js b/packages/icons/scripts/react.js index d1b1ef871f5..1d0b70d2633 100755 --- a/packages/icons/scripts/react.js +++ b/packages/icons/scripts/react.js @@ -4,7 +4,7 @@ const path = require('path'); const mkdirp = require('mkdirp'); const babel = require('@babel/core'); -const defaultOptions = require('@talend/scripts-config-babel/.babelrc.json'); +const defaultOptions = require('@talend/scripts-config-babel/babel.config.js'); const src = require('../src'); const info = require('../src/info').info; const infoFromFigma = require('../src/info').infoFromFigma; diff --git a/packages/playground/.babelrc.json b/packages/playground/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/playground/.babelrc.json +++ b/packages/playground/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/router-bridge/.babelrc.json b/packages/router-bridge/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/router-bridge/.babelrc.json +++ b/packages/router-bridge/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/sagas/.babelrc.json b/packages/sagas/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/sagas/.babelrc.json +++ b/packages/sagas/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/stepper/.babelrc.json b/packages/stepper/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/stepper/.babelrc.json +++ b/packages/stepper/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/storybook-cmf/.babelrc b/packages/storybook-cmf/.babelrc index 1d6655372aa..abd323e11de 100644 --- a/packages/storybook-cmf/.babelrc +++ b/packages/storybook-cmf/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/storybook-docs/.babelrc b/packages/storybook-docs/.babelrc index 02add252488..269d2ec2cfe 100644 --- a/packages/storybook-docs/.babelrc +++ b/packages/storybook-docs/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/storybook-one/.babelrc.json b/packages/storybook-one/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/storybook-one/.babelrc.json +++ b/packages/storybook-one/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/packages/storybook-one/.storybook/.babelrc.json b/packages/storybook-one/.storybook/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/packages/storybook-one/.storybook/.babelrc.json +++ b/packages/storybook-one/.storybook/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/tools/cmf-webpack-plugin/.babelrc.json b/tools/cmf-webpack-plugin/.babelrc.json index 1d6655372aa..abd323e11de 100644 --- a/tools/cmf-webpack-plugin/.babelrc.json +++ b/tools/cmf-webpack-plugin/.babelrc.json @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } diff --git a/tools/scripts-config-babel/CHANGELOG.md b/tools/scripts-config-babel/CHANGELOG.md index 14f9ae8a7f1..077f6dd3345 100644 --- a/tools/scripts-config-babel/CHANGELOG.md +++ b/tools/scripts-config-babel/CHANGELOG.md @@ -16,7 +16,7 @@ ```diff { - - "extends": "@talend/scripts-config-babel/.babelrc.json" + - "extends": "@talend/scripts-config-babel/babel.config.js" + "extends": "@talend/scripts-config-babel" } ``` diff --git a/tools/scripts-config-babel/babel-resolver.js b/tools/scripts-config-babel/babel-resolver.js index 5b81218fc3d..48aac5c187a 100644 --- a/tools/scripts-config-babel/babel-resolver.js +++ b/tools/scripts-config-babel/babel-resolver.js @@ -3,7 +3,7 @@ const fs = require('fs'); function checkBabelJsonExtension(babelConfigJsonPath) { const babelrc = JSON.parse(fs.readFileSync(babelConfigJsonPath, 'utf8')); - const babelrcExtends = '@talend/scripts-config-babel/.babelrc.json'; + const babelrcExtends = '@talend/scripts-config-babel/babel.config.js'; if (babelrc.extends !== babelrcExtends) { throw new Error(` You have your own babelrc. Please extends our babelrc: @@ -16,7 +16,7 @@ function getBabelConfigPath() { const userBabelrc = path.join(process.cwd(), '.babelrc'); const userBabelrcJson = path.join(process.cwd(), '.babelrc.json'); const userBabelJs = path.join(process.cwd(), 'babel.config.js'); - const defaultBabelrc = path.join(__dirname, '.babelrc.json'); + const defaultBabelrc = path.join(__dirname, 'babel.config.js'); if (fs.existsSync(userBabelrc)) { checkBabelJsonExtension(userBabelrc); diff --git a/tools/scripts-config-babel/test/nullish.test.js b/tools/scripts-config-babel/test/nullish.test.js index 4e494e3c8dc..0b9ab3f87c0 100644 --- a/tools/scripts-config-babel/test/nullish.test.js +++ b/tools/scripts-config-babel/test/nullish.test.js @@ -1,5 +1,5 @@ const babel = require('@babel/core'); -const options = require('../.babelrc.json'); +const options = require('../babel.config'); describe('@babel/plugin-syntax-nullish-coalescing-operator is installed', () => { it('should transpile nullish', () => { diff --git a/tools/scripts-config-react-webpack/config/inject.js b/tools/scripts-config-react-webpack/config/inject.js index a90a2bea503..7a0ef24e226 100644 --- a/tools/scripts-config-react-webpack/config/inject.js +++ b/tools/scripts-config-react-webpack/config/inject.js @@ -1,7 +1,7 @@ const babel = require('@babel/core'); const fs = require('fs'); const path = require('path'); -const defaultOptions = require('@talend/scripts-config-babel/.babelrc.json'); +const defaultOptions = require('@talend/scripts-config-babel/babel.config.js'); const { minify } = require('terser'); // terser.minify is an async function, we use deasync to make it used as synced function within webpack diff --git a/tools/scripts-core/src/scripts/build-lib.js b/tools/scripts-core/src/scripts/build-lib.js index 5c8f0dfbc09..63b4cb60aee 100755 --- a/tools/scripts-core/src/scripts/build-lib.js +++ b/tools/scripts-core/src/scripts/build-lib.js @@ -26,7 +26,7 @@ export default async function build(env, presetApi, unsafeOptions) { const tsRootPath = utils.path.getPkgRootPath('@talend/scripts-config-typescript'); const babelConfigPath = getUserConfigFile(['.babelrc', '.babelrc.json', 'babel.config.js']) || - path.join(babelRootPath, '.babelrc.json'); + path.join(babelRootPath, 'babel.config.js'); const tscConfigPath = getUserConfigFile(['tsconfig.build.json', 'tsconfig.json']) || path.join(tsRootPath, 'tsconfig.json'); diff --git a/tools/scripts-core/src/scripts/extends.js b/tools/scripts-core/src/scripts/extends.js index 896d7540ff5..62c4f0ec065 100755 --- a/tools/scripts-core/src/scripts/extends.js +++ b/tools/scripts-core/src/scripts/extends.js @@ -131,10 +131,10 @@ export default async function extend() { generateConfigFile({ configFileNames: ['.babelrc', '.babelrc.json', 'babel.config.js'], - defaultConfigFilePath: path.join(rootPath, '.babelrc.json'), + defaultConfigFilePath: path.join(rootPath, 'babel.config.js'), generateContent() { const configPath = utils.path.getPkgRootPath('@talend/scripts-config-babel'); - const presetConfigPath = path.join(configPath, '.babelrc.json'); + const presetConfigPath = path.join(configPath, 'babel.config.js'); const presetConfigRelativePath = path.relative(nodeModulesPath, presetConfigPath); return babelExtendsTemplate({ presetConfigRelativePath }); }, diff --git a/tools/scripts-utils/.babelrc b/tools/scripts-utils/.babelrc index 98e8b090bf7..0afcf4a38e6 100644 --- a/tools/scripts-utils/.babelrc +++ b/tools/scripts-utils/.babelrc @@ -1,3 +1,3 @@ { - "extends": "@talend/scripts-config-babel/.babelrc.json" + "extends": "@talend/scripts-config-babel/babel.config.js" } From b44a458288f20a3549ca8a7c14a8480c7bd7776a Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 11:29:46 +0200 Subject: [PATCH 09/29] try to fix babel for angularjs-annotate --- tools/scripts-config-babel/babel.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts-config-babel/babel.config.js b/tools/scripts-config-babel/babel.config.js index 34a55627570..cb50ab45d67 100644 --- a/tools/scripts-config-babel/babel.config.js +++ b/tools/scripts-config-babel/babel.config.js @@ -19,6 +19,6 @@ module.exports = { require.resolve('@babel/plugin-proposal-export-namespace-from'), require.resolve('@babel/plugin-transform-object-assign'), require.resolve('@babel/plugin-proposal-optional-chaining'), - ['angularjs-annotate', { explicitOnly: true }], + [require.resolve('babel-plugin-angularjs-annotate'), { explicitOnly: true }], ], }; From 7386c97ca71bd307cfc94d25ba085a1845a261bd Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 11:39:24 +0200 Subject: [PATCH 10/29] remove @types/enzyme, add @types/jest to flow-designer + more missign deps --- packages/components/package.json | 2 +- packages/dataviz/package.json | 1 - packages/flow-designer/package.json | 2 +- packages/storybook-docs/package.json | 5 +- pnpm-lock.yaml | 90 +++++++++++++++++++++------- 5 files changed, 74 insertions(+), 26 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index fd72b65e113..8c244bd7ae0 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -85,7 +85,7 @@ "@types/classnames": "^2.3.1", "@types/d3": "^7.4.0", "@types/date-fns": "^0.0.2", - "@types/enzyme": "^3.10.13", + "@types/jest": "^29.5.5", "@types/lodash": "^4.14.198", "@types/prop-types": "^15.7.5", "@types/react": "^17.0.65", diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json index 124d5156d2e..e5f7bd69b9d 100644 --- a/packages/dataviz/package.json +++ b/packages/dataviz/package.json @@ -65,7 +65,6 @@ "@testing-library/user-event": "^13.5.0", "@types/classnames": "^2.3.1", "@types/d3": "^7.4.0", - "@types/enzyme": "^3.10.13", "@types/geojson": "^7946.0.10", "@types/lodash": "^4.14.198", "@types/react": "^17.0.65", diff --git a/packages/flow-designer/package.json b/packages/flow-designer/package.json index a21326acb5d..cdddffd5840 100644 --- a/packages/flow-designer/package.json +++ b/packages/flow-designer/package.json @@ -25,8 +25,8 @@ "@talend/scripts-config-react-webpack": "^16.0.0", "@testing-library/react": "^12.1.5", "@types/d3": "^7.4.0", - "@types/enzyme": "^3.10.13", "@types/invariant": "^2.2.35", + "@types/jest": "^29.5.5", "@types/lodash": "^4.14.198", "@types/react": "^17.0.65", "@types/react-redux": "^7.1.26", diff --git a/packages/storybook-docs/package.json b/packages/storybook-docs/package.json index 6d15b240c37..023203b327b 100644 --- a/packages/storybook-docs/package.json +++ b/packages/storybook-docs/package.json @@ -27,6 +27,8 @@ "access": "public" }, "dependencies": { + "@algolia/autocomplete-js": "^1.9.4", + "@storybook/react": "^7.4.1", "@talend/design-tokens": "^2.9.0", "classnames": "^2.3.1", "figma-js": "^1.16.0", @@ -36,6 +38,7 @@ "@talend/scripts-core": "^15.0.0", "@talend/scripts-config-babel": "^13.0.0", "@talend/scripts-config-storybook-lib": "^5.0.0", - "@talend/scripts-config-typescript": "^11.1.0" + "@talend/scripts-config-typescript": "^11.1.0", + "@types/node": "^6.14.13" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7269432d5a7..850b1774ad5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -613,9 +613,9 @@ importers: '@types/date-fns': specifier: ^0.0.2 version: 0.0.2 - '@types/enzyme': - specifier: ^3.10.13 - version: 3.10.14 + '@types/jest': + specifier: ^29.5.5 + version: 29.5.5 '@types/lodash': specifier: ^4.14.198 version: 4.14.199 @@ -852,9 +852,6 @@ importers: '@types/d3': specifier: ^7.4.0 version: 7.4.1 - '@types/enzyme': - specifier: ^3.10.13 - version: 3.10.14 '@types/geojson': specifier: ^7946.0.10 version: 7946.0.11 @@ -1345,12 +1342,12 @@ importers: '@types/d3': specifier: ^7.4.0 version: 7.4.1 - '@types/enzyme': - specifier: ^3.10.13 - version: 3.10.14 '@types/invariant': specifier: ^2.2.35 version: 2.2.35 + '@types/jest': + specifier: ^29.5.5 + version: 29.5.5 '@types/lodash': specifier: ^4.14.198 version: 4.14.199 @@ -1933,6 +1930,12 @@ importers: packages/storybook-docs: dependencies: + '@algolia/autocomplete-js': + specifier: ^1.9.4 + version: 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3) + '@storybook/react': + specifier: ^7.4.1 + version: 7.4.6(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@talend/design-tokens': specifier: ^2.9.0 version: link:../design-tokens @@ -1958,6 +1961,9 @@ importers: '@talend/scripts-core': specifier: ^15.0.0 version: link:../../tools/scripts-core + '@types/node': + specifier: ^6.14.13 + version: 6.14.13 packages/storybook-one: dependencies: @@ -8642,12 +8648,6 @@ packages: resolution: {integrity: sha512-+ZvkforUDGqwU1npZYIMPuszsInIypxL81rFAsCGDs9CRhAEWO6s3rpO+TfJk9mgUgxKNMnSVQa/npPPD4gJXw==} dev: true - /@types/cheerio@0.22.32: - resolution: {integrity: sha512-4RrpCp5ufWTLb6/1RCOjazRhUM6DTD79l763det29n8kLmPB7XeN46cxlUf2GsSF+0g6CbWT5nYl8C/Gs15bdg==} - dependencies: - '@types/node': 6.14.13 - dev: true - /@types/classnames@2.3.1: resolution: {integrity: sha512-zeOWb0JGBoVmlQoznvqXbE0tEC/HONsnoUNH19Hc96NFsTAwTXbTqb8FMYkru1F/iqp7a18Ws3nWJvtA1sHD1A==} deprecated: This is a stub types definition. classnames provides its own type definitions, so you do not need this installed. @@ -8876,13 +8876,6 @@ packages: resolution: {integrity: sha512-Rk0HKcMXFUuqT32k1kXHZWgxiMvsyYsmlnjp0rLKa0MMoqXLE3T9dogDBTRfuc3SAsXu97KD3k4SKR1lHqd57w==} dev: false - /@types/enzyme@3.10.14: - resolution: {integrity: sha512-JeTG2MNUX1bH2DqccwUe3SuPoLu+kUz5UgR3Tvl9nBdfNj7rBZscytctSjEatd5Ul9GXXGKaQBaxODIgJYVRqA==} - dependencies: - '@types/cheerio': 0.22.32 - '@types/react': 17.0.68 - dev: true - /@types/escodegen@0.0.6: resolution: {integrity: sha512-AjwI4MvWx3HAOaZqYsjKWyEObT9lcVV0Y0V8nXo6cXzN8ZiMxVhf6F3d/UNvXVGKrEzL/Dluc5p+y9GkzlTWig==} @@ -10273,11 +10266,13 @@ packages: /arr-flatten@1.1.0: resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /arr-union@3.1.0: resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /array-buffer-byte-length@1.0.0: @@ -10440,6 +10435,7 @@ packages: /assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /ast-types-flow@0.0.7: @@ -10510,6 +10506,7 @@ packages: resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} engines: {node: '>= 4.5.0'} hasBin: true + requiresBuild: true dev: true /autoprefixer@10.4.16(postcss@8.4.31): @@ -10818,6 +10815,7 @@ packages: /base@0.11.2: resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: cache-base: 1.0.1 class-utils: 0.3.6 @@ -11271,6 +11269,7 @@ packages: /cache-base@1.0.1: resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: collection-visit: 1.0.0 component-emitter: 1.3.0 @@ -11537,6 +11536,7 @@ packages: /class-utils@0.3.6: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: arr-union: 3.1.0 define-property: 0.2.5 @@ -11714,6 +11714,7 @@ packages: /collection-visit@1.0.0: resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: map-visit: 1.0.0 object-visit: 1.0.1 @@ -11983,6 +11984,7 @@ packages: /copy-descriptor@0.1.1: resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /copy-to-clipboard@3.3.3: @@ -12943,6 +12945,7 @@ packages: /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} + requiresBuild: true dev: true /dedent@0.7.0: @@ -14622,6 +14625,7 @@ packages: /fill-range@4.0.0: resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: extend-shallow: 2.0.1 is-number: 3.0.0 @@ -14777,6 +14781,7 @@ packages: /for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /foreground-child@2.0.0: @@ -15148,6 +15153,7 @@ packages: /get-value@2.0.6: resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /getos@3.2.1: @@ -15444,6 +15450,7 @@ packages: /has-value@0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: get-value: 2.0.6 has-values: 0.1.4 @@ -15453,6 +15460,7 @@ packages: /has-value@1.0.0: resolution: {integrity: sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: get-value: 2.0.6 has-values: 1.0.0 @@ -15462,11 +15470,13 @@ packages: /has-values@0.1.4: resolution: {integrity: sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /has-values@1.0.0: resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-number: 3.0.0 kind-of: 4.0.0 @@ -16149,6 +16159,7 @@ packages: /is-accessor-descriptor@0.1.6: resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -16156,6 +16167,7 @@ packages: /is-accessor-descriptor@1.0.0: resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 6.0.3 dev: true @@ -16227,6 +16239,7 @@ packages: /is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + requiresBuild: true dev: true /is-buffer@2.0.5: @@ -16258,6 +16271,7 @@ packages: /is-data-descriptor@0.1.4: resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -16265,6 +16279,7 @@ packages: /is-data-descriptor@1.0.0: resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 6.0.3 dev: true @@ -16285,6 +16300,7 @@ packages: /is-descriptor@0.1.6: resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-accessor-descriptor: 0.1.6 is-data-descriptor: 0.1.4 @@ -16294,6 +16310,7 @@ packages: /is-descriptor@1.0.2: resolution: {integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-accessor-descriptor: 1.0.0 is-data-descriptor: 1.0.0 @@ -16314,11 +16331,13 @@ packages: /is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /is-extendable@1.0.1: resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-plain-object: 2.0.4 dev: true @@ -16441,6 +16460,7 @@ packages: /is-number@3.0.0: resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -16618,6 +16638,7 @@ packages: /isobject@2.1.0: resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: isarray: 1.0.0 dev: true @@ -17523,6 +17544,7 @@ packages: /kind-of@3.2.2: resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-buffer: 1.1.6 dev: true @@ -17530,6 +17552,7 @@ packages: /kind-of@4.0.0: resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-buffer: 1.1.6 dev: true @@ -17537,6 +17560,7 @@ packages: /kind-of@5.1.0: resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /kind-of@6.0.3: @@ -18035,6 +18059,7 @@ packages: /map-visit@1.0.0: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: object-visit: 1.0.1 dev: true @@ -18476,6 +18501,7 @@ packages: /mixin-deep@1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: for-in: 1.0.2 is-extendable: 1.0.1 @@ -18903,6 +18929,7 @@ packages: /object-copy@0.1.0: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: copy-descriptor: 0.1.1 define-property: 0.2.5 @@ -18931,6 +18958,7 @@ packages: /object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: isobject: 3.0.1 dev: true @@ -19292,6 +19320,7 @@ packages: /pascalcase@0.1.1: resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /path-browserify@0.0.1: @@ -21746,6 +21775,7 @@ packages: /repeat-element@1.1.4: resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /repeat-string@1.6.1: @@ -21837,6 +21867,7 @@ packages: /resolve-url@0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated + requiresBuild: true dev: true /resolve.exports@2.0.2: @@ -21888,6 +21919,7 @@ packages: /ret@0.1.15: resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} engines: {node: '>=0.12'} + requiresBuild: true dev: true /retry@0.12.0: @@ -22012,6 +22044,7 @@ packages: /safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} + requiresBuild: true dependencies: ret: 0.1.15 dev: true @@ -22323,6 +22356,7 @@ packages: /set-value@2.0.1: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: extend-shallow: 2.0.1 is-extendable: 0.1.1 @@ -22508,6 +22542,7 @@ packages: /snapdragon-node@2.1.1: resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: define-property: 1.0.0 isobject: 3.0.1 @@ -22517,6 +22552,7 @@ packages: /snapdragon-util@3.0.1: resolution: {integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -22641,6 +22677,7 @@ packages: /source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated + requiresBuild: true dependencies: atob: 2.1.2 decode-uri-component: 0.2.2 @@ -22664,6 +22701,7 @@ packages: /source-map-url@0.4.1: resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} deprecated: See https://github.com/lydell/source-map-url#deprecated + requiresBuild: true dev: true /source-map@0.5.6: @@ -22755,6 +22793,7 @@ packages: /split-string@3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: extend-shallow: 3.0.2 dev: true @@ -22834,6 +22873,7 @@ packages: /static-extend@0.1.2: resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: define-property: 0.2.5 object-copy: 0.1.0 @@ -23772,6 +23812,7 @@ packages: /to-object-path@0.3.0: resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -23779,6 +23820,7 @@ packages: /to-regex-range@2.1.1: resolution: {integrity: sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: is-number: 3.0.0 repeat-string: 1.6.1 @@ -24203,6 +24245,7 @@ packages: /union-value@1.0.1: resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: arr-union: 3.1.0 get-value: 2.0.6 @@ -24323,6 +24366,7 @@ packages: /unset-value@1.0.0: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: has-value: 0.3.1 isobject: 3.0.1 @@ -24357,6 +24401,7 @@ packages: /urix@0.1.0: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated + requiresBuild: true dev: true /url-join@4.0.1: @@ -24449,6 +24494,7 @@ packages: /use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} engines: {node: '>=0.10.0'} + requiresBuild: true dev: true /util-deprecate@1.0.2: From 4be00f4e8b93824f1e1940a6109b5e2308331983 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 12:19:22 +0200 Subject: [PATCH 11/29] add missing deps --- packages/flow-designer/package.json | 3 +++ packages/storybook-docs/package.json | 2 ++ pnpm-lock.yaml | 15 +++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/packages/flow-designer/package.json b/packages/flow-designer/package.json index cdddffd5840..72e5cddf1a3 100644 --- a/packages/flow-designer/package.json +++ b/packages/flow-designer/package.json @@ -24,10 +24,13 @@ "@talend/scripts-config-typescript": "^11.1.0", "@talend/scripts-config-react-webpack": "^16.0.0", "@testing-library/react": "^12.1.5", + "@testing-library/jest-dom": "^5.17.0", "@types/d3": "^7.4.0", "@types/invariant": "^2.2.35", "@types/jest": "^29.5.5", "@types/lodash": "^4.14.198", + "@types/node": "^6.14.13", + "@types/prop-types": "^15.7.5", "@types/react": "^17.0.65", "@types/react-redux": "^7.1.26", "@types/react-test-renderer": "^17.0.3", diff --git a/packages/storybook-docs/package.json b/packages/storybook-docs/package.json index 023203b327b..20faa30f12b 100644 --- a/packages/storybook-docs/package.json +++ b/packages/storybook-docs/package.json @@ -28,8 +28,10 @@ }, "dependencies": { "@algolia/autocomplete-js": "^1.9.4", + "@storybook/blocks": "^7.4.1", "@storybook/react": "^7.4.1", "@talend/design-tokens": "^2.9.0", + "algoliasearch": "^4.17.2", "classnames": "^2.3.1", "figma-js": "^1.16.0", "react": "^17.0.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 850b1774ad5..6d0cb4195bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1336,6 +1336,9 @@ importers: '@talend/scripts-core': specifier: ^15.0.0 version: link:../../tools/scripts-core + '@testing-library/jest-dom': + specifier: ^5.17.0 + version: 5.17.0 '@testing-library/react': specifier: ^12.1.5 version: 12.1.5(react-dom@17.0.2)(react@17.0.2) @@ -1351,6 +1354,12 @@ importers: '@types/lodash': specifier: ^4.14.198 version: 4.14.199 + '@types/node': + specifier: ^6.14.13 + version: 6.14.13 + '@types/prop-types': + specifier: ^15.7.5 + version: 15.7.8 '@types/react': specifier: ^17.0.2 version: 17.0.68 @@ -1933,12 +1942,18 @@ importers: '@algolia/autocomplete-js': specifier: ^1.9.4 version: 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3) + '@storybook/blocks': + specifier: ^7.4.1 + version: 7.4.6(@types/react-dom@17.0.21)(@types/react@17.0.68)(react-dom@17.0.2)(react@17.0.2) '@storybook/react': specifier: ^7.4.1 version: 7.4.6(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@talend/design-tokens': specifier: ^2.9.0 version: link:../design-tokens + algoliasearch: + specifier: ^4.17.2 + version: 4.20.0 classnames: specifier: ^2.3.1 version: 2.3.2 From 94d475c32cb6519d1b423962af722f58a1d5c7c7 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 12:58:11 +0200 Subject: [PATCH 12/29] fix flow-designer test --- .../flow-designer/src/components/node/AbstractNode.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flow-designer/src/components/node/AbstractNode.test.tsx b/packages/flow-designer/src/components/node/AbstractNode.test.tsx index 4be29513683..969e0233812 100644 --- a/packages/flow-designer/src/components/node/AbstractNode.test.tsx +++ b/packages/flow-designer/src/components/node/AbstractNode.test.tsx @@ -1,5 +1,5 @@ import { fireEvent, render, screen } from '@testing-library/react'; - +import '@testing-library/jest-dom'; import { NodeGraphicalAttributes, NodeRecord, From 577bd4ec85ddf983468c521b497ce5b374e86664 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 13:53:38 +0200 Subject: [PATCH 13/29] fix test-setup --- tools/scripts-config-jest/test-setup.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/scripts-config-jest/test-setup.js b/tools/scripts-config-jest/test-setup.js index d805d2d8a6f..1af50735b53 100644 --- a/tools/scripts-config-jest/test-setup.js +++ b/tools/scripts-config-jest/test-setup.js @@ -2,6 +2,7 @@ /* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable @typescript-eslint/no-var-requires */ require('@testing-library/jest-dom'); +require('@testing-library/jest-dom/extend-expect'); require('core-js/stable'); require('regenerator-runtime/runtime'); require('raf/polyfill'); From c13742695135008812d0b9abf9f465d1955e694d Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 14:01:16 +0200 Subject: [PATCH 14/29] add tsconfig.build.json to components and flow-designer --- packages/components/tsconfig.build.json | 4 ++++ packages/flow-designer/tsconfig.build.json | 4 ++++ 2 files changed, 8 insertions(+) create mode 100755 packages/components/tsconfig.build.json create mode 100755 packages/flow-designer/tsconfig.build.json diff --git a/packages/components/tsconfig.build.json b/packages/components/tsconfig.build.json new file mode 100755 index 00000000000..4ac5b26029c --- /dev/null +++ b/packages/components/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["src/**/*.test.*", "src/**/*.stories.*", "stories"] +} diff --git a/packages/flow-designer/tsconfig.build.json b/packages/flow-designer/tsconfig.build.json new file mode 100755 index 00000000000..4ac5b26029c --- /dev/null +++ b/packages/flow-designer/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["src/**/*.test.*", "src/**/*.stories.*", "stories"] +} From b2753228d3c48c970244a1f1e9e651aa0de8caa4 Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 14:06:29 +0200 Subject: [PATCH 15/29] fix components --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 8c244bd7ae0..009ae7f88fb 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -9,7 +9,7 @@ "build:prod": "talend-scripts build --umd --prod", "pre-release": "pnpm build:dev && pnpm build:prod", "build:lib": "talend-scripts build && pnpm run tsc", - "tsc": "tsc --emitDeclarationOnly --project ./tsconfig.json --outDir ./types", + "tsc": "tsc --emitDeclarationOnly --project ./tsconfig.build.json --outDir ./types", "test": "cross-env TZ=Europe/Paris talend-scripts test", "test:watch": "cross-env TZ=Europe/Paris talend-scripts test --watch", "test:cov": "cross-env TZ=Europe/Paris talend-scripts test --coverage", From 23cbf8f6ef2ebf0edae5349a67df8f2fad4e081d Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 14:11:58 +0200 Subject: [PATCH 16/29] fix package stepper --- packages/stepper/tsconfig.build.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 packages/stepper/tsconfig.build.json diff --git a/packages/stepper/tsconfig.build.json b/packages/stepper/tsconfig.build.json new file mode 100755 index 00000000000..4ac5b26029c --- /dev/null +++ b/packages/stepper/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["src/**/*.test.*", "src/**/*.stories.*", "stories"] +} From 87832baad9070d4b4c8c7ec09163417393b501da Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 14:48:32 +0200 Subject: [PATCH 17/29] fix jest mock --- pnpm-lock.yaml | 13 +++++++------ tools/scripts-config-jest/package.json | 8 +++++++- tools/scripts-config-jest/test-setup.js | 12 +++++++++--- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d0cb4195bb..d807d2207e0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2496,6 +2496,9 @@ importers: tools/scripts-config-jest: dependencies: + '@talend/design-system': + specifier: '*' + version: link:../../packages/design-system '@talend/scripts-config-babel': specifier: ^13.0.0 version: link:../scripts-config-babel @@ -10618,7 +10621,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(esbuild@0.18.20) dev: true /babel-loader@9.1.3(@babel/core@7.23.2)(webpack@5.88.2): @@ -12295,7 +12298,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 2.7.1 semver: 7.5.4 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(esbuild@0.18.20) /css-loader@6.8.1(webpack@5.88.2): resolution: {integrity: sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==} @@ -22129,7 +22132,7 @@ packages: optional: true dependencies: neo-async: 2.6.2 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(esbuild@0.18.20) /sass@1.69.3: resolution: {integrity: sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ==} @@ -23188,7 +23191,7 @@ packages: peerDependencies: webpack: ^5.0.0 dependencies: - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(esbuild@0.18.20) /style-search@0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} @@ -23687,7 +23690,6 @@ packages: serialize-javascript: 6.0.1 terser: 5.21.0 webpack: 5.88.2(esbuild@0.18.20) - dev: true /terser-webpack-plugin@5.3.9(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} @@ -25144,7 +25146,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: true /webpack@5.88.2(webpack-cli@4.10.0): resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} diff --git a/tools/scripts-config-jest/package.json b/tools/scripts-config-jest/package.json index e0d1444f4aa..450fef60913 100644 --- a/tools/scripts-config-jest/package.json +++ b/tools/scripts-config-jest/package.json @@ -18,7 +18,13 @@ "test": "jest" }, "peerDependencies": { - "react": ">= 16.14.0" + "react": ">= 16.14.0", + "@talend/design-system": "*" + }, + "peerDependenciesMeta": { + "@talend/design-system": { + "optional": true + } }, "dependencies": { "@talend/scripts-config-babel": "^13.0.0", diff --git a/tools/scripts-config-jest/test-setup.js b/tools/scripts-config-jest/test-setup.js index 1af50735b53..edc753be218 100644 --- a/tools/scripts-config-jest/test-setup.js +++ b/tools/scripts-config-jest/test-setup.js @@ -171,7 +171,9 @@ try { Array.isArray(children) ? renderNodes(children) : renderNodes([children]), }; }); -} catch (e) {} +} catch (e) { + console.warn('JEST MOCK ERROR: i18next not resolved'); +} try { jest.mock('@talend/design-system', () => { @@ -228,7 +230,9 @@ try { return mocks; }); -} catch {} +} catch { + console.warn('JEST MOCK ERROR: @talend/design-system not resolved'); +} try { // in the case we unmock design-system we don't want id to be random @@ -236,4 +240,6 @@ try { ...jest.requireActual('reakit/lib/Id/IdProvider'), unstable_IdContext: jest.requireActual('react').createContext(() => 'id-42'), })); -} catch {} +} catch { + console.warn('JEST MOCK ERROR: reakit/lib/Id/IdProvider not resolved'); +} From 08efdcf61b38c1cefc2bb3ae45610f942a4c3b2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Oct 2023 12:50:58 +0000 Subject: [PATCH 18/29] chore: pnpm-deduplicate --- pnpm-lock.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d807d2207e0..bdfd3ecac08 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10621,7 +10621,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.88.2(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) dev: true /babel-loader@9.1.3(@babel/core@7.23.2)(webpack@5.88.2): @@ -12298,7 +12298,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 2.7.1 semver: 7.5.4 - webpack: 5.88.2(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) /css-loader@6.8.1(webpack@5.88.2): resolution: {integrity: sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==} @@ -22132,7 +22132,7 @@ packages: optional: true dependencies: neo-async: 2.6.2 - webpack: 5.88.2(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) /sass@1.69.3: resolution: {integrity: sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ==} @@ -23191,7 +23191,7 @@ packages: peerDependencies: webpack: ^5.0.0 dependencies: - webpack: 5.88.2(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) /style-search@0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} @@ -23690,6 +23690,7 @@ packages: serialize-javascript: 6.0.1 terser: 5.21.0 webpack: 5.88.2(esbuild@0.18.20) + dev: true /terser-webpack-plugin@5.3.9(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} @@ -25146,6 +25147,7 @@ packages: - '@swc/core' - esbuild - uglify-js + dev: true /webpack@5.88.2(webpack-cli@4.10.0): resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} From 4c7f73dcc2fc46aab17d3be5376f0a07e4614dca Mon Sep 17 00:00:00 2001 From: smouillour Date: Fri, 13 Oct 2023 17:00:36 +0200 Subject: [PATCH 19/29] fix test in dynamic-cdn and scripts-core --- fork/dynamic-cdn-webpack-plugin/src/find.js | 12 ++++-------- pnpm-lock.yaml | 4 ---- tools/cmf-webpack-plugin/package.json | 2 +- tools/scripts-cmf/package.json | 5 +---- tools/scripts-config-react-webpack/package.json | 2 +- tools/scripts-core/__tests__/index.test.js | 8 ++++++-- tools/scripts-core/src/scripts/build-lib-umd.js | 1 - tools/scripts-core/src/scripts/build-lib.js | 9 +++++++-- tools/scripts-core/src/scripts/build.js | 2 -- tools/scripts-core/src/scripts/start.js | 1 - tools/scripts-core/src/scripts/test.js | 5 ++++- 11 files changed, 24 insertions(+), 27 deletions(-) diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.js b/fork/dynamic-cdn-webpack-plugin/src/find.js index 5abd520e4c6..8d66a8d6b41 100644 --- a/fork/dynamic-cdn-webpack-plugin/src/find.js +++ b/fork/dynamic-cdn-webpack-plugin/src/find.js @@ -22,7 +22,6 @@ function findPackage(info) { }); } let warnPNPMonce = true; -let pnpmMaxSubLevel = 0; function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { const isWantedScope = scopeFolderPath.endsWith(`${path.sep}${scope}`); @@ -39,11 +38,7 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { return accu.concat(subFolderPath); } - if ((isPNPMProcess && pnpmMaxSubLevel < 4) || !isPNPMProcess) { - if (isPNPMProcess) { - pnpmMaxSubLevel++; - console.warn('Executed with PNPM: !!'); - } + if (!isPNPMProcess) { // TODO NOT COMPATIBLE WITH PNPM // the scope or package name is not the one we look for // if there is a nested node modules folder, we dive into it for the search @@ -55,8 +50,9 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { } } else if (warnPNPMonce) { warnPNPMonce = false; - console.warn('Executed with PNPM: Not compatible with deep search of dependencies!!'); - console.warn('Executed with PNPM: Certainly due to circular dependencies'); + console.warn( + 'Executed with PNPM: Not compatible with deep search of dependencies (Certainly due to circular dependencies)!!', + ); } return accu; }, []); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bdfd3ecac08..a2c862cc12b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2369,10 +2369,6 @@ importers: mkdirp: specifier: ^1.0.4 version: 1.0.4 - devDependencies: - '@talend/scripts-core': - specifier: ^15.0.0 - version: link:../scripts-core tools/scripts-config-babel: dependencies: diff --git a/tools/cmf-webpack-plugin/package.json b/tools/cmf-webpack-plugin/package.json index ee630afbc58..e7d67868b24 100644 --- a/tools/cmf-webpack-plugin/package.json +++ b/tools/cmf-webpack-plugin/package.json @@ -4,7 +4,7 @@ "main": "src/index.js", "mainSrc": "src/index.js", "scripts": { - "lint": "talend-scripts lint", + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", "test": "echo nothing to test yet in @talend/react-cmf-webpack-plugin" }, "repository": { diff --git a/tools/scripts-cmf/package.json b/tools/scripts-cmf/package.json index a66c74234ef..70097bd6c22 100644 --- a/tools/scripts-cmf/package.json +++ b/tools/scripts-cmf/package.json @@ -10,7 +10,7 @@ "cmf-settings": "./cmf-settings.js" }, "scripts": { - "lint": "talend-scripts lint ./" + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0" }, "dependencies": { "i18next": "^20.6.1", @@ -19,9 +19,6 @@ "lodash": "^4.17.21", "mkdirp": "^1.0.4" }, - "devDependencies": { - "@talend/scripts-core": "^15.0.0" - }, "repository": { "type": "git", "url": "https://github.com/Talend/ui.git" diff --git a/tools/scripts-config-react-webpack/package.json b/tools/scripts-config-react-webpack/package.json index 20a164d4c5a..fd176f5c43c 100644 --- a/tools/scripts-config-react-webpack/package.json +++ b/tools/scripts-config-react-webpack/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint ./", + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", "test": "echo \"Nothing to test\"" }, "dependencies": { diff --git a/tools/scripts-core/__tests__/index.test.js b/tools/scripts-core/__tests__/index.test.js index b17fd25971b..799a80bda9b 100644 --- a/tools/scripts-core/__tests__/index.test.js +++ b/tools/scripts-core/__tests__/index.test.js @@ -7,7 +7,8 @@ const rimraf = require('rimraf'); const fixture = path.join(__dirname, 'fixture'); const bin = path.resolve(__dirname, '../src/index.js'); - +const isPNPMProcess = + process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('pnpm'); function getTmpDirectory(prefix) { const date = new Date(); const tmp = path.join( @@ -33,7 +34,10 @@ describe('talend-scripts', () => { expect(logs).toContain('Talend scripts mode : production'); expect(logs).toContain('Talend scripts configuration file found and loaded'); expect(logs).toContain('RUN ------------'); - expect(output.stderr.toString()).toBe(''); + const expectedConsole = isPNPMProcess + ? 'Executed with PNPM: Not compatible with deep search of dependencies (Certainly due to circular dependencies)!!' + : ''; + expect(output.stderr.toString()).toContain(expectedConsole); fs.existsSync(path.join(tmp, 'dist', 'TalendTestScriptsCore.min.js')); fs.existsSync(path.join(tmp, 'dist', 'TalendTestScriptsCore.min.js.dependencies.json')); fs.existsSync(path.join(tmp, 'dist', 'TalendTestScriptsCore.min.js.map')); diff --git a/tools/scripts-core/src/scripts/build-lib-umd.js b/tools/scripts-core/src/scripts/build-lib-umd.js index ac29be0bc60..313907152b7 100644 --- a/tools/scripts-core/src/scripts/build-lib-umd.js +++ b/tools/scripts-core/src/scripts/build-lib-umd.js @@ -13,7 +13,6 @@ async function buildUMD(env, presetApi, options = []) { } export default async function build(env, presetApi, options) { - utils.pkg.checkPackageIsInstalled('@talend/scripts-config-react-webpack'); const packageJSON = JSON.parse(fs.readFileSync(getUserConfigFile(['package.json']))); const UMDName = packageJSON.name .replace(/[^a-zA-Z0-9]/g, ' ') diff --git a/tools/scripts-core/src/scripts/build-lib.js b/tools/scripts-core/src/scripts/build-lib.js index 63b4cb60aee..87c534465da 100755 --- a/tools/scripts-core/src/scripts/build-lib.js +++ b/tools/scripts-core/src/scripts/build-lib.js @@ -2,6 +2,7 @@ import fs from 'fs'; import path from 'path'; import rimraf from 'rimraf'; +import { fileURLToPath } from 'url'; import cpx from 'cpx2'; import * as utils from '@talend/scripts-utils'; @@ -22,8 +23,12 @@ export default async function build(env, presetApi, unsafeOptions) { return true; }); - const babelRootPath = utils.path.getPkgRootPath('@talend/scripts-config-babel'); - const tsRootPath = utils.path.getPkgRootPath('@talend/scripts-config-typescript'); + const babelRootPath = path.dirname( + fileURLToPath(import.meta.resolve('@talend/scripts-config-babel')), + ); + const tsRootPath = path.dirname( + fileURLToPath(import.meta.resolve('@talend/scripts-config-typescript')), + ); const babelConfigPath = getUserConfigFile(['.babelrc', '.babelrc.json', 'babel.config.js']) || path.join(babelRootPath, 'babel.config.js'); diff --git a/tools/scripts-core/src/scripts/build.js b/tools/scripts-core/src/scripts/build.js index dae68614898..8ca8a516751 100755 --- a/tools/scripts-core/src/scripts/build.js +++ b/tools/scripts-core/src/scripts/build.js @@ -6,7 +6,6 @@ import buildUMD from './build-lib-umd.js'; export default async function build(env, _, options) { const packageType = utils.pkg.getPackageType(); if (packageType.isApp) { - utils.pkg.checkPackageIsInstalled('@talend/scripts-config-react-webpack'); const webpack = utils.path.resolveBin('webpack'); return utils.process.spawn( webpack, @@ -25,7 +24,6 @@ export default async function build(env, _, options) { if (packageType.isLib) { // detect UMD here if (options.includes('--umd')) { - utils.pkg.checkPackageIsInstalled('@talend/scripts-config-react-webpack'); return buildUMD( env, _, diff --git a/tools/scripts-core/src/scripts/start.js b/tools/scripts-core/src/scripts/start.js index e17d1e61d32..947f2a848d8 100755 --- a/tools/scripts-core/src/scripts/start.js +++ b/tools/scripts-core/src/scripts/start.js @@ -5,7 +5,6 @@ export default async function start(env, _, options) { const packageType = utils.pkg.getPackageType(); if (packageType.isApp) { - utils.pkg.checkPackageIsInstalled('@talend/scripts-config-react-webpack'); const webpack = utils.path.resolveBin('webpack'); return utils.process.spawn( webpack, diff --git a/tools/scripts-core/src/scripts/test.js b/tools/scripts-core/src/scripts/test.js index d98d56c66e6..c88772b4d66 100755 --- a/tools/scripts-core/src/scripts/test.js +++ b/tools/scripts-core/src/scripts/test.js @@ -1,4 +1,5 @@ import path from 'path'; +import { fileURLToPath } from 'url'; import * as utils from '@talend/scripts-utils'; import { getUserConfigFile } from '../utils/env.js'; @@ -18,7 +19,9 @@ export default async function test(env, presetApi, options) { if (packageType.isAngular) { return testKarma(env, presetApi, options); } - const configPath = utils.path.getPkgRootPath('@talend/scripts-config-jest'); + const configPath = path.dirname( + fileURLToPath(import.meta.resolve('@talend/scripts-config-jest')), + ); const jestConfigPath = getUserConfigFile('jest.config.js') || path.join(configPath, 'jest.config.js'); From 2d328e07488f7dd24a56658da312ddff233d21a8 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 19:42:21 +0200 Subject: [PATCH 20/29] Remove ref to icons in assets-api remove ref to config-jest in design-token --- fork/dynamic-cdn-webpack-plugin/package.json | 3 +- fork/dynamic-cdn-webpack-plugin/src/find.js | 31 ++- packages/assets-api/src/index.test.ts | 15 +- packages/components/package.json | 6 +- packages/design-tokens/jest.config.js | 3 - packages/design-tokens/package.json | 2 +- packages/faceted-search/package.json | 2 +- .../UIForm/fields/File/File.component.test.js | 8 +- .../ResourcePicker.component.test.js | 84 ++++---- pnpm-lock.yaml | 186 +++++++++--------- tools/scripts-config-cdn/cdn.js | 3 + tools/scripts-config-jest/package.json | 7 +- tools/scripts-core/__tests__/index.test.js | 8 +- 13 files changed, 165 insertions(+), 193 deletions(-) diff --git a/fork/dynamic-cdn-webpack-plugin/package.json b/fork/dynamic-cdn-webpack-plugin/package.json index f5e2b58e3d9..fc46aa2d5ab 100644 --- a/fork/dynamic-cdn-webpack-plugin/package.json +++ b/fork/dynamic-cdn-webpack-plugin/package.json @@ -38,7 +38,8 @@ "dependencies": { "@talend/module-to-cdn": "^9.9.1", "read-pkg-up": "^7.0.1", - "webpack-sources": "^3.2.3" + "webpack-sources": "^3.2.3", + "semver": "^7.5.4" }, "peerDependencies": { "webpack": "^5.88.2" diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.js b/fork/dynamic-cdn-webpack-plugin/src/find.js index 8d66a8d6b41..a8131b15ec4 100644 --- a/fork/dynamic-cdn-webpack-plugin/src/find.js +++ b/fork/dynamic-cdn-webpack-plugin/src/find.js @@ -9,6 +9,7 @@ function findPackage(info) { if (name.startsWith('@')) { [scope, name] = info.name.split('/'); } + // eslint-disable-next-line no-use-before-define return findPackages(scope, name).find(cwd => { const { packageJson: { version }, @@ -21,12 +22,9 @@ function findPackage(info) { return semver.satisfies(version, range); }); } -let warnPNPMonce = true; function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { const isWantedScope = scopeFolderPath.endsWith(`${path.sep}${scope}`); - const isPNPMProcess = - process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('pnpm'); return fs .readdirSync(scopeFolderPath, { withFileTypes: true }) .filter(f => f.isDirectory() || f.isSymbolicLink()) @@ -38,21 +36,12 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { return accu.concat(subFolderPath); } - if (!isPNPMProcess) { - // TODO NOT COMPATIBLE WITH PNPM - // the scope or package name is not the one we look for - // if there is a nested node modules folder, we dive into it for the search - const nestedNodeModulesPath = path.join(subFolderPath, 'node_modules'); - if (fs.existsSync(nestedNodeModulesPath)) { - return accu.concat( - findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, []), - ); - } - } else if (warnPNPMonce) { - warnPNPMonce = false; - console.warn( - 'Executed with PNPM: Not compatible with deep search of dependencies (Certainly due to circular dependencies)!!', - ); + // the scope or package name is not the one we look for + // if there is a nested node modules folder, we dive into it for the search + const nestedNodeModulesPath = path.join(subFolderPath, 'node_modules'); + if (fs.existsSync(nestedNodeModulesPath)) { + // eslint-disable-next-line no-use-before-define + return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, [])); } return accu; }, []); @@ -66,7 +55,11 @@ function findPackagesFromNonScopeFolder(scope, name, nonScopeFolderPath) { if (subFolder.name === '.bin') { return accu; } - if (subFolder.name.startsWith('@')) { + // TODO NOT COMPATIBLE WITH PNPM WHEN deps is @talend/scripts-... + if ( + subFolder.name.startsWith('@') && + !subFolder?.path?.endsWith('tools/scripts-core/node_modules') + ) { // for scope folders, we need a special treatment to avoid getting scoped packages when we don't want a scoped one. // ex: search for `classnames`, we don't want to find `@types/classnames` in the result return accu.concat( diff --git a/packages/assets-api/src/index.test.ts b/packages/assets-api/src/index.test.ts index a0757ff65a7..def049485c0 100644 --- a/packages/assets-api/src/index.test.ts +++ b/packages/assets-api/src/index.test.ts @@ -1,7 +1,6 @@ import readPackageUp from 'read-pkg-up'; import assetsApi, { Asset } from '.'; -const iconsInfo = readPackageUp.sync({ cwd: require.resolve('@talend/icons') }); const currentInfo = readPackageUp.sync({ cwd: __dirname }); const bundlePath = '/dist/svg-bundles/all.svg'; @@ -12,17 +11,15 @@ describe('assets-api', () => { }); it('should return unpkg url', () => { - const url = assetsApi.getURL(bundlePath, '@talend/icons', iconsInfo?.packageJson.version); - expect(url).toBe( - `https://unpkg.com/@talend/icons@${iconsInfo?.packageJson.version}${bundlePath}`, - ); + const url = assetsApi.getURL(bundlePath, '@talend/icons', '6.60.1'); + expect(url).toBe(`https://unpkg.com/@talend/icons@6.60.1${bundlePath}`); }); it('should return /cdn url', () => { const original = window.Talend.CDN_URL; window.Talend.CDN_URL = '/cdn'; - const url = assetsApi.getURL(bundlePath, '@talend/icons', iconsInfo?.packageJson.version); - expect(url).toBe(`/cdn/@talend/icons/${iconsInfo?.packageJson.version}${bundlePath}`); + const url = assetsApi.getURL(bundlePath, '@talend/icons', '6.60.1'); + expect(url).toBe(`/cdn/@talend/icons/6.60.1${bundlePath}`); window.Talend.CDN_URL = original; }); @@ -33,8 +30,8 @@ describe('assets-api', () => { getAttribute: jest.fn().mockReturnValueOnce('/'), } as unknown as Element; jest.spyOn(document, 'querySelector').mockImplementation(() => mockedBaseElement); - const url = assetsApi.getURL(bundlePath, '@talend/icons', iconsInfo?.packageJson.version); - expect(url).toBe(`/cdn/@talend/icons/${iconsInfo?.packageJson.version}${bundlePath}`); + const url = assetsApi.getURL(bundlePath, '@talend/icons', '6.60.1'); + expect(url).toBe(`/cdn/@talend/icons/6.60.1${bundlePath}`); window.Talend.CDN_URL = original; }); diff --git a/packages/components/package.json b/packages/components/package.json index 009ae7f88fb..81dde589667 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -37,8 +37,9 @@ "@talend/assets-api": "^1.2.2", "@talend/bootstrap-theme": "^8.2.0", "@talend/design-tokens": "^2.9.0", - "@talend/react-a11y": "^1.1.0", "@talend/icons": "^6.60.1", + "@talend/react-a11y": "^1.1.0", + "@talend/react-bootstrap": "^1.35.2", "@talend/utils": "^2.6.0", "ally.js": "^1.4.1", "classnames": "^2.3.2", @@ -52,7 +53,6 @@ "memoize-one": "^6.0.0", "rc-slider": "^10.2.1", "react-autowhatever": "10.2.0", - "@talend/react-bootstrap": "^1.35.2", "react-debounce-input": "^3.3.0", "react-draggable": "^4.4.5", "react-grid-layout": "^1.4.1", @@ -103,7 +103,7 @@ "react-test-renderer": "^17.0.2" }, "peerDependencies": { - "@talend/design-system": "^7.5.0", + "@talend/design-system": "^7.15.1", "i18next": "^20.1.0", "prop-types": "^15.5.10", "react": ">= 16.14.0", diff --git a/packages/design-tokens/jest.config.js b/packages/design-tokens/jest.config.js index b11b3a7a160..366917d2910 100644 --- a/packages/design-tokens/jest.config.js +++ b/packages/design-tokens/jest.config.js @@ -1,6 +1,3 @@ -const defaults = require('@talend/scripts-config-jest/jest.config.js'); - module.exports = { - ...defaults, testRegex: '(/__tests__/.*|src/|scripts/).*\\.test.(js|ts|tsx)$', }; diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index 57974bd901b..f479fcadadd 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -12,7 +12,7 @@ "build:lib": "talend-scripts build && pnpm build:umd:dev && pnpm build:umd:prod && pnpm test:umd", "test": "echo no test for @talend/design-tokens", "test:cov": "echo no test for @talend/design-tokens", - "test:umd": "talend-scripts test scripts/umd.test.js", + "test:umd": "jest scripts/umd.test.js", "lint": "talend-scripts lint" }, "keywords": [ diff --git a/packages/faceted-search/package.json b/packages/faceted-search/package.json index 72f9a40f547..a29fc467d47 100644 --- a/packages/faceted-search/package.json +++ b/packages/faceted-search/package.json @@ -67,7 +67,7 @@ "react-i18next": "^11.18.6" }, "peerDependencies": { - "@talend/design-system": "^7.5.1", + "@talend/design-system": "^7.15.1", "@talend/react-components": "^11.0.0", "i18next": "^20.6.1", "prop-types": "^15.5.10", diff --git a/packages/forms/src/UIForm/fields/File/File.component.test.js b/packages/forms/src/UIForm/fields/File/File.component.test.js index 87d035a66a0..61d8214e0ac 100644 --- a/packages/forms/src/UIForm/fields/File/File.component.test.js +++ b/packages/forms/src/UIForm/fields/File/File.component.test.js @@ -46,9 +46,11 @@ describe('File field', () => { ], }, }; + beforeEach(() => { jest.resetAllMocks(); }); + it('should render default File', () => { // when const { container } = render(); @@ -89,6 +91,7 @@ describe('File field', () => { it('should trigger onChange when user select file', async () => { // given // jest.useFakeTimers(); + const user = userEvent.setup({ delay: 10 }); render(); const testContent = { test: 'content' }; @@ -100,12 +103,13 @@ describe('File field', () => { // when const fileInput = document.querySelector('input[type="file"]'); - await userEvent.upload(fileInput, blob); + await user.upload(fileInput, blob); expect(props.onChange).toHaveBeenCalledWith(expect.anything(), { schema, value }); }); it('should trigger pre-signed url related onChange when user select file', async () => { // given + const user = userEvent.setup({ delay: 10 }); render(); const testContent = { test: 'content' }; const blob = new Blob([JSON.stringify(testContent, null, 2)], { @@ -115,7 +119,7 @@ describe('File field', () => { // when const fileInput = document.querySelector('input[type="file"]'); - await userEvent.upload(fileInput, blob); + await user.upload(fileInput, blob); expect(propsWithPresignedUrlTrigger.onTrigger).toHaveBeenCalledWith(expect.anything(), { schema: propsWithPresignedUrlTrigger.schema, diff --git a/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js b/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js index bf957c3ce6a..fe0d1c8be24 100644 --- a/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js +++ b/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js @@ -5,56 +5,50 @@ import userEvent from '@testing-library/user-event'; import ResourcePicker from './ResourcePicker.component'; -const ResourcePickerMock = - () => - ({ toolbar, onRowClick, isSelected, collection, ...props }) => ( -
-
-
- - toolbar.name.onChange(e)} - value={toolbar.name.value} - /> -
-
- - - -
-
- - - - - -
+const ResourcePickerMock = ({ toolbar, onRowClick, isSelected, collection, ...props }) => ( +
+
+
+ + toolbar.name.onChange(e)} + value={toolbar.name.value} + /> +
+
+ + + +
+
+ + + + +
- - - - {collection && ( - - )} - ResourcePicker
- ); + + + + {collection && ( + + )} + ResourcePicker +
+); jest.mock('ally.js'); jest.unmock('@talend/design-system'); -jest.mock('@talend/react-components/lib/ResourcePicker', ResourcePickerMock); +jest.mock('@talend/react-components/lib/ResourcePicker', () => ResourcePickerMock); describe('ResourcePicker field', () => { const collection = [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2c862cc12b..d8c43d16973 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,6 +74,9 @@ importers: read-pkg-up: specifier: ^7.0.1 version: 7.0.1 + semver: + specifier: ^7.5.4 + version: 7.5.4 webpack-sources: specifier: ^3.2.3 version: 3.2.3 @@ -887,7 +890,7 @@ importers: dependencies: '@algolia/autocomplete-js': specifier: ^1.9.4 - version: 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3) + version: 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0) '@storybook/blocks': specifier: ^7.4.1 version: 7.4.6(@types/react-dom@17.0.21)(@types/react@17.0.68)(react-dom@17.0.2)(react@17.0.2) @@ -960,7 +963,7 @@ importers: version: 1.0.3(css-loader@4.3.0)(sass-loader@13.3.2)(style-loader@3.3.3) '@storybook/react-webpack5': specifier: ^7.4.1 - version: 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.92)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + version: 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.93)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@storybook/testing-library': specifier: ^0.2.0 version: 0.2.2 @@ -1941,7 +1944,7 @@ importers: dependencies: '@algolia/autocomplete-js': specifier: ^1.9.4 - version: 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3) + version: 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0) '@storybook/blocks': specifier: ^7.4.1 version: 7.4.6(@types/react-dom@17.0.21)(@types/react@17.0.68)(react-dom@17.0.2)(react@17.0.2) @@ -2048,7 +2051,7 @@ importers: version: 1.0.3(css-loader@4.3.0)(sass-loader@13.3.2)(style-loader@3.3.3) '@storybook/react-webpack5': specifier: ^7.4.1 - version: 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.92)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + version: 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.93)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@storybook/testing-library': specifier: ^0.2.0 version: 0.2.2 @@ -2493,7 +2496,7 @@ importers: tools/scripts-config-jest: dependencies: '@talend/design-system': - specifier: '*' + specifier: ^7.15.1 version: link:../../packages/design-system '@talend/scripts-config-babel': specifier: ^13.0.0 @@ -2676,7 +2679,7 @@ importers: version: 7.4.6(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@storybook/react-webpack5': specifier: ^7.4.1 - version: 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.92)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + version: 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.93)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@storybook/testing-library': specifier: ^0.2.0 version: 0.2.2 @@ -2902,10 +2905,10 @@ packages: /@adobe/css-tools@4.3.1: resolution: {integrity: sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==} - /@algolia/autocomplete-core@1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3): + /@algolia/autocomplete-core@1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0): resolution: {integrity: sha512-C4ZaUbwNHOkbXM+vsUpx9AYhfLRCcku4tjn64Dr6/WjBhD1gv/WcI/GlvTc7QU53xPubNm8pfnfFAjRogEdnNQ==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3) + '@algolia/autocomplete-plugin-algolia-insights': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0) '@algolia/autocomplete-shared': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0) transitivePeerDependencies: - '@algolia/client-search' @@ -2913,13 +2916,13 @@ packages: - search-insights dev: false - /@algolia/autocomplete-js@1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3): + /@algolia/autocomplete-js@1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0): resolution: {integrity: sha512-Oqus5IAz/rGubXvUcGQyhSwFr/KmfHxrmw/u+3pqWWhgErRIF/LQmHO6/+Q4pu21EOAMdKw1p/gSel68e5AaCA==} peerDependencies: '@algolia/client-search': '>= 4.5.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/autocomplete-core': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3) + '@algolia/autocomplete-core': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0) '@algolia/autocomplete-preset-algolia': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0) '@algolia/autocomplete-shared': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0) '@algolia/client-search': 4.20.0 @@ -2930,13 +2933,13 @@ packages: - search-insights dev: false - /@algolia/autocomplete-plugin-algolia-insights@1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.8.3): + /@algolia/autocomplete-plugin-algolia-insights@1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0)(search-insights@2.9.0): resolution: {integrity: sha512-Ajaav4irJrbwLuQ0hYuaZlUH1pY7iobXSFfQsHFSQ+m2Q8r/h1GtkaiRCpcfnwO8CURdcD3RFMc0pClOPzmJeA==} peerDependencies: search-insights: '>= 1 < 3' dependencies: '@algolia/autocomplete-shared': 1.11.1(@algolia/client-search@4.20.0)(algoliasearch@4.20.0) - search-insights: 2.8.3 + search-insights: 2.9.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch @@ -3132,13 +3135,13 @@ packages: dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.13 - '@babel/generator': 7.23.0 + '@babel/generator': 7.17.7 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-module-transforms': 7.23.0(@babel/core@7.17.8) '@babel/helpers': 7.23.2 - '@babel/parser': 7.23.0 + '@babel/parser': 7.18.9 '@babel/template': 7.22.15 - '@babel/traverse': 7.23.2 + '@babel/traverse': 7.17.3 '@babel/types': 7.23.0 convert-source-map: 1.9.0 debug: 4.3.4(supports-color@8.1.1) @@ -4579,12 +4582,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.13 - '@babel/generator': 7.23.0 + '@babel/generator': 7.17.7 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.23.0 + '@babel/parser': 7.18.9 '@babel/types': 7.23.0 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 @@ -6010,7 +6013,7 @@ packages: react-refresh: 0.11.0 schema-utils: 3.3.0 source-map: 0.7.4 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /@polka/url@1.0.0-next.23: resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} @@ -7250,7 +7253,7 @@ packages: '@storybook/router': 7.4.6(react-dom@17.0.2)(react@17.0.2) '@storybook/store': 7.4.6 '@storybook/theming': 7.4.6(react-dom@17.0.2)(react@17.0.2) - '@swc/core': 1.3.92 + '@swc/core': 1.3.93 '@types/node': 16.18.58 '@types/semver': 7.5.3 babel-loader: 9.1.3(@babel/core@7.23.2)(webpack@5.88.2) @@ -7269,14 +7272,14 @@ packages: react-dom: 17.0.2(react@17.0.2) semver: 7.5.4 style-loader: 3.3.3(webpack@5.88.2) - swc-loader: 0.2.3(@swc/core@1.3.92)(webpack@5.88.2) - terser-webpack-plugin: 5.3.9(@swc/core@1.3.92)(esbuild@0.18.20)(webpack@5.88.2) + swc-loader: 0.2.3(@swc/core@1.3.93)(webpack@5.88.2) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.93)(esbuild@0.18.20)(webpack@5.88.2) ts-dedent: 2.2.0 typescript: 5.2.2 url: 0.11.3 util: 0.12.5 util-deprecate: 1.0.2 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) webpack-dev-middleware: 6.1.1(webpack@5.88.2) webpack-hot-middleware: 2.25.4 webpack-virtual-modules: 0.5.0 @@ -7808,7 +7811,7 @@ packages: /@storybook/postinstall@7.4.6: resolution: {integrity: sha512-TqI5BucPAGRWrkh55BYiG2/gHLFtC0In4cuu0GsUzB/1jc4i51npLRorCwhmT7r7YliGl5F7JaP0Bni/qHN3Lg==} - /@storybook/preset-react-webpack@7.4.6(@babel/core@7.23.2)(@swc/core@1.3.92)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@storybook/preset-react-webpack@7.4.6(@babel/core@7.23.2)(@swc/core@1.3.93)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-FfJvlk3bJfg66t06YLiyu+1o/DZN3uNfFP37zv5cJux7TpdmJRV/4m9LKQPJOvcnWBQYem8xX8k5cRS29vdW5g==} engines: {node: '>=16.0.0'} peerDependencies: @@ -7841,7 +7844,7 @@ packages: react-refresh: 0.11.0 semver: 7.5.4 typescript: 5.2.2 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) transitivePeerDependencies: - '@swc/core' - '@types/webpack' @@ -7928,7 +7931,7 @@ packages: react-docgen-typescript: 2.2.2(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) transitivePeerDependencies: - supports-color @@ -7941,7 +7944,7 @@ packages: react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - /@storybook/react-webpack5@7.4.6(@babel/core@7.23.2)(@swc/core@1.3.92)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): + /@storybook/react-webpack5@7.4.6(@babel/core@7.23.2)(@swc/core@1.3.93)(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2): resolution: {integrity: sha512-OSwf+E2tRcfBmzCH+WwM7JlfEYjg5Womi1yrtotfcjVXAU6ubHOk2G87zsrKLp/TeCOFM2aHohHBTyWUCejQKQ==} engines: {node: '>=16.0.0'} peerDependencies: @@ -7957,7 +7960,7 @@ packages: dependencies: '@babel/core': 7.23.2 '@storybook/builder-webpack5': 7.4.6(@types/react-dom@17.0.21)(@types/react@17.0.68)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) - '@storybook/preset-react-webpack': 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.92)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) + '@storybook/preset-react-webpack': 7.4.6(@babel/core@7.23.2)(@swc/core@1.3.93)(esbuild@0.18.20)(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@storybook/react': 7.4.6(react-dom@17.0.2)(react@17.0.2)(typescript@5.2.2) '@types/node': 16.18.58 react: 17.0.2 @@ -8307,88 +8310,88 @@ packages: - supports-color dev: true - /@swc/core-darwin-arm64@1.3.92: - resolution: {integrity: sha512-v7PqZUBtIF6Q5Cp48gqUiG8zQQnEICpnfNdoiY3xjQAglCGIQCjJIDjreZBoeZQZspB27lQN4eZ43CX18+2SnA==} + /@swc/core-darwin-arm64@1.3.93: + resolution: {integrity: sha512-gEKgk7FVIgltnIfDO6GntyuQBBlAYg5imHpRgLxB1zSI27ijVVkksc6QwISzFZAhKYaBWIsFSVeL9AYSziAF7A==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@swc/core-darwin-x64@1.3.92: - resolution: {integrity: sha512-Q3XIgQfXyxxxms3bPN+xGgvwk0TtG9l89IomApu+yTKzaIIlf051mS+lGngjnh9L0aUiCp6ICyjDLtutWP54fw==} + /@swc/core-darwin-x64@1.3.93: + resolution: {integrity: sha512-ZQPxm/fXdDQtn3yrYSL/gFfA8OfZ5jTi33yFQq6vcg/Y8talpZ+MgdSlYM0FkLrZdMTYYTNFiuBQuuvkA+av+Q==} engines: {node: '>=10'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.92: - resolution: {integrity: sha512-tnOCoCpNVXC+0FCfG84PBZJyLlz0Vfj9MQhyhCvlJz9hQmvpf8nTdKH7RHrOn8VfxtUBLdVi80dXgIFgbvl7qA==} + /@swc/core-linux-arm-gnueabihf@1.3.93: + resolution: {integrity: sha512-OYFMMI2yV+aNe3wMgYhODxHdqUB/jrK0SEMHHS44GZpk8MuBXEF+Mcz4qjkY5Q1EH7KVQqXb/gVWwdgTHpjM2A==} engines: {node: '>=10'} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@swc/core-linux-arm64-gnu@1.3.92: - resolution: {integrity: sha512-lFfGhX32w8h1j74Iyz0Wv7JByXIwX11OE9UxG+oT7lG0RyXkF4zKyxP8EoxfLrDXse4Oop434p95e3UNC3IfCw==} + /@swc/core-linux-arm64-gnu@1.3.93: + resolution: {integrity: sha512-BT4dT78odKnJMNiq5HdjBsv29CiIdcCcImAPxeFqAeFw1LL6gh9nzI8E96oWc+0lVT5lfhoesCk4Qm7J6bty8w==} engines: {node: '>=10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@swc/core-linux-arm64-musl@1.3.92: - resolution: {integrity: sha512-rOZtRcLj57MSAbiecMsqjzBcZDuaCZ8F6l6JDwGkQ7u1NYR57cqF0QDyU7RKS1Jq27Z/Vg21z5cwqoH5fLN+Sg==} + /@swc/core-linux-arm64-musl@1.3.93: + resolution: {integrity: sha512-yH5fWEl1bktouC0mhh0Chuxp7HEO4uCtS/ly1Vmf18gs6wZ8DOOkgAEVv2dNKIryy+Na++ljx4Ym7C8tSJTrLw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@swc/core-linux-x64-gnu@1.3.92: - resolution: {integrity: sha512-qptoMGnBL6v89x/Qpn+l1TH1Y0ed+v0qhNfAEVzZvCvzEMTFXphhlhYbDdpxbzRmCjH6GOGq7Y+xrWt9T1/ARg==} + /@swc/core-linux-x64-gnu@1.3.93: + resolution: {integrity: sha512-OFUdx64qvrGJhXKEyxosHxgoUVgba2ztYh7BnMiU5hP8lbI8G13W40J0SN3CmFQwPP30+3oEbW7LWzhKEaYjlg==} engines: {node: '>=10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@swc/core-linux-x64-musl@1.3.92: - resolution: {integrity: sha512-g2KrJ43bZkCZHH4zsIV5ErojuV1OIpUHaEyW1gf7JWKaFBpWYVyubzFPvPkjcxHGLbMsEzO7w/NVfxtGMlFH/Q==} + /@swc/core-linux-x64-musl@1.3.93: + resolution: {integrity: sha512-4B8lSRwEq1XYm6xhxHhvHmKAS7pUp1Q7E33NQ2TlmFhfKvCOh86qvThcjAOo57x8DRwmpvEVrqvpXtYagMN6Ig==} engines: {node: '>=10'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@swc/core-win32-arm64-msvc@1.3.92: - resolution: {integrity: sha512-3MCRGPAYDoQ8Yyd3WsCMc8eFSyKXY5kQLyg/R5zEqA0uthomo0m0F5/fxAJMZGaSdYkU1DgF73ctOWOf+Z/EzQ==} + /@swc/core-win32-arm64-msvc@1.3.93: + resolution: {integrity: sha512-BHShlxtkven8ZjjvZ5QR6sC5fZCJ9bMujEkiha6W4cBUTY7ce7qGFyHmQd+iPC85d9kD/0cCiX/Xez8u0BhO7w==} engines: {node: '>=10'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@swc/core-win32-ia32-msvc@1.3.92: - resolution: {integrity: sha512-zqTBKQhgfWm73SVGS8FKhFYDovyRl1f5dTX1IwSKynO0qHkRCqJwauFJv/yevkpJWsI2pFh03xsRs9HncTQKSA==} + /@swc/core-win32-ia32-msvc@1.3.93: + resolution: {integrity: sha512-nEwNWnz4JzYAK6asVvb92yeylfxMYih7eMQOnT7ZVlZN5ba9WF29xJ6kcQKs9HRH6MvWhz9+wRgv3FcjlU6HYA==} engines: {node: '>=10'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@swc/core-win32-x64-msvc@1.3.92: - resolution: {integrity: sha512-41bE66ddr9o/Fi1FBh0sHdaKdENPTuDpv1IFHxSg0dJyM/jX8LbkjnpdInYXHBxhcLVAPraVRrNsC4SaoPw2Pg==} + /@swc/core-win32-x64-msvc@1.3.93: + resolution: {integrity: sha512-jibQ0zUr4kwJaQVwgmH+svS04bYTPnPw/ZkNInzxS+wFAtzINBYcU8s2PMWbDb2NGYiRSEeoSGyAvS9H+24JFA==} engines: {node: '>=10'} cpu: [x64] os: [win32] requiresBuild: true optional: true - /@swc/core@1.3.92: - resolution: {integrity: sha512-vx0vUrf4YTEw59njOJ46Ha5i0cZTMYdRHQ7KXU29efN1MxcmJH2RajWLPlvQarOP1ab9iv9cApD7SMchDyx2vA==} + /@swc/core@1.3.93: + resolution: {integrity: sha512-690GRr1wUGmGYZHk7fUduX/JUwViMF2o74mnZYIWEcJaCcd9MQfkhsxPBtjeg6tF+h266/Cf3RPYhsFBzzxXcA==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -8400,16 +8403,16 @@ packages: '@swc/counter': 0.1.2 '@swc/types': 0.1.5 optionalDependencies: - '@swc/core-darwin-arm64': 1.3.92 - '@swc/core-darwin-x64': 1.3.92 - '@swc/core-linux-arm-gnueabihf': 1.3.92 - '@swc/core-linux-arm64-gnu': 1.3.92 - '@swc/core-linux-arm64-musl': 1.3.92 - '@swc/core-linux-x64-gnu': 1.3.92 - '@swc/core-linux-x64-musl': 1.3.92 - '@swc/core-win32-arm64-msvc': 1.3.92 - '@swc/core-win32-ia32-msvc': 1.3.92 - '@swc/core-win32-x64-msvc': 1.3.92 + '@swc/core-darwin-arm64': 1.3.93 + '@swc/core-darwin-x64': 1.3.93 + '@swc/core-linux-arm-gnueabihf': 1.3.93 + '@swc/core-linux-arm64-gnu': 1.3.93 + '@swc/core-linux-arm64-musl': 1.3.93 + '@swc/core-linux-x64-gnu': 1.3.93 + '@swc/core-linux-x64-musl': 1.3.93 + '@swc/core-win32-arm64-msvc': 1.3.93 + '@swc/core-win32-ia32-msvc': 1.3.93 + '@swc/core-win32-x64-msvc': 1.3.93 /@swc/counter@0.1.2: resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} @@ -10449,7 +10452,6 @@ packages: /assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} - requiresBuild: true dev: true /ast-types-flow@0.0.7: @@ -10617,7 +10619,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) dev: true /babel-loader@9.1.3(@babel/core@7.23.2)(webpack@5.88.2): @@ -11154,7 +11156,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001547 - electron-to-chromium: 1.4.552 + electron-to-chromium: 1.4.553 node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) @@ -11399,7 +11401,7 @@ packages: check-error: 1.0.3 deep-eql: 4.1.3 get-func-name: 2.0.2 - loupe: 2.3.6 + loupe: 2.3.7 pathval: 1.1.1 type-detect: 4.0.8 dev: true @@ -12294,7 +12296,7 @@ packages: postcss-value-parser: 4.2.0 schema-utils: 2.7.1 semver: 7.5.4 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /css-loader@6.8.1(webpack@5.88.2): resolution: {integrity: sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==} @@ -12310,7 +12312,7 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.31) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /css-minimizer-webpack-plugin@4.2.2(webpack@5.88.2): resolution: {integrity: sha512-s3Of/4jKfw1Hj9CxEO1E5oXhQAxlayuHO2y/ML+C6I9sQ7FdzfEV6QgMLN3vI+qFsjJGIAFLKtQK7t8BOXAIyA==} @@ -13047,8 +13049,8 @@ packages: dependencies: clone: 1.0.4 - /define-data-property@1.1.0: - resolution: {integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==} + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 @@ -13068,7 +13070,7 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.0 + define-data-property: 1.1.1 has-property-descriptors: 1.0.0 object-keys: 1.1.1 @@ -13430,8 +13432,8 @@ packages: jake: 10.8.7 dev: false - /electron-to-chromium@1.4.552: - resolution: {integrity: sha512-qMPzA5TEuOAbLFmbpNvO4qkBRe2B5dAxl6H4KxqRNy9cvBeHT2EyzecX0bumBfRhHN8cQJrx6NPd0AAoCCPKQw==} + /electron-to-chromium@1.4.553: + resolution: {integrity: sha512-HiRdtyKS2+VhiXvjhMvvxiMC33FJJqTA5EB2YHgFZW6v7HkK4Q9Ahv2V7O2ZPgAjw+MyCJVMQvigj13H8t+wvA==} /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} @@ -16173,7 +16175,6 @@ packages: /is-accessor-descriptor@0.1.6: resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -16181,7 +16182,6 @@ packages: /is-accessor-descriptor@1.0.0: resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: kind-of: 6.0.3 dev: true @@ -16285,7 +16285,6 @@ packages: /is-data-descriptor@0.1.4: resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: kind-of: 3.2.2 dev: true @@ -16293,7 +16292,6 @@ packages: /is-data-descriptor@1.0.0: resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: kind-of: 6.0.3 dev: true @@ -16314,7 +16312,6 @@ packages: /is-descriptor@0.1.6: resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: is-accessor-descriptor: 0.1.6 is-data-descriptor: 0.1.4 @@ -16324,7 +16321,6 @@ packages: /is-descriptor@1.0.2: resolution: {integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: is-accessor-descriptor: 1.0.0 is-data-descriptor: 1.0.0 @@ -16351,7 +16347,6 @@ packages: /is-extendable@1.0.1: resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: is-plain-object: 2.0.4 dev: true @@ -17558,7 +17553,6 @@ packages: /kind-of@3.2.2: resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} engines: {node: '>=0.10.0'} - requiresBuild: true dependencies: is-buffer: 1.1.6 dev: true @@ -17574,7 +17568,6 @@ packages: /kind-of@5.1.0: resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} engines: {node: '>=0.10.0'} - requiresBuild: true dev: true /kind-of@6.0.3: @@ -17951,8 +17944,8 @@ packages: dependencies: js-tokens: 4.0.0 - /loupe@2.3.6: - resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: get-func-name: 2.0.2 dev: true @@ -18861,6 +18854,7 @@ packages: /normalize-path@2.1.1: resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: remove-trailing-separator: 1.1.0 dev: true @@ -21933,7 +21927,6 @@ packages: /ret@0.1.15: resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} engines: {node: '>=0.12'} - requiresBuild: true dev: true /retry@0.12.0: @@ -22058,7 +22051,6 @@ packages: /safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} - requiresBuild: true dependencies: ret: 0.1.15 dev: true @@ -22128,7 +22120,7 @@ packages: optional: true dependencies: neo-async: 2.6.2 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /sass@1.69.3: resolution: {integrity: sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ==} @@ -22219,8 +22211,8 @@ packages: requiresBuild: true optional: true - /search-insights@2.8.3: - resolution: {integrity: sha512-W9rZfQ9XEfF0O6ntgQOTI7Txc8nkZrO4eJ/pTHK0Br6wWND2sPGPoWg+yGhdIW7wMbLqk8dc23IyEtLlNGpeNw==} + /search-insights@2.9.0: + resolution: {integrity: sha512-bkWW9nIHOFkLwjQ1xqVaMbjjO5vhP26ERsH9Y3pKr8imthofEFIxlnOabkmGcw6ksRj9jWidcI65vvjJH/nTGg==} dev: false /section-iterator@2.0.0: @@ -22359,7 +22351,7 @@ packages: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.0 + define-data-property: 1.1.1 functions-have-names: 1.2.3 has-property-descriptors: 1.0.0 @@ -23187,7 +23179,7 @@ packages: peerDependencies: webpack: ^5.0.0 dependencies: - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /style-search@0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} @@ -23469,14 +23461,14 @@ packages: resolution: {integrity: sha512-OIWR6bKzXvdXYyO4DK/UWa1VA1JeKq8E+0ug2DG98Y/vOmMpfZNj+TIG988HjfYSqtcy/hFOtZq/n/j5GSESNg==} dev: true - /swc-loader@0.2.3(@swc/core@1.3.92)(webpack@5.88.2): + /swc-loader@0.2.3(@swc/core@1.3.93)(webpack@5.88.2): resolution: {integrity: sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A==} peerDependencies: '@swc/core': ^1.2.147 webpack: '>=2' dependencies: - '@swc/core': 1.3.92 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + '@swc/core': 1.3.93 + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -23638,7 +23630,7 @@ packages: worker-farm: 1.7.0 dev: true - /terser-webpack-plugin@5.3.9(@swc/core@1.3.92)(esbuild@0.18.20)(webpack@5.88.2): + /terser-webpack-plugin@5.3.9(@swc/core@1.3.93)(esbuild@0.18.20)(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -23655,13 +23647,13 @@ packages: optional: true dependencies: '@jridgewell/trace-mapping': 0.3.19 - '@swc/core': 1.3.92 + '@swc/core': 1.3.93 esbuild: 0.18.20 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.21.0 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /terser-webpack-plugin@5.3.9(esbuild@0.18.20)(webpack@5.88.2): resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} @@ -24926,7 +24918,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.88.2(@swc/core@1.3.92)(esbuild@0.18.20) + webpack: 5.88.2(@swc/core@1.3.93)(esbuild@0.18.20) /webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.88.2): resolution: {integrity: sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==} @@ -25066,7 +25058,7 @@ packages: - supports-color dev: true - /webpack@5.88.2(@swc/core@1.3.92)(esbuild@0.18.20): + /webpack@5.88.2(@swc/core@1.3.93)(esbuild@0.18.20): resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -25097,7 +25089,7 @@ packages: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.9(@swc/core@1.3.92)(esbuild@0.18.20)(webpack@5.88.2) + terser-webpack-plugin: 5.3.9(@swc/core@1.3.93)(esbuild@0.18.20)(webpack@5.88.2) watchpack: 2.4.0 webpack-sources: 3.2.3 transitivePeerDependencies: diff --git a/tools/scripts-config-cdn/cdn.js b/tools/scripts-config-cdn/cdn.js index 05287c0a0a1..ab18a48bae0 100644 --- a/tools/scripts-config-cdn/cdn.js +++ b/tools/scripts-config-cdn/cdn.js @@ -169,6 +169,9 @@ function getModulesFromLockFile(dir) { const json = yaml.load(fs.readFileSync(lockTypeMap.pnpm.path, 'utf-8')); infos = Object.keys(json.packages) .map(moduleAndversion => { + if (moduleAndversion.startsWith('file:')) { + return null; + } const moduleName = getModuleName(moduleAndversion, true); return moduleToCdn(moduleName, getModuleVersion(moduleAndversion, true), { env: 'development', diff --git a/tools/scripts-config-jest/package.json b/tools/scripts-config-jest/package.json index 450fef60913..a0aa00b024a 100644 --- a/tools/scripts-config-jest/package.json +++ b/tools/scripts-config-jest/package.json @@ -19,12 +19,7 @@ }, "peerDependencies": { "react": ">= 16.14.0", - "@talend/design-system": "*" - }, - "peerDependenciesMeta": { - "@talend/design-system": { - "optional": true - } + "@talend/design-system": "^7.15.1" }, "dependencies": { "@talend/scripts-config-babel": "^13.0.0", diff --git a/tools/scripts-core/__tests__/index.test.js b/tools/scripts-core/__tests__/index.test.js index 799a80bda9b..ca6d3bb2a19 100644 --- a/tools/scripts-core/__tests__/index.test.js +++ b/tools/scripts-core/__tests__/index.test.js @@ -7,8 +7,7 @@ const rimraf = require('rimraf'); const fixture = path.join(__dirname, 'fixture'); const bin = path.resolve(__dirname, '../src/index.js'); -const isPNPMProcess = - process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('pnpm'); + function getTmpDirectory(prefix) { const date = new Date(); const tmp = path.join( @@ -34,10 +33,7 @@ describe('talend-scripts', () => { expect(logs).toContain('Talend scripts mode : production'); expect(logs).toContain('Talend scripts configuration file found and loaded'); expect(logs).toContain('RUN ------------'); - const expectedConsole = isPNPMProcess - ? 'Executed with PNPM: Not compatible with deep search of dependencies (Certainly due to circular dependencies)!!' - : ''; - expect(output.stderr.toString()).toContain(expectedConsole); + expect(output.stderr.toString()).toContain(''); fs.existsSync(path.join(tmp, 'dist', 'TalendTestScriptsCore.min.js')); fs.existsSync(path.join(tmp, 'dist', 'TalendTestScriptsCore.min.js.dependencies.json')); fs.existsSync(path.join(tmp, 'dist', 'TalendTestScriptsCore.min.js.map')); From 2f3ddd4a0d8b0f08d0c042f410807f6c2dac3b60 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Oct 2023 17:43:55 +0000 Subject: [PATCH 21/29] chore: pnpm-deduplicate --- pnpm-lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d8c43d16973..d2dfe63eb87 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3135,13 +3135,13 @@ packages: dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.22.13 - '@babel/generator': 7.17.7 + '@babel/generator': 7.23.0 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-module-transforms': 7.23.0(@babel/core@7.17.8) '@babel/helpers': 7.23.2 - '@babel/parser': 7.18.9 + '@babel/parser': 7.23.0 '@babel/template': 7.22.15 - '@babel/traverse': 7.17.3 + '@babel/traverse': 7.23.2 '@babel/types': 7.23.0 convert-source-map: 1.9.0 debug: 4.3.4(supports-color@8.1.1) @@ -4582,12 +4582,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.13 - '@babel/generator': 7.17.7 + '@babel/generator': 7.23.0 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.18.9 + '@babel/parser': 7.23.0 '@babel/types': 7.23.0 debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 From 11976b7796a8d9325eb739e22fe9d9d8b8f2a6f6 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 19:48:50 +0200 Subject: [PATCH 22/29] fix pnpm version --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bdf3276a909..84da5fa908c 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,11 @@ "start-forms": "pnpm --filter @talend/react-forms run start", "start-theme": "pnpm --filter @talend/bootstrap-theme run start", "changelog": "git log --pretty=\"format:%C(bold green)%ad%C(reset) %s\" --date=short --color", - "clean": "pnpm -r exec npx rimraf node_modules && npx rimraf node_modules", + "clean": "pnpm run clean:node_modules && pnpm run clean:dist && pnpm run clean:lib && pnpm run clean:cache ", "clean:dist": "pnpm -r exec npx rimraf dist && npx rimraf dist", "clean:lib": "pnpm -r exec npx rimraf lib && npx rimraf lib", "clean:cache": "pnpm store prune", + "clean:node_modules": "pnpm -r exec npx rimraf node_modules && npx rimraf node_modules", "prepare": "husky install", "preinstall": "npx only-allow pnpm" }, @@ -50,7 +51,7 @@ }, "version": "0.0.0", "private": true, - "packageManager": "pnpm@8.8.0", + "packageManager": "pnpm@8.9.2", "pnpm": { "overrides": { "@cypress/request@<=2.88.12": ">=3.0.0", From f7222f90ef6699a14e39980f1c783f4dd09c7724 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 19:54:14 +0200 Subject: [PATCH 23/29] fix design-tokens --- packages/design-tokens/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index f479fcadadd..5a8b2f9b028 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -39,6 +39,7 @@ "@talend/scripts-config-typescript": "^11.1.0", "@talend/babel-plugin-import-from-index": "^1.5.1", "@talend/babel-plugin-assets-api": "^1.1.0", + "jest": "^29.7.0", "typeface-source-sans-pro": "^1.1.13" }, "dependencies": {} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d2dfe63eb87..7dda895631e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1205,6 +1205,9 @@ importers: '@talend/scripts-core': specifier: ^15.0.0 version: link:../../tools/scripts-core + jest: + specifier: ^29.7.0 + version: 29.7.0 typeface-source-sans-pro: specifier: ^1.1.13 version: 1.1.13 From 44c2b3aaf2e2ccb52ca12605c935b80f9ff31a5a Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 21:29:59 +0200 Subject: [PATCH 24/29] stream tests --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 84da5fa908c..f8990d14cfa 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "lint-staged": "lint-staged", "lint": "pnpm -r --no-bail run lint", "lint-merge-report": "pnpm -r lint-merge-report", - "test": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent", - "test:update": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent -u", + "test": "cross-env TZ=Europe/Paris pnpm -r --no-bail --stream run test --silent", + "test:update": "cross-env TZ=Europe/Paris pnpm -r --no-bail --stream run test --silent -u", "test:cov": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test:cov", "test:demo": "pnpm -r --no-bail run test:demo", "test:cron": "pnpm -r --no-bail run test:cron", From 32b0ef372d8b0aa7df22b9117d2b28efc069d747 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 21:43:27 +0200 Subject: [PATCH 25/29] add missing jest + reduce usage of cache in GHA --- .github/actions/setup-node/action.yml | 23 +++++++++---------- pnpm-lock.yaml | 16 +++++++++++++ tools/babel-plugin-import-d3/package.json | 3 ++- .../babel-plugin-import-from-lib/package.json | 3 ++- tools/scripts-config-babel/package.json | 1 + tools/scripts-config-eslint/package.json | 3 +++ tools/scripts-utils/package.json | 5 ++-- 7 files changed, 38 insertions(+), 16 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index a9c0801fa43..ac66a90f521 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -10,7 +10,6 @@ runs: - uses: pnpm/action-setup@v2 with: version: 8 - - name: Set up Node.js uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d #v3.8.1 with: @@ -19,15 +18,15 @@ runs: scope: '@talend' cache: 'pnpm' - - name: Get pnpm cache directory path - id: pnpm-cache-dir-path - shell: bash - run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT + # - name: Get pnpm cache directory path + # id: pnpm-cache-dir-path + # shell: bash + # run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT - - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2 - id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm- + # - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2 + # id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) + # with: + # path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} + # key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + # restore-keys: | + # ${{ runner.os }}-pnpm- diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7dda895631e..979b210032f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2232,6 +2232,9 @@ importers: babel-plugin-tester: specifier: ^10.1.0 version: 10.1.0(@babel/core@7.23.2) + jest: + specifier: ^29.7.0 + version: 29.7.0 tools/babel-plugin-import-from-index: dependencies: @@ -2267,6 +2270,9 @@ importers: babel-plugin-tester: specifier: ^10.1.0 version: 10.1.0(@babel/core@7.23.2) + jest: + specifier: ^29.7.0 + version: 29.7.0 tools/cmf-webpack-plugin: dependencies: @@ -2420,6 +2426,9 @@ importers: babel-plugin-angularjs-annotate: specifier: ^0.10.0 version: 0.10.0 + jest: + specifier: ^29.7.0 + version: 29.7.0 tools/scripts-config-cdn: dependencies: @@ -2495,6 +2504,10 @@ importers: eslint-plugin-testing-library: specifier: ^5.11.1 version: 5.11.1(eslint@7.32.0)(typescript@5.2.2) + devDependencies: + jest: + specifier: ^29.7.0 + version: 29.7.0 tools/scripts-config-jest: dependencies: @@ -2873,6 +2886,9 @@ importers: '@talend/scripts-config-babel': specifier: ^13.0.0 version: link:../scripts-config-babel + jest: + specifier: ^29.7.0 + version: 29.7.0 tools/scripts-yarn-workspace: dependencies: diff --git a/tools/babel-plugin-import-d3/package.json b/tools/babel-plugin-import-d3/package.json index 71c7b2abe4a..b2136a33c7a 100644 --- a/tools/babel-plugin-import-d3/package.json +++ b/tools/babel-plugin-import-d3/package.json @@ -22,7 +22,8 @@ "@babel/core": "^7.23.2", "@babel/preset-env": "^7.22.20", "babel-jest": "^29.7.0", - "babel-plugin-tester": "^10.1.0" + "babel-plugin-tester": "^10.1.0", + "jest": "^29.7.0" }, "jest": { "transform": { diff --git a/tools/babel-plugin-import-from-lib/package.json b/tools/babel-plugin-import-from-lib/package.json index 3525144f52c..b608e911821 100644 --- a/tools/babel-plugin-import-from-lib/package.json +++ b/tools/babel-plugin-import-from-lib/package.json @@ -17,6 +17,7 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", - "babel-plugin-tester": "^10.1.0" + "babel-plugin-tester": "^10.1.0", + "jest": "^29.7.0" } } diff --git a/tools/scripts-config-babel/package.json b/tools/scripts-config-babel/package.json index 4766c3349c4..54325e1fe1b 100644 --- a/tools/scripts-config-babel/package.json +++ b/tools/scripts-config-babel/package.json @@ -30,6 +30,7 @@ "@babel/preset-typescript": "^7.22.15", "@talend/babel-plugin-assets-api": "^1.1.0", "@talend/babel-plugin-import-from-index": "^1.5.1", + "jest": "^29.7.0", "babel-core": "^7.0.0-bridge.0", "babel-plugin-angularjs-annotate": "^0.10.0" }, diff --git a/tools/scripts-config-eslint/package.json b/tools/scripts-config-eslint/package.json index 9081117c81d..1c117a2255e 100644 --- a/tools/scripts-config-eslint/package.json +++ b/tools/scripts-config-eslint/package.json @@ -37,6 +37,9 @@ "eslint-plugin-storybook": "^0.5.13", "eslint-plugin-testing-library": "^5.11.1" }, + "devDependencies": { + "jest": "^29.7.0" + }, "publishConfig": { "access": "public" } diff --git a/tools/scripts-utils/package.json b/tools/scripts-utils/package.json index b1f073afaf8..0e0cb50ad04 100644 --- a/tools/scripts-utils/package.json +++ b/tools/scripts-utils/package.json @@ -12,8 +12,9 @@ "glob": "^8.1.0", "which": "^2.0.2" }, - "devDependencies":{ - "@talend/scripts-config-babel": "^13.0.0" + "devDependencies": { + "@talend/scripts-config-babel": "^13.0.0", + "jest": "^29.7.0" }, "repository": { "type": "git", From cb20ef21b550a56b5dec86614605f63eaa713350 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 22:25:32 +0200 Subject: [PATCH 26/29] remove stream and --frozen-lockfile for test --- .github/workflows/pr-test.yml | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 7a5e44cd55a..b3ccce4898e 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -27,7 +27,7 @@ jobs: uses: ./.github/actions/setup-node - name: Install - run: pnpm install --frozen-lockfile + run: pnpm install - name: Test run: pnpm run test --coverage --coverageReporters json-summary diff --git a/package.json b/package.json index f8990d14cfa..84da5fa908c 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "lint-staged": "lint-staged", "lint": "pnpm -r --no-bail run lint", "lint-merge-report": "pnpm -r lint-merge-report", - "test": "cross-env TZ=Europe/Paris pnpm -r --no-bail --stream run test --silent", - "test:update": "cross-env TZ=Europe/Paris pnpm -r --no-bail --stream run test --silent -u", + "test": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent", + "test:update": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent -u", "test:cov": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test:cov", "test:demo": "pnpm -r --no-bail run test:demo", "test:cron": "pnpm -r --no-bail run test:cron", From 82c175921be51a18cd75fd92b27d0410ecfcfdd0 Mon Sep 17 00:00:00 2001 From: smouillour Date: Mon, 16 Oct 2023 22:28:40 +0200 Subject: [PATCH 27/29] add console.log --- fork/dynamic-cdn-webpack-plugin/src/find.test.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.test.js b/fork/dynamic-cdn-webpack-plugin/src/find.test.js index 0d72fb96ba5..b549b2afec4 100644 --- a/fork/dynamic-cdn-webpack-plugin/src/find.test.js +++ b/fork/dynamic-cdn-webpack-plugin/src/find.test.js @@ -17,12 +17,9 @@ describe('findPackages', () => { '/node_modules/react/index.js': 'console.log("react");', '/node_modules/react/package.json': '{"name": "react", "version": "16.14.0"}', '/node_modules/@types/classnames/index.js': 'console.log("@types/classnames");', - '/node_modules/@talend/react-components/index.js': - 'console.log("@talend/react-components");', - '/node_modules/@talend/react-components/node_modules/react/index.js': - 'console.log("react");', - '/node_modules/@talend/react-containers/index.js': - 'console.log("@talend/react-containers");', + '/node_modules/@talend/react-components/index.js': 'console.log("@talend/react-components");', + '/node_modules/@talend/react-components/node_modules/react/index.js': 'console.log("react");', + '/node_modules/@talend/react-containers/index.js': 'console.log("@talend/react-containers");', }; beforeEach(() => { @@ -30,11 +27,12 @@ describe('findPackages', () => { require('fs').__setMockFiles(MOCK_FILE_INFO); }); - test('should find root and nested package', () => { + test.only('should find root and nested package', () => { // when const result = findPackages(undefined, 'react'); // then + console.log('LIST OF RESULT: ', result); expect(result.length).toBe(2); expect(result[0]).toBe('/node_modules/react'); expect(result[1]).toBe('/node_modules/@talend/react-components/node_modules/react'); From 22b9fb8e97e0533bab4a9c63ab26c40c4d0eecc5 Mon Sep 17 00:00:00 2001 From: smouillour Date: Tue, 17 Oct 2023 12:02:18 +0200 Subject: [PATCH 28/29] try to fix test in dynamic-cdn-webpack-plugin --- .github/workflows/README.md | 13 +++++++++++++ .github/workflows/pr-test.yml | 2 +- fork/dynamic-cdn-webpack-plugin/package.json | 4 ++-- fork/dynamic-cdn-webpack-plugin/src/find.js | 12 ++++++------ package.json | 2 +- packages/a11y/package.json | 1 + packages/dataviz/package.json | 1 + pnpm-lock.yaml | 13 +++++++++++++ 8 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 00000000000..a77fb649ca6 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,13 @@ +# How to run github action locally + +Use the cli ACT: https://github.com/nektos/act + +# How to run PR-TEST + +```bash +act pull_request -j build -W .github/workflows/pr-test.yml +``` + +```bash +act --container-architecture linux/amd64 pull_request -j build -W .github/workflows/pr-test.yml +``` diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index b3ccce4898e..7a5e44cd55a 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -27,7 +27,7 @@ jobs: uses: ./.github/actions/setup-node - name: Install - run: pnpm install + run: pnpm install --frozen-lockfile - name: Test run: pnpm run test --coverage --coverageReporters json-summary diff --git a/fork/dynamic-cdn-webpack-plugin/package.json b/fork/dynamic-cdn-webpack-plugin/package.json index fc46aa2d5ab..3c6ee703798 100644 --- a/fork/dynamic-cdn-webpack-plugin/package.json +++ b/fork/dynamic-cdn-webpack-plugin/package.json @@ -38,8 +38,8 @@ "dependencies": { "@talend/module-to-cdn": "^9.9.1", "read-pkg-up": "^7.0.1", - "webpack-sources": "^3.2.3", - "semver": "^7.5.4" + "semver": "^7.5.4", + "webpack-sources": "^3.2.3" }, "peerDependencies": { "webpack": "^5.88.2" diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.js b/fork/dynamic-cdn-webpack-plugin/src/find.js index a8131b15ec4..50a10ea4679 100644 --- a/fork/dynamic-cdn-webpack-plugin/src/find.js +++ b/fork/dynamic-cdn-webpack-plugin/src/find.js @@ -39,7 +39,7 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { // the scope or package name is not the one we look for // if there is a nested node modules folder, we dive into it for the search const nestedNodeModulesPath = path.join(subFolderPath, 'node_modules'); - if (fs.existsSync(nestedNodeModulesPath)) { + if (fs.existsSync(nestedNodeModulesPath) && !subFolderPath.endsWith('tools/scripts-core')) { // eslint-disable-next-line no-use-before-define return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, [])); } @@ -56,10 +56,7 @@ function findPackagesFromNonScopeFolder(scope, name, nonScopeFolderPath) { return accu; } // TODO NOT COMPATIBLE WITH PNPM WHEN deps is @talend/scripts-... - if ( - subFolder.name.startsWith('@') && - !subFolder?.path?.endsWith('tools/scripts-core/node_modules') - ) { + if (subFolder.name.startsWith('@')) { // for scope folders, we need a special treatment to avoid getting scoped packages when we don't want a scoped one. // ex: search for `classnames`, we don't want to find `@types/classnames` in the result return accu.concat( @@ -83,7 +80,10 @@ function findPackages(scope, name, buff = []) { if (roots === null) { return buff; } - return buff.concat(...roots.map(root => findPackagesFromNonScopeFolder(scope, name, root))); + const result = buff.concat( + ...roots.map(root => findPackagesFromNonScopeFolder(scope, name, root)), + ); + return [...new Set(result)]; } module.exports = { diff --git a/package.json b/package.json index 84da5fa908c..05f181efecb 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "lint-staged": "lint-staged", "lint": "pnpm -r --no-bail run lint", "lint-merge-report": "pnpm -r lint-merge-report", - "test": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent", + "test": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test", "test:update": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test --silent -u", "test:cov": "cross-env TZ=Europe/Paris pnpm -r --no-bail run test:cov", "test:demo": "pnpm -r --no-bail run test:demo", diff --git a/packages/a11y/package.json b/packages/a11y/package.json index c0abe97b3ae..d3ad9bba549 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -33,6 +33,7 @@ "@talend/scripts-config-typescript": "^11.1.0", "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^13.5.0", + "@types/jest": "^29.5.5", "react": "^17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json index e5f7bd69b9d..540efb46948 100644 --- a/packages/dataviz/package.json +++ b/packages/dataviz/package.json @@ -65,6 +65,7 @@ "@testing-library/user-event": "^13.5.0", "@types/classnames": "^2.3.1", "@types/d3": "^7.4.0", + "@types/cypress": "^1.1.3", "@types/geojson": "^7946.0.10", "@types/lodash": "^4.14.198", "@types/react": "^17.0.65", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 979b210032f..6e230e5b6e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,6 +231,9 @@ importers: '@testing-library/user-event': specifier: ^13.5.0 version: 13.5.0(@testing-library/dom@9.3.3) + '@types/jest': + specifier: ^29.5.5 + version: 29.5.5 react: specifier: ^17.0.2 version: 17.0.2 @@ -852,6 +855,9 @@ importers: '@types/classnames': specifier: ^2.3.1 version: 2.3.1 + '@types/cypress': + specifier: ^1.1.3 + version: 1.1.3 '@types/d3': specifier: ^7.4.0 version: 7.4.1 @@ -8717,6 +8723,13 @@ packages: '@types/node': 6.14.13 dev: false + /@types/cypress@1.1.3: + resolution: {integrity: sha512-OXe0Gw8LeCflkG1oPgFpyrYWJmEKqYncBsD/J0r17r0ETx/TnIGDNLwXt/pFYSYuYTpzcq1q3g62M9DrfsBL4g==} + deprecated: This is a stub types definition for cypress (https://cypress.io). cypress provides its own type definitions, so you don't need @types/cypress installed! + dependencies: + cypress: 12.17.4 + dev: true + /@types/d3-array@3.0.8: resolution: {integrity: sha512-2xAVyAUgaXHX9fubjcCbGAUOqYfRJN1em1EKR2HfzWBpObZhwfnZKvofTN4TplMqJdFQao61I+NVSai/vnBvDQ==} From 4e86c129eb0668adf8b8d030f945daa112272d4d Mon Sep 17 00:00:00 2001 From: smouillour Date: Tue, 17 Oct 2023 13:50:59 +0200 Subject: [PATCH 29/29] revert change in dynamic-cdn-plugin --- fork/dynamic-cdn-webpack-plugin/src/find.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.js b/fork/dynamic-cdn-webpack-plugin/src/find.js index 50a10ea4679..6a6d731507f 100644 --- a/fork/dynamic-cdn-webpack-plugin/src/find.js +++ b/fork/dynamic-cdn-webpack-plugin/src/find.js @@ -39,7 +39,7 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { // the scope or package name is not the one we look for // if there is a nested node modules folder, we dive into it for the search const nestedNodeModulesPath = path.join(subFolderPath, 'node_modules'); - if (fs.existsSync(nestedNodeModulesPath) && !subFolderPath.endsWith('tools/scripts-core')) { + if (fs.existsSync(nestedNodeModulesPath)) { // eslint-disable-next-line no-use-before-define return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, [])); } @@ -56,7 +56,10 @@ function findPackagesFromNonScopeFolder(scope, name, nonScopeFolderPath) { return accu; } // TODO NOT COMPATIBLE WITH PNPM WHEN deps is @talend/scripts-... - if (subFolder.name.startsWith('@')) { + if ( + subFolder.name.startsWith('@') && + !subFolder?.path?.endsWith('tools/scripts-core/node_modules') + ) { // for scope folders, we need a special treatment to avoid getting scoped packages when we don't want a scoped one. // ex: search for `classnames`, we don't want to find `@types/classnames` in the result return accu.concat(