Skip to content

Fix/v1.11.1 packaging - #27

Merged
umsungjun merged 3 commits into
mainfrom
fix/v1.11.1-packaging
Jul 28, 2026
Merged

Fix/v1.11.1 packaging#27
umsungjun merged 3 commits into
mainfrom
fix/v1.11.1-packaging

Conversation

@umsungjun

Copy link
Copy Markdown
Owner

Summary

  • Ship dist/index.d.mts for the ESM entry — fixes ESM types being resolved as CJS under moduleResolution: node16/nodenext (attw "FalseCJS")
  • Roll up declarations into a single file (rollupTypes) so the .d.mts copy has no extensionless relative imports
  • Add "./package.json" export subpath and "sideEffects": false for bundler tree-shaking
  • Narrow the react peer range from >=17 to ^17 || ^18 || ^19 to match tested and documented support
  • Declare react / react-dom / @types/react-dom as explicit devDependencies (previously relied on pnpm auto-install-peers), drop unused happy-dom, add engines.node >= 18
  • Verified with @arethetypeswrong/cli --pack: all resolution modes green (node10 / node16 CJS / node16 ESM / bundler)

요약

  • ESM 진입점용 dist/index.d.mts 추가 — moduleResolution: node16/nodenext에서 ESM 타입이 CJS로 오인되던 문제(attw "FalseCJS") 해결
  • 타입 선언을 단일 파일로 롤업(rollupTypes)해서 .d.mts 복사본에 확장자 없는 상대 import가 남지 않도록 처리
  • "./package.json" export 서브패스와 "sideEffects": false 추가 (번들러 트리셰이킹 허용)
  • react peer 범위를 >=17^17 || ^18 || ^19로 좁혀서 실제 테스트·문서화된 지원 범위와 일치
  • react/react-dom/@types/react-dom을 devDependencies에 명시 (기존엔 pnpm auto-install-peers에 암묵 의존), 미사용 happy-dom 제거, engines.node >= 18 추가
  • @arethetypeswrong/cli --pack 검증: 모든 해석 모드 초록 (node10 / node16 CJS / node16 ESM / bundler)

- ship dist/index.d.mts for the ESM entry so moduleResolution node16/nodenext no longer resolves ESM types as CJS (attw FalseCJS)
- roll up declarations into a single file (rollupTypes) so the .d.mts copy has no extensionless relative imports
- add ./package.json export subpath and sideEffects:false for bundler tree-shaking
- narrow react peer range to ^17 || ^18 || ^19 to match the tested and documented support
- declare react/react-dom/@types/react-dom as explicit devDependencies instead of relying on pnpm auto-install-peers
- drop unused happy-dom (tests run on jsdom), drop declarationMap (dist-only publishes made maps dead-ends), add engines.node >=18
Copilot AI review requested due to automatic review settings July 28, 2026 00:47
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-head-safe Ready Ready Preview, Comment Jul 28, 2026 12:47am

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@umsungjun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b8b2e026-00b3-4cde-8e49-12640f1330cf

📥 Commits

Reviewing files that changed from the base of the PR and between 74b0937 and f481d75.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • CLAUDE.md
  • package.json
  • tsconfig.json
  • vite.config.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v1.11.1-packaging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@umsungjun
umsungjun merged commit e84d1e6 into main Jul 28, 2026
5 checks passed
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the library’s packaging and type-distribution setup to correctly publish an ESM-specific .d.mts declaration entry and improve compatibility with moduleResolution: node16/nodenext, while tightening metadata for bundlers and dependencies.

Changes:

  • Generate a single rolled-up dist/index.d.ts and post-build copy it to dist/index.d.mts, then point ESM exports’ types to the .d.mts.
  • Adjust package metadata (exports subpath for ./package.json, sideEffects: false, React peer range) and devDependencies.
  • Remove declarationMap from tsconfig.json and update lockfile accordingly.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vite.config.ts Enables rollupTypes in vite-plugin-dts to produce a single bundled declaration file for reliable .d.mts copying.
tsconfig.json Removes declarationMap output from TS config.
package.json Publishes ESM-specific type entry via index.d.mts, adds ./package.json export, sideEffects, engines, and adjusts peers/devDeps.
pnpm-lock.yaml Lockfile updates reflecting dependency graph changes (notably adding @types/react-dom, moving React deps, removing direct happy-dom).
CLAUDE.md Documents the new build output artifacts and type-resolution verification expectations.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines +35 to +37
"engines": {
"node": ">=18"
},
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.

3 participants