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

@react-native-community/cli-hermes

Package Overview
Dependencies
Maintainers
41
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-hermes - npm Package Compare versions

Comparing version 6.3.0 to 7.0.1

src/index.ts

4

build/profileHermes/downloadProfile.d.ts

@@ -10,4 +10,6 @@ import { Config } from '@react-native-community/cli-types';

* @param generateSourceMap
* @param appId
* @param appIdSuffix
*/
export declare function downloadProfile(ctx: Config, dstPath: string, filename?: string, sourcemapPath?: string, raw?: boolean, shouldGenerateSourcemap?: boolean, port?: string): Promise<void>;
export declare function downloadProfile(ctx: Config, dstPath: string, filename?: string, sourcemapPath?: string, raw?: boolean, shouldGenerateSourcemap?: boolean, port?: string, appId?: string, appIdSuffix?: string): Promise<void>;
//# sourceMappingURL=downloadProfile.d.ts.map

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

* Get the last modified hermes profile
* @param packageName
* @param packageNameWithSuffix
*/
function getLatestFile(packageName) {
function getLatestFile(packageNameWithSuffix) {
try {
const file = (0, _child_process().execSync)(`adb shell run-as ${packageName} ls cache/ -tp | grep -v /$ | grep -E '.cpuprofile' | head -1
const file = (0, _child_process().execSync)(`adb shell run-as ${packageNameWithSuffix} ls cache/ -tp | grep -v /$ | grep -E '.cpuprofile' | head -1
`);

@@ -110,11 +110,13 @@ return file.toString().trim();

* @param generateSourceMap
* @param appId
* @param appIdSuffix
*/
async function downloadProfile(ctx, dstPath, filename, sourcemapPath, raw, shouldGenerateSourcemap, port) {
async function downloadProfile(ctx, dstPath, filename, sourcemapPath, raw, shouldGenerateSourcemap, port, appId, appIdSuffix) {
try {
const androidProject = (0, _cliPlatformAndroid().getAndroidProject)(ctx);
const packageName = (0, _cliPlatformAndroid().getPackageName)(androidProject); // If file name is not specified, pull the latest file from device
const packageNameWithSuffix = [appId || (0, _cliPlatformAndroid().getPackageName)(androidProject), appIdSuffix].filter(Boolean).join('.'); // If file name is not specified, pull the latest file from device
const file = filename || getLatestFile(packageName);
const file = filename || getLatestFile(packageNameWithSuffix);

@@ -134,3 +136,3 @@ if (!file) {

if (raw) {
execSyncWithLog(`adb shell run-as ${packageName} cat cache/${file} > ${dstPath}/${file}`);
execSyncWithLog(`adb shell run-as ${packageNameWithSuffix} cat cache/${file} > ${dstPath}/${file}`);

@@ -144,3 +146,3 @@ _cliTools().logger.success(`Successfully pulled the file to ${dstPath}/${file}`);

execSyncWithLog(`adb shell run-as ${packageName} cat cache/${file} > ${tempFilePath}`); // If path to source map is not given
execSyncWithLog(`adb shell run-as ${packageNameWithSuffix} cat cache/${file} > ${tempFilePath}`); // If path to source map is not given

@@ -147,0 +149,0 @@ if (!sourcemapPath) {

@@ -8,2 +8,4 @@ import { Config } from '@react-native-community/cli-types';

port: string;
appId?: string;
appIdSuffix?: string;
};

@@ -10,0 +12,0 @@ declare function profileHermes([dstPath]: Array<string>, ctx: Config, options: Options): Promise<void>;

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

await (0, _downloadProfile.downloadProfile)(ctx, dstPath, options.filename, options.sourcemapPath, options.raw, options.generateSourcemap, options.port);
await (0, _downloadProfile.downloadProfile)(ctx, dstPath, options.filename, options.sourcemapPath, options.raw, options.generateSourcemap, options.port, options.appId, options.appIdSuffix);
} catch (err) {

@@ -54,2 +54,8 @@ throw err;

default: `${process.env.RCT_METRO_PORT || 8081}`
}, {
name: '--appId <string>',
description: 'Specify an applicationId to launch after build. If not specified, `package` from AndroidManifest.xml will be used.'
}, {
name: '--appIdSuffix <string>',
description: 'Specify an applicationIdSuffix to launch after build.'
}],

@@ -56,0 +62,0 @@ examples: [{

{
"name": "@react-native-community/cli-hermes",
"version": "6.3.0",
"version": "7.0.1",
"license": "MIT",

@@ -11,4 +11,4 @@ "main": "build/index.js",

"dependencies": {
"@react-native-community/cli-platform-android": "^6.3.0",
"@react-native-community/cli-tools": "^6.2.0",
"@react-native-community/cli-platform-android": "^7.0.1",
"@react-native-community/cli-tools": "^7.0.1",
"chalk": "^4.1.2",

@@ -24,3 +24,3 @@ "hermes-profile-transformer": "^0.0.6",

"devDependencies": {
"@react-native-community/cli-types": "^6.0.0",
"@react-native-community/cli-types": "^7.0.1",
"@types/ip": "^1.1.0"

@@ -33,4 +33,3 @@ },

"directory": "packages/cli-hermes"
},
"gitHead": "89a19ed8d05da643f198adf4d82877f795cb4d4a"
}
}

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

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