From: Evan You Date: Fri, 16 Jul 2021 16:24:30 +0000 (-0400) Subject: chore: fix codegen error due to scopeId deprecation change X-Git-Tag: v3.2.0-beta.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=317654b34fa4b7dcbc9c99c95024d03b5ab39353;p=thirdparty%2Fvuejs%2Fcore.git chore: fix codegen error due to scopeId deprecation change --- diff --git a/packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap index c8df4217c3..5372c5dbd8 100644 --- a/packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/scopeId.spec.ts.snap @@ -14,7 +14,7 @@ export function render(_ctx, _cache) { _createTextVNode(_toDisplayString(_ctx.foo), 1 /* TEXT */), _hoisted_2 ])) -})" +}" `; exports[`scopeId compiler support should wrap default slot 1`] = ` @@ -29,7 +29,7 @@ export function render(_ctx, _cache) { ]), _: 1 /* STABLE */ })) -})" +}" `; exports[`scopeId compiler support should wrap dynamic slots 1`] = ` @@ -56,7 +56,7 @@ export function render(_ctx, _cache) { } }) ]), 1024 /* DYNAMIC_SLOTS */)) -})" +}" `; exports[`scopeId compiler support should wrap named slots 1`] = ` @@ -74,5 +74,5 @@ export function render(_ctx, _cache) { ]), _: 1 /* STABLE */ })) -})" +}" `; diff --git a/packages/compiler-core/src/codegen.ts b/packages/compiler-core/src/codegen.ts index 28d30ddbf3..f37e729514 100644 --- a/packages/compiler-core/src/codegen.ts +++ b/packages/compiler-core/src/codegen.ts @@ -304,10 +304,6 @@ export function generate( deindent() push(`}`) - if (genScopeId && !isSetupInlined) { - push(`)`) - } - return { ast, code: context.code, diff --git a/packages/compiler-ssr/__tests__/ssrScopeId.spec.ts b/packages/compiler-ssr/__tests__/ssrScopeId.spec.ts index cc1ade3594..09ff183ef8 100644 --- a/packages/compiler-ssr/__tests__/ssrScopeId.spec.ts +++ b/packages/compiler-ssr/__tests__/ssrScopeId.spec.ts @@ -15,7 +15,7 @@ describe('ssr: scopeId', () => { export function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`hello\`) - })" + }" `) }) @@ -45,7 +45,7 @@ describe('ssr: scopeId', () => { }), _: 1 /* STABLE */ }, _parent)) - })" + }" `) }) @@ -74,7 +74,7 @@ describe('ssr: scopeId', () => { }), _: 1 /* STABLE */ }, _parent)) - })" + }" `) }) @@ -122,7 +122,7 @@ describe('ssr: scopeId', () => { }), _: 1 /* STABLE */ }, _parent)) - })" + }" `) }) })