pirates
Advanced tools
Comparing version 4.0.3 to 4.0.4
@@ -12,8 +12,7 @@ "use strict"; | ||
var _nodeModulesRegexp = _interopRequireDefault(require("node-modules-regexp")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/* (c) 2015 Ari Porad (@ariporad) <http://ariporad.com>. License: ariporad.mit-license.org */ | ||
// Guard against poorly mocked module constructors. | ||
const nodeModulesRegex = /^(?:.*[\\/])?node_modules(?:[\\/].*)?$/; // Guard against poorly mocked module constructors. | ||
const Module = module.constructor.length > 1 ? module.constructor : _module.default; | ||
@@ -39,3 +38,3 @@ const HOOK_RETURNED_NOTHING_ERROR_MESSAGE = '[Pirates] A hook returned a non-string, or nothing at all! This is a' + ' violation of intergalactic law!\n' + '--------------------\n' + 'If you have no idea what this means or what Pirates is, let me explain: ' + 'Pirates is a module that makes is easy to implement require hooks. One of' + " the require hooks you're using uses it. One of these require hooks" + " didn't return anything from it's handler, so we don't know what to" + ' do. You might want to debug this.'; | ||
if (ignoreNodeModules && _nodeModulesRegexp.default.test(resolvedFilename)) { | ||
if (ignoreNodeModules && nodeModulesRegex.test(resolvedFilename)) { | ||
return false; | ||
@@ -42,0 +41,0 @@ } |
@@ -11,3 +11,2 @@ { | ||
"lint": "eslint --report-unused-disable-directives .", | ||
"prebump": "run-s lint test", | ||
"prepublishOnly": "yarn run build" | ||
@@ -31,5 +30,2 @@ }, | ||
}, | ||
"dependencies": { | ||
"node-modules-regexp": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -51,3 +47,2 @@ "@babel/cli": "^7.0.0", | ||
"mock-require": "^3.0.2", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^13.2.0", | ||
@@ -87,3 +82,3 @@ "prettier": "^1.16.4", | ||
}, | ||
"version": "4.0.3" | ||
"version": "4.0.4" | ||
} |
0
19
13456
200
- Removednode-modules-regexp@^1.0.0
- Removednode-modules-regexp@1.0.0(transitive)