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.0.2
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.0.3
Choose a head ref

Commits on Oct 21, 2020

  1. Copy the full SHA
    434de69 View commit details
  2. Copy the full SHA
    dec8f82 View commit details
  3. Copy the full SHA
    f4621ff View commit details

Commits on Oct 22, 2020

  1. Copy the full SHA
    6e76faf View commit details
  2. Copy the full SHA
    cd7834a View commit details
  3. Copy the full SHA
    51e43e0 View commit details

Commits on Oct 23, 2020

  1. chore: comments [ci skip]

    yyx990803 committed Oct 23, 2020
    Copy the full SHA
    118502a View commit details
  2. Copy the full SHA
    ea5f92a View commit details

Commits on Oct 24, 2020

  1. Copy the full SHA
    fd10218 View commit details

Commits on Oct 25, 2020

  1. Copy the full SHA
    6b424c2 View commit details

Commits on Oct 26, 2020

  1. Copy the full SHA
    9c23ddf View commit details

Commits on Oct 27, 2020

  1. Copy the full SHA
    8e20375 View commit details

Commits on Oct 28, 2020

  1. Copy the full SHA
    ccf49d9 View commit details
  2. Copy the full SHA
    417e368 View commit details
  3. Copy the full SHA
    485a5eb View commit details
  4. Copy the full SHA
    44e816e View commit details
  5. Copy the full SHA
    4339c68 View commit details
  6. Copy the full SHA
    b927d1d View commit details
  7. Copy the full SHA
    b6d3bb5 View commit details
  8. Copy the full SHA
    0935c05 View commit details

Commits on Oct 29, 2020

  1. Copy the full SHA
    00c62c1 View commit details
  2. Copy the full SHA
    fe8f8f8 View commit details
  3. feat(compiler-sfc): new script setup implementation

    - now exposes all top level bindings to template
    - support `ref:` syntax sugar
    yyx990803 committed Oct 29, 2020
    1
    Copy the full SHA
    556560f View commit details

Commits on Oct 30, 2020

  1. Copy the full SHA
    941b645 View commit details
  2. Copy the full SHA
    ed2eb81 View commit details
  3. Copy the full SHA
    9d79410 View commit details
  4. Copy the full SHA
    38aadf5 View commit details
  5. Copy the full SHA
    8485cd4 View commit details
  6. Copy the full SHA
    6e3abc8 View commit details
  7. chore: fix snapshots

    yyx990803 committed Oct 30, 2020
    Copy the full SHA
    3cca6bc View commit details

Commits on Nov 2, 2020

  1. Verified

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

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

Commits on Nov 3, 2020

  1. Copy the full SHA
    0445d10 View commit details
  2. Copy the full SHA
    a1eb1e5 View commit details
  3. Verified

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

Commits on Nov 5, 2020

  1. Verified

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

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

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

Commits on Nov 6, 2020

  1. Verified

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

Commits on Nov 9, 2020

  1. Verified

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

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

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

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

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

