Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-eject

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-eject - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

16

dist/eject.js

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

function eject() {
const doesTemplateExist = fs_1.default.existsSync(path_1.default.resolve('node_modules/@react-native-community/template'));
if (!doesTemplateExist) {
const pkgJson = require(path_1.default.resolve('package.json'));
const version = pkgJson.dependencies['react-native'] ?? 'VERSION';
cli_tools_1.logger.error('You need to install `@react-native-community/template@' +
version +
'` ' +
'before ejecting.');
process.exit(1);
}
const doesIOSExist = fs_1.default.existsSync(path_1.default.resolve('ios'));

@@ -42,3 +52,3 @@ const doesAndroidExist = fs_1.default.existsSync(path_1.default.resolve('android'));

}
catch (e) {
catch {
cli_tools_1.logger.error('Eject requires an `app.json` config file to be located at ' +

@@ -64,7 +74,7 @@ `${path_1.default.resolve('app.json')}, and it must at least specify a \`name\` for the project ` +

cli_tools_1.logger.info('Generating the iOS folder.');
(0, copyProjectTemplateAndReplace_js_1.default)(path_1.default.resolve('node_modules', 'react-native', 'template', 'ios'), path_1.default.resolve('ios'), appName, templateOptions);
(0, copyProjectTemplateAndReplace_js_1.default)(path_1.default.resolve('node_modules', '@react-native-community/template', 'template', 'ios'), path_1.default.resolve('ios'), appName, templateOptions);
}
if (!doesAndroidExist) {
cli_tools_1.logger.info('Generating the Android folder.');
(0, copyProjectTemplateAndReplace_js_1.default)(path_1.default.resolve('node_modules', 'react-native', 'template', 'android'), path_1.default.resolve('android'), appName, templateOptions);
(0, copyProjectTemplateAndReplace_js_1.default)(path_1.default.resolve('node_modules', '@react-native-community/template', 'template', 'android'), path_1.default.resolve('android'), appName, templateOptions);
}

@@ -71,0 +81,0 @@ }

14

package.json
{
"name": "react-native-eject",
"version": "0.2.0",
"version": "1.0.0",
"description": "Single command to eject a React Native app",

@@ -28,12 +28,12 @@ "main": "dist/eject.js",

"devDependencies": {
"@react-native-community/cli": "^9.3.2",
"@types/node": "^18.11.10",
"@react-native-community/cli": "^15.0.0",
"@types/node": "^22.7.9",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.0",
"typescript": "^4.7.3"
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"prettier": "^3.3.3",
"typescript": "5.1.6"
}
}

@@ -17,2 +17,3 @@ # react-native-eject

| -------------------- | ---------------------------------------------------------------- | -------------- |
| ^1.0.0 | [^15.0.0](https://github.com/react-native-community/cli) | ^0.75.0 |
| ^0.2.0 | [^9.0.0](https://github.com/react-native-community/cli/tree/9.x) | ^0.70.0 |

@@ -19,0 +20,0 @@ | ^0.1.2 | [^8.0.0](https://github.com/react-native-community/cli/tree/8.x) | ^0.69.0 |

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