@vue/reactivity
Advanced tools
Comparing version 3.3.3 to 3.3.4
@@ -42,3 +42,3 @@ import { extend, isArray, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared'; | ||
} | ||
} else if (process.env.NODE_ENV !== "production") { | ||
} else if (!!(process.env.NODE_ENV !== "production")) { | ||
warn(`cannot run an inactive effect scope.`); | ||
@@ -101,3 +101,3 @@ } | ||
activeEffectScope.cleanups.push(fn); | ||
} else if (process.env.NODE_ENV !== "production") { | ||
} else if (!!(process.env.NODE_ENV !== "production")) { | ||
warn( | ||
@@ -147,4 +147,4 @@ `onScopeDispose() is called when there is no active effect scope to be associated with.` | ||
let activeEffect; | ||
const ITERATE_KEY = Symbol(process.env.NODE_ENV !== "production" ? "iterate" : ""); | ||
const MAP_KEY_ITERATE_KEY = Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : ""); | ||
const ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? "iterate" : ""); | ||
const MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? "Map key iterate" : ""); | ||
class ReactiveEffect { | ||
@@ -260,3 +260,3 @@ constructor(fn, scheduler = null, scope) { | ||
} | ||
const eventInfo = process.env.NODE_ENV !== "production" ? { effect: activeEffect, target, type, key } : void 0; | ||
const eventInfo = !!(process.env.NODE_ENV !== "production") ? { effect: activeEffect, target, type, key } : void 0; | ||
trackEffects(dep, eventInfo); | ||
@@ -278,3 +278,3 @@ } | ||
activeEffect.deps.push(dep); | ||
if (process.env.NODE_ENV !== "production" && activeEffect.onTrack) { | ||
if (!!(process.env.NODE_ENV !== "production") && activeEffect.onTrack) { | ||
activeEffect.onTrack( | ||
@@ -336,6 +336,6 @@ extend( | ||
} | ||
const eventInfo = process.env.NODE_ENV !== "production" ? { target, type, key, newValue, oldValue, oldTarget } : void 0; | ||
const eventInfo = !!(process.env.NODE_ENV !== "production") ? { target, type, key, newValue, oldValue, oldTarget } : void 0; | ||
if (deps.length === 1) { | ||
if (deps[0]) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
triggerEffects(deps[0], eventInfo); | ||
@@ -353,3 +353,3 @@ } else { | ||
} | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
triggerEffects(createDep(effects), eventInfo); | ||
@@ -376,3 +376,3 @@ } else { | ||
if (effect2 !== activeEffect || effect2.allowRecurse) { | ||
if (process.env.NODE_ENV !== "production" && effect2.onTrigger) { | ||
if (!!(process.env.NODE_ENV !== "production") && effect2.onTrigger) { | ||
effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo)); | ||
@@ -531,3 +531,3 @@ } | ||
set(target, key) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
warn( | ||
@@ -541,3 +541,3 @@ `Set operation on key "${String(key)}" failed: target is readonly.`, | ||
deleteProperty(target, key) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
warn( | ||
@@ -625,3 +625,3 @@ `Delete operation on key "${String(key)}" failed: target is readonly.`, | ||
hadKey = has2.call(target, key); | ||
} else if (process.env.NODE_ENV !== "production") { | ||
} else if (!!(process.env.NODE_ENV !== "production")) { | ||
checkIdentityKeys(target, has2, key); | ||
@@ -645,3 +645,3 @@ } | ||
hadKey = has2.call(target, key); | ||
} else if (process.env.NODE_ENV !== "production") { | ||
} else if (!!(process.env.NODE_ENV !== "production")) { | ||
checkIdentityKeys(target, has2, key); | ||
@@ -659,3 +659,3 @@ } | ||
const hadItems = target.size !== 0; | ||
const oldTarget = process.env.NODE_ENV !== "production" ? isMap(target) ? new Map(target) : new Set(target) : void 0; | ||
const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0; | ||
const result = target.clear(); | ||
@@ -711,3 +711,3 @@ if (hadItems) { | ||
return function(...args) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
const key = args[0] ? `on key "${args[0]}" ` : ``; | ||
@@ -920,3 +920,3 @@ console.warn( | ||
if (!isObject(target)) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
console.warn(`value cannot be made reactive: ${String(target)}`); | ||
@@ -973,3 +973,3 @@ } | ||
ref2 = toRaw(ref2); | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
trackEffects(ref2.dep || (ref2.dep = createDep()), { | ||
@@ -989,3 +989,3 @@ target: ref2, | ||
if (dep) { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (!!(process.env.NODE_ENV !== "production")) { | ||
triggerEffects(dep, { | ||
@@ -1040,3 +1040,3 @@ target: ref2, | ||
function triggerRef(ref2) { | ||
triggerRefValue(ref2, process.env.NODE_ENV !== "production" ? ref2.value : void 0); | ||
triggerRefValue(ref2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0); | ||
} | ||
@@ -1086,3 +1086,3 @@ function unref(ref2) { | ||
function toRefs(object) { | ||
if (process.env.NODE_ENV !== "production" && !isProxy(object)) { | ||
if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) { | ||
console.warn(`toRefs() expects a reactive object but received a plain one.`); | ||
@@ -1180,3 +1180,3 @@ } | ||
getter = getterOrOptions; | ||
setter = process.env.NODE_ENV !== "production" ? () => { | ||
setter = !!(process.env.NODE_ENV !== "production") ? () => { | ||
console.warn("Write operation failed: computed value is readonly"); | ||
@@ -1189,3 +1189,3 @@ } : NOOP; | ||
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); | ||
if (process.env.NODE_ENV !== "production" && debugOptions && !isSSR) { | ||
if (!!(process.env.NODE_ENV !== "production") && debugOptions && !isSSR) { | ||
cRef.effect.onTrack = debugOptions.onTrack; | ||
@@ -1192,0 +1192,0 @@ cRef.effect.onTrigger = debugOptions.onTrigger; |
{ | ||
"name": "@vue/reactivity", | ||
"version": "3.3.3", | ||
"version": "3.3.4", | ||
"description": "@vue/reactivity", | ||
@@ -39,4 +39,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.3.3" | ||
"@vue/shared": "3.3.4" | ||
} | ||
} |
222466
+ Added@vue/shared@3.3.4(transitive)
- Removed@vue/shared@3.3.3(transitive)
Updated@vue/shared@3.3.4