Skip to content

chore: drop ts-node from the setup scripts and example apps - #194

Merged
floyd-soomgo merged 4 commits into
masterfrom
chore/drop-ts-node-from-examples
Sep 7, 2026
Merged

chore: drop ts-node from the setup scripts and example apps#194
floyd-soomgo merged 4 commits into
masterfrom
chore/drop-ts-node-from-examples

Conversation

@floyd-soomgo

@floyd-soomgo floyd-soomgo commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Run the setup scripts and e2e entry with tsx, and remove ts-node from the root devDependencies.
  • Update setup scripts to install and invoke tsx. Rename configure-ts-node to configure-tsconfig; it now only adds code-push.config.ts to tsconfig.json.
  • Remove ts-node configuration from all 13 example apps and regenerate the affected lockfiles.
  • Delete scripts/setupExampleApp/tsconfig.json, which was only used by ts-node --project.

Depends on #193, which adds tsx as a library dependency. Its three commits are included in this PR until #193 merges.

Verification

  • npm run type:scripts, npm run type:e2e, and ESLint for changed scripts
  • Confirmed tsx launches both setup scripts and e2e/run.ts with --help
  • Confirmed Examples/RN0821 syncs the local library through tsx

@floyd-soomgo floyd-soomgo self-assigned this Sep 3, 2026
@floyd-soomgo
floyd-soomgo changed the base branch from master to feat/tsx-config-loader September 3, 2026 05:44
@floydkim
floydkim changed the base branch from feat/tsx-config-loader to master September 3, 2026 15:48
@floyd-soomgo
floyd-soomgo force-pushed the chore/drop-ts-node-from-examples branch from 0bbd379 to 5c7e8be Compare September 3, 2026 15:52
floydkim added a commit that referenced this pull request Sep 6, 2026
…node (#193)

## Summary

- Load `code-push.config.ts` with `tsx`, falling back to `ts-node` for
projects that still use it.
- Make `tsx` and `ts-node` optional peer dependencies, so projects
install the loader they choose.
- Resolve loaders from the project containing the config file. If
neither is installed, show how to install `tsx`.
- With `tsx`, support default exports and `tsconfig` `paths` aliases.
`.js` config files continue to load through Node's `require`.
- Add a CI smoke test for a default-export config that uses a `paths`
alias.
- Recommend `tsx` and deprecate `ts-node` support.
- Warn on stderr when a config file is loaded with `ts-node`.

## Compatibility notes

Existing `ts-node` projects need no changes. Installing `tsx` makes it
the preferred loader; removing `ts-node` is optional.

After switching to `tsx`:

- modules listed in `ts-node.require` no longer run
- aliases defined only in `babel.config.js` are not resolved; define
them in `tsconfig.json` `paths`
- type errors in the config file no longer block the CLI, because `tsx`
transpiles without type-checking

`ts-node` support is deprecated and will be removed in a future major
version.

## Verification

- `npm run type:cli` and ESLint on changed files
- `npm run --workspace cli test`: 11 suites, 102 tests
- verified the compiled CLI with the CI fixture and RN0821, Expo55, and
soomgo-mobile-app configs, including default exports and `tsconfig`
`paths` aliases
- verified `ts-node` fallback with a CommonJS config in a project that
has `ts-node` but not `tsx`
- verified the `tsx` installation hint and exit code 1 when neither
loader is installed

## Follow-up

Example setup scripts and apps still use `ts-node`; their migration is
handled separately in #194.

---------

Co-authored-by: Floyd Kim <for12gm@gmail.com>
@floyd-soomgo
floyd-soomgo force-pushed the chore/drop-ts-node-from-examples branch from 5c7e8be to 66dd7f7 Compare September 6, 2026 13:55
@floydkim
floydkim marked this pull request as ready for review September 6, 2026 14:28
@floyd-soomgo
floyd-soomgo force-pushed the chore/drop-ts-node-from-examples branch from 2b29305 to e9eb269 Compare September 6, 2026 15:33
floyd-soomgo and others added 4 commits September 7, 2026 15:04
tsx ships with the library since the config loader moved to it, so the root scripts, the
example apps' sync-local-library script and the setup steps no longer need ts-node. The
`configure-ts-node` step becomes `configure-tsconfig`: it still adds code-push.config.ts to
`include` for the editor, but no longer writes a `ts-node` block into tsconfig.json.
The sync-local-library script runs with tsx, and the tsconfig ts-node block has no reader any more. Lockfiles were regenerated with --package-lock-only.
The app has a code-push.config.ts but never carried a loader, so the CLI could not read its
config now that tsx is an optional peer dependency. It joins the other examples in declaring
tsx as a devDependency. The lockfile was regenerated with --package-lock-only.
@floyd-soomgo
floyd-soomgo force-pushed the chore/drop-ts-node-from-examples branch from e9eb269 to 9e30d54 Compare September 7, 2026 06:04
@floyd-soomgo
floyd-soomgo merged commit 25c2c3e into master Sep 7, 2026
2 checks passed
@floyd-soomgo
floyd-soomgo deleted the chore/drop-ts-node-from-examples branch September 7, 2026 06:06
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