@expo/fingerprint
Advanced tools
Comparing version 0.7.1 to 0.8.0
@@ -68,2 +68,6 @@ /// <reference types="node" /> | ||
} | ||
/** | ||
* Supported options from fingerprint.config.js | ||
*/ | ||
export type Config = Pick<Options, 'concurrentIoLimit' | 'hashAlgorithm' | 'extraSources' | 'debug'>; | ||
export interface NormalizedOptions extends Options { | ||
@@ -70,0 +74,0 @@ platforms: NonNullable<Options['platforms']>; |
@@ -10,2 +10,3 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const Config_1 = require("./Config"); | ||
exports.FINGERPRINT_IGNORE_FILENAME = '.fingerprintignore'; | ||
@@ -74,8 +75,13 @@ exports.DEFAULT_IGNORE_PATHS = [ | ||
async function normalizeOptionsAsync(projectRoot, options) { | ||
const config = await (0, Config_1.loadConfigAsync)(projectRoot, options?.silent ?? false); | ||
return { | ||
// Defaults | ||
platforms: ['android', 'ios'], | ||
concurrentIoLimit: os_1.default.cpus().length, | ||
hashAlgorithm: 'sha1', | ||
ignorePaths: await collectIgnorePathsAsync(projectRoot, options), | ||
// Options from config | ||
...config, | ||
// Explicit options | ||
...options, | ||
platforms: options?.platforms ?? ['android', 'ios'], | ||
concurrentIoLimit: options?.concurrentIoLimit ?? os_1.default.cpus().length, | ||
hashAlgorithm: options?.hashAlgorithm ?? 'sha1', | ||
ignorePaths: await collectIgnorePathsAsync(projectRoot, options), | ||
}; | ||
@@ -82,0 +88,0 @@ } |
@@ -108,3 +108,3 @@ "use strict"; | ||
for (const [key, value] of Object.entries(platformData ?? {})) { | ||
platformData[key] = value.startsWith?.(dependencyRoot) ? path_1.default.relative(root, value) : value; | ||
platformData[key] = value?.startsWith?.(dependencyRoot) ? path_1.default.relative(root, value) : value; | ||
} | ||
@@ -111,0 +111,0 @@ } |
{ | ||
"name": "@expo/fingerprint", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"description": "A library to generate a fingerprint from a React Native project", | ||
@@ -59,3 +59,3 @@ "main": "build/index.js", | ||
}, | ||
"gitHead": "ee4f30ef3b5fa567ad1bf94794197f7683fdd481" | ||
"gitHead": "82b5a4a7ada98ca26cd99d097400b01240cbcf99" | ||
} |
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
109662
58
1528
17