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: remove fastify with type implementation #932

Merged
merged 13 commits into from
Oct 4, 2024

Conversation

deepjyoti30-st
Copy link
Contributor

@deepjyoti30-st deepjyoti30-st commented Oct 1, 2024

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

  • Changelog has been updated
  • coreDriverInterfaceSupported.json file has been updated (if needed)
    • Along with the associated array in lib/ts/version.ts
  • frontendDriverInterfaceSupported.json file has been updated (if needed)
  • Changes to the version if needed
    • In package.json
    • In package-lock.json
    • In lib/ts/version.ts
  • Had run npm run build-pretty
  • Had installed and ran the pre-commit hook
  • If new thirdparty provider is added,
    • update switch statement in recipe/thirdparty/providers/configUtils.ts file, createProvider function.
    • add an icon on the user management dashboard.
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.
  • If have added a new web framework, update the add-ts-no-check.js file to include that
  • If added a new recipe / api interface, then make sure that the implementation of it uses NON arrow functions only (like someFunc: function () {..}).
  • If added a new recipe, then make sure to expose it inside the recipe folder present in the root of this repo. We also need to expose its types.
  • If added a new entry point, then make sure that it is importable by adding it to the exports in package.json

@deepjyoti30-st deepjyoti30-st changed the base branch from master to 20.1 October 1, 2024 05:58
Copy link

netlify bot commented Oct 1, 2024

Deploy Preview for precious-marshmallow-968a81 canceled.

Name Link
🔨 Latest commit e95edd3
🔍 Latest deploy log https://app.netlify.com/sites/precious-marshmallow-968a81/deploys/66fb8f7ae32a2800084dba82

Copy link

netlify bot commented Oct 1, 2024

Deploy Preview for astounding-pegasus-21c111 canceled.

Name Link
🔨 Latest commit e95edd3
🔍 Latest deploy log https://app.netlify.com/sites/astounding-pegasus-21c111/deploys/66fb8f7ada6b9f00088c9fe9

Copy link

cloudflare-workers-and-pages bot commented Oct 3, 2024

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

Latest commit: f7e4d52
Status: ✅  Deploy successful!
Preview URL: https://cee47ccb.supertokens-node-b95.pages.dev

View logs

@deepjyoti30-st deepjyoti30-st force-pushed the feat/remove-fastify-with-type-implementation branch from a9b3065 to 73353bf Compare October 3, 2024 04:29
lib/ts/framework/fastify/types.ts Show resolved Hide resolved
lib/ts/framework/fastify/types.ts Show resolved Hide resolved
lib/ts/framework/fastify/types.ts Outdated Show resolved Hide resolved
lib/ts/framework/fastify/types.ts Outdated Show resolved Hide resolved
lib/ts/framework/fastify/framework.ts Outdated Show resolved Hide resolved
lib/ts/framework/fastify/framework.ts Show resolved Hide resolved
@deepjyoti30-st deepjyoti30-st force-pushed the feat/remove-fastify-with-type-implementation branch from 3c10516 to 02408ed Compare October 4, 2024 11:24
@deepjyoti30-st deepjyoti30-st changed the base branch from 20.1 to 21.0 October 4, 2024 11:25
@porcellus porcellus merged commit 3a9d396 into 21.0 Oct 4, 2024
6 of 19 checks passed
@porcellus porcellus deleted the feat/remove-fastify-with-type-implementation branch October 4, 2024 21:02
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