Skip to content

Commit 8ac4f49

Browse files
flexponsiveflex-cloud-user
authored andcommitted
Merge branch 'master' into feature/dynamic-form-propeties
2 parents ec94e0a + 74b6b12 commit 8ac4f49

File tree

395 files changed

+3774
-2060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+3774
-2060
lines changed

.github/workflows/playwright.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- name: Build Inertia
3030
run: pnpm -r --filter ./packages/core --filter ./packages/${{ matrix.adapter }}* build
3131

32+
- name: Type-check test-app
33+
run: cd packages/${{ matrix.adapter == 'vue' && 'vue3' || matrix.adapter }}/test-app && pnpm run type-check
34+
3235
- name: Install Playwright Browsers
3336
run: pnpm playwright install chromium
3437

CHANGELOG.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
For changes prior to v1.0.0, see the [legacy releases](https://legacy.inertiajs.com/releases).
99

10-
## [Unreleased](https://github.com/inertiajs/inertia/compare/v2.0.17...master)
10+
## [Unreleased](https://github.com/inertiajs/inertia/compare/v2.1.0...master)
1111

1212
- Nothing yet
1313

14+
## [v2.1.0](https://github.com/inertiajs/inertia/compare/v2.0.17...v2.1.0) - 2025-08-13
15+
16+
### What's Changed
17+
18+
* Support for passing custom component to `as` prop of `Link` component. by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia/pull/2443
19+
* Use `nodemon` to trigger new files and deleted files in test apps by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia/pull/2442
20+
* Use ReactNode type for children props by [@chack1172](https://github.com/chack1172) in https://github.com/inertiajs/inertia/pull/2385
21+
* Allow function as children component in react Deferred and WhenVisible by [@chack1172](https://github.com/chack1172) in https://github.com/inertiajs/inertia/pull/2386
22+
* Improve test that waits for scroll position restoration by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia/pull/2473
23+
* Introduction of the `Form` component by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia/pull/2474
24+
* Improve `children` prop of `<Form>` Component by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia/pull/2487
25+
* Add Form component ref support by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia/pull/2496
26+
* Make Svelte's <Deferred> not crash in an SSR environment by [@dkulchenko](https://github.com/dkulchenko) in https://github.com/inertiajs/inertia/pull/2396
27+
* Fix core: Queue processing when an item fails by [@pintend](https://github.com/pintend) in https://github.com/inertiajs/inertia/pull/2467
28+
* Migrate playgrounds to Tailwind 4 by [@jrmajor](https://github.com/jrmajor) in https://github.com/inertiajs/inertia/pull/2369
29+
30+
### New Contributors
31+
32+
* [@dkulchenko](https://github.com/dkulchenko) made their first contribution in https://github.com/inertiajs/inertia/pull/2396
33+
* [@pintend](https://github.com/pintend) made their first contribution in https://github.com/inertiajs/inertia/pull/2467
34+
35+
**Full Changelog**: https://github.com/inertiajs/inertia/compare/v2.0.17...v2.1.0
36+
1437
## [v2.0.17](https://github.com/inertiajs/inertia/compare/v2.0.16...v2.0.17) - 2025-07-18
1538

1639
### What's Changed

CONTRIBUTING.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ inertia/
3030

3131
### Key Components
3232

33-
* **Core Library:** The framework-agnostic engine powering all adapters (`packages/core`).
34-
* **Adapters:** Framework-specific integrations for React, Svelte, and Vue.
35-
* **Test Applications:** Minimal frontend apps used for automated testing (`packages/*/test-app/`).
36-
* **Playwright Tests:** Framework-agnostic end-to-end tests that verify behavior across adapters (`tests/*.spec.ts`).
37-
* **Playgrounds:** Full Laravel applications for manual testing (`playgrounds/`). These are optional and may eventually be removed.
33+
- **Core Library:** The framework-agnostic engine powering all adapters (`packages/core`).
34+
- **Adapters:** Framework-specific integrations for React, Svelte, and Vue.
35+
- **Test Applications:** Minimal frontend apps used for automated testing (`packages/*/test-app/`).
36+
- **Playwright Tests:** Framework-agnostic end-to-end tests that verify behavior across adapters (`tests/*.spec.ts`).
37+
- **Playgrounds:** Full Laravel applications for manual testing (`playgrounds/`). These are optional and may eventually be removed.
3838

3939
## Getting Started
4040

@@ -146,8 +146,8 @@ pnpm dev:test-app:vue
146146

147147
Each test app runs two servers:
148148

149-
* A Node.js backend that automatically restarts when changed
150-
* A Vite development server for the frontend
149+
- A Node.js backend that automatically restarts when changed
150+
- A Vite development server for the frontend
151151

152152
If you are developing a new feature or fixing a bug, you can use these test apps to develop and test your changes.
153153

@@ -190,8 +190,8 @@ Add a new Playwright test to verify your change. Playwright allows us to test fe
190190
import { test, expect } from '@playwright/test'
191191

192192
test('your feature works', async ({ page }) => {
193-
await page.goto('/your-feature')
194-
// Your assertions here
193+
await page.goto('/your-feature')
194+
// Your assertions here
195195
})
196196
```
197197

@@ -249,9 +249,7 @@ When preparing a release:
249249

250250
2. Run `pnpm install` to update the lockfile.
251251

252-
3. Update the `CHANGELOG.md` with a summary of changes.
253-
254-
4. Publish the packages:
252+
3. Publish the packages:
255253

256254
```sh
257255
pnpm publish -r
@@ -263,4 +261,4 @@ When preparing a release:
263261
pnpm publish -r --tag=beta
264262
```
265263

266-
5. Tag a new release on [GitHub Releases](https://github.com/inertiajs/inertia/releases).
264+
4. Tag a new release on [GitHub Releases](https://github.com/inertiajs/inertia/releases).

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"dev:test-app:react": "pnpx concurrently -c \"#fdba74,#34d399\" \"cd tests/app && PACKAGE=react pnpm serve:watch\" \"cd packages/react/test-app && pnpm run dev\" --names=server,vite",
1010
"dev:test-app:svelte": "pnpx concurrently -c \"#fdba74,#34d399\" \"cd tests/app && PACKAGE=svelte pnpm serve:watch\" \"cd packages/svelte/test-app && pnpm run dev\" --names=server,vite",
1111
"dev:test-app:vue": "pnpx concurrently -c \"#fdba74,#34d399\" \"cd tests/app && PACKAGE=vue3 pnpm serve:watch\" \"cd packages/vue3/test-app && pnpm run dev\" --names=server,vite",
12+
"type-check:test-app:react": "cd packages/react/test-app && pnpm run type-check",
13+
"type-check:test-app:svelte": "cd packages/svelte/test-app && pnpm run type-check",
14+
"type-check:test-app:vue": "cd packages/vue3/test-app && pnpm run type-check",
1215
"test:react": "PACKAGE=react playwright test",
1316
"test:svelte": "PACKAGE=svelte playwright test",
1417
"test:vue": "PACKAGE=vue3 playwright test",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@inertiajs/core",
3-
"version": "2.0.17",
3+
"version": "2.1.0",
44
"license": "MIT",
55
"description": "A framework for creating server-driven single page apps.",
66
"contributors": [

packages/core/src/queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class Queue<T> {
88
}
99

1010
public process() {
11-
this.processingPromise ??= this.processNext().then(() => {
11+
this.processingPromise ??= this.processNext().finally(() => {
1212
this.processingPromise = null
1313
})
1414

packages/core/src/router.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ export class Router {
161161
const visit: PendingVisit = this.getPendingVisit(href, {
162162
...options,
163163
showProgress: options.showProgress ?? !options.async,
164-
})
164+
} as VisitOptions)
165165

166-
const events = this.getVisitEvents(options)
166+
const events = this.getVisitEvents(options as VisitOptions)
167167

168168
// If either of these return false, we don't want to continue
169169
if (events.onBefore(visit) === false || !fireBeforeEvent(visit)) {
@@ -284,18 +284,19 @@ export class Router {
284284
return currentPage.resolve(component)
285285
}
286286

287-
public replace(params: ClientSideVisitOptions): void {
287+
public replace<TProps = Page['props']>(params: ClientSideVisitOptions<TProps>): void {
288288
this.clientVisit(params, { replace: true })
289289
}
290290

291-
public push(params: ClientSideVisitOptions): void {
291+
public push<TProps = Page['props']>(params: ClientSideVisitOptions<TProps>): void {
292292
this.clientVisit(params)
293293
}
294294

295-
protected clientVisit(params: ClientSideVisitOptions, { replace = false }: { replace?: boolean } = {}): void {
295+
protected clientVisit<TProps = Page['props']>(params: ClientSideVisitOptions<TProps>, { replace = false }: { replace?: boolean } = {}): void {
296296
const current = currentPage.get()
297297

298-
const props = typeof params.props === 'function' ? params.props(current.props) : (params.props ?? current.props)
298+
const props =
299+
typeof params.props === 'function' ? params.props(current.props as TProps) : (params.props ?? current.props)
299300

300301
const { onError, onFinish, onSuccess, ...pageParams } = params
301302

@@ -304,7 +305,7 @@ export class Router {
304305
{
305306
...current,
306307
...pageParams,
307-
props,
308+
props: props as Page['props'],
308309
},
309310
{
310311
replace,

0 commit comments

Comments
 (0)