Socket
Socket
Sign inDemoInstall

babel-plugin-module-resolver

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 3.1.3 to 3.2.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="3.2.0"></a>
# [3.2.0](https://github.com/tleunen/babel-plugin-module-resolver/compare/v3.1.3...v3.2.0) (2019-02-11)
### Features
* **dev:** add loglevel to configure console logging ([#351](https://github.com/tleunen/babel-plugin-module-resolver/issues/351)) ([d4a596c](https://github.com/tleunen/babel-plugin-module-resolver/commit/d4a596c))
<a name="3.1.3"></a>

@@ -7,0 +17,0 @@ ## [3.1.3](https://github.com/tleunen/babel-plugin-module-resolver/compare/v3.1.2...v3.1.3) (2019-01-21)

@@ -110,2 +110,6 @@ "use strict";

function normalizeLoglevel(optsLoglevel) {
return optsLoglevel || 'warn';
}
var _default = (0, _reselect.createSelector)( // The currentFile should have an extension; otherwise it's considered a special value

@@ -116,2 +120,3 @@ currentFile => currentFile.includes('.') ? _path.default.dirname(currentFile) : currentFile, (_, opts) => opts, (currentFile, opts) => {

const alias = normalizeAlias(opts.alias);
const loglevel = normalizeLoglevel(opts.loglevel);
const transformFunctions = normalizeTransformedFunctions(opts.transformFunctions);

@@ -125,2 +130,3 @@ const extensions = opts.extensions || defaultExtensions;

alias,
loglevel,
transformFunctions,

@@ -127,0 +133,0 @@ extensions,

6

lib/resolvePath.js

@@ -55,6 +55,6 @@ "use strict";

function checkIfPackageExists(modulePath, currentFile, extensions) {
function checkIfPackageExists(modulePath, currentFile, extensions, loglevel) {
const resolvedPath = (0, _utils.nodeResolvePath)(modulePath, currentFile, extensions);
if (resolvedPath === null) {
if (resolvedPath === null && loglevel !== 'silent') {
(0, _log.warn)(`Could not resolve "${modulePath}" in file ${currentFile}.`);

@@ -86,3 +86,3 @@ }

if (process.env.NODE_ENV !== 'production') {
checkIfPackageExists(aliasedSourceFile, currentFile, opts.extensions);
checkIfPackageExists(aliasedSourceFile, currentFile, opts.extensions, opts.loglevel);
}

@@ -89,0 +89,0 @@

{
"name": "babel-plugin-module-resolver",
"version": "3.1.3",
"version": "3.2.0",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "description": "Module resolver plugin for Babel",

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