chore: add prepack and publishConfig to all workspace packages#1309
Conversation
Why: guarantee a fresh lib/ build via prepack on every npm publish, and
standardize scoped-package publish access so --access public is no longer
required at the CLI.
- Adds "prepack": "yarn build" to every package's scripts
- Adds "publishConfig": { "access": "public" } to every package
- Keeps lib/ as the output directory (no migration to dist/)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 36 minutes and 42 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (34)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
"prepack": "yarn build"to every workspace package'sscriptsso thatnpm publish/yarn packalways regenerateslib/before the tarball is assembled."publishConfig": { "access": "public" }to every workspace package sonpm publish --access publicis no longer required at the CLI for scoped packages.lib/as the build output (no migration todist/).packages/,agents/,agent_filters/, andllm_agents/.plans/chore-prepack-publishconfig.mdper the repo's bug-fix / feature-request workflow.Items to Confirm / Review
prepacksemantics — the hook runs on bothnpm packandnpm publish, and also onyarn pack(verified locally withyarn pack --dry-runinpackages/graphai). If the release process currently assumes a pre-builtlib/, this change no-ops; if it assumed no build, the extra build is the intended fix.private: truepackages — every workspace package was treated as publishable. None were marked private, includingpackages/samplesandllm_agents/playgroundwhosebuildscripts areecho nothing. For those,prepackeffectively does nothing, which is harmless.graphaipackage —publishConfig.access: "public"is valid but technically redundant for the unscopedgraphaipackage. Left in for uniformity; can be removed if preferred.CLAUDE.md—npm publish --access publicstill works;--access publicis now redundant but not harmful. Docs not updated in this PR — flag if you'd like that follow-up.User Prompt
Implementation
Per-file change (all 33 package.json files):
"scripts": { …existing scripts…, + "prepack": "yarn build" }, … + "publishConfig": { + "access": "public" + }Applied mechanically via a one-shot Node script that parsed/serialized each
package.jsonpreserving existing key order (script deleted before commit).Validation
yarn format— cleanyarn build— all 33 packages built successfullyyarn pack --dry-runinpackages/graphai— confirmsprepack→yarn buildruns before tarball creationyarn eslint— one pre-existing error in the untracked filepackages/agentdoc/tests/schema2doc.ts; unrelated to this PR (reproduces onmain)Test plan
npm publish(oryarn npm publish) triggersyarn buildautomatically viaprepackpublishConfig.accessis honored by the registry (no--access publicneeded)🤖 Generated with Claude Code