Testing new iron-session package version
Description
Related to https://github.com/workos/workos-node/issues/1130
Passes all tests, however finding errors on building the final package (using current projects typescript version). As iron-session built package specifies one of their types to be a generic.
node_modules/.pnpm/[email protected]/node_modules/iron-session/dist/index.d.cts:112:77 - error TS2315: Type 'ServerResponse' is not generic.
112 <T extends object>(req: http.IncomingMessage | Request, res: Response | http.ServerResponse<http.IncomingMessage>, sessionOptions: SessionOptions): Promise<IronSession<T>>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did manually remove the offending type from the created file, built/packaged/released on my account: https://www.npmjs.com/package/@fforres/workos-inc-node and from my tests on a monorepo, seems to be working.
If this helps moving
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
[ ] Yes
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
@stanleyphu this would really unblock the cloudflare worker community
Been testing it for a couple of weeks now in a real application and no issues. Real fix should be different, but would help the many-many folks using workers 🙏🏼
Also pinging @mattgd @gcarvelli JIC?
Thanks for the PR @fforres! Problem at the moment is that we need to support Node v16, which iron-session v8 does not if memory serves. We try to circumvent this by providing a worker specific entry point, but clearly something isn't working as expected.
Gentle ping
Hey there! We're actively working on this in a new, version-8 branch. This has to be part of a major update as these dependencies drop support for EOL Node.js versions (which we're excited to drop support for, too). We're in the final phases of testing this release and hope to get it out soon. Thanks!