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: use original tough-cookie v5 #2356

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SamMousa
Copy link

@SamMousa SamMousa commented Nov 14, 2024

This PR aims to drop the wrapper of tough-cookie: https://github.com/bundled-es-modules/tough-cookie
It also upgrades the dep to v5.

The original PR: #2206 used the es-bundled version.
In september with the release of v5 tough-cookie was rewritten in typescript and (I'm assuming here) is probably compatible with ES without this wrapper package.

@kettanaito
Copy link
Member

Hi, @SamMousa. This looks exciting! The change requires a rewrite of our cookie store because the new tough-cookie exposes breaking changes in its methods (mostly in types). I will look into this once I have a minute.

@SamMousa
Copy link
Author

I was hoping tests in ci would give me pointers, since running tests locally in the js / ts ecosystem is always a nightmare

@kettanaito
Copy link
Member

@SamMousa, give this repo a try, the tests should be running without issues. Install dependencies, and you have three levels of tests to run:

  • pnpm test:unit
  • pnpm test:node
  • pnpm test:browser

The cookie store changes affect both Node.js and the browser, so start from running Node.js tests locally.

You can spot the mismatch in types if you open the module you modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants