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: add nextjs session utils #767

Merged
merged 16 commits into from
Jan 4, 2024
Merged

Conversation

anku255
Copy link
Contributor

@anku255 anku255 commented Dec 18, 2023

Summary of change

This PR adds Next.js session util functions to be used with app dir. These changes will help us update Next.js code snippets for app dir throughout our docs.

Test Plan

Manually tested, that these utils work. Adding automated tests will require us to update Next.js version and that require us upgrading other packages including typescript.

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.

lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
test/with-typescript/index.ts Show resolved Hide resolved
lib/ts/nextjs.ts Show resolved Hide resolved
lib/ts/nextjs.ts Show resolved Hide resolved
test/nextjs.test.js Show resolved Hide resolved
test/nextjs.test.js Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@rishabhpoddar
Copy link
Contributor

Also, fix all the PR checks. They are failing + resolve PR conflicts

@anku255 anku255 changed the title Add nextjs session utils feat: add nextjs session utils Dec 22, 2023
@anku255 anku255 force-pushed the feat/add-nextjs-session-utils branch from 8a354f6 to daddd0e Compare December 22, 2023 09:37
lib/ts/nextjs.ts Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/framework/custom/framework.ts Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
lib/ts/nextjs.ts Show resolved Hide resolved
test/nextjs.test.js Outdated Show resolved Hide resolved
test/nextjs.test.js Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
test/nextjs.test.js Show resolved Hide resolved
lib/ts/nextjs.ts Outdated Show resolved Hide resolved
@rishabhpoddar rishabhpoddar changed the base branch from 16.6 to 16.7 January 4, 2024 07:58
@rishabhpoddar rishabhpoddar merged commit 1c37eef into 16.7 Jan 4, 2024
15 of 17 checks passed
@rishabhpoddar rishabhpoddar deleted the feat/add-nextjs-session-utils branch January 4, 2024 07:59
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