Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ARCH-737): add ESM support (recovery PR) #5329

Merged
merged 62 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
fc62669
feat(ARCH-737): add ESM support
jmfrancois Apr 9, 2024
682110c
Merge fc626699a0d5339abbbf9a59c0ac71ccdb7a35b3 into f4889d374fd355efd…
jmfrancois Apr 9, 2024
af34033
chore: yarn-deduplicate
github-actions[bot] Apr 9, 2024
2c34921
Add esm in containers and components
smouillour Apr 9, 2024
028541a
lock file
smouillour Apr 9, 2024
38c70ef
Merge 028541a51bd51c5cf79351745734fb7f761a60d4 into f4889d374fd355efd…
jmfrancois Apr 9, 2024
d6d843c
chore: yarn-deduplicate
github-actions[bot] Apr 9, 2024
8d25e90
fix sass + add alias
smouillour Apr 9, 2024
b0e782d
design-system, icons and utils
smouillour Apr 9, 2024
c89a3b4
fix icons
smouillour Apr 10, 2024
4a8e04d
design-tokens
smouillour Apr 10, 2024
52cfee9
react-bootstrap, a11y, cmf, forms
smouillour Apr 10, 2024
0093762
sync with master
smouillour Apr 15, 2024
1e1a39c
cmf-router, dataviz, design-tokens and faceted-search
smouillour Apr 15, 2024
bfee817
design-tokens
smouillour Apr 15, 2024
afef114
storybook-docs and theme: upgrade sass-loader and fix use tokens
smouillour Apr 15, 2024
df48569
scripts-config-react-webpack upgrade sass-loader
smouillour Apr 15, 2024
c0fcb86
json-schema-form-core: add esm, ds fix ts issue
smouillour Apr 15, 2024
e0c2e82
playground: make it works (almost)
smouillour Apr 15, 2024
728ba83
Merge e0c2e8228462b6dd60f443ca9d8c184beb2c0e71 into 48865e5e5f874cf92…
jmfrancois Apr 15, 2024
6eeaf7d
chore: yarn-deduplicate
github-actions[bot] Apr 15, 2024
d3ef679
mockVite playground
smouillour Apr 15, 2024
4c278ce
Merge d3ef6795048aa04f6f4d6e0885643287409d0417 into 48865e5e5f874cf92…
jmfrancois Apr 15, 2024
8307c70
chore: yarn-deduplicate
github-actions[bot] Apr 15, 2024
d21d8b0
fix: build pass on storybook-docs
jmfrancois Apr 16, 2024
6e87a26
change target for esm to lib-esm
smouillour Apr 16, 2024
7bb2022
revert previous commit
smouillour Apr 16, 2024
fd500c5
fix webpack config for theme
smouillour Apr 16, 2024
76a76d7
upgrade sass and use modern-compiler in storybook-docs
smouillour Apr 16, 2024
b892265
add sassOptions to theme
smouillour Apr 18, 2024
5798bf9
fix playground facetedSearch
smouillour Apr 18, 2024
fa9601a
improve meta management
smouillour Apr 18, 2024
a075c41
Merge fa9601afcd8b08642a09df8d824a40e006d90d4d into 48865e5e5f874cf92…
jmfrancois Apr 18, 2024
c833884
chore: yarn-deduplicate
github-actions[bot] Apr 18, 2024
88d57f5
change target folder for esm from lib/esm to lib-esm
smouillour Apr 18, 2024
13a5078
feat: add --esm option to talend-scripts build:lib
jmfrancois Apr 19, 2024
ad18d88
chore: add changeset
jmfrancois Apr 19, 2024
3a2970b
fix design-tokens and icons
smouillour Apr 22, 2024
4a97992
fix playground config+extension
smouillour Apr 22, 2024
03f3aa4
scripts-config-react-webpack: add fallback for path and alias for des…
smouillour Apr 22, 2024
a59e0b0
fix esm config for json-schema-form-core, cmf
smouillour Apr 22, 2024
b0796f9
remove tild on @use
smouillour Apr 23, 2024
7a3b78e
fix scripts-config-react-webpack
smouillour Apr 23, 2024
0663909
add build:esm in postinstall
smouillour Apr 23, 2024
594cfe4
Merge branch 'master' into jmfrancois/feat/add-esm-support-arch-737
smouillour Apr 23, 2024
9852b3d
sync with master
smouillour Apr 23, 2024
088f558
improvements
smouillour Apr 23, 2024
1e4362f
Merge remote-tracking branch 'origin' into jmfrancois/feat/add-esm-su…
smouillour Apr 23, 2024
0a00760
fix for test:demo
smouillour Apr 23, 2024
7c2b4f9
keep playground in as it was and add playground-vite
smouillour Apr 26, 2024
791c6d9
some fix
smouillour May 6, 2024
9fe6da1
fix review
smouillour Jun 6, 2024
884c3ba
Merge remote-tracking branch 'origin' into smouillour/feat/add-esm-no…
smouillour Jun 7, 2024
1061f94
fix @talend/react-cmf version in playground-vite
smouillour Jun 7, 2024
dffb53d
theme: undo changes made in _helpers.scss
smouillour Jun 7, 2024
4ba3b6d
add changeset + init package.json version for playground-vite
smouillour Jun 7, 2024
75fff0b
add changeset
smouillour Jun 7, 2024
1a8aecf
add changeset
smouillour Jun 7, 2024
43ad199
update changeset
smouillour Jun 7, 2024
4f610f6
update changeset
smouillour Jun 7, 2024
932c59a
clean
smouillour Jun 7, 2024
7772215
fix review
smouillour Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/cyan-zoos-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@talend/scripts-config-babel": minor
---

