@rnx-kit/dep-check
Advanced tools
Comparing version 1.7.5 to 1.7.6
@@ -5,3 +5,24 @@ { | ||
{ | ||
"date": "Fri, 27 Aug 2021 18:41:06 GMT", | ||
"date": "Tue, 31 Aug 2021 06:42:26 GMT", | ||
"tag": "@rnx-kit/dep-check_v1.7.6", | ||
"version": "1.7.6", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"author": "4123478+tido64@users.noreply.github.com", | ||
"package": "@rnx-kit/dep-check", | ||
"comment": "Stricter handling of errors", | ||
"commit": "25b936b3786f2a37dc6feacb4034e6afb56e343b" | ||
}, | ||
{ | ||
"author": "4123478+tido64@users.noreply.github.com", | ||
"package": "@rnx-kit/dep-check", | ||
"commit": "25b936b3786f2a37dc6feacb4034e6afb56e343b", | ||
"comment": "Bump @rnx-kit/dep-check to v1.7.6" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Fri, 27 Aug 2021 18:41:43 GMT", | ||
"tag": "@rnx-kit/dep-check_v1.7.5", | ||
@@ -8,0 +29,0 @@ "version": "1.7.5", |
# Change Log - @rnx-kit/dep-check | ||
This log was last generated on Fri, 27 Aug 2021 18:41:06 GMT and should not be manually modified. | ||
This log was last generated on Tue, 31 Aug 2021 06:42:26 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 1.7.6 | ||
Tue, 31 Aug 2021 06:42:26 GMT | ||
### Patches | ||
- Stricter handling of errors (4123478+tido64@users.noreply.github.com) | ||
- Bump @rnx-kit/dep-check to v1.7.6 (4123478+tido64@users.noreply.github.com) | ||
## 1.7.5 | ||
Fri, 27 Aug 2021 18:41:06 GMT | ||
Fri, 27 Aug 2021 18:41:43 GMT | ||
@@ -11,0 +20,0 @@ ### Patches |
@@ -16,6 +16,6 @@ "use strict"; | ||
} | ||
const profiles = profiles_1.getProfilesFor(targetReactNativeVersion, customProfilesPath); | ||
const profiles = (0, profiles_1.getProfilesFor)(targetReactNativeVersion, customProfilesPath); | ||
const packageToCapabilityMap = {}; | ||
profiles.forEach((profile) => { | ||
helpers_1.keysOf(profile).reduce((result, capability) => { | ||
(0, helpers_1.keysOf)(profile).reduce((result, capability) => { | ||
const { name } = profile[capability]; | ||
@@ -31,3 +31,3 @@ if (!result[name]) { | ||
}); | ||
const reactNativeVersion = helpers_1.concatVersionRanges(profiles_1.getProfileVersionsFor(targetReactNativeVersion)); | ||
const reactNativeVersion = (0, helpers_1.concatVersionRanges)((0, profiles_1.getProfileVersionsFor)(targetReactNativeVersion)); | ||
return Object.assign(Object.assign({ reactNativeVersion }, (kitType === "library" | ||
@@ -38,3 +38,3 @@ ? { | ||
} | ||
: undefined)), { kitType, capabilities: Array.from(helpers_1.keysOf(Object.assign(Object.assign(Object.assign({}, dependencies), peerDependencies), devDependencies)).reduce((result, dependency) => { | ||
: undefined)), { kitType, capabilities: Array.from((0, helpers_1.keysOf)(Object.assign(Object.assign(Object.assign({}, dependencies), peerDependencies), devDependencies)).reduce((result, dependency) => { | ||
if (dependency in packageToCapabilityMap) { | ||
@@ -41,0 +41,0 @@ packageToCapabilityMap[dependency].forEach((capability) => { |
@@ -18,10 +18,10 @@ "use strict"; | ||
function checkPackageManifest(manifestPath, { loose, uncheckedReturnCode = 0, write }) { | ||
const manifest = package_1.readPackage(manifestPath); | ||
if (!package_1.isPackageManifest(manifest)) { | ||
console_1.error(`'${manifestPath}' does not contain a valid package manifest`); | ||
const manifest = (0, package_1.readPackage)(manifestPath); | ||
if (!(0, package_1.isPackageManifest)(manifest)) { | ||
(0, console_1.error)(`'${manifestPath}' does not contain a valid package manifest`); | ||
return 1; | ||
} | ||
const badPackages = findBadPackages_1.findBadPackages(manifest); | ||
const badPackages = (0, findBadPackages_1.findBadPackages)(manifest); | ||
if (badPackages) { | ||
console_1.warn(`Known bad packages are found in '${manifest.name}':\n` + | ||
(0, console_1.warn)(`Known bad packages are found in '${manifest.name}':\n` + | ||
badPackages | ||
@@ -32,8 +32,8 @@ .map((pkg) => ` ${pkg.name}@${pkg.version}: ${pkg.reason}`) | ||
const projectRoot = path_1.default.dirname(manifestPath); | ||
const kitConfig = config_1.getKitConfig({ cwd: projectRoot }); | ||
const kitConfig = (0, config_1.getKitConfig)({ cwd: projectRoot }); | ||
if (!kitConfig) { | ||
return uncheckedReturnCode; | ||
} | ||
const { reactNativeVersion: targetReactNativeVersion, reactNativeDevVersion, kitType, capabilities: targetCapabilities, customProfiles, } = config_1.getKitCapabilities(kitConfig); | ||
const { reactNativeVersion, capabilities: requiredCapabilities } = dependencies_1.getRequirements(targetReactNativeVersion, kitType, manifest, projectRoot, customProfiles, { loose }); | ||
const { reactNativeVersion: targetReactNativeVersion, reactNativeDevVersion, kitType, capabilities: targetCapabilities, customProfiles, } = (0, config_1.getKitCapabilities)(kitConfig); | ||
const { reactNativeVersion, capabilities: requiredCapabilities } = (0, dependencies_1.getRequirements)(targetReactNativeVersion, kitType, manifest, projectRoot, customProfiles, { loose }); | ||
requiredCapabilities.push(...targetCapabilities); | ||
@@ -43,3 +43,3 @@ if (requiredCapabilities.length === 0) { | ||
} | ||
const updatedManifest = manifest_1.updatePackageManifest(manifest, requiredCapabilities, profiles_1.getProfilesFor(reactNativeVersion, customProfiles), profiles_1.getProfilesFor(reactNativeDevVersion, customProfiles), kitType); | ||
const updatedManifest = (0, manifest_1.updatePackageManifest)(manifest, requiredCapabilities, (0, profiles_1.getProfilesFor)(reactNativeVersion, customProfiles), (0, profiles_1.getProfilesFor)(reactNativeDevVersion, customProfiles), kitType); | ||
// Don't fail when manifests only have whitespace differences. | ||
@@ -50,6 +50,6 @@ const updatedManifestJson = JSON.stringify(updatedManifest, undefined, 2); | ||
if (write) { | ||
package_1.writePackage(manifestPath, updatedManifest); | ||
(0, package_1.writePackage)(manifestPath, updatedManifest); | ||
} | ||
else { | ||
const diff = jest_diff_1.diffLinesUnified(normalizedManifestJson.split("\n"), updatedManifestJson.split("\n"), { | ||
const diff = (0, jest_diff_1.diffLinesUnified)(normalizedManifestJson.split("\n"), updatedManifestJson.split("\n"), { | ||
aAnnotation: "Current", | ||
@@ -61,5 +61,5 @@ aColor: chalk_1.default.red, | ||
console.log(diff); | ||
console_1.error("Changes are needed to satisfy all requirements. Re-run with `--write` to have dep-check apply them."); | ||
(0, console_1.error)("Changes are needed to satisfy all requirements. Re-run with `--write` to have dep-check apply them."); | ||
const url = chalk_1.default.bold("https://aka.ms/dep-check"); | ||
console_1.info(`Visit ${url} for more information about dep-check.`); | ||
(0, console_1.info)(`Visit ${url} for more information about dep-check.`); | ||
return 1; | ||
@@ -66,0 +66,0 @@ } |
@@ -48,2 +48,3 @@ #!/usr/bin/env node | ||
const console_1 = require("@rnx-kit/console"); | ||
const properties_1 = require("@rnx-kit/tools-language/properties"); | ||
const package_1 = require("@rnx-kit/tools-node/package"); | ||
@@ -68,6 +69,6 @@ const isString_1 = __importDefault(require("lodash/isString")); | ||
function getManifests(packageJson) { | ||
if (isString_1.default(packageJson) && packageJson) { | ||
if ((0, isString_1.default)(packageJson) && packageJson) { | ||
return [packageJson]; | ||
} | ||
const packageDir = package_1.findPackageDir(); | ||
const packageDir = (0, package_1.findPackageDir)(); | ||
if (!packageDir) { | ||
@@ -80,3 +81,3 @@ return undefined; | ||
try { | ||
if (workspace_tools_1.getWorkspaceRoot(packageDir) !== packageDir) { | ||
if ((0, workspace_tools_1.getWorkspaceRoot)(packageDir) !== packageDir) { | ||
return [currentPackageJson]; | ||
@@ -89,7 +90,10 @@ } | ||
try { | ||
return workspace_tools_1.getAllPackageJsonFiles(packageDir); | ||
return (0, workspace_tools_1.getAllPackageJsonFiles)(packageDir); | ||
} | ||
catch (e) { | ||
console_1.error(e.message); | ||
return undefined; | ||
if ((0, properties_1.hasProperty)(e, "message")) { | ||
(0, console_1.error)(e.message); | ||
return undefined; | ||
} | ||
throw e; | ||
} | ||
@@ -100,3 +104,3 @@ } | ||
if (!verifiedKitType) { | ||
console_1.error(`Invalid kit type: '${kitType}'`); | ||
(0, console_1.error)(`Invalid kit type: '${kitType}'`); | ||
return undefined; | ||
@@ -106,3 +110,3 @@ } | ||
return (manifest) => { | ||
initialize_1.initializeConfig(manifest, options); | ||
(0, initialize_1.initializeConfig)(manifest, options); | ||
return 0; | ||
@@ -114,3 +118,3 @@ }; | ||
if (lhs in args && rhs in args) { | ||
console_1.error(`--${lhs} and --${rhs} cannot both be specified at the same time.`); | ||
(0, console_1.error)(`--${lhs} and --${rhs} cannot both be specified at the same time.`); | ||
return true; | ||
@@ -132,3 +136,3 @@ } | ||
const { "custom-profiles": customProfilesPath, "exclude-packages": excludePackages, init, loose, "set-version": setVersion, vigilant, write, } = args; | ||
if (isString_1.default(init)) { | ||
if ((0, isString_1.default)(init)) { | ||
return makeInitializeCommand(init); | ||
@@ -139,7 +143,7 @@ } | ||
// `setVersion` is `true` instead. | ||
if (setVersion || isString_1.default(setVersion)) { | ||
return setVersion_1.makeSetVersionCommand(setVersion); | ||
if (setVersion || (0, isString_1.default)(setVersion)) { | ||
return (0, setVersion_1.makeSetVersionCommand)(setVersion); | ||
} | ||
if (isString_1.default(vigilant)) { | ||
return vigilant_1.makeVigilantCommand({ | ||
if ((0, isString_1.default)(vigilant)) { | ||
return (0, vigilant_1.makeVigilantCommand)({ | ||
customProfiles: customProfilesPath === null || customProfilesPath === void 0 ? void 0 : customProfilesPath.toString(), | ||
@@ -152,3 +156,3 @@ excludePackages: excludePackages === null || excludePackages === void 0 ? void 0 : excludePackages.toString(), | ||
} | ||
return check_1.makeCheckCommand({ loose, write }); | ||
return (0, check_1.makeCheckCommand)({ loose, write }); | ||
}); | ||
@@ -165,3 +169,3 @@ } | ||
if (!manifests) { | ||
console_1.error("Could not find package root"); | ||
(0, console_1.error)("Could not find package root"); | ||
process.exit(1); | ||
@@ -178,5 +182,8 @@ } | ||
catch (e) { | ||
const currentPackageJson = path.relative(process.cwd(), manifest); | ||
console_1.error(`${currentPackageJson}: ${e.message}`); | ||
return exitCode || 1; | ||
if ((0, properties_1.hasProperty)(e, "message")) { | ||
const currentPackageJson = path.relative(process.cwd(), manifest); | ||
(0, console_1.error)(`${currentPackageJson}: ${e.message}`); | ||
return exitCode || 1; | ||
} | ||
throw e; | ||
} | ||
@@ -183,0 +190,0 @@ }, 0); |
@@ -24,12 +24,12 @@ "use strict"; | ||
visited.add(dependency); | ||
const packageRef = package_1.parsePackageRef(dependency); | ||
const packageDir = package_1.findPackageDependencyDir(packageRef, { | ||
const packageRef = (0, package_1.parsePackageRef)(dependency); | ||
const packageDir = (0, package_1.findPackageDependencyDir)(packageRef, { | ||
startDir: projectRoot, | ||
}); | ||
if (!packageDir) { | ||
console_1.warn(`Unable to resolve module '${dependency}'`); | ||
(0, console_1.warn)(`Unable to resolve module '${dependency}'`); | ||
return; | ||
} | ||
visitor(dependency, packageDir); | ||
const manifest = package_1.readPackage(packageDir); | ||
const manifest = (0, package_1.readPackage)(packageDir); | ||
visitDependencies(manifest, packageDir, visitor, visited); | ||
@@ -40,3 +40,3 @@ }); | ||
function getRequirements(targetReactNativeVersion, kitType, targetManifest, projectRoot, customProfiles, { loose }, testOverrides) { | ||
let profileVersions = profiles_1.getProfileVersionsFor(targetReactNativeVersion); | ||
let profileVersions = (0, profiles_1.getProfileVersionsFor)(targetReactNativeVersion); | ||
if (profileVersions.length === 0) { | ||
@@ -55,8 +55,8 @@ throw new Error(`No profile could satisfy React Native version: ${targetReactNativeVersion}`); | ||
visitDependencies(targetManifest, projectRoot, (module, modulePath) => { | ||
const kitConfig = config_1.getKitConfig({ cwd: modulePath }); | ||
const kitConfig = (0, config_1.getKitConfig)({ cwd: modulePath }); | ||
if (!kitConfig) { | ||
return; | ||
} | ||
const { reactNativeVersion, capabilities } = config_1.getKitCapabilities(kitConfig); | ||
const validVersions = profiles_1.profilesSatisfying(profileVersions, reactNativeVersion); | ||
const { reactNativeVersion, capabilities } = (0, config_1.getKitCapabilities)(kitConfig); | ||
const validVersions = (0, profiles_1.profilesSatisfying)(profileVersions, reactNativeVersion); | ||
if (validVersions.length != profileVersions.length) { | ||
@@ -89,10 +89,10 @@ trace.push({ | ||
if (loose) { | ||
console_1.warn(fullTrace); | ||
(0, console_1.warn)(fullTrace); | ||
} | ||
else { | ||
console_1.error(fullTrace); | ||
(0, console_1.error)(fullTrace); | ||
throw new Error(message); | ||
} | ||
} | ||
const profiles = profiles_1.getProfilesFor(profileVersions, customProfiles, testOverrides); | ||
const profiles = (0, profiles_1.getProfilesFor)(profileVersions, customProfiles, testOverrides); | ||
allCapabilities.forEach((capability) => { | ||
@@ -112,3 +112,3 @@ /** | ||
return { | ||
reactNativeVersion: helpers_1.concatVersionRanges(profileVersions), | ||
reactNativeVersion: (0, helpers_1.concatVersionRanges)(profileVersions), | ||
capabilities: Array.from(allCapabilities), | ||
@@ -115,0 +115,0 @@ }; |
@@ -8,7 +8,7 @@ "use strict"; | ||
var _a, _b; | ||
const manifest = package_1.readPackage(packageManifest); | ||
const manifest = (0, package_1.readPackage)(packageManifest); | ||
if ((_a = manifest["rnx-kit"]) === null || _a === void 0 ? void 0 : _a["capabilities"]) { | ||
return; | ||
} | ||
const capabilities = capabilities_1.capabilitiesFor(manifest, options); | ||
const capabilities = (0, capabilities_1.capabilitiesFor)(manifest, options); | ||
if (!((_b = capabilities === null || capabilities === void 0 ? void 0 : capabilities.capabilities) === null || _b === void 0 ? void 0 : _b.length)) { | ||
@@ -18,5 +18,5 @@ return; | ||
const updatedManifest = Object.assign(Object.assign({}, manifest), { "rnx-kit": Object.assign(Object.assign({}, manifest["rnx-kit"]), capabilities) }); | ||
package_1.writePackage(packageManifest, updatedManifest); | ||
(0, package_1.writePackage)(packageManifest, updatedManifest); | ||
} | ||
exports.initializeConfig = initializeConfig; | ||
//# sourceMappingURL=initialize.js.map |
@@ -24,3 +24,3 @@ "use strict"; | ||
} | ||
return omit_1.default(obj, ...keys); | ||
return (0, omit_1.default)(obj, ...keys); | ||
} | ||
@@ -99,3 +99,3 @@ exports.removeKeys = removeKeys; | ||
const { dependencies, peerDependencies, devDependencies } = manifest; | ||
const packages = capabilities_1.resolveCapabilities(capabilities, profiles); | ||
const packages = (0, capabilities_1.resolveCapabilities)(capabilities, profiles); | ||
const names = Object.keys(packages); | ||
@@ -106,3 +106,3 @@ switch (packageType) { | ||
case "library": | ||
return Object.assign(Object.assign({}, manifest), { dependencies: removeKeys(dependencies, names), peerDependencies: updateDependencies(peerDependencies, packages, "peer"), devDependencies: updateDependencies(devDependencies, capabilities_1.resolveCapabilities(capabilities, devProfiles), "development") }); | ||
return Object.assign(Object.assign({}, manifest), { dependencies: removeKeys(dependencies, names), peerDependencies: updateDependencies(peerDependencies, packages, "peer"), devDependencies: updateDependencies(devDependencies, (0, capabilities_1.resolveCapabilities)(capabilities, devProfiles), "development") }); | ||
} | ||
@@ -109,0 +109,0 @@ } |
@@ -9,4 +9,6 @@ "use strict"; | ||
const function_1 = require("@rnx-kit/tools-language/function"); | ||
const properties_1 = require("@rnx-kit/tools-language/properties"); | ||
const isString_1 = __importDefault(require("lodash/isString")); | ||
const semver_1 = __importDefault(require("semver")); | ||
const helpers_1 = require("./helpers"); | ||
const profile_0_61_1 = __importDefault(require("./profiles/profile-0.61")); | ||
@@ -17,3 +19,2 @@ const profile_0_62_1 = __importDefault(require("./profiles/profile-0.62")); | ||
const profile_0_65_1 = __importDefault(require("./profiles/profile-0.65")); | ||
const helpers_1 = require("./helpers"); | ||
exports.defaultProfiles = { | ||
@@ -46,3 +47,3 @@ "0.61": profile_0_61_1.default, | ||
if (customProfilesPath) { | ||
const [resolvedPath, moduleNotFoundError] = function_1.tryInvoke(() => moduleResolver(customProfilesPath)); | ||
const [resolvedPath, moduleNotFoundError] = (0, function_1.tryInvoke)(() => moduleResolver(customProfilesPath)); | ||
if (moduleNotFoundError || !resolvedPath) { | ||
@@ -52,7 +53,9 @@ const helpMsg = "Please make sure the path exists or is added to your 'package.json'."; | ||
const message = `Cannot find module '${customProfilesPath}'`; | ||
console_1.error(`${message}. ${helpMsg}`); | ||
(0, console_1.error)(`${message}. ${helpMsg}`); | ||
throw new Error(message); | ||
} | ||
console_1.error(moduleNotFoundError.message); | ||
console_1.error(helpMsg); | ||
if ((0, properties_1.hasProperty)(moduleNotFoundError, "message")) { | ||
(0, console_1.error)(moduleNotFoundError.message); | ||
} | ||
(0, console_1.error)(helpMsg); | ||
throw moduleNotFoundError; | ||
@@ -63,3 +66,3 @@ } | ||
const message = `'${customProfilesPath}' doesn't default export profiles`; | ||
console_1.error([ | ||
(0, console_1.error)([ | ||
"${message}. Please make sure that it exports an object with a shape similar to:", | ||
@@ -83,7 +86,7 @@ "", | ||
function getProfileVersionsFor(reactVersionRange) { | ||
if (!isString_1.default(reactVersionRange)) { | ||
if (!(0, isString_1.default)(reactVersionRange)) { | ||
return reactVersionRange; | ||
} | ||
const isSatifisedBy = getVersionComparator(reactVersionRange); | ||
const allVersions = helpers_1.keysOf(exports.defaultProfiles); | ||
const allVersions = (0, helpers_1.keysOf)(exports.defaultProfiles); | ||
return allVersions.reduce((profiles, version) => { | ||
@@ -90,0 +93,0 @@ if (isSatifisedBy(version)) { |
@@ -30,10 +30,10 @@ "use strict"; | ||
// `versions` is `true` instead. | ||
if (isString_1.default(versions) && versions) { | ||
return profiles_1.parseProfilesString(versions); | ||
if ((0, isString_1.default)(versions) && versions) { | ||
return (0, profiles_1.parseProfilesString)(versions); | ||
} | ||
const { supportedVersions } = yield prompts_1.default({ | ||
const { supportedVersions } = yield (0, prompts_1.default)({ | ||
type: "multiselect", | ||
name: "supportedVersions", | ||
message: "Select all supported versions of `react-native`", | ||
choices: helpers_1.keysOf(profiles_1.defaultProfiles).map(profileToChoice), | ||
choices: (0, helpers_1.keysOf)(profiles_1.defaultProfiles).map(profileToChoice), | ||
min: 1, | ||
@@ -46,3 +46,3 @@ }); | ||
? supportedVersions[0] | ||
: (yield prompts_1.default({ | ||
: (yield (0, prompts_1.default)({ | ||
type: "select", | ||
@@ -57,3 +57,3 @@ name: "targetVersion", | ||
return { | ||
supportedVersions: helpers_1.concatVersionRanges(supportedVersions), | ||
supportedVersions: (0, helpers_1.concatVersionRanges)(supportedVersions), | ||
targetVersion, | ||
@@ -72,7 +72,7 @@ }; | ||
return (manifestPath) => { | ||
const checkReturnCode = check_1.checkPackageManifest(manifestPath, checkOnly); | ||
const checkReturnCode = (0, check_1.checkPackageManifest)(manifestPath, checkOnly); | ||
if (checkReturnCode !== 0) { | ||
return checkReturnCode; | ||
} | ||
const manifest = package_1.readPackage(manifestPath); | ||
const manifest = (0, package_1.readPackage)(manifestPath); | ||
const rnxKitConfig = manifest["rnx-kit"]; | ||
@@ -84,4 +84,4 @@ if (!rnxKitConfig) { | ||
rnxKitConfig.reactNativeDevVersion = targetVersion; | ||
package_1.writePackage(manifestPath, manifest); | ||
return check_1.checkPackageManifest(manifestPath, write); | ||
(0, package_1.writePackage)(manifestPath, manifest); | ||
return (0, check_1.checkPackageManifest)(manifestPath, write); | ||
}; | ||
@@ -88,0 +88,0 @@ }); |
@@ -21,7 +21,7 @@ "use strict"; | ||
function buildManifestProfile(versions, customProfilesPath, testOverrides) { | ||
const { supportedProfiles, targetProfile } = profiles_1.parseProfilesString(versions, customProfilesPath, testOverrides); | ||
const allCapabilities = helpers_1.keysOf(targetProfile[0]); | ||
const { supportedProfiles, targetProfile } = (0, profiles_1.parseProfilesString)(versions, customProfilesPath, testOverrides); | ||
const allCapabilities = (0, helpers_1.keysOf)(targetProfile[0]); | ||
// Use "development" type so we can check for devOnly packages under | ||
// `dependencies` as well. | ||
const directDependencies = manifest_1.updateDependencies({}, capabilities_1.resolveCapabilities(allCapabilities, targetProfile), "development"); | ||
const directDependencies = (0, manifest_1.updateDependencies)({}, (0, capabilities_1.resolveCapabilities)(allCapabilities, targetProfile), "development"); | ||
const { name, version } = require("../package.json"); | ||
@@ -32,3 +32,3 @@ return { | ||
dependencies: directDependencies, | ||
peerDependencies: manifest_1.updateDependencies({}, capabilities_1.resolveCapabilities(allCapabilities, supportedProfiles), "peer"), | ||
peerDependencies: (0, manifest_1.updateDependencies)({}, (0, capabilities_1.resolveCapabilities)(allCapabilities, supportedProfiles), "peer"), | ||
devDependencies: directDependencies, | ||
@@ -64,3 +64,3 @@ }; | ||
if (!versions) { | ||
console_1.error("A comma-separated list of profile versions must be specified."); | ||
(0, console_1.error)("A comma-separated list of profile versions must be specified."); | ||
return undefined; | ||
@@ -70,3 +70,3 @@ } | ||
const checkOptions = { loose, uncheckedReturnCode, write }; | ||
const exclusionList = isString_1.default(excludePackages) | ||
const exclusionList = (0, isString_1.default)(excludePackages) | ||
? excludePackages.split(",") | ||
@@ -77,3 +77,3 @@ : []; | ||
try { | ||
const checkReturnCode = check_1.checkPackageManifest(manifestPath, checkOptions); | ||
const checkReturnCode = (0, check_1.checkPackageManifest)(manifestPath, checkOptions); | ||
if (checkReturnCode !== uncheckedReturnCode) { | ||
@@ -86,3 +86,3 @@ return checkReturnCode; | ||
} | ||
const manifest = package_1.readPackage(manifestPath); | ||
const manifest = (0, package_1.readPackage)(manifestPath); | ||
if (exclusionList.includes(manifest.name)) { | ||
@@ -94,3 +94,3 @@ return 0; | ||
if (write) { | ||
package_1.writePackage(manifestPath, manifest); | ||
(0, package_1.writePackage)(manifestPath, manifest); | ||
} | ||
@@ -101,3 +101,3 @@ else { | ||
.join("\n"); | ||
console_1.error(`Found ${changes.length} violation(s) in ${manifest.name}:\n${violations}`); | ||
(0, console_1.error)(`Found ${changes.length} violation(s) in ${manifest.name}:\n${violations}`); | ||
return 1; | ||
@@ -104,0 +104,0 @@ } |
{ | ||
"name": "@rnx-kit/dep-check", | ||
"version": "1.7.5", | ||
"version": "1.7.6", | ||
"description": "Dependency checker for React Native apps", | ||
@@ -28,6 +28,6 @@ "homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/dep-check#readme", | ||
"dependencies": { | ||
"@rnx-kit/config": "^0.4.4", | ||
"@rnx-kit/config": "^0.4.5", | ||
"@rnx-kit/console": "^1.0.2", | ||
"@rnx-kit/tools-language": "^1.1.0", | ||
"@rnx-kit/tools-node": "^1.1.1", | ||
"@rnx-kit/tools-language": "^1.1.1", | ||
"@rnx-kit/tools-node": "^1.1.2", | ||
"chalk": "^4.1.0", | ||
@@ -34,0 +34,0 @@ "jest-diff": "^26.0.0", |
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
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
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
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
174752
2722
Updated@rnx-kit/config@^0.4.5
Updated@rnx-kit/tools-node@^1.1.2