Socket
Socket
Sign inDemoInstall

@react-native-community/cli-config

Package Overview
Dependencies
Maintainers
30
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-config - npm Package Compare versions

Comparing version 8.0.2 to 8.0.3

27

build/loadConfig.js

@@ -18,12 +18,2 @@ "use strict";

function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _cliTools() {

@@ -104,17 +94,4 @@ const data = require("@react-native-community/cli-tools");

const localDependencyRoot = userConfig.dependencies[dependencyName] && userConfig.dependencies[dependencyName].root;
let root;
let config;
try {
root = localDependencyRoot || (0, _cliTools().resolveNodeModuleDir)(projectRoot, dependencyName);
config = (0, _readConfigFromDisk.readDependencyConfigFromDisk)(root);
} catch (error) {
_cliTools().logger.warn((0, _cliTools().inlineString)(`
Package ${_chalk().default.bold(dependencyName)} has been ignored because it contains invalid configuration.
Reason: ${_chalk().default.dim(error.message)}`));
return acc;
}
let root = localDependencyRoot || (0, _cliTools().resolveNodeModuleDir)(projectRoot, dependencyName);
let config = (0, _readConfigFromDisk.readDependencyConfigFromDisk)(root, dependencyName);
const isPlatform = Object.keys(config.platforms).length > 0;

@@ -121,0 +98,0 @@ return (0, _assign.default)({}, acc, {

2

build/readConfigFromDisk.d.ts

@@ -11,3 +11,3 @@ import { UserConfig, UserDependencyConfig } from '@react-native-community/cli-types';

*/
export declare function readDependencyConfigFromDisk(rootFolder: string): UserDependencyConfig;
export declare function readDependencyConfigFromDisk(rootFolder: string, dependencyName: string): UserDependencyConfig;
//# sourceMappingURL=readConfigFromDisk.d.ts.map

@@ -23,2 +23,22 @@ "use strict";

function _cliTools() {
const data = require("@react-native-community/cli-tools");
_cliTools = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -60,3 +80,3 @@

function readDependencyConfigFromDisk(rootFolder) {
function readDependencyConfigFromDisk(rootFolder, dependencyName) {
const explorer = (0, _cosmiconfig().default)('react-native', {

@@ -68,6 +88,13 @@ stopDir: rootFolder,

const config = searchResult ? searchResult.config : emptyDependencyConfig;
const result = schema.dependencyConfig.validate(config);
const result = schema.dependencyConfig.validate(config, {
abortEarly: false
});
if (result.error) {
throw new _errors.JoiError(result.error);
const validationError = new _errors.JoiError(result.error);
_cliTools().logger.warn((0, _cliTools().inlineString)(`
Package ${_chalk().default.bold(dependencyName)} contains invalid configuration: ${_chalk().default.bold(validationError.message)}.
Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.`));
}

@@ -74,0 +101,0 @@

{
"name": "@react-native-community/cli-config",
"version": "8.0.2",
"version": "8.0.3",
"license": "MIT",

@@ -33,3 +33,3 @@ "main": "build/index.js",

},
"gitHead": "01a49f8e5e5d68f08d6adeb46faea6557ea2aa65"
"gitHead": "427015d95b13447b15a9594f98b245fff5592299"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc