Skip to content

chore: verify packaging from the tarball, then migrate build to tsdown - #401

Open
hyesungoh wants to merge 21 commits into
mainfrom
chore/tsdown-unbundle
Open

chore: verify packaging from the tarball, then migrate build to tsdown#401
hyesungoh wants to merge 21 commits into
mainfrom
chore/tsdown-unbundle

Conversation

@hyesungoh

@hyesungoh hyesungoh commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Overview

Closes #388

Adds a tarball-based packaging verification pipeline (yarn verify:pack) and migrates both published packages' build output from tsup flat bundles to tsdown per-module ("unbundle") output.

Why the verification comes first

exports pins exact filenames, and workspace links can't catch a files or exports mismatch because they connect the whole package directory rather than what npm publish actually ships. #318 was that class of mistake. Since the build change replaces the output layout entirely, the gate needed to exist and be proven against the current build before anything moved.

What yarn verify:pack does

Builds both packages, packs each with npm pack, then against the real tarball:

  • every emitted .js/.cjs starts with the "use client"; banner (RSC compatibility)
  • every path declared in exports/main/module/types exists inside the tarball
  • publint --strict and attw (node10 / node16-cjs / node16-esm / bundler resolution matrix)
  • installs both tarballs into a throwaway consumer outside the repo and runs CJS require, ESM import, and tsc under both bundler and node16 resolution
  • measures what a consumer pays to import a single export, and fails above a 1KB budget

Checks fail rather than pass when they verify nothing — an empty candidate list, a tool that never produced a judgment, or a consumer install that failed all surface as failures with the underlying tool's real output.

The build migration

tsup produced one flat bundle per package, so importing a single hook still pulled in every other top-level statement in that bundle — a bundler can't prove those statements are side-effect free, so it can't remove them. Switching to tsdown's per-module output means each hook/util compiles to its own file; a consumer's bundler now only includes the files actually imported.

The public API is unchanged: the export surface was verified identical name-for-name (core 38 exports, mobile 17 values plus 6 types), and runtime behavior is unchanged. What changed is packaging — output file names and extensions (.mjs/.cjs instead of a flat bundle, .d.mts/.d.cts declarations), and the esm/ directory is gone. exports only ever exposed . and ./package.json, so no supported import path is affected; only deep imports into internal build paths (never part of the public API) would break.

Before / after: cost of importing a single export

package export before (tsup bundle) after (tsdown unbundle)
react-simplikit useToggle 5363 B 102 B
@react-simplikit/mobile useNetworkStatus 981 B 570 B

Both numbers come from yarn verify:pack's tree-shaking size gate, now enforced in CI with no size-check bypass.

Checklist

  • Did you write the test code? — packaging/build verification covered by yarn verify:pack; no package source behavior changed
  • Have you run yarn run fix to format and lint the code and docs?
  • Have you run yarn run test:coverage to make sure there is no uncovered line?
  • Did you write the JSDoc? — N/A, no public API changed

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a6ccc4e

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

This PR includes changesets to release 2 packages
Name Type
react-simplikit Patch
@react-simplikit/mobile Patch

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

@codecov-commenter

