@react-native-community/cli-config
Advanced tools
Comparing version 14.0.0-alpha.5 to 14.0.0-alpha.6
@@ -5,2 +5,6 @@ import { Config } from '@react-native-community/cli-types'; | ||
description: string; | ||
options: { | ||
name: string; | ||
description: string; | ||
}[]; | ||
func: (_argv: string[], ctx: Config) => Promise<void>; | ||
@@ -7,0 +11,0 @@ }; |
@@ -24,2 +24,6 @@ "use strict"; | ||
description: 'Print CLI configuration', | ||
options: [{ | ||
name: '--platform <platform>', | ||
description: 'Output configuration for a specific platform' | ||
}], | ||
func: async (_argv, ctx) => { | ||
@@ -26,0 +30,0 @@ console.log(JSON.stringify(filterConfig(ctx), null, 2)); |
@@ -5,4 +5,8 @@ export { default } from './loadConfig'; | ||
description: string; | ||
options: { | ||
name: string; | ||
description: string; | ||
}[]; | ||
func: (_argv: string[], ctx: import("@react-native-community/cli-types").Config) => Promise<void>; | ||
}[]; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,4 +5,7 @@ import { Config } from '@react-native-community/cli-types'; | ||
*/ | ||
declare function loadConfig(projectRoot?: string): Config; | ||
declare function loadConfig({ projectRoot, selectedPlatform, }: { | ||
projectRoot?: string; | ||
selectedPlatform?: string; | ||
}): Config; | ||
export default loadConfig; | ||
//# sourceMappingURL=loadConfig.d.ts.map |
@@ -27,3 +27,3 @@ "use strict"; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function getDependencyConfig(root, dependencyName, finalConfig, config, userConfig, isPlatform) { | ||
function getDependencyConfig(root, dependencyName, finalConfig, config, userConfig) { | ||
return (0, _merge.default)({ | ||
@@ -36,3 +36,3 @@ root, | ||
// Linking platforms is not supported | ||
isPlatform || !platformConfig ? null : platformConfig.dependencyConfig(root, config.dependency.platforms[platform]); | ||
Object.keys(config.platforms).length > 0 || !platformConfig ? null : platformConfig.dependencyConfig(root, config.dependency.platforms[platform]); | ||
return dependency; | ||
@@ -72,3 +72,6 @@ }, {}) | ||
*/ | ||
function loadConfig(projectRoot = (0, _cliTools().findProjectRoot)()) { | ||
function loadConfig({ | ||
projectRoot = (0, _cliTools().findProjectRoot)(), | ||
selectedPlatform | ||
}) { | ||
let lazyProject; | ||
@@ -108,7 +111,6 @@ const userConfig = (0, _readConfigFromDisk.readConfigFromDisk)(projectRoot); | ||
let config = (0, _readConfigFromDisk.readDependencyConfigFromDisk)(root, dependencyName); | ||
const isPlatform = Object.keys(config.platforms).length > 0; | ||
return (0, _assign.default)({}, acc, { | ||
dependencies: (0, _assign.default)({}, acc.dependencies, { | ||
get [dependencyName]() { | ||
return getDependencyConfig(root, dependencyName, finalConfig, config, userConfig, isPlatform); | ||
return getDependencyConfig(root, dependencyName, finalConfig, config, userConfig); | ||
} | ||
@@ -119,3 +121,5 @@ }), | ||
...acc.platforms, | ||
...config.platforms | ||
...(selectedPlatform && config.platforms[selectedPlatform] ? { | ||
[selectedPlatform]: config.platforms[selectedPlatform] | ||
} : config.platforms) | ||
}, | ||
@@ -122,0 +126,0 @@ healthChecks: [...acc.healthChecks, ...config.healthChecks] |
{ | ||
"name": "@react-native-community/cli-config", | ||
"version": "14.0.0-alpha.5", | ||
"version": "14.0.0-alpha.6", | ||
"license": "MIT", | ||
@@ -11,3 +11,3 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@react-native-community/cli-tools": "14.0.0-alpha.5", | ||
"@react-native-community/cli-tools": "14.0.0-alpha.6", | ||
"chalk": "^4.1.2", | ||
@@ -25,3 +25,3 @@ "cosmiconfig": "^9.0.0", | ||
"devDependencies": { | ||
"@react-native-community/cli-types": "14.0.0-alpha.5", | ||
"@react-native-community/cli-types": "14.0.0-alpha.6", | ||
"@types/cosmiconfig": "^5.0.3" | ||
@@ -35,3 +35,3 @@ }, | ||
}, | ||
"gitHead": "0bcdb73b48fd9c8755b5031326fc0f93bbe69789" | ||
"gitHead": "3e225892eedc9335ad7dc8c64a4014939d2838a5" | ||
} |
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
68348
661
+ Added@react-native-community/cli-tools@14.0.0-alpha.6(transitive)
- Removed@react-native-community/cli-tools@14.0.0-alpha.5(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)