Skip to content

Fix generated CSS type declaration#651

Merged
ValentinH merged 1 commit into
mainfrom
codex/fix-css-types-newline
Jun 11, 2026
Merged

Fix generated CSS type declaration#651
ValentinH merged 1 commit into
mainfrom
codex/fix-css-types-newline

Conversation

@ValentinH

@ValentinH ValentinH commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix the generated react-easy-crop.css.d.ts file to write a real newline after export {}
  • prevents the published CSS declaration from containing a literal \n sequence

Fixes #650.

Reproduction

Created a blank TypeScript project with react-easy-crop@6.0.1 and imported react-easy-crop/react-easy-crop.css.

Published 6.0.1 contains these bytes in react-easy-crop.css.d.ts:

export {}\n

Running ./node_modules/.bin/tsc --noEmit fails with:

TS1127: Invalid character.

Verification

  • pnpm build
  • od -c dist/react-easy-crop.css.d.ts shows export {} followed by a real newline
  • packed dist and installed it in the blank repro project
  • ./node_modules/.bin/tsc --noEmit passes in the repro project
  • ./node_modules/.bin/vite build passes in the repro project
  • ran the repro app in Vite dev mode, verified the cropper is constrained to its container, drag updates crop state/image transform, and there are no browser console errors
  • pnpm type-check

@ValentinH ValentinH added the patch Increment the patch version when merged label Jun 11, 2026
@ValentinH ValentinH merged commit dd079fb into main Jun 11, 2026
4 checks passed
@ValentinH ValentinH deleted the codex/fix-css-types-newline branch June 11, 2026 15:12
@github-actions

Copy link
Copy Markdown

🚀 PR was released in v6.0.2 🚀

@github-actions github-actions Bot added the released This issue/pull request has been released. label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v6.0.1 ships invalid TypeScript

1 participant