diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.js b/fork/dynamic-cdn-webpack-plugin/src/find.js index 2d8cfed60d8..f9ce160e4cf 100644 --- a/fork/dynamic-cdn-webpack-plugin/src/find.js +++ b/fork/dynamic-cdn-webpack-plugin/src/find.js @@ -34,13 +34,13 @@ function findPackagesFromScopeFolder(scope, name, scopeFolderPath) { // just add the path to the found list return accu.concat(subFolderPath); } + // 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, []), - ); + // eslint-disable-next-line no-use-before-define + return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath, [])); } return accu; }, []); @@ -58,25 +58,15 @@ function findPackagesFromNonScopeFolder(scope, name, nonScopeFolderPath) { // 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( - findPackagesFromScopeFolder( - scope, - name, - path.join(nonScopeFolderPath, subFolder.name), - ), + findPackagesFromScopeFolder(scope, name, path.join(nonScopeFolderPath, subFolder.name)), ); } else if (!scope && subFolder.name === name) { // we want a NON scoped package, we are in a non scoped folder, and the names match return accu.concat(path.join(nonScopeFolderPath, subFolder.name)); } - const nestedNodeModulesPath = path.join( - nonScopeFolderPath, - subFolder.name, - 'node_modules', - ); + const nestedNodeModulesPath = path.join(nonScopeFolderPath, subFolder.name, 'node_modules'); if (fs.existsSync(nestedNodeModulesPath)) { - return accu.concat( - findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath), - ); + return accu.concat(findPackagesFromNonScopeFolder(scope, name, nestedNodeModulesPath)); } return accu; }, []); diff --git a/fork/dynamic-cdn-webpack-plugin/src/find.test.js b/fork/dynamic-cdn-webpack-plugin/src/find.test.js index 0d72fb96ba5..c2c016f6b92 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(() => { @@ -35,9 +32,8 @@ describe('findPackages', () => { const result = findPackages(undefined, 'react'); // then - expect(result.length).toBe(2); + expect(result.length).toBe(1); expect(result[0]).toBe('/node_modules/react'); - expect(result[1]).toBe('/node_modules/@talend/react-components/node_modules/react'); }); test('should find non scoped package', () => { diff --git a/fork/module-to-cdn/.babelrc b/fork/module-to-cdn/.babelrc index f9b18b310b2..0967ef424bc 100644 --- a/fork/module-to-cdn/.babelrc +++ b/fork/module-to-cdn/.babelrc @@ -1,3 +1 @@ -{ - "extends": "../../node_modules/@talend/scripts-config-babel/.babelrc.json" -} +{} diff --git a/fork/module-to-cdn/.eslintrc.json b/fork/module-to-cdn/.eslintrc.json index 8464e11418a..c987ae81696 100644 --- a/fork/module-to-cdn/.eslintrc.json +++ b/fork/module-to-cdn/.eslintrc.json @@ -1,4 +1,3 @@ { - "root": true, - "extends": "@talend" + "root": true } diff --git a/fork/module-to-cdn/package.json b/fork/module-to-cdn/package.json index aedb3494834..90f93841775 100644 --- a/fork/module-to-cdn/package.json +++ b/fork/module-to-cdn/package.json @@ -20,7 +20,7 @@ "scripts": { "test": "jest index.test.js", "test:cron": "jest modules.test.js", - "lint": "talend-scripts lint ./" + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0" }, "files": [ "index.js", diff --git a/fork/react-bootstrap/package.json b/fork/react-bootstrap/package.json index 58251d37179..c808fa0f7ca 100644 --- a/fork/react-bootstrap/package.json +++ b/fork/react-bootstrap/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^13.5.0", diff --git a/package.json b/package.json index 0371955373a..cc2f3eba8f4 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,4 @@ { - "devDependencies": { - "@changesets/cli": "^2.26.2", - "cross-env": "^7.0.3", - "cross-spawn": "^7.0.3", - "eslint": "^7.32.0", - "husky": "^8.0.3", - "i18next-scanner": "^4.4.0", - "lint-staged": "^13.3.0", - "prettier": "^2.8.8" - }, "scripts": { "postinstall": "talend-yarn-workspace run build:lib", "pre-release": "talend-yarn-workspace run pre-release", @@ -57,9 +47,19 @@ "prettier --write" ] }, - "dependencies": { + "devDependencies": { + "@changesets/cli": "^2.26.2", + "@talend/scripts-config-prettier": "^12.0.0", "@types/react": "^17.0.2", "@types/react-dom": "^17.0.20", + "cross-env": "^7.0.3", + "cross-spawn": "^7.0.3", + "eslint": "^7.32.0", + "husky": "^8.0.3", + "i18next-scanner": "^4.4.0", + "lint-staged": "^13.3.0", + "prettier": "^3.0.3", + "rimraf": "^3.0.2", "terser-webpack-plugin": "^5.3.9", "typescript": "^5.0.4", "webpack": "^5.73.0" diff --git a/packages/a11y/package.json b/packages/a11y/package.json index b87ccbcef4b..9d4bddaa682 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -30,6 +30,8 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", + "@talend/scripts-config-prettier": "^12.0.0", + "@talend/scripts-config-typescript": "^11.1.0", "@testing-library/react": "^12.1.5", "react": "^17.0.2", "react-dom": "^17.0.2" diff --git a/packages/assets-api/package.json b/packages/assets-api/package.json index a80b5f1e44a..6da15081642 100644 --- a/packages/assets-api/package.json +++ b/packages/assets-api/package.json @@ -28,8 +28,12 @@ }, "dependencies": {}, "devDependencies": { + "@talend/babel-plugin-import-from-index": "^1.5.1", + "@talend/icons": "^6.60.1", "@talend/scripts-core": "^15.0.0", + "@talend/scripts-config-babel": "^13.0.0", "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-typescript": "^11.1.0", "read-pkg-up": "^7.0.1" }, "publishConfig": { diff --git a/packages/assets-api/src/index.test.ts b/packages/assets-api/src/index.test.ts index af31b052cdc..a0757ff65a7 100644 --- a/packages/assets-api/src/index.test.ts +++ b/packages/assets-api/src/index.test.ts @@ -29,8 +29,9 @@ describe('assets-api', () => { it('should prevent // as start url', () => { const original = window.Talend.CDN_URL; window.Talend.CDN_URL = '/cdn'; - const mockedBaseElement = { getAttribute: jest.fn().mockReturnValueOnce('/') }; - // @ts-ignore + const mockedBaseElement = { + 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}`); diff --git a/packages/cmf-cqrs/package.json b/packages/cmf-cqrs/package.json index 5926672107f..a6b1b10c93c 100644 --- a/packages/cmf-cqrs/package.json +++ b/packages/cmf-cqrs/package.json @@ -33,13 +33,14 @@ "homepage": "https://github.com/Talend/ui/cmf-cqrs#readme", "dependencies": { "@talend/react-cmf": "^7.3.0", - "@talend/utils": "2.6.0", + "@talend/utils": "^2.6.0", "immutable": "^3.8.2", "redux-saga": "^1.2.3" }, "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "@testing-library/react-hooks": "^8.0.1", "mock-socket": "^9.3.1", "prop-types": "^15.8.1", diff --git a/packages/cmf-router/package.json b/packages/cmf-router/package.json index b8e287c448a..9acef95b294 100644 --- a/packages/cmf-router/package.json +++ b/packages/cmf-router/package.json @@ -35,7 +35,7 @@ "devDependencies": { "@redux-saga/testing-utils": "^1.1.5", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "react": "^17.0.2", "react-dom": "^17.0.2", "redux-saga-tester": "^1.0.874" diff --git a/packages/cmf/jest.config.js b/packages/cmf/jest.config.js index 5d8b9d7b46a..3ed44501573 100644 --- a/packages/cmf/jest.config.js +++ b/packages/cmf/jest.config.js @@ -1,4 +1,4 @@ -const defaults = require('../../node_modules/@talend/scripts-config-jest/jest.config.js'); +const defaults = require('@talend/scripts-config-jest/jest.config.js'); module.exports = { ...defaults, diff --git a/packages/cmf/package.json b/packages/cmf/package.json index 01f0391a616..c0fe732d1e3 100644 --- a/packages/cmf/package.json +++ b/packages/cmf/package.json @@ -56,7 +56,8 @@ "devDependencies": { "@redux-saga/testing-utils": "^1.1.5", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-jest": "^12.2.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "@testing-library/react": "^12.1.5", "jest-in-case": "^1.0.2", "jsdoc": "^3.6.11", diff --git a/packages/cmf/src/reduxstorage/reduxLocalStorage.js b/packages/cmf/src/reduxstorage/reduxLocalStorage.js index 6cd15b10755..501430258a0 100644 --- a/packages/cmf/src/reduxstorage/reduxLocalStorage.js +++ b/packages/cmf/src/reduxstorage/reduxLocalStorage.js @@ -3,7 +3,10 @@ import createEngine from 'redux-storage-engine-localstorage'; import filter from 'redux-storage-decorator-filter'; import immutablejs from './redux-storage-decorator-immutablejs'; -const CMF_IMMUTABLE_PATHS = [['cmf', 'components'], ['cmf', 'collections']]; +const CMF_IMMUTABLE_PATHS = [ + ['cmf', 'components'], + ['cmf', 'collections'], +]; const CMF_MIDDLEWARE_BLACK_LIST = ['@@INIT', '@@router/LOCATION_CHANGE']; diff --git a/packages/components/package.json b/packages/components/package.json index 91395417525..69b7ae29708 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@popperjs/core": "^2.11.8", + "@talend/assets-api": "^1.2.2", "@talend/bootstrap-theme": "^8.2.0", "@talend/design-tokens": "^2.9.0", "@talend/react-a11y": "^1.1.0", @@ -74,8 +75,10 @@ "@talend/icons": "^6.60.1", "@talend/locales-design-system": "^7.3.0", "@talend/locales-tui-components": "^9.5.0", + "@talend/scripts-config-stylelint": "^4.0.0", "@talend/scripts-core": "^15.0.0", "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^13.5.0", diff --git a/packages/containers/package.json b/packages/containers/package.json index 22ae76169ad..4bb3698daf5 100644 --- a/packages/containers/package.json +++ b/packages/containers/package.json @@ -33,6 +33,7 @@ "url": "https://github.com/Talend/ui.git" }, "dependencies": { + "@talend/design-system": "^7.15.1", "@talend/react-bootstrap": "^1.35.2", "@talend/react-cmf": "^7.3.0", "@talend/react-components": "^11.4.0", @@ -50,12 +51,12 @@ }, "devDependencies": { "@storybook/addon-actions": "^7.4.1", - "@talend/bootstrap-theme": "^8.1.3", + "@talend/bootstrap-theme": "^8.2.0", "@talend/icons": "^6.60.1", "@talend/locales-tui-containers": "^8.0.2", "@talend/react-storybook-cmf": "^7.2.0", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "i18next": "^20.6.1", "jest-in-case": "^1.0.2", "prop-types": "^15.8.1", diff --git a/packages/dataviz/package.json b/packages/dataviz/package.json index 90ccc3afd99..25c6317e042 100644 --- a/packages/dataviz/package.json +++ b/packages/dataviz/package.json @@ -49,13 +49,15 @@ "devDependencies": { "@cypress/react": "^7.0.3", "@cypress/webpack-dev-server": "^3.6.1", - "@talend/bootstrap-theme": "^8.1.3", + "@talend/bootstrap-theme": "^8.2.0", + "@talend/design-system": "^7.15.1", "@talend/icons": "^6.60.1", "@talend/locales-tui-components": "^9.5.0", "@talend/locales-tui-dataviz": "^0.4.6", "@talend/react-components": "^11.4.0", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "@testing-library/react": "^12.1.5", "@types/classnames": "^2.3.1", "@types/d3": "^7.4.0", diff --git a/packages/dataviz/tsconfig.json b/packages/dataviz/tsconfig.json index bf1c507d624..af0c1855d27 100755 --- a/packages/dataviz/tsconfig.json +++ b/packages/dataviz/tsconfig.json @@ -8,7 +8,7 @@ "rootDirs": ["cypress", "@testing-library/cypress", "src"], "target": "es5", - "lib": ["es5", "dom"], + "lib": ["es6", "dom", "ES2017"], "types": ["cypress", "node"] } } diff --git a/packages/design-docs/.storybook/main.js b/packages/design-docs/.storybook/main.js index f63db26fc8f..864e7de88d3 100644 --- a/packages/design-docs/.storybook/main.js +++ b/packages/design-docs/.storybook/main.js @@ -1,6 +1,8 @@ import path from 'path'; +import { packageDirectorySync } from 'pkg-dir'; + const iconConfig = require('@talend/icons/.storybook/main.js'); -const rootPath = require.resolve('@talend/design-docs').replace('src/index.ts', ''); +const rootPath = packageDirectorySync(); const { getJSAndTSLoader, } = require('@talend/scripts-config-react-webpack/config/webpack.config.common'); @@ -11,19 +13,19 @@ const monoRepoFixSourceMap = ['./src', '../design-system/src']; const srcDirectories = monoRepoFixSourceMap.map(src => path.resolve(process.cwd(), src)); const STORIES = [ - `${rootPath}src/Welcome.mdx`, - `${rootPath}src/GettingStarted.mdx`, - `${rootPath}src/Principles.mdx`, - `${rootPath}src/Statuses.mdx`, - // `${rootPath}src/Catalog.mdx`, - `${rootPath}src/content/VoiceAndTone.@(js|tsx|mdx)`, - `${rootPath}src/content/Internationalization.@(js|tsx|mdx)`, - `${rootPath}src/content/Conventions.@(js|tsx|mdx)`, - `${rootPath}src/content/Capitalization.@(js|tsx|mdx)`, - `${rootPath}src/content/Wording.@(js|tsx|mdx)`, - `${rootPath}src/tokens/**/*.mdx`, - `${rootPath}../design-system/src/stories/**/*.@(stories.tsx|mdx)`, - // `${rootPath}src/components/**/*.@(stories.tsx|mdx)`, + `${rootPath}/src/Welcome.mdx`, + `${rootPath}/src/GettingStarted.mdx`, + `${rootPath}/src/Principles.mdx`, + `${rootPath}/src/Statuses.mdx`, + // `${rootPath}/src/Catalog.mdx`, + `${rootPath}/src/content/VoiceAndTone.@(js|tsx|mdx)`, + `${rootPath}/src/content/Internationalization.@(js|tsx|mdx)`, + `${rootPath}/src/content/Conventions.@(js|tsx|mdx)`, + `${rootPath}/src/content/Capitalization.@(js|tsx|mdx)`, + `${rootPath}/src/content/Wording.@(js|tsx|mdx)`, + `${rootPath}/src/tokens/**/*.mdx`, + `${rootPath}/../design-system/src/stories/**/*.@(stories.tsx|mdx)`, + // `${rootPath}/src/components/**/*.@(stories.tsx|mdx)`, ]; export default { diff --git a/packages/design-docs/package.json b/packages/design-docs/package.json index 5f38cebca52..c613babf40f 100644 --- a/packages/design-docs/package.json +++ b/packages/design-docs/package.json @@ -31,6 +31,7 @@ "classnames": "^2.3.1", "color-contrast-checker": "^2.1.0", "figma-js": "^1.16.0", + "pkg-dir": "^7.0.0", "react-hook-form": "^6.15.8", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -54,6 +55,7 @@ "@talend/locales-tui-containers": "^8.0.2", "@talend/locales-tui-faceted-search": "^8.1.2", "@talend/locales-tui-forms": "^9.0.1", + "@talend/scripts-config-typescript": "^11.1.0", "@talend/scripts-core": "^15.0.0", "@types/react": "^17.0.65", "i18next": "^20.6.1", diff --git a/packages/design-system/package.json b/packages/design-system/package.json index d0968ba8a86..c3764ef628c 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -59,11 +59,13 @@ "@storybook/testing-library": "^0.2.0", "@storybook/theming": "^7.4.1", "@svgr/webpack": "^5.5.0", - "@talend/bootstrap-theme": "^8.1.3", + "@talend/bootstrap-theme": "^8.2.0", "@talend/icons": "^6.60.1", "@talend/locales-design-system": "^7.3.0", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", + "@talend/storybook-docs": "^1.2.0", "@testing-library/cypress": "^9.0.0", "@types/classnames": "^2.3.1", "@types/react": "^17.0.65", diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json index fe59539918c..faa8e3b4796 100644 --- a/packages/design-tokens/package.json +++ b/packages/design-tokens/package.json @@ -35,7 +35,10 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", + "@talend/babel-plugin-import-from-index": "^1.5.1", + "@talend/babel-plugin-assets-api": "^1.1.0", "typeface-source-sans-pro": "^1.1.13" }, "dependencies": {} diff --git a/packages/faceted-search/package.json b/packages/faceted-search/package.json index fa4ddc0f17d..dff882f4b54 100644 --- a/packages/faceted-search/package.json +++ b/packages/faceted-search/package.json @@ -36,7 +36,7 @@ "@talend/daikon-tql-client": "^1.3.1", "@talend/utils": "^2.6.0", "@talend/react-bootstrap": "^1.35.2", - "@talend/design-tokens": "2.9.0", + "@talend/design-tokens": "^2.9.0", "classnames": "^2.3.2", "date-fns": "^1.30.1", "invariant": "^2.2.4", @@ -46,14 +46,14 @@ "devDependencies": { "@storybook/addon-actions": "^7.4.1", "@storybook/testing-library": "^0.2.0", - "@talend/bootstrap-theme": "^8.1.3", + "@talend/bootstrap-theme": "^8.2.0", "@talend/design-system": "^7.15.1", "@talend/icons": "^6.60.1", "@talend/locales-tui-components": "^9.5.0", "@talend/locales-tui-faceted-search": "^8.1.2", "@talend/react-components": "^11.4.0", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "babel-plugin-angularjs-annotate": "^0.10.0", "cross-env": "^7.0.3", "i18next": "^20.6.1", diff --git a/packages/flow-designer/package.json b/packages/flow-designer/package.json index 8243eb2a297..21687f7c4fd 100644 --- a/packages/flow-designer/package.json +++ b/packages/flow-designer/package.json @@ -18,9 +18,12 @@ "author": "Talend ", "license": "Apache-2.0", "devDependencies": { + "@talend/babel-plugin-import-from-index": "^1.5.1", + "@talend/babel-plugin-assets-api": "^1.1.0", "@talend/scripts-config-jest": "^12.2.0", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "@types/d3": "^7.4.0", "@types/enzyme": "^3.10.13", "@types/invariant": "^2.2.35", diff --git a/packages/flow-designer/tsconfig.json b/packages/flow-designer/tsconfig.json index 0a281ba5d05..58c9b91708b 100644 --- a/packages/flow-designer/tsconfig.json +++ b/packages/flow-designer/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../node_modules/@talend/scripts-config-typescript/tsconfig.json", + "extends": "@talend/scripts-config-typescript/tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "declaration": true, diff --git a/packages/forms/package.json b/packages/forms/package.json index b0ba146a647..b75b525fa43 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -36,10 +36,11 @@ }, "dependencies": { "@talend/assets-api": "^1.2.2", - "@talend/json-schema-form-core": "1.1.1", + "@talend/json-schema-form-core": "^1.1.1", "@talend/react-components": "^11.4.0", "@talend/design-system": "^7.15.1", "@talend/design-tokens": "^2.9.0", + "@talend/react-bootstrap": "^1.35.2", "@talend/utils": "^2.6.0", "ace-builds": "1.10.1", "ajv": "^6.12.6", @@ -49,7 +50,6 @@ "lodash": "^4.17.21", "memoize-one": "^6.0.0", "react-autowhatever": "10.2.0", - "@talend/react-bootstrap": "^1.35.2", "react-ace": "10.1.0", "react-hook-form": "^6.15.8", "react-jsonschema-form": "0.51.0", @@ -58,12 +58,13 @@ "devDependencies": { "@storybook/addon-actions": "^7.4.1", "@storybook/addon-controls": "^7.4.1", - "@talend/bootstrap-theme": "^8.1.3", + "@talend/bootstrap-theme": "^8.2.0", "@talend/icons": "^6.60.1", "@talend/locales-tui-forms": "^9.0.1", "@talend/react-components": "^11.4.0", "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^14.5.1", diff --git a/packages/http/package.json b/packages/http/package.json index f8a3084f390..6c4c1013948 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -28,7 +28,9 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-babel": "^13.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "fetch-mock": "^9.11.0", "node-fetch": "^2.7.0", "react": "^17.0.2", diff --git a/packages/icons/package.json b/packages/icons/package.json index f66bddf6fc4..0ceb595c7f9 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -45,6 +45,11 @@ "@babel/preset-react": "^7.22.15", "@svgr/webpack": "^5.5.0", "@talend/scripts-core": "^15.0.0", + "@talend/scripts-config-babel": "^13.0.0", + "@talend/babel-plugin-assets-api": "^1.1.0", + "@talend/babel-plugin-import-from-index": "^1.5.1", + "@talend/scripts-config-typescript": "^11.1.0", + "@talend/design-tokens": "^2.9.0", "babel-loader": "^9.1.3", "copy-webpack-plugin": "^10.2.4", "css-loader": "^4.3.0", diff --git a/packages/jsfc/package.json b/packages/jsfc/package.json index 31fbbbcb889..8c16b4db365 100644 --- a/packages/jsfc/package.json +++ b/packages/jsfc/package.json @@ -40,7 +40,10 @@ ], "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", + "@talend/babel-plugin-import-from-index": "^1.5.1", + "@talend/babel-plugin-assets-api": "^1.1.0", "@types/chai": "^3.5.2", "@types/node": "^6.14.13", "json-refs": "^3.0.15", diff --git a/packages/local-libs-webpack-plugin/package.json b/packages/local-libs-webpack-plugin/package.json index f7311986281..07c35a4bd2c 100644 --- a/packages/local-libs-webpack-plugin/package.json +++ b/packages/local-libs-webpack-plugin/package.json @@ -27,6 +27,7 @@ "access": "public" }, "devDependencies": { + "@talend/scripts-core": "^15.0.0", "jest-cli": "^29.7.0" } } diff --git a/packages/playground/package.json b/packages/playground/package.json index 97132afdace..f626ccfc0da 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -30,8 +30,9 @@ "i18next-http-backend": "^1.4.5" }, "dependencies": { - "@talend/bootstrap-theme": "^8.1.3", + "@talend/bootstrap-theme": "^8.2.0", "@talend/react-bootstrap": "^1.35.2", + "@talend/assets-api": "^1.2.2", "@talend/icons": "^6.60.1", "@talend/react-cmf": "^7.3.0", "@talend/react-cmf-router": "^5.3.0", diff --git a/packages/router-bridge/package.json b/packages/router-bridge/package.json index 6b4908f2085..694d3289978 100644 --- a/packages/router-bridge/package.json +++ b/packages/router-bridge/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/ui/tree/master/packages/router-bridge#readme", "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "connected-react-router": "^6.9.3", "history": "^5.3.0", "react": "^17.0.2", diff --git a/packages/sagas/package.json b/packages/sagas/package.json index 4c64fe7bbc6..0e0b5082cee 100644 --- a/packages/sagas/package.json +++ b/packages/sagas/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "prop-types": "^15.8.1", "react": "^17.0.2", "react-dom": "^17.0.2" diff --git a/packages/stepper/package.json b/packages/stepper/package.json index 78d9e9bddfb..899973da99e 100644 --- a/packages/stepper/package.json +++ b/packages/stepper/package.json @@ -43,7 +43,8 @@ "devDependencies": { "@talend/icons": "^6.60.1", "@talend/scripts-config-prettier": "^12.0.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-typescript": "^11.1.0", "@talend/scripts-core": "^15.0.0", "@trivago/prettier-plugin-sort-imports": "^3.4.0", "i18next": "^20.6.1", diff --git a/packages/storybook-docs/package.json b/packages/storybook-docs/package.json index 70be6efbe61..e07b65e41d8 100644 --- a/packages/storybook-docs/package.json +++ b/packages/storybook-docs/package.json @@ -27,16 +27,14 @@ "access": "public" }, "dependencies": { - "@talend/design-system": "^7.15.1", "@talend/design-tokens": "^2.9.0", + "@storybook/blocks": "^7.4.1", "classnames": "^2.3.1", "figma-js": "^1.16.0", "react": "^17.0.2" }, "devDependencies": { - "@talend/scripts-core": "^15.0.0" - }, - "peerDependencies": { - "@talend/icons": "^6.42.0" + "@talend/scripts-core": "^15.0.0", + "@talend/scripts-config-typescript": "^11.1.0" } } diff --git a/packages/storybook-docs/src/components/FigmaContext.ts b/packages/storybook-docs/src/components/FigmaContext.ts index 6b722678d34..eb363647dbd 100644 --- a/packages/storybook-docs/src/components/FigmaContext.ts +++ b/packages/storybook-docs/src/components/FigmaContext.ts @@ -3,10 +3,16 @@ import * as Figma from 'figma-js'; const token = process.env.STORYBOOK_FIGMA_ACCESS_TOKEN; -export default createContext({ +interface FigmaClient extends ReturnType { + isConfigured: boolean; +} + +export const FigmaContext = createContext({ // eslint-disable-next-line new-cap ...Figma.Client({ personalAccessToken: token, }), isConfigured: !!token, }); + +export default FigmaContext; diff --git a/packages/storybook-docs/src/components/Statuses/Statuses.tsx b/packages/storybook-docs/src/components/Statuses/Statuses.tsx index 6c28c799cd4..46a8a430150 100644 --- a/packages/storybook-docs/src/components/Statuses/Statuses.tsx +++ b/packages/storybook-docs/src/components/Statuses/Statuses.tsx @@ -1,5 +1,4 @@ import { Unstyled } from '@storybook/blocks'; -import { StackHorizontal, StackItem } from '@talend/design-system'; import { Status } from './Status'; import { Statuses, StatusType } from './Statuses.types'; diff --git a/packages/storybook-docs/src/components/Trial/Trial.stories.tsx b/packages/storybook-docs/src/components/Trial/Trial.stories.tsx index 3ab5c25ffc5..febc0bdcc41 100644 --- a/packages/storybook-docs/src/components/Trial/Trial.stories.tsx +++ b/packages/storybook-docs/src/components/Trial/Trial.stories.tsx @@ -2,9 +2,11 @@ import { Trial } from './Trial'; import { Meta, StoryFn } from '@storybook/react'; -export default { +const meta: Meta = { component: Trial, -} as Meta; +}; + +export default meta; export const Story: StoryFn = () => { return Trial component; diff --git a/packages/storybook-docs/src/components/Use.tsx b/packages/storybook-docs/src/components/Use.tsx index 3f07d230a21..7242eef1954 100644 --- a/packages/storybook-docs/src/components/Use.tsx +++ b/packages/storybook-docs/src/components/Use.tsx @@ -1,41 +1,37 @@ import type { HTMLAttributes, ReactElement, PropsWithChildren } from 'react'; -// eslint-disable-next-line @talend/import-depth -import { IconNameWithSize } from '@talend/icons/dist/typeUtils'; + import classnames from 'classnames'; -import { SizedIcon } from '@talend/design-system'; +// import { SizedIcon } from '@talend/design-system'; import { Grid } from './Grid'; import styles from './Use.module.scss'; type BlockTypes = { title: string; - icon: IconNameWithSize<'M'>; children: ReactElement | ReactElement[] | HTMLCollection; } & HTMLAttributes; -const Block = ({ title, icon, children, className, ...rest }: BlockTypes) => { +const Block = ({ title, children, className, ...rest }: BlockTypes) => { return (
- - {title} - + {title} {children}
); }; -const Do = ({ children, ...rest }: Omit) => { +const Do = ({ children, ...rest }: Omit) => { return ( - + {children} ); }; -const Dont = ({ children, ...rest }: Omit) => { +const Dont = ({ children, ...rest }: Omit) => { return ( - + {children} ); diff --git a/packages/storybook-docs/tsconfig.json b/packages/storybook-docs/tsconfig.json index eed52922a60..d4f8ecc5f97 100644 --- a/packages/storybook-docs/tsconfig.json +++ b/packages/storybook-docs/tsconfig.json @@ -1,8 +1,8 @@ - { +{ "extends": "@talend/scripts-config-typescript/tsconfig.json", "include": ["src/**/*", "custom.d.ts"], "files": [], "compilerOptions": { - "declaration": true, + "declaration": true } } diff --git a/packages/storybook-one/.storybook/main.js b/packages/storybook-one/.storybook/main.js index 8a7b7e09d97..57e999e5a61 100644 --- a/packages/storybook-one/.storybook/main.js +++ b/packages/storybook-one/.storybook/main.js @@ -1,31 +1,34 @@ import path from 'path'; +import { packageDirectorySync } from 'pkg-dir'; + const iconConfig = require('@talend/icons/.storybook/main.js'); -const rootPath = require.resolve('@talend/ui-storybook-one').replace('src/index.ts', ''); +const rootPath = packageDirectorySync(); const { getJSAndTSLoader, } = require('@talend/scripts-config-react-webpack/config/webpack.config.common'); + const STORIES = [ { titlePrefix: 'Design System', - directory: `${rootPath}../design-system/src`, + directory: `${rootPath}/../design-system/src`, }, - `${rootPath}../components/**/*.stories.@(js|tsx)`, - `${rootPath}../forms/**/*.stories.@(js|tsx)`, - `${rootPath}../dataviz/src/**/*.stories.@(js|tsx)`, - `${rootPath}../icons/stories/**/*.stories.@(js|tsx)`, - `${rootPath}../faceted-search/stories/**/*.stories.@(js|tsx)`, + `${rootPath}/../components/**/*.stories.@(js|tsx)`, + `${rootPath}/../forms/**/*.stories.@(js|tsx)`, + `${rootPath}/../dataviz/src/**/*.stories.@(js|tsx)`, + `${rootPath}/../icons/stories/**/*.stories.@(js|tsx)`, + `${rootPath}/../faceted-search/stories/**/*.stories.@(js|tsx)`, ]; const monoRepoFixSourceMap = [ - '../components/src', - '../dataviz/src', '../design-system/src', - '../faceted-search/stories', - '../faceted-search/src', + '../components/src', '../forms/src', '../forms/stories', + '../dataviz/src', '../icons/stories', + '../faceted-search/stories', + '../faceted-search/src', ]; const srcDirectories = monoRepoFixSourceMap.map(src => path.resolve(process.cwd(), src)); diff --git a/packages/storybook-one/package.json b/packages/storybook-one/package.json index 251f5206195..b79fe0ef0c4 100644 --- a/packages/storybook-one/package.json +++ b/packages/storybook-one/package.json @@ -22,9 +22,13 @@ "dependencies": { "@talend/design-system": "^7.15.1", "@talend/design-tokens": "^2.7.3", + "@talend/react-faceted-search": "^11.1.0", + "@talend/storybook-docs": "^1.2.0", "@talend/icons": "^6.60.1", "@talend/react-components": "^11.0.0", + "@talend/react-forms": "^10.2.4", "@talend/react-dataviz": "^3.0.1", + "pkg-dir": "^7.0.0", "react-hook-form": "^6.15.8" }, "devDependencies": { @@ -48,6 +52,7 @@ "@talend/locales-tui-containers": "^8.0.2", "@talend/locales-tui-faceted-search": "^8.1.0", "@talend/locales-tui-forms": "^9.0.1", + "@talend/scripts-config-storybook-lib": "^5.0.0", "@talend/scripts-core": "^15.0.0", "@types/react": "^17.0.62", "i18next": "^20.6.1", diff --git a/packages/theme/package.json b/packages/theme/package.json index 31dacaaacf0..1bf76061b75 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -27,28 +27,24 @@ "url": "https://github.com/Talend/ui.git" }, "dependencies": { - "@talend/bootstrap-sass": "^3.5.0", - "@talend/design-tokens": "^2.9.0", - "@talend/icons": "^6.60.1" + "@talend/bootstrap-sass": "^3.4.8", + "@talend/design-tokens": "^2.9.0" }, "devDependencies": { - "@talend/icons": "^6.60.1", "@talend/scripts-core": "^15.0.0", "copy-webpack-plugin": "^10.2.4", "css-minimizer-webpack-plugin": "^4.2.2", - "css-loader": "^4.3.0", - "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.3", - "mini-css-extract-plugin": "^2.7.6", - "postcss": "^8.4.31", - "postcss-loader": "^7.3.3", "postcss-preset-env": "^7.8.3", "rimraf": "^3.0.2", - "sass": "^1.68.0", - "sass-loader": "^13.3.2", - "style-loader": "^3.3.3", - "webpack": "^5.88.2", - "webpack-cli": "^4.10.0" + "mini-css-extract-plugin":"2.7.6", + "webpack": "^5.58.2", + "file-loader":"^6.2.0", + "sass-loader":"^12.6.0", + "sass":"^1.67.0", + "style-loader":"^3.3.3", + "css-loader": "^4.3.0", + "postcss-loader": "^7.3.3" }, "peerDependencies": {}, "publishConfig": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 455835ad9ba..5cb2320a28a 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -21,6 +21,8 @@ }, "devDependencies": { "@talend/scripts-core": "^15.0.0", + "@talend/scripts-config-typescript": "^11.1.0", + "@types/date-fns": "^0.0.2", "cross-env": "^7.0.3" }, "dependencies": { diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 636087290d4..03264a1df9f 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../node_modules/@talend/scripts-config-typescript/tsconfig.json", + "extends": "@talend/scripts-config-typescript/tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "declaration": true, diff --git a/scripts/get-locations.js b/scripts/get-locations.js deleted file mode 100644 index 68885c791dd..00000000000 --- a/scripts/get-locations.js +++ /dev/null @@ -1,7 +0,0 @@ -const run = require('../run'); - -run({ name: 'yarn', args: ['workspaces', '--silent', 'info'] }) - .then(info => JSON.parse(info)) - .then(workspaceInfo => { - console.log(Object.keys(workspaceInfo).map(name => workspaceInfo[name].location)); - }); diff --git a/tools/babel-plugin-assets-api/package.json b/tools/babel-plugin-assets-api/package.json index 3da68d5ac5b..69a3d26e993 100644 --- a/tools/babel-plugin-assets-api/package.json +++ b/tools/babel-plugin-assets-api/package.json @@ -4,7 +4,7 @@ "description": "", "main": "src/index.js", "scripts": { - "lint": "talend-scripts lint", + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", "test": "jest" }, "dependencies": { diff --git a/tools/babel-plugin-import-d3/package.json b/tools/babel-plugin-import-d3/package.json index c0976d13c45..2c476a7479e 100644 --- a/tools/babel-plugin-import-d3/package.json +++ b/tools/babel-plugin-import-d3/package.json @@ -18,6 +18,7 @@ "test": "jest" }, "devDependencies": { + "@talend/scripts-core": "^15.0.0", "@babel/core": "^7.22.20", "@babel/preset-env": "^7.22.20", "babel-jest": "^29.7.0", diff --git a/tools/babel-plugin-import-d3/src/index.js b/tools/babel-plugin-import-d3/src/index.js index 151269823d6..2e2844f0db3 100644 --- a/tools/babel-plugin-import-d3/src/index.js +++ b/tools/babel-plugin-import-d3/src/index.js @@ -37,14 +37,6 @@ function findD3RelatedPackageName(importDeclarationPath) { return found; } -function getLastNameInPath(path) { - const splited = path.split('/'); - if (splited.length === 1) { - return false; - } - return splited.pop(); -} - function sortImports(a, b) { if (a.type === 'ImportDefaultSpecifier') { return -1; @@ -62,7 +54,6 @@ module.exports = function transform({ types }) { const d3Packages = []; const requireCalls = []; let lastImport; - let realLastImport; path.traverse({ CallExpression: { @@ -70,27 +61,24 @@ module.exports = function transform({ types }) { if (callExpression.node.callee.name === 'require') { if (PACKAGES.indexOf(callExpression.node.arguments[0].value) !== -1) { const mod = callExpression.node.arguments[0].value.replace('d3-', ''); + // eslint-disable-next-line no-param-reassign callExpression.node.arguments[0] = types.stringLiteral('d3'); // we must wrap callexpression into memberexpression requireCalls.push({ callExpression, - replace: types.memberExpression( - callExpression.node, - types.identifier(mod), - ) + replace: types.memberExpression(callExpression.node, types.identifier(mod)), }); callExpression.remove(); } } - } + }, }, ImportDeclaration: { exit(importDeclarationPath) { - realLastImport = importDeclarationPath; const packageName = findD3RelatedPackageName(importDeclarationPath); if (packageName) { d3Packages.push( - ...importDeclarationPath.node.specifiers.map(({ local, imported, type }) => { + ...importDeclarationPath.node.specifiers.map(({ local, imported }) => { const localName = local.name; let importedName = localName; if (imported) { @@ -112,13 +100,9 @@ module.exports = function transform({ types }) { requireCalls.forEach(info => { info.callExpression.insertAfter(info.replace); }); - const packageName = 'd3'; if (d3Packages.length > 0) { const source = types.stringLiteral('d3'); - const imp = types.importDeclaration( - d3Packages.filter(Boolean).sort(sortImports), - source, - ); + const imp = types.importDeclaration(d3Packages.filter(Boolean).sort(sortImports), source); if (lastImport) { lastImport.insertAfter(imp); } diff --git a/tools/babel-plugin-import-from-index/package.json b/tools/babel-plugin-import-from-index/package.json index f467283c6e4..c83541bae2f 100644 --- a/tools/babel-plugin-import-from-index/package.json +++ b/tools/babel-plugin-import-from-index/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": "jest" }, "dependencies": { diff --git a/tools/babel-plugin-import-from-lib/index.js b/tools/babel-plugin-import-from-lib/index.js index 541c9c06a66..948a8cff7e0 100644 --- a/tools/babel-plugin-import-from-lib/index.js +++ b/tools/babel-plugin-import-from-lib/index.js @@ -20,7 +20,6 @@ module.exports = function transform({ types: t }) { return true; } if (RULES[root][name].default !== undefined) { - return RULES[root][name].default; } return true; @@ -47,18 +46,32 @@ module.exports = function transform({ types: t }) { const source = t.stringLiteral(getPath(spec.imported.name, base)); let specifier = t.importDefaultSpecifier(t.identifier(spec.local.name)); if (!isDefault(spec.local.name, base)) { - specifier = t.importSpecifier(t.identifier(spec.local.name), t.identifier(spec.local.name)); + specifier = t.importSpecifier( + t.identifier(spec.local.name), + t.identifier(spec.local.name), + ); } else if (spec.imported && !isDefault(spec.imported.name, base)) { - specifier = t.importSpecifier(t.identifier(spec.imported.name), t.identifier(spec.local.name)); + specifier = t.importSpecifier( + t.identifier(spec.imported.name), + t.identifier(spec.local.name), + ); } const imp = t.importDeclaration([specifier], source); path.insertAfter(imp); } else { // is last so we replace + // eslint-disable-next-line no-param-reassign path.node.specifiers = [t.importDefaultSpecifier(t.identifier(spec.local.name))]; if (!isDefault(spec.imported.name, base)) { - path.node.specifiers = [t.importSpecifier(t.identifier(spec.local.name), t.identifier(spec.imported.name))]; + // eslint-disable-next-line no-param-reassign + path.node.specifiers = [ + t.importSpecifier( + t.identifier(spec.local.name), + t.identifier(spec.imported.name), + ), + ]; } + // eslint-disable-next-line no-param-reassign path.node.source = t.stringLiteral(getPath(spec.imported.name, base)); } } else { diff --git a/tools/babel-plugin-import-from-lib/index.test.js b/tools/babel-plugin-import-from-lib/index.test.js index b849698e48a..8401e037dff 100644 --- a/tools/babel-plugin-import-from-lib/index.test.js +++ b/tools/babel-plugin-import-from-lib/index.test.js @@ -9,25 +9,25 @@ pluginTester({ { code: ` import { SidePanel, Actions, ActionButton, ActionDropdown, List } from '@talend/react-components';`, - output: ` + output: ` import List from '@talend/react-components/lib/List'; import { ActionDropdown } from '@talend/react-components/lib/Actions'; import { ActionButton } from '@talend/react-components/lib/Actions'; import { Actions } from '@talend/react-components/lib/Actions'; - import SidePanel from '@talend/react-components/lib/SidePanel';` + import SidePanel from '@talend/react-components/lib/SidePanel';`, }, { code: "import { SidePanel as Component } from '@talend/react-components';", - output: "import Component from '@talend/react-components/lib/SidePanel';" + output: "import Component from '@talend/react-components/lib/SidePanel';", }, { code: "import { Actions as Component } from '@talend/react-components';", - output: "import { Actions as Component } from '@talend/react-components/lib/Actions';" + output: "import { Actions as Component } from '@talend/react-components/lib/Actions';", }, { // do not change existing /lib code: "import getLocale from '@talend/react-components/lib/DateFnsLocale/locale';", - output: "import getLocale from '@talend/react-components/lib/DateFnsLocale/locale';" + output: "import getLocale from '@talend/react-components/lib/DateFnsLocale/locale';", }, { code: "import React from 'react';", @@ -57,13 +57,13 @@ pluginTester({ title: 'options', pluginOptions: { rules: { - '@material-ui/core': {} - } + '@material-ui/core': {}, + }, }, tests: [ { code: "import { Button } from '@material-ui/core';", output: "import Button from '@material-ui/core/Button';", - } - ] -}); \ No newline at end of file + }, + ], +}); diff --git a/tools/babel-plugin-import-from-lib/package.json b/tools/babel-plugin-import-from-lib/package.json index ebead60106c..b608e911821 100644 --- a/tools/babel-plugin-import-from-lib/package.json +++ b/tools/babel-plugin-import-from-lib/package.json @@ -16,6 +16,7 @@ "@babel/types": "^7.22.19" }, "devDependencies": { + "@talend/scripts-core": "^15.0.0", "babel-plugin-tester": "^10.1.0", "jest": "^29.7.0" } diff --git a/tools/cypress-api-mock-plugin/commands.js b/tools/cypress-api-mock-plugin/commands.js index 257953f9e56..5d5fce7bfce 100644 --- a/tools/cypress-api-mock-plugin/commands.js +++ b/tools/cypress-api-mock-plugin/commands.js @@ -21,13 +21,13 @@ export function installApiMockCommands(options = {}) { const recordMode = Cypress.env('record-api'); if (recordMode) { - Cypress.Commands.add('beforeApiMock', (options = {}) => { - cy.recordHar({ options }); + Cypress.Commands.add('beforeApiMock', (opt = {}) => { + cy.recordHar({ opt }); }); - Cypress.Commands.add('afterApiMock', (options = {}) => { - const { fileName, harPath } = getFileNames(options); - cy.saveHar({ outDir: HAR_FOLDER, fileName, ...options }); + Cypress.Commands.add('afterApiMock', (opt = {}) => { + const { fileName, harPath } = getFileNames(opt); + cy.saveHar({ outDir: HAR_FOLDER, fileName, ...opt }); cy.task('optimiseHar', { interceptUrl, harPath, @@ -35,8 +35,8 @@ export function installApiMockCommands(options = {}) { }); } else { // Load the corresponding har before executing the test file - Cypress.Commands.add('beforeApiMock', (options = {}) => { - const fileName = harFileName(options.fileName || Cypress.spec.name); + Cypress.Commands.add('beforeApiMock', (opt = {}) => { + const fileName = harFileName(opt.fileName || Cypress.spec.name); const harPath = `./${path.join(HAR_FOLDER, fileName)}`; cy.readFile(harPath) .then(harContent => JSON.parse(harContent)) diff --git a/tools/cypress-api-mock-plugin/package.json b/tools/cypress-api-mock-plugin/package.json index 953eae9546f..b8de3694add 100644 --- a/tools/cypress-api-mock-plugin/package.json +++ b/tools/cypress-api-mock-plugin/package.json @@ -24,5 +24,8 @@ }, "dependencies": { "@neuralegion/cypress-har-generator": "^5.16.4" + }, + "devDependencies": { + "@talend/scripts-core": "^15.0.0" } } diff --git a/tools/eslint-plugin/package.json b/tools/eslint-plugin/package.json index 93b87ccda10..ffb1b6e52dc 100644 --- a/tools/eslint-plugin/package.json +++ b/tools/eslint-plugin/package.json @@ -10,7 +10,7 @@ "author": "Jean-Michel FRANCOIS", "main": "src/index.js", "scripts": { - "lint": "talend-scripts lint", + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", "test": "jest" }, "dependencies": { diff --git a/tools/scripts-cmf/package.json b/tools/scripts-cmf/package.json index 19eb8a71931..a66c74234ef 100644 --- a/tools/scripts-cmf/package.json +++ b/tools/scripts-cmf/package.json @@ -13,11 +13,15 @@ "lint": "talend-scripts lint ./" }, "dependencies": { + "i18next": "^20.6.1", "deepmerge": "^1.5.2", "jsonpath": "^1.1.1", "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-babel/package.json b/tools/scripts-config-babel/package.json index c6ee7cd8642..e32ece7b9b9 100644 --- a/tools/scripts-config-babel/package.json +++ b/tools/scripts-config-babel/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": "jest" }, "dependencies": { diff --git a/tools/scripts-config-cdn/cdn.js b/tools/scripts-config-cdn/cdn.js index 94ca9802de5..fb07c209123 100644 --- a/tools/scripts-config-cdn/cdn.js +++ b/tools/scripts-config-cdn/cdn.js @@ -16,7 +16,10 @@ const { download } = require('./utils'); const CDN_URL = 'https://statics-dev.cloud.talend.com'; -function getModuleName(nameandversion) { +function getModuleName(nameandversion, isPnpm = false) { + if (isPnpm) { + nameandversion = nameandversion.startsWith('/') ? nameandversion.substring(1) : nameandversion; + } const split = nameandversion.split('@'); if (nameandversion.startsWith('@')) { return `@${split[1]}`; @@ -24,6 +27,17 @@ function getModuleName(nameandversion) { return split[0]; } +function getModuleVersion(nameandversion, isPnpm = false) { + if (isPnpm) { + nameandversion = nameandversion.startsWith('/') ? nameandversion.substring(1) : nameandversion; + } + const split = nameandversion.split('@'); + if (nameandversion.startsWith('@')) { + return split[2]; + } + return split[1]; +} + function addToCopyConfig(info, config) { if (info && info.local) { // Copy the entire folder. @@ -109,41 +123,63 @@ function getAllFlattenDependencies(packageLockContent) { function getModulesFromLockFile(dir) { const cwd = dir || process.cwd(); + const lockTypeMap = { + npm: { + lockfile: 'package-lock.json', + path: path.join(cwd, 'package-lock.json'), + }, + yarn: { + lockfile: 'yarn.lock', + path: path.join(cwd, 'yarn.lock'), + }, + pnpm: { + lockfile: 'pnpm-lock.yaml', + path: path.join(cwd, 'pnpm-lock.yaml'), + }, + }; + let infos = []; - let lockType = 'package-lock.json'; - let lockPath = path.join(cwd, lockType); - if (fs.existsSync(lockPath)) { - const packagelock = require(lockPath); + if (fs.existsSync(lockTypeMap.npm.path)) { + const packagelock = require(lockTypeMap.npm.lockfile); infos = getAllFlattenDependencies(packagelock) .map(({ name, version }) => moduleToCdn(name, version, { env: 'development' })) .map(addLocal); - } else { - lockType = 'yarn.lock'; - lockPath = path.join(cwd, lockType); - if (fs.existsSync(lockPath)) { - let yarnv1; - let yarnv3; - try { - yarnv1 = lockfile.parse(fs.readFileSync(lockPath, 'utf-8')); - } catch (e) { - yarnv3 = yaml.load(fs.readFileSync(lockPath, 'utf-8')); - // eslint-disable-next-line no-underscore-dangle - delete yarnv3.__metadata; - } - - const json = yarnv1 ? yarnv1.object : yarnv3; - infos = Object.keys(json) - .map(moduleAndversion => { - const moduleName = getModuleName(moduleAndversion); - return moduleToCdn(moduleName, json[moduleAndversion].version, { - env: 'development', - }); - }) - .map(addLocal); - } else { - console.log(`No lockfile found in ${cwd}. Search in parent directory`); - return getModulesFromLockFile(path.join(cwd, '..')); + } else if (fs.existsSync(lockTypeMap.yarn.path)) { + const { path: lockPath } = lockTypeMap.yarn; + let yarnv1; + let yarnv3; + try { + yarnv1 = lockfile.parse(fs.readFileSync(lockPath, 'utf-8')); + } catch (e) { + yarnv3 = yaml.load(fs.readFileSync(lockPath, 'utf-8')); + // eslint-disable-next-line no-underscore-dangle + delete yarnv3.__metadata; } + + const json = yarnv1 ? yarnv1.object : yarnv3; + infos = Object.keys(json) + .map(moduleAndversion => { + const moduleName = getModuleName(moduleAndversion); + return moduleToCdn(moduleName, json[moduleAndversion].version, { + env: 'development', + }); + }) + .map(addLocal); + } else if (fs.existsSync(lockTypeMap.pnpm.path)) { + const json = yaml.load(fs.readFileSync(lockTypeMap.pnpm.path, 'utf-8')); + infos = Object.keys(json.packages) + .map(moduleAndversion => { + console.log(moduleAndversion); + const moduleName = getModuleName(moduleAndversion, true); + return moduleToCdn(moduleName, getModuleVersion(moduleAndversion, true), { + env: 'development', + }); + }) + .map(addLocal); + console.log('pnpm lock file found'); + } else { + console.log(`No lockfile found in ${cwd}. Search in parent directory`); + return getModulesFromLockFile(path.join(cwd, '..')); } return infos; } diff --git a/tools/scripts-config-cdn/package.json b/tools/scripts-config-cdn/package.json index c4f29e11f96..0b2b9242e9a 100644 --- a/tools/scripts-config-cdn/package.json +++ b/tools/scripts-config-cdn/package.json @@ -4,7 +4,7 @@ "description": "Provide a simple API to inject CDN config into existing webpack configuration", "main": "cdn.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\"" }, "author": "Talend Frontend (http://www.talend.com)", diff --git a/tools/scripts-config-eslint/package.json b/tools/scripts-config-eslint/package.json index e4c9745bd60..31d5e636edd 100644 --- a/tools/scripts-config-eslint/package.json +++ b/tools/scripts-config-eslint/package.json @@ -14,13 +14,12 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint ./", - "test": "talend-scripts test" + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", + "test": "jest" }, "dependencies": { "@babel/eslint-parser": "^7.22.15", "@talend/scripts-utils": "^2.0.2", - "@talend/eslint-plugin": "^1.0.1", "@typescript-eslint/parser": "^5.62.0", "@typescript-eslint/eslint-plugin": "^5.62.0", "eslint": "^7.32.0", @@ -32,7 +31,7 @@ "eslint-plugin-jest-dom": "^4.0.3", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-mdx": "^1.17.1", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^2.5.1", "eslint-plugin-storybook": "^0.5.13", diff --git a/tools/scripts-config-jest/package.json b/tools/scripts-config-jest/package.json index 62d2ddee4cd..075abbc637f 100644 --- a/tools/scripts-config-jest/package.json +++ b/tools/scripts-config-jest/package.json @@ -14,8 +14,8 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint ./", - "test": "talend-scripts test" + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", + "test": "jest" }, "peerDependencies": { "enzyme": "3", diff --git a/tools/scripts-config-prettier/package.json b/tools/scripts-config-prettier/package.json index a7452c79c30..3ec85f05fe9 100644 --- a/tools/scripts-config-prettier/package.json +++ b/tools/scripts-config-prettier/package.json @@ -12,7 +12,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\"" }, "license": "Apache-2.0", diff --git a/tools/scripts-config-react-webpack/config/icons.js b/tools/scripts-config-react-webpack/config/icons.js index b5798543236..4026cc6fd7f 100644 --- a/tools/scripts-config-react-webpack/config/icons.js +++ b/tools/scripts-config-react-webpack/config/icons.js @@ -14,6 +14,14 @@ function getThemeIcon(theme) { */ function getTalendIconsPath() { const main = require.resolve('@talend/icons'); + + if (main.indexOf('.pnpm') > -1) { + const startPath = main.substring(0, main.indexOf('icons')); + const regex = /@talend\+icons@([^\s/]+)/; + const match = main.match(regex); + const version = match[1]; + return `${startPath}icons@${version}/node_modules/@talend/icons`; + } const root = main.split('icons')[0]; return `${root}icons`; } diff --git a/tools/scripts-config-react-webpack/package.json b/tools/scripts-config-react-webpack/package.json index f147a17753b..1afc2f139d9 100644 --- a/tools/scripts-config-react-webpack/package.json +++ b/tools/scripts-config-react-webpack/package.json @@ -58,10 +58,6 @@ "webpack-cli": "^4.10.0", "webpack-dev-server": "^4.15.1" }, - "peerDependencies": { - "@talend/icons": "*", - "react": "*" - }, "publishConfig": { "access": "public" } diff --git a/tools/scripts-config-storybook-lib/.storybook-templates/main.js b/tools/scripts-config-storybook-lib/.storybook-templates/main.js index 3efa432806b..e2f7d4bfcb7 100644 --- a/tools/scripts-config-storybook-lib/.storybook-templates/main.js +++ b/tools/scripts-config-storybook-lib/.storybook-templates/main.js @@ -26,11 +26,19 @@ const defaultMain = { name: '@storybook/react-webpack5', options: { builder: { - disableTelemetry: true, - enableCrashReports: false, + fsCache: true, + //lazyCompilation: true }, }, }, + typescript: { + reactDocgen: false, + check: false, + }, + core: { + enableCrashReports: false, + disableTelemetry: true, + }, features: { buildStoriesJson: true, }, @@ -43,7 +51,7 @@ const defaultMain = { '@storybook/addon-interactions', '@storybook/addon-storysource', ], - webpackFinal: async (config) => { + webpackFinal: async (config, { configType }) => { // by default storybook do not support scss without css module // here we remove storybook scss config and replace it by our config const rules = [ @@ -60,6 +68,9 @@ const defaultMain = { use: getSassLoaders(true, '', true), }, ]; + if (configType === 'PRODUCTION') { + config.mode = 'production'; + } const mergedConfig = { ...config, module: { @@ -95,11 +106,12 @@ module.exports = { stories, addons: [...defaultMain.addons, ...(userMain.addons || [])], core: merge(defaultMain.core, userMain.core), + typescript: merge(defaultMain.typescript, userMain.typescript), staticDirs: fixWindowsPaths([...(defaultMain.staticDirs|| []), ...(userMain.staticDirs || [])]), - webpackFinal: async (config) => { - let finalConfig = await defaultMain.webpackFinal(config); + webpackFinal: async (config, options) => { + let finalConfig = await defaultMain.webpackFinal(config, options); if(userMain.webpackFinal) { - finalConfig = await userMain.webpackFinal(finalConfig); + finalConfig = await userMain.webpackFinal(finalConfig, options); } return finalConfig } diff --git a/tools/scripts-config-storybook-lib/.storybook-templates/msw/mockServiceWorker.js b/tools/scripts-config-storybook-lib/.storybook-templates/msw/mockServiceWorker.js index b23b83ff8c3..37c8c04bf89 100644 --- a/tools/scripts-config-storybook-lib/.storybook-templates/msw/mockServiceWorker.js +++ b/tools/scripts-config-storybook-lib/.storybook-templates/msw/mockServiceWorker.js @@ -2,7 +2,7 @@ /* tslint:disable */ /** - * Mock Service Worker (0.49.3). + * Mock Service Worker (1.3.2). * @see https://github.com/mswjs/msw * - Please do NOT modify this file. * - Please do NOT serve this file on production. diff --git a/tools/scripts-config-storybook-lib/package.json b/tools/scripts-config-storybook-lib/package.json index 6075362f55a..7b143970caf 100644 --- a/tools/scripts-config-storybook-lib/package.json +++ b/tools/scripts-config-storybook-lib/package.json @@ -29,18 +29,17 @@ "@storybook/react": "^7.4.1", "@storybook/react-webpack5": "^7.4.1", "@storybook/testing-library": "^0.2.0", - "@talend/scripts-config-react-webpack": "^16.0.0", + "@talend/scripts-config-react-webpack": "^16.1.0", "@talend/dynamic-cdn-webpack-plugin": "^13.0.1", "assert": "^2.1.0", "i18next-http-backend": "^1.4.5", "lodash": "^4.17.21", - "msw": "^0.49.3", + "msw": "^1.3.2", "msw-storybook-addon": "^1.8.0", "storybook": "^7.4.0", "util": "^0.12.5" }, "peerDependencies": { - "@talend/design-system": "*", "i18next": "*", "react": "*", "react-i18next": "*" diff --git a/tools/scripts-config-stylelint/package.json b/tools/scripts-config-stylelint/package.json index 860efb7bc39..2fcbe82b68d 100644 --- a/tools/scripts-config-stylelint/package.json +++ b/tools/scripts-config-stylelint/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/Talend/ui/issues" }, "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\"" }, "repository": { diff --git a/tools/scripts-config-typescript/package.json b/tools/scripts-config-typescript/package.json index 57e2585f82d..90cc8c74775 100644 --- a/tools/scripts-config-typescript/package.json +++ b/tools/scripts-config-typescript/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/Talend/ui/issues" }, "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\"" }, "repository": { diff --git a/tools/scripts-core/package.json b/tools/scripts-core/package.json index cebdb383c56..344d1155f8e 100644 --- a/tools/scripts-core/package.json +++ b/tools/scripts-core/package.json @@ -18,10 +18,21 @@ "url": "https://github.com/Talend/ui.git" }, "scripts": { - "lint": "talend-scripts lint", - "test": "talend-scripts test" + "lint": "./src/index.js lint", + "test": "./src/index.js test" + }, + "peerDependencies": { + "@talend/scripts-config-react-webpack": "^16.1.0", + "@talend/scripts-config-storybook-lib": "^5.0.0" + }, + "peerDependenciesMeta": { + "@talend/scripts-config-react-webpack": { + "optional": true + }, + "@talend/scripts-config-storybook-lib": { + "optional": true + } }, - "devDependencies": {}, "dependencies": { "@babel/cli": "^7.22.15", "@babel/core": "^7.22.20", @@ -29,6 +40,8 @@ "@talend/scripts-utils": "^2.0.2", "@talend/scripts-config-babel": "^13.0.0", "@talend/scripts-config-jest": "^12.2.0", + "@talend/eslint-plugin": "^1.0.1", + "@talend/scripts-config-stylelint": "^4.0.0", "@talend/scripts-config-typescript": "^11.1.0", "cpx2": "^3.0.2", "fs-extra": "^10.1.0", diff --git a/tools/scripts-core/src/index.js b/tools/scripts-core/src/index.js index e52ad1e2408..ad34585f707 100755 --- a/tools/scripts-core/src/index.js +++ b/tools/scripts-core/src/index.js @@ -89,23 +89,28 @@ switch (command) { case 'build:lib:umd': console.log('This command do not exists anymore, please use just "build" command'); process.exit(-1); + break; case 'lint:es': case 'lint:style': console.log('This command do not exists anymore, please use just "lint" command'); process.exit(-1); + break; case 'test:ng': console.log('This command do not exists anymore, please use just "test" command'); process.exit(-1); + break; case 'upgrade:deps': console.log( 'This command do not exists anymore, please use just "talend-upgrade-deps" binary from "@talend/upgrade-deps" package', ); process.exit(-1); + break; case 'publish:local': console.log( 'This command do not exists anymore, please use just "talend-publish-local" bin from "@talend/scripts-publish-local" package', ); process.exit(-1); + break; default: console.log(`Command ${command} not found.`); process.exit(-1); diff --git a/tools/scripts-core/src/scripts/build-lib.js b/tools/scripts-core/src/scripts/build-lib.js index bceed110a27..59617a31e84 100755 --- a/tools/scripts-core/src/scripts/build-lib.js +++ b/tools/scripts-core/src/scripts/build-lib.js @@ -39,48 +39,55 @@ export default async function build(env, presetApi, unsafeOptions) { rimraf.sync(targetFolder); } const babelPromise = () => - new Promise(async (resolve, reject) => { + new Promise((resolve, reject) => { if (useTsc) { resolve({ status: 0 }); return; } console.log('Compiling with babel...'); - const babelSpawn = await utils.process.spawn( - 'npx', - [ - 'babel', - '--config-file', - babelConfigPath, - '-d', - targetFolder, - srcFolder, - '--source-maps', - '--ignore', - // @see https://github.com/babel/babel/issues/12008 - '**/*.test.js,**/*.test.ts,**/*.test.tsx,**/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.stories.js,**/*.stories.ts,**/*.stories.tsx', - '--extensions', - '.js,.ts,.tsx,.jsx', - ...options, - ], - { - stdio: 'inherit', - env, - shell: process.platform === 'win32', - }, - ); - babelSpawn.on('exit', status => { - if (parseInt(status, 10) !== 0) { - console.error(`Babel exit error: ${status}`); - reject(new Error(status)); - } else { - console.log(`Babel exit: ${status}`); - resolve({ status }); - } - }); + utils.process + .spawn( + 'npx', + [ + 'babel', + '--config-file', + babelConfigPath, + '-d', + targetFolder, + srcFolder, + '--source-maps', + '--ignore', + // @see https://github.com/babel/babel/issues/12008 + '**/__mocks__,**/__tests__,**/*.test.js,**/*.test.ts,**/*.test.tsx,**/*.spec.js,**/*.spec.ts,**/*.spec.tsx,**/*.stories.js,**/*.stories.ts,**/*.stories.tsx', + '--extensions', + '.js,.ts,.tsx,.jsx', + ...options, + ], + { + stdio: 'inherit', + env, + shell: process.platform === 'win32', + }, + ) + .then(babelSpawn => { + babelSpawn.on('exit', status => { + if (parseInt(status, 10) !== 0) { + console.error(`Babel exit error: ${status}`); + reject(new Error(status)); + } else { + console.log(`Babel exit: ${status}`); + resolve({ status }); + } + }); + }) + .catch(error => { + console.error('Spawn error:', error); + reject(error); + }); }); const tscPromise = () => - new Promise(async (resolve, reject) => { + new Promise((resolve, reject) => { if (!isTSLib) { resolve({ status: 0 }); return; @@ -94,30 +101,36 @@ export default async function build(env, presetApi, unsafeOptions) { } args = ['tsc'].concat(args); - const tscSpawn = await utils.process.spawn('npx', args, { stdio: 'inherit', env }); - - tscSpawn.on('exit', status => { - if (parseInt(status, 10) !== 0) { - console.error(`TSC exit error: ${status}`); - reject(new Error(status)); - } else { - console.log(`TSC exit: ${status}`); - if (!types) { - const msg = `Entry "types", referencing your declaration file (index.d.ts), must be defined in ${pkgPath}`; - console.error(msg); - reject(new Error(msg)); - } else { - const absoluteTypes = path.join(process.cwd(), types); - if (!fs.existsSync(absoluteTypes)) { - const msg = `Declaration file, referenced in package.json, not found ${absoluteTypes}`; - console.error(msg); - reject(new Error(msg)); + utils.process + .spawn('npx', args, { stdio: 'inherit', env }) + .then(tscSpawn => { + tscSpawn.on('exit', status => { + if (parseInt(status, 10) !== 0) { + console.error(`TSC exit error: ${status}`); + reject(new Error(status)); } else { - resolve({ status }); + console.log(`TSC exit: ${status}`); + if (!types) { + const msg = `Entry "types", referencing your declaration file (index.d.ts), must be defined in ${pkgPath}`; + console.error(msg); + reject(new Error(msg)); + } else { + const absoluteTypes = path.join(process.cwd(), types); + if (!fs.existsSync(absoluteTypes)) { + const msg = `Declaration file, referenced in package.json, not found ${absoluteTypes}`; + console.error(msg); + reject(new Error(msg)); + } else { + resolve({ status }); + } + } } - } - } - }); + }); + }) + .catch(error => { + console.error('Spawn error:', error); + reject(error); + }); }); const copyPromise = () => @@ -135,7 +148,7 @@ export default async function build(env, presetApi, unsafeOptions) { cpx.copy(`${srcFolder}/**/*.{scss,json}`, targetFolder, err => { if (err) { console.error(err); - reject(error); + reject(err); } else { resolve(); } diff --git a/tools/scripts-core/src/scripts/extends.js b/tools/scripts-core/src/scripts/extends.js index a9547051ff5..896d7540ff5 100755 --- a/tools/scripts-core/src/scripts/extends.js +++ b/tools/scripts-core/src/scripts/extends.js @@ -2,6 +2,7 @@ import fs from 'fs'; import path from 'path'; import _ from 'lodash'; +import { utils } from '@talend/scripts-utils'; import { getUserConfigFile } from '../utils/env.js'; const { template } = _; @@ -68,7 +69,7 @@ function generateConfigFile({ configFileNames, defaultConfigFilePath, generateCo console.log(`✅ ${fileName} created.`); } -export default async function extend(env, presetApi) { +export default async function extend() { const rootPath = process.cwd(); const nodeModulesPath = path.join(rootPath, 'node_modules'); generateConfigFile({ diff --git a/tools/scripts-core/src/scripts/start.js b/tools/scripts-core/src/scripts/start.js index ba3d14346ac..e17d1e61d32 100755 --- a/tools/scripts-core/src/scripts/start.js +++ b/tools/scripts-core/src/scripts/start.js @@ -25,4 +25,5 @@ export default async function start(env, _, options) { if (packageType.isLib) { return startStorybook(env, _, options); } + return null; } diff --git a/tools/scripts-core/src/utils/preset.js b/tools/scripts-core/src/utils/preset.js index b0aa5cf7b56..51459956b2f 100644 --- a/tools/scripts-core/src/utils/preset.js +++ b/tools/scripts-core/src/utils/preset.js @@ -1,10 +1,5 @@ -import fs from 'fs'; -import path from 'path'; -import { createRequire } from 'module'; import { createUserConfigGetter } from './env.js'; -const require = createRequire(import.meta.url); - /** * Get the preset arguments * @param env Then environment object. It takes the current process env if not provided. diff --git a/tools/scripts-locales/package.json b/tools/scripts-locales/package.json index 5f2bbe40747..9e6720bb660 100644 --- a/tools/scripts-locales/package.json +++ b/tools/scripts-locales/package.json @@ -10,8 +10,9 @@ "lint": "talend-scripts lint" }, "dependencies": { - "cross-spawn": "^7.0.3", - "@talend/scripts-utils": "^2.0.2" + "@talend/scripts-core": "^15.0.0", + "@talend/scripts-utils": "^2.0.2", + "cross-spawn": "^7.0.3" }, "keywords": [ "i18next", diff --git a/tools/scripts-locales/src/index.js b/tools/scripts-locales/src/index.js index 83d4309c660..4e1e9b9948e 100755 --- a/tools/scripts-locales/src/index.js +++ b/tools/scripts-locales/src/index.js @@ -1,5 +1,4 @@ #!/usr/bin/env node -import * as utils from '@talend/scripts-utils'; import { updateCode } from './update-code.js'; const command = process.argv[2]; diff --git a/tools/scripts-publish-local/package.json b/tools/scripts-publish-local/package.json index fb53856a20d..abf20ce2909 100644 --- a/tools/scripts-publish-local/package.json +++ b/tools/scripts-publish-local/package.json @@ -15,6 +15,9 @@ "generate-password": "^1.7.0", "rimraf": "^3.0.2" }, + "devDependencies": { + "@talend/scripts-core": "^15.0.0" + }, "author": "Talend Frontend (http://www.talend.com)", "license": "Apache-2.0", "publishConfig": { diff --git a/tools/scripts-teorem/package.json b/tools/scripts-teorem/package.json index 617c3afa70a..ada7fbb85a6 100644 --- a/tools/scripts-teorem/package.json +++ b/tools/scripts-teorem/package.json @@ -22,11 +22,14 @@ "license": "Apache-2.0", "dependencies": { "@octokit/rest": "^18.12.0", + "@talend/scripts-core": "^15.0.0", "@yarnpkg/lockfile": "^1.1.0", "commander": "^6.2.1", "dotenv": "^8.6.0", "mkdirp": "^1.0.4", "queue": "^6.0.2" }, - "devDependencies": {} + "devDependencies": { + "@talend/scripts-core": "^15.0.0" + } } diff --git a/tools/scripts-utils/.babelrc b/tools/scripts-utils/.babelrc new file mode 100644 index 00000000000..02add252488 --- /dev/null +++ b/tools/scripts-utils/.babelrc @@ -0,0 +1,3 @@ +{ + "extends": "@talend/scripts-config-babel/.babelrc.json" +} diff --git a/tools/scripts-utils/__tests__/path.test.js b/tools/scripts-utils/__tests__/path.test.js index df3cffad79c..488669aa269 100644 --- a/tools/scripts-utils/__tests__/path.test.js +++ b/tools/scripts-utils/__tests__/path.test.js @@ -1,5 +1,4 @@ /* eslint-disable no-console */ -import path from 'path'; import utils from '../src'; describe('utils.path', () => { @@ -10,8 +9,8 @@ describe('utils.path', () => { }); describe('getPkgRootPath', () => { it('should', () => { - expect(utils.path.getPkgRootPath('@talend/scripts-utils')).toMatch( - /ui\/tools\/scripts-utils/, + expect(utils.path.getPkgRootPath('@talend/scripts-config-babel')).toMatch( + /.*\/tools\/scripts-config-babel$/, ); }); }); diff --git a/tools/scripts-utils/package.json b/tools/scripts-utils/package.json index 16e3ad46855..457c2beeaad 100644 --- a/tools/scripts-utils/package.json +++ b/tools/scripts-utils/package.json @@ -4,14 +4,17 @@ "description": "", "main": "src/index.js", "scripts": { - "lint": "talend-scripts lint", - "test": "talend-scripts test" + "lint": "echo \"Not possible to use talend-scripts here (risk of circular dependency)\" && exit 0", + "test": "jest .test.js" }, "dependencies": { "fs-extra": "^10.1.0", "glob": "^8.1.0", "which": "^2.0.2" }, + "devDependencies": { + "@talend/scripts-config-babel": "^13.0.0" + }, "repository": { "type": "git", "url": "git+https://github.com/Talend/ui.git" diff --git a/tools/scripts-utils/src/babel.js b/tools/scripts-utils/src/babel.js index 6ff3380e9d7..5452ddba308 100644 --- a/tools/scripts-utils/src/babel.js +++ b/tools/scripts-utils/src/babel.js @@ -5,10 +5,13 @@ const crypto = require('crypto'); function getLockFilePath(cwd = process.cwd()) { const yarnlockPath = path.join(cwd, 'yarn.lock'); const pkglockPath = path.join(cwd, 'package-lock.json'); + const pnpmLockPath = path.join(cwd, 'pnpm-lock.yaml'); if (fs.existsSync(yarnlockPath)) { return yarnlockPath; } else if (fs.existsSync(pkglockPath)) { return pkglockPath; + } else if (fs.existsSync(pnpmLockPath)) { + return pnpmLockPath; } const parentPath = path.join(cwd, '..'); if (parentPath === cwd) { diff --git a/tools/scripts-utils/src/pkg.js b/tools/scripts-utils/src/pkg.js index e6eefe2809e..4a2106f9180 100644 --- a/tools/scripts-utils/src/pkg.js +++ b/tools/scripts-utils/src/pkg.js @@ -18,7 +18,7 @@ function hasDependencies(pkg, name) { function hasPackageInstalled(name) { try { // eslint-disable-next-line import/no-dynamic-require, global-require - require(name); + require.resolve(name); return true; // eslint-disable-next-line no-empty } catch (e) {} diff --git a/tools/scripts-yarn-workspace/package.json b/tools/scripts-yarn-workspace/package.json index ca1b86ff0d7..5539a4433ee 100644 --- a/tools/scripts-yarn-workspace/package.json +++ b/tools/scripts-yarn-workspace/package.json @@ -10,7 +10,9 @@ "lint": "talend-scripts lint" }, "author": "frontend@talend.com", - "dependencies": {}, + "devDependencies": { + "@talend/scripts-core": "^15.0.0" + }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/tools/upgrade-deps/package.json b/tools/upgrade-deps/package.json index f6aa0500463..344a31bb07d 100644 --- a/tools/upgrade-deps/package.json +++ b/tools/upgrade-deps/package.json @@ -14,6 +14,7 @@ "yarn-deduplicate": "^6.0.2" }, "devDependencies": { + "@talend/scripts-core": "^15.0.0", "jest": "^29.7.0" }, "license": "Apache-2.0", diff --git a/yarn.lock b/yarn.lock index b8543eb641d..bbbd1287888 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2358,7 +2358,7 @@ "@types/set-cookie-parser" "^2.4.0" set-cookie-parser "^2.4.6" -"@mswjs/interceptors@^0.17.5": +"@mswjs/interceptors@^0.17.10": version "0.17.10" resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.17.10.tgz#857b41f30e2b92345ed9a4e2b1d0a08b8b6fcad4" integrity sha512-N8x7eSLGcmUFNWZRxT1vsHvypzIRgQYdG0rJey/rZCy6zT/30qDt8Joj7FxzGNLSwXbeZqJOMqDurp7ra4hgbw== @@ -2541,6 +2541,18 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@pkgr/utils@^2.3.1": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" + integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== + dependencies: + cross-spawn "^7.0.3" + fast-glob "^3.3.0" + is-glob "^4.0.3" + open "^9.1.0" + picocolors "^1.0.0" + tslib "^2.6.0" + "@pmmmwh/react-refresh-webpack-plugin@^0.5.5": version "0.5.10" resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz#2eba163b8e7dbabb4ce3609ab5e32ab63dda3ef8" @@ -6741,6 +6753,13 @@ bufferstreams@^3.0.0: dependencies: readable-stream "^3.4.0" +bundle-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" + integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== + dependencies: + run-applescript "^5.0.0" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -6914,14 +6933,6 @@ chai@^4.3.8: pathval "^1.1.1" type-detect "^4.0.5" -chalk@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@4.1.2, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -8381,7 +8392,7 @@ deepmerge@^4.0.0, deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -default-browser-id@3.0.0: +default-browser-id@3.0.0, default-browser-id@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== @@ -8398,6 +8409,16 @@ default-browser-id@^2.0.0: pify "^2.3.0" untildify "^2.0.0" +default-browser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" + integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== + dependencies: + bundle-name "^3.0.0" + default-browser-id "^3.0.0" + execa "^7.1.1" + titleize "^3.0.0" + default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" @@ -8426,6 +8447,11 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" @@ -9331,12 +9357,13 @@ eslint-plugin-mdx@^1.17.1: tslib "^2.3.1" vfile "^4.2.1" -eslint-plugin-prettier@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" - integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== +eslint-plugin-prettier@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz#6887780ed95f7708340ec79acfdf60c35b9be57a" + integrity sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w== dependencies: prettier-linter-helpers "^1.0.0" + synckit "^0.8.5" eslint-plugin-react-hooks@^2.5.1: version "2.5.1" @@ -9564,7 +9591,7 @@ execa@4.1.0, execa@^4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@7.2.0: +execa@7.2.0, execa@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== @@ -9734,7 +9761,7 @@ fast-fifo@^1.1.0: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@^3.2.7, fast-glob@^3.2.9, fast-glob@^3.3.1: +fast-glob@^3.2.7, fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== @@ -10587,7 +10614,7 @@ graphlib@^2.1.8: dependencies: lodash "^4.17.15" -"graphql@^15.0.0 || ^16.0.0": +graphql@^16.8.1: version "16.8.1" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== @@ -10717,11 +10744,6 @@ headers-polyfill@3.2.5: resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.2.5.tgz#6e67d392c9d113d37448fe45014e0afdd168faed" integrity sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA== -headers-polyfill@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.3.0.tgz#67c6ef7b72d4c8cac832ad5936f5b3a56e7b705a" - integrity sha512-5e57etwBpNcDc0b6KCVWEh/Ro063OxPvzVimUdM0/tsYM/T7Hfy3kknIGj78SFTOhNd8AZY41U8mOHoO4LzmIQ== - hexoid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" @@ -11419,6 +11441,11 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -11470,6 +11497,13 @@ is-hexadecimal@^1.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-installed-globally@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -11511,7 +11545,7 @@ is-negative-zero@^2.0.2: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== -is-node-process@^1.0.1: +is-node-process@^1.0.1, is-node-process@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-node-process/-/is-node-process-1.2.0.tgz#ea02a1b90ddb3934a19aea414e88edef7e11d134" integrity sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw== @@ -12576,6 +12610,11 @@ kleur@^4.1.5: resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== +klona@^2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" + integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== + known-css-properties@^0.28.0: version "0.28.0" resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.28.0.tgz#8a8be010f368b3036fe6ab0ef4bbbed972bd6274" @@ -13339,7 +13378,7 @@ min-indent@^1.0.0, min-indent@^1.0.1: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -mini-css-extract-plugin@^2.7.6: +mini-css-extract-plugin@2.7.6, mini-css-extract-plugin@^2.7.6: version "2.7.6" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz#282a3d38863fddcd2e0c220aaed5b90bc156564d" integrity sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw== @@ -13524,26 +13563,26 @@ msw-storybook-addon@^1.8.0: dependencies: is-node-process "^1.0.1" -msw@^0.49.3: - version "0.49.3" - resolved "https://registry.yarnpkg.com/msw/-/msw-0.49.3.tgz#c4ca29eddda3e82ad9e36918dda4a7428eddd7fe" - integrity sha512-kRCbDNbNnRq5LC1H/NUceZlrPAvSrMH6Or0mirIuH69NY84xwDruPn/hkXTovIK1KwDwbk+ZdoSyJlpiekLxEA== +msw@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/msw/-/msw-1.3.2.tgz#35e0271293e893fc3c55116e90aad5d955c66899" + integrity sha512-wKLhFPR+NitYTkQl5047pia0reNGgf0P6a1eTnA5aNlripmiz0sabMvvHcicE8kQ3/gZcI0YiPFWmYfowfm3lA== dependencies: "@mswjs/cookies" "^0.2.2" - "@mswjs/interceptors" "^0.17.5" + "@mswjs/interceptors" "^0.17.10" "@open-draft/until" "^1.0.3" "@types/cookie" "^0.4.1" "@types/js-levenshtein" "^1.1.1" - chalk "4.1.1" + chalk "^4.1.1" chokidar "^3.4.2" cookie "^0.4.2" - graphql "^15.0.0 || ^16.0.0" - headers-polyfill "^3.1.0" + graphql "^16.8.1" + headers-polyfill "3.2.5" inquirer "^8.2.0" - is-node-process "^1.0.1" + is-node-process "^1.2.0" js-levenshtein "^1.1.6" node-fetch "^2.6.7" - outvariant "^1.3.0" + outvariant "^1.4.0" path-to-regexp "^6.2.0" strict-event-emitter "^0.4.3" type-fest "^2.19.0" @@ -13974,6 +14013,16 @@ open@^8.0.4, open@^8.0.9, open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" +open@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" + integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== + dependencies: + default-browser "^4.0.0" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^2.2.0" + opener@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -14050,7 +14099,7 @@ outdent@^0.5.0: resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.5.0.tgz#9e10982fdc41492bb473ad13840d22f9655be2ff" integrity sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q== -outvariant@^1.2.1, outvariant@^1.3.0: +outvariant@^1.2.1, outvariant@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.0.tgz#e742e4bda77692da3eca698ef5bfac62d9fba06e" integrity sha512-AlWY719RF02ujitly7Kk/0QlV+pXGFDHrHf9O2OKqyqgBieaPOIeuSkL8sRK6j2WK+/ZAURq2kZsY0d8JapUiw== @@ -15022,7 +15071,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2, prettier@^2.0.1, prettier@^2.7.1, prettier@^2.8.0, prettier@^2.8.8: +prettier@^2, prettier@^2.0.1, prettier@^2.7.1, prettier@^2.8.0: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== @@ -16532,6 +16581,13 @@ rtl-css-js@^1.14.0: dependencies: "@babel/runtime" "^7.1.2" +run-applescript@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" + integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== + dependencies: + execa "^5.0.0" + run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -16607,6 +16663,14 @@ safe-regex-test@^1.0.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sass-loader@^12.6.0: + version "12.6.0" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-12.6.0.tgz#5148362c8e2cdd4b950f3c63ac5d16dbfed37bcb" + integrity sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA== + dependencies: + klona "^2.0.4" + neo-async "^2.6.2" + sass-loader@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-13.3.2.tgz#460022de27aec772480f03de17f5ba88fa7e18c6" @@ -16614,10 +16678,10 @@ sass-loader@^13.3.2: dependencies: neo-async "^2.6.2" -sass@^1.68.0: - version "1.68.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.68.0.tgz#0034b0cc9a50248b7d1702ac166fd25990023669" - integrity sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA== +sass@^1.67.0, sass@^1.68.0: + version "1.69.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.1.tgz#659b3b04452245dcf82f731684831e990ddb0c89" + integrity sha512-nc969GvTVz38oqKgYYVHM/Iq7Yl33IILy5uqaH2CWSiSUmRCvw+UR7tA3845Sp4BD5ykCUimvrT3k1EjTwpVUA== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -17890,6 +17954,14 @@ synckit@^0.4.1: tslib "^2.3.1" uuid "^8.3.2" +synckit@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" + integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== + dependencies: + "@pkgr/utils" "^2.3.1" + tslib "^2.5.0" + table@^6.0.9, table@^6.8.1: version "6.8.1" resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" @@ -18100,6 +18172,11 @@ tiny-invariant@^1.3.1: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== +titleize@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" + integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -18249,7 +18326,7 @@ tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.5.0, tslib@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -19175,7 +19252,7 @@ webpack-virtual-modules@^0.5.0: resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz#362f14738a56dae107937ab98ea7062e8bdd3b6c" integrity sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw== -webpack@5, webpack@^5.73.0, webpack@^5.88.2: +webpack@5, webpack@^5.58.2, webpack@^5.73.0, webpack@^5.88.2: version "5.88.2" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.88.2.tgz#f62b4b842f1c6ff580f3fcb2ed4f0b579f4c210e" integrity sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==