\n \u003C/UFormGroup>\n\n \u003CUButton type=\"submit\">\n Submit\n \u003C/UButton>\n\n\u003C/UForm>\n```\n\n```ts\n\u003Cscript setup lang=\"ts\">\n import { z } from 'zod';\n\n const state = reactive({\n picture: undefined,\n })\n\n const schema = z.object({\n picture: z.custom\u003CFileList>()\n .transform((val) => {\n if (val instanceof File) return val;\n if (val instanceof FileList) return val[0];\n return null;\n })\n .superRefine((file, ctx) => {\n if (!(file instanceof File)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: 'Not a file',\n });\n return z.NEVER;\n }\n if (file.size > 5 * 1024 * 1024) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Max file size allowed is 5MB',\n });\n }\n if (\n !['image/jpeg', 'image/png', 'image/webp', 'image/jpg'].includes(\n file.type\n )\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'File must be an image (jpeg, jpg, png, webp)',\n });\n }\n })\n });\n\n type Schema = z.infer\u003Ctypeof schema>;\n\n async function onSubmit (event: FormSubmitEvent\u003CSchema>) {\n console.log(event.data);\n }\n\u003C/script>\n```\n\nAs aspected the following onChange function logs a FileList\n\n```ts\nfunction onChangeFile(event: Event) {\n console.log(event)\n}\n```\n\nBut when I log val in the transform function of Zod\n\n```ts\n.transform((val) => {\n console.log(val);\n if (val instanceof File) return val;\n if (val instanceof FileList) return val[0];\n return null;\n})\n```\n\nI get a string like this:\n\n```\nC:\\fakepath\\Screenshot 2024-10-25 at 10.26.36.png\n```\n\nCan someone please help me out, i'm looking for a few days now for a solution.",[2873],{"name":2874,"color":2875},"question","d876e3",2462,"UInput with type='file', how to validate with Zod?","2025-03-10T01:51:18Z","https://github.com/nuxt/ui/issues/2462",0.6975586,{"description":2882,"labels":2883,"number":2884,"owner":2863,"repository":2885,"state":2865,"title":2886,"updated_at":2887,"url":2888,"score":2889},"I've been using the new Nuxt website for a few months right now and wanted to provide some UX feedback based on my developer usage. For context I find myself using the docs multiple times a day.\n\n1. When searching the docs the text input field gets blocked from rendering which means there is a disconnect with what you're typing and what is displayed. I don't think the search results need to be instant but what you're typing in the text input should not be blocked. For example in the recording below I am constantly typing but it's really choppy and I finished typing a full 10 seconds before my typed text is actually completely displayed.\n\n\n\n2. The animations for the menus are cool but the artificial delay trips me up multiple times a day if I'm moving \"too fast\". I know where I want to go but frequently find myself needing to slow down or try again to get to the menu that I want because of the delay.\n\n\n\n_All if this feedback is in contrast to the previous website which I didn't have nearly as much friction using when navigation around and didn't feel like I was be throttled when navigating through the docs. If this was only a marketing page that would be fine but since it's also developer documentation I think it should be a bit more responsive._",[],1857,"nuxt.com","Laggy search and navigation feedback","2025-04-15T11:39:18Z","https://github.com/nuxt/nuxt.com/issues/1857",0.70246315,{"description":2891,"labels":2892,"number":2897,"owner":2863,"repository":2864,"state":2865,"title":2898,"updated_at":2899,"url":2900,"score":2901},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v22.8.0\n- Nuxt Version: 3.13.2\n- CLI Version: 3.13.2\n- Nitro Version: 2.9.7\n- Package Manager: yarn@1.22.22\n- Builder: -\n- User Config: modules, plugins, css, colorMode, tiptap, runtimeConfig, nitro, routeRules, compatibilityDate\n- Runtime Modules: @nuxt/ui@2.20.0, @pinia/nuxt@0.5.4, @vueuse/nuxt@11.1.0, nuxt-tiptap-editor@2.0.0\n- Build Modules: -\n\n### Version\n\nv2.20.0\n\n### Reproduction\n\n```\n\u003Cscript setup lang=\"ts\">\nenum DiscountType {\n Fixed = 0,\n Percentage = 1\n}\n\nconst types = [\n {\n label: \"€\",\n value: DiscountType.Fixed\n },\n {\n label: \"%\",\n value: DiscountType.Percentage\n }\n]\nconst type = ref\u003CDiscountType>(DiscountType.Fixed)\n\u003C/script>\n\n\u003Ctemplate>\n \u003CUSelectMenu v-model=\"type\" :options=\"types\" value-attribute=\"value\" />\n\u003C/template>\n```\n\nSelectMenu does not display the label associated to the falsy value \"0\":\n\n\nThe list is populated with both values:\n\n\nThe label associated to the truthy value \"1\" is displayed as expected:\n\n\n### Description\n\nAll falsy values are not displayed anymore since v2.20.0 due to the rework of the computed `label` in the SelectMenu component.\n\nHere is the definition of this computed in `/src/runtime/components/form/SelectMenu.vue`:\n```\nconst label = computed(() => {\n if (!props.modelValue) return null\n\n if (Array.isArray(props.modelValue) && props.modelValue.length) {\n return `${props.modelValue.length} selected`\n } else if (['string', 'number'].includes(typeof props.modelValue)) {\n return props.valueAttribute ? accessor(selected.value, props.optionAttribute) : props.modelValue\n }\n\n return accessor(props.modelValue as Record\u003Cstring, any>, props.optionAttribute)\n})\n```\n\n**The component should treat `0`, `\"\"` and `false` as \"acceptable\" labelled values.**\n\nI believe the first condition should be either :\n`if(props.modelValue == null) return null` \nOr:\n`if(props.modelValue === null || props.modelValue === undefined) return null` \n\n### Additional context\n\nI will try to find some time to create a pull request if this is accepted as an issue. Not sure I can manage to do it short-term though.\n\n### Logs\n\n```shell-script\n\n```",[2893,2896],{"name":2894,"color":2895},"bug","d73a4a",{"name":2860,"color":2861},3132,"SelectMenu label not displayed for falsy values","2025-01-17T15:36:46Z","https://github.com/nuxt/ui/issues/3132",0.7112959,{"description":2903,"labels":2904,"number":2905,"owner":2863,"repository":2906,"state":2865,"title":2907,"updated_at":2908,"url":2909,"score":2910},"https://github.com/guidepup/guidepup",[],787,"test-utils","screen reader driver","2024-03-17T21:40:20Z","https://github.com/nuxt/test-utils/issues/787",0.71145433,{"description":2912,"labels":2913,"number":2915,"owner":2863,"repository":2916,"state":2865,"title":2917,"updated_at":2918,"url":2919,"score":2920},"How can I disable icon caching? I'm doing svg animation and I need hmr when changing an svg file.\r\n\r\nhttps://stackblitz.com/edit/nuxt-icon-playground-mjfbfn?file=assets%2Ficons%2Fnuxt-icon.svg\r\nTry changing the fill attribute of the svg file and save it",[2914],{"name":2874,"color":2875},160,"icon","how to disable svg caching","2024-12-21T19:58:04Z","https://github.com/nuxt/icon/issues/160",0.7168113,{"description":2922,"labels":2923,"number":285,"owner":2863,"repository":2925,"state":2865,"title":2926,"updated_at":2927,"url":2928,"score":2929},"To improve the security of using third-party scripts, we're able to compute the integrity of a script at build time and inject it within the `\u003Cscript>` tag. \r\n\r\nFor example, we can do something like this:\r\n\r\n```ts\r\nuseScript({ src: 'https://example.com/test.js' })\r\n```\r\n\r\n-->\r\n\r\n```ts\r\n// without bundling\r\nuseScript({ src: 'https://example.com/test.js', integrity: 'sha512-...' })\r\n// with bundling\r\nuseScript({ src: '/....js', integrity: 'sha512-...' })\r\n```\r\n\r\nThis would provide a window between builds that would block potential attackers from modifying the script with malicious code. If a script source has already been attacked when the integrity is computed it wouldn't do anything useful.\r\n\r\n@vejja Would be great to have your input on this :pray: \r\n",[2924],{"name":2857,"color":2858},"scripts","Security: Implement Automatic Integrity Checks","2024-04-21T09:13:10Z","https://github.com/nuxt/scripts/issues/15",0.71785283,{"description":2931,"labels":2932,"number":2935,"owner":2863,"repository":2885,"state":2936,"title":2937,"updated_at":2938,"url":2939,"score":2940},"```\n:resources-blog-list\n\n->\n\n::resources-blog-list\n::\n```\n\nThis should fix the hydration errors",[2933],{"name":2894,"color":2934},"ff281a",587,"closed","[Content] Replace all inline components in markdown","2023-02-15T12:32:34Z","https://github.com/nuxt/nuxt.com/issues/587",0.66191727,{"description":2942,"labels":2943,"number":2935,"owner":2863,"repository":2906,"state":2936,"title":2950,"updated_at":2951,"url":2952,"score":2940},"After updating to 0.6.10 on Nuht 3 version 3.4.1, i get an error when I try to start\r\n\r\n`\"vitest-environment-nuxt\": \"^0.6.10\"`\r\n\r\n```\r\n❯ yarn test-ui\r\n(node:51339) V8: /Users/ibochkarev/Projects/XXXX/XXXX/node_modules/ttf2woff2/jssrc/ttf2woff2.js:3 Invalid asm.js: Invalid member of stdlib\r\n(Use `node --trace-warnings ...` to show where the warning was created)\r\n\r\n DEV v0.30.1 /Users/ibochkarev/Projects/XXXX/XXXX\r\n UI started at http://localhost:51204/__vitest__/\r\n\r\n\r\n Test Files no tests\r\n Tests no tests\r\n Start at 13:52:13\r\n Duration 368ms (transform 0ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 0ms)\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\nVitest caught 39 unhandled errors during the test run.\r\nThis might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nDataCloneError: (path) => path.replace(/^\\/oc/, '') could not be cloned.\r\n ❯ new DOMException node:internal/per_context/domexception:72:5\r\n ❯ WorkerInfo.postTask node_modules/tinypool/dist/esm/index.js:421:17\r\n ❯ ThreadPool.runTask node_modules/tinypool/dist/esm/index.js:712:16\r\n ❯ Tinypool.run node_modules/tinypool/dist/esm/index.js:760:38\r\n ❯ runFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7217:20\r\n ❯ node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7254:99\r\n ❯ Object.runTests node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7254:59\r\n ❯ Object.runTests node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7396:5\r\n ❯ async file:/Users/ibochkarev/Projects/umatech/premier.one-v3/node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13913:9\r\n ❯ Vitest.runFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13927:12\r\n ❯ Vitest.start node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13836:5\r\n ❯ startVitest node_modules/vitest/dist/vendor-cli-api.70680cd5.js:20784:5\r\n```\r\n\r\nThis line, which swears at startup, is in nuxt.config.ts config in the proxy section and looks like this\r\n\r\n```js\r\n'/oc': {\r\n target: process.env.NUXT_OC_BACKEND_API_URL,\r\n cookieDomainRewrite: '',\r\n changeOrigin: true,\r\n rewrite: (path: string) => path.replace('/^\\/oc/, '')\r\n },\r\n```\r\n\r\nI tried excluding the config file:\r\n\r\n```js\r\nimport { configDefaults } from 'vitest/config'\r\nimport { defineVitestConfig } from 'nuxt-vitest/config'\r\n\r\nexport default defineVitestConfig({\r\n // any custom vitest config you require\r\n test: {\r\n environment: 'nuxt',\r\n exclude: [...configDefaults.exclude, ['src/shared/api/**', 'public/**', 'node_modules/**', 'nuxt.config.ts']],\r\n },\r\n})\r\n\r\n```\r\n\r\nbut now I get the error\r\n\r\n```\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nTypeError: pattern.startsWith is not a function\r\n ❯ isNegativePattern node_modules/vitest/dist/vendor-cli-api.70680cd5.js:4702:20\r\n ❯ convertToPositivePattern node_modules/vitest/dist/vendor-cli-api.70680cd5.js:4694:12\r\n ❯ getNegativePatternsAsPositive node_modules/vitest/dist/vendor-cli-api.70680cd5.js:5044:31\r\n ❯ Object.generate node_modules/vitest/dist/vendor-cli-api.70680cd5.js:5004:30\r\n ❯ getWorks node_modules/vitest/dist/vendor-cli-api.70680cd5.js:6957:31\r\n ❯ FastGlob node_modules/vitest/dist/vendor-cli-api.70680cd5.js:6911:19\r\n ❯ WorkspaceProject.globFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13473:12\r\n ❯ WorkspaceProject.globAllTestFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13451:34\r\n ❯ WorkspaceProject.globTestFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13446:34\r\n```",[2944,2947],{"name":2945,"color":2946},"vitest-environment","b60205",{"name":2948,"color":2949},"needs reproduction","DE7793","DataCloneError: (path) => path.replace(/^\\/oc/, '') could not be cloned","2023-12-05T11:42:33Z","https://github.com/nuxt/test-utils/issues/587",{"description":2954,"labels":2955,"number":2960,"owner":2863,"repository":2906,"state":2936,"title":2961,"updated_at":2962,"url":2963,"score":2964},"### Environment\n\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v18.20.2\r\n- Nuxt Version: 3.11.2\r\n- CLI Version: 3.11.1\r\n- Nitro Version: 2.9.6\r\n- Package Manager: yarn@3.6.1\r\n- Builder: -\r\n- User Config: devtools, build, modules, fonts, colorMode, i18n, logLevel, nitro, sentry, runtimeConfig\r\n- Runtime Modules: nuxt-zod-i18n@latest, @nuxtjs/i18n@8.3.1, @nuxt/ui@^2.15.2, @nuxt/test-utils/module@3.12.1, @nuxt/fonts@latest, @vueuse/nuxt@10.9.0\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nJust create a simple component with :\r\n\r\n```\r\n\u003Cscript lang=\"ts\" setup>\r\nconst error = ref(false);\r\n\u003C/script>\r\n```\r\n\r\nSimple test \r\n\r\n```\r\nit('mount', async () => {\r\n const component = await mountSuspended(TheFooter);\r\n expect(component.html()).toMatchSnapshot();\r\n });\r\n```\n\n### Describe the bug\n\n```\r\nTypeError: 'set' on proxy: trap returned falsish for property 'error'\r\n ❯ Proxy.clonedComponent.render ../../../node_modules/@nuxt/test-utils/dist/runtime-utils/index.mjs:131:44\r\n 129| renderContext[key] = passedProps[key];\r\n 130| }\r\n 131| return render.call(this, renderContext, ...args);\r\n | ^\r\n 132| } : void 0,\r\n 133| setup: setup ? (props2) => wrappedSetup(props2, setupContext) : void 0\r\n ❯ renderComponentRoot ../../../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:885:16\r\n ❯ ReactiveEffect.componentUpdateFn [as fn] ../../../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5969:46\r\n ❯ ReactiveEffect.run ../../../node_modules/@vue/reactivity/dist/reactivity.cjs.js:181:19\r\n ❯ instance.update ../../../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6100:16\r\n ❯ setupRenderEffect ../../../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6110:5\r\n ❯ ../../../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:1639:9\r\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2956,2957],{"name":2894,"color":2895},{"name":2958,"color":2959},"pending triage","5D08F5",835,"Test fail if component contain const error = ref(false);","2024-05-08T21:48:21Z","https://github.com/nuxt/test-utils/issues/835",0.6900828,["Reactive",2966],{},["Set"],["ShallowReactive",2969],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fvATy6tbEGzI9sOGEaMgKT0Xx60vsgUfEGw_ParLvtkQ":-1},"/nuxt/icon/252"]