refactor: use cookie-es for cookie utils#13512
Conversation
🦋 Changeset detectedLatest commit: 4fb5630 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Nice to know, thank you! Since this likely depends on the newest |
Actually, I haven't migrated cookie-es to be like latest upstream major yet (for same concerns of breaking changes). It will happen for cookie-es v3 likely (if we do) |
|
Oh interesting! Any time frame on that (you said "if we do" which sounds like you might not do for a long time?) |
|
I mean unless find a way to reduce/avoid breaking changes surface in cookie-ea during next sync. I don’t have any time frames for next major, but we can discuss it later if you like general idea of this migration. |
|
This might be a nice way to eliminate the security warning associated with the Just to clarify, we don't care about CJS at all. SvelteKit has been ESM-only since day 1 Combining both pieces of functionality into a single package is nice. It looks like the |
|
We should probably update the Netlify adapter to use the |
|
This recently came up in the cli repo as well: sveltejs/cli#512 Instead of adding a |
|
To summarize what I said in the maintainers channel - I don't think switching libraries is a good solution. My understanding is that this has the same vulnerability as the existing library - it just never received a CVE for it. So switching libraries solely for the sake of hiding a security warning isn't the right way forward. Once |
|
While I'm modestly in favor of this PR, I think the overall sentiment in the maintainers group was a preference for sticking with the more widely used upstream library. I think we'll get to SvelteKit 3 before too long and upgrade that library to the latest version, which will at least fix the security warning you get when using it |
I noticed that svelte-kit depends on multiple cookie packages
cookie,set-cookie-parser,@types/cookie+ workarounds for CJS support.unjs/cookie-es packs
cookieandset-cookie-parserfunctionality as an ESM-only and typed package (used and tested across UnJS and Nuxt ecosystem).This PR reduces install size (cookie:45.4/cookie types: 47.1/set-cookie:15.7) 108kB to 20.2kB
Also opened discussion: #13511
Totally unrelavant question: Have you considered trying autofix.ci to auto fix format issues? It is amazing!
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits