@vercel/nft
Advanced tools
Comparing version 0.27.9 to 0.27.10
@@ -460,4 +460,4 @@ "use strict"; | ||
else { | ||
if ('then' in computed && typeof computed.then === 'string') | ||
add(computed.then); | ||
if ('ifTrue' in computed && typeof computed.ifTrue === 'string') | ||
add(computed.ifTrue); | ||
if ('else' in computed && typeof computed.else === 'string') | ||
@@ -489,4 +489,4 @@ add(computed.else); | ||
typeof curStaticValue.value !== 'symbol') || | ||
('then' in curStaticValue && | ||
typeof curStaticValue.then !== 'symbol' && | ||
('ifTrue' in curStaticValue && | ||
typeof curStaticValue.ifTrue !== 'symbol' && | ||
typeof curStaticValue.else !== 'symbol')) { | ||
@@ -819,3 +819,3 @@ staticChildValue = curStaticValue; | ||
if (!('value' in computed) && | ||
isAbsolutePathOrUrl(computed.then) && | ||
isAbsolutePathOrUrl(computed.ifTrue) && | ||
isAbsolutePathOrUrl(computed.else)) { | ||
@@ -1021,9 +1021,9 @@ staticChildValue = computed; | ||
} | ||
else if ('then' in staticChildValue && | ||
else if ('ifTrue' in staticChildValue && | ||
'else' in staticChildValue && | ||
isAbsolutePathOrUrl(staticChildValue.then) && | ||
isAbsolutePathOrUrl(staticChildValue.ifTrue) && | ||
isAbsolutePathOrUrl(staticChildValue.else)) { | ||
let resolvedThen; | ||
try { | ||
resolvedThen = resolveAbsolutePathOrUrl(staticChildValue.then); | ||
resolvedThen = resolveAbsolutePathOrUrl(staticChildValue.ifTrue); | ||
} | ||
@@ -1030,0 +1030,0 @@ catch (e) { } |
@@ -13,3 +13,3 @@ "use strict"; | ||
// 1. Single known value: { value: value } | ||
// 2. Conditional value: { test, then, else } | ||
// 2. Conditional value: { test, ifTrue, else } | ||
// 3. Unknown value: undefined | ||
@@ -107,37 +107,37 @@ function walk(node) { | ||
if (op === '==') | ||
return { test: l.test, then: l.then == v, else: l.else == v }; | ||
return { test: l.test, ifTrue: l.ifTrue == v, else: l.else == v }; | ||
if (op === '===') | ||
return { test: l.test, then: l.then === v, else: l.else === v }; | ||
return { test: l.test, ifTrue: l.ifTrue === v, else: l.else === v }; | ||
if (op === '!=') | ||
return { test: l.test, then: l.then != v, else: l.else != v }; | ||
return { test: l.test, ifTrue: l.ifTrue != v, else: l.else != v }; | ||
if (op === '!==') | ||
return { test: l.test, then: l.then !== v, else: l.else !== v }; | ||
return { test: l.test, ifTrue: l.ifTrue !== v, else: l.else !== v }; | ||
if (op === '+') | ||
return { test: l.test, then: l.then + v, else: l.else + v }; | ||
return { test: l.test, ifTrue: l.ifTrue + v, else: l.else + v }; | ||
if (op === '-') | ||
return { test: l.test, then: l.then - v, else: l.else - v }; | ||
return { test: l.test, ifTrue: l.ifTrue - v, else: l.else - v }; | ||
if (op === '*') | ||
return { test: l.test, then: l.then * v, else: l.else * v }; | ||
return { test: l.test, ifTrue: l.ifTrue * v, else: l.else * v }; | ||
if (op === '/') | ||
return { test: l.test, then: l.then / v, else: l.else / v }; | ||
return { test: l.test, ifTrue: l.ifTrue / v, else: l.else / v }; | ||
if (op === '%') | ||
return { test: l.test, then: l.then % v, else: l.else % v }; | ||
return { test: l.test, ifTrue: l.ifTrue % v, else: l.else % v }; | ||
if (op === '<') | ||
return { test: l.test, then: l.then < v, else: l.else < v }; | ||
return { test: l.test, ifTrue: l.ifTrue < v, else: l.else < v }; | ||
if (op === '<=') | ||
return { test: l.test, then: l.then <= v, else: l.else <= v }; | ||
return { test: l.test, ifTrue: l.ifTrue <= v, else: l.else <= v }; | ||
if (op === '>') | ||
return { test: l.test, then: l.then > v, else: l.else > v }; | ||
return { test: l.test, ifTrue: l.ifTrue > v, else: l.else > v }; | ||
if (op === '>=') | ||
return { test: l.test, then: l.then >= v, else: l.else >= v }; | ||
return { test: l.test, ifTrue: l.ifTrue >= v, else: l.else >= v }; | ||
if (op === '|') | ||
return { test: l.test, then: l.then | v, else: l.else | v }; | ||
return { test: l.test, ifTrue: l.ifTrue | v, else: l.else | v }; | ||
if (op === '&') | ||
return { test: l.test, then: l.then & v, else: l.else & v }; | ||
return { test: l.test, ifTrue: l.ifTrue & v, else: l.else & v }; | ||
if (op === '^') | ||
return { test: l.test, then: l.then ^ v, else: l.else ^ v }; | ||
return { test: l.test, ifTrue: l.ifTrue ^ v, else: l.else ^ v }; | ||
if (op === '&&') | ||
return { test: l.test, then: l.then && v, else: l.else && v }; | ||
return { test: l.test, ifTrue: l.ifTrue && v, else: l.else && v }; | ||
if (op === '||') | ||
return { test: l.test, then: l.then || v, else: l.else || v }; | ||
return { test: l.test, ifTrue: l.ifTrue || v, else: l.else || v }; | ||
} | ||
@@ -147,37 +147,37 @@ else if ('test' in r && 'value' in l) { | ||
if (op === '==') | ||
return { test: r.test, then: v == r.then, else: v == r.else }; | ||
return { test: r.test, ifTrue: v == r.ifTrue, else: v == r.else }; | ||
if (op === '===') | ||
return { test: r.test, then: v === r.then, else: v === r.else }; | ||
return { test: r.test, ifTrue: v === r.ifTrue, else: v === r.else }; | ||
if (op === '!=') | ||
return { test: r.test, then: v != r.then, else: v != r.else }; | ||
return { test: r.test, ifTrue: v != r.ifTrue, else: v != r.else }; | ||
if (op === '!==') | ||
return { test: r.test, then: v !== r.then, else: v !== r.else }; | ||
return { test: r.test, ifTrue: v !== r.ifTrue, else: v !== r.else }; | ||
if (op === '+') | ||
return { test: r.test, then: v + r.then, else: v + r.else }; | ||
return { test: r.test, ifTrue: v + r.ifTrue, else: v + r.else }; | ||
if (op === '-') | ||
return { test: r.test, then: v - r.then, else: v - r.else }; | ||
return { test: r.test, ifTrue: v - r.ifTrue, else: v - r.else }; | ||
if (op === '*') | ||
return { test: r.test, then: v * r.then, else: v * r.else }; | ||
return { test: r.test, ifTrue: v * r.ifTrue, else: v * r.else }; | ||
if (op === '/') | ||
return { test: r.test, then: v / r.then, else: v / r.else }; | ||
return { test: r.test, ifTrue: v / r.ifTrue, else: v / r.else }; | ||
if (op === '%') | ||
return { test: r.test, then: v % r.then, else: v % r.else }; | ||
return { test: r.test, ifTrue: v % r.ifTrue, else: v % r.else }; | ||
if (op === '<') | ||
return { test: r.test, then: v < r.then, else: v < r.else }; | ||
return { test: r.test, ifTrue: v < r.ifTrue, else: v < r.else }; | ||
if (op === '<=') | ||
return { test: r.test, then: v <= r.then, else: v <= r.else }; | ||
return { test: r.test, ifTrue: v <= r.ifTrue, else: v <= r.else }; | ||
if (op === '>') | ||
return { test: r.test, then: v > r.then, else: v > r.else }; | ||
return { test: r.test, ifTrue: v > r.ifTrue, else: v > r.else }; | ||
if (op === '>=') | ||
return { test: r.test, then: v >= r.then, else: v >= r.else }; | ||
return { test: r.test, ifTrue: v >= r.ifTrue, else: v >= r.else }; | ||
if (op === '|') | ||
return { test: r.test, then: v | r.then, else: v | r.else }; | ||
return { test: r.test, ifTrue: v | r.ifTrue, else: v | r.else }; | ||
if (op === '&') | ||
return { test: r.test, then: v & r.then, else: v & r.else }; | ||
return { test: r.test, ifTrue: v & r.ifTrue, else: v & r.else }; | ||
if (op === '^') | ||
return { test: r.test, then: v ^ r.then, else: v ^ r.else }; | ||
return { test: r.test, ifTrue: v ^ r.ifTrue, else: v ^ r.else }; | ||
if (op === '&&') | ||
return { test: r.test, then: v && r.then, else: l && r.else }; | ||
return { test: r.test, ifTrue: v && r.ifTrue, else: l && r.else }; | ||
if (op === '||') | ||
return { test: r.test, then: v || r.then, else: l || r.else }; | ||
return { test: r.test, ifTrue: v || r.ifTrue, else: l || r.else }; | ||
} | ||
@@ -278,3 +278,3 @@ else if ('value' in l && 'value' in r) { | ||
argsElse = args.concat([]); | ||
args.push(x.then); | ||
args.push(x.ifTrue); | ||
argsElse.push(x.else); | ||
@@ -306,3 +306,3 @@ } | ||
return; | ||
return { test: predicate, then: result, else: resultElse }; | ||
return { test: predicate, ifTrue: result, else: resultElse }; | ||
} | ||
@@ -327,3 +327,3 @@ catch (e) { | ||
test: node.test, | ||
then: thenValue.value, | ||
ifTrue: thenValue.value, | ||
else: elseValue.value, | ||
@@ -447,3 +447,3 @@ }; | ||
test, | ||
then: new url_1.URL(arg.then, parent.value), | ||
ifTrue: new url_1.URL(arg.ifTrue, parent.value), | ||
else: new url_1.URL(arg.else, parent.value), | ||
@@ -459,3 +459,3 @@ }; | ||
test, | ||
then: new url_1.URL(arg.then), | ||
ifTrue: new url_1.URL(arg.ifTrue), | ||
else: new url_1.URL(arg.else), | ||
@@ -509,3 +509,3 @@ }; | ||
else { | ||
val.then += node.quasis[i].value.cooked; | ||
val.ifTrue += node.quasis[i].value.cooked; | ||
val.else += node.quasis[i].value.cooked; | ||
@@ -528,3 +528,3 @@ } | ||
return; | ||
val.then += exprValue.value; | ||
val.ifTrue += exprValue.value; | ||
val.else += exprValue.value; | ||
@@ -540,3 +540,3 @@ } | ||
test: exprValue.test, | ||
then: val.value + exprValue.then, | ||
ifTrue: val.value + exprValue.ifTrue, | ||
else: val.value + exprValue.else, | ||
@@ -554,3 +554,3 @@ }; | ||
else { | ||
val.then += node.quasis[i].value.cooked; | ||
val.ifTrue += node.quasis[i].value.cooked; | ||
val.else += node.quasis[i].value.cooked; | ||
@@ -581,9 +581,9 @@ } | ||
if (node.operator === '+') | ||
return { test: val.test, then: +val.then, else: +val.else }; | ||
return { test: val.test, ifTrue: +val.ifTrue, else: +val.else }; | ||
if (node.operator === '-') | ||
return { test: val.test, then: -val.then, else: -val.else }; | ||
return { test: val.test, ifTrue: -val.ifTrue, else: -val.else }; | ||
if (node.operator === '~') | ||
return { test: val.test, then: ~val.then, else: ~val.else }; | ||
return { test: val.test, ifTrue: ~val.ifTrue, else: ~val.else }; | ||
if (node.operator === '!') | ||
return { test: val.test, then: !val.then, else: !val.else }; | ||
return { test: val.test, ifTrue: !val.ifTrue, else: !val.else }; | ||
} | ||
@@ -590,0 +590,0 @@ return undefined; |
{ | ||
"name": "@vercel/nft", | ||
"version": "0.27.9", | ||
"version": "0.27.10", | ||
"repository": "vercel/nft", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
325958
67
2
6
0
16