next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

chore: export adapter types

Open Dwlad90 opened this issue 2 years ago โ€ข 1 comments

โ˜•๏ธ Reasoning

What changes are being made? What feature/bug is being fixed here? Export types for adapters were missing from the exports filed in package.json and are added by this PR.

๐Ÿงข Checklist

  • [ ] Documentation
  • [ ] Tests
  • [ ] Ready to be merged

๐ŸŽซ Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

๐Ÿ“Œ Resources

Dwlad90 avatar Sep 19 '22 14:09 Dwlad90

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated
auth-docs โŒ Failed (Inspect) Feb 20, 2023 at 7:15AM (UTC)
2 Ignored Deployments
Name Status Preview Comments Updated
next-auth โฌœ๏ธ Ignored (Inspect) Feb 20, 2023 at 7:15AM (UTC)
next-auth-docs โฌœ๏ธ Ignored (Inspect) Feb 20, 2023 at 7:15AM (UTC)

vercel[bot] avatar Sep 19 '22 14:09 vercel[bot]

@balazsorban44 TypeScript extends how exports is used in node to also include type info. See an example here.

While this example isn't the exact same as the use-case in this pull request, it does show that exports is also meant to be used for types.

Currently, there is no way for consumers to directly import the types defined in adapters.ts. This PR enables users who need them in their code to explicitly import them without adding to the default public API surface. An alternative approach could be to add export * from './adapters'; to index.ts, which would just make the types in adapters.ts part of the default public API of the library.

TxHawks avatar Sep 25 '22 10:09 TxHawks

@balazsorban44 any chance to get this merged?

TxHawks avatar Nov 17 '22 10:11 TxHawks

@Dwlad90 is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 20 '22 13:12 vercel[bot]

We have exported this in our new package @auth/core - do you consider switching? Otherwise, could you please open a new PR to v4 (or fix this one)? That is where we accept PRs to next-auth, moving forward. Sorry for the inconvenience ๐Ÿ™‡โ€โ™‚๏ธ

@ThangHuuVu We tried a new package @auth/core and it doesn't work in the our project because of the module type of the package. I've updated this pull request and waiting it to be merged.

Thank you for the conversation!

Dwlad90 avatar Feb 05 '23 07:02 Dwlad90

hey @Dwlad90 could you please reopen the PR against v4 branch? I'm closing this one, sorry for the inconvenience ๐Ÿ™

ThangHuuVu avatar Jul 13 '23 16:07 ThangHuuVu