source-map
Advanced tools
Comparing version 0.1.37 to 0.1.38
# Change Log | ||
## 0.1.38 | ||
* Fix a bug where finding relative paths from an empty path were creating | ||
absolute paths. See issue #129. | ||
## 0.1.37 | ||
@@ -4,0 +9,0 @@ |
@@ -195,2 +195,6 @@ /* -*- Mode: js; js-indent-level: 2; -*- */ | ||
function relative(aRoot, aPath) { | ||
if (aRoot === "") { | ||
aRoot = "."; | ||
} | ||
aRoot = aRoot.replace(/\/$/, ''); | ||
@@ -197,0 +201,0 @@ |
{ | ||
"name": "source-map", | ||
"description": "Generates and consumes source maps", | ||
"version": "0.1.37", | ||
"version": "0.1.38", | ||
"homepage": "https://github.com/mozilla/source-map", | ||
@@ -6,0 +6,0 @@ "author": "Nick Fitzgerald <nfitzgerald@mozilla.com>", |
@@ -206,4 +206,12 @@ /* -*- Mode: js; js-indent-level: 2; -*- */ | ||
assert.equal(libUtil.relative('/the/root', '/the/rootone.js'), '/the/rootone.js'); | ||
assert.equal(libUtil.relative('', '/the/root/one.js'), '/the/root/one.js'); | ||
assert.equal(libUtil.relative('.', '/the/root/one.js'), '/the/root/one.js'); | ||
assert.equal(libUtil.relative('', 'the/root/one.js'), 'the/root/one.js'); | ||
assert.equal(libUtil.relative('.', 'the/root/one.js'), 'the/root/one.js'); | ||
assert.equal(libUtil.relative('/', '/the/root/one.js'), 'the/root/one.js'); | ||
assert.equal(libUtil.relative('/', 'the/root/one.js'), 'the/root/one.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
183998
38
4333