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

@vxapp/resolve

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vxapp/resolve - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

23

index.js

@@ -20,3 +20,3 @@ const fs = require('fs');

const e = path.join(c, d);
return e;
return e.indexOf('.') === 0 ? e : `./${e}`;
};

@@ -77,15 +77,20 @@

const getOutputFileName = (filename, { source, target }) => {
var output = filename.replace(source, target);
if(~filename.indexOf('node_modules')){
const dir = getModulePath(filename);
const pkg = require(path.join(dir, 'package.json'));
const npm = path.join(target, 'npm', `${pkg.name}-${pkg.version}`);
output = filename.replace(dir, npm);
}
return output;
};
const createResolver = ({ source, target, current, extensions }) => {
const basedir = path.dirname(current);
const filename = current.replace(source, target);
const filename = getOutputFileName(current, { source, target });
return name => {
const ref = resolve(name, { basedir, extensions });
if(!ref) throw new Error(`[@vxapp/resolve] can not found module: "${name}" `);
var output = ref.replace(source, target);
if(~ref.indexOf('node_modules')){
const dir = getModulePath(ref);
const pkg = require(path.join(dir, 'package.json'));
const npm = path.join(target, 'npm', `${pkg.name}-${pkg.version}`);
output = ref.replace(dir, npm);
}
const output = getOutputFileName(ref, { source, target });
return {

@@ -92,0 +97,0 @@ source,

{
"name": "@vxapp/resolve",
"version": "0.0.11",
"version": "0.0.12",
"description": "resolve npm modules",

@@ -21,3 +21,3 @@ "keywords": [

},
"gitHead": "7787bf09096686206ef0b336b72a1522f8df39c7"
"gitHead": "9274896b556c2c0398843838cacfce4631b0abe3"
}
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