insert-module-globals
Advanced tools
Comparing version 7.0.0 to 7.0.1
11
index.js
@@ -12,6 +12,13 @@ var parseScope = require('lexical-scope'); | ||
var relpath = path.relative(path.dirname(fromPath), fullPath); | ||
if (relpath[0] !== "." && relpath[0] !== "/") { | ||
// If fullPath is in the same directory as fromPath, relpath will | ||
// result in something like "index.js". require() needs "./" prepended | ||
// to these paths. | ||
if (path.dirname(relpath) === '.') { | ||
relpath = "./" + relpath; | ||
} | ||
return relpath.replace(/\\/g, '/'); | ||
// On Windows: Convert path separators to what require() expects | ||
if (path.sep === '\\') { | ||
relpath = relpath.replace(/\\/g, '/'); | ||
} | ||
return relpath; | ||
} | ||
@@ -18,0 +25,0 @@ |
{ | ||
"name": "insert-module-globals", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "insert implicit module globals into a module-deps stream", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25325
549