Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into smouillour/feat/add-esm-no…
Browse files Browse the repository at this point in the history
…-merge
  • Loading branch information
smouillour committed Jun 7, 2024
2 parents 9fe6da1 + 72eef4b commit 884c3ba
Show file tree
Hide file tree
Showing 85 changed files with 603 additions and 557 deletions.
13 changes: 0 additions & 13 deletions .changeset/early-dolphins-hammer.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fifty-fishes-shake.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/wet-eagles-grin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .github/actions/sourceclear/Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions .github/actions/sourceclear/action.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/actions/sourceclear/entrypoint.sh

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/security-scan.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/semgrep.yml

This file was deleted.

41 changes: 41 additions & 0 deletions docs/adr-2024-04-add-support-to-esm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ADR: Add support to ECMAScript Modules (ESM)

## Context

Our build and bundling setup currently uses CommonJS modules along with webpack and the dynamic-cdn-webpack-plugin.

To streamline our development workflow and reduce complexity, we are transitioning from yarn to pnpm.

However, it has been identified that pnpm is not compatible with dynamic-cdn-webpack-plugin. This incompatibility, along with the decision to remove the plugin, has resulted in a degradation of the developer experience, primarily through increased build times.

At the same time, the entire frontend world is moving towards ECMAScript Modules (ESM).

Modern browsers that our customers use now support ESM natively.

All existing frameworks are now relying on Vite for the build process, which, under the hood, relies on ESM.

Therefore, having to configure a complex toolchain is becoming obsolete. Given this changing context, we can reevaluate our decisions around the "talend-scripts build\*" toolchain.

## Problem

The transition from yarn to pnpm has uncovered an incompatibility with dynamic-cdn-webpack-plugin, exacerbating the decision to discontinue using this plugin.

This has adversely impacted the developer experience by elongating the build times, a significant concern as it can hinder our overall productivity and agility.

## Decision

Our packages must export ESM to be futur proof and let us use modern tooling like vite or parcel.

## Alternatives Considered

- **Sticking with webpack and dynamic-cdn-webpack-plugin**: This was initially considered to maintain our current setup and avoid the complexities associated with migration. However, given the incompatibility with pnpm and the underlying issues related to complexity and inefficiency in build times, this option was deemed unsuitable.

- **Switching to another build tool without adopting ESM**: Several other build tools could potentially improve build times. However, without addressing the fundamental shift towards ESM in the JavaScript ecosystem, this would be a short-term fix rather than a long-term solution.

- **Migrating to Vite while keeping our packages in CommonJS**: This alternative involves moving to Vite for its development speed advantages but not converting our packages to ESM. While this approach could reduce the immediate workload and avoid potential issues with third-party CommonJS dependencies, it would limit our ability to fully leverage Vite’s capabilities. Vite is optimized for ESM, and using CommonJS may result in suboptimal build performance and hinder live module reloading, affecting developer experience and potentially leading to more complex configurations.

## Consequences

- **Positive**: Moving to ESM and adopting Vite is expected to reduce build times, enhancing developer experience and productivity. It aligns our development practices with the modern JavaScript ecosystem's move towards ESM.
- **Negative**: The migration from CommonJS to ESM syntax could require significant effort. It might also temporarily disrupt our development workflow and necessitate additional training for developers not yet familiar with ESM or Vite.
- **Risks**: There is a risk of encountering third-party libraries not yet compatible with ESM, which could complicate the migration process.
12 changes: 12 additions & 0 deletions fork/json-schema-form-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @talend/json-schema-form-core

## 1.2.7

### Patch Changes

- 568481a: Remove usage of path-browserify as it's not needed

## 1.2.6

### Patch Changes

- f546896: Fix: improve call of use in sass files + fix ts lint

## 1.2.5

### Patch Changes
Expand Down
3 changes: 1 addition & 2 deletions fork/json-schema-form-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@talend/json-schema-form-core",
"version": "1.2.5",
"version": "1.2.7",
"description": "JSON-Schema and JSON-UI-Schema utilities for form generation.",
"main": "dist/index.js",
"module": "./lib-esm/index.js",
Expand Down Expand Up @@ -61,7 +61,6 @@
"dependencies": {
"json-refs": "3.0.15",
"objectpath": "^1.2.2",
"path-browserify": "^1.0.1",
"tv4": "^1.3.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion fork/json-schema-form-core/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
},
resolve: {
fallback: {
path: require.resolve('path-browserify'),
path: false,
},
},
};
7 changes: 7 additions & 0 deletions packages/cmf-cqrs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @talend/react-cmf-cqrs

## 10.1.4

### Patch Changes

- Updated dependencies [e48ae5f]
- @talend/react-cmf@9.0.0

## 10.1.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/cmf-cqrs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"homepage": "https://github.com/Talend/ui/cmf-cqrs#readme",
"dependencies": {
"@talend/react-cmf": "^8.4.1",
"@talend/react-cmf": "^9.0.0",
"@talend/utils": "^3.0.4",
"immutable": "^3.8.2",
"redux-saga": "^1.3.0"
Expand Down Expand Up @@ -60,5 +60,5 @@
"publishConfig": {
"access": "public"
},
"version": "10.1.3"
"version": "10.1.4"
}
7 changes: 7 additions & 0 deletions packages/cmf-router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 6.1.3

### Patch Changes

- Updated dependencies [e48ae5f]
- @talend/react-cmf@9.0.0

## 6.1.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/cmf-router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@talend/react-cmf-router",
"version": "6.1.2",
"version": "6.1.3",
"description": "",
"main": "lib/index.js",
"module": "./lib-esm/index.js",
Expand All @@ -25,7 +25,7 @@
"lint": "talend-scripts lint"
},
"dependencies": {
"@talend/react-cmf": "^8.4.1",
"@talend/react-cmf": "^9.0.0",
"connected-react-router": "^6.9.3",
"history": "^5.3.0",
"lodash": "^4.17.21",
Expand Down
6 changes: 6 additions & 0 deletions packages/cmf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @talend/react-cmf

## 9.0.0

### Major Changes

- e48ae5f: chore(TMC-27581): security issue in redux storage decorator filter

## 8.4.2

### Patch Changes
Expand Down
57 changes: 0 additions & 57 deletions packages/cmf/__tests__/reduxstorage/reduxLocalStorage.test.js

This file was deleted.

6 changes: 1 addition & 5 deletions packages/cmf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@
"redux-batched-actions": "^0.5.0",
"redux-batched-subscribe": "^0.1.6",
"redux-saga": "^1.3.0",
"redux-storage": "^4.1.2",
"redux-storage-decorator-filter": "^1.1.8",
"redux-storage-decorator-immutablejs": "^1.0.4",
"redux-storage-engine-localstorage": "^1.1.4",
"redux-thunk": "^2.4.2"
},
"devDependencies": {
Expand Down Expand Up @@ -91,5 +87,5 @@
"publishConfig": {
"access": "public"
},
"version": "8.4.2"
"version": "9.0.0"
}
Loading

0 comments on commit 884c3ba

Please sign in to comment.