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(provider): require to import every provider individually #2518

Merged
merged 14 commits into from
Aug 13, 2021

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Aug 12, 2021

Fixes #2515

With this PR, the newly added provider also won't have to add anything manually to the providers.d.ts file to be included. We generate it from the provider file.

BREAKING CHANGE:

Providers now have to be imported one-by-one:

Example:

- import Provider from "next-auth/providers"
- Providers.Auth0({...})
+ import Auth0Provider from "next-auth/providers/auth0"
+ Auth0Provider({...})

@vercel
Copy link

vercel bot commented Aug 12, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/DJZ1RsXQV8sJ2zD8oC3yh7PU5XCg
✅ Preview: https://next-auth-git-feat-providers-ts-nextauthjs.vercel.app

@github-actions github-actions bot added the TypeScript Issues relating to TypeScript label Aug 12, 2021
@balazsorban44 balazsorban44 requested a review from ndom91 August 12, 2021 23:00
@balazsorban44 balazsorban44 changed the title fix(ts): create individual provider module types fix(ts): generate individual provider module types Aug 12, 2021
@vercel vercel bot temporarily deployed to Preview August 12, 2021 23:55 Inactive
@github-actions github-actions bot added the test Related to testing label Aug 12, 2021
@balazsorban44 balazsorban44 temporarily deployed to Preview August 12, 2021 23:56 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2021

Codecov Report

Merging #2518 (e2ec27d) into next (65040dc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #2518   +/-   ##
=======================================
  Coverage   11.56%   11.56%           
=======================================
  Files          85       85           
  Lines        1314     1314           
  Branches      370      370           
=======================================
  Hits          152      152           
  Misses        966      966           
  Partials      196      196           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65040dc...e2ec27d. Read the comment docs.

@balazsorban44 balazsorban44 changed the title fix(ts): generate individual provider module types feat(provider): require to import every provider individually Aug 12, 2021
@balazsorban44 balazsorban44 added core Refers to `@auth/core` priority Priority fix or enhancement labels Aug 13, 2021
@vercel vercel bot temporarily deployed to Preview August 13, 2021 16:48 Inactive
@github-actions github-actions bot removed the core Refers to `@auth/core` label Aug 13, 2021
@balazsorban44 balazsorban44 temporarily deployed to Preview August 13, 2021 16:49 Inactive
Copy link
Collaborator

@ubbe-xyz ubbe-xyz left a comment

Choose a reason for hiding this comment

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

We did pair review on this with @balazsorban44 , looking good 💪🏽 💯

@vercel vercel bot temporarily deployed to Preview August 13, 2021 17:10 Inactive
@balazsorban44 balazsorban44 merged commit 55132e5 into next Aug 13, 2021
@balazsorban44 balazsorban44 deleted the feat/providers-ts branch August 13, 2021 17:12
mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
…thjs#2518)

Adds a new way to import providers for modularity and better tree-shaking.

BREAKING CHANGE:

Providers now have to be imported one-by-one:

Example:
```diff
- import Provider from "next-auth/providers"
- Providers.Auth0({...})
+ import Auth0Provider from "next-auth/providers/auth0"
+ Auth0Provider({...})
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Priority fix or enhancement test Related to testing TypeScript Issues relating to TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants