Skip to content

[BREAKINGCHANGE] Upgrade to Node 24 (LTS) and remove CommonJS - #779

Merged
Gladorme merged 2 commits into
perses:mainfrom
Gladorme:t3code/upgrade-node24-esm-only
Aug 28, 2026
Merged

[BREAKINGCHANGE] Upgrade to Node 24 (LTS) and remove CommonJS#779
Gladorme merged 2 commits into
perses:mainfrom
Gladorme:t3code/upgrade-node24-esm-only

Conversation

@Gladorme

@Gladorme Gladorme commented Aug 24, 2026

Copy link
Copy Markdown
Member

Description

  • Upgrade the TypeScript toolchain to Node.js 24 LTS and ES2023.
  • Remove CommonJS output and publish ESM only.
  • Enforce safe top-level import type declarations with Oxlint, hopefully it can reduce bundle size

Related PR:

Screenshots

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.

@Gladorme
Gladorme force-pushed the t3code/upgrade-node24-esm-only branch from 065fd5b to d463747 Compare August 24, 2026 17:44
@Gladorme Gladorme changed the title [BREAKINGCHANGE] Upgrade to Node 24 (LTS) and remove CommonJS - #78 [BREAKINGCHANGE] Upgrade to Node 24 (LTS) and remove CommonJS Aug 24, 2026
@Gladorme
Gladorme force-pushed the t3code/upgrade-node24-esm-only branch 2 times, most recently from 970c818 to 6c6223a Compare August 27, 2026 15:10
@Gladorme
Gladorme marked this pull request as ready for review August 27, 2026 15:37
@Gladorme
Gladorme requested review from a team and andreasgerstmayr as code owners August 27, 2026 15:37
@Gladorme
Gladorme requested review from shahrokni and removed request for a team August 27, 2026 15:37
Comment thread vitest.shared.ts

@Gladorme Gladorme Aug 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can't remove it without having an issue with mdi-material-ui icons deep imports (from shared) :[

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looking for a solution, I see Rspack is providing lazy barrel imports and could make use remove the rule about not importing from main barrel (https://rspack.rs/guide/optimization/lazy-barrel), as md-matrerial-ui looks to be built with sideEffect: false. And I guess we should do it also for Perses components. It can reduce bundle size for embedded usage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't get all, but two questions

  • Is it blocking this PR, or working but not elegant
  • Can you create an issue if something needs to be changed after the PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Working but not elegant

Comment thread vitest.shared.ts
@@ -38,6 +38,11 @@ const sharedConfig = defineConfig({
environment: 'jsdom',
globals: true,
include: ['src/**/*.test.{ts,tsx,js,jsx}', 'src/**/*.spec.{ts,tsx,js,jsx}'],
server: {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Related to previous comment :[

Comment thread vitest.shared.ts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't get all, but two questions

  • Is it blocking this PR, or working but not elegant
  • Can you create an issue if something needs to be changed after the PR

- Update build tooling and package metadata for ESM output
- Enforce type-only imports across plugins

Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
Signed-off-by: Guillaume LADORME <Gladorme@users.noreply.github.com>
@Gladorme
Gladorme force-pushed the t3code/upgrade-node24-esm-only branch from 6c6223a to 93e8629 Compare August 28, 2026 09:25
@Gladorme
Gladorme added this pull request to the merge queue Aug 28, 2026
Merged via the queue into perses:main with commit 216c7cd Aug 28, 2026
17 checks passed
@Gladorme
Gladorme deleted the t3code/upgrade-node24-esm-only branch August 28, 2026 09:53
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.

2 participants