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

babel-plugin-module-alias

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

babel-plugin-module-alias - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

17

lib/index.js

@@ -11,7 +11,8 @@ 'use strict';

var result = {};
if (!Array.isArray(state.opts)) {
state.opts = [state.opts];
var opts = state.opts;
if (!Array.isArray(opts)) {
opts = [opts];
}
state.opts.forEach(function (moduleMapData) {
opts.forEach(function (moduleMapData) {
result[moduleMapData.expose] = moduleMapData.src;

@@ -23,2 +24,8 @@ });

function resolve(filename) {
if (path.isAbsolute(filename)) return filename;
if (process.env.PWD) return path.resolve(process.env.PWD, filename);
return path.resolve(filename);
}
function mapToRelative(currentFile, module) {

@@ -28,4 +35,4 @@ var from = path.dirname(currentFile);

from = path.isAbsolute(from) ? from : path.resolve(process.env.PWD, from);
to = path.isAbsolute(to) ? to : path.resolve(process.env.PWD, to);
from = resolve(from);
to = resolve(to);

@@ -32,0 +39,0 @@ var moduleMapped = path.relative(from, to);

{
"name": "babel-plugin-module-alias",
"version": "1.1.0",
"version": "1.1.1",
"main": "lib/index.js",

@@ -24,8 +24,8 @@ "description": "Babel plugin to rewrite the path in require() and ES6 import",

"devDependencies": {
"babel-cli": "^6.1.4",
"babel-core": "^6.1.4",
"babel-preset-es2015": "^6.1.4",
"eslint": "^1.7.3",
"eslint-config-airbnb": "^2.0.0",
"mocha": "^2.3.3"
"babel-cli": "^6.4.0",
"babel-core": "^6.4.0",
"babel-preset-es2015": "^6.3.13",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^3.1.0",
"mocha": "^2.3.4"
},

@@ -32,0 +32,0 @@ "scripts": {

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