Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
metro-resolver
Advanced tools
The metro-resolver npm package is a module resolution library used primarily in the Metro bundler, which is the JavaScript bundler for React Native. It helps in resolving modules by locating and identifying the correct files within a project's structure based on specific resolution rules and configurations.
Custom Resolution Strategies
Allows the implementation of custom resolution strategies for modules, enabling developers to define how modules are resolved based on the platform or other conditions.
const { resolve } = require('metro-resolver');
const context = { originModulePath: '/path/to/module.js', redirectModulePath: undefined, resolveRequest: null, platform: 'ios', moduleName: './otherModule' };
const result = resolve(context, moduleName, platform);
Platform Specific Resolutions
Supports resolving platform-specific versions of modules, such as distinguishing between iOS and Android specific code files in a React Native project.
const { resolve } = require('metro-resolver');
const context = { originModulePath: '/path/to/module.js', redirectModulePath: undefined, resolveRequest: null, platform: 'android', moduleName: './component' };
const result = resolve(context, moduleName, platform);
A module resolution package similar to metro-resolver but more generic and not tied to any specific framework or platform. It provides a greater level of customization and is used in various Node.js environments.
Part of the webpack ecosystem, enhanced-resolve is used to resolve files and directories in a highly configurable manner. It offers more features and plugins compared to metro-resolver, tailored for web development environments.
🚇 Metro resolution logic
FAQs
🚇 Implementation of Metro's resolution logic.
The npm package metro-resolver receives a total of 2,176,867 weekly downloads. As such, metro-resolver popularity was classified as popular.
We found that metro-resolver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.