diff --git a/CHANGELOG.md b/CHANGELOG.md index 087b97bb0f8..7c9bfe19156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [2.7.16-beta.2](https://github.com/vuejs/vue/compare/v2.7.16-beta.1...v2.7.16-beta.2) (2023-12-14) + + +### Bug Fixes + +* account for nested render calls ([db9c566](https://github.com/vuejs/vue/commit/db9c566032da0ec5cd758a3e8525e9733874c1e5)), closes [#13131](https://github.com/vuejs/vue/issues/13131) +* **types:** export more types for v3 alignment (jsx / component options) ([895669f](https://github.com/vuejs/vue/commit/895669ffa01f8075a326308caa8ad6a5f69a1919)), closes [#13078](https://github.com/vuejs/vue/issues/13078) [#13128](https://github.com/vuejs/vue/issues/13128) + + + ## [2.7.16-beta.1](https://github.com/vuejs/vue/compare/v2.7.15...v2.7.16-beta.1) (2023-12-08) diff --git a/package.json b/package.json index 89bb6ff4d9d..36d9f78851e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "2.7.16-beta.1", + "version": "2.7.16-beta.2", "packageManager": "pnpm@8.9.2", "description": "Reactive, component-oriented view layer for modern web interfaces.", "main": "dist/vue.runtime.common.js", @@ -130,7 +130,7 @@ "ts-node": "^10.8.1", "tslib": "^2.4.0", "typescript": "^4.8.4", - "vitest": "^1.0.0", + "vitest": "^1.0.4", "yorkie": "^2.0.0" } } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 87f602bdc36..cd7e1f9ddac 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "2.7.16-beta.1", + "version": "2.7.16-beta.2", "description": "compiler-sfc for Vue 2", "main": "dist/compiler-sfc.js", "types": "dist/compiler-sfc.d.ts", diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 7c7b77ee5c4..79953eb58d5 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "vue-server-renderer", - "version": "2.7.16-beta.1", + "version": "2.7.16-beta.2", "description": "server renderer for Vue 2.0", "main": "index.js", "types": "types/index.d.ts", diff --git a/packages/template-compiler/package.json b/packages/template-compiler/package.json index 740ab94840a..2584121e784 100644 --- a/packages/template-compiler/package.json +++ b/packages/template-compiler/package.json @@ -1,6 +1,6 @@ { "name": "vue-template-compiler", - "version": "2.7.16-beta.1", + "version": "2.7.16-beta.2", "description": "template compiler for Vue 2.0", "main": "index.js", "unpkg": "browser.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76a58a577b2..5a9fd448a56 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -133,8 +133,8 @@ importers: specifier: ^4.8.4 version: 4.9.5 vitest: - specifier: ^1.0.0 - version: 1.0.1(@types/node@20.10.3)(jsdom@19.0.0)(terser@5.25.0) + specifier: ^1.0.4 + version: 1.0.4(@types/node@20.10.3)(jsdom@19.0.0)(terser@5.25.0) yorkie: specifier: ^2.0.0 version: 2.0.0 @@ -939,38 +939,38 @@ packages: dev: true optional: true - /@vitest/expect@1.0.1: - resolution: {integrity: sha512-3cdrb/eKD/0tygDX75YscuHEHMUJ70u3UoLSq2eqhWks57AyzvsDQbyn53IhZ0tBN7gA8Jj2VhXiOV2lef7thw==} + /@vitest/expect@1.0.4: + resolution: {integrity: sha512-/NRN9N88qjg3dkhmFcCBwhn/Ie4h064pY3iv7WLRsDJW7dXnEgeoa8W9zy7gIPluhz6CkgqiB3HmpIXgmEY5dQ==} dependencies: - '@vitest/spy': 1.0.1 - '@vitest/utils': 1.0.1 + '@vitest/spy': 1.0.4 + '@vitest/utils': 1.0.4 chai: 4.3.10 dev: true - /@vitest/runner@1.0.1: - resolution: {integrity: sha512-/+z0vhJ0MfRPT3AyTvAK6m57rzlew/ct8B2a4LMv7NhpPaiI2QLGyOBMB3lcioWdJHjRuLi9aYppfOv0B5aRQA==} + /@vitest/runner@1.0.4: + resolution: {integrity: sha512-rhOQ9FZTEkV41JWXozFM8YgOqaG9zA7QXbhg5gy6mFOVqh4PcupirIJ+wN7QjeJt8S8nJRYuZH1OjJjsbxAXTQ==} dependencies: - '@vitest/utils': 1.0.1 + '@vitest/utils': 1.0.4 p-limit: 5.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@1.0.1: - resolution: {integrity: sha512-wIPtPDGSxEZ+DpNMc94AsybX6LV6uN6sosf5TojyP1m2QbKwiRuLV/5RSsjt1oWViHsTj8mlcwrQQ1zHGO0fMw==} + /@vitest/snapshot@1.0.4: + resolution: {integrity: sha512-vkfXUrNyNRA/Gzsp2lpyJxh94vU2OHT1amoD6WuvUAA12n32xeVZQ0KjjQIf8F6u7bcq2A2k969fMVxEsxeKYA==} dependencies: magic-string: 0.30.5 pathe: 1.1.1 pretty-format: 29.7.0 dev: true - /@vitest/spy@1.0.1: - resolution: {integrity: sha512-yXwm1uKhBVr/5MhVeSmtNqK+0q2RXIchJt8kokEKdrWLtkPeDgdbZ6SjR1VQGZuNdWL6sSBnLayIyVvcS0qLfA==} + /@vitest/spy@1.0.4: + resolution: {integrity: sha512-9ojTFRL1AJVh0hvfzAQpm0QS6xIS+1HFIw94kl/1ucTfGCaj1LV/iuJU4Y6cdR03EzPDygxTHwE1JOm+5RCcvA==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/utils@1.0.1: - resolution: {integrity: sha512-MGPCHkzXbbAyscrhwGzh8uP1HPrTYLWaj1WTDtWSGrpe2yJWLRN9mF9ooKawr6NMOg9vTBtg2JqWLfuLC7Dknw==} + /@vitest/utils@1.0.4: + resolution: {integrity: sha512-gsswWDXxtt0QvtK/y/LWukN7sGMYmnCcv1qv05CsY6cU/Y1zpGX1QuvLs+GO1inczpE6Owixeel3ShkjhYtGfA==} dependencies: diff-sequences: 29.6.3 loupe: 2.3.7 @@ -6548,8 +6548,8 @@ packages: engines: {node: '>= 0.8'} dev: true - /vite-node@1.0.1(@types/node@20.10.3)(terser@5.25.0): - resolution: {integrity: sha512-Y2Jnz4cr2azsOMMYuVPrQkp3KMnS/0WV8ezZjCy4hU7O5mUHCAVOnFmoEvs1nvix/4mYm74Len8bYRWZJMNP6g==} + /vite-node@1.0.4(@types/node@20.10.3)(terser@5.25.0): + resolution: {integrity: sha512-9xQQtHdsz5Qn8hqbV7UKqkm8YkJhzT/zr41Dmt5N7AlD8hJXw/Z7y0QiD5I8lnTthV9Rvcvi0QW7PI0Fq83ZPg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: @@ -6606,8 +6606,8 @@ packages: fsevents: 2.3.3 dev: true - /vitest@1.0.1(@types/node@20.10.3)(jsdom@19.0.0)(terser@5.25.0): - resolution: {integrity: sha512-MHsOj079S28hDsvdDvyD1pRj4dcS51EC5Vbe0xvOYX+WryP8soiK2dm8oULi+oA/8Xa/h6GoJEMTmcmBy5YM+Q==} + /vitest@1.0.4(@types/node@20.10.3)(jsdom@19.0.0)(terser@5.25.0): + resolution: {integrity: sha512-s1GQHp/UOeWEo4+aXDOeFBJwFzL6mjycbQwwKWX2QcYfh/7tIerS59hWQ20mxzupTJluA2SdwiBuWwQHH67ckg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -6632,11 +6632,11 @@ packages: optional: true dependencies: '@types/node': 20.10.3 - '@vitest/expect': 1.0.1 - '@vitest/runner': 1.0.1 - '@vitest/snapshot': 1.0.1 - '@vitest/spy': 1.0.1 - '@vitest/utils': 1.0.1 + '@vitest/expect': 1.0.4 + '@vitest/runner': 1.0.4 + '@vitest/snapshot': 1.0.4 + '@vitest/spy': 1.0.4 + '@vitest/utils': 1.0.4 acorn-walk: 8.3.1 cac: 6.7.14 chai: 4.3.10 @@ -6652,7 +6652,7 @@ packages: tinybench: 2.5.1 tinypool: 0.8.1 vite: 5.0.5(@types/node@20.10.3)(terser@5.25.0) - vite-node: 1.0.1(@types/node@20.10.3)(terser@5.25.0) + vite-node: 1.0.4(@types/node@20.10.3)(terser@5.25.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/core/instance/render.ts b/src/core/instance/render.ts index b71125b275d..6553f217480 100644 --- a/src/core/instance/render.ts +++ b/src/core/instance/render.ts @@ -15,7 +15,7 @@ import VNode, { createEmptyVNode } from '../vdom/vnode' import { isUpdatingChildComponent } from './lifecycle' import type { Component } from 'types/component' -import { setCurrentInstance } from 'v3/currentInstance' +import { currentInstance, setCurrentInstance } from 'v3/currentInstance' import { syncSetupSlots } from 'v3/apiSetup' export function initRender(vm: Component) { @@ -120,11 +120,10 @@ export function renderMixin(Vue: typeof Component) { // to the data on the placeholder node. vm.$vnode = _parentVnode! // render self + const prevInst = currentInstance + const prevRenderInst = currentRenderingInstance let vnode try { - // There's no need to maintain a stack because all render fns are called - // separately from one another. Nested component's render fns are called - // when parent component is patched. setCurrentInstance(vm) currentRenderingInstance = vm vnode = render.call(vm._renderProxy, vm.$createElement) @@ -148,8 +147,8 @@ export function renderMixin(Vue: typeof Component) { vnode = vm._vnode } } finally { - currentRenderingInstance = null - setCurrentInstance() + currentRenderingInstance = prevRenderInst + setCurrentInstance(prevInst) } // if the returned array contains only a single node, allow it if (isArray(vnode) && vnode.length === 1) { diff --git a/types/index.d.ts b/types/index.d.ts index f06228babf5..779ff922a56 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,6 +1,7 @@ import { Vue } from './vue' import './umd' import './jsx' +export * from './jsx' export default Vue @@ -49,7 +50,12 @@ export { ComputedOptions as ComponentComputedOptions, MethodOptions as ComponentMethodOptions, ComponentPropsOptions, - ComponentCustomOptions + ComponentCustomOptions, + ComponentOptionsMixin, + ComponentOptionsWithoutProps, + ComponentOptionsWithArrayProps, + ComponentOptionsWithProps, + ComponentOptionsBase } from './v3-component-options' export { ComponentInstance,