\r\n\r\nself.addEventListener(\r\n 'message',\r\n (\r\n evt: MessageEvent\u003C{\r\n message: string\r\n }>,\r\n ) => {\r\n const { message } = evt.data\r\n const greeting = `Hello ${upperCase(message)} from assets!`\r\n\r\n postMessage({ greeting })\r\n },\r\n)\r\n```\r\n\r\nCreate a app.vue file\r\n\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport Runner from './utils/workers/index?worker'\r\n\r\nconst message = ref('Nuxt')\r\n\r\nfunction sayHello(from: 'workers' | 'composable') {\r\n if (from === 'workers') {\r\n const worker = new Runner()\r\n worker.postMessage({ message: message.value })\r\n worker.addEventListener(\r\n 'message',\r\n (\r\n evt: MessageEvent\u003C{\r\n greeting: string\r\n }>,\r\n ) => {\r\n const { greeting } = evt.data\r\n alert(greeting)\r\n },\r\n )\r\n } else {\r\n sayHelloFromComposable(message.value)\r\n }\r\n}\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Ch1>Demo with auto imports\u003C/h1>\r\n \u003CCustomInput v-model=\"message\" />\r\n \u003Cbutton type=\"submit\" @click=\"sayHello('composable')\">\r\n Hello from composable\r\n \u003C/button>\r\n \u003Cbutton type=\"submit\" @click=\"sayHello('workers')\">Hello from workers\u003C/button>\r\n\u003C/template>\r\n./assets/workers\r\n```\r\n\r\n### Describe the bug\r\n\r\n## Actual Behavior\r\n\r\nIn development mode, the utils/ directory is auto imported, so the upperCase function is available on the assets/index.ts file.\r\n\r\nIn production mode, we have this error:\r\n\r\n```txt\r\nUncaught ReferenceError: upperCase is not defined\r\n at index-8e797b43.js:1:88\r\n```\r\n\r\n## Expected Behavior\r\n\r\nThis should work with the same behavior in development and production mode.\r\n\r\n\r\n### Additional context\r\n\r\n\r\nI call the utils to function in `worker` file\r\n\r\n### Logs\r\n\r\n_No response_",[2921,2924,2927,2930],{"name":2922,"color":2923},"workaround available","11376d",{"name":2925,"color":2926},"bug","d73a4a",{"name":2928,"color":2929},"vite","3574D1",{"name":2931,"color":2932},"🍰 p2-nice-to-have","0E8A16",24590,"Utils folder is not auto imported on production mode when using in worker file","2024-11-19T11:52:00Z","https://github.com/nuxt/nuxt/issues/24590",0.7417606,{"description":2939,"labels":2940,"number":2947,"owner":2911,"repository":2911,"state":2913,"title":2948,"updated_at":2949,"url":2950,"score":2951},"### Environment\n\n\n- Operating System: Linux\n- Node Version: v18.20.3\n- Nuxt Version: 3.13.2\n- CLI Version: 3.14.0\n- Nitro Version: 2.9.7\n- Package Manager: npm@10.2.3\n- Builder: -\n- User Config: -\n- Runtime Modules: -\n- Build Modules: -\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-1ys8s7?file=useApi.ts\n\n### Describe the bug\n\nWe recently ran into an edge case with `useAsyncData`. In some specific scenarios using `getCachedData` and `transform` it seems that the inference is broken and it expects the return value of the handler function to match the return value of `getCachedData`. \n\n```ts\nimport { useNuxtApp, useAsyncData } from 'nuxt/app';\nimport { toValue } from 'vue';\n\ntype ApiResponseFoo = { foo: string };\ntype ApiResponseBar = { bar: string };\n\nconst API = {\n foo: async function foo(): Promise\u003CApiResponseFoo> {\n return Promise.resolve({\n foo: 'hello, world',\n });\n },\n bar: async function bar(): Promise\u003CApiResponseBar> {\n return Promise.resolve({\n bar: 'hello, world',\n });\n },\n};\n\nexport default function useFooAPI() {\n const nuxtApp = useNuxtApp();\n return useAsyncData(\n async () => { \n return API.foo(); // Type error here, expects string\n },\n {\n transform: (response) => response.foo,\n getCachedData: (key: string) => {\n return (toValue(nuxtApp._asyncData[key]?.data) as string) ?? undefined;\n },\n }\n );\n}\n```\n\nIt seems that all the stars need to be misaligned for this error to occur. Making any of the following changes clears the error:\n\n- Remove the explicit `key: string` typing in `getCachedData`\n- Use the `nuxtApp` instance that is passed into `getCachedData` instead of calling `useNuxtApp()`\n- Adding explicit typing to the `transform` e.g. `(response: ApiResponseFoo) => response.foo`\n- Changing the definition of `getCachedData` to have `undefined` within the `NoInfer`: `(key: string, nuxtApp: NuxtApp) => NoInfer\u003CDataT | undefined>`\n\nIt's a bit beyond my TypeScript knowledge to say why this is happening, but I thought I'd report it here in case anyone else has ideas. \n\nDoes it make sense to make the `NoInfer` change in Nuxt? While this specific bug is quite easy to workaround, perhaps there are other cases where the inference is incorrect?\n\n### Additional context\n\nRelated issues:\n\nhttps://github.com/nuxt/nuxt/pull/25946\nhttps://github.com/nuxt/nuxt/pull/28187\n\n### Logs\n\n_No response_",[2941,2944],{"name":2942,"color":2943},"good first issue","fbca04",{"name":2945,"color":2946},"types","2875C3",29567,"Incorrect type inference in `useAsyncData` with `transform` and `getCachedData`","2025-02-11T18:25:03Z","https://github.com/nuxt/nuxt/issues/29567",0.7439077,{"description":2953,"labels":2954,"number":2962,"owner":2911,"repository":2963,"state":2964,"title":2965,"updated_at":2966,"url":2967,"score":2968},"### Environment\n\n- Operating System: Darwin\n- Node Version: v22.11.0\n- Nuxt Version: 3.16.0\n- CLI Version: 3.22.5\n- Nitro Version: 2.11.6\n- Package Manager: pnpm@9.15.4\n- Builder: -\n- User Config: modules, devtools, app, css, runtimeConfig, future, compatibilityDate, telemetry, eslint\n- Runtime Modules: @nuxt/ui-pro@3.0.0, @nuxt/eslint@1.0.1, @vueuse/nuxt@12.5.0, @nuxt/image@1.9.0\n- Build Modules: -\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nv3\n\n### Reproduction\n\nSee below\n\n### Description\n\nHey,\n\nIn UI2 when placing a UAvatar (which often is done for a user dropdown) in the DropdownMenu - clicking the Dropdown menu would trigger opening the dropdown.\nBased on UI3 docs it seems that it should work since it says Button or any other element - however this doesnt work\n\n### Additional context\n\n```ts\n\u003CUDropdownMenu :items=\"accountItems\">\n \u003CUAvatar\n v-if=\"session && session.user\"\n :src=\"session.user.image ? session.user.image : undefined\"\n :alt=\"session.user.name\"\n size=\"md\"\n />\n\u003C/UDropdownMenu>\n```\n\n### Logs\n\n```shell-script\n\n```",[2955,2956,2959],{"name":2925,"color":2926},{"name":2957,"color":2958},"needs reproduction","CB47CF",{"name":2960,"color":2961},"v3","49DCB8",3546,"ui","closed","`UAvatar` doesn't trigger `UDropdownMenu`","2025-03-28T17:43:01Z","https://github.com/nuxt/ui/issues/3546",0.7142148,{"description":2970,"labels":2971,"number":2975,"owner":2911,"repository":2976,"state":2964,"title":2977,"updated_at":2978,"url":2979,"score":2980},"I have a custom composable (`useConsent`), which I am trying to mock. \r\nI'm importing the composable like so:\r\n\r\n`import { useConsent, useHead } from '#imports'`.\r\n\r\nThe import is recognized in `packages/vitest-environment-nuxt/src/modules/mock.ts`:\r\n```\r\n{\r\n name: \"default\",\r\n as: \"useConsent\",\r\n from: \"[...]/src/runtime/composables/useConsent.ts\",\r\n priority: undefined,\r\n}\r\n```\r\n\r\nEven though the import is recognized and no `\"Cannot find import to mock\"` error is thrown, the import is not mocked.\r\nIn the same file I am mocking `useHead`, that one is mocked without any issues.\r\n\r\nUsing `nuxt-vitest@0.8.4`\r\n",[2972],{"name":2973,"color":2974},"vitest-environment","b60205",524,"test-utils","custom composable without function name not mocked with `mockNuxtImport`","2023-12-02T00:17:13Z","https://github.com/nuxt/test-utils/issues/524",0.73257804,{"description":2982,"labels":2983,"number":2985,"owner":2911,"repository":2986,"state":2964,"title":2987,"updated_at":2988,"url":2989,"score":2990},"### 🐛 The bug\n\n\r\n```\r\n ERROR(vue-tsc) Binding element 'Vimeo' implicitly has an 'any' type.\r\n FILE D:/dev/test1/node_modules/.pnpm/@nuxt+scripts@0.8.4_@nuxt+devtools@1.4.1_rollup@4.21.2_vite@5.4.3_@types+node@22.5.4_terser@5_npscaliduljzxdqaosyipgid7y/node_modules/@nuxt/scripts/dist/runtime/components/ScriptVimeoPlayer.vue:187:21\r\n\r\n 185 |\r\n 186 | onMounted(() => {\r\n > 187 | onLoaded(async ({ Vimeo }) => {\r\n | ^^^^^\r\n 188 | const vimeoOptions = props.vimeoOptions || {}\r\n 189 | if (!vimeoOptions.id && props.id) {\r\n 190 | vimeoOptions.id = props.id\r\n\r\n ERROR(vue-tsc) Parameter 'instance' implicitly has an 'any' type.\r\n FILE D:/dev/test1/node_modules/.pnpm/@nuxt+scripts@0.8.4_@nuxt+devtools@1.4.1_rollup@4.21.2_vite@5.4.3_@types+node@22.5.4_terser@5_npscaliduljzxdqaosyipgid7y/node_modules/@nuxt/scripts/dist/runtime/components/ScriptYouTubePlayer.vue:61:19 \r\n\r\n 59 | }\r\n 60 | onMounted(() => {\r\n > 61 | onLoaded(async (instance) => {\r\n | ^^^^^^^^\r\n 62 | const YouTube: typeof YT & { ready: (fn: () => void) => void } = await instance.YT\r\n 63 | await new Promise\u003Cvoid>((resolve) => {\r\n 64 | if (typeof YT.Player === 'undefined')\r\n\r\n[vue-tsc] Found 2 errors. Watching for file changes.\r\n```\r\n\r\n\r\n\r\nWhen using [Nuxt Devtools](https://github.com/nuxt/devtools) in typescript strict mode and enabling type check, these two errors will be occurred.\r\n\r\n```typescript\r\nexport default defineNuxtConfig({\r\n devtools: { enabled: true },\r\n modules: ['@nuxt/scripts'],\r\n typescript: {\r\n typeCheck: true,\r\n strict: true\r\n },\r\n})\r\n```\r\n\r\nI think this might be related to https://github.com/nuxt/scripts/issues/217#issuecomment-2336846827. These are same errors as what in that comment.\r\n\r\nVersions: \r\n@nuxt/scripts: 0.8.4\r\n@nuxt/devtools : 1.4.1\r\nvue-tsc: 2.0.29\n\n### 🛠️ To reproduce\n\nhttps://stackblitz.com/~/github.com/ifrvn/nuxt-scripts-issue-test\n\n### 🌈 Expected behavior\n\nno error\n\n### ℹ️ Additional context\n\n_No response_",[2984],{"name":2925,"color":2926},256,"scripts"," ERROR(vue-tsc) Binding element 'Vimeo' implicitly has an 'any' type.","2024-09-09T14:05:17Z","https://github.com/nuxt/scripts/issues/256",0.7327046,{"description":2992,"labels":2993,"number":2998,"owner":2911,"repository":2963,"state":2964,"title":2999,"updated_at":3000,"url":3001,"score":3002},"### Environment\n\nNuxt 3.15.4\nNuxt UI https://pkg.pr.new/@nuxt/ui@e7e7585\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\n3.15.4\n\n### Reproduction\n\n-\n\n### Description\n\nJust noticed the following components work as expected in a fieldForm\n\n```\n \u003CUFormField\n v-if=\"isVisible\"\n :name=\"fieldName\"\n :label=\"field['#title']\"\n :required=\"!!field['#required']\"\n >\n \u003Ctemplate\n v-if=\"descriptionContent && field['#type'] !== 'checkbox'\"\n #description\n >\n \u003Cspan v-html=\"cleanHTML(descriptionContent)\" />\n \u003C/template>\n\n \u003Ccomponent\n v-if=\"resolvedComponent\"\n :is=\"resolvedComponent\"\n :field=\"field\"\n :fieldName=\"fieldName\"\n :state=\"state\"\n />\n\n \u003Ctemplate v-if=\"helpContent\" #help>\n \u003Cspan v-html=\"cleanHTML(helpContent)\" />\n \u003C/template>\n \u003C/UFormField>\n```\n\n ```\n \u003CURadioGroup\n v-model=\"state[fieldName]\"\n :items=\"transformOptions(field['#options'] || {})\"\n orientation=\"horizontal\"\n class=\"w-full\"\n />\n```\n\n```\n \u003CUSelect\n v-model=\"state[fieldName]\"\n placeholder=\"Select\"\n :items=\"transformOptions(field['#options'] || {})\"\n class=\"w-full\"\n />\n\n```\nHowever when using a UCheckbox label and description have to be set here\n\n```\n \u003CUCheckbox\n v-model=\"checkboxValue\"\n :label=\"field['#title']\"\n :description=\"field['#description']\"\n class=\"w-full\"\n @update:model-value=\"props.state[fieldName] = $event\"\n />\n```\n\nSeems like this is a bug or maybe this is by design?\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2994,2997],{"name":2995,"color":2996},"question","d876e3",{"name":2960,"color":2961},3294,"UCheckbox fieldform support","2025-02-12T19:23:36Z","https://github.com/nuxt/ui/issues/3294",0.7345011,{"labels":3004,"number":3012,"owner":2911,"repository":2911,"state":2964,"title":3013,"updated_at":3014,"url":3015,"score":3016},[3005,3008,3009],{"name":3006,"color":3007},"3.x","29bc7f",{"name":2925,"color":2926},{"name":3010,"color":3011},"🔨 p3-minor","FBCA04",14242,"ref is not defined when import.meta.glob is used when template has an html class","2023-01-19T17:30:08Z","https://github.com/nuxt/nuxt/issues/14242",0.7369167,{"description":3018,"labels":3019,"number":3022,"owner":2911,"repository":2963,"state":2964,"title":3023,"updated_at":3024,"url":3025,"score":3026},"### Environment\n\n- Operating System: Linux\n- Node Version: v20.10.0\n- Nuxt Version: 3.15.4\n- CLI Version: 3.21.1\n- Nitro Version: 2.10.4\n- Package Manager: bun@1.2.2\n- Builder: -\n- User Config: devtools, experimental, ssr, modules, runtimeConfig, css, future, compatibilityDate, app, ogImage, image, icon, colorMode, seo, apiParty, security, lodash, zodI18n, i18n, vue, routeRules, $development, $production, $test\n- Runtime Modules: magic-regexp/nuxt@0.8.0, nuxt-api-party@2.1.2, nuxt-lodash@2.5.3, nuxt-security@2.1.5, nuxt-zod-i18n@1.11.5, @vueuse/nuxt@12.5.0, @pinia/nuxt@0.9.0, @nuxtjs/i18n@9.0.0, @nuxtjs/seo@2.1.1, @nuxt/ui@3.0.0-alpha.12, @nuxt/image@1.9.0, @nuxt/eslint@1.0.0, @nuxt/scripts@0.9.5\n- Build Modules: -\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nv3.0.0-alpha.12\n\n### Reproduction\n\nYou can check it for example here: https://ui3.nuxt.dev/components/navigation-menu#theme when you click the link to check out the source code of the theme file.\n\n### Description\n\nWhen trying to navigate to the source code of a component's theme (like `NavigationMenu`), the link is broken.\nI saw that it's because this\nhttps://github.com/nuxt/ui/blob/69bc686efd657e3cbf8e9394649f0d5f4c4af434/docs/app/components/content/ComponentTheme.vue#L18\nbreaks this\nhttps://github.com/nuxt/ui/blob/69bc686efd657e3cbf8e9394649f0d5f4c4af434/docs/app/components/content/ComponentTheme.vue#L113\nso I think we should either rename the theme files to be camelCase (not worth the effort imho) or just easily do something like this:\n```ts\nconst name = props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? ''\nconst camelName = camelCase(name)\n```\nand use the `camelName` where needed.\n\nI can submit a PR for that if you prefer.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3020,3021],{"name":2925,"color":2926},{"name":2960,"color":2961},3222,"Links to components' theme source code are broken","2025-02-02T10:38:55Z","https://github.com/nuxt/ui/issues/3222",0.7384542,{"description":3028,"labels":3029,"number":3031,"owner":2911,"repository":2912,"state":2964,"title":3032,"updated_at":3033,"url":3034,"score":3035},"Only company links:\n\n\n",[3030],{"name":2905,"color":2906},482,"Footer should disappear","2022-05-11T11:50:35Z","https://github.com/nuxt/nuxt.com/issues/482",0.7392815,["Reactive",3037],{},["Set"],["ShallowReactive",3040],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fC2I4NTs25RZoZcvapY5-7aUSyilJVcvm4mr9bHT0Hm8":-1},"/nuxt/ui/2269"]