Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-sourcemaps

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

gulp-sourcemaps - npm Package Compare versions

Comparing version 2.6.4 to 2.6.5

2

package.json
{
"name": "gulp-sourcemaps",
"version": "2.6.4",
"version": "2.6.5",
"description": "Source map support for Gulp.js",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/gulp-sourcemaps/gulp-sourcemaps",

@@ -22,36 +22,34 @@ 'use strict';

var commentFormatters = {
css: function cssCommentFormatter(preLine, newline, url) {
return preLine + "/*# sourceMappingURL=" + url + " */" + newline;
},
js: function jsCommentFormatter(preLine, newline, url) {
return preLine + "//# sourceMappingURL=" + url + newline;
},
'default': function defaultFormatter() {
return '';
}
}
var getCommentFormatter = function (file) {
var extension = file.relative.split('.').pop(),
fileContents = file.contents.toString(),
newline = detectNewline.graceful(fileContents || ''),
commentFormatter = function(url) {
return '';
};
fileContents = file.contents.toString(),
newline = detectNewline.graceful(fileContents || '');
if (file.sourceMap.preExistingComment){
debug(function() { return 'preExistingComment commentFormatter'; });
commentFormatter = function(url) {
return "//# sourceMappingURL=" + url + newline;
};
return commentFormatter;
}
var commentFormatter = commentFormatters.default;
switch (extension) {
case 'css':
debug(function() { return 'css commentFormatter';});
commentFormatter = function(url) {
return newline + "/*# sourceMappingURL=" + url + " */" + newline;
};
break;
case 'js':
debug(function() { return 'js commentFormatter'; });
commentFormatter = function(url) {
return newline + "//# sourceMappingURL=" + url + newline;
};
break;
default:
debug(function() { return 'unknown commentFormatter'; });
if (file.sourceMap.preExistingComment) {
commentFormatter = (commentFormatters[extension] || commentFormatter).bind(undefined, '', newline)
debug(function () {
return 'preExistingComment commentFormatter ' + commentFormatter.name;
});
} else {
commentFormatter = (commentFormatters[extension] || commentFormatter).bind(undefined, newline, newline);
}
debug(function () {
return 'commentFormatter ' + commentFormatter.name;
});
return commentFormatter;

@@ -58,0 +56,0 @@ };

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