Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.4.15
Choose a base ref
...
head repository: vuejs/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.4.16
Choose a head ref

Commits on Jan 22, 2024

  1. chore(deps): update test to ^1.2.1 (#10176)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f1068fc View commit details

Commits on Jan 29, 2024

  1. workflow: minor tweaks for release script (#10220)

    - `pnpm run test` instead of `pnpm test run`
    - also need `--no-git-checks` when drying run
    - fix spelling of `remote`
    justorez authored Jan 29, 2024
    Copy the full SHA
    4082426 View commit details
  2. build(deps-dev): bump vite from 5.0.7 to 5.0.12 (#10162)

    Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.7 to 5.0.12.
    - [Release notes](https://github.com/vitejs/vite/releases)
    - [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
    - [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)
    
    ---
    updated-dependencies:
    - dependency-name: vite
      dependency-type: direct:development
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 29, 2024
    Copy the full SHA
    733f63a View commit details
  3. chore(deps): replace dependency npm-run-all with npm-run-all2 ^5.0.0 (#…

    …10228)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 29, 2024
    Copy the full SHA
    e3713c0 View commit details
  4. chore(deps): update all non-major dependencies (#10175)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 29, 2024
    Copy the full SHA
    26c79cc View commit details
  5. chore(deps): update test (#10229)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 29, 2024
    Copy the full SHA
    d276a4f View commit details

Commits on Feb 5, 2024

  1. chore(deps): update all non-major dependencies (#10268)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 5, 2024
    Copy the full SHA
    b0a669c View commit details
  2. fix(deps): update compiler (#10269)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 5, 2024
    Copy the full SHA
    336bb65 View commit details
  3. chore: remove missing reactivity transform file (#10255)

    prev: #9321
    sxzz authored Feb 5, 2024
    Copy the full SHA
    718fc86 View commit details
  4. fix(runtime-core): avoid inlining isShallow (#10238)

    sxzz authored Feb 5, 2024
    Copy the full SHA
    53eee72 View commit details
  5. chore(deps): update dependency puppeteer to ~21.11.0 (#10272)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 5, 2024
    Copy the full SHA
    3d4e8e9 View commit details
  6. chore(deps): update build (#10271)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 5, 2024
    Copy the full SHA
    dbc4677 View commit details
  7. Copy the full SHA
    2ebafc2 View commit details
  8. Copy the full SHA
    d27ee59 View commit details
  9. chore(deps): pin @rollup/plugin-replace to 5.0.4

    5.0.5 introduced a regression that causes replacements in the truthy
    branch of ternaries to be skipped: rollup/plugins#1619
    
    This causes the enum replacements to fail and leads to bundle size
    regressions.
    yyx990803 committed Feb 5, 2024
    Copy the full SHA
    a012e39 View commit details
  10. chore(deps): pin rollup to 4.9.2

    4.9.3 introduced a regression in rollup/rollup#5313
    which changes the `export * from` codegen and breaks Node.js' re-export
    detection.
    yyx990803 committed Feb 5, 2024
    Copy the full SHA
    759a951 View commit details

Commits on Feb 6, 2024

  1. fix(runtime-dom): fix option selected update failed (#10200)

    close #10194
    close #10267
    Doctor-wu authored Feb 6, 2024
    Copy the full SHA
    f31d782 View commit details
  2. fix(hydration): fix SFC style v-bind hydration mismatch warnings (#10250

    )
    
    close #10215
    yangxiuxiu1115 authored Feb 6, 2024
    Copy the full SHA
    f0b5f7e View commit details
  3. fix(compiler-core): support v-bind shorthand syntax for dynamic slot …

    …name (#10218)
    
    close #10213
    zh-lx authored Feb 6, 2024
    Copy the full SHA
    91f058a View commit details
  4. fix(reactivity): handle MaybeDirty recurse (#10187)

    close #10185
    johnsoncodehk authored Feb 6, 2024
    Copy the full SHA
    6c7e0bd View commit details
  5. fix(reactivity): avoid infinite recursion from side effects in comput…

    …ed getter (#10232)
    
    close #10214
    johnsoncodehk authored Feb 6, 2024
    Copy the full SHA
    0bced13 View commit details

Commits on Feb 7, 2024

  1. fix(compiler-core): handle same-name shorthand edge case for in-DOM t…

    …emplates
    
    Also add error for invalid arguments for same-name shorthand.
    
    close #10280
    yyx990803 committed Feb 7, 2024
    Copy the full SHA
    cb87b62 View commit details
  2. fix(runtime-dom): ensure v-show respects display value set via v-bind (

    Doctor-wu authored Feb 7, 2024
    Copy the full SHA
    9b19f09 View commit details
  3. revert: perf(templateRef): avoid double render when using template re…

    …f on v-for
    
    This reverts commit de4d2e2.
    
    reopen #9908
    close #10210, close #10234
    yyx990803 committed Feb 7, 2024
    Copy the full SHA
    eb1b911 View commit details
  4. fix(runtime-core): support for nested calls to runWithContext (#10261)

    close #10260
    yangxiuxiu1115 authored Feb 7, 2024
    Copy the full SHA
    75e02b5 View commit details

Commits on Feb 8, 2024

  1. fix(reactivity): skip non-extensible objects when using markRaw (#1…

    mattersj authored Feb 8, 2024
    Copy the full SHA
    2312184 View commit details
  2. chore: move X_V_BIND_INVALID_SAME_NAME_ARGUMENT to preserve error cod…

    …e order
    yyx990803 committed Feb 8, 2024
    Copy the full SHA
    2b0a706 View commit details
  3. release: v3.4.16

    yyx990803 committed Feb 8, 2024
    Copy the full SHA
    1339330 View commit details
Showing with 953 additions and 979 deletions.
  1. +24 −0 CHANGELOG.md
  2. +20 −20 package.json
  3. +16 −0 packages/compiler-core/__tests__/transforms/transformSlotOutlet.spec.ts
  4. +18 −0 packages/compiler-core/__tests__/transforms/vBind.spec.ts
  5. +3 −3 packages/compiler-core/package.json
  6. +5 −0 packages/compiler-core/src/errors.ts
  7. +11 −1 packages/compiler-core/src/transforms/transformSlotOutlet.ts
  8. +39 −13 packages/compiler-core/src/transforms/vBind.ts
  9. +1 −1 packages/compiler-dom/package.json
  10. +6 −6 packages/compiler-sfc/package.json
  11. +1 −1 packages/compiler-ssr/package.json
  12. +72 −2 packages/reactivity/__tests__/computed.spec.ts
  13. +5 −0 packages/reactivity/__tests__/reactive.spec.ts
  14. +1 −1 packages/reactivity/package.json
  15. +15 −9 packages/reactivity/src/computed.ts
  16. +4 −2 packages/reactivity/src/constants.ts
  17. +26 −24 packages/reactivity/src/effect.ts
  18. +3 −1 packages/reactivity/src/reactive.ts
  19. +4 −5 packages/reactivity/src/ref.ts
  20. +7 −0 packages/runtime-core/__tests__/apiCreateApp.spec.ts
  21. +16 −0 packages/runtime-core/__tests__/hydration.spec.ts
  22. +1 −1 packages/runtime-core/package.json
  23. +2 −1 packages/runtime-core/src/apiCreateApp.ts
  24. +6 −0 packages/runtime-core/src/component.ts
  25. +8 −2 packages/runtime-core/src/customFormatter.ts
  26. +11 −1 packages/runtime-core/src/hydration.ts
  27. +7 −9 packages/runtime-core/src/rendererTemplateRef.ts
  28. +65 −0 packages/runtime-dom/__tests__/directives/vShow.spec.ts
  29. +1 −1 packages/runtime-dom/package.json
  30. +0 −5 packages/runtime-dom/src/directives/vModel.ts
  31. +1 −1 packages/runtime-dom/src/directives/vShow.ts
  32. +4 −0 packages/runtime-dom/src/helpers/useCssVars.ts
  33. +1 −0 packages/runtime-dom/src/modules/style.ts
  34. +1 −1 packages/server-renderer/package.json
  35. +2 −2 packages/sfc-playground/package.json
  36. +3 −3 packages/sfc-playground/src/download/template/package.json
  37. +1 −1 packages/shared/package.json
  38. +2 −2 packages/vue-compat/package.json
  39. +0 −112 packages/vue/macros.d.ts
  40. +1 −1 packages/vue/package.json
  41. +536 −744 pnpm-lock.yaml
  42. +3 −3 scripts/release.js
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## [3.4.16](https://github.com/vuejs/core/compare/v3.4.15...v3.4.16) (2024-02-08)


### Bug Fixes

* **compiler-core:** handle same-name shorthand edge case for in-DOM templates ([cb87b62](https://github.com/vuejs/core/commit/cb87b6213d7b003fa7280712c285c7c9d9f291ca)), closes [#10280](https://github.com/vuejs/core/issues/10280)
* **compiler-core:** support v-bind shorthand syntax for dynamic slot name ([#10218](https://github.com/vuejs/core/issues/10218)) ([91f058a](https://github.com/vuejs/core/commit/91f058a90cd603492649633d153b120977c4df6b)), closes [#10213](https://github.com/vuejs/core/issues/10213)
* **deps:** update compiler ([#10269](https://github.com/vuejs/core/issues/10269)) ([336bb65](https://github.com/vuejs/core/commit/336bb65820243006efdf990e6ea3610696467508))
* **hydration:** fix SFC style v-bind hydration mismatch warnings ([#10250](https://github.com/vuejs/core/issues/10250)) ([f0b5f7e](https://github.com/vuejs/core/commit/f0b5f7ed8ddf74f9f5ba47cb65e8300370875291)), closes [#10215](https://github.com/vuejs/core/issues/10215)
* **reactivity:** avoid infinite recursion from side effects in computed getter ([#10232](https://github.com/vuejs/core/issues/10232)) ([0bced13](https://github.com/vuejs/core/commit/0bced13ee5c53a02d5f10e5db76fe38b6e131440)), closes [#10214](https://github.com/vuejs/core/issues/10214)
* **reactivity:** handle `MaybeDirty` recurse ([#10187](https://github.com/vuejs/core/issues/10187)) ([6c7e0bd](https://github.com/vuejs/core/commit/6c7e0bd88f021b0b6365370e97b0c7e243d7d70b)), closes [#10185](https://github.com/vuejs/core/issues/10185)
* **reactivity:** skip non-extensible objects when using `markRaw` ([#10289](https://github.com/vuejs/core/issues/10289)) ([2312184](https://github.com/vuejs/core/commit/2312184bc335e0d32aa4c0c0b49190b6334849b4)), closes [#10288](https://github.com/vuejs/core/issues/10288)
* **runtime-core:** avoid inlining isShallow ([#10238](https://github.com/vuejs/core/issues/10238)) ([53eee72](https://github.com/vuejs/core/commit/53eee72c3a96420db35236b5e8e4d9308a56e1b4))
* **runtime-core:** support for nested calls to runWithContext ([#10261](https://github.com/vuejs/core/issues/10261)) ([75e02b5](https://github.com/vuejs/core/commit/75e02b5099a08166bdf407127916734c48209ee9)), closes [#10260](https://github.com/vuejs/core/issues/10260)
* **runtime-dom:** ensure v-show respects display value set via v-bind ([#10161](https://github.com/vuejs/core/issues/10161)) ([9b19f09](https://github.com/vuejs/core/commit/9b19f0912104bfccb10c8cf5beab02b21a648935)), closes [#10151](https://github.com/vuejs/core/issues/10151)
* **runtime-dom:** fix option selected update failed ([#10200](https://github.com/vuejs/core/issues/10200)) ([f31d782](https://github.com/vuejs/core/commit/f31d782e4668050a188ac0f11ba8d5b861b913ca)), closes [#10194](https://github.com/vuejs/core/issues/10194) [#10267](https://github.com/vuejs/core/issues/10267)


### Reverts

* perf(templateRef): avoid double render when using template ref on v-for ([eb1b911](https://github.com/vuejs/core/commit/eb1b9116d7cd4a5747e8dadcdc5ba921df011f64)), closes [#9908](https://github.com/vuejs/core/issues/9908) [#10210](https://github.com/vuejs/core/issues/10210) [#10234](https://github.com/vuejs/core/issues/10234)



## [3.4.15](https://github.com/vuejs/core/compare/v3.4.14...v3.4.15) (2024-01-18)


40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"version": "3.4.15",
"packageManager": "pnpm@8.14.1",
"version": "3.4.16",
"packageManager": "pnpm@8.15.1",
"type": "module",
"scripts": {
"dev": "node scripts/dev.js",
@@ -59,26 +59,26 @@
"node": ">=18.12.0"
},
"devDependencies": {
"@babel/parser": "^7.23.6",
"@babel/types": "^7.23.6",
"@babel/parser": "^7.23.9",
"@babel/types": "^7.23.9",
"@codspeed/vitest-plugin": "^2.3.1",
"@rollup/plugin-alias": "^5.0.1",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.4",
"@rollup/plugin-replace": "5.0.4",
"@rollup/plugin-terser": "^0.4.4",
"@types/hash-sum": "^1.0.2",
"@types/minimist": "^1.2.5",
"@types/node": "^20.11.1",
"@types/node": "^20.11.16",
"@types/semver": "^7.5.6",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@vitest/coverage-istanbul": "^1.2.0",
"@vitest/coverage-istanbul": "^1.2.2",
"@vue/consolidate": "0.17.3",
"conventional-changelog-cli": "^4.1.0",
"enquirer": "^2.4.1",
"esbuild": "^0.19.5",
"esbuild": "^0.20.0",
"esbuild-plugin-polyfill-node": "^0.3.0",
"eslint": "^8.56.0",
"eslint-define-config": "^1.24.1",
@@ -89,30 +89,30 @@
"jsdom": "^23.2.0",
"lint-staged": "^15.2.0",
"lodash": "^4.17.21",
"magic-string": "^0.30.5",
"magic-string": "^0.30.6",
"markdown-table": "^3.0.3",
"marked": "^11.1.1",
"marked": "^11.2.0",
"minimist": "^1.2.8",
"npm-run-all": "^4.1.5",
"npm-run-all2": "^5.0.2",
"picocolors": "^1.0.0",
"prettier": "^3.2.2",
"pretty-bytes": "^6.1.1",
"pug": "^3.0.2",
"puppeteer": "~21.7.0",
"puppeteer": "~21.11.0",
"rimraf": "^5.0.5",
"rollup": "^4.1.4",
"rollup": "4.9.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-esbuild": "^6.1.0",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-polyfill-node": "^0.13.0",
"semver": "^7.5.4",
"serve": "^14.2.1",
"simple-git-hooks": "^2.9.0",
"terser": "^5.22.0",
"terser": "^5.27.0",
"todomvc-app-css": "^2.4.3",
"tslib": "^2.6.2",
"tsx": "^4.7.0",
"typescript": "^5.2.2",
"vite": "^5.0.5",
"vitest": "^1.2.0"
"vite": "^5.0.12",
"vitest": "^1.2.2"
}
}
Original file line number Diff line number Diff line change
@@ -389,4 +389,20 @@ describe('compiler: transform <slot> outlets', () => {
},
})
})

test('dynamically named slot outlet with v-bind shorthand', () => {
const ast = parseWithSlots(`<slot :name />`)
expect((ast.children[0] as ElementNode).codegenNode).toMatchObject({
type: NodeTypes.JS_CALL_EXPRESSION,
callee: RENDER_SLOT,
arguments: [
`$slots`,
{
type: NodeTypes.SIMPLE_EXPRESSION,
content: `name`,
isStatic: false,
},
],
})
})
})
18 changes: 18 additions & 0 deletions packages/compiler-core/__tests__/transforms/vBind.spec.ts
Original file line number Diff line number Diff line change
@@ -408,4 +408,22 @@ describe('compiler: transform v-bind', () => {
},
})
})

test('error on invalid argument for same-name shorthand', () => {
const onError = vi.fn()
parseWithVBind(`<div v-bind:[arg] />`, { onError })
expect(onError.mock.calls[0][0]).toMatchObject({
code: ErrorCodes.X_V_BIND_INVALID_SAME_NAME_ARGUMENT,
loc: {
start: {
line: 1,
column: 13,
},
end: {
line: 1,
column: 18,
},
},
})
})
})
6 changes: 3 additions & 3 deletions packages/compiler-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-core",
"version": "3.4.15",
"version": "3.4.16",
"description": "@vue/compiler-core",
"main": "index.js",
"module": "dist/compiler-core.esm-bundler.js",
@@ -46,13 +46,13 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
"dependencies": {
"@babel/parser": "^7.23.6",
"@babel/parser": "^7.23.9",
"@vue/shared": "workspace:*",
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2"
},
"devDependencies": {
"@babel/types": "^7.23.6"
"@babel/types": "^7.23.9"
}
}
5 changes: 5 additions & 0 deletions packages/compiler-core/src/errors.ts
Original file line number Diff line number Diff line change
@@ -98,6 +98,10 @@ export enum ErrorCodes {
X_SCOPE_ID_NOT_SUPPORTED,
X_VNODE_HOOKS,

// placed here to preserve order for the current minor
// TODO adjust order in 3.5
X_V_BIND_INVALID_SAME_NAME_ARGUMENT,

// Special value for higher-order compilers to pick up the last code
// to avoid collision of error codes. This should always be kept as the last
// item.
@@ -156,6 +160,7 @@ export const errorMessages: Record<ErrorCodes, string> = {
[ErrorCodes.X_V_FOR_MALFORMED_EXPRESSION]: `v-for has invalid expression.`,
[ErrorCodes.X_V_FOR_TEMPLATE_KEY_PLACEMENT]: `<template v-for> key should be placed on the <template> tag.`,
[ErrorCodes.X_V_BIND_NO_EXPRESSION]: `v-bind is missing expression.`,
[ErrorCodes.X_V_BIND_INVALID_SAME_NAME_ARGUMENT]: `v-bind with same-name shorthand only allows static argument.`,
[ErrorCodes.X_V_ON_NO_EXPRESSION]: `v-on is missing expression.`,
[ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET]: `Unexpected custom directive on <slot> outlet.`,
[ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE]:
12 changes: 11 additions & 1 deletion packages/compiler-core/src/transforms/transformSlotOutlet.ts
Original file line number Diff line number Diff line change
@@ -6,12 +6,14 @@ import {
type SlotOutletNode,
createCallExpression,
createFunctionExpression,
createSimpleExpression,
} from '../ast'
import { isSlotOutlet, isStaticArgOf, isStaticExp } from '../utils'
import { type PropsExpression, buildProps } from './transformElement'
import { ErrorCodes, createCompilerError } from '../errors'
import { RENDER_SLOT } from '../runtimeHelpers'
import { camelize } from '@vue/shared'
import { processExpression } from './transformExpression'

export const transformSlotOutlet: NodeTransform = (node, context) => {
if (isSlotOutlet(node)) {
@@ -76,7 +78,15 @@ export function processSlotOutlet(
}
} else {
if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) {
if (p.exp) slotName = p.exp
if (p.exp) {
slotName = p.exp
} else if (p.arg && p.arg.type === NodeTypes.SIMPLE_EXPRESSION) {
const name = camelize(p.arg.content)
slotName = p.exp = createSimpleExpression(name, false, p.arg.loc)
if (!__BROWSER__) {
slotName = p.exp = processExpression(p.exp, context)
}
}
} else {
if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) {
p.arg.content = camelize(p.arg.content)
52 changes: 39 additions & 13 deletions packages/compiler-core/src/transforms/vBind.ts
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import type { DirectiveTransform } from '../transform'
import {
type ExpressionNode,
NodeTypes,
type SimpleExpressionNode,
createObjectProperty,
createSimpleExpression,
} from '../ast'
@@ -17,10 +18,45 @@ export const transformBind: DirectiveTransform = (dir, _node, context) => {
const { modifiers, loc } = dir
const arg = dir.arg!

// :arg is replaced by :arg="arg"
let { exp } = dir
if (!exp && arg.type === NodeTypes.SIMPLE_EXPRESSION) {
const propName = camelize(arg.content)

// handle empty expression
if (exp && exp.type === NodeTypes.SIMPLE_EXPRESSION && !exp.content.trim()) {
if (!__BROWSER__) {
// #10280 only error against empty expression in non-browser build
// because :foo in in-DOM templates will be parsed into :foo="" by the
// browser
context.onError(
createCompilerError(ErrorCodes.X_V_BIND_NO_EXPRESSION, loc),
)
return {
props: [
createObjectProperty(arg, createSimpleExpression('', true, loc)),
],
}
} else {
exp = undefined
}
}

// same-name shorthand - :arg is expanded to :arg="arg"
if (!exp) {
if (arg.type !== NodeTypes.SIMPLE_EXPRESSION || !arg.isStatic) {
// only simple expression is allowed for same-name shorthand
context.onError(
createCompilerError(
ErrorCodes.X_V_BIND_INVALID_SAME_NAME_ARGUMENT,
arg.loc,
),
)
return {
props: [
createObjectProperty(arg, createSimpleExpression('', true, loc)),
],
}
}

const propName = camelize((arg as SimpleExpressionNode).content)
exp = dir.exp = createSimpleExpression(propName, false, arg.loc)
if (!__BROWSER__) {
exp = dir.exp = processExpression(exp, context)
@@ -57,16 +93,6 @@ export const transformBind: DirectiveTransform = (dir, _node, context) => {
}
}

if (
!exp ||
(exp.type === NodeTypes.SIMPLE_EXPRESSION && !exp.content.trim())
) {
context.onError(createCompilerError(ErrorCodes.X_V_BIND_NO_EXPRESSION, loc))
return {
props: [createObjectProperty(arg, createSimpleExpression('', true, loc))],
}
}

return {
props: [createObjectProperty(arg, exp)],
}
2 changes: 1 addition & 1 deletion packages/compiler-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-dom",
"version": "3.4.15",
"version": "3.4.16",
"description": "@vue/compiler-dom",
"main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js",
12 changes: 6 additions & 6 deletions packages/compiler-sfc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-sfc",
"version": "3.4.15",
"version": "3.4.16",
"description": "@vue/compiler-sfc",
"main": "dist/compiler-sfc.cjs.js",
"module": "dist/compiler-sfc.esm-browser.js",
@@ -42,26 +42,26 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
"dependencies": {
"@babel/parser": "^7.23.6",
"@babel/parser": "^7.23.9",
"@vue/compiler-core": "workspace:*",
"@vue/compiler-dom": "workspace:*",
"@vue/compiler-ssr": "workspace:*",
"@vue/shared": "workspace:*",
"estree-walker": "^2.0.2",
"magic-string": "^0.30.5",
"magic-string": "^0.30.6",
"postcss": "^8.4.33",
"source-map-js": "^1.0.2"
},
"devDependencies": {
"@babel/types": "^7.23.6",
"@babel/types": "^7.23.9",
"@vue/consolidate": "^0.17.3",
"hash-sum": "^2.0.0",
"lru-cache": "^10.1.0",
"lru-cache": "^10.2.0",
"merge-source-map": "^1.1.0",
"minimatch": "^9.0.3",
"postcss-modules": "^6.0.0",
"postcss-selector-parser": "^6.0.15",
"pug": "^3.0.2",
"sass": "^1.69.7"
"sass": "^1.70.0"
}
}
2 changes: 1 addition & 1 deletion packages/compiler-ssr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-ssr",
"version": "3.4.15",
"version": "3.4.16",
"description": "@vue/compiler-ssr",
"main": "dist/compiler-ssr.cjs.js",
"types": "dist/compiler-ssr.d.ts",
Loading