mirror of https://github.com/vuejs/core.git
Compare commits
8 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8f82f23846 | |
|
|
83f6ab686d | |
|
|
3942dbe613 | |
|
|
f40baa2d50 | |
|
|
e9c676ff2b | |
|
|
e131369833 | |
|
|
90ce838a94 | |
|
|
11ec51aa5a |
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"private": true,
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"packageManager": "pnpm@10.20.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -2107,3 +2107,38 @@ defineComponent({
|
|||
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'],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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`] = `
|
||||
"const { openBlock: _openBlock, createElementBlock: _createElementBlock } = Vue
|
||||
|
||||
|
|
|
|||
|
|
@ -754,12 +754,4 @@ describe('compiler: expression transform', () => {
|
|||
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()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-core",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/compiler-core",
|
||||
"main": "index.js",
|
||||
"module": "dist/compiler-core.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import {
|
|||
createSimpleExpression,
|
||||
} from '../ast'
|
||||
import {
|
||||
TS_NODE_TYPES,
|
||||
isInDestructureAssignment,
|
||||
isInNewExpression,
|
||||
isStaticProperty,
|
||||
|
|
@ -348,19 +347,16 @@ export function processExpression(
|
|||
// an ExpressionNode has the `.children` property, it will be used instead of
|
||||
// `.content`.
|
||||
const children: CompoundExpressionNode['children'] = []
|
||||
const isTSNode = TS_NODE_TYPES.includes(ast.type)
|
||||
ids.sort((a, b) => a.start - b.start)
|
||||
ids.forEach((id, i) => {
|
||||
// range is offset by -1 due to the wrapping parens when parsed
|
||||
const start = id.start - 1
|
||||
const end = id.end - 1
|
||||
const last = ids[i - 1]
|
||||
if (!(isTSNode && i === 0)) {
|
||||
const leadingText = rawExp.slice(last ? last.end - 1 : 0, start)
|
||||
if (leadingText.length || id.prefix) {
|
||||
children.push(leadingText + (id.prefix || ``))
|
||||
}
|
||||
}
|
||||
const source = rawExp.slice(start, end)
|
||||
children.push(
|
||||
createSimpleExpression(
|
||||
|
|
@ -376,7 +372,7 @@ export function processExpression(
|
|||
: 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))
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-dom",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/compiler-dom",
|
||||
"main": "index.js",
|
||||
"module": "dist/compiler-dom.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-sfc",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/compiler-sfc",
|
||||
"main": "dist/compiler-sfc.cjs.js",
|
||||
"module": "dist/compiler-sfc.esm-browser.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compiler-ssr",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/compiler-ssr",
|
||||
"main": "dist/compiler-ssr.cjs.js",
|
||||
"types": "dist/compiler-ssr.d.ts",
|
||||
|
|
|
|||
|
|
@ -83,11 +83,11 @@ export const ssrTransformModel: DirectiveTransform = (dir, node, context) => {
|
|||
|
||||
if (node.tagType === ElementTypes.ELEMENT) {
|
||||
const res: DirectiveTransformResult = { props: [] }
|
||||
if (node.tag === 'input') {
|
||||
const defaultProps = [
|
||||
// default value binding for text type inputs
|
||||
createObjectProperty(`value`, model),
|
||||
]
|
||||
if (node.tag === 'input') {
|
||||
const type = findProp(node, 'type')
|
||||
if (type) {
|
||||
const value = findValueBinding(node)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/reactivity",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/reactivity",
|
||||
"main": "index.js",
|
||||
"module": "dist/reactivity.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -470,11 +470,6 @@ function removeDep(link: Link) {
|
|||
}
|
||||
}
|
||||
|
||||
export interface ReactiveEffectRunner<T = any> {
|
||||
(): T
|
||||
effect: ReactiveEffect
|
||||
}
|
||||
|
||||
export function effect<T = any>(
|
||||
fn: () => T,
|
||||
options?: ReactiveEffectOptions,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/runtime-core",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/runtime-core",
|
||||
"main": "index.js",
|
||||
"module": "dist/runtime-core.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ export function defineComponent<
|
|||
Slots,
|
||||
LocalComponents,
|
||||
Directives,
|
||||
Exposed
|
||||
string
|
||||
>
|
||||
>,
|
||||
): DefineComponent<
|
||||
|
|
|
|||
|
|
@ -1194,7 +1194,7 @@ export type ComponentOptionsWithoutProps<
|
|||
S,
|
||||
LC,
|
||||
Directives,
|
||||
Exposed
|
||||
string
|
||||
>
|
||||
>
|
||||
|
||||
|
|
@ -1256,7 +1256,7 @@ export type ComponentOptionsWithArrayProps<
|
|||
S,
|
||||
LC,
|
||||
Directives,
|
||||
Exposed
|
||||
string
|
||||
>
|
||||
>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/runtime-dom",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/runtime-dom",
|
||||
"main": "index.js",
|
||||
"module": "dist/runtime-dom.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import {
|
|||
} from '@vue/runtime-core'
|
||||
import { nodeOps } from './nodeOps'
|
||||
import { patchProp } from './patchProp'
|
||||
export { nodeOps, patchProp }
|
||||
// Importing from the compiler, will be tree-shaken in prod
|
||||
import {
|
||||
NOOP,
|
||||
|
|
|
|||
|
|
@ -286,6 +286,19 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|||
contextmenu?: string | undefined
|
||||
dir?: string | 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
|
||||
id?: string | 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
|
||||
*/
|
||||
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 =
|
||||
|
|
@ -498,6 +519,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
|
|||
alt?: string | undefined
|
||||
crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined
|
||||
decoding?: 'async' | 'auto' | 'sync' | undefined
|
||||
fetchpriority?: 'high' | 'low' | 'auto' | undefined
|
||||
height?: Numberish | undefined
|
||||
loading?: 'eager' | 'lazy' | 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
|
||||
crossorigin?: string | undefined
|
||||
disabled?: Booleanish | undefined
|
||||
enterKeyHint?:
|
||||
| 'enter'
|
||||
| 'done'
|
||||
| 'go'
|
||||
| 'next'
|
||||
| 'previous'
|
||||
| 'search'
|
||||
| 'send'
|
||||
| undefined
|
||||
form?: string | undefined
|
||||
formaction?: string | undefined
|
||||
formenctype?: string | undefined
|
||||
|
|
@ -1288,6 +1301,7 @@ export interface IntrinsicElementAttributes {
|
|||
polyline: SVGAttributes
|
||||
radialGradient: SVGAttributes
|
||||
rect: SVGAttributes
|
||||
set: SVGAttributes
|
||||
stop: SVGAttributes
|
||||
switch: SVGAttributes
|
||||
symbol: SVGAttributes
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/server-renderer",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "@vue/server-renderer",
|
||||
"main": "index.js",
|
||||
"module": "dist/server-renderer.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/shared",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "internal utils shared across @vue packages",
|
||||
"main": "index.js",
|
||||
"module": "dist/shared.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@vue/compat",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "Vue 3 compatibility build for Vue 2",
|
||||
"main": "index.js",
|
||||
"module": "dist/vue.runtime.esm-bundler.js",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "vue",
|
||||
"version": "3.5.23",
|
||||
"version": "3.5.24",
|
||||
"description": "The progressive JavaScript framework for building modern web UI.",
|
||||
"main": "index.js",
|
||||
"module": "dist/vue.runtime.esm-bundler.js",
|
||||
|
|
|
|||
Loading…
Reference in New Issue