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

jscrambler-metro-plugin

Package Overview
Dependencies
Maintainers
7
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jscrambler-metro-plugin - npm Package Compare versions

Comparing version 6.0.1 to 6.0.3

8

lib/index.js

@@ -259,2 +259,4 @@ const {copy, emptyDir, mkdirp, readFile, writeFile} = require('fs-extra');

const bundlePath = getBundlePath();
// make sure jscrambler-metro-plugin is properly configure on metro bundler
let calledByMetro = false;
const fileNames = new Set();

@@ -276,2 +278,6 @@ const sourceMapFiles = [];

try{
if (!calledByMetro) {
throw new Error('*jscrambler-metro-plugin* was not properly configured on metro.config.js file. Please verify our documentation in https://docs.jscrambler.com/code-integrity/frameworks-and-libraries/react-native/integration.');
}
console.log(

@@ -302,2 +308,4 @@ instrument

processModuleFilter(_module) {
calledByMetro = true;
const modulePath = _module.path;

@@ -304,0 +312,0 @@ const shouldSkipModule = !validateModule(modulePath, config, projectRoot);

4

lib/utils.js

@@ -228,6 +228,6 @@ const fs = require('fs');

const addBundleArgsToExcludeList = (chunk, excludeList) => {
const regex = /\(([0-9a-zA-Z_,]+)\){$/gm;
const regex = /\(([0-9a-zA-Z_,$ ]+)\)[ ]?{$/gm;
const m = regex.exec(chunk);
if (Array.isArray(m) && m.length > 1) {
for (const arg of m[1].split(",")) {
for (const arg of m[m.length - 1].split(",")) {
if (!excludeList.includes(arg)) {

@@ -234,0 +234,0 @@ excludeList.push(arg);

{
"name": "jscrambler-metro-plugin",
"version": "6.0.1",
"version": "6.0.3",
"description": "A plugin to use metro with Jscrambler",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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