Skip to content

chore(deps): Remove tsx. Use plain node instead#2063

Merged
Tobbe merged 4 commits into
mainfrom
tobbe-chore-deps-remove-tsx-ii
Jul 8, 2026
Merged

chore(deps): Remove tsx. Use plain node instead#2063
Tobbe merged 4 commits into
mainfrom
tobbe-chore-deps-remove-tsx-ii

Conversation

@Tobbe

@Tobbe Tobbe commented Jul 8, 2026

Copy link
Copy Markdown
Member

One Enum and a few extensions that had to be replaced. After that node just worked. No need for tsx anymore.
Thank you for your service, tsx 🙏 ❤️

@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 02e6988
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6a4ebe88ec45cc00076f892e

@github-actions github-actions Bot added this to the chore milestone Jul 8, 2026
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the tsx TypeScript execution engine from the entire monorepo, replacing it with plain node, which works natively on the project's Node.js 24 baseline (which ships with built-in TypeScript type stripping).

  • Dependency removal: tsx is dropped from devDependencies in the root package.json and every package that listed it; all tsx-prefixed script invocations are replaced with node.
  • Import extension updates: Intra-package imports in .ts/.mts files are updated from .js/.mjs to .ts/.mts so Node's resolver can find the actual source files directly.
  • TypeScript enum → as const: enum Stage in tarsync/output.mts is rewritten as an as const object plus a derived type alias, because Node's type-stripping mode cannot process TypeScript enums (they require compilation, not just erasure).

Confidence Score: 5/5

Safe to merge — all changes are consistent and the project's existing Node 24 baseline fully supports native TypeScript type stripping.

The change is a mechanical dependency removal: scripts swap a wrapper tool for plain node, import specifiers are updated to match actual file extensions, one enum is converted to the equivalent as const pattern, and one dynamic JSON import is replaced with fs.readFileSync. Node 24 ships with built-in TS type stripping so the runtime requirement is already met. All referenced files were confirmed to exist with the correct extensions.

No files require special attention.

Important Files Changed

Filename Overview
package.json Removes tsx from devDependencies; switches four scripts from tsx to node
tasks/framework-tools/tarsync/output.mts Converts TypeScript enum Stage to as const object + type alias; updates import specifiers to .mts
tasks/e2e-background-jobs/run.mts Replaces makeFilePath-based dynamic JSON import with fs.readFileSync + JSON.parse; updates specifiers to .mts
tasks/e2e-background-jobs/util.mts Removes makeFilePath helper and its pathToFileURL import now that dynamic JSON import is no longer used
packages/create-cedar-rsc-app/src/index.ts All intra-package imports switched from .js to .ts extensions for compatibility with Node's native TS resolution
tasks/k6-test/run-k6-tests.mts Updates import specifiers to .mts; dynamically imports setup.mts files (which exist) instead of setup.mjs
.github/workflows/publish-release-candidate.yml Replaces yarn tsx with node for the publish RC script step
.github/workflows/smoke-tests-react-18-test.yml Replaces yarn tsx with node for the downgrade-to-React-18 task step

Reviews (3): Last reviewed commit: "remove unused method" | Re-trigger Greptile

@Tobbe Tobbe force-pushed the tobbe-chore-deps-remove-tsx-ii branch from 6e98d8c to 8b44ee9 Compare July 8, 2026 19:54
@nx-cloud

nx-cloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 8b44ee9

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 2s View ↗
nx run-many -t build ✅ Succeeded 4m 1s View ↗
nx run-many -t test --minWorkers=1 --maxWorkers=4 ✅ Succeeded 8s View ↗
nx run-many -t test:types ✅ Succeeded 10s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-08 21:33:10 UTC

@Tobbe Tobbe merged commit 521a504 into main Jul 8, 2026
46 checks passed
@Tobbe Tobbe deleted the tobbe-chore-deps-remove-tsx-ii branch July 8, 2026 21:37
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

The changes in this PR are now available on npm.

Try them out by running yarn cedar upgrade -t 5.0.0-canary.2607

Or try it in a new app with yarn dlx create-cedar-app@5.0.0-canary.2607

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.

1 participant