Skip to content

Fix issue with plugin loader for typescript files#2030

Merged
jwoertink merged 2 commits intoluckyframework:mainfrom
wout:fix-issue-with-plugin-loader-for-typescript-files
Apr 3, 2026
Merged

Fix issue with plugin loader for typescript files#2030
jwoertink merged 2 commits intoluckyframework:mainfrom
wout:fix-issue-with-plugin-loader-for-typescript-files

Conversation

@wout
Copy link
Copy Markdown
Contributor

@wout wout commented Apr 3, 2026

Purpose

Fixes #2029

Description

When plugins process a file, they tell Bun what kind of file it is. The code was always saying "this is a JS file" regardless of the actual file type, given if it matched the js/jsx/ts/tsx regex. So when Bun received a TypeScript file, it tried to parse it as plain JavaScript and choked on type annotations like : string.

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

wout added 2 commits April 3, 2026 20:28
When plugins process a file, they tell Bun what kind of file it is. The
code was always saying "this is a JS file" regardless of the actual file
type, iven if it matched the js/jsx/ts/tsx regex. So when Bun received a
TypeScript file, it tried to prase it as plain JavaScript and choked on
type annotations like : string.
Copy link
Copy Markdown
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

🚀

@jwoertink jwoertink merged commit 9622fee into luckyframework:main Apr 3, 2026
8 of 9 checks passed
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.

Bun using Typescript

2 participants