Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ts-node with tsx #1003

Merged
merged 5 commits into from
Dec 13, 2023
Merged

Replace ts-node with tsx #1003

merged 5 commits into from
Dec 13, 2023

Conversation

jleedev
Copy link
Member

@jleedev jleedev commented Dec 13, 2023

Fix a module hook incompatibility. And hey, it's no longer "experimental" so this (facet of the house of cards) should be stable now.

Should now be able to run on any version of Node.js 18 or later.

Tested on: 18.18.2, 18.19.0, 21.4.0

apparently node 18.19.0 decided to change the (admittedly experimental)
import hooks in a backwards-incompatible way. ts-node has not had a
release to support this new interface, so switch to tsx which has.

incidentally this also means the scripts are now compiled with esbuild
instead of with typescript, but we already depend on esbuild.
(and it's been a TODO to actually run tsc to typecheck everything.)
@ZeLonewolf
Copy link
Member

Need to replace ts-node calls in package.json and one ts-node call in one of the github workflows.

@jleedev
Copy link
Member Author

jleedev commented Dec 13, 2023

Well, "Build PR Preview / deploy-preview" is failing at the "Install and Build Main Branch", because it is broken.

@ZeLonewolf
Copy link
Member

Looks like there is still a ts-node scripts/build in that action's output

@ZeLonewolf
Copy link
Member

This action:

      - name: Use Node.js 18.x
        uses: actions/setup-node@v3
        with:
          node-version: 18.x

Needs to move up higher, before the first invocation of npm.

@ZeLonewolf
Copy link
Member

There are also two actions labelled "deploy-preview", so one of them should probably be renamed for sanity sake when looking at output runs.

@jleedev
Copy link
Member Author

jleedev commented Dec 13, 2023

Looks like there is still a ts-node scripts/build in that action's output

Yes, because it switches to a different branch.

Needs to move up higher, before the first invocation of npm.

I don't disagree, but that's not directly related to this change.

@ZeLonewolf
Copy link
Member

I believe this is safe to merge, and then main branch will be sane again

@jleedev jleedev merged commit 8baee21 into main Dec 13, 2023
3 of 4 checks passed
@jleedev jleedev deleted the jleedev/churn branch December 13, 2023 04:49
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