Skip to content

fix: cjs using .js extension #846

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

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Conversation

VdustR
Copy link
Contributor

@VdustR VdustR commented Mar 20, 2025

fix #845

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

@wolfsokta wolfsokta left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link

@stanislav-savchuk stanislav-savchuk left a comment

Choose a reason for hiding this comment

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

Nice, good job!

@styoe
Copy link

styoe commented Mar 20, 2025

Can somebody wake the maintainers up?! I kind of need this asap?
Update: Thank you!!!

@nene
Copy link
Collaborator

nene commented Mar 20, 2025

Huh... this 15.5.0 release went quite bad. Thanks for the patch.

@nene nene merged commit 3908190 into sql-formatter-org:master Mar 20, 2025
1 check passed
@VdustR VdustR deleted the fix/cjs-exports branch March 20, 2025 09:24
@nene
Copy link
Collaborator

nene commented Mar 20, 2025

I had no idea so many people are depending on this little tool.

Released the fix in 15.5.1.

@ThulinaWickramasinghe
Copy link

Another fireship video? 😄

@stanislav-savchuk
Copy link

I had no idea so many people are depending on this little tool.

Released the fix in 15.5.1.

well, firebase-tools has dependency on this package and this morning was more refreshing than any coffee :)

@pankajvaghela
Copy link

We are still getting many errors like

WARNING in ./node_modules/sql-formatter/dist/esm/parser/grammar.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/sql-formatter/src/parser/grammar.ts' 
file: Error: ENOENT: no such file or directory, open '..../node_modules/sql-formatter/src/parser/grammar.ts'

It's all fine for 15.4, but if we start getting these errors from 15.5. Also tried 15.6 and still same issue.

Do we know if it is related to the 15.0 release? 🤔

PS: We are using Webpack for bundling.

@nene
Copy link
Collaborator

nene commented May 14, 2025

Well, this specific pull request only fixes a problem caused by 15.5.0 release, which was obviously broken.

The main change really happened in #842

If you do have a problem, please report a bug and try to create some sort of way to reproduce it.

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.

dist/cjs/index.cjs not found in the dist package