Skip to content

Update package.json exports for ESM-only build#88

Merged
agneym merged 1 commit intomasterfrom
fix/exports-fields
Dec 20, 2025
Merged

Update package.json exports for ESM-only build#88
agneym merged 1 commit intomasterfrom
fix/exports-fields

Conversation

@agneym
Copy link
Owner

@agneym agneym commented Dec 20, 2025

Summary

  • Remove module, unpkg, umd:main fields (no longer generating UMD/CJS bundles)
  • Update main to point to dist/Playground.js (matching actual tsdown output)
  • Simplify exports to types + import conditions only

Test plan

  • Run pnpm build and verify dist output
  • Test package import in a consuming project

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Transitioned playground package to ESM-only distribution
    • Updated module entry points and exports configuration
    • Minor version bump with fixes for version 1.0

✏️ Tip: You can customize this high-level summary in your review settings.

- Remove module, unpkg, umd:main fields (no longer generating UMD/CJS)
- Update main to point to dist/Playground.js
- Simplify exports to types + import conditions only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Dec 20, 2025

🦋 Changeset detected

Latest commit: fe7398c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@agney/playground Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR updates the playground package to be ESM-only by adding a changeset entry for a minor version bump and restructuring package.json to remove CommonJS, UMD, and module field exports, retaining only ESM imports and TypeScript types.

Changes

Cohort / File(s) Summary
Changeset metadata
\.changeset/tender-hornets-relate\.md
New changeset entry documenting a minor version bump for @agney/playground, noting ESM-only status, type updates, exports map simplification, and a fix for version 1.0.
Package configuration
playground/package\.json
Main entry point renamed from dist/playground.js to dist/Playground.js; module, unpkg, and umd:main fields removed; exports map simplified to include only ESM import (./dist/Playground.js) and types (./dist/Playground.d.ts) entries; browser, UMD, and CommonJS variants removed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Changes are straightforward configuration and metadata updates
  • No logic modifications or code alterations
  • Homogeneous pattern: consistent ESM-only restructuring across both files

Possibly related PRs

Poem

🐰 A hop toward the future, ESM-bright,
No more the bloat of UMD's might,
One path, one type, so clean and right,
The playground now is pure and light!

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/exports-fields

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04cc35c and fe7398c.

📒 Files selected for processing (2)
  • .changeset/tender-hornets-relate.md (1 hunks)
  • playground/package.json (1 hunks)

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

@agneym agneym marked this pull request as ready for review December 20, 2025 15:03
@agneym agneym merged commit 3d20c2c into master Dec 20, 2025
1 of 2 checks passed
@agneym agneym deleted the fix/exports-fields branch December 20, 2025 15:03
@github-actions github-actions bot mentioned this pull request Dec 20, 2025
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.

1 participant