@react-native-community/cli
Advanced tools
Comparing version 12.1.1 to 12.2.0
@@ -14,2 +14,3 @@ declare const _default: { | ||
platformName?: string | undefined; | ||
skipGitInit?: boolean | undefined; | ||
}) => Promise<void>; | ||
@@ -16,0 +17,0 @@ detached: boolean; |
@@ -44,2 +44,5 @@ "use strict"; | ||
description: 'Name of out of tree platform to be used for ex. react-native-macos. This flag is optional as it should be passed automatically by out of tree platform. It needs to match the name of the platform declared in package.json' | ||
}, { | ||
name: '--skip-git-init', | ||
description: 'Skip git repository initialization' | ||
}] | ||
@@ -46,0 +49,0 @@ }; |
@@ -14,2 +14,3 @@ import * as PackageManager from '../../tools/packageManager'; | ||
platformName?: string; | ||
skipGitInit?: boolean; | ||
}; | ||
@@ -16,0 +17,0 @@ declare const _default: ([projectName]: Array<string>, options: Options) => Promise<void>; |
@@ -75,2 +75,9 @@ "use strict"; | ||
} | ||
function _semver() { | ||
const data = _interopRequireDefault(require("semver")); | ||
_semver = 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); } | ||
@@ -118,3 +125,4 @@ 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; } | ||
packageName, | ||
installCocoaPods | ||
installCocoaPods, | ||
version | ||
}) { | ||
@@ -135,2 +143,5 @@ _cliTools().logger.debug('Initializing new project'); | ||
} | ||
// if the project with the name already has cache, remove the cache to avoid problems with pods installation | ||
_cliTools().cacheManager.removeProjectCache(projectName); | ||
const projectDirectory = await setProjectDirectory(directory); | ||
@@ -158,3 +169,6 @@ const loader = (0, _cliTools().getLoader)({ | ||
}); | ||
createDefaultConfigFile(projectDirectory, loader); | ||
const coerceRnVersion = _semver().default.valid(_semver().default.coerce(version)); | ||
if (version === 'latest' || coerceRnVersion && _semver().default.satisfies(coerceRnVersion, '>=0.73.0')) { | ||
createDefaultConfigFile(projectDirectory, loader); | ||
} | ||
const { | ||
@@ -291,3 +305,4 @@ postInitScript | ||
packageName: options.packageName, | ||
installCocoaPods: options.installPods | ||
installCocoaPods: options.installPods, | ||
version | ||
}); | ||
@@ -334,3 +349,5 @@ } | ||
const projectFolder = _path().default.join(root, directoryName); | ||
await (0, _createGitRepository.default)(projectFolder); | ||
if (!options.skipGitInit) { | ||
await (0, _createGitRepository.default)(projectFolder); | ||
} | ||
(0, _printRunInstructions.default)(projectFolder, projectName); | ||
@@ -337,0 +354,0 @@ }; |
{ | ||
"name": "@react-native-community/cli", | ||
"version": "12.1.1", | ||
"version": "12.2.0", | ||
"description": "React Native CLI", | ||
@@ -27,11 +27,11 @@ "license": "MIT", | ||
"dependencies": { | ||
"@react-native-community/cli-clean": "12.1.1", | ||
"@react-native-community/cli-config": "12.1.1", | ||
"@react-native-community/cli-debugger-ui": "12.1.1", | ||
"@react-native-community/cli-doctor": "12.1.1", | ||
"@react-native-community/cli-hermes": "12.1.1", | ||
"@react-native-community/cli-plugin-metro": "12.1.1", | ||
"@react-native-community/cli-server-api": "12.1.1", | ||
"@react-native-community/cli-tools": "12.1.1", | ||
"@react-native-community/cli-types": "12.1.1", | ||
"@react-native-community/cli-clean": "12.2.0", | ||
"@react-native-community/cli-config": "12.2.0", | ||
"@react-native-community/cli-debugger-ui": "12.2.0", | ||
"@react-native-community/cli-doctor": "12.2.0", | ||
"@react-native-community/cli-hermes": "12.2.0", | ||
"@react-native-community/cli-plugin-metro": "12.2.0", | ||
"@react-native-community/cli-server-api": "12.2.0", | ||
"@react-native-community/cli-tools": "12.2.0", | ||
"@react-native-community/cli-types": "12.2.0", | ||
"chalk": "^4.1.2", | ||
@@ -62,3 +62,3 @@ "commander": "^9.4.1", | ||
}, | ||
"gitHead": "a45a2d92c3d53dcb0cf7ba8be4860ad75ff06702" | ||
"gitHead": "f30a010c3036b04f2bd5430a27586472466082a8" | ||
} |
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
184892
1984
+ Added@react-native-community/cli-clean@12.2.0(transitive)
+ Added@react-native-community/cli-config@12.2.0(transitive)
+ Added@react-native-community/cli-debugger-ui@12.2.0(transitive)
+ Added@react-native-community/cli-doctor@12.2.0(transitive)
+ Added@react-native-community/cli-hermes@12.2.0(transitive)
+ Added@react-native-community/cli-platform-android@12.2.0(transitive)
+ Added@react-native-community/cli-platform-ios@12.2.0(transitive)
+ Added@react-native-community/cli-plugin-metro@12.2.0(transitive)
+ Added@react-native-community/cli-server-api@12.2.0(transitive)
+ Added@react-native-community/cli-tools@12.2.0(transitive)
+ Added@react-native-community/cli-types@12.2.0(transitive)
- Removed@react-native-community/cli-clean@12.1.1(transitive)
- Removed@react-native-community/cli-config@12.1.1(transitive)
- Removed@react-native-community/cli-debugger-ui@12.1.1(transitive)
- Removed@react-native-community/cli-doctor@12.1.1(transitive)
- Removed@react-native-community/cli-hermes@12.1.1(transitive)
- Removed@react-native-community/cli-platform-android@12.1.1(transitive)
- Removed@react-native-community/cli-platform-ios@12.1.1(transitive)
- Removed@react-native-community/cli-plugin-metro@12.1.1(transitive)
- Removed@react-native-community/cli-server-api@12.1.1(transitive)
- Removed@react-native-community/cli-tools@12.1.1(transitive)
- Removed@react-native-community/cli-types@12.1.1(transitive)