-
Notifications
You must be signed in to change notification settings - Fork 0
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
update hook signature #12
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/authhero/src/index.tsOops! Something went wrong! :( ESLint: 9.5.0 file:///eslint.config.mjs?mtime=1734006571563:6 import pkg from 'eslint-plugin-react';
WalkthroughThis pull request introduces updates to the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
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
🧹 Outside diff range and nitpick comments (1)
packages/authhero/src/types/Hooks.ts (1)
22-22
: Consider renaming the type to match the parameter nameThe parameter name has been changed from
api
toaccess
, but the type nameOnExecuteCredentialsExchangeAPI
still contains "API". Consider renaming the type toOnExecuteCredentialsExchangeAccess
for consistency.-export type OnExecuteCredentialsExchangeAPI = { +export type OnExecuteCredentialsExchangeAccess = { accessToken: { setCustomClaim: (claim: string, value: any) => void; }; access: { deny: (code: string, reason?: string) => void; }; }; export type OnExecuteCredentialsExchange = ( event: OnExecuteCredentialsExchangeEvent, - access: OnExecuteCredentialsExchangeAPI, + access: OnExecuteCredentialsExchangeAccess, ) => Promise<void>;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
apps/demo/CHANGELOG.md
(1 hunks)apps/demo/package.json
(2 hunks)packages/authhero/CHANGELOG.md
(1 hunks)packages/authhero/package.json
(1 hunks)packages/authhero/src/index.ts
(1 hunks)packages/authhero/src/types/Hooks.ts
(1 hunks)packages/authhero/test/hooks/credentials-exchange.spec.ts
(2 hunks)
✅ Files skipped from review due to trivial changes (3)
- packages/authhero/CHANGELOG.md
- packages/authhero/package.json
- apps/demo/package.json
🔇 Additional comments (2)
apps/demo/CHANGELOG.md (1)
3-8
: LGTM! Changelog update follows semantic versioning.
The patch version bump and dependency update are correctly documented following the Changesets format.
Let's verify the dependency update is properly reflected in the package configuration:
✅ Verification successful
Dependency update is correctly reflected in package.json
The package.json correctly shows the updated dependency version of authhero
to ^0.25.0
, which matches the changelog entry. The version bump and dependency update are properly synchronized.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the dependency update in package.json
# Check if the package.json reflects this dependency update
rg -A 5 '"authhero":\s*"\^0.25.0"' apps/demo/package.json
# Verify the PR description or commit messages mention the hook signature update
git log -1 --pretty=format:%B | rg -i "hook"
Length of output: 212
packages/authhero/src/index.ts (1)
11-11
: Document this as a breaking change
The addition of this export is correct and necessary. However, since this modifies the public API and includes a breaking change in the hook signature, ensure this is properly documented in the CHANGELOG.md with a major version bump following semver.
Summary by CodeRabbit
New Features
0.5.3
and0.25.0
reflecting dependency changes.Hooks
types enhancing the public API.Bug Fixes
OnExecuteCredentialsExchange
.Documentation
authhero
packages to reflect recent changes.Chores
package.json
for both demo andauthhero
packages.