Skip to content

Conversation

@CesarBenavides777
Copy link
Contributor

@CesarBenavides777 CesarBenavides777 commented Nov 26, 2024

Tasks

  • [] I have signed a Contributor License Agreement (CLA) with WP Engine.
    • I have not received the email yet
  • If a code change, I have written testing instructions that the whole team & outside contributors can understand.
  • I have written and included a comprehensive changeset to properly document the changes I've made.

Description


'@faustwp/experimental-app-router': minor

Update @faustwp/experimental-app-router to account for next 15 changes to cookies and update NextResponse import

Notable changes:

import { cookies } from 'next/headers'
 
export default async function Page() {
  const cookieStore = await cookies()
  const theme = cookieStore.get('theme')
  return '...'
}
  • Files changed:

    • packages/experimental-app-router/src/server-actions/logoutAction.ts
    • packages/experimental-app-router/src/server-actions/utils/setRefreshToken.ts
    • packages/experimental-app-router/src/server/auth/fetchTokens.ts
    • packages/experimental-app-router/src/server/routeHandler/tokenHandler.ts
  • Added use server to logout action

  • Files changed:

    • packages/experimental-app-router/src/server-actions/logoutAction.ts
  • Updated Next App Router example to use latest next version and React 19 RC.

  • Updated Example Login form using React 19s useActionState

  • Files Changed:

    • examples/next/app-router/app/login/page.tsx
    • examples/next/app-router/package.json

Related Issue(s):

Testing

Built and linked the local package to the updated example repo and it works as expected.
repo: https://github.com/CesarBenavides777/1919-fix-reproduction.git
Used bun and latest react and next versions just to see if it would work.
Built locally using vercel build --prod and vercel --prebuilt --prod to deploy it linked with the updated package.

https://1919-fix-reproduction.vercel.app/login
https://1919-fix-reproduction.vercel.app/my-account

Deployed on vercel
Subscriber User Credentials:
Username: TEST
Password: qk!TJAlsUC*dqRBy2z(u6(rQ

Screenshots

image

Documentation Changes

None

Dependant PRs

@CesarBenavides777 CesarBenavides777 requested a review from a team as a code owner November 26, 2024 18:27
@headless-platform-by-wp-engine

Currently, we do not support the creation of preview deployments based on changes coming from forked repositories.
Learn more about preview environments in our documentation.

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2024

🦋 Changeset detected

Latest commit: 1acee20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/experimental-app-router Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@theodesp
Copy link
Member

Hey @CesarBenavides777 There is a conflicting peer dependency with next 15. maybe we can reduce that to be next 13 and onwards.

https://github.com/wpengine/faustjs/blob/08a54c61714e005c49cf9a7000f1a65bd85ff6d1/packages/experimental-app-router/package.json#L54C4-L54C24

@CesarBenavides777
Copy link
Contributor Author

@theodesp do you want me to revert the changes I made to the example repo? That's using the latest next and react as well.

@theodesp
Copy link
Member

theodesp commented Dec 2, 2024

Hey @CesarBenavides777 It looks like it works now. I will review.

@theodesp theodesp merged commit 5457479 into wpengine:canary Dec 3, 2024
18 checks passed
@headless-platform-by-wp-engine

Currently, we do not support the creation of preview deployments based on changes coming from forked repositories.
Learn more about preview environments in our documentation.

@CesarBenavides777 CesarBenavides777 deleted the bug-1919-experimental-app-router branch December 4, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Closed

Development

Successfully merging this pull request may close these issues.

2 participants