Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxt): migrate to latest @vueuse/head #8000

Merged
merged 36 commits into from Oct 12, 2022
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1629a5c
feat(head): migrate to latest `@vueuse/head`
harlan-zw Oct 5, 2022
52a8084
fix: correct innerHTML casing
harlan-zw Oct 5, 2022
e9bcdf8
revert: @vue/reactivity change
harlan-zw Oct 5, 2022
55b7361
revert: @vue/reactivity change
harlan-zw Oct 5, 2022
871c4d2
fix: typecheck error
harlan-zw Oct 5, 2022
2545cbb
chore: polishing PR
harlan-zw Oct 7, 2022
61f13ae
chore: bump @vueuse/head
harlan-zw Oct 7, 2022
01ddd16
fix: proper input types for `useHeadRaw`
harlan-zw Oct 7, 2022
f29cd62
feat(components): add `body` and `renderPriority` support
harlan-zw Oct 7, 2022
b4db806
fix: pause dom updates in client only
harlan-zw Oct 7, 2022
62c476b
chore: upgrade to @vueuse/head 1.0.0-rc.4
harlan-zw Oct 11, 2022
ecf29af
Merge branch 'main' of github.com:nuxt/framework into feat/vueuse-hea…
harlan-zw Oct 11, 2022
efe084c
chore: sync lock file
harlan-zw Oct 11, 2022
07d9ae4
Merge branch 'main' into feat/vueuse-head-migration
harlan-zw Oct 11, 2022
df84fce
chore: bump pkg
harlan-zw Oct 11, 2022
e38cd77
Merge branch 'feat/vueuse-head-migration' of github.com:harlan-zw/nux…
harlan-zw Oct 11, 2022
f77137a
Merge branch 'main' into feat/vueuse-head-migration
harlan-zw Oct 11, 2022
9475bb3
revert: test change
harlan-zw Oct 11, 2022
b3e2393
Merge branch 'feat/vueuse-head-migration' of github.com:harlan-zw/nux…
harlan-zw Oct 11, 2022
d0e0c3a
chore: simplify shortcuts
harlan-zw Oct 12, 2022
5b6f2a6
Merge branch 'main' of github.com:nuxt/framework into feat/vueuse-hea…
harlan-zw Oct 12, 2022
20e96ec
chore: simplify the initial meta even further
harlan-zw Oct 12, 2022
fb20fbf
doc: improve seo / useHead doc
harlan-zw Oct 12, 2022
c8f7c11
doc: polish and lint
harlan-zw Oct 12, 2022
6389ce4
doc: polish and lint
harlan-zw Oct 12, 2022
4788b1d
chore: pr fixes
harlan-zw Oct 12, 2022
53d6656
style: de-semify
danielroe Oct 12, 2022
b7bd452
refactor: move to dev-deps
danielroe Oct 12, 2022
8857474
fix: update type import
danielroe Oct 12, 2022
8f34199
Merge remote-tracking branch 'origin/main' into feat/vueuse-head-migr…
danielroe Oct 12, 2022
a8044a5
docs: add apostrophe
danielroe Oct 12, 2022
f94a0ab
docs: and this one too
danielroe Oct 12, 2022
5a92a44
Merge branch 'main' into feat/vueuse-head-migration
harlan-zw Oct 12, 2022
034e8ca
chore: bump @vueuse/head, fixes titleTemplate issue
harlan-zw Oct 12, 2022
53db611
style: small tweaks
danielroe Oct 12, 2022
b21a8ce
test: add some very basic type tests
danielroe Oct 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions test/fixtures/basic/types.ts
Expand Up @@ -120,6 +120,34 @@ describe('runtimeConfig', () => {
})
})

describe('head', () => {
it('correctly types nuxt.config options', () => {
// @ts-expect-error
defineNuxtConfig({ app: { head: { titleTemplate: () => 'test' } } })
defineNuxtConfig({
app: {
head: {
meta: [{ key: 'key', name: 'description', content: 'some description ' }],
titleTemplate: 'test %s'
}
}
})
})
it('types useHead', () => {
useHead({
base: { href: '/base' },
link: computed(() => []),
danielroe marked this conversation as resolved.
Show resolved Hide resolved
meta: [
{ key: 'key', name: 'description', content: 'some description ' },
() => ({ key: 'key', name: 'description', content: 'some description ' })
],
titleTemplate: (titleChunk) => {
return titleChunk ? `${titleChunk} - Site Title` : 'Site Title'
}
})
})
})

describe('composables', () => {
it('allows providing default refs', () => {
expectTypeOf(useState('test', () => ref('hello'))).toEqualTypeOf<Ref<string>>()
Expand Down