Skip to content

build: drop tsx in favor of Node.js type stripping#1125

Merged
dsanders11 merged 2 commits into
mainfrom
build/drop-tsx
May 19, 2026
Merged

build: drop tsx in favor of Node.js type stripping#1125
dsanders11 merged 2 commits into
mainfrom
build/drop-tsx

Conversation

@dsanders11

@dsanders11 dsanders11 commented May 18, 2026

Copy link
Copy Markdown
Member

Description of Change

Main motivation here is the i18n deploy job has been failing since #1106, with some sort of JS import error.

To make this work we need to enforce file extensions (via import/extensions in oxlint) and enforce consistent usage of type imports (via typescript/consistent-type-imports in oxlint).

The helper scripts needed to be made ESM as part of this, so import.meta.dirname was swapped in for __dirname and that seems to be the only real change needed. There was also one minor tweak for importing from @docusaurus/logger to keep things happy with ESM, and I made it throughout the codebase to keep things consistent. The overall code base can't make the ESM leap until Docusaurus better supports it upstream, I think their goal is v4 will be the one.

There is one somewhat nasty hack in scripts/prepare-i18n-content.ts to make this CJS vs ESM dance work, unfortunately.

Checklist

  • This PR was not created with AI. (PRs created mainly with AI will be closed. They waste our team's time. We ban repeat offenders.)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 18, 2026

Copy link
Copy Markdown

Deploying electron-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: d268a97
Status: ✅  Deploy successful!
Preview URL: https://309e0eda.electron-website.pages.dev
Branch Preview URL: https://build-drop-tsx.electron-website.pages.dev

View logs

@dsanders11 dsanders11 force-pushed the build/drop-tsx branch 3 times, most recently from 2f2a5c1 to adf8749 Compare May 18, 2026 21:45
Assisted-by: Claude Opus 4.7
@dsanders11 dsanders11 marked this pull request as ready for review May 18, 2026 22:06
@dsanders11 dsanders11 requested a review from a team as a code owner May 18, 2026 22:06
Comment thread src/transformers/api-history.ts
@dsanders11 dsanders11 merged commit c739256 into main May 19, 2026
7 checks passed
@dsanders11 dsanders11 deleted the build/drop-tsx branch May 19, 2026 21:02
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.

3 participants