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

@universal-packages/adapter-resolver

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@universal-packages/adapter-resolver - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

18

gatherAdapters.js

@@ -19,14 +19,8 @@ "use strict";

const moduleExportNameCRegex = `.*${(0, change_case_1.pascalCase)(type)}$`;
const moduleExportNameA = Object.keys(importedModule).find((key) => !!new RegExp(moduleExportNameARegex).exec(key));
const moduleExportNameB = Object.keys(importedModule).find((key) => !!new RegExp(moduleExportNameBRegex).exec(key));
const moduleExportNameC = Object.keys(importedModule).find((key) => !!new RegExp(moduleExportNameCRegex).exec(key));
if (moduleExportNameA) {
gatheredAdapters.push(importedModule[moduleExportNameA]);
}
else if (moduleExportNameB) {
gatheredAdapters.push(importedModule[moduleExportNameB]);
}
else if (moduleExportNameC) {
gatheredAdapters.push(importedModule[moduleExportNameC]);
}
const matchingExportKeys = Object.keys(importedModule)
.filter((key) => {
return !!new RegExp(moduleExportNameARegex).exec(key) || !!new RegExp(moduleExportNameBRegex).exec(key) || !!new RegExp(moduleExportNameCRegex).exec(key);
})
.map((moduleName) => importedModule[moduleName]);
gatheredAdapters.push(...matchingExportKeys);
}

@@ -33,0 +27,0 @@ catch (error) {

{
"name": "@universal-packages/adapter-resolver",
"version": "1.3.1",
"version": "1.4.0",
"description": "Module loader based on adapter parameters.",

@@ -5,0 +5,0 @@ "author": "David De Anda <david@universal-packages.com> (https://github.com/universal-packages)",

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