Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #139

Merged
merged 43 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a47fb45
workflow(sfc-playground): init custom formatter when selecting new ve…
serkodev Jan 3, 2024
0648804
fix(runtime-core): correctly assign suspenseId to avoid conflicts wit…
yangxiuxiu1115 Jan 3, 2024
a9f781a
fix(watch): revert watch behavior when watching shallow reactive objects
yyx990803 Jan 3, 2024
4331af9
chore(deps): update all non-major dependencies (#9959)
renovate[bot] Jan 3, 2024
7b8c95a
chore(deps): update dependency postcss-selector-parser to ^6.0.15 (#9…
renovate[bot] Jan 3, 2024
25f212d
chore(deps): update test to ^1.1.1 (#9962)
renovate[bot] Jan 3, 2024
0160264
fix(ssr): avoid rendering transition-group slot content as a fragment…
edison1105 Jan 3, 2024
71d3121
fix(compiler-sfc): fix scss source map regression
yyx990803 Jan 3, 2024
6de0c55
chore(deps): update lint (#9963)
renovate[bot] Jan 3, 2024
f300a40
fix(watch): remove instance unmounted short circuit in getter of `wat…
yangmingshan Jan 3, 2024
10ccb9b
fix(defineModel): support kebab-case/camelCase mismatches (#9950)
skirtles-code Jan 3, 2024
fe03b2f
chore(apiWatch): constraint deep passes boolean (#9952)
Alfred-Skyblue Jan 3, 2024
f70f7ca
release: v3.4.4
yyx990803 Jan 3, 2024
d2d8955
fix(watch): cleanup watcher effect from scope when manually stopped (…
yangmingshan Jan 4, 2024
7dbdb3e
fix(compiler-ssr): fix node clone edge case caused by AST reuse (#9983)
edison1105 Jan 4, 2024
e790e1b
build: add production/development export conditions (#9977)
danielroe Jan 4, 2024
0ae651a
chore: remove log
yyx990803 Jan 4, 2024
fda5192
chore: disallow console statement (#9986)
sxzz Jan 4, 2024
ae60a91
fix(compiler-sfc): fix sfc template unref rewrite for class instantia…
yyx990803 Jan 4, 2024
b20350d
fix(compiler-sfc): fix co-usage of defineModel transform options and …
yyx990803 Jan 4, 2024
0275dd3
release: v3.4.5
yyx990803 Jan 4, 2024
68e5cc6
chore(runtime-core): remove console comment (#9989)
Doctor-wu Jan 6, 2024
78f8db7
chore(deps): update dependency @types/node to ^20.10.7 (#10029)
renovate[bot] Jan 8, 2024
96fffe6
chore(comments): dep changed from set to map (#10019) [ci skip]
liuseen-l Jan 8, 2024
ceb215e
test: update vShow tests to workaround jsdom regression
yyx990803 Jan 8, 2024
7220c58
chore(deps): update test (#10030)
renovate[bot] Jan 8, 2024
a3fbf21
fix(suspense): fix anchor for suspense with transition out-in (#9999)
baiwusanyu-c Jan 8, 2024
2701355
fix(hydration): avoid hydration mismatch warning for styles with diff…
zh-lx Jan 8, 2024
324e817
dx(computed): warn incorrect use of getCurrentInstance inside computed
yyx990803 Jan 8, 2024
d9162df
fix(scheduler): sort nested postFlushCbs
yyx990803 Jan 8, 2024
3c3561e
fix: fix post watcher fire timing on nested app mounts
yyx990803 Jan 8, 2024
3bf34b7
fix(runtime-core): handle fragment with null children (#10010)
Doctor-wu Jan 8, 2024
7bd4e90
fix(build): revert "build: add production/development export conditio…
yyx990803 Jan 8, 2024
c379bc2
fix(types): allow `null` type for textarea value (#9997)
baiwusanyu-c Jan 8, 2024
dc91463
release: v3.4.6
yyx990803 Jan 8, 2024
7976f70
refactor(runtime-core): safer currentInstance reset
yyx990803 Jan 8, 2024
923d560
fix(parser): skip compat mode check for SFC root `<template>` tags (#…
haoqunjiang Jan 9, 2024
9c54dac
chore: use NOOP. (#9938)
zhangenming Jan 9, 2024
64e9c96
refactor(runtime-core): use currentRenderingInstance directly
zhangenming Jan 9, 2024
03b5496
chore(types): use EffectScheduler type for its queue (#10023)
liuseen-l Jan 9, 2024
3135fcb
workflow: ignore non-package directories in /packages (#10016)
liuseen-l Jan 9, 2024
2fd3905
revert: "dx(computed): warn incorrect use of getCurrentInstance insid…
yyx990803 Jan 9, 2024
438a74a
fix(types): fix functional component for `h` (#9991)
sxzz Jan 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
plugins: ['jest', 'import', '@typescript-eslint'],
rules: {
'no-debugger': 'error',
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
// most of the codebase are expected to be env agnostic
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],

Expand Down Expand Up @@ -58,6 +59,7 @@ module.exports = {
{
files: ['**/__tests__/**', 'packages/dts-test/**'],
rules: {
'no-console': 'off',
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off',
'jest/no-disabled-tests': 'error',
Expand Down Expand Up @@ -92,6 +94,7 @@ module.exports = {
rules: {
'no-restricted-globals': ['error', ...NodeGlobals],
'no-restricted-syntax': ['error', banConstEnum],
'no-console': 'off',
},
},
// JavaScript files
Expand All @@ -113,6 +116,7 @@ module.exports = {
rules: {
'no-restricted-globals': 'off',
'no-restricted-syntax': ['error', banConstEnum],
'no-console': 'off',
},
},
// Import nodejs modules in compiler-sfc
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
## [3.4.6](https://github.com/vuejs/core/compare/v3.4.5...v3.4.6) (2024-01-08)


### Bug Fixes

* **build:** revert "build: add production/development export conditions ([#9977](https://github.com/vuejs/core/issues/9977))" ([7bd4e90](https://github.com/vuejs/core/commit/7bd4e90506547c42234165776b01793abd37b148)), closes [#10012](https://github.com/vuejs/core/issues/10012) [#10020](https://github.com/vuejs/core/issues/10020)
* fix post watcher fire timing on nested app mounts ([3c3561e](https://github.com/vuejs/core/commit/3c3561e7203091f49d57f1da6d822c91e462bc46)), closes [#10005](https://github.com/vuejs/core/issues/10005)
* **hydration:** avoid hydration mismatch warning for styles with different order ([#10011](https://github.com/vuejs/core/issues/10011)) ([2701355](https://github.com/vuejs/core/commit/2701355e8eb07ab664e398d9fc05d6c4e2e9b20e)), closes [#10000](https://github.com/vuejs/core/issues/10000) [#10006](https://github.com/vuejs/core/issues/10006)
* **runtime-core:** handle fragment with null children ([#10010](https://github.com/vuejs/core/issues/10010)) ([3bf34b7](https://github.com/vuejs/core/commit/3bf34b767e4dd3cf6a974301ecf0363ae4dda4ec)), closes [#10007](https://github.com/vuejs/core/issues/10007)
* **scheduler:** sort nested postFlushCbs ([d9162df](https://github.com/vuejs/core/commit/d9162dfc2ee0c3a369fb9bf32ff413e74761bee6)), closes [#10003](https://github.com/vuejs/core/issues/10003)
* **suspense:** fix anchor for suspense with transition out-in ([#9999](https://github.com/vuejs/core/issues/9999)) ([a3fbf21](https://github.com/vuejs/core/commit/a3fbf2132b0cd3655e969e290548c8fabc08fd33)), closes [#9996](https://github.com/vuejs/core/issues/9996)
* **types:** allow `null` type for textarea value ([#9997](https://github.com/vuejs/core/issues/9997)) ([c379bc2](https://github.com/vuejs/core/commit/c379bc29efc70d6ac5840de10c357ee3dad998c0)), closes [#9904](https://github.com/vuejs/core/issues/9904)



## [3.4.5](https://github.com/vuejs/core/compare/v3.4.4...v3.4.5) (2024-01-04)


### Bug Fixes

* **compiler-sfc:** fix co-usage of defineModel transform options and props destructure ([b20350d](https://github.com/vuejs/core/commit/b20350ded562d27e5901f308d0bc13344f840c4a)), closes [#9972](https://github.com/vuejs/core/issues/9972)
* **compiler-sfc:** fix sfc template unref rewrite for class instantiation ([ae60a91](https://github.com/vuejs/core/commit/ae60a91cc23424493071ad9088782763eb1e8ff7)), closes [#6483](https://github.com/vuejs/core/issues/6483) [#6491](https://github.com/vuejs/core/issues/6491)
* **compiler-ssr:** fix node clone edge case caused by AST reuse ([#9983](https://github.com/vuejs/core/issues/9983)) ([7dbdb3e](https://github.com/vuejs/core/commit/7dbdb3edf0ab648965331ca42f069387c97a1c8a)), closes [#9981](https://github.com/vuejs/core/issues/9981)
* **watch:** cleanup watcher effect from scope when manually stopped ([#9978](https://github.com/vuejs/core/issues/9978)) ([d2d8955](https://github.com/vuejs/core/commit/d2d89551bb06dc05cb7ae0496b8f345ae0de78ed))



## [3.4.4](https://github.com/vuejs/core/compare/v3.4.3...v3.4.4) (2024-01-03)


### Bug Fixes

* **compiler-sfc:** fix scss source map regression ([71d3121](https://github.com/vuejs/core/commit/71d3121b72c449351e718ee1539bdfa35b68bb32)), closes [#9970](https://github.com/vuejs/core/issues/9970) [#9969](https://github.com/vuejs/core/issues/9969)
* **compiler-sfc:** use compilerOptions when re-parsing consumed AST ([d94d8d4](https://github.com/vuejs/core/commit/d94d8d4bffd1daf171a655b292745ffc3e63052d))
* **defineModel:** support kebab-case/camelCase mismatches ([#9950](https://github.com/vuejs/core/issues/9950)) ([10ccb9b](https://github.com/vuejs/core/commit/10ccb9bfa0f5f3016207fc32b9611bab98e6f090))
* **runtime-core:** correctly assign suspenseId to avoid conflicts with the default id ([#9966](https://github.com/vuejs/core/issues/9966)) ([0648804](https://github.com/vuejs/core/commit/06488047c184dae3070d0008379716690edceb46)), closes [#9944](https://github.com/vuejs/core/issues/9944)
* **ssr:** avoid rendering transition-group slot content as a fragment ([#9961](https://github.com/vuejs/core/issues/9961)) ([0160264](https://github.com/vuejs/core/commit/0160264d677478ee928e8e851f39a9e94f97e337)), closes [#9933](https://github.com/vuejs/core/issues/9933)
* **watch:** remove instance unmounted short circuit in getter of `watchEffect` ([#9948](https://github.com/vuejs/core/issues/9948)) ([f300a40](https://github.com/vuejs/core/commit/f300a4001ec40cadef2520267eb5841ab48cf005))
* **watch:** revert watch behavior when watching shallow reactive objects ([a9f781a](https://github.com/vuejs/core/commit/a9f781a92cbc7de7b25c9e3d5b1295ca99eb6d86)), closes [#9965](https://github.com/vuejs/core/issues/9965)


### Performance Improvements

* **watch:** avoid double traverse for reactive source ([24d77c2](https://github.com/vuejs/core/commit/24d77c25ce5d5356adb5367beef1d23e6e340b35))



## [3.4.3](https://github.com/vuejs/core/compare/v3.4.2...v3.4.3) (2023-12-30)


Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"version": "3.4.3",
"packageManager": "pnpm@8.12.1",
"version": "3.4.6",
"packageManager": "pnpm@8.14.0",
"type": "module",
"scripts": {
"dev": "node scripts/dev.js",
Expand Down Expand Up @@ -70,11 +70,11 @@
"@rollup/plugin-terser": "^0.4.4",
"@types/hash-sum": "^1.0.2",
"@types/minimist": "^1.2.5",
"@types/node": "^20.10.5",
"@types/semver": "^7.5.5",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.15.0",
"@vitest/coverage-istanbul": "^1.1.0",
"@types/node": "^20.10.7",
"@types/semver": "^7.5.6",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"@vitest/coverage-istanbul": "^1.1.3",
"@vue/consolidate": "0.17.3",
"conventional-changelog-cli": "^4.1.0",
"enquirer": "^2.4.1",
Expand All @@ -83,22 +83,22 @@
"eslint": "^8.56.0",
"eslint-define-config": "^1.24.1",
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jest": "^27.6.1",
"estree-walker": "^2.0.2",
"execa": "^8.0.1",
"jsdom": "^23.0.1",
"jsdom": "^23.2.0",
"lint-staged": "^15.2.0",
"lodash": "^4.17.21",
"magic-string": "^0.30.5",
"markdown-table": "^3.0.3",
"marked": "^11.1.0",
"marked": "^11.1.1",
"minimist": "^1.2.8",
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"prettier": "^3.1.1",
"pretty-bytes": "^6.1.1",
"pug": "^3.0.2",
"puppeteer": "~21.6.1",
"puppeteer": "~21.7.0",
"rimraf": "^5.0.5",
"rollup": "^4.1.4",
"rollup-plugin-dts": "^6.1.0",
Expand All @@ -113,6 +113,6 @@
"tsx": "^4.7.0",
"typescript": "^5.2.2",
"vite": "^5.0.5",
"vitest": "^1.1.0"
"vitest": "^1.1.3"
}
}
2 changes: 1 addition & 1 deletion 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.3",
"version": "3.4.6",
"description": "@vue/compiler-core",
"main": "index.js",
"module": "dist/compiler-core.esm-bundler.js",
Expand Down
13 changes: 13 additions & 0 deletions packages/compiler-core/src/babelUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,19 @@ export function isInDestructureAssignment(
return false
}

export function isInNewExpression(parentStack: Node[]): boolean {
let i = parentStack.length
while (i--) {
const p = parentStack[i]
if (p.type === 'NewExpression') {
return true
} else if (p.type !== 'MemberExpression') {
break
}
}
return false
}

export function walkFunctionParams(
node: Function,
onIdent: (id: Identifier) => void,
Expand Down
1 change: 1 addition & 0 deletions packages/compiler-core/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ function onCloseTag(el: ElementNode, end: number, isImplied = false) {
}

if (
!tokenizer.inSFCRoot &&
isCompatEnabled(
CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE,
currentOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler-core/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export function createTransformContext(
}
context.parent!.children.splice(removalIndex, 1)
},
onNodeRemoved: () => {},
onNodeRemoved: NOOP,
addIdentifiers(exp) {
// identifier tracking only happens in non-browser builds.
if (!__BROWSER__) {
Expand Down
10 changes: 8 additions & 2 deletions packages/compiler-core/src/transforms/transformExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '../ast'
import {
isInDestructureAssignment,
isInNewExpression,
isStaticProperty,
isStaticPropertyKey,
walkIdentifiers,
Expand Down Expand Up @@ -131,6 +132,11 @@ export function processExpression(
// ({ x } = y)
const isDestructureAssignment =
parent && isInDestructureAssignment(parent, parentStack)
const isNewExpression = parent && isInNewExpression(parentStack)
const wrapWithUnref = (raw: string) => {
const wrapped = `${context.helperString(UNREF)}(${raw})`
return isNewExpression ? `(${wrapped})` : wrapped
}

if (
isConst(type) ||
Expand All @@ -147,7 +153,7 @@ export function processExpression(
// that assumes the value to be a ref for more efficiency
return isAssignmentLVal || isUpdateArg || isDestructureAssignment
? `${raw}.value`
: `${context.helperString(UNREF)}(${raw})`
: wrapWithUnref(raw)
} else if (type === BindingTypes.SETUP_LET) {
if (isAssignmentLVal) {
// let binding.
Expand Down Expand Up @@ -190,7 +196,7 @@ export function processExpression(
// for now
return raw
} else {
return `${context.helperString(UNREF)}(${raw})`
return wrapWithUnref(raw)
}
} else if (type === BindingTypes.PROPS) {
// use __props which is generated by compileScript so in ts mode
Expand Down
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.3",
"version": "3.4.6",
"description": "@vue/compiler-dom",
"main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,26 @@ return (_ctx, _cache) => {
}"
`;

exports[`SFC compile <script setup> > inlineTemplate mode > unref + new expression 1`] = `
"import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"

import Foo from './foo'

export default {
setup(__props) {


return (_ctx, _cache) => {
return (_openBlock(), _createElementBlock(_Fragment, null, [
_createElementVNode("div", null, _toDisplayString(new (_unref(Foo))()), 1 /* TEXT */),
_createElementVNode("div", null, _toDisplayString(new (_unref(Foo)).Bar()), 1 /* TEXT */)
], 64 /* STABLE_FRAGMENT */))
}
}

}"
`;

exports[`SFC compile <script setup> > inlineTemplate mode > v-model codegen 1`] = `
"import { vModelText as _vModelText, createElementVNode as _createElementVNode, withDirectives as _withDirectives, unref as _unref, isRef as _isRef, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"

Expand Down
18 changes: 18 additions & 0 deletions packages/compiler-sfc/__tests__/compileScript.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,24 @@ describe('SFC compile <script setup>', () => {
),
).not.toThrowError()
})

test('unref + new expression', () => {
const { content } = compile(
`
<script setup>
import Foo from './foo'
</script>
<template>
<div>{{ new Foo() }}</div>
<div>{{ new Foo.Bar() }}</div>
</template>
`,
{ inlineTemplate: true },
)
expect(content).toMatch(`new (_unref(Foo))()`)
expect(content).toMatch(`new (_unref(Foo)).Bar()`)
assertCode(content)
})
})

describe('with TypeScript', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default {
__expose();

const modelValue = _useModel(__props, "modelValue")
const c = _useModel(__props, "count")
const toString = _useModel(__props, "toString")
const c = _useModel(__props, 'count')
const toString = _useModel(__props, 'toString')

return { modelValue, c, toString }
}
Expand All @@ -40,7 +40,10 @@ export default /*#__PURE__*/_defineComponent({
setup(__props, { expose: __expose }) {
__expose();

const modelValue = _useModel(__props, "modelValue", { get(v) { return v - 1 }, set: (v) => { return v + 1 }, })
const modelValue = _useModel(__props, "modelValue", {
get(v) { return v - 1 },
set: (v) => { return v + 1 },
})

return { modelValue }
}
Expand All @@ -63,7 +66,36 @@ export default /*#__PURE__*/_defineComponent({
setup(__props, { expose: __expose }) {
__expose();

const modelValue = _useModel(__props, "modelValue", { get(v) { return v - 1 }, set: (v) => { return v + 1 }, })
const modelValue = _useModel(__props, "modelValue", {
get(v) { return v - 1 },
set: (v) => { return v + 1 },
})

return { modelValue }
}

})"
`;

exports[`defineModel() > usage w/ props destructure 1`] = `
"import { useModel as _useModel, mergeModels as _mergeModels, defineComponent as _defineComponent } from 'vue'

export default /*#__PURE__*/_defineComponent({
props: /*#__PURE__*/_mergeModels({
x: { type: Number, required: true }
}, {
"modelValue": {
},
"modelModifiers": {},
}),
emits: ["update:modelValue"],
setup(__props: any, { expose: __expose }) {
__expose();


const modelValue = _useModel(__props, "modelValue", {
set: (v) => { return v + __props.x }
})

return { modelValue }
}
Expand All @@ -84,7 +116,7 @@ export default {
__expose();


const count = _useModel(__props, "count")
const count = _useModel(__props, 'count')

return { count }
}
Expand Down Expand Up @@ -132,10 +164,10 @@ export default /*#__PURE__*/_defineComponent({
setup(__props, { expose: __expose }) {
__expose();

const modelValue = _useModel(__props, "modelValue")
const count = _useModel(__props, "count")
const disabled = _useModel(__props, "disabled")
const any = _useModel(__props, "any")
const modelValue = _useModel<boolean | string>(__props, "modelValue")
const count = _useModel<number>(__props, 'count')
const disabled = _useModel<number>(__props, 'disabled')
const any = _useModel<any | boolean>(__props, 'any')

return { modelValue, count, disabled, any }
}
Expand Down Expand Up @@ -163,11 +195,11 @@ export default /*#__PURE__*/_defineComponent({
setup(__props, { expose: __expose }) {
__expose();

const modelValue = _useModel(__props, "modelValue")
const fn = _useModel(__props, "fn")
const fnWithDefault = _useModel(__props, "fnWithDefault")
const str = _useModel(__props, "str")
const optional = _useModel(__props, "optional")
const modelValue = _useModel<boolean>(__props, "modelValue")
const fn = _useModel<() => void>(__props, 'fn')
const fnWithDefault = _useModel<() => void>(__props, 'fnWithDefault')
const str = _useModel<string>(__props, 'str')
const optional = _useModel<string>(__props, 'optional')

return { modelValue, fn, fnWithDefault, str, optional }
}
Expand Down
Loading