New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

forcereact

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forcereact - npm Package Compare versions

Comparing version 10.1.1 to 10.2.0

38

package.json
{
"name": "forcereact",
"version": "10.1.1",
"description": "Utilities for creating react native mobile apps based on the Salesforce Mobile SDK for iOS and Android",
"keywords": [ "mobilesdk", "ios", "android", "react", "salesforce", "mobile", "sdk" ],
"homepage": "https://github.com/forcedotcom/SalesforceMobileSDK-Package",
"bugs": "https://github.com/forcedotcom/SalesforceMobileSDK-Package/issues",
"licenses" : [
{ "type": "Salesforce.com Mobile SDK License", "url": "https://github.com/forcedotcom/SalesforceMobileSDK-iOS/blob/master/LICENSE.md" }
],
"bin" : { "forcereact" : "forcereact.js" },
"name": "forcereact",
"version": "10.2.0",
"description": "Utilities for creating react native mobile apps based on the Salesforce Mobile SDK for iOS and Android",
"keywords": [ "mobilesdk", "ios", "android", "react", "salesforce", "mobile", "sdk" ],
"homepage": "https://github.com/forcedotcom/SalesforceMobileSDK-Package",
"bugs": "https://github.com/forcedotcom/SalesforceMobileSDK-Package/issues",
"licenses" : [
{ "type": "Salesforce.com Mobile SDK License", "url": "https://github.com/forcedotcom/SalesforceMobileSDK-iOS/blob/master/LICENSE.md" }
],
"bin" : { "forcereact" : "forcereact.js" },
"dependencies": {
"shelljs": "0.8.4",
"ajv": "^6.10.2",
"jsonlint": "^1.6.3"
"shelljs": "0.8.5",
"ajv": "^8.11.0",
"jsonlint": "^1.6.3"
},
"repository": {
"type" : "git",
"url" : "https://github.com/forcedotcom/SalesforceMobileSDK-Package.git"
},
"author": { "name": "Wolfgang Mathurin", "email": "wmathurin@salesforce.com" },
"contributors": [
"repository": {
"type" : "git",
"url" : "https://github.com/forcedotcom/SalesforceMobileSDK-Package.git"
},
"author": { "name": "Wolfgang Mathurin", "email": "wmathurin@salesforce.com" },
"contributors": [
{ "name": "Bharath Hariharan", "email": "bhariharan@salesforce.com" }
]
}

@@ -31,3 +31,3 @@ /*

var VERSION= '10.1.1';
var VERSION= '10.2.0';

@@ -66,6 +66,6 @@ module.exports = {

minVersion: '11.0.0',
pluginRepoUri: 'https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v' + VERSION, // GA
pluginRepoUri: 'salesforce-mobilesdk-cordova-plugin@v' + VERSION, // GA
platformVersion: {
ios: '6.2.0',
android: '10.1.1'
android: '11.0.0'
}

@@ -72,0 +72,0 @@ },

@@ -51,7 +51,2 @@ /*

if (config.platform === 'ios' && config.apptype === 'react_native') {
// Use legacy build
useLegacyBuild(config, 'ios');
}
// Cleanup

@@ -71,3 +66,3 @@ utils.removeFile(path.join(config.projectDir, 'template.js'));

utils.runProcessThrowError('cordova create "' + config.projectDir + '" ' + config.packagename + ' ' + config.appname);
utils.runProcessThrowError('npm install shelljs@0.8.4', config.projectDir);
utils.runProcessThrowError('npm install shelljs@0.8.5', config.projectDir);

@@ -120,12 +115,19 @@ for (var platform of config.platform.split(',')) {

if (config.platform === 'ios') {
// Use legacy build
useLegacyBuild(config, path.join('platforms', 'ios'));
if (utils.getToolVersion('xcodebuild -version') < 14000000) {
// Use legacy build for xcode 13 and older
useLegacyBuild(config, path.join('platforms', 'ios'));
// Removing libCordova.a from build (it causes issues e.g. CDVWKWebViewEngine won't register as plugin because it won't be recognized as a kind of CDVPlugin)
utils.logInfo('Updating xcode project file');
var xcodeProjectFile = path.join(config.projectDir,'platforms', 'ios', config.appname + '.xcodeproj', 'project.pbxproj')
var xcodeProjectFileContent = fs.readFileSync(xcodeProjectFile, 'utf8');
var newXcodeProjectFileContent = xcodeProjectFileContent.split('\n').filter(line => line.indexOf('libCordova.a in Frameworks') == -1).join('\n');
fs.writeFileSync(xcodeProjectFile, newXcodeProjectFileContent);
utils.logInfo('Updated xcode project file');
// Removing libCordova.a from build (it causes issues e.g. CDVWKWebViewEngine won't register as plugin because it won't be recognized as a kind of CDVPlugin)
utils.logInfo('Updating xcode project file');
var xcodeProjectFile = path.join(config.projectDir,'platforms', 'ios', config.appname + '.xcodeproj', 'project.pbxproj')
var xcodeProjectFileContent = fs.readFileSync(xcodeProjectFile, 'utf8');
var newXcodeProjectFileContent = xcodeProjectFileContent.split('\n').filter(line => line.indexOf('libCordova.a in Frameworks') == -1).join('\n');
fs.writeFileSync(xcodeProjectFile, newXcodeProjectFileContent);
utils.logInfo('Updated xcode project file');
} else {
// Patch podfile for xcode 14
fixPods(config, path.join('platforms', 'ios'));
}
}

@@ -161,2 +163,27 @@

//
// Patch pod file for hybrid apps on xcode 14
//
function fixPods(config, iosSubDir) {
var iosDir = path.join(config.projectDir, iosSubDir)
var podfilePath = path.join(iosDir, 'Podfile');
var originalPodfileContent = fs.readFileSync(podfilePath, 'utf8');
var preInstallCode = "\n" +
"$dynamic_framework = ['SalesforceAnalytics', 'SalesforceSDKCore', 'SalesforceSDKCommon', 'SmartStore', 'FMDB', 'SQLCipher', 'MobileSync']\n" +
"pre_install do |installer|\n" +
" installer.pod_targets.each do |pod|\n" +
" if $dynamic_framework.include?(pod.name)\n" +
" def pod.build_type\n" +
" Pod::BuildType.dynamic_framework\n" +
" end\n" +
" end\n" +
" end\n" +
"end"
utils.logInfo('Updating Podfile for project ' + config.appname);
fs.writeFileSync(podfilePath, originalPodfileContent.replace("use_frameworks!","") + preInstallCode);
utils.runProcessThrowError('pod update', iosDir);
}
//
// Print details

@@ -163,0 +190,0 @@ //

@@ -88,3 +88,3 @@ /*

/**
* Checks the the version of a tool by running the given command
* Checks the version of a tool by running the given command
*

@@ -98,13 +98,3 @@ * @param {String} cmd Command to run to get the tool version

function checkToolVersion(cmd, minVersionRequired, maxVersionSupported) {
var toolName = cmd.split(' ')[0];
var toolVersion;
try {
var result = runProcessThrowError(cmd, null, true /* return output */);
toolVersion = result.replace(/\r?\n|\r/, '').replace(/[^0-9\.]*/, '');
}
catch (error) {
throw new Error(toolName + ' is required but could not be found. Please install ' + toolName + '.');
}
var toolVersionNum = getVersionNumberFromString(toolVersion);
var toolVersionNum = getToolVersion(cmd);
var minVersionRequiredNum = getVersionNumberFromString(minVersionRequired);

@@ -126,3 +116,24 @@

/**
* Returns the version of a tool as a number by running the given command
*
* @param {String} cmd Command to run to get the tool version
* @return {Number} The numeric version number, or 0 if the version string isn't a valid format.
*/
function getToolVersion(cmd) {
var toolName = cmd.split(' ')[0];
var toolVersion;
try {
var result = runProcessThrowError(cmd, null, true /* return output */);
toolVersion = result.replace(/\r?\n|\r/, '').replace(/[^0-9\.]*/, '');
}
catch (error) {
throw new Error(toolName + ' is required but could not be found. Please install ' + toolName + '.');
}
var toolVersionNum = getVersionNumberFromString(toolVersion);
return toolVersionNum;
}
/**

@@ -438,2 +449,3 @@ * Replaces text in a file

dirExists,
getToolVersion,
getVersionNumberFromString,

@@ -440,0 +452,0 @@ log,

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