vercel / styled-jsx

Full CSS support for JSX without compromises
http://npmjs.com/styled-jsx
MIT License
7.65k stars 266 forks source link

fix: Correct context for declaration files #847

Closed eps1lon closed 1 month ago

eps1lon commented 1 month ago

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.

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 5.1.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: