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

fix(lexer): do not treat '#bun' in a url as a pragma #15912

Merged
merged 9 commits into from
Dec 21, 2024

Conversation

DonIsaac
Copy link
Contributor

What does this PR do?

Fixes #15884.

Re-creation of #15888, which was reverted by @Jarred-Sumner in #15899 due to mishandling of hashbangs. This PR fixes that bug and adds many more tests that cover other edge cases.

@DonIsaac DonIsaac added the transpiler parser || printer label Dec 20, 2024
@robobun
Copy link

robobun commented Dec 20, 2024

Updated 3:08 PM PT - Dec 20th, 2024

@DonIsaac, your commit f9fe792 has passed in #8355! 🎉


🧪   try this PR locally:

bunx bun-pr 15912

@DonIsaac
Copy link
Contributor Author

CC @paperdave who should not be reading this right now because they have a flight to pack for.

@DonIsaac DonIsaac changed the title Don/parse/fix/pragma url fix(lexer): do not treat '#bun' in a url as a pragma Dec 20, 2024
@DonIsaac DonIsaac requested a review from a team December 20, 2024 21:40
@DonIsaac DonIsaac added this pull request to the merge queue Dec 21, 2024
Merged via the queue into main with commit 3c37b7f Dec 21, 2024
67 checks passed
@DonIsaac DonIsaac deleted the don/parse/fix/pragma-url branch December 21, 2024 05:46
probably-neb pushed a commit to probably-neb/bun that referenced this pull request Jan 7, 2025
Co-authored-by: Don Isaac <don@bun.sh>
Co-authored-by: DonIsaac <DonIsaac@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transpiler parser || printer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code comments containing "#bun" causes Bun to not parse TypeScript
2 participants