Socket
Socket
Sign inDemoInstall

source-map

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-map - npm Package Compare versions

Comparing version 0.1.35 to 0.1.36

4

CHANGELOG.md
# Change Log
## 0.1.36
* Allow the `names` mapping property to be an empty string. Issue #121.
## 0.1.35

@@ -4,0 +8,0 @@

4

lib/source-map/source-map-generator.js

@@ -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

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