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

gulp-sourcemaps

Package Overview
Dependencies
Maintainers
1
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.3.1 to 2.4.0

7

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

@@ -10,3 +10,3 @@ "homepage": "http://github.com/floridoo/gulp-sourcemaps",

"lint": "jshint ./src/**/*.js test/*.js",
"test": "npm run lint && faucet test/*.js",
"test": "npm run lint && faucet test/*.js $@",
"tap": "tape test/*.js",

@@ -53,3 +53,4 @@ "cover": "istanbul cover --dir reports/coverage tape \"test/*.js\"",

"object-assign": "^4.1.0",
"tape": "4.X"
"tape": "4.X",
"yargs": "6.6.0"
},

@@ -56,0 +57,0 @@ "files": [

@@ -13,2 +13,6 @@ 'use strict';

var rootDebug = makeDebug(PLUGIN_NAME + ':write:internals');
rootDebug(utils.logCb("options"));
rootDebug(utils.logCb(options));
function setSourceRoot(file) {

@@ -41,17 +45,21 @@ var debug = makeDebug(PLUGIN_NAME + ':write:internals:setSourceRoot');

debug(utils.logCb("file.path: " + file.path));
debug(utils.logCb("file.cwd: " + file.cwd));
debug(utils.logCb("file.base: " + file.base));
file.sourceMap.sources = file.sourceMap.sources.map(function(filePath) {
// keep the references files like ../node_modules within the sourceRoot
debug(utils.logCb("filePath: " + filePath));
debug(utils.logCb("file.path: " + file.path));
debug(utils.logCb("file.cwd: " + file.cwd));
debug(utils.logCb("file.base: " + file.base));
if (!file.dirname){
debug(utils.logCb('!file.dirname'));
filePath = path.join(file.base, filePath).replace(file.cwd, '');
} else {
debug(utils.logCb('file.dirname: ' + file.dirname));
filePath = path.resolve(file.dirname, filePath).replace(file.cwd, '');
if (options.mapSourcesAbsolute === true){
debug(utils.logCb('mapSourcesAbsolute'));
if (!file.dirname){
debug(utils.logCb('!file.dirname'));
filePath = path.join(file.base, filePath).replace(file.cwd, '');
} else {
debug(utils.logCb('file.dirname: ' + file.dirname));
filePath = path.resolve(file.dirname, filePath).replace(file.cwd, '');
}
}
return unixStylePath(filePath);

@@ -58,0 +66,0 @@ });

@@ -17,2 +17,8 @@ 'use strict';

debug(utils.logCb("destPath"));
debug(utils.logCb(destPath));
debug(utils.logCb("original options"));
debug(utils.logCb(options));
if (options === undefined && typeof destPath !== 'string') {

@@ -32,5 +38,4 @@ options = destPath;

debug(function() {
return options;
});
debug(utils.logCb("derrived options"));
debug(utils.logCb(options));

@@ -37,0 +42,0 @@ var internals = internalsInit(destPath, options);

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