From: edison Date: Thu, 8 May 2025 10:11:20 +0000 (+0800) Subject: chore: Merge branch 'minor' into vapor X-Git-Tag: v3.6.0-alpha.1~16^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8ae42817219a4021b49d83e60fe4f23099e095a;p=thirdparty%2Fvuejs%2Fcore.git chore: Merge branch 'minor' into vapor --- d8ae42817219a4021b49d83e60fe4f23099e095a diff --cc package.json index 5317374935,e541df36d9..fb137b5511 --- a/package.json +++ b/package.json @@@ -69,12 -69,11 +69,12 @@@ "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-replace": "5.0.4", - "@swc/core": "^1.11.12", + "@swc/core": "^1.11.13", "@types/hash-sum": "^1.0.2", - "@types/node": "^22.13.13", - "@types/semver": "^7.5.8", + "@types/node": "^22.13.14", + "@types/semver": "^7.7.0", "@types/serve-handler": "^6.1.4", + "@vitest/ui": "^3.0.2", "@vitest/coverage-v8": "^3.0.9", "@vitest/eslint-plugin": "^1.1.38", "@vue/consolidate": "1.0.0", diff --cc packages/runtime-core/src/apiCreateApp.ts index d8ae73fb69,08a6dda2a5..5bdd204cfa --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@@ -140,32 -138,6 +140,26 @@@ export interface GenericAppConfig trace: string, ) => void - /** - * TODO document for 3.5 - * Enable warnings for computed getters that recursively trigger itself. - */ - warnRecursiveComputed?: boolean - + /** + * Whether to throw unhandled errors in production. + * Default is `false` to avoid crashing on any error (and only logs it) + * But in some cases, e.g. SSR, throwing might be more desirable. + */ + throwUnhandledErrorInProduction?: boolean + + /** + * Prefix for all useId() calls within this app + */ + idPrefix?: string +} + +export interface AppConfig extends GenericAppConfig { + // @private + readonly isNativeTag: (tag: string) => boolean + + optionMergeStrategies: Record + globalProperties: ComponentCustomProperties & Record + /** * Options to pass to `@vue/compiler-dom`. * Only supported in runtime compiler build. diff --cc packages/shared/src/domAttrConfig.ts index 1315c364b5,b5f0166327..80fb80f9d9 --- a/packages/shared/src/domAttrConfig.ts +++ b/packages/shared/src/domAttrConfig.ts @@@ -152,47 -152,3 +152,52 @@@ export function isRenderableAttrValue(v const type = typeof value return type === 'string' || type === 'number' || type === 'boolean' } + +/* + * The following attributes must be set as attribute + */ +export function shouldSetAsAttr(tagName: string, key: string): boolean { + // these are enumerated attrs, however their corresponding DOM properties + // are actually booleans - this leads to setting it with a string "false" + // value leading it to be coerced to `true`, so we need to always treat + // them as attributes. + // Note that `contentEditable` doesn't have this problem: its DOM + // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { ++ if ( ++ key === 'spellcheck' || ++ key === 'draggable' || ++ key === 'translate' || ++ key === 'autocorrect' ++ ) { + return true + } + + // #1787, #2840 form property on form elements is readonly and must be set as + // attribute. + if (key === 'form') { + return true + } + + // #1526 must be set as attribute + if (key === 'list' && tagName === 'INPUT') { + return true + } + + // #2766