fix: enforce direct runtime dependency declarations - #778
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 |
📊 Benchmark Results❌ Some benchmarks failed Gate failures
Updated: 2026-06-15T05:45:28.347Z · Commit: a2a7850 |
Fixes #562.
Summary
The package manifest checker now audits non-test package source files for runtime external imports and requires each imported package to be declared directly in dependencies, peerDependencies, or optionalDependencies.
@croco/dataloader-corealready declares@opentelemetry/api; the new manifest gate prevents that packaging contract from regressing when a runtime import is only available through a transitive dependency.변경 사항
scripts/normalize-packages.mjs.reflect-metadatapolicy.@croco/dataloader-coreimporting@opentelemetry/apiwhile only declaring@croco/telemetry-api.Verification
pnpm exec vitest run scripts/tests/normalize-packages.spec.ts --reporter verbose- passed, 10 tests.pnpm package-manifests:check- passed, 97 checked / 2 private skipped.pnpm changeset-required:check -- --base origin/trunk --head HEAD- passed, no publishable package behavior changes detected.git diff --check- passed.pnpm check- passed.pnpm build- passed, 99 tasks.pnpm package-entrypoints:smoke- passed, 96 public packages;@croco/dataloader-coreresolved through CJS, ESM, and TypeScript consumers.pnpm test- passed, 197 tasks.pnpm typecheck- passed, 196 tasks.test197/197 tasks, and full cachedtypecheck196/196 tasks.Self-review
@croco/dataloader-coredeclares@opentelemetry/api, the new manifest regression fails when a dataloader-like source value import is not declared directly, repo-wide manifest validation passes, and built package-entrypoint smoke imports@croco/dataloader-corethrough CJS, ESM, and TypeScript consumers.Risk
Low. This only tightens repository manifest validation; packages that add new runtime external imports now need to declare them directly before
pnpm package-manifests:checkcan pass.