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.6
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.7
Choose a head ref
  • 19 commits
  • 42 files changed
  • 9 contributors

Commits on Sep 1, 2021

  1. Copy the full SHA
    935b4e2 View commit details
  2. Copy the full SHA
    b89ff92 View commit details
  3. build(deps-dev): bump @types/node from 16.7.1 to 16.7.10 (#4483)

    Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.7.1 to 16.7.10.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 1, 2021
    Copy the full SHA
    33fc1a4 View commit details
  4. build(deps-dev): bump vite from 2.5.0 to 2.5.3 (#4484)

    Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.5.0 to 2.5.3.
    - [Release notes](https://github.com/vitejs/vite/releases)
    - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
    - [Commits](https://github.com/vitejs/vite/commits/create-vite@2.5.3/packages/vite)
    
    ---
    updated-dependencies:
    - dependency-name: vite
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 1, 2021
    Copy the full SHA
    ddadd93 View commit details
  5. build(deps-dev): bump @vitejs/plugin-vue from 1.4.0 to 1.6.0 (#4488)

    Bumps [@vitejs/plugin-vue](https://github.com/vitejs/vite/tree/HEAD/packages/plugin-vue) from 1.4.0 to 1.6.0.
    - [Release notes](https://github.com/vitejs/vite/releases)
    - [Changelog](https://github.com/vitejs/vite/blob/main/packages/plugin-vue/CHANGELOG.md)
    - [Commits](https://github.com/vitejs/vite/commits/create-app@1.6.0/packages/plugin-vue)
    
    ---
    updated-dependencies:
    - dependency-name: "@vitejs/plugin-vue"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 1, 2021
    Copy the full SHA
    8154d13 View commit details
  6. build(deps-dev): bump @microsoft/api-extractor from 7.18.6 to 7.18.7 (#…

    …4485)
    
    Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack) from 7.18.6 to 7.18.7.
    - [Release notes](https://github.com/microsoft/rushstack/releases)
    - [Commits](https://github.com/microsoft/rushstack/compare/@microsoft/api-extractor_v7.18.6...@microsoft/api-extractor_v7.18.7)
    
    ---
    updated-dependencies:
    - dependency-name: "@microsoft/api-extractor"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 1, 2021
    Copy the full SHA
    ffd4f8d View commit details
  7. build(deps-dev): bump @typescript-eslint/parser from 4.29.2 to 4.30.0 (

    …#4487)
    
    Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.29.2 to 4.30.0.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.30.0/packages/parser)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 1, 2021
    Copy the full SHA
    18f2ed2 View commit details
  8. chore: set node engine to v16 (#4471)

    As some packages rely on the experimental "stream/web" package only available in node v16.5+,
    this commit updates the `engines` property to reflect that.
    cexbrayat authored Sep 1, 2021
    Copy the full SHA
    b9b28e2 View commit details
  9. chore(deps): update jest to v27 (#4472)

    Updates jest and ts-jest to v27, as jest v27.1.0 includes a necessary fix to unblock further work on spying issues.
    
    See jestjs/jest#11721
    cexbrayat authored Sep 1, 2021
    Copy the full SHA
    b49f446 View commit details
  10. Copy the full SHA
    6f555cf View commit details
  11. Copy the full SHA
    741d3b3 View commit details
  12. Copy the full SHA
    7178716 View commit details
  13. Copy the full SHA
    4502a0e View commit details
  14. Copy the full SHA
    a6e6253 View commit details
  15. Copy the full SHA
    33cf6c8 View commit details
  16. Copy the full SHA
    ef5b731 View commit details
  17. chore: update snapshot

    yyx990803 committed Sep 1, 2021
    Copy the full SHA
    168a17a View commit details
  18. Copy the full SHA
    3628991 View commit details
  19. release: v3.2.7

    yyx990803 committed Sep 1, 2021
    Copy the full SHA
    b079996 View commit details
Showing with 780 additions and 1,341 deletions.
  1. +14 −0 CHANGELOG.md
  2. +1 −0 jest.config.js
  3. +5 −5 package.json
  4. +4 −4 packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap
  5. +2 −2 packages/compiler-core/package.json
  6. +2 −6 packages/compiler-core/src/codegen.ts
  7. +1 −1 packages/compiler-core/src/errors.ts
  8. +2 −4 packages/compiler-core/src/parse.ts
  9. +0 −2 packages/compiler-core/src/runtimeHelpers.ts
  10. +6 −1 packages/compiler-core/src/transforms/transformElement.ts
  11. +3 −3 packages/compiler-dom/package.json
  12. +25 −25 packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
  13. +16 −0 packages/compiler-sfc/__tests__/__snapshots__/compileScriptRefTransform.spec.ts.snap
  14. +1 −1 packages/compiler-sfc/__tests__/compileScript.spec.ts
  15. +13 −0 packages/compiler-sfc/__tests__/compileScriptRefTransform.spec.ts
  16. +6 −6 packages/compiler-sfc/package.json
  17. +2 −2 packages/compiler-sfc/src/compileScript.ts
  18. +4 −5 packages/compiler-ssr/__tests__/ssrScopeId.spec.ts
  19. +3 −3 packages/compiler-ssr/package.json
  20. +2 −2 packages/reactivity/package.json
  21. +3 −1 packages/reactivity/src/index.ts
  22. +8 −9 packages/reactivity/src/ref.ts
  23. +3 −3 packages/ref-transform/package.json
  24. +1 −1 packages/ref-transform/src/refTransform.ts
  25. +9 −1 packages/runtime-core/__tests__/apiOptions.spec.ts
  26. +3 −3 packages/runtime-core/package.json
  27. +1 −1 packages/runtime-core/src/apiAsyncComponent.ts
  28. +2 −0 packages/runtime-core/src/componentOptions.ts
  29. +1 −0 packages/runtime-core/src/components/Suspense.ts
  30. +3 −2 packages/runtime-core/src/index.ts
  31. +3 −3 packages/runtime-dom/package.json
  32. +3 −3 packages/runtime-test/package.json
  33. +4 −4 packages/server-renderer/package.json
  34. +1 −1 packages/sfc-playground/package.json
  35. +1 −1 packages/shared/package.json
  36. +1 −1 packages/size-check/package.json
  37. +1 −1 packages/template-explorer/package.json
  38. +1 −1 packages/vue-compat/__tests__/instance.spec.ts
  39. +2 −2 packages/vue-compat/package.json
  40. +1 −1 packages/vue/examples/__tests__/grid.spec.ts
  41. +4 −4 packages/vue/package.json
  42. +612 −1,226 yarn.lock
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [3.2.7](https://github.com/vuejs/vue-next/compare/v3.2.6...v3.2.7) (2021-09-01)


### Bug Fixes

* **compiler-core:** remove no longer necessary withScopeId import in generated code ([935b4e2](https://github.com/vuejs/vue-next/commit/935b4e221041c8ae34c5821d90db90f07e622a9f))
* **compiler-sfc:** ensure script setup lang=ts output is tree-shakable ([b89ff92](https://github.com/vuejs/vue-next/commit/b89ff9291e70c64f7098cc110161a75eb7c465a4))
* **compiler:** only generate non-static ref for script setup if the binding exists ([3628991](https://github.com/vuejs/vue-next/commit/362899190666a2d1f9fe23c92e9b6007721ad69f)), closes [#4431](https://github.com/vuejs/vue-next/issues/4431)
* **ref-transform:** should transform $ref when used with generic arguments ([#4446](https://github.com/vuejs/vue-next/issues/4446)) ([33cf6c8](https://github.com/vuejs/vue-next/commit/33cf6c88664137e8c9d6e75a3b4c5f5cce763c12)), closes [#4442](https://github.com/vuejs/vue-next/issues/4442)
* **runtime-core:** properly merge unmounted and beforeUnmount options ([#4447](https://github.com/vuejs/vue-next/issues/4447)) ([741d3b3](https://github.com/vuejs/vue-next/commit/741d3b36f21582e682009114961b5cd3146e8dad))
* **suspense:** misusing DOM Comment element constructor as a vnode type ([#4451](https://github.com/vuejs/vue-next/issues/4451)) ([ef5b731](https://github.com/vuejs/vue-next/commit/ef5b73159d7221c36c25e32f643669d789a33c2c))



## [3.2.6](https://github.com/vuejs/vue-next/compare/v3.2.5...v3.2.6) (2021-08-24)


1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest',
setupFilesAfterEnv: ['./scripts/setupJestEnv.ts'],
globals: {
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "3.2.6",
"version": "3.2.7",
"workspaces": [
"packages/*"
],
@@ -42,7 +42,7 @@
]
},
"engines": {
"node": ">=10.0.0"
"node": ">=16.5.0"
},
"devDependencies": {
"@babel/types": "^7.12.0",
@@ -52,7 +52,7 @@
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.3.4",
"@types/hash-sum": "^1.0.0",
"@types/jest": "^26.0.16",
"@types/jest": "^27.0.1",
"@types/node": "^16.4.7",
"@types/puppeteer": "^5.0.0",
"@typescript-eslint/parser": "^4.1.1",
@@ -64,7 +64,7 @@
"eslint": "^7.7.0",
"execa": "^4.0.2",
"fs-extra": "^9.0.1",
"jest": "^26.0.1",
"jest": "^27.1.0",
"lint-staged": "^10.2.10",
"minimist": "^1.2.0",
"npm-run-all": "^4.1.5",
@@ -78,7 +78,7 @@
"rollup-plugin-typescript2": "^0.27.2",
"semver": "^7.3.2",
"serve": "^12.0.0",
"ts-jest": "^26.2.0",
"ts-jest": "^27.0.5",
"typescript": "^4.2.2",
"yorkie": "^2.0.0"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`scopeId compiler support should push scopeId for hoisted nodes 1`] = `
"import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withScopeId as _withScopeId, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \\"vue\\"
"import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \\"vue\\"
_pushScopeId(\\"test\\")
const _hoisted_1 = /*#__PURE__*/_createElementVNode(\\"div\\", null, \\"hello\\", -1 /* HOISTED */)
@@ -18,7 +18,7 @@ export function render(_ctx, _cache) {
`;

exports[`scopeId compiler support should wrap default slot 1`] = `
"import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
"import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \\"vue\\"
export function render(_ctx, _cache) {
const _component_Child = _resolveComponent(\\"Child\\")
@@ -33,7 +33,7 @@ export function render(_ctx, _cache) {
`;

exports[`scopeId compiler support should wrap dynamic slots 1`] = `
"import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
"import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock } from \\"vue\\"
export function render(_ctx, _cache) {
const _component_Child = _resolveComponent(\\"Child\\")
@@ -60,7 +60,7 @@ export function render(_ctx, _cache) {
`;

exports[`scopeId compiler support should wrap named slots 1`] = `
"import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
"import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \\"vue\\"
export function render(_ctx, _cache) {
const _component_Child = _resolveComponent(\\"Child\\")
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.6",
"version": "3.2.7",
"description": "@vue/compiler-core",
"main": "index.js",
"module": "dist/compiler-core.esm-bundler.js",
@@ -32,7 +32,7 @@
},
"homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-core#readme",
"dependencies": {
"@vue/shared": "3.2.6",
"@vue/shared": "3.2.7",
"@babel/parser": "^7.15.0",
"@babel/types": "^7.15.0",
"estree-walker": "^2.0.2",
8 changes: 2 additions & 6 deletions packages/compiler-core/src/codegen.ts
Original file line number Diff line number Diff line change
@@ -47,7 +47,6 @@ import {
CREATE_TEXT,
PUSH_SCOPE_ID,
POP_SCOPE_ID,
WITH_SCOPE_ID,
WITH_DIRECTIVES,
CREATE_ELEMENT_VNODE,
OPEN_BLOCK,
@@ -380,11 +379,8 @@ function genModulePreamble(
) {
const { push, newline, optimizeImports, runtimeModuleName } = context

if (genScopeId) {
ast.helpers.push(WITH_SCOPE_ID)
if (ast.hoists.length) {
ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID)
}
if (genScopeId && ast.hoists.length) {
ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID)
}

// generate import statements for helpers
2 changes: 1 addition & 1 deletion packages/compiler-core/src/errors.ts
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ export const errorMessages: Record<ErrorCodes, string> = {
"Attribute name cannot start with '='.",
[ErrorCodes.UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME]:
"'<?' is allowed only in XML context.",
[ErrorCodes.UNEXPECTED_NULL_CHARACTER]: `Unexpected null cahracter.`,
[ErrorCodes.UNEXPECTED_NULL_CHARACTER]: `Unexpected null character.`,
[ErrorCodes.UNEXPECTED_SOLIDUS_IN_TAG]: "Illegal '/' in tags.",

// Vue-specific parse errors
6 changes: 2 additions & 4 deletions packages/compiler-core/src/parse.ts
Original file line number Diff line number Diff line change
@@ -989,10 +989,8 @@ function parseInterpolation(
function parseText(context: ParserContext, mode: TextModes): TextNode {
__TEST__ && assert(context.source.length > 0)

const endTokens = ['<', context.options.delimiters[0]]
if (mode === TextModes.CDATA) {
endTokens.push(']]>')
}
const endTokens =
mode === TextModes.CDATA ? [']]>'] : ['<', context.options.delimiters[0]]

let endIndex = context.source.length
for (let i = 0; i < endTokens.length; i++) {
2 changes: 0 additions & 2 deletions packages/compiler-core/src/runtimeHelpers.ts
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ export const TO_HANDLER_KEY = Symbol(__DEV__ ? `toHandlerKey` : ``)
export const SET_BLOCK_TRACKING = Symbol(__DEV__ ? `setBlockTracking` : ``)
export const PUSH_SCOPE_ID = Symbol(__DEV__ ? `pushScopeId` : ``)
export const POP_SCOPE_ID = Symbol(__DEV__ ? `popScopeId` : ``)
export const WITH_SCOPE_ID = Symbol(__DEV__ ? `withScopeId` : ``)
export const WITH_CTX = Symbol(__DEV__ ? `withCtx` : ``)
export const UNREF = Symbol(__DEV__ ? `unref` : ``)
export const IS_REF = Symbol(__DEV__ ? `isRef` : ``)
@@ -79,7 +78,6 @@ export const helperNameMap: any = {
[SET_BLOCK_TRACKING]: `setBlockTracking`,
[PUSH_SCOPE_ID]: `pushScopeId`,
[POP_SCOPE_ID]: `popScopeId`,
[WITH_SCOPE_ID]: `withScopeId`,
[WITH_CTX]: `withCtx`,
[UNREF]: `unref`,
[IS_REF]: `isRef`,
7 changes: 6 additions & 1 deletion packages/compiler-core/src/transforms/transformElement.ts
Original file line number Diff line number Diff line change
@@ -465,7 +465,12 @@ export function buildProps(
// in inline mode there is no setupState object, so we can't use string
// keys to set the ref. Instead, we need to transform it to pass the
// acrtual ref instead.
if (!__BROWSER__ && context.inline) {
if (
!__BROWSER__ &&
value &&
context.inline &&
context.bindingMetadata[value.content]
) {
isStatic = false
}
}
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.6",
"version": "3.2.7",
"description": "@vue/compiler-dom",
"main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js",
@@ -37,7 +37,7 @@
},
"homepage": "https://github.com/vuejs/vue-next/tree/master/packages/compiler-dom#readme",
"dependencies": {
"@vue/shared": "3.2.6",
"@vue/compiler-core": "3.2.6"
"@vue/shared": "3.2.7",
"@vue/compiler-core": "3.2.7"
}
}
Loading