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

feat: add support for tsimp #410

Merged
merged 1 commit into from
Sep 20, 2024
Merged

feat: add support for tsimp #410

merged 1 commit into from
Sep 20, 2024

Conversation

stuft2
Copy link
Contributor

@stuft2 stuft2 commented Sep 19, 2024

Adds support for loading TypeScript plugins via tsimp.

Due to the fact that Node.js versions older than v20 are no longer supported in Fastify v5, I chose not to implement support for the alternate loader script (i.e. --loader=tsimp/loader) that tsimp provides.

Caution

tsimp currently has an open issue and corresponding PR to fix a bug limiting TypeScript support to version 5.5 or earlier (the latest version of TypeScript is v5.6.2). I'm happy to wait on this PR until the tsimp bug is fixed, at which point I will update the TypeScript and tsimp versions.

Checklist

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stuft2
Copy link
Contributor Author

stuft2 commented Sep 19, 2024

Would you rather wait for tsimp to fix their typescript bug before merging or does it not matter to you since it's a dev dependency?

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 19, 2024

Imho irrelevant for us if the bug is fixed or not.

i never heard of tsimp, so i let others decide if it is relevant or not. But codewise i think it is acceptable.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 4e27b9b into fastify:master Sep 20, 2024
11 checks passed
@mcollina
Copy link
Member

Tests are passing, this can land

@stuft2 stuft2 deleted the feat/tsimp branch September 20, 2024 13:45
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