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(next-drupal, starters-*) - Add Next 15 support #824

Merged
merged 24 commits into from
Jan 27, 2025
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
57a66c4
docs(next-drupal)!: more detailed instruction for local dev & contrib…
yobottehg Dec 6, 2024
1793ceb
feat(next-drupal)!: upgrade to next.js 15 and react 19
yobottehg Dec 6, 2024
8f52387
feat(next-drupal)!: upgrade to next.js 15 and react 19
yobottehg Dec 6, 2024
ef3f8f8
feat(basic-starter)!: upgrade to next.js 15 and react 19
yobottehg Dec 6, 2024
7c9ffeb
feat(pages-starter)!: upgrade to next.js 15 and react 19
yobottehg Dec 6, 2024
08ed20b
feat(graphql-starter)!: upgrade to next.js 15 and react 19
yobottehg Dec 6, 2024
fea2caf
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
4c30157
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
c437af0
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
cd4085a
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
8802691
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
e85ffb1
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
60257e5
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
87d38a5
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
2f40d7e
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg Dec 6, 2024
62fad2d
fix(next-drupal)!: replace bogus draftModeStores
yobottehg Dec 6, 2024
ff9c22c
revert link related changes, PR reviews for draft and cookie store, a…
yobottehg Jan 20, 2025
94ca5ba
revert bogus change
yobottehg Jan 20, 2025
e48f97c
revert bogus change
yobottehg Jan 20, 2025
3e0fb3d
fix(next-drupal): make tests pass by re-assigning draftMode variable
yobottehg Jan 20, 2025
8168a73
fix(next-drupal): use link component again, draft mode convention
yobottehg Jan 24, 2025
07a2b7b
fix(next-drupal): sorting
yobottehg Jan 24, 2025
36d157f
Merge branch 'main' into next_15_support
yobottehg Jan 24, 2025
2823757
fix(next-drupal, *-starter, www): disallow next.js versions with secu…
yobottehg Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(next-drupal)!: upgrade tests to new async request objects
yobottehg committed Dec 6, 2024
commit c437af00aba8b13a51795b951c25c3a95f84b37c
2 changes: 1 addition & 1 deletion packages/next-drupal/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DRUPAL_BASE_URL=http://drupal
DRUPAL_BASE_URL=http://localhost
DRUPAL_USERNAME=drupal
DRUPAL_PASSWORD=drupal
DRUPAL_CLIENT_ID=next-drupal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, jest, test } from "@jest/globals"
import { GetStaticPropsContext, NextApiRequest, NextApiResponse } from "next"
import { GetStaticPropsContext } from "next"
import { DRAFT_DATA_COOKIE_NAME, NextDrupalPages } from "../../src"
import {
BASE_URL,
8 changes: 4 additions & 4 deletions packages/next-drupal/tests/draft/draft.test.ts
Original file line number Diff line number Diff line change
@@ -126,7 +126,7 @@ describe("enableDraftMode()", () => {

describe("disableDraftMode()", () => {
test("draft data cookie was deleted", async () => {
disableDraftMode()
await disableDraftMode()
const cookiesStore = await cookies()

expect(cookiesStore).toHaveBeenCalledTimes(1)
@@ -185,7 +185,6 @@ describe("getDraftData()", () => {
draftModeStore.enable()

const data = await getDraftData()
expect(draftMode).toHaveBeenCalledTimes(1)
expect(draftModeStore.isEnabled).toBe(true)
expect(cookiesStore.has).toHaveBeenCalledWith(DRAFT_DATA_COOKIE_NAME)
expect(cookiesStore.has).toHaveBeenCalledTimes(1)
@@ -204,7 +203,6 @@ describe("getDraftData()", () => {
draftModeStore.enable()

const data = await getDraftData()
expect(draftModeStore).toHaveBeenCalledTimes(1)
expect(draftModeStore.isEnabled).toBe(true)
expect(cookiesStore.has).toHaveBeenCalledWith(DRAFT_DATA_COOKIE_NAME)
expect(cookiesStore.has).toHaveBeenCalledTimes(1)
@@ -220,6 +218,8 @@ describe("getDraftData()", () => {
cookiesStore.set(draftDataCookie)
draftModeStore.enable()

expect(getDraftData()).toMatchObject(draftData)
const draftDataReturn = await getDraftData()

expect(draftDataReturn).toMatchObject(draftData)
})
})