perf(nuxt): remove useId from composable key plugin (#30328)

This commit is contained in:
Julien Huang 2024-12-22 14:03:59 +01:00 committed by GitHub
parent af016ea0d6
commit 201323d22c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 6 deletions

View File

@ -146,7 +146,6 @@ export default defineUntypedSchema({
*/
keyedComposables: {
$resolve: (val: Array<{ name: string, argumentLength: string }> | undefined) => [
{ name: 'useId', argumentLength: 1 },
{ name: 'callOnce', argumentLength: 3 },
{ name: 'defineNuxtComponent', argumentLength: 2 },
{ name: 'useState', argumentLength: 2 },

View File

@ -467,11 +467,6 @@ describe('composables', () => {
expectTypeOf(useFetch('/test', { default: () => 500 }).data).toEqualTypeOf<Ref<unknown>>()
})
it('prevents passing string to `useId`', () => {
// @ts-expect-error providing a key is not allowed
useId('test')
})
it('enforces readonly cookies', () => {
// @ts-expect-error readonly cookie
useCookie('test', { readonly: true }).value = 'thing'