From 9998cbbbf05f80a9cafdbdc4e44891fdd26d1d97 Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Mon, 4 Nov 2019 15:54:34 -0800 Subject: [PATCH] fix up script/test-deprecations.js --- script/test-deprecations.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/script/test-deprecations.js b/script/test-deprecations.js index 942ed2b1..401611bc 100755 --- a/script/test-deprecations.js +++ b/script/test-deprecations.js @@ -76,8 +76,7 @@ async function checkSelectorDeprecations(options = {}) { for (const {selectors = []} of deprecations) { for (const selector of selectors) { if (!removed.includes(selector)) { - const error = `"${selector}" deprecated, but not removed` - errors.push(error) + errors.push(`"${selector}" deprecated, but not removed`) } else { console.log(`${V} selector "${selector}" is officially deprecated`) } @@ -87,8 +86,7 @@ async function checkSelectorDeprecations(options = {}) { for (const removedSelector of removed) { if (!deprecatedSelectors.includes(removedSelector)) { - const error = `"${removedSelector}" has been removed, but was not listed in versionDeprecations['${currentVersion}']` - errors.push(error) + errors.push(`"${removedSelector}" has been removed, but was not listed in versionDeprecations['${currentVersion}']`) } else { // console.log(`${V} "${removedSelector}" removed and deprecated!`) } @@ -128,8 +126,11 @@ async function checkVariableDeprecations(options = {}) { for (const {variables = []} of deprecations) { for (const variable of variables) { if (!removed.includes(variable)) { - const error = `variable "${variable}" deprecated, but not removed` - errors.push(error) + if (remote[variable]) { + errors.push(`variable "${variable}" deprecated, but not removed`) + } else { + console.log(`${I} variable "${variable}" doesn't exist in data for version: ${version}`) + } } else { console.log(`${V} variable "${variable}" is officially deprecated`) } @@ -139,8 +140,7 @@ async function checkVariableDeprecations(options = {}) { for (const removedVariable of removed) { if (!deprecatedVariables.includes(removedVariable)) { - const error = `"${removedVariable}" has been removed, but was not listed in versionDeprecations['${currentVersion}']` - errors.push(error) + errors.push(`"${removedVariable}" has been removed, but was not listed in versionDeprecations['${currentVersion}']`) } else { // console.log(`${V} "${removedVariable}" removed and deprecated!`) }