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

webext-schema

Package Overview
Dependencies
Maintainers
1
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webext-schema - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

35

modules/browser.js

@@ -427,17 +427,23 @@ /**

*
* @param {string} [extId] - extension ID
* @param {number|string} [id] - tab ID / extension ID
* @param {object} [info] - info
* @returns {object} - runtime.Port
*/
export const makeConnection = async (extId, info) => {
export const makeConnection = async (id, info) => {
let port;
if (isString(extId)) {
if (Number.isInteger(id)) {
if (isObjectNotEmpty(info)) {
port = await runtime.connect(extId, info);
port = await tabs.connect(id, info);
} else {
port = await runtime.connect(extId);
port = await tabs.connect(id);
}
} else if (isObjectNotEmpty(extId)) {
port = await runtime.connect(extId);
} else if (!extId && isObjectNotEmpty(info)) {
} else if (isString(id)) {
if (isObjectNotEmpty(info)) {
port = await runtime.connect(id, info);
} else {
port = await runtime.connect(id);
}
} else if (isObjectNotEmpty(id)) {
port = await runtime.connect(id);
} else if (!id && isObjectNotEmpty(info)) {
port = await runtime.connect(info);

@@ -732,13 +738,8 @@ } else {

try {
const isGranted = await isPermissionGranted({
permissions: ['activeTab']
});
if (Number.isInteger(tabId)) {
res = await tabs.executeScript(tabId, opt);
} else if (isGranted) {
if (isObjectNotEmpty(tabId)) {
res = await tabs.executeScript(tabId);
} else {
res = await tabs.executeScript(opt);
}
} else if (isObjectNotEmpty(tabId)) {
res = await tabs.executeScript(tabId);
} else if (isObjectNotEmpty(opt)) {
res = await tabs.executeScript(opt);
} else {

@@ -745,0 +746,0 @@ res = null;

@@ -69,3 +69,3 @@ /**

const items = /Object/i.test(getType(o)) && Object.keys(o);
return !!(items && items.length);
return !!(items?.length);
};

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

@@ -171,5 +171,3 @@ /**

for (const item of items) {
if (!excludeFile.includes(item)) {
func.push(getSchemaData(item, schemaUrl));
}
!excludeFile.includes(item) && func.push(getSchemaData(item, schemaUrl));
}

@@ -176,0 +174,0 @@ return Promise.all(func);

@@ -39,8 +39,8 @@ {

"devDependencies": {
"c8": "^7.11.2",
"c8": "^7.11.3",
"chai": "^4.3.6",
"eslint": "^8.15.0",
"eslint": "^8.16.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.2.9",
"eslint-plugin-jsdoc": "^39.3.2",
"eslint-plugin-node": "^11.1.0",

@@ -52,3 +52,3 @@ "eslint-plugin-promise": "^6.0.0",

},
"version": "3.0.1"
"version": "3.0.2"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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