source-map
Advanced tools
Comparing version 0.1.35 to 0.1.36
# Change Log | ||
## 0.1.36 | ||
* Allow the `names` mapping property to be an empty string. Issue #121. | ||
## 0.1.35 | ||
@@ -4,0 +8,0 @@ |
@@ -104,7 +104,7 @@ /* -*- Mode: js; js-indent-level: 2; -*- */ | ||
if (source && !this._sources.has(source)) { | ||
if (source != null && !this._sources.has(source)) { | ||
this._sources.add(source); | ||
} | ||
if (name && !this._names.has(name)) { | ||
if (name != null && !this._names.has(name)) { | ||
this._names.add(name); | ||
@@ -111,0 +111,0 @@ } |
{ | ||
"name": "source-map", | ||
"description": "Generates and consumes source maps", | ||
"version": "0.1.35", | ||
"version": "0.1.36", | ||
"homepage": "https://github.com/mozilla/source-map", | ||
@@ -30,3 +30,4 @@ "author": "Nick Fitzgerald <nfitzgerald@mozilla.com>", | ||
"azu <azu@users.noreply.github.com>", | ||
"John Gozde <john@gozde.ca>" | ||
"John Gozde <john@gozde.ca>", | ||
"Adam Kirkton <akirkton@truefitinnovation.com>" | ||
], | ||
@@ -33,0 +34,0 @@ "repository": { |
@@ -184,2 +184,20 @@ /* -*- Mode: js; js-indent-level: 2; -*- */ | ||
exports['test that adding a mapping with an empty string name does not break generation'] = function (assert, util) { | ||
var map = new SourceMapGenerator({ | ||
file: 'generated-foo.js', | ||
sourceRoot: '.' | ||
}); | ||
map.addMapping({ | ||
generated: { line: 1, column: 1 }, | ||
source: 'bar.js', | ||
original: { line: 1, column: 1 }, | ||
name: '' | ||
}); | ||
assert.doesNotThrow(function () { | ||
JSON.parse(map.toString()); | ||
}); | ||
}; | ||
exports['test that source content can be set'] = function (assert, util) { | ||
@@ -186,0 +204,0 @@ var map = new SourceMapGenerator({ |
Sorry, the diff of this file is not supported yet
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
175460
4136