Skip to content
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

feat(codemod): UseSession Hook Update ( nextAuth - migration to v4) #1159

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

manishjha-04
Copy link
Contributor

📚The useSession hook has been updated to return an object. This allows you to test states much more cleanly with the new status option.

🔗 Linked Issue #966

🧪 UseCase

Copy link

vercel bot commented Jul 26, 2024

@manishjha-04 is attempting to deploy a commit to the Codemod Team on Vercel.

A member of the Team first needs to authorize it.

@@ -0,0 +1,15 @@
{
"$schema": "https://codemod-utils.s3.us-west-1.amazonaws.com/configuration_schema.json",
"name": "nextAuth/v4/useSession-array-to-object-destructuring",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets change the name to nextAuth/4/useSession-array-to-object-destructuring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure✌️

"arguments": [],
"meta": {
"tags": ["nextAuth"],
"git": "https://github.com/codemod-com/codemod"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets update the git field to https://github.com/codemod-com/codemod/tree/main/packages/codemods/nextAuth/useSession-array-to-Object-destrucutring

@DmytroHryshyn
Copy link
Contributor

Hi @manishjha-04 Thanks for your PR! Could you please rebase your branch on the latest main and then regenerate pnpm-lock file by running pnpm install once more locally?

@manishjha-04
Copy link
Contributor Author

manishjha-04 commented Jul 27, 2024

@DmytroHryshyn Done👍.... Please review it and let me know if any changes needed!

@DmytroHryshyn
Copy link
Contributor

@manishjha-04 Thanks! Last 2 things: linter fails because of incorrect codemod files formatting (can be fixed by pnpm lint:write) and unit test did not pass because jscodeshift slightly changed formatting. When this is fixes, we can merge the codemod

@DmytroHryshyn DmytroHryshyn merged commit 6688e28 into codemod-com:main Jul 29, 2024
2 of 6 checks passed
@manishjha-04 manishjha-04 deleted the usesession branch July 29, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants