Skip to content

Commit

Permalink
Merge branch 'inertiajs:master' into frames
Browse files Browse the repository at this point in the history
  • Loading branch information
buhrmi authored Jun 23, 2023
2 parents ffd0ba2 + d7bdc0c commit 0fd2c64
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 44 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

## [Unreleased](https://github.com/inertiajs/inertia/compare/v1.0.7...HEAD)
## [Unreleased](https://github.com/inertiajs/inertia/compare/v1.0.8...HEAD)

- Nothing
- Nothing!

## [v1.0.8](https://github.com/inertiajs/inertia/compare/v1.0.7...v1.0.8)

### Fixed

- Fix `<Head>` vNode handling in Vue 3 adapter ([#1570](https://github.com/inertiajs/inertia/pull/1570))
- Fix watching remembered data in Vue 3 adapter ([#1571](https://github.com/inertiajs/inertia/pull/1571))

## [v1.0.7](https://github.com/inertiajs/inertia/compare/v1.0.6...v1.0.7)

Expand Down
54 changes: 27 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inertiajs/core",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"description": "A framework for creating server-driven single page apps.",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inertiajs/react",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"description": "The React adapter for Inertia.js",
"contributors": [
Expand Down Expand Up @@ -59,7 +59,7 @@
"react": "^16.9.0 || ^17.0.0 || ^18.0.0"
},
"dependencies": {
"@inertiajs/core": "1.0.7",
"@inertiajs/core": "1.0.8",
"lodash.isequal": "^4.5.0"
}
}
4 changes: 2 additions & 2 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inertiajs/svelte",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"description": "The Svelte adapter for Inertia.js",
"contributors": [
Expand Down Expand Up @@ -28,7 +28,7 @@
"svelte": "^3.20.0"
},
"dependencies": {
"@inertiajs/core": "1.0.7",
"@inertiajs/core": "1.0.8",
"lodash.isequal": "^4.5.0"
}
}
4 changes: 2 additions & 2 deletions packages/vue2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inertiajs/vue2",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"description": "The Vue 2 adapter for Inertia.js",
"contributors": [
Expand Down Expand Up @@ -58,7 +58,7 @@
"vue": "^2.7.0"
},
"dependencies": {
"@inertiajs/core": "1.0.7",
"@inertiajs/core": "1.0.8",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inertiajs/vue3",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"description": "The Vue 3 adapter for Inertia.js",
"contributors": [
Expand Down Expand Up @@ -56,7 +56,7 @@
"vue": "^3.0.0"
},
"dependencies": {
"@inertiajs/core": "1.0.7",
"@inertiajs/core": "1.0.8",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0"
}
Expand Down
17 changes: 16 additions & 1 deletion packages/vue3/src/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,26 @@ const Head: InertiaHead = defineComponent({
renderNodes(nodes) {
return this.addTitleElement(
nodes
.flatMap((node) => (node.type.toString().startsWith('Symbol') && node.children ? node.children : node))
.flatMap((node) => this.resolveNode(node))
.map((node) => this.renderTag(node))
.filter((node) => node),
)
},
resolveNode(node) {
const nodeType = node.type && node.type.toString()
if (typeof node.type === 'function') {
return this.resolveNode(node.type())
} else if (typeof node.type === 'object') {
console.warn(`Using components in the <Head> component is not supported.`)
return []
} else if (/(fragment|fgt)/i.test(nodeType) && node.children) {
return node.children.flatMap((child) => this.resolveNode(child))
} else if (/(comment|cmt)/i.test(nodeType)) {
return []
} else {
return node
}
},
},
render() {
this.provider.update(this.renderNodes(this.$slots.default ? this.$slots.default() : []))
Expand Down
2 changes: 1 addition & 1 deletion packages/vue3/src/useRemember.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function useRemember<T extends object>(
const restored = router.restore(key)
const type = isReactive(data) ? reactive : ref
const hasCallbacks = typeof data.__remember === 'function' && typeof data.__restore === 'function'
const remembered = restored === undefined ? data : type(hasCallbacks ? data.__restore(restored) : restored)
const remembered = type(restored === undefined ? data : hasCallbacks ? data.__restore(restored) : restored)

watch(
remembered,
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"react-dom": "^18.2.0",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.5",
"vite": "^4.0.3"
"vite": "^4.0.5"
}
}
2 changes: 1 addition & 1 deletion playgrounds/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"svelte": "^3.55.0",
"svelte-loader": "^3.1.4",
"tailwindcss": "^3.2.4",
"vite": "^4.0.3"
"vite": "^4.0.5"
}
}
2 changes: 1 addition & 1 deletion playgrounds/vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lodash": "^4.17.19",
"postcss": "^8.4.20",
"tailwindcss": "^3.2.4",
"vite": "^4.0.3",
"vite": "^4.0.5",
"vue": "^2.7.14",
"vue-server-renderer": "^2.7.14"
}
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"postcss": "^8.4.20",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.4",
"vite": "^4.0.3",
"vite": "^4.0.5",
"vue": "^3.2.45",
"vue-tsc": "^1.0.24"
}
Expand Down

0 comments on commit 0fd2c64

Please sign in to comment.