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

fix(core): centralize `isDate` fn and use in all adapters

Open ndom91 opened this issue 1 year ago • 3 comments

☕️ Reasoning

  • Each adapter had (the same) isDate function and isoDate regexp
  • Centralized in @auth/core/adapters and imported in each adapter
    • This creates the first non-type export from core/adapters, therefore it needed a new entry in the export map. Cool with yall?

🧢 Checklist

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

🎫 Affected issues

📌 Resources

ndom91 avatar May 10 '24 11:05 ndom91

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 9:55am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 9:55am
proxy ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 9:55am

vercel[bot] avatar May 10 '24 11:05 vercel[bot]

Codecov Report

Attention: Patch coverage is 78.37838% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 38.35%. Comparing base (30cb59a) to head (b9f2f22).

Files Patch % Lines
packages/core/src/adapters.ts 0.00% 8 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10872      +/-   ##
==========================================
- Coverage   38.47%   38.35%   -0.12%     
==========================================
  Files         175      175              
  Lines       27476    27437      -39     
  Branches     1218     1206      -12     
==========================================
- Hits        10571    10524      -47     
- Misses      16905    16913       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 10 '24 12:05 codecov[bot]

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Install scripts npm/[email protected]
  • Install script: postinstall
  • Source: echo "[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc..."
Install scripts npm/@sveltejs/[email protected]
  • Install script: postinstall
  • Source: node postinstall.js

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

socket-security[bot] avatar May 14 '24 09:05 socket-security[bot]