Comparing version 3.3.9 to 3.3.10
if (typeof require !== 'undefined') { | ||
try { | ||
require('@vue/compiler-sfc').registerTS(() => require('typescript')) | ||
} catch (e) {} | ||
require('@vue/compiler-sfc').registerTS(() => require('typescript')) | ||
} |
@@ -22,3 +22,11 @@ 'use strict'; | ||
const compileCache = /* @__PURE__ */ Object.create(null); | ||
const compileCache = /* @__PURE__ */ new WeakMap(); | ||
function getCache(options) { | ||
let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ); | ||
if (!c) { | ||
c = /* @__PURE__ */ Object.create(null); | ||
compileCache.set(options != null ? options : shared.EMPTY_OBJ, c); | ||
} | ||
return c; | ||
} | ||
function compileToFunction(template, options) { | ||
@@ -34,3 +42,4 @@ if (!shared.isString(template)) { | ||
const key = template; | ||
const cached = compileCache[key]; | ||
const cache = getCache(options); | ||
const cached = cache[key]; | ||
if (cached) { | ||
@@ -70,3 +79,3 @@ return cached; | ||
render._rc = true; | ||
return compileCache[key] = render; | ||
return cache[key] = render; | ||
} | ||
@@ -73,0 +82,0 @@ runtimeDom.registerRuntimeCompiler(compileToFunction); |
@@ -22,3 +22,11 @@ 'use strict'; | ||
const compileCache = /* @__PURE__ */ Object.create(null); | ||
const compileCache = /* @__PURE__ */ new WeakMap(); | ||
function getCache(options) { | ||
let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ); | ||
if (!c) { | ||
c = /* @__PURE__ */ Object.create(null); | ||
compileCache.set(options != null ? options : shared.EMPTY_OBJ, c); | ||
} | ||
return c; | ||
} | ||
function compileToFunction(template, options) { | ||
@@ -33,3 +41,4 @@ if (!shared.isString(template)) { | ||
const key = template; | ||
const cached = compileCache[key]; | ||
const cache = getCache(options); | ||
const cached = cache[key]; | ||
if (cached) { | ||
@@ -56,3 +65,3 @@ return cached; | ||
render._rc = true; | ||
return compileCache[key] = render; | ||
return cache[key] = render; | ||
} | ||
@@ -59,0 +68,0 @@ runtimeDom.registerRuntimeCompiler(compileToFunction); |
@@ -5,3 +5,3 @@ import * as runtimeDom from '@vue/runtime-dom'; | ||
import { compile } from '@vue/compiler-dom'; | ||
import { isString, NOOP, extend, generateCodeFrame } from '@vue/shared'; | ||
import { isString, NOOP, extend, generateCodeFrame, EMPTY_OBJ } from '@vue/shared'; | ||
@@ -17,3 +17,11 @@ function initDev() { | ||
} | ||
const compileCache = /* @__PURE__ */ Object.create(null); | ||
const compileCache = /* @__PURE__ */ new WeakMap(); | ||
function getCache(options) { | ||
let c = compileCache.get(options != null ? options : EMPTY_OBJ); | ||
if (!c) { | ||
c = /* @__PURE__ */ Object.create(null); | ||
compileCache.set(options != null ? options : EMPTY_OBJ, c); | ||
} | ||
return c; | ||
} | ||
function compileToFunction(template, options) { | ||
@@ -29,3 +37,4 @@ if (!isString(template)) { | ||
const key = template; | ||
const cached = compileCache[key]; | ||
const cache = getCache(options); | ||
const cached = cache[key]; | ||
if (cached) { | ||
@@ -65,3 +74,3 @@ return cached; | ||
render._rc = true; | ||
return compileCache[key] = render; | ||
return cache[key] = render; | ||
} | ||
@@ -68,0 +77,0 @@ registerRuntimeCompiler(compileToFunction); |
{ | ||
"name": "vue", | ||
"version": "3.3.9", | ||
"version": "3.3.10", | ||
"description": "The progressive JavaScript framework for building modern web UI.", | ||
@@ -99,7 +99,7 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.3.9", | ||
"@vue/runtime-dom": "3.3.9", | ||
"@vue/compiler-dom": "3.3.9", | ||
"@vue/compiler-sfc": "3.3.9", | ||
"@vue/server-renderer": "3.3.9" | ||
"@vue/shared": "3.3.10", | ||
"@vue/server-renderer": "3.3.10", | ||
"@vue/compiler-sfc": "3.3.10", | ||
"@vue/runtime-dom": "3.3.10", | ||
"@vue/compiler-dom": "3.3.10" | ||
}, | ||
@@ -106,0 +106,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2036929
54177
+ Added@vue/compiler-core@3.3.10(transitive)
+ Added@vue/compiler-dom@3.3.10(transitive)
+ Added@vue/compiler-sfc@3.3.10(transitive)
+ Added@vue/compiler-ssr@3.3.10(transitive)
+ Added@vue/reactivity@3.3.10(transitive)
+ Added@vue/reactivity-transform@3.3.10(transitive)
+ Added@vue/runtime-core@3.3.10(transitive)
+ Added@vue/runtime-dom@3.3.10(transitive)
+ Added@vue/server-renderer@3.3.10(transitive)
+ Added@vue/shared@3.3.10(transitive)
+ Addedpostcss@8.4.49(transitive)
- Removed@vue/compiler-core@3.3.9(transitive)
- Removed@vue/compiler-dom@3.3.9(transitive)
- Removed@vue/compiler-sfc@3.3.9(transitive)
- Removed@vue/compiler-ssr@3.3.9(transitive)
- Removed@vue/reactivity@3.3.9(transitive)
- Removed@vue/reactivity-transform@3.3.9(transitive)
- Removed@vue/runtime-core@3.3.9(transitive)
- Removed@vue/runtime-dom@3.3.9(transitive)
- Removed@vue/server-renderer@3.3.9(transitive)
- Removed@vue/shared@3.3.9(transitive)
- Removedpostcss@8.4.47(transitive)
Updated@vue/compiler-dom@3.3.10
Updated@vue/compiler-sfc@3.3.10
Updated@vue/runtime-dom@3.3.10
Updated@vue/server-renderer@3.3.10
Updated@vue/shared@3.3.10