From 201323d22cffea8ade2979920776b083b6c6c3e4 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Sun, 22 Dec 2024 14:03:59 +0100 Subject: [PATCH] perf(nuxt): remove useId from composable key plugin (#30328) --- packages/schema/src/config/build.ts | 1 - test/fixtures/basic-types/types.ts | 5 ----- 2 files changed, 6 deletions(-) diff --git a/packages/schema/src/config/build.ts b/packages/schema/src/config/build.ts index debe037a03..1e10a9aaff 100644 --- a/packages/schema/src/config/build.ts +++ b/packages/schema/src/config/build.ts @@ -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 }, diff --git a/test/fixtures/basic-types/types.ts b/test/fixtures/basic-types/types.ts index 204e980d97..d4cda0b4b5 100644 --- a/test/fixtures/basic-types/types.ts +++ b/test/fixtures/basic-types/types.ts @@ -467,11 +467,6 @@ describe('composables', () => { expectTypeOf(useFetch('/test', { default: () => 500 }).data).toEqualTypeOf>() }) - 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'