Skip to content

feat: add treeshake-check package, syncpack, and lefthook - #18

Merged
ryanbas21 merged 3 commits into
mainfrom
feat/treeshake-check-syncpack
May 12, 2026
Merged

feat: add treeshake-check package, syncpack, and lefthook#18
ryanbas21 merged 3 commits into
mainfrom
feat/treeshake-check-syncpack

Conversation

@ryanbas21

Copy link
Copy Markdown
Owner

Summary

  • @wolfcola/treeshake-check — tree-shakeability analyzer ported from ForgeRock/ping-javascript-sdk#623. Built on Effect, @effect/cli, and Rollup. Bundles a package as a side-effect-only import and reports what Rollup couldn't eliminate, with AST-based cause detection (enum IIFE, CJS contamination, prototype mutation, global assignment, unannotated calls).
  • Syncpack — enforces catalog usage (catalog:effect, catalog:vitest, catalog:vite), workspace:* for internal deps, bans @effect/schema
  • Lefthook — pre-commit hook running syncpack lint, eslint --fix, and prettier --write with auto-staging
  • Workspace catalog — added @effect/cli, @effect/platform, @effect/platform-node, @effect/vitest; bumped effect to ^3.21.1
  • Changeset@wolfcola/treeshake-check marked for minor release

Test plan

  • All 370 tests pass (31 files) including 51 new treeshake-check tests
  • pnpm typecheck passes
  • pnpm syncpack lint passes
  • Lefthook pre-commit hook runs successfully
  • pnpm build succeeds for treeshake-check

🤖 Generated with Claude Code

ryanbas21and others added 3 commits May 11, 2026 20:25
Add @wolfcola/treeshake-check — a tree-shakeability analyzer built on
Effect and Rollup. Bundles a package as a side-effect-only import and
reports what Rollup couldn't eliminate, with AST-based cause detection.
Tooling:
- syncpack for dependency version consistency and catalog enforcement
- lefthook pre-commit hook: syncpack lint, eslint --fix, prettier --write
- .prettierignore and eslint ignores for fixtures and build output
- Add @effect/cli, @effect/platform, @effect/platform-node, @effect/vitest
to workspace catalog; bump effect to ^3.21.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix exports/main/types/bin to point to dist/index.js (not dist/src/)
- Exclude tsbuildinfo and test-setup from published files
- Exclude test-setup.ts from lib build
- Reduces pack size from 59KB to 12.5KB
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryanbas21
ryanbas21force-pushed the feat/treeshake-check-syncpack branch from 4b3fdde to 00a05cdCompareMay 12, 2026 02:36
@ryanbas21
ryanbas21 merged commit 1a5f974 into mainMay 12, 2026
1 check passed
@github-actionsgithub-actionsBot mentioned this pull request May 12, 2026
@ryanbas21
ryanbas21 deleted the feat/treeshake-check-syncpack branch May 12, 2026 04:08
Sign up for freeto 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

@ryanbas21