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: Correct context for declaration files #847

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 24, 2024

Fixes "Cannot find module 'styled-jsx' or its corresponding type declarations"

The scoped-jsx codemod has a known, bad transform where it adds the import outside of the declare module changing the context of the declaration. This resulted in styled-jsx having no type declarations.

Originally caught in https://github.com/vercel/next.js/actions/runs/9227067088/job/25388269813?pr=66185#step:28:384.
Added a type-checking setup to smoke test types. This would've caught this bug i.e. this PR would fail without the last commit.

@eps1lon eps1lon requested a review from ijjk as a code owner May 24, 2024 16:51
@eps1lon eps1lon changed the title Fix types fix: Correct context for declaration files May 24, 2024
Fixes "Cannot find module 'styled-jsx' or its corresponding type declarations"
@@ -124,6 +126,7 @@
"css"
],
"dependencies": {
"client-only": "0.0.1"
"client-only": "0.0.1",
"typescript": "~5.0.0"
Copy link
Member Author

@eps1lon eps1lon May 24, 2024

Choose a reason for hiding this comment

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

>=5.1 requires Node.js 14. CI is running with 12 but this may break other stuff.

@eps1lon eps1lon enabled auto-merge (squash) May 24, 2024 16:56
@eps1lon eps1lon merged commit 3e372f2 into main May 24, 2024
4 checks passed
@eps1lon eps1lon deleted the sebbie/05-24-test_types branch May 24, 2024 16:57
Copy link

🎉 This PR is included in version 5.1.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants