Skip to content

chore(all): replace esbuild-register with ts-node/register in pm2, sc…#20390

Draft
dschom wants to merge 1 commit intomainfrom
worktree-switch-to-ts-node
Draft

chore(all): replace esbuild-register with ts-node/register in pm2, sc…#20390
dschom wants to merge 1 commit intomainfrom
worktree-switch-to-ts-node

Conversation

@dschom
Copy link
Copy Markdown
Contributor

@dschom dschom commented Apr 16, 2026

…ripts, and mocha commands

chore(all): Use tsc instead of esbuild

Because:

  • We want to test & develop with what we deploy

This Commit:

  • Removes esbuild
  • Uses tsc & ts-node instead
  • Fixes several nx config issues that were messing up caching
  • Fixes esm hacks for vendored modules
  • Creates dedicated build-ts target for typescript compilation, which makes nx task dependencies easier to configure.
  • Updates startup commands to use ts-node

Because

This pull request

Issue that this pull request solves

Closes: (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.


await execAsync(
`node -r esbuild-register scripts/dump-users --emails ${account1Mock.email},${account2Mock.email} > ${USER_DUMP_PATH}`,
`node -r ts-node/register/transpile-only -r tsconfig-paths/register scripts/dump-users --emails ${account1Mock.email},${account2Mock.email} > ${USER_DUMP_PATH}`,
it('succeeds with valid input file and method, writing files to disk', async () => {
await execAsync(
`node -r esbuild-register scripts/bulk-mailer --input ${USER_DUMP_PATH} --method sendPasswordChangedEmail --write ${OUTPUT_DIRECTORY}`,
`node -r ts-node/register/transpile-only -r tsconfig-paths/register scripts/bulk-mailer --input ${USER_DUMP_PATH} --method sendPasswordChangedEmail --write ${OUTPUT_DIRECTORY}`,
it('succeeds with valid input file and method, writing emails to stdout', async () => {
const output = await execAsync(
`node -r esbuild-register scripts/bulk-mailer --input ${USER_DUMP_PATH} --method sendPasswordChangedEmail`,
`node -r ts-node/register/transpile-only -r tsconfig-paths/register scripts/bulk-mailer --input ${USER_DUMP_PATH} --method sendPasswordChangedEmail`,
it('succeeds with valid input file and method, sends', async () => {
await execAsync(
`node -r esbuild-register scripts/bulk-mailer --input ${USER_DUMP_PATH} --method sendVerifyEmail --send`,
`node -r ts-node/register/transpile-only -r tsconfig-paths/register scripts/bulk-mailer --input ${USER_DUMP_PATH} --method sendVerifyEmail --send`,
@dschom dschom force-pushed the worktree-switch-to-ts-node branch 3 times, most recently from 98473ba to 4abad51 Compare April 16, 2026 22:31
…ripts, and mocha commands

chore(all): Use tsc instead of esbuild

Because:
- We want to test & develop with what we deploy

This Commit:
- Removes esbuild
- Uses tsc & ts-node instead
- Fixes several nx config issues that were messing up caching
- Fixes esm hacks for vendored modules
- Creates dedicated build-ts target for typescript compilation, which makes nx task dependencies easier to configure.
- Updates startup commands to use ts-node
@dschom dschom force-pushed the worktree-switch-to-ts-node branch from 4abad51 to a6d1a55 Compare April 16, 2026 23:23
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