codecov-commenter commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ba7a3f2) to head (a6ccc4e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #401   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           58        58           
  Lines         1639      1639           
  Branches       499       499           
=========================================
  Hits          1639      1639           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Size Change: +49.2 kB (+100.83%) 🆘

Total Size: 97.9 kB

📦 View Changed
Filename Size Change
packages/core/dist/components/ImpressionArea/ImpressionArea.cjs 1.01 kB +1.01 kB (new file) 🆕
packages/core/dist/components/ImpressionArea/ImpressionArea.mjs 984 B +984 B (new file) 🆕
packages/core/dist/components/ImpressionArea/index.cjs 0 B -2.28 kB (removed) 🏆
packages/core/dist/components/Separated/index.cjs 0 B -717 B (removed) 🏆
packages/core/dist/components/Separated/Separated.cjs 686 B +686 B (new file) 🆕
packages/core/dist/components/Separated/Separated.mjs 684 B +684 B (new file) 🆕
packages/core/dist/components/SwitchCase/index.cjs 0 B -587 B (removed) 🏆
packages/core/dist/components/SwitchCase/SwitchCase.cjs 701 B +701 B (new file) 🆕
packages/core/dist/components/SwitchCase/SwitchCase.mjs 699 B +699 B (new file) 🆕
packages/core/dist/hooks/useAsyncEffect/index.cjs 0 B -640 B (removed) 🏆
packages/core/dist/hooks/useAsyncEffect/useAsyncEffect.cjs 615 B +615 B (new file) 🆕
packages/core/dist/hooks/useAsyncEffect/useAsyncEffect.mjs 604 B +604 B (new file) 🆕
packages/core/dist/hooks/useBooleanState/index.cjs 0 B -661 B (removed) 🏆
packages/core/dist/hooks/useBooleanState/useBooleanState.cjs 539 B +539 B (new file) 🆕
packages/core/dist/hooks/useBooleanState/useBooleanState.mjs 529 B +529 B (new file) 🆕
packages/core/dist/hooks/useCallbackOncePerRender/index.cjs 0 B -752 B (removed) 🏆
packages/core/dist/hooks/useCallbackOncePerRender/useCallbackOncePerRender.cjs 781 B +781 B (new file) 🆕
packages/core/dist/hooks/useCallbackOncePerRender/useCallbackOncePerRender.mjs 752 B +752 B (new file) 🆕
packages/core/dist/hooks/useConditionalEffect/index.cjs 0 B -784 B (removed) 🏆
packages/core/dist/hooks/useConditionalEffect/useConditionalEffect.cjs 945 B +945 B (new file) 🆕
packages/core/dist/hooks/useConditionalEffect/useConditionalEffect.mjs 925 B +925 B (new file) 🆕
packages/core/dist/hooks/useControlledState/index.cjs 0 B -791 B (removed) 🏆
packages/core/dist/hooks/useControlledState/useControlledState.cjs 865 B +865 B (new file) 🆕
packages/core/dist/hooks/useControlledState/useControlledState.mjs 855 B +855 B (new file) 🆕
packages/core/dist/hooks/useCounter/index.cjs 0 B -817 B (removed) 🏆
packages/core/dist/hooks/useCounter/useCounter.cjs 1.03 kB +1.03 kB (new file) 🆕
packages/core/dist/hooks/useCounter/useCounter.mjs 1.01 kB +1.01 kB (new file) 🆕
packages/core/dist/hooks/useDebounce/debounce.cjs 458 B +458 B (new file) 🆕
packages/core/dist/hooks/useDebounce/debounce.mjs 456 B +456 B (new file) 🆕
packages/core/dist/hooks/useDebounce/index.cjs 0 B -1.17 kB (removed) 🏆
packages/core/dist/hooks/useDebounce/useDebounce.cjs 974 B +974 B (new file) 🆕
packages/core/dist/hooks/useDebounce/useDebounce.mjs 953 B +953 B (new file) 🆕
packages/core/dist/hooks/useDebouncedCallback/index.cjs 0 B -1.29 kB (removed) 🏆
packages/core/dist/hooks/useDebouncedCallback/useDebouncedCallback.cjs 1.05 kB +1.05 kB (new file) 🆕
packages/core/dist/hooks/useDebouncedCallback/useDebouncedCallback.mjs 1.03 kB +1.03 kB (new file) 🆕
packages/core/dist/hooks/useDoubleClick/index.cjs 0 B -878 B (removed) 🏆
packages/core/dist/hooks/useDoubleClick/useDoubleClick.cjs 1.08 kB +1.08 kB (new file) 🆕
packages/core/dist/hooks/useDoubleClick/useDoubleClick.mjs 1.07 kB +1.07 kB (new file) 🆕
packages/core/dist/hooks/useGeolocation/index.cjs 0 B -1.43 kB (removed) 🏆
packages/core/dist/hooks/useGeolocation/useGeolocation.cjs 2.14 kB +2.14 kB (new file) 🆕
packages/core/dist/hooks/useGeolocation/useGeolocation.mjs 2.13 kB +2.13 kB (new file) 🆕
packages/core/dist/hooks/useImpressionRef/index.cjs 0 B -1.99 kB (removed) 🏆
packages/core/dist/hooks/useImpressionRef/useImpressionRef.cjs 1.2 kB +1.2 kB (new file) 🆕
packages/core/dist/hooks/useImpressionRef/useImpressionRef.mjs 1.16 kB +1.16 kB (new file) 🆕
packages/core/dist/hooks/useInputState/index.cjs 0 B -676 B (removed) 🏆
packages/core/dist/hooks/useInputState/useInputState.cjs 589 B +589 B (new file) 🆕
packages/core/dist/hooks/useInputState/useInputState.mjs 579 B +579 B (new file) 🆕
packages/core/dist/hooks/useIntersectionObserver/index.cjs 0 B -966 B (removed) 🏆
packages/core/dist/hooks/useIntersectionObserver/useIntersectionObserver.cjs 1.07 kB +1.07 kB (new file) 🆕
packages/core/dist/hooks/useIntersectionObserver/useIntersectionObserver.mjs 1.04 kB +1.04 kB (new file) 🆕
packages/core/dist/hooks/useInterval/index.cjs 0 B -883 B (removed) 🏆
packages/core/dist/hooks/useInterval/useInterval.cjs 837 B +837 B (new file) 🆕
packages/core/dist/hooks/useInterval/useInterval.mjs 811 B +811 B (new file) 🆕
packages/core/dist/hooks/useIsClient/index.cjs 0 B -606 B (removed) 🏆
packages/core/dist/hooks/useIsClient/useIsClient.cjs 585 B +585 B (new file) 🆕
packages/core/dist/hooks/useIsClient/useIsClient.mjs 574 B +574 B (new file) 🆕
packages/core/dist/hooks/useIsomorphicLayoutEffect/index.cjs 0 B -587 B (removed) 🏆
packages/core/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs 577 B +577 B (new file) 🆕
packages/core/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs 575 B +575 B (new file) 🆕
packages/core/dist/hooks/useList/index.cjs 0 B -1.03 kB (removed) 🏆
packages/core/dist/hooks/useList/useList.cjs 850 B +850 B (new file) 🆕
packages/core/dist/hooks/useList/useList.mjs 825 B +825 B (new file) 🆕
packages/core/dist/hooks/useLoading/index.cjs 0 B -788 B (removed) 🏆
packages/core/dist/hooks/useLoading/useLoading.cjs 913 B +913 B (new file) 🆕
packages/core/dist/hooks/useLoading/useLoading.mjs 902 B +902 B (new file) 🆕
packages/core/dist/hooks/useLongPress/index.cjs 0 B -1.31 kB (removed) 🏆
packages/core/dist/hooks/useLongPress/useLongPress.cjs 1.79 kB +1.79 kB (new file) 🆕
packages/core/dist/hooks/useLongPress/useLongPress.mjs 1.76 kB +1.76 kB (new file) 🆕
packages/core/dist/hooks/useMap/index.cjs 0 B -925 B (removed) 🏆
packages/core/dist/hooks/useMap/useMap.cjs 730 B +730 B (new file) 🆕
packages/core/dist/hooks/useMap/useMap.mjs 713 B +713 B (new file) 🆕
packages/core/dist/hooks/useOutsideClickEffect/index.cjs 0 B -868 B (removed) 🏆
packages/core/dist/hooks/useOutsideClickEffect/useOutsideClickEffect.cjs 904 B +904 B (new file) 🆕
packages/core/dist/hooks/useOutsideClickEffect/useOutsideClickEffect.mjs 878 B +878 B (new file) 🆕
packages/core/dist/hooks/usePreservedCallback/index.cjs 0 B -648 B (removed) 🏆
packages/core/dist/hooks/usePreservedCallback/usePreservedCallback.cjs 691 B +691 B (new file) 🆕
packages/core/dist/hooks/usePreservedCallback/usePreservedCallback.mjs 675 B +675 B (new file) 🆕
packages/core/dist/hooks/usePreservedReference/index.cjs 0 B -679 B (removed) 🏆
packages/core/dist/hooks/usePreservedReference/usePreservedReference.cjs 794 B +794 B (new file) 🆕
packages/core/dist/hooks/usePreservedReference/usePreservedReference.mjs 777 B +777 B (new file) 🆕
packages/core/dist/hooks/usePrevious/index.cjs 0 B -682 B (removed) 🏆
packages/core/dist/hooks/usePrevious/usePrevious.cjs 633 B +633 B (new file) 🆕
packages/core/dist/hooks/usePrevious/usePrevious.mjs 625 B +625 B (new file) 🆕
packages/core/dist/hooks/useRefEffect/index.cjs 0 B -826 B (removed) 🏆
packages/core/dist/hooks/useRefEffect/useRefEffect.cjs 771 B +771 B (new file) 🆕
packages/core/dist/hooks/useRefEffect/useRefEffect.mjs 744 B +744 B (new file) 🆕
packages/core/dist/hooks/useSet/index.cjs 0 B -1.03 kB (removed) 🏆
packages/core/dist/hooks/useSet/useSet.cjs 822 B +822 B (new file) 🆕
packages/core/dist/hooks/useSet/useSet.mjs 791 B +791 B (new file) 🆕
packages/core/dist/hooks/useStorageState/index.cjs 0 B -1.67 kB (removed) 🏆
packages/core/dist/hooks/useStorageState/storage.cjs 543 B +543 B (new file) 🆕
packages/core/dist/hooks/useStorageState/storage.mjs 527 B +527 B (new file) 🆕
packages/core/dist/hooks/useStorageState/useStorageState.cjs 956 B +956 B (new file) 🆕
packages/core/dist/hooks/useStorageState/useStorageState.mjs 947 B +947 B (new file) 🆕
packages/core/dist/hooks/useThrottle/index.cjs 0 B -1.33 kB (removed) 🏆
packages/core/dist/hooks/useThrottle/throttle.cjs 306 B +306 B (new file) 🆕
packages/core/dist/hooks/useThrottle/throttle.mjs 298 B +298 B (new file) 🆕
packages/core/dist/hooks/useThrottle/useThrottle.cjs 864 B +864 B (new file) 🆕
packages/core/dist/hooks/useThrottle/useThrottle.mjs 838 B +838 B (new file) 🆕
packages/core/dist/hooks/useThrottledCallback/index.cjs 0 B -1.47 kB (removed) 🏆
packages/core/dist/hooks/useThrottledCallback/useThrottledCallback.cjs 899 B +899 B (new file) 🆕
packages/core/dist/hooks/useThrottledCallback/useThrottledCallback.mjs 874 B +874 B (new file) 🆕
packages/core/dist/hooks/useTimeout/index.cjs 0 B -731 B (removed) 🏆
packages/core/dist/hooks/useTimeout/useTimeout.cjs 627 B +627 B (new file) 🆕
packages/core/dist/hooks/useTimeout/useTimeout.mjs 600 B +600 B (new file) 🆕
packages/core/dist/hooks/useToggle/index.cjs 0 B -585 B (removed) 🏆
packages/core/dist/hooks/useToggle/useToggle.cjs 524 B +524 B (new file) 🆕
packages/core/dist/hooks/useToggle/useToggle.mjs 506 B +506 B (new file) 🆕
packages/core/dist/hooks/useVisibilityEvent/index.cjs 0 B -698 B (removed) 🏆
packages/core/dist/hooks/useVisibilityEvent/useVisibilityEvent.cjs 769 B +769 B (new file) 🆕
packages/core/dist/hooks/useVisibilityEvent/useVisibilityEvent.mjs 749 B +749 B (new file) 🆕
packages/core/dist/index.cjs 967 B -8.26 kB (-89.52%) 🏆
packages/core/dist/index.mjs 697 B +697 B (new file) 🆕
packages/core/dist/utils/buildContext/buildContext.cjs 794 B +794 B (new file) 🆕
packages/core/dist/utils/buildContext/buildContext.mjs 774 B +774 B (new file) 🆕
packages/core/dist/utils/buildContext/index.cjs 0 B -877 B (removed) 🏆
packages/core/dist/utils/mergeProps/index.cjs 0 B -786 B (removed) 🏆
packages/core/dist/utils/mergeProps/mergeProps.cjs 669 B +669 B (new file) 🆕
packages/core/dist/utils/mergeProps/mergeProps.mjs 668 B +668 B (new file) 🆕
packages/core/dist/utils/mergeRefs/index.cjs 0 B -593 B (removed) 🏆
packages/core/dist/utils/mergeRefs/mergeRefs.cjs 614 B +614 B (new file) 🆕
packages/core/dist/utils/mergeRefs/mergeRefs.mjs 612 B +612 B (new file) 🆕
packages/mobile/dist/hooks/useAvoidKeyboard/useAvoidKeyboard.cjs 1.01 kB +1.01 kB (new file) 🆕
packages/mobile/dist/hooks/useAvoidKeyboard/useAvoidKeyboard.mjs 986 B +986 B (new file) 🆕
packages/mobile/dist/hooks/useBodyScrollLock/useBodyScrollLock.cjs 568 B +568 B (new file) 🆕
packages/mobile/dist/hooks/useBodyScrollLock/useBodyScrollLock.mjs 544 B +544 B (new file) 🆕
packages/mobile/dist/hooks/useKeyboardHeight/useKeyboardHeight.cjs 709 B +709 B (new file) 🆕
packages/mobile/dist/hooks/useKeyboardHeight/useKeyboardHeight.mjs 692 B +692 B (new file) 🆕
packages/mobile/dist/hooks/useNetworkStatus/useNetworkStatus.cjs 1.22 kB +1.22 kB (new file) 🆕
packages/mobile/dist/hooks/useNetworkStatus/useNetworkStatus.mjs 1.2 kB +1.2 kB (new file) 🆕
packages/mobile/dist/hooks/usePageVisibility/usePageVisibility.cjs 914 B +914 B (new file) 🆕
packages/mobile/dist/hooks/usePageVisibility/usePageVisibility.mjs 895 B +895 B (new file) 🆕
packages/mobile/dist/hooks/useSafeAreaInset/useSafeAreaInset.cjs 965 B +965 B (new file) 🆕
packages/mobile/dist/hooks/useSafeAreaInset/useSafeAreaInset.mjs 950 B +950 B (new file) 🆕
packages/mobile/dist/hooks/useScrollDirection/useScrollDirection.cjs 979 B +979 B (new file) 🆕
packages/mobile/dist/hooks/useScrollDirection/useScrollDirection.mjs 967 B +967 B (new file) 🆕
packages/mobile/dist/hooks/useVisualViewport/useVisualViewport.cjs 1.26 kB +1.26 kB (new file) 🆕
packages/mobile/dist/hooks/useVisualViewport/useVisualViewport.mjs 1.25 kB +1.25 kB (new file) 🆕
packages/mobile/dist/index.cjs 530 B -2.96 kB (-84.82%) 🏆
packages/mobile/dist/index.mjs 377 B +377 B (new file) 🆕
packages/mobile/dist/utils/disableBodyScrollLock/disableBodyScrollLock.cjs 706 B +706 B (new file) 🆕
packages/mobile/dist/utils/disableBodyScrollLock/disableBodyScrollLock.mjs 698 B +698 B (new file) 🆕
packages/mobile/dist/utils/enableBodyScrollLock/enableBodyScrollLock.cjs 696 B +696 B (new file) 🆕
packages/mobile/dist/utils/enableBodyScrollLock/enableBodyScrollLock.mjs 687 B +687 B (new file) 🆕
packages/mobile/dist/utils/getKeyboardHeight/getKeyboardHeight.cjs 632 B +632 B (new file) 🆕
packages/mobile/dist/utils/getKeyboardHeight/getKeyboardHeight.mjs 626 B +626 B (new file) 🆕
packages/mobile/dist/utils/getSafeAreaInset/getSafeAreaInset.cjs 925 B +925 B (new file) 🆕
packages/mobile/dist/utils/getSafeAreaInset/getSafeAreaInset.mjs 916 B +916 B (new file) 🆕
packages/mobile/dist/utils/isAndroid/isAndroid.cjs 566 B +566 B (new file) 🆕
packages/mobile/dist/utils/isAndroid/isAndroid.mjs 558 B +558 B (new file) 🆕
packages/mobile/dist/utils/isIOS/isIOS.cjs 776 B +776 B (new file) 🆕
packages/mobile/dist/utils/isIOS/isIOS.mjs 769 B +769 B (new file) 🆕
packages/mobile/dist/utils/isKeyboardVisible/isKeyboardVisible.cjs 455 B +455 B (new file) 🆕
packages/mobile/dist/utils/isKeyboardVisible/isKeyboardVisible.mjs 443 B +443 B (new file) 🆕
packages/mobile/dist/utils/isServer/isServer.cjs 404 B +404 B (new file) 🆕
packages/mobile/dist/utils/isServer/isServer.mjs 403 B +403 B (new file) 🆕
packages/mobile/dist/utils/subscribeKeyboardHeight/subscribeKeyboardHeight.cjs 1.14 kB +1.14 kB (new file) 🆕
packages/mobile/dist/utils/subscribeKeyboardHeight/subscribeKeyboardHeight.mjs 1.12 kB +1.12 kB (new file) 🆕

compressed-size-action

Yarn 4.10.2's PnP require patch rejects any option Node passes beyond
`paths`/`plugnplay`, so a `createRequire(import.meta.url)` call fails with
"Some options passed to require() aren't supported by PnP yet (conditions)".
rolldown and its oxc/yuku toolchain load their native `.node` bindings exactly
that way, which makes them unloadable under 4.10.2 on any Node version. 4.18.0
allows `conditions` and auto-unplugs the platform bindings, so no
dependenciesMeta overrides are needed.

`enableScripts: true` is pinned because 4.18 flipped the default to false;
it preserves the install-script behaviour the repo already relied on. The
`approvedGitRepositories` and `npmMinimalAgeGate` keys the upgrade offered to
write are deliberately left out: there are no git-protocol dependencies, and
keeping the default 1440-minute age gate retains the new supply-chain guard.
tsup emitted one flat bundle per format, so a consumer importing a single hook
also paid for unrelated top-level side effects elsewhere in that bundle — a
forwardRef call, a displayName assignment, storage singletons — because a
bundler cannot prove those statements are removable. Importing only useToggle
cost 5363B minified.

tsdown's unbundle mode mirrors the source tree as per-module output, so together
with the existing `sideEffects: false` a consumer's bundler skips whole files it
never imports and what is inside them stops mattering. useToggle now costs 102B
and useNetworkStatus 570B, both under the 1024B budget, so verify-pack no longer
needs --skip-size in CI.

tsdown emits .mjs/.d.mts for ESM and .cjs/.d.cts for CJS into a single dist/,
so both packages point module at ./dist/index.mjs and the import condition at
./dist/index.d.mts; core drops its separate esm/ directory entirely. Relative
.ts specifiers are rewritten to the emitted extensions and the "use client"
banner reaches every emitted file, not just the entry.

The useStorageState barrel now marks Serializable as a type-only export, which
rolldown requires to resolve the re-export. It changes no emitted code and
matches the inline-type pattern the mobile barrel already uses.
… changes

Adds a verify-examples job that packs core/mobile, points with-vite and
with-nextjs at the tarballs, and rebuilds them. The Next.js example gains
a core demo page without a 'use client' directive so a missing banner
in the build output fails the RSC build rather than only failing a grep.

Also corrects the compressed-size pattern: tsdown emits .mjs/.cjs under
packages/*/dist, not the old top-level dist/esm .js/.cjs layout.
Source imports use explicit .ts/.tsx extensions, and tsdown now emits
.mjs/.cjs rather than the plain .js this line described. AGENTS.md and
.github/copilot-instructions.md already state it correctly; CLAUDE.md
was stale from before the tsdown migration.
@react-simplikit/mobile never had an esm/ directory, so the shared
changeset text was misrepresenting its changelog.
No package emits an esm/ directory and no tsup config file exists
after the tsdown migration.
A transitive dependency bump changes what gets packed but wasn't
in the paths-filter, so verify-examples would silently skip it.
This branch's own yarn upgrade and enableScripts change would have
been missed by the same gap.
@hyesungoh hyesungoh self-assigned this Aug 13, 2026
@hyesungoh
hyesungoh marked this pull request as ready for review August 13, 2026 05:23
Copilot AI lite review requested due to automatic review settings August 13, 2026 05:23
@hyesungoh
hyesungoh requested a review from mnxmnz as a code owner August 13, 2026 05:23

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hyesungoh

Copy link
Copy Markdown
Collaborator Author

Ignore the Compressed Size 🆘 — the base was measured at half its output

Nothing doubled. The action applies this branch's pattern (packages/*/dist/**/*.{mjs,cjs}) to both sides, but the two branches put their output in different places:

CJS ESM what the pattern captures
main (tsup) packages/*/dist/ packages/*/esm/ CJS only
this branch (tsdown) packages/*/dist/ packages/*/dist/ both

The arithmetic confirms it: current output is 128.7 kB CJS + 121.6 kB ESM, near enough an even split, and the reported base (97.9 − 49.2 ≈ 48.7 kB) is half the head total. The +100% is the ESM half entering the measurement.

Same cause for the (new file) / (removed) rows: every filename changed, so nothing matches across the diff.

This self-corrects after merge, once main carries both the new layout and the fixed pattern. Note the old pattern resolved from the repo root, where neither dist/ nor esm/ exists — it had been matching zero files, so this is the repo's first real size report.

What actually changes for consumers

before after
bytes an app bundles for one hook 5,363 B 102 B
published tarball one flat bundle 202 files, 84 kB packed

Install footprint grows modestly — per-module output carries per-file overhead — while what reaches an application's bundle drops sharply. Public API, runtime behavior, and type resolution are unchanged.

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.

Improve build pipeline: tree-shaking leak, entry count, tsdown

3 participants