@expo/configure-splash-screen
Advanced tools
Comparing version 0.3.4 to 0.4.0
@@ -1,2 +0,1 @@ | ||
import 'core-js/es/string/match-all'; | ||
/** | ||
@@ -3,0 +2,0 @@ * @returns [`true`, modifiedContent: string] if replacement is successful, [`false`, originalContent] otherwise. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.insert = exports.replace = void 0; | ||
// runtime polyfills | ||
require("core-js/es/string/match-all"); | ||
/** | ||
@@ -7,0 +5,0 @@ * @returns [`true`, modifiedContent: string] if replacement is successful, [`false`, originalContent] otherwise. |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeXmlFileOrRemoveFileUponNoResources = exports.xmlElementsEqual = exports.writeXmlFile = exports.readXmlFile = exports.mergeXmlElements = void 0; | ||
const deep_equal_1 = __importDefault(require("deep-equal")); | ||
const xml_js_1 = require("xml-js"); | ||
@@ -95,4 +91,3 @@ const file_utils_1 = require("../utils/file-utils"); | ||
.map(({ idx, ...el }) => ({ idx, ...convertToElement(el) }))); | ||
const sortedResult = sortWithExplicitIndex(result); | ||
return sortedResult; | ||
return sortWithExplicitIndex(result); | ||
} | ||
@@ -141,7 +136,6 @@ function convertToElement({ idx, ...expectedElement }) { | ||
if (expectedAttributes) { | ||
const result = Object.entries(expectedAttributes).reduce((acc, [key, value]) => ({ | ||
return Object.entries(expectedAttributes).reduce((acc, [key, value]) => ({ | ||
...acc, | ||
[key]: unboxExplicitNewValue(value), | ||
}), {}); | ||
return result; | ||
} | ||
@@ -164,2 +158,24 @@ return undefined; | ||
} | ||
function deepEqual(e1, e2) { | ||
if ((!e1 && e2) || (e1 && !e2)) { | ||
return false; | ||
} | ||
else if (!e1 && !e2) { | ||
return true; | ||
} | ||
if (Object.keys(e1).length !== Object.keys(e2).length) { | ||
return false; | ||
} | ||
for (const [key, val1] of Object.entries(e1)) { | ||
const val2 = e2[key]; | ||
const areObjects = isObject(val1) && isObject(val2); | ||
if ((areObjects && !deepEqual(val1, val2)) || (!areObjects && val1 !== val2)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
function isObject(element) { | ||
return element && typeof element === 'object'; | ||
} | ||
/** | ||
@@ -232,3 +248,3 @@ * Assumption is that elements are `equal` semantically | ||
const filteredB = !disregardComments ? b : removeComments(b); | ||
return deep_equal_1.default(filteredA, filteredB); | ||
return deepEqual(filteredA, filteredB); | ||
} | ||
@@ -235,0 +251,0 @@ exports.xmlElementsEqual = xmlElementsEqual; |
{ | ||
"name": "@expo/configure-splash-screen", | ||
"version": "0.3.4", | ||
"version": "0.4.0", | ||
"description": "Supplementary module for 'expo-splash-screen' providing cli configuration command", | ||
@@ -13,3 +13,3 @@ "bin": { | ||
"build": "tsc", | ||
"watch": "tsc --watch", | ||
"watch": "tsc --watch --preserveWatchOutput", | ||
"prepare": "yarn run clean && yarn run build", | ||
@@ -39,3 +39,3 @@ "clean": "rimraf build ./tsconfig.tsbuildinfo", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=12" | ||
}, | ||
@@ -45,4 +45,2 @@ "dependencies": { | ||
"commander": "^5.1.0", | ||
"core-js": "^3.6.5", | ||
"deep-equal": "^2.0.3", | ||
"fs-extra": "^9.0.0", | ||
@@ -58,3 +56,2 @@ "glob": "^7.1.6", | ||
"@types/color-string": "^1.5.0", | ||
"@types/deep-equal": "^1.0.1", | ||
"@types/fs-extra": "^9.0.1", | ||
@@ -74,4 +71,3 @@ "@types/jest": "^25.2.2", | ||
"build" | ||
], | ||
"gitHead": "58cc7088dae609832c85dba393372ed1a06b00db" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
273046
8
13
2601
- Removedcore-js@^3.6.5
- Removeddeep-equal@^2.0.3
- Removedarray-buffer-byte-length@1.0.1(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcore-js@3.38.1(transitive)
- Removeddeep-equal@2.2.3(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-get-iterator@1.1.3(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-bigints@1.0.2(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinternal-slot@1.0.7(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-array-buffer@3.0.4(transitive)
- Removedis-bigint@1.0.4(transitive)
- Removedis-boolean-object@1.1.2(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-map@2.0.3(transitive)
- Removedis-number-object@1.0.7(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedis-set@2.0.3(transitive)
- Removedis-shared-array-buffer@1.0.3(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedis-weakmap@2.0.2(transitive)
- Removedis-weakset@2.0.3(transitive)
- Removedisarray@2.0.5(transitive)
- Removedobject-inspect@1.13.2(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.5(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedregexp.prototype.flags@1.5.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedstop-iteration-iterator@1.0.0(transitive)
- Removedwhich-boxed-primitive@1.0.2(transitive)
- Removedwhich-collection@1.0.2(transitive)
- Removedwhich-typed-array@1.1.15(transitive)