feat: add preset modules option

if process.env.ESM is set to true then the babel config will set preset-env.modules option to `false` so the output will be esm.
20 changes: 20 additions & 0 deletions .changeset/smooth-queens-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@talend/scripts-config-react-webpack": minor
"@talend/json-schema-form-core": minor
"@talend/react-faceted-search": minor
"@talend/design-system": minor
"@talend/design-tokens": minor
"@talend/react-bootstrap": minor
"@talend/assets-api": minor
"@talend/react-cmf-router": minor
"@talend/react-components": minor
"@talend/react-containers": minor
"@talend/react-dataviz": minor
"@talend/react-forms": minor
"@talend/icons": minor
"@talend/utils": minor
"@talend/react-a11y": minor
"@talend/react-cmf": minor
---

Add support to ESM
8 changes: 8 additions & 0 deletions .changeset/spotty-trains-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@talend/storybook-docs": patch
"@talend/design-docs": patch
"@talend/bootstrap-theme": patch
"@talend/scripts-config-storybook-lib": patch
---

Make it compatible with ESM
5 changes: 5 additions & 0 deletions .changeset/three-poets-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@talend/scripts-core": minor
---

feat: add --esm option to talend-scripts build:lib
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ build/
/packages/*/i18n/
tmp/
lib/
lib-esm/
storybook-static/
dist/
eslint-report.json
Expand Down
9 changes: 8 additions & 1 deletion fork/json-schema-form-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
"version": "1.2.7",
"description": "JSON-Schema and JSON-UI-Schema utilities for form generation.",
"main": "dist/index.js",
"mainSrc": "src/index.js",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./dist/index.js"
}
},
"scripts": {
"build:lib": "rimraf dist && talend-scripts build --umd",
"build:lib:esm": "talend-scripts build --esm",
"watch": "webpack --watch",
"dist-untested": "webpack --config webpack.config.dist.js",
"test:cov": "npm run test",
Expand Down
7 changes: 7 additions & 0 deletions fork/json-schema-form-core/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
}
}
9 changes: 9 additions & 0 deletions fork/react-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,17 @@
"homepage": "https://react-bootstrap.github.io/",
"sideEffects": false,
"main": "lib/index.js",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"scripts": {
"build:dev": "talend-scripts build --umd --dev",
"build:prod": "talend-scripts build --umd --prod",
"build:lib:esm": "talend-scripts build --esm",
"pre-release": "yarn build:dev && yarn build:prod",
"build:lib": "talend-scripts build",
"lint": "talend-scripts lint",
Expand Down Expand Up @@ -40,6 +48,7 @@
"devDependencies": {
"@talend/eslint-config": "^13.0.3",
"@talend/eslint-plugin": "^1.1.1",
"@talend/scripts-config-typescript": "^11.2.1",
"@talend/scripts-core": "^16.3.5",
"@talend/scripts-config-babel": "^13.3.1",
"@talend/scripts-config-react-webpack": "^16.6.0",
Expand Down
7 changes: 7 additions & 0 deletions fork/react-bootstrap/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
}
}
4 changes: 4 additions & 0 deletions fork/react-bootstrap/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": ["src/**/*"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"typescript": "^5.3.3"
},
"scripts": {
"postinstall": "talend-yarn-workspace run build:lib",
"postinstall": "talend-yarn-workspace run build:lib && talend-yarn-workspace run build:lib:esm",
"pre-release": "talend-yarn-workspace run pre-release",
"start": "yarn workspace @talend/ui-playground run start",
"start-storybook": "yarn workspace @talend/ui-storybook-one run start",
Expand Down
8 changes: 8 additions & 0 deletions packages/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@
"mainSrc": "src/index.js",
"license": "Apache-2.0",
"types": "./lib/index.d.ts",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"scripts": {
"build:lib": "talend-scripts build",
"build:lib:esm": "talend-scripts build --esm",
"test": "talend-scripts test",
"lint": "talend-scripts lint"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/a11y/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
}
}
9 changes: 8 additions & 1 deletion packages/assets-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
"description": "A set of API designed to access assets using CDN",
"types": "lib/index.d.ts",
"main": "lib/index.js",
"mainSrc": "src/index.ts",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"license": "Apache-2.0",
"scripts": {
"pre-release": "talend-scripts build --umd && talend-scripts build --umd --dev",
"build:lib": "talend-scripts build",
"build:lib:esm": "talend-scripts build --esm",
"start": "echo nothing to start",
"test": "talend-scripts test",
"test:watch": "talend-scripts test --watch",
Expand Down
9 changes: 9 additions & 0 deletions packages/assets-api/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"exclude": ["src/**/*.test.ts"],
"compilerOptions": {
"declaration": true,
"outDir": "lib-esm",
"module": "ESNext"
}
}
9 changes: 9 additions & 0 deletions packages/cmf-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
"version": "6.1.3",
"description": "",
"main": "lib/index.js",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"author": "Talend Frontend <[email protected]> (http://www.talend.com)",
"license": "Apache-2.0",
"scripts": {
"build:dev": "talend-scripts build --umd --dev",
"build:prod": "talend-scripts build --umd --prod",
"build:lib:esm": "talend-scripts build --esm",
"pre-release": "yarn build:dev && yarn build:prod",
"build:lib": "talend-scripts build",
"start": "echo nothing to start",
Expand Down Expand Up @@ -39,6 +47,7 @@
"@talend/scripts-core": "^16.3.5",
"@talend/scripts-config-babel": "^13.3.1",
"@talend/scripts-config-react-webpack": "^16.5.1",
"@talend/scripts-config-typescript": "^11.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"redux-saga-tester": "^1.0.874"
Expand Down
7 changes: 7 additions & 0 deletions packages/cmf-router/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
}
}
4 changes: 4 additions & 0 deletions packages/cmf-router/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": ["src/**/*"]
}
13 changes: 13 additions & 0 deletions packages/cmf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
"main": "lib/index.js",
"mainSrc": "src/index.js",
"license": "Apache-2.0",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
},
"./lib/*": {
"import": "./lib-esm/*",
"require": "./lib/*"
}
},
"scripts": {
"build:dev": "talend-scripts build --umd --dev",
"build:prod": "talend-scripts build --umd --prod",
"build:lib:esm": "talend-scripts build --esm",
"pre-release": "yarn build:dev && yarn build:prod",
"build:lib": "talend-scripts build",
"start": "echo nothing to start",
Expand Down Expand Up @@ -54,6 +66,7 @@
"@redux-saga/testing-utils": "^1.1.5",
"@talend/eslint-config": "^13.0.3",
"@talend/eslint-plugin": "^1.1.1",
"@talend/scripts-config-typescript": "^11.2.1",
"@talend/scripts-core": "^16.3.5",
"@talend/scripts-config-babel": "^13.3.1",
"@talend/scripts-config-jest": "^14.0.2",
Expand Down
7 changes: 7 additions & 0 deletions packages/cmf/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
}
}
4 changes: 4 additions & 0 deletions packages/cmf/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": ["src/**/*"]
}
19 changes: 15 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
"name": "@talend/react-components",
"description": "Set of react components.",
"main": "lib/index.js",
"mainSrc": "src/index.js",
"module": "./lib-esm/index.js",
"exports": {
"./lib/*": {
"import": "./lib-esm/*/index.js",
"require": "./lib/*/index.js"
},
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"license": "Apache-2.0",
"scripts": {
"build:dev": "talend-scripts build --umd --dev",
"build:prod": "talend-scripts build --umd --prod",
"pre-release": "yarn build:dev && yarn build:prod",
"build:lib": "talend-scripts build && yarn run tsc",
"build:lib:esm": "talend-scripts build --esm",
"watch": "talend-scripts build --watch",
"tsc": "tsc --emitDeclarationOnly --project ./tsconfig.json --outDir ./types",
"test": "cross-env TZ=UTC talend-scripts test",
Expand Down Expand Up @@ -78,15 +89,15 @@
"@talend/eslint-plugin": "^1.1.1",
"@talend/locales-design-system": "^7.15.1",
"@talend/locales-tui-components": "^11.4.5",
"@talend/scripts-core": "^16.3.5",
"@talend/scripts-config-babel": "^13.3.1",
"@talend/scripts-config-react-webpack": "^16.5.1",
"@talend/scripts-config-storybook-lib": "^5.3.1",
"@talend/scripts-config-typescript": "^11.2.1",
"@talend/scripts-core": "^16.3.5",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/classnames": "^2.3.1",
"@types/d3": "^7.4.3",
"@types/jest": "^29.5.12",
Expand All @@ -102,8 +113,8 @@
"react": "^18.2.0",
"react-a11y": "^0.3.4",
"react-dom": "^18.2.0",
"react-router-dom": "~6.3.0",
"react-i18next": "^13.5.0",
"react-router-dom": "~6.3.0",
"react-test-renderer": "^18.2.0"
},
"peerDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions packages/components/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "src/**/*.stories.*", "src/**/*.test.*"],
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
}
}
14 changes: 13 additions & 1 deletion packages/containers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@
"name": "@talend/react-containers",
"description": "Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.",
"main": "lib/index.js",
"mainSrc": "src/index.js",
"types": "lib/index.d.ts",
"module": "./lib-esm/index.js",
"exports": {
"./lib/*": {
"import": "./lib-esm/*/index.js",
"require": "./lib/*/index.js"
},
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"license": "Apache-2.0",
"scripts": {
"build:dev": "talend-scripts build --umd --dev",
"build:prod": "talend-scripts build --umd --prod",
"pre-release": "yarn build:dev && yarn build:prod",
"build:lib": "talend-scripts build",
"build:lib:esm": "talend-scripts build --esm",
"start": "talend-scripts start-storybook -p 6007",
"test": "talend-scripts test",
"test:watch": "talend-scripts test --watch",
Expand Down
9 changes: 9 additions & 0 deletions packages/containers/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@talend/scripts-config-typescript/tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"declaration": true,
"outDir": "lib-esm",
"module": "ESNext"
}
}
9 changes: 8 additions & 1 deletion packages/dataviz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
"version": "6.1.5",
"description": "Talend charts and visualization components",
"main": "lib/index.js",
"mainSrc": "src/index.ts",
"types": "./lib/index.d.ts",
"module": "./lib-esm/index.js",
"exports": {
".": {
"import": "./lib-esm/index.js",
"require": "./lib/index.js"
}
},
"license": "Apache-2.0",
"scripts": {
"pre-release": "yarn build:umd:dev && yarn build:umd:prod",
"build:umd:dev": "talend-scripts build --umd --dev",
"build:umd:prod": "talend-scripts build --umd",
"build:lib": "talend-scripts build",
"build:lib:esm": "talend-scripts build --esm",
"build-storybook": "talend-scripts build-storybook",
"extract-i18n": "i18next-scanner --config i18next-scanner.config.js",
"lint": "talend-scripts lint",
Expand Down
8 changes: 8 additions & 0 deletions packages/dataviz/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "lib-esm",
"module": "ESNext"
},
"exclude": ["src/**/*.test.*", "src/**/*.stories.*", "src/**/*.cy.*"]
}
Loading
Loading