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

@react-native-community/cli-platform-ios

Package Overview
Dependencies
Maintainers
29
Versions
209
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-platform-ios - npm Package Compare versions

Comparing version 2.0.0-rc.2 to 2.0.0-rc.3

build/config/findPodspec.js

8

build/commands/runIOS/index.js

@@ -282,3 +282,9 @@ "use strict";

return `build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app`;
let buildPath = `build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app`; // Check wether app file exist, sometimes `-derivedDataPath` option of `xcodebuild` not works as expected.
if (!_fs().default.existsSync(_path().default.join(buildPath))) {
return `DerivedData/Build/Products/${configuration}-${device}/${appName}.app`;
}
return buildPath;
}

@@ -285,0 +291,0 @@

10

build/config/index.js

@@ -23,3 +23,3 @@ "use strict";

var _findPodspecName = _interopRequireDefault(require("./findPodspecName"));
var _findPodspec = _interopRequireDefault(require("./findPodspec"));

@@ -71,8 +71,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const sourceDir = _path().default.dirname(projectPath);
return {
sourceDir: _path().default.dirname(projectPath),
sourceDir,
folder,
pbxprojPath: _path().default.join(projectPath, 'project.pbxproj'),
podfile: (0, _findPodfilePath.default)(projectPath),
podspec: userConfig.podspec || (0, _findPodspecName.default)(folder),
podspecPath: userConfig.podspecPath || // podspecs are usually placed in the root dir of the library or in the
// iOS project path
(0, _findPodspec.default)(folder) || (0, _findPodspec.default)(sourceDir),
projectPath,

@@ -79,0 +83,0 @@ projectName: _path().default.basename(projectPath),

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

var _getPodspecName = _interopRequireDefault(require("../config/getPodspecName"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**

@@ -25,6 +29,7 @@ * Copyright (c) Facebook, Inc. and its affiliates.

*
* @format
*
*/
function addPodEntry(podLines, linesToAddEntry, podName, nodePath) {
const newEntry = `pod '${podName}', :path => '../node_modules/${nodePath}'\n`;
function addPodEntry(podLines, linesToAddEntry, podspecPath, nodeModulePath) {
const podName = (0, _getPodspecName.default)(podspecPath);
const newEntry = `pod '${podName}', :path => '../node_modules/${nodeModulePath}'\n`;

@@ -31,0 +36,0 @@ if (!linesToAddEntry) {

@@ -15,3 +15,3 @@ "use strict";

*
* @format
*
*/

@@ -18,0 +18,0 @@ const MARKER_TEXT = '# Add new pods below this line';

@@ -10,2 +10,4 @@ "use strict";

var _getPodspecName = _interopRequireDefault(require("../config/getPodspecName"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -27,3 +29,3 @@

const dependencyRegExp = new RegExp(`pod\\s+('|")${dependencyConfig.podspec}('|")`, 'g');
const dependencyRegExp = new RegExp(`pod\\s+('|")${(0, _getPodspecName.default)(dependencyConfig.podspecPath)}('|")`, 'g');
const podLines = (0, _readPodfile.default)(iOSProject.podfile);

@@ -30,0 +32,0 @@

@@ -50,8 +50,8 @@ "use strict";

*
* @format
*
*/
function registerNativeModulePods(name, dependencyConfig, iOSProject) {
function registerNativeModulePods(name, podspecPath, iOSProject) {
const podLines = (0, _readPodfile.default)(iOSProject.podfile);
const linesToAddEntry = getLinesToAddEntry(podLines, iOSProject);
(0, _addPodEntry.default)(podLines, linesToAddEntry, dependencyConfig.podspec, name);
(0, _addPodEntry.default)(podLines, linesToAddEntry, podspecPath, name);
(0, _savePodFile.default)(iOSProject.podfile, podLines);

@@ -58,0 +58,0 @@ }

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

var _getPodspecName = _interopRequireDefault(require("../config/getPodspecName"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**

@@ -27,4 +31,5 @@ * Copyright (c) Facebook, Inc. and its affiliates.

*/
function removePodEntry(podfileContent, podName) {
// this regex should catch line(s) with full pod definition, like: pod 'podname', :path => '../node_modules/podname', :subspecs => ['Sub2', 'Sub1']
function removePodEntry(podfileContent, podspecPath) {
const podName = (0, _getPodspecName.default)(podspecPath); // this regex should catch line(s) with full pod definition, like: pod 'podname', :path => '../node_modules/podname', :subspecs => ['Sub2', 'Sub1']
const podRegex = new RegExp(`\\n( |\\t)*pod\\s+("|')${podName}("|')(,\\s*(:[a-z]+\\s*=>)?\\s*(("|').*?("|')|\\[[\\s\\S]*?\\]))*\\n`, 'g');

@@ -31,0 +36,0 @@

@@ -47,3 +47,3 @@ "use strict";

const removed = (0, _removePodEntry.default)(podContent, dependencyConfig.podspec);
const removed = (0, _removePodEntry.default)(podContent, dependencyConfig.podspecPath);

@@ -50,0 +50,0 @@ _cliTools().logger.debug(`Writing changes to ${iOSProject.podfile}`);

@@ -20,7 +20,7 @@ "use strict";

*
* @format
*
*/
function registerNativeModule(name, dependencyConfig, params, projectConfig) {
if (projectConfig.podfile && dependencyConfig.podspec) {
(0, _registerNativeModule2.default)(name, dependencyConfig, projectConfig);
if (projectConfig.podfile && dependencyConfig.podspecPath) {
(0, _registerNativeModule2.default)(name, dependencyConfig.podspecPath, projectConfig);
} else {

@@ -27,0 +27,0 @@ (0, _registerNativeModule.default)(dependencyConfig, projectConfig);

@@ -82,3 +82,3 @@ "use strict";

*
* @format
*
*/

@@ -85,0 +85,0 @@

{
"name": "@react-native-community/cli-platform-ios",
"version": "2.0.0-rc.2",
"version": "2.0.0-rc.3",
"main": "build/index.js",
"dependencies": {
"@react-native-community/cli-tools": "^2.0.0-rc.2",
"@react-native-community/cli-tools": "^2.0.0-rc.3",
"chalk": "^1.1.1",

@@ -14,3 +14,3 @@ "xcode": "^2.0.0"

],
"gitHead": "caaacb36ffdc29de8236afd46cf72b9428b391ab"
"gitHead": "de936f6caa933ab46991b231cd294f727be53589"
}

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