Skip to content

Commit f461e14

Browse files
authored
chore(deps): bump inertia to 2.2.8 (#4005)
1 parent 5890562 commit f461e14

File tree

5 files changed

+33
-52
lines changed

5 files changed

+33
-52
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"@floating-ui/core": "^1.6.8",
2626
"@floating-ui/dom": "^1.5.1",
2727
"@hookform/resolvers": "^5.0.1",
28-
"@inertiajs/core": "^2.1.6",
29-
"@inertiajs/react": "^2.1.6",
28+
"@inertiajs/core": "^2.2.8",
29+
"@inertiajs/react": "^2.2.8",
3030
"@radix-ui/react-dialog": "^1.1.14",
3131
"@sentry/node": "^10.11.0",
3232
"@sentry/react": "^10.11.0",

pnpm-lock.yaml

Lines changed: 27 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
packages: []
22
minimumReleaseAge: 1440
33
minimumReleaseAgeExclude:
4+
- '@inertiajs/core'
5+
- '@inertiajs/react'
46
- react
57
- react-dom
68
- vite

resources/js/app.tsx

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createInertiaApp, router } from '@inertiajs/react';
1+
import { createInertiaApp } from '@inertiajs/react';
22
import * as Sentry from '@sentry/react';
33
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
44
import { createRoot, hydrateRoot } from 'react-dom/client';
@@ -54,38 +54,6 @@ createInertiaApp({
5454

5555
await Promise.all([i18n.changeLanguage(userLocale), loadDayjsLocale(userLocale)]);
5656

57-
/**
58-
* WORKAROUND: Inertia has a major bug with iOS Safari.
59-
* @see https://github.com/inertiajs/inertia/issues/2402
60-
* iOS Safari doesn't properly restore Inertia's page component state when using
61-
* the back/forward buttons. The page URL changes but the content doesn't update.
62-
* This workaround forces a full page reload on back/forward navigation to solve the issue.
63-
*
64-
* TODO Remove this when Inertia fixes iOS Safari history handling (issue #2402).
65-
*/
66-
if (typeof window !== 'undefined') {
67-
const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent);
68-
if (isIos) {
69-
// Store the current URL when navigating.
70-
let lastUrl = window.location.href;
71-
72-
// Listen for popstate (back/forward button or a swipe gesture).
73-
window.addEventListener('popstate', () => {
74-
const currentUrl = window.location.href;
75-
// If the URL changed (meaning back/forward was triggered).
76-
if (currentUrl !== lastUrl) {
77-
// Use replace() instead of setting href to avoid adding a history entry.
78-
window.location.replace(currentUrl);
79-
}
80-
});
81-
82-
// Update the last URL whenever navigation happens successfully.
83-
router.on('success', () => {
84-
lastUrl = window.location.href;
85-
});
86-
}
87-
}
88-
8957
const appElement = (
9058
<AppProviders i18n={i18n}>
9159
<App {...props} />

resources/js/features/forums/components/ForumPostCard/ForumPostCard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('Component: ForumPostCard', () => {
8383
});
8484

8585
// ASSERT
86-
const editLink = screen.getByRole('link', { name: /edit/i });
86+
const editLink = screen.getByRole('link', { name: 'Edit' });
8787
expect(editLink).toBeVisible();
8888
expect(editLink).toHaveAttribute('href', expect.stringContaining('forum-topic-comment.edit'));
8989
});

0 commit comments

Comments
 (0)