Skip to content

Conversation

Lodin
Copy link
Contributor

@Lodin Lodin commented Feb 16, 2025

This PR significantly simplifies React wrapper generation; instead of TypeScript AST, it uses plain strings which improves the readability of the code. The code has been reduced by more than half as well. TypeScript is still used for catching syntax errors and apply common style in generated files; though, we can remove this step if needed.

Also, the generator script drops the custom fswalk and fromAsync functions in favor of the native glob (it is experimental but since it is our internal script I consider it ok). However, this change requires Node v22 LTS.

Since there are two packages managed by a root tsconfig, and glob needs newer TS libs, I had to switch the root to esnext. To keep packages on es2021, I created separate tsconfig.json files for each package. So, now, we can use es2021 for packages and use any modern stuff in our scripts.

EDIT:
Since I faced an issue in vaadin/hilla repo (we use Node v20 instead of Node v22 for building Vaadin 24.x, and going to move to Node v22 only in Vaadin 25), I decided to replace the native glob with the similar implementation from the node-glob package. I have also replaced all the obsolete utils (fswalk and fromAsync) with the glob, which revealed a minor error in the package.json update (deeply nested CSS folders were not visited and put into the package.json).

@Lodin Lodin enabled auto-merge (squash) March 31, 2025 10:39
@sissbruecker sissbruecker disabled auto-merge April 2, 2025 07:56
Copy link
Contributor

@sissbruecker sissbruecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some TeamCity agents still run Node 18, which means that building the project would not work there. See also #311.

Let's see that agents are updated first before merging this.

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ web-padawan
❌ Lodin
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants