@react-native-community/cli-config
Advanced tools
Comparing version 14.0.0-alpha.2 to 14.0.0-alpha.3
@@ -85,2 +85,3 @@ "use strict"; | ||
platforms: userConfig.platforms, | ||
assets: userConfig.assets, | ||
get project() { | ||
@@ -87,0 +88,0 @@ if (lazyProject) { |
@@ -9,3 +9,3 @@ "use strict"; | ||
function _cosmiconfig() { | ||
const data = _interopRequireDefault(require("cosmiconfig")); | ||
const data = require("cosmiconfig"); | ||
_cosmiconfig = function () { | ||
@@ -32,9 +32,9 @@ return data; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
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); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
* Places to look for the configuration file. | ||
*/ | ||
const searchPlaces = ['react-native.config.js']; | ||
const searchPlaces = ['react-native.config.js', 'react-native.config.ts']; | ||
@@ -46,7 +46,6 @@ /** | ||
function readConfigFromDisk(rootFolder) { | ||
const explorer = (0, _cosmiconfig().default)('react-native', { | ||
searchPlaces, | ||
const explorer = (0, _cosmiconfig().cosmiconfigSync)('react-native', { | ||
stopDir: rootFolder | ||
}); | ||
const searchResult = explorer.searchSync(rootFolder); | ||
const searchResult = explorer.search(rootFolder); | ||
const config = searchResult ? searchResult.config : undefined; | ||
@@ -65,7 +64,7 @@ const result = schema.projectConfig.validate(config); | ||
function readDependencyConfigFromDisk(rootFolder, dependencyName) { | ||
const explorer = (0, _cosmiconfig().default)('react-native', { | ||
const explorer = (0, _cosmiconfig().cosmiconfigSync)('react-native', { | ||
stopDir: rootFolder, | ||
searchPlaces | ||
}); | ||
const searchResult = explorer.searchSync(rootFolder); | ||
const searchResult = explorer.search(rootFolder); | ||
const config = searchResult ? searchResult.config : emptyDependencyConfig; | ||
@@ -72,0 +71,0 @@ const result = schema.dependencyConfig.validate(config, { |
@@ -144,3 +144,4 @@ "use strict"; | ||
unstable_reactLegacyComponentNames: _joi().default.array().items(_joi().default.string()).optional(), | ||
automaticPodsInstallation: _joi().default.bool().default(false) | ||
automaticPodsInstallation: _joi().default.bool().default(false), | ||
assets: _joi().default.array().items(_joi().default.string()).default([]) | ||
}).default({}), | ||
@@ -157,3 +158,4 @@ android: _joi().default | ||
// @todo remove for RN 0.75 | ||
unstable_reactLegacyComponentNames: _joi().default.array().items(_joi().default.string()).optional() | ||
unstable_reactLegacyComponentNames: _joi().default.array().items(_joi().default.string()).optional(), | ||
assets: _joi().default.array().items(_joi().default.string()).default([]) | ||
}).default({}) | ||
@@ -160,0 +162,0 @@ }).default(), |
{ | ||
"name": "@react-native-community/cli-config", | ||
"version": "14.0.0-alpha.2", | ||
"version": "14.0.0-alpha.3", | ||
"license": "MIT", | ||
@@ -11,5 +11,5 @@ "main": "build/index.js", | ||
"dependencies": { | ||
"@react-native-community/cli-tools": "14.0.0-alpha.2", | ||
"@react-native-community/cli-tools": "14.0.0-alpha.3", | ||
"chalk": "^4.1.2", | ||
"cosmiconfig": "^5.1.0", | ||
"cosmiconfig": "^9.0.0", | ||
"deepmerge": "^4.3.0", | ||
@@ -25,3 +25,3 @@ "fast-glob": "^3.3.2", | ||
"devDependencies": { | ||
"@react-native-community/cli-types": "14.0.0-alpha.2", | ||
"@react-native-community/cli-types": "14.0.0-alpha.3", | ||
"@types/cosmiconfig": "^5.0.3" | ||
@@ -35,3 +35,3 @@ }, | ||
}, | ||
"gitHead": "61b6be6b86152fa9b6036968a15d7189de04ace8" | ||
"gitHead": "be880b86cdb3f4ea104cf232b95d11f84613321b" | ||
} |
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
67327
642
+ Added@babel/code-frame@7.24.7(transitive)
+ Added@babel/helper-validator-identifier@7.24.7(transitive)
+ Added@babel/highlight@7.24.7(transitive)
+ Added@react-native-community/cli-tools@14.0.0-alpha.3(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcosmiconfig@9.0.0(transitive)
+ Addedenv-paths@2.2.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removed@react-native-community/cli-tools@14.0.0-alpha.2(transitive)
- Removedargparse@1.0.10(transitive)
- Removedcaller-callsite@2.0.0(transitive)
- Removedcaller-path@2.0.0(transitive)
- Removedcallsites@2.0.0(transitive)
- Removedcosmiconfig@5.2.1(transitive)
- Removedesprima@4.0.1(transitive)
- Removedimport-fresh@2.0.0(transitive)
- Removedis-directory@0.3.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedresolve-from@3.0.0(transitive)
- Removedsprintf-js@1.0.3(transitive)
Updatedcosmiconfig@^9.0.0