Dan6erbond / sk-auth

Authentication library for use with SvelteKit featuring built-in OAuth providers and zero restriction customization!
MIT License
578 stars 70 forks source link

📌 Make peer dependencies optional #79

Closed vhscom closed 2 years ago

vhscom commented 2 years ago

close: #76. supersedes #77 which was closed unexpectedly

vhscom commented 2 years ago

Tried testing locally by running pnpm link ../sk-auth from dependent svelte-headlessui-starter but didn't get a clean link so please consider this pull partly cloudy with a 20% chance of rain. In other words, community feedback appreciated. 🙂

vhscom commented 2 years ago

Followed up in a fork and discovered peer dependency meta will only cover build-esm warnings. The kit warnings also present in dependents requires either the sveltekit peer dep is removed or some kind of syntax for specifying peer dependency meta I'm not aware of.

At any rate svelte-preprocessor doesn't specify kit as a peer dependency so I don't see why SK Auth would want to. As a result, I'd recommend simply dropping the peerDependencies property in the manifest altogether to squelch the warnings. I've tested installing with PNPM 6 + 7 without peer dependencies specified and the lib functions as expected.