supertokens / supertokens-node

Node SDK for SuperTokens core
https://supertokens.com
Other
292 stars 79 forks source link

feat: remove fastify with type implementation #932

Open deepjyoti30-st opened 3 days ago

deepjyoti30-st commented 3 days ago

Summary of change

This PR replicates fastify types that are used in the SDK to avoid type mismatches through different versions of fastify. This was as reported by an user on discord (and later on reproduced locally by using the sdk with fastify 5.x)

This also updates the fastify example to test with the newly added changes. The fastify version was bumped to 5.x and as a result some other dependencies (like typescript, formbody, cors) had to be updated.

Another thing to note is, react-scripts is a dependency of the fastify example's frontend code and it had a TS version related conflict with latest fastify requirements so I moved it to be a dependency of frontend directory and added a preinstall script to install this dependency when npm i is run.

Related issues

Test Plan

Fastify example tests should pass.

Documentation changes

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

Checklist for important updates

netlify[bot] commented 3 days ago

Deploy Preview for precious-marshmallow-968a81 canceled.

Name Link
Latest commit e95edd3f434db9af63b96af9005d5db49b3ead15
Latest deploy log https://app.netlify.com/sites/precious-marshmallow-968a81/deploys/66fb8f7ae32a2800084dba82
netlify[bot] commented 3 days ago

Deploy Preview for astounding-pegasus-21c111 canceled.

Name Link
Latest commit e95edd3f434db9af63b96af9005d5db49b3ead15
Latest deploy log https://app.netlify.com/sites/astounding-pegasus-21c111/deploys/66fb8f7ada6b9f00088c9fe9
cloudflare-workers-and-pages[bot] commented 1 day ago

Deploying supertokens-node-pr-check-for-edge-function-compat with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c10516
Status: ✅  Deploy successful!
Preview URL: https://acd467c6.supertokens-node-b95.pages.dev

View logs