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.2.43
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.2.44
Choose a head ref
  • 5 commits
  • 26 files changed
  • 4 contributors

Commits on Nov 9, 2022

  1. Copy the full SHA
    dc9f994 View commit details
  2. Copy the full SHA
    fccfb18 View commit details
  3. Copy the full SHA
    9a816dc View commit details
  4. fix(watch): for immediate watch with single source, ensure cb is call…

    …ed with undefined as oldValue (#7075)
    
    fix: #7074
    LinusBorg authored Nov 9, 2022
    Copy the full SHA
    5dc593b View commit details
  5. release: v3.2.44

    yyx990803 committed Nov 9, 2022
    Copy the full SHA
    ec795bf View commit details
4 changes: 2 additions & 2 deletions .github/contributing.md
Original file line number Diff line number Diff line change
@@ -36,9 +36,9 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before

- Make sure tests pass!

- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).

- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).

### Advanced Pull Request Tips

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [3.2.44](https://github.com/vuejs/core/compare/v3.2.43...v3.2.44) (2022-11-09)


### Bug Fixes

* **watch:** for immediate watch with single source, ensure cb is called with undefined as oldValue ([#7075](https://github.com/vuejs/core/issues/7075)) ([5dc593b](https://github.com/vuejs/core/commit/5dc593ba2833e98eab12bd6c73765805b172185a)), closes [#7074](https://github.com/vuejs/core/issues/7074)



## [3.2.43](https://github.com/vuejs/core/compare/v3.2.42...v3.2.43) (2022-11-09)


19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "3.2.43",
"version": "3.2.44",
"packageManager": "pnpm@7.1.0",
"scripts": {
"dev": "node scripts/dev.js",
@@ -25,20 +25,21 @@
"serve-sfc-playground": "vite packages/sfc-playground --host",
"serve": "serve",
"open": "open http://localhost:5000/packages/template-explorer/local.html",
"preinstall": "node ./scripts/preinstall.js",
"prebuild-sfc-playground": "node scripts/build.js compiler reactivity-transform shared -af cjs && node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime && node scripts/build.js compiler-sfc server-renderer -f esm-browser",
"build-sfc-playground": "cd packages/sfc-playground && npm run build"
"build-sfc-playground": "cd packages/sfc-playground && npm run build",
"preinstall": "node ./scripts/preinstall.js",
"postinstall": "simple-git-hooks"
},
"types": "test-dts/index.d.ts",
"tsd": {
"directory": "test-dts"
},
"gitHooks": {
"pre-commit": "lint-staged",
"commit-msg": "node scripts/verifyCommit.js"
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",
"commit-msg": "node scripts/verifyCommit.mjs"
},
"lint-staged": {
"*.js": [
"*.{js,json}": [
"prettier --write"
],
"*.ts?(x)": [
@@ -92,12 +93,12 @@
"semver": "^7.3.2",
"serve": "^12.0.0",
"terser": "^5.15.1",
"simple-git-hooks": "^2.8.1",
"todomvc-app-css": "^2.3.0",
"ts-jest": "^27.0.5",
"tslib": "^2.4.0",
"typescript": "^4.8.0",
"vite": "^3.0.0",
"vue": "workspace:*",
"yorkie": "^2.0.0"
"vue": "workspace:*"
}
}
4 changes: 2 additions & 2 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.2.43",
"version": "3.2.44",
"description": "@vue/compiler-core",
"main": "index.js",
"module": "dist/compiler-core.esm-bundler.js",
@@ -32,7 +32,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/shared": "3.2.44",
"@babel/parser": "^7.16.4",
"estree-walker": "^2.0.2",
"source-map": "^0.6.1"
6 changes: 3 additions & 3 deletions 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.2.43",
"version": "3.2.44",
"description": "@vue/compiler-dom",
"main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js",
@@ -37,7 +37,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/compiler-core": "3.2.43"
"@vue/shared": "3.2.44",
"@vue/compiler-core": "3.2.44"
}
}
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.2.43",
"version": "3.2.44",
"description": "@vue/compiler-sfc",
"main": "dist/compiler-sfc.cjs.js",
"module": "dist/compiler-sfc.esm-browser.js",
@@ -33,11 +33,11 @@
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.43",
"@vue/compiler-dom": "3.2.43",
"@vue/compiler-ssr": "3.2.43",
"@vue/reactivity-transform": "3.2.43",
"@vue/shared": "3.2.43",
"@vue/compiler-core": "3.2.44",
"@vue/compiler-dom": "3.2.44",
"@vue/compiler-ssr": "3.2.44",
"@vue/reactivity-transform": "3.2.44",
"@vue/shared": "3.2.44",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7",
"source-map": "^0.6.1",
6 changes: 3 additions & 3 deletions 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.2.43",
"version": "3.2.44",
"description": "@vue/compiler-ssr",
"main": "dist/compiler-ssr.cjs.js",
"types": "dist/compiler-ssr.d.ts",
@@ -28,7 +28,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/compiler-dom": "3.2.43"
"@vue/shared": "3.2.44",
"@vue/compiler-dom": "3.2.44"
}
}
6 changes: 3 additions & 3 deletions packages/reactivity-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/reactivity-transform",
"version": "3.2.43",
"version": "3.2.44",
"description": "@vue/reactivity-transform",
"main": "dist/reactivity-transform.cjs.js",
"files": [
@@ -29,8 +29,8 @@
"homepage": "https://github.com/vuejs/core/tree/dev/packages/reactivity-transform#readme",
"dependencies": {
"@babel/parser": "^7.16.4",
"@vue/compiler-core": "3.2.43",
"@vue/shared": "3.2.43",
"@vue/compiler-core": "3.2.44",
"@vue/shared": "3.2.44",
"estree-walker": "^2.0.2",
"magic-string": "^0.25.7"
},
4 changes: 2 additions & 2 deletions packages/reactivity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/reactivity",
"version": "3.2.43",
"version": "3.2.44",
"description": "@vue/reactivity",
"main": "index.js",
"module": "dist/reactivity.esm-bundler.js",
@@ -36,6 +36,6 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
"dependencies": {
"@vue/shared": "3.2.43"
"@vue/shared": "3.2.44"
}
}
2 changes: 1 addition & 1 deletion packages/runtime-core/__tests__/apiWatch.spec.ts
Original file line number Diff line number Diff line change
@@ -745,7 +745,7 @@ describe('api: watch', () => {
const state = ref()
const spy = jest.fn()
watch(() => state.value, spy, { immediate: true })
expect(spy).toHaveBeenCalled()
expect(spy).toHaveBeenCalledWith(undefined, undefined, expect.any(Function))
state.value = 3
await nextTick()
expect(spy).toHaveBeenCalledTimes(2)
6 changes: 3 additions & 3 deletions packages/runtime-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/runtime-core",
"version": "3.2.43",
"version": "3.2.44",
"description": "@vue/runtime-core",
"main": "index.js",
"module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/reactivity": "3.2.43"
"@vue/shared": "3.2.44",
"@vue/reactivity": "3.2.44"
}
}
9 changes: 5 additions & 4 deletions packages/runtime-core/src/apiWatch.ts
Original file line number Diff line number Diff line change
@@ -333,10 +333,11 @@ function doWatch(
callWithAsyncErrorHandling(cb, instance, ErrorCodes.WATCH_CALLBACK, [
newValue,
// pass undefined as the old value when it's changed for the first time
oldValue === INITIAL_WATCHER_VALUE ||
(isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
? []
: oldValue,
oldValue === INITIAL_WATCHER_VALUE
? undefined
: (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
? []
: oldValue,
onCleanup
])
oldValue = newValue
4 changes: 2 additions & 2 deletions packages/runtime-core/src/compat/compatConfig.ts
Original file line number Diff line number Diff line change
@@ -207,8 +207,8 @@ export const deprecationData: Record<DeprecationTypes, DeprecationData> = {
[DeprecationTypes.INSTANCE_EVENT_HOOKS]: {
message: event =>
`"${event}" lifecycle events are no longer supported. From templates, ` +
`use the "vnode" prefix instead of "hook:". For example, @${event} ` +
`should be changed to @vnode-${event.slice(5)}. ` +
`use the "vue:" prefix instead of "hook:". For example, @${event} ` +
`should be changed to @vue:${event.slice(5)}. ` +
`From JavaScript, use Composition API to dynamically register lifecycle ` +
`hooks.`,
link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
19 changes: 19 additions & 0 deletions packages/runtime-dom/__tests__/patchStyle.spec.ts
Original file line number Diff line number Diff line change
@@ -87,6 +87,25 @@ describe(`runtime-dom: style patching`, () => {
expect(el.style.cssText).toBe('')
})

it('should warn for trailing semicolons', () => {
const el = document.createElement('div')
patchProp(el, 'style', null, { color: 'red;' })
expect(
`Unexpected semicolon at the end of 'color' style value: 'red;'`
).toHaveBeenWarned()

patchProp(el, 'style', null, { '--custom': '100; ' })
expect(
`Unexpected semicolon at the end of '--custom' style value: '100; '`
).toHaveBeenWarned()
})

it('should not warn for escaped trailing semicolons', () => {
const el = document.createElement('div')
patchProp(el, 'style', null, { '--custom': '100\\;' })
expect(el.style.getPropertyValue('--custom')).toBe('100\\;')
})

// JSDOM doesn't support custom properties on style object so we have to
// mock it here.
function mockElementWithStyle() {
6 changes: 3 additions & 3 deletions packages/runtime-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/runtime-dom",
"version": "3.2.43",
"version": "3.2.44",
"description": "@vue/runtime-dom",
"main": "index.js",
"module": "dist/runtime-dom.esm-bundler.js",
@@ -35,8 +35,8 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme",
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/runtime-core": "3.2.43",
"@vue/shared": "3.2.44",
"@vue/runtime-core": "3.2.44",
"csstype": "^2.6.8"
}
}
10 changes: 9 additions & 1 deletion packages/runtime-dom/src/modules/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isString, hyphenate, capitalize, isArray } from '@vue/shared'
import { camelize } from '@vue/runtime-core'
import { camelize, warn } from '@vue/runtime-core'

type Style = string | Record<string, string | string[]> | null

@@ -35,6 +35,7 @@ export function patchStyle(el: Element, prev: Style, next: Style) {
}
}

const semicolonRE = /[^\\];\s*$/
const importantRE = /\s*!important$/

function setStyle(
@@ -46,6 +47,13 @@ function setStyle(
val.forEach(v => setStyle(style, name, v))
} else {
if (val == null) val = ''
if (__DEV__) {
if (semicolonRE.test(val)) {
warn(
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
)
}
}
if (name.startsWith('--')) {
// custom property definition
style.setProperty(name, val)
6 changes: 3 additions & 3 deletions packages/runtime-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/runtime-test",
"version": "3.2.43",
"version": "3.2.44",
"description": "@vue/runtime-test",
"private": true,
"main": "index.js",
@@ -25,7 +25,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-test#readme",
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/runtime-core": "3.2.43"
"@vue/shared": "3.2.44",
"@vue/runtime-core": "3.2.44"
}
}
8 changes: 4 additions & 4 deletions packages/server-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/server-renderer",
"version": "3.2.43",
"version": "3.2.44",
"description": "@vue/server-renderer",
"main": "index.js",
"module": "dist/server-renderer.esm-bundler.js",
@@ -32,10 +32,10 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme",
"peerDependencies": {
"vue": "3.2.43"
"vue": "3.2.44"
},
"dependencies": {
"@vue/shared": "3.2.43",
"@vue/compiler-ssr": "3.2.43"
"@vue/shared": "3.2.44",
"@vue/compiler-ssr": "3.2.44"
}
}
4 changes: 2 additions & 2 deletions packages/sfc-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/sfc-playground",
"version": "3.2.43",
"version": "3.2.44",
"private": true,
"scripts": {
"dev": "vite",
@@ -12,7 +12,7 @@
"vite": "^3.0.0"
},
"dependencies": {
"vue": "3.2.43",
"vue": "3.2.44",
"@vue/repl": "^1.3.0",
"file-saver": "^2.0.5",
"jszip": "^3.6.0"
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/shared",
"version": "3.2.43",
"version": "3.2.44",
"description": "internal utils shared across @vue packages",
"main": "index.js",
"module": "dist/shared.esm-bundler.js",
2 changes: 1 addition & 1 deletion packages/size-check/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/size-check",
"version": "3.2.43",
"version": "3.2.44",
"private": true,
"scripts": {
"build": "vite build"
2 changes: 1 addition & 1 deletion packages/template-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/template-explorer",
"version": "3.2.43",
"version": "3.2.44",
"private": true,
"buildOptions": {
"formats": [
Loading