Commits on Nov 10, 2020

  1. Verified

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

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

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

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

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

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e8ef55 View commit details
Showing with 5,171 additions and 2,520 deletions.
  1. +31 −0 CHANGELOG.md
  2. +2 −1 package.json
  3. +12 −12 packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap
  4. +5 −5 packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap
  5. +8 −2 packages/compiler-core/__tests__/codegen.spec.ts
  6. +26 −25 packages/compiler-core/__tests__/parse.spec.ts
  7. +1 −1 packages/compiler-core/__tests__/scopeId.spec.ts
  8. +9 −8 packages/compiler-core/__tests__/transforms/hoistStatic.spec.ts
  9. +3 −2 packages/compiler-core/__tests__/transforms/transformExpressions.spec.ts
  10. +4 −3 packages/compiler-core/__tests__/transforms/vFor.spec.ts
  11. +2 −2 packages/compiler-core/package.json
  12. +16 −9 packages/compiler-core/src/ast.ts
  13. +40 −17 packages/compiler-core/src/codegen.ts
  14. +2 −1 packages/compiler-core/src/index.ts
  15. +69 −19 packages/compiler-core/src/options.ts
  16. +8 −5 packages/compiler-core/src/parse.ts
  17. +5 −1 packages/compiler-core/src/runtimeHelpers.ts
  18. +10 −4 packages/compiler-core/src/transform.ts
  19. +111 −86 packages/compiler-core/src/transforms/hoistStatic.ts
  20. +82 −14 packages/compiler-core/src/transforms/transformElement.ts
  21. +215 −67 packages/compiler-core/src/transforms/transformExpression.ts
  22. +7 −2 packages/compiler-core/src/transforms/transformText.ts
  23. +1 −1 packages/compiler-core/src/transforms/vFor.ts
  24. +8 −2 packages/compiler-core/src/transforms/vIf.ts
  25. +53 −8 packages/compiler-core/src/transforms/vModel.ts
  26. +17 −8 packages/compiler-core/src/transforms/vOn.ts
  27. +3 −2 packages/compiler-dom/__tests__/parse.spec.ts
  28. +3 −3 packages/compiler-dom/__tests__/transforms/stringifyStatic.spec.ts
  29. +3 −3 packages/compiler-dom/package.json
  30. +8 −2 packages/compiler-dom/src/transforms/transformStyle.ts
  31. +75 −7 packages/compiler-sfc/README.md
  32. +648 −270 packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
  33. +111 −0 packages/compiler-sfc/__tests__/__snapshots__/cssVars.spec.ts.snap
  34. +738 −333 packages/compiler-sfc/__tests__/compileScript.spec.ts
  35. +41 −62 packages/compiler-sfc/__tests__/compileStyle.spec.ts
  36. +20 −10 packages/compiler-sfc/__tests__/compileTemplate.spec.ts
  37. +140 −0 packages/compiler-sfc/__tests__/cssVars.spec.ts
  38. +30 −0 packages/compiler-sfc/__tests__/utils.ts
  39. +7 −8 packages/compiler-sfc/package.json
  40. +1,047 −505 packages/compiler-sfc/src/compileScript.ts
  41. +16 −11 packages/compiler-sfc/src/compileStyle.ts
  42. +33 −2 packages/compiler-sfc/src/compileTemplate.ts
  43. +116 −0 packages/compiler-sfc/src/cssVars.ts
  44. +0 −76 packages/compiler-sfc/src/genCssVars.ts
  45. +21 −5 packages/compiler-sfc/src/parse.ts
  46. +7 −6 packages/compiler-sfc/src/stylePluginScoped.ts
  47. +0 −15 packages/compiler-sfc/src/stylePluginScopedVars.ts
  48. +15 −7 packages/compiler-sfc/src/templateTransformAssetUrl.ts
  49. +5 −4 packages/compiler-sfc/src/templateTransformSrcset.ts
  50. +27 −0 packages/compiler-sfc/src/warn.ts
  51. +32 −17 packages/compiler-ssr/__tests__/ssrInjectCssVars.spec.ts
  52. +4 −4 packages/compiler-ssr/__tests__/ssrScopeId.spec.ts
  53. +3 −3 packages/compiler-ssr/package.json
  54. +1 −3 packages/compiler-ssr/src/runtimeHelpers.ts
  55. +3 −12 packages/compiler-ssr/src/ssrCodegenTransform.ts
  56. +24 −12 packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts
  57. +2 −2 packages/reactivity/package.json
  58. +37 −7 packages/reactivity/src/reactive.ts
  59. +4 −5 packages/reactivity/src/ref.ts
  60. +144 −0 packages/runtime-core/__tests__/apiExpose.spec.ts
  61. +13 −13 packages/runtime-core/__tests__/hmr.spec.ts
  62. +3 −3 packages/runtime-core/package.json
  63. +57 −0 packages/runtime-core/src/apiSetupHelpers.ts
  64. +32 −4 packages/runtime-core/src/component.ts
  65. +30 −3 packages/runtime-core/src/componentOptions.ts
  66. +1 −1 packages/runtime-core/src/componentRenderUtils.ts
  67. +44 −24 packages/runtime-core/src/hmr.ts
  68. +1 −0 packages/runtime-core/src/index.ts
  69. +2 −2 packages/runtime-core/src/renderer.ts
  70. +3 −5 packages/runtime-core/src/scheduler.ts
  71. +18 −29 packages/runtime-dom/__tests__/helpers/useCssVars.spec.ts
  72. +3 −3 packages/runtime-dom/package.json
  73. +2 −2 packages/runtime-dom/src/components/TransitionGroup.ts
  74. +13 −21 packages/runtime-dom/src/helpers/useCssVars.ts
  75. +3 −3 packages/runtime-test/package.json
  76. +0 −27 packages/server-renderer/__tests__/ssrResolveCssVars.spec.ts
  77. +4 −4 packages/server-renderer/package.json
  78. +0 −11 packages/server-renderer/src/helpers/ssrResolveCssVars.ts
  79. +0 −1 packages/server-renderer/src/index.ts
  80. +9 −3 packages/server-renderer/src/render.ts
  81. +1 −1 packages/shared/package.json
  82. +1 −1 packages/size-check/package.json
  83. +1 −1 packages/template-explorer/package.json
  84. +2 −1 packages/template-explorer/src/index.ts
  85. +22 −3 packages/template-explorer/src/options.ts
  86. +4 −4 packages/vue/package.json
  87. +6 −4 packages/vue/src/dev.ts
  88. +1 −1 rollup.config.js
  89. +1 −1 scripts/release.js
  90. +18 −1 test-dts/ref.test-d.ts
  91. +89 −0 test-dts/setupHelpers.test-d.ts
  92. +5 −1 test-dts/tsconfig.build.json
  93. +1 −1 test-dts/tsconfig.json
  94. +666 −640 yarn.lock
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
## [3.0.3](https://github.com/vuejs/vue-next/compare/v3.0.2...v3.0.3) (2020-11-25)


### Bug Fixes

* **compiler-core/compiler-sfc:** handle destructure assignment expressions ([4c6078c](https://github.com/vuejs/vue-next/commit/4c6078ce25226ab9e10ec4eba5c745058f670b3d))
* **compiler-sfc:** fix script setup ts helpers ([6e3abc8](https://github.com/vuejs/vue-next/commit/6e3abc86058f967bcf6fad94c62572989d4dbcbc))
* **hmr:** fix updates for imported but not yet rendered components ([9c23ddf](https://github.com/vuejs/vue-next/commit/9c23ddf9c593dcf6d20bc911ec95d9b674f23dc8))
* **runtime-core:** components with static props and slots should not be force updated ([51e43e0](https://github.com/vuejs/vue-next/commit/51e43e07998eeade153c42a9a9b3eda8fe885c88))
* **runtime-core:** ensure scheduler queue is always non-null ([#2567](https://github.com/vuejs/vue-next/issues/2567)) ([af95604](https://github.com/vuejs/vue-next/commit/af9560455d9719a4c5f0d6588d04bfb4c06c8654))
* **runtime-dom:** use correct import source ([f28ca55](https://github.com/vuejs/vue-next/commit/f28ca556925147bb109d5ba77c5dafaf17d57322))
* **style-vars:** apply css vars in post flush effect ([3a6b120](https://github.com/vuejs/vue-next/commit/3a6b1207fa39cb35eed5bae0b5fdcdb465926bca))
* handle case of ref declaration without initial value ([8485cd4](https://github.com/vuejs/vue-next/commit/8485cd48437bf47880a61b03c57090e8bfdf527b))
* **types:** ensure correct type for toRef and toRefs on existing refs ([8e20375](https://github.com/vuejs/vue-next/commit/8e2037537219219d5ab6456e8a29bd0235eac311))


### Features

* **compiler-sfc:** compileScript inline render function mode ([886ed76](https://github.com/vuejs/vue-next/commit/886ed7681dd203c07ff3b504538328f43e14d9b0))
* **compiler-sfc:** new script setup implementation ([556560f](https://github.com/vuejs/vue-next/commit/556560fae31d9e406cfae656089657b6332686c1))
* **compiler-sfc:** new SFC css varaible injection implementation ([41bb7fa](https://github.com/vuejs/vue-next/commit/41bb7fa330e78c4a354a2e67742bd13bee2f4293))
* **compiler-sfc:** support kebab-case components in `<script setup>` sfc template ([3f99e23](https://github.com/vuejs/vue-next/commit/3f99e239e03a8861c462d4ee91feb82066ab3e28))
* **runtime-core:** explicit expose API ([0e59770](https://github.com/vuejs/vue-next/commit/0e59770b9282992f6a5af4d8fef33dafb948fc8b))


### Reverts

* Revert "wip: allow scriptCompiled to be cached on sfc descriptor" ([9db4288](https://github.com/vuejs/vue-next/commit/9db42889e65a0e80cdbae5c19d76dab4f9fadb6d))



## [3.0.2](https://github.com/vuejs/vue-next/compare/v3.0.1...v3.0.2) (2020-10-20)


3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "3.0.2",
"version": "3.0.3",
"workspaces": [
"packages/*"
],
@@ -49,6 +49,7 @@
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.2.1",
"@types/hash-sum": "^1.0.0",
"@types/jest": "^26.0.0",
"@types/node": "^14.10.1",
"@types/puppeteer": "^2.0.0",
24 changes: 12 additions & 12 deletions packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -3322,8 +3322,8 @@ Object {
"children": Array [
Object {
"content": Object {
"constType": 0,
"content": "a < b",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -6084,8 +6084,8 @@ Object {
"children": Array [
Object {
"content": Object {
"constType": 0,
"content": "'</div>'",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -6259,8 +6259,8 @@ Object {
"props": Array [
Object {
"arg": Object {
"constType": 0,
"content": "se",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -6593,8 +6593,8 @@ Object {
"children": Array [
Object {
"content": Object {
"constType": 0,
"content": "",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -6758,8 +6758,8 @@ Object {
"props": Array [
Object {
"arg": Object {
"constType": 3,
"content": "class",
"isConstant": true,
"isStatic": true,
"loc": Object {
"end": Object {
@@ -6777,8 +6777,8 @@ Object {
"type": 4,
},
"exp": Object {
"constType": 0,
"content": "{ some: condition }",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -6838,8 +6838,8 @@ Object {
"props": Array [
Object {
"arg": Object {
"constType": 3,
"content": "style",
"isConstant": true,
"isStatic": true,
"loc": Object {
"end": Object {
@@ -6857,8 +6857,8 @@ Object {
"type": 4,
},
"exp": Object {
"constType": 0,
"content": "{ color: 'red' }",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -6950,8 +6950,8 @@ Object {
"props": Array [
Object {
"arg": Object {
"constType": 3,
"content": "style",
"isConstant": true,
"isStatic": true,
"loc": Object {
"end": Object {
@@ -6969,8 +6969,8 @@ Object {
"type": 4,
},
"exp": Object {
"constType": 0,
"content": "{ color: 'red' }",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
@@ -7049,8 +7049,8 @@ Object {
"props": Array [
Object {
"arg": Object {
"constType": 3,
"content": "class",
"isConstant": true,
"isStatic": true,
"loc": Object {
"end": Object {
@@ -7068,8 +7068,8 @@ Object {
"type": 4,
},
"exp": Object {
"constType": 0,
"content": "{ some: condition }",
"isConstant": false,
"isStatic": false,
"loc": Object {
"end": Object {
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ const _hoisted_1 = /*#__PURE__*/_createVNode(\\"div\\", null, \\"hello\\", -1 /*
const _hoisted_2 = /*#__PURE__*/_createVNode(\\"div\\", null, \\"world\\", -1 /* HOISTED */)
_popScopeId()
export const render = /*#__PURE__*/_withId(function render(_ctx, _cache) {
export const render = /*#__PURE__*/_withId((_ctx, _cache) => {
return (_openBlock(), _createBlock(\\"div\\", null, [
_hoisted_1,
_createTextVNode(_toDisplayString(_ctx.foo), 1 /* TEXT */),
@@ -22,7 +22,7 @@ exports[`scopeId compiler support should wrap default slot 1`] = `
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
const _withId = /*#__PURE__*/_withScopeId(\\"test\\")
export const render = /*#__PURE__*/_withId(function render(_ctx, _cache) {
export const render = /*#__PURE__*/_withId((_ctx, _cache) => {
const _component_Child = _resolveComponent(\\"Child\\")
return (_openBlock(), _createBlock(_component_Child, null, {
@@ -38,7 +38,7 @@ exports[`scopeId compiler support should wrap dynamic slots 1`] = `
"import { createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
const _withId = /*#__PURE__*/_withScopeId(\\"test\\")
export const render = /*#__PURE__*/_withId(function render(_ctx, _cache) {
export const render = /*#__PURE__*/_withId((_ctx, _cache) => {
const _component_Child = _resolveComponent(\\"Child\\")
return (_openBlock(), _createBlock(_component_Child, null, _createSlots({ _: 2 }, [
@@ -66,7 +66,7 @@ exports[`scopeId compiler support should wrap named slots 1`] = `
"import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
const _withId = /*#__PURE__*/_withScopeId(\\"test\\")
export const render = /*#__PURE__*/_withId(function render(_ctx, _cache) {
export const render = /*#__PURE__*/_withId((_ctx, _cache) => {
const _component_Child = _resolveComponent(\\"Child\\")
return (_openBlock(), _createBlock(_component_Child, null, {
@@ -85,7 +85,7 @@ exports[`scopeId compiler support should wrap render function 1`] = `
"import { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, withScopeId as _withScopeId } from \\"vue\\"
const _withId = /*#__PURE__*/_withScopeId(\\"test\\")
export const render = /*#__PURE__*/_withId(function render(_ctx, _cache) {
export const render = /*#__PURE__*/_withId((_ctx, _cache) => {
return (_openBlock(), _createBlock(\\"div\\"))
})"
`;
10 changes: 8 additions & 2 deletions packages/compiler-core/__tests__/codegen.spec.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,8 @@ import {
IfConditionalExpression,
createVNodeCall,
VNodeCall,
DirectiveArguments
DirectiveArguments,
ConstantTypes
} from '../src'
import {
CREATE_VNODE,
@@ -304,7 +305,12 @@ describe('compiler: codegen', () => {
codegenNode: {
type: NodeTypes.FOR,
loc: locStub,
source: createSimpleExpression('1 + 2', false, locStub, true),
source: createSimpleExpression(
'1 + 2',
false,
locStub,
ConstantTypes.CAN_STRINGIFY
),
valueAlias: undefined,
keyAlias: undefined,
objectIndexAlias: undefined,
Loading