-
Notifications
You must be signed in to change notification settings - Fork 582
feat: update ratelimit sdk to v2 #3236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update the latest version and update docs to reflect the API changes.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Docs
participant Ratelimit API
User->>Docs: Reads ratelimit override API documentation
Docs-->>User: Presents updated docs (no `async` parameter)
User->>Ratelimit API: Uses override APIs as documented
Ratelimit API-->>User: Returns responses (no reference to `async`)
Possibly related PRs
Suggested labels
Suggested reviewers
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (5)
apps/docs/libraries/ts/ratelimit/override/set-override.mdx (2)
7-7
: Clean up extraneous blank lines.
There are several inserted/removed blank lines around the request and response examples. Removing or standardizing these will improve readability and consistency across the docs.Also applies to: 53-53, 68-68, 70-70
57-59
: Standardize indentation in the second code example.
The parameter lines in the secondsetOverride
snippet have shifted indentation. Align them to your style guide (e.g., 2 or 4 spaces) to maintain consistency.apps/docs/libraries/ts/ratelimit/override/list-overrides.mdx (1)
61-61
: Remove unintended blank/trailing whitespace around examples.
Several blank lines and trailing whitespace markers have appeared before and after thelistOverrides
code blocks. Cleaning these up will keep the layout consistent with other examples.Also applies to: 67-67, 70-70, 93-93
apps/docs/libraries/ts/ratelimit/override/get-override.mdx (2)
52-52
: Align code snippet formatting.
The object key lines (identifier
,namespaceId
) have inconsistent spacing and indentation. Ensure there’s a space after the colon and uniform indent (e.g., 2 spaces) for better readability.Also applies to: 59-60
56-56
: Remove extra blank lines around the code blocks.
There are stray blank lines before and after the example snippets. Trimming these will keep the examples visually compact and consistent.Also applies to: 77-77
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
apps/dashboard/package.json
(1 hunks)apps/docs/libraries/ts/ratelimit/override/get-override.mdx
(2 hunks)apps/docs/libraries/ts/ratelimit/override/list-overrides.mdx
(2 hunks)apps/docs/libraries/ts/ratelimit/override/overview.mdx
(0 hunks)apps/docs/libraries/ts/ratelimit/override/set-override.mdx
(3 hunks)apps/docs/libraries/ts/ratelimit/ratelimit.mdx
(1 hunks)
💤 Files with no reviewable changes (1)
- apps/docs/libraries/ts/ratelimit/override/overview.mdx
⏰ Context from checks skipped due to timeout of 90000ms (25)
- GitHub Check: Test Go API Local / Test (Shard 8/8)
- GitHub Check: Test Go API Local / Test (Shard 6/8)
- GitHub Check: Test Go API Local / Test (Shard 1/8)
- GitHub Check: Test Go API Local / Test (Shard 7/8)
- GitHub Check: Test Go API Local / Test (Shard 5/8)
- GitHub Check: Test Go API Local / Test (Shard 3/8)
- GitHub Check: Test Go API Local / Test (Shard 2/8)
- GitHub Check: Test Go API Local / Test (Shard 4/8)
- GitHub Check: Build / Build
- GitHub Check: Test API / API Test Local
- GitHub Check: Test Packages / Test ./packages/rbac
- GitHub Check: Test Packages / Test ./apps/dashboard
- GitHub Check: Test Packages / Test ./internal/clickhouse
- GitHub Check: Test Packages / Test ./packages/nextjs
- GitHub Check: Test Packages / Test ./internal/resend
- GitHub Check: Test Packages / Test ./packages/api
- GitHub Check: Test Packages / Test ./packages/cache
- GitHub Check: Test Packages / Test ./packages/hono
- GitHub Check: Test Packages / Test ./internal/keys
- GitHub Check: Test Packages / Test ./internal/hash
- GitHub Check: Test Packages / Test ./internal/id
- GitHub Check: Test Packages / Test ./internal/billing
- GitHub Check: Test Packages / Test ./internal/encryption
- GitHub Check: autofix
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
apps/dashboard/package.json (1)
55-55
: Update dependency to stable@unkey/ratelimit
version.
The dependency was updated from the canary pre‐release to the stable^2.0.0
, aligning with the rest of the SDK.
Ensure you runnpm install
and execute the dashboard’s test suite to catch any compatibility issues with the stable release.apps/docs/libraries/ts/ratelimit/ratelimit.mdx (1)
10-10
: Approve updated GitHub link toratelimit/ts
subdirectory.
The card now points to the TypeScript SDK folder (ratelimit/ts
), which is more precise.
const overrides = await unkey.listOverrides({ | ||
nameSpaceId:"rlns_12345", | ||
const overrides = await unkey.listOverrides({ | ||
nameSpaceId:"rlns_12345", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix property name casing in example.
The example uses nameSpaceId
, but the correct parameter key is namespaceId
(lowercase “s”). Please update to match the API.
Update the latest version and update docs to reflect the API changes.
Type of change
How should this be tested?
Checklist
Required
pnpm build
pnpm fmt
console.logs
git pull origin main
Appreciated
Summary by CodeRabbit
Documentation
Chores