Compare commits

...

8 Commits

Author SHA1 Message Date
SerKo 8f82f23846
fix(runtime-core): keep options API typing intact when expose is used (#14118)
ci / test (push) Has been cancelled Details
ci / continuous-release (push) Has been cancelled Details
size data / upload (push) Has been cancelled Details
Lock Closed Issues / action (push) Has been cancelled Details
Auto close issues with "can't reproduce" label / close-issues (push) Has been cancelled Details
Fixed: #14117
Fixed: vuejs/language-tools#5069
2025-11-20 08:59:42 +08:00
Vida Xie 83f6ab686d
chore(compiler-ssr): move `defaultProps` initialization into `input` tag branch (#14115)
ci / test (push) Waiting to run Details
ci / continuous-release (push) Waiting to run Details
size data / upload (push) Waiting to run Details
2025-11-19 13:42:16 +08:00
Sean Wang 3942dbe613
types(jsx): add new HTML attributes for improved JSX support (#13370)
ci / test (push) Waiting to run Details
ci / continuous-release (push) Waiting to run Details
size data / upload (push) Waiting to run Details
2025-11-18 08:53:01 +08:00
shuang f40baa2d50
types(jsx): correct the naming of the enterKeyHint property (#14090) 2025-11-18 08:33:44 +08:00
Stefano Nepa e9c676ff2b
chore(runtime-dom): export nodeOps and patchProp for better accessibility (#13753) 2025-11-10 09:38:05 +08:00
daiwei e131369833 release: v3.5.24
ci / test (push) Has been cancelled Details
ci / continuous-release (push) Has been cancelled Details
size data / upload (push) Has been cancelled Details
2025-11-07 16:02:40 +08:00
殷谊辉 90ce838a94
chore(reactivity): remove duplicated ReactiveEffectRunner interface (#14063) 2025-11-07 14:04:03 +08:00
edison 11ec51aa5a
Revert "fix(compiler-core): correctly handle ts type assertions in expression…" (#14062)
This reverts commit e6544ac292.
Close #14060
2025-11-07 08:52:07 +08:00
23 changed files with 91 additions and 59 deletions

View File

@ -1,3 +1,12 @@
## [3.5.24](https://github.com/vuejs/core/compare/v3.5.23...v3.5.24) (2025-11-07)
### Reverts
* Revert "fix(compiler-core): correctly handle ts type assertions in expression…" (#14062) ([11ec51a](https://github.com/vuejs/core/commit/11ec51aa5a7914745fee10ed2b9f9464fab4d02c)), closes [#14062](https://github.com/vuejs/core/issues/14062) [#14060](https://github.com/vuejs/core/issues/14060)
## [3.5.23](https://github.com/vuejs/core/compare/v3.5.22...v3.5.23) (2025-11-06) ## [3.5.23](https://github.com/vuejs/core/compare/v3.5.22...v3.5.23) (2025-11-06)

View File

@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"version": "3.5.23", "version": "3.5.24",
"packageManager": "pnpm@10.20.0", "packageManager": "pnpm@10.20.0",
"type": "module", "type": "module",
"scripts": { "scripts": {

View File

@ -2107,3 +2107,38 @@ defineComponent({
expectType<string>(this.$props) expectType<string>(this.$props)
}, },
}) })
// #14117
defineComponent({
setup() {
const setup1 = ref('setup1')
const setup2 = ref('setup2')
return { setup1, setup2 }
},
data() {
return {
data1: 1,
}
},
props: {
props1: {
type: String,
},
},
methods: {
methods1() {
return `methods1`
},
},
computed: {
computed1() {
this.setup1
this.setup2
this.data1
this.props1
this.methods1()
return `computed1`
},
},
expose: ['setup1'],
})

View File

@ -14,16 +14,6 @@ return function render(_ctx, _cache, $props, $setup, $data, $options) {
}" }"
`; `;
exports[`compiler: expression transform > expression with type 1`] = `
"const { openBlock: _openBlock, createElementBlock: _createElementBlock } = Vue
return function render(_ctx, _cache) {
return (_openBlock(), _createElementBlock("div", {
onClick: _ctx.handleClick
}, null, 8 /* PROPS */, ["onClick"]))
}"
`;
exports[`compiler: expression transform > should allow leak of var declarations in for loop 1`] = ` exports[`compiler: expression transform > should allow leak of var declarations in for loop 1`] = `
"const { openBlock: _openBlock, createElementBlock: _createElementBlock } = Vue "const { openBlock: _openBlock, createElementBlock: _createElementBlock } = Vue

View File

@ -754,12 +754,4 @@ describe('compiler: expression transform', () => {
expect(code).toMatch(`_ctx.bar`) expect(code).toMatch(`_ctx.bar`)
}) })
}) })
test('expression with type', () => {
const { code } = compile(
`<div @click="(<number>handleClick as any)"></div>`,
)
expect(code).toMatch(`onClick: _ctx.handleClick`)
expect(code).toMatchSnapshot()
})
}) })

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-core", "name": "@vue/compiler-core",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/compiler-core", "description": "@vue/compiler-core",
"main": "index.js", "main": "index.js",
"module": "dist/compiler-core.esm-bundler.js", "module": "dist/compiler-core.esm-bundler.js",

View File

@ -18,7 +18,6 @@ import {
createSimpleExpression, createSimpleExpression,
} from '../ast' } from '../ast'
import { import {
TS_NODE_TYPES,
isInDestructureAssignment, isInDestructureAssignment,
isInNewExpression, isInNewExpression,
isStaticProperty, isStaticProperty,
@ -348,18 +347,15 @@ export function processExpression(
// an ExpressionNode has the `.children` property, it will be used instead of // an ExpressionNode has the `.children` property, it will be used instead of
// `.content`. // `.content`.
const children: CompoundExpressionNode['children'] = [] const children: CompoundExpressionNode['children'] = []
const isTSNode = TS_NODE_TYPES.includes(ast.type)
ids.sort((a, b) => a.start - b.start) ids.sort((a, b) => a.start - b.start)
ids.forEach((id, i) => { ids.forEach((id, i) => {
// range is offset by -1 due to the wrapping parens when parsed // range is offset by -1 due to the wrapping parens when parsed
const start = id.start - 1 const start = id.start - 1
const end = id.end - 1 const end = id.end - 1
const last = ids[i - 1] const last = ids[i - 1]
if (!(isTSNode && i === 0)) { const leadingText = rawExp.slice(last ? last.end - 1 : 0, start)
const leadingText = rawExp.slice(last ? last.end - 1 : 0, start) if (leadingText.length || id.prefix) {
if (leadingText.length || id.prefix) { children.push(leadingText + (id.prefix || ``))
children.push(leadingText + (id.prefix || ``))
}
} }
const source = rawExp.slice(start, end) const source = rawExp.slice(start, end)
children.push( children.push(
@ -376,7 +372,7 @@ export function processExpression(
: ConstantTypes.NOT_CONSTANT, : ConstantTypes.NOT_CONSTANT,
), ),
) )
if (i === ids.length - 1 && end < rawExp.length && !isTSNode) { if (i === ids.length - 1 && end < rawExp.length) {
children.push(rawExp.slice(end)) children.push(rawExp.slice(end))
} }
}) })

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-dom", "name": "@vue/compiler-dom",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/compiler-dom", "description": "@vue/compiler-dom",
"main": "index.js", "main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js", "module": "dist/compiler-dom.esm-bundler.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-sfc", "name": "@vue/compiler-sfc",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/compiler-sfc", "description": "@vue/compiler-sfc",
"main": "dist/compiler-sfc.cjs.js", "main": "dist/compiler-sfc.cjs.js",
"module": "dist/compiler-sfc.esm-browser.js", "module": "dist/compiler-sfc.esm-browser.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/compiler-ssr", "name": "@vue/compiler-ssr",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/compiler-ssr", "description": "@vue/compiler-ssr",
"main": "dist/compiler-ssr.cjs.js", "main": "dist/compiler-ssr.cjs.js",
"types": "dist/compiler-ssr.d.ts", "types": "dist/compiler-ssr.d.ts",

View File

@ -83,11 +83,11 @@ export const ssrTransformModel: DirectiveTransform = (dir, node, context) => {
if (node.tagType === ElementTypes.ELEMENT) { if (node.tagType === ElementTypes.ELEMENT) {
const res: DirectiveTransformResult = { props: [] } const res: DirectiveTransformResult = { props: [] }
const defaultProps = [
// default value binding for text type inputs
createObjectProperty(`value`, model),
]
if (node.tag === 'input') { if (node.tag === 'input') {
const defaultProps = [
// default value binding for text type inputs
createObjectProperty(`value`, model),
]
const type = findProp(node, 'type') const type = findProp(node, 'type')
if (type) { if (type) {
const value = findValueBinding(node) const value = findValueBinding(node)

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/reactivity", "name": "@vue/reactivity",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/reactivity", "description": "@vue/reactivity",
"main": "index.js", "main": "index.js",
"module": "dist/reactivity.esm-bundler.js", "module": "dist/reactivity.esm-bundler.js",

View File

@ -470,11 +470,6 @@ function removeDep(link: Link) {
} }
} }
export interface ReactiveEffectRunner<T = any> {
(): T
effect: ReactiveEffect
}
export function effect<T = any>( export function effect<T = any>(
fn: () => T, fn: () => T,
options?: ReactiveEffectOptions, options?: ReactiveEffectOptions,

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/runtime-core", "name": "@vue/runtime-core",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/runtime-core", "description": "@vue/runtime-core",
"main": "index.js", "main": "index.js",
"module": "dist/runtime-core.esm-bundler.js", "module": "dist/runtime-core.esm-bundler.js",

View File

@ -272,7 +272,7 @@ export function defineComponent<
Slots, Slots,
LocalComponents, LocalComponents,
Directives, Directives,
Exposed string
> >
>, >,
): DefineComponent< ): DefineComponent<

View File

@ -1194,7 +1194,7 @@ export type ComponentOptionsWithoutProps<
S, S,
LC, LC,
Directives, Directives,
Exposed string
> >
> >
@ -1256,7 +1256,7 @@ export type ComponentOptionsWithArrayProps<
S, S,
LC, LC,
Directives, Directives,
Exposed string
> >
> >

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/runtime-dom", "name": "@vue/runtime-dom",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/runtime-dom", "description": "@vue/runtime-dom",
"main": "index.js", "main": "index.js",
"module": "dist/runtime-dom.esm-bundler.js", "module": "dist/runtime-dom.esm-bundler.js",

View File

@ -17,6 +17,7 @@ import {
} from '@vue/runtime-core' } from '@vue/runtime-core'
import { nodeOps } from './nodeOps' import { nodeOps } from './nodeOps'
import { patchProp } from './patchProp' import { patchProp } from './patchProp'
export { nodeOps, patchProp }
// Importing from the compiler, will be tree-shaken in prod // Importing from the compiler, will be tree-shaken in prod
import { import {
NOOP, NOOP,

View File

@ -286,6 +286,19 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
contextmenu?: string | undefined contextmenu?: string | undefined
dir?: string | undefined dir?: string | undefined
draggable?: Booleanish | undefined draggable?: Booleanish | undefined
enterkeyhint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
| undefined
/**
* @deprecated Use `enterkeyhint` instead.
*/
enterKeyHint?: HTMLAttributes['enterkeyhint']
hidden?: Booleanish | '' | 'hidden' | 'until-found' | undefined hidden?: Booleanish | '' | 'hidden' | 'until-found' | undefined
id?: string | undefined id?: string | undefined
inert?: Booleanish | undefined inert?: Booleanish | undefined
@ -346,6 +359,14 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
*/ */
is?: string | undefined is?: string | undefined
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
*/
exportparts?: string
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
*/
part?: string
} }
type HTMLAttributeReferrerPolicy = type HTMLAttributeReferrerPolicy =
@ -498,6 +519,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
alt?: string | undefined alt?: string | undefined
crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined
decoding?: 'async' | 'auto' | 'sync' | undefined decoding?: 'async' | 'auto' | 'sync' | undefined
fetchpriority?: 'high' | 'low' | 'auto' | undefined
height?: Numberish | undefined height?: Numberish | undefined
loading?: 'eager' | 'lazy' | undefined loading?: 'eager' | 'lazy' | undefined
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined referrerpolicy?: HTMLAttributeReferrerPolicy | undefined
@ -547,15 +569,6 @@ export interface InputHTMLAttributes extends HTMLAttributes {
checked?: Booleanish | any[] | Set<any> | undefined // for IDE v-model multi-checkbox support checked?: Booleanish | any[] | Set<any> | undefined // for IDE v-model multi-checkbox support
crossorigin?: string | undefined crossorigin?: string | undefined
disabled?: Booleanish | undefined disabled?: Booleanish | undefined
enterKeyHint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
| undefined
form?: string | undefined form?: string | undefined
formaction?: string | undefined formaction?: string | undefined
formenctype?: string | undefined formenctype?: string | undefined
@ -1288,6 +1301,7 @@ export interface IntrinsicElementAttributes {
polyline: SVGAttributes polyline: SVGAttributes
radialGradient: SVGAttributes radialGradient: SVGAttributes
rect: SVGAttributes rect: SVGAttributes
set: SVGAttributes
stop: SVGAttributes stop: SVGAttributes
switch: SVGAttributes switch: SVGAttributes
symbol: SVGAttributes symbol: SVGAttributes

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/server-renderer", "name": "@vue/server-renderer",
"version": "3.5.23", "version": "3.5.24",
"description": "@vue/server-renderer", "description": "@vue/server-renderer",
"main": "index.js", "main": "index.js",
"module": "dist/server-renderer.esm-bundler.js", "module": "dist/server-renderer.esm-bundler.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/shared", "name": "@vue/shared",
"version": "3.5.23", "version": "3.5.24",
"description": "internal utils shared across @vue packages", "description": "internal utils shared across @vue packages",
"main": "index.js", "main": "index.js",
"module": "dist/shared.esm-bundler.js", "module": "dist/shared.esm-bundler.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@vue/compat", "name": "@vue/compat",
"version": "3.5.23", "version": "3.5.24",
"description": "Vue 3 compatibility build for Vue 2", "description": "Vue 3 compatibility build for Vue 2",
"main": "index.js", "main": "index.js",
"module": "dist/vue.runtime.esm-bundler.js", "module": "dist/vue.runtime.esm-bundler.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "vue", "name": "vue",
"version": "3.5.23", "version": "3.5.24",
"description": "The progressive JavaScript framework for building modern web UI.", "description": "The progressive JavaScript framework for building modern web UI.",
"main": "index.js", "main": "index.js",
"module": "dist/vue.runtime.esm-bundler.js", "module": "dist/vue.runtime.esm-bundler.js",