chore: add deprecation notice#91
Conversation
WalkthroughAdded one-time deprecation warnings to two package entrypoints and expanded the SDK package's public exports; README received a deprecation notice block. All changes are additive and do not modify existing API signatures. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/data/src/index.ts (1)
1-6: Deprecation side‑effect looks fine; consider guarding for tests/SSR as an optional refinementThe import‑time
console.warnis a straightforward way to surface deprecation without touching the exported API. One thing to bear in mind is that this will also fire in tests and SSR/log‑sensitive environments. If it becomes noisy, you could optionally wrap it, for example with an environment check or a logger hook:if (typeof console !== 'undefined' && process.env.NODE_ENV !== 'test') { console.warn( '\nDEPRECATION NOTICE:\n' + 'This version of @circles-sdk/data is deprecated and will no longer be supported.\n' + 'Please migrate to the new SDK: https://github.com/aboutcircles/sdk\n' ); }Purely optional, not a blocker.
packages/sdk/src/index.ts (1)
1-6: Import‑time deprecation warning achieves the goal; optional guard could reduce noiseThe top‑level
console.warncleanly communicates that@circles-sdk/sdkis deprecated and keeps the public API intact. As with the data package, this will also run in tests/SSR contexts. If that proves too noisy later, you could wrap it in a simple environment check:if (typeof console !== 'undefined' && process.env.NODE_ENV !== 'test') { console.warn( '\nDEPRECATION NOTICE:\n' + 'This version of @circles-sdk/sdk is deprecated and will no longer be supported.\n' + 'Please migrate to the new SDK: https://github.com/aboutcircles/sdk\n' ); }No change required now; just an optional hardening.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (2)
packages/data/src/index.ts(1 hunks)packages/sdk/src/index.ts(1 hunks)
5a5dd2c to
0795334
Compare
I'd also recommend to add the deprecation notice via npm
npm deprecate circles-sdk/sdk "This package is deprecated. Please migrate to @aboutcircles/sdk. See migration guide: https://github.com/aboutcircles/sdk/blob/main/MIGRATION_GUIDE.md"Summary by CodeRabbit
New Features
Notices
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.