Socket
Socket
Sign inDemoInstall

gulp-sitemap

Package Overview
Dependencies
72
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.1.0

26

index.js

@@ -21,15 +21,18 @@ 'use strict';

});
var entries = [];
var firstFile;
var msg;
if (!config.siteUrl) {
throw new gutil.PluginError(pluginName, 'siteUrl is a required param');
msg = 'siteUrl is a required param';
throw new gutil.PluginError(pluginName, msg);
}
if (options.changeFreq) {
gutil.log(pluginName, chalk.magenta('changeFreq') + ' has been deprecated. Please use ' + chalk.cyan('changefreq'));
msg = chalk.magenta('changeFreq') + ' has been deprecated. Please use ' + chalk.cyan('changefreq');
gutil.log(pluginName, msg);
config.changefreq = options.changeFreq;
}
if (config.siteUrl.slice(-1) !== '/') {
config.siteUrl += '/';
config.siteUrl = config.siteUrl + '/';
}
var entries = [];
var firstFile;

@@ -43,3 +46,4 @@ return through.obj(function (file, enc, callback) {

if (file.isStream()) {
return callback(new gutil.PluginError(pluginName, 'Streaming not supported'));
msg = 'Streaming not supported';
return callback(new gutil.PluginError(pluginName), msg);
}

@@ -52,4 +56,7 @@

firstFile = firstFile || file;
var entry = sitemap.getEntryConfig(file.relative, file.stat && file.stat.mtime, config);
if (!firstFile) {
firstFile = file;
}
var mtime = file.stat ? file.stat.mtime : null;
var entry = sitemap.getEntryConfig(file.relative, mtime, config);
entries.push(entry);

@@ -64,3 +71,4 @@ callback();

if (options.verbose) {
gutil.log(pluginName, 'Files in sitemap:', entries.length);
msg = 'Files in sitemap: ' + entries.length;
gutil.log(pluginName, msg);
}

@@ -67,0 +75,0 @@ //create and push new vinyl file for sitemap

'use strict';
var slash = require('slash');
var multimatch = require('multimatch');
var contains = require('lodash.contains');
var includes = require('lodash.includes');

@@ -113,3 +113,3 @@ //TODO: export this to an external module

}
return contains(validChangefreqs, changefreq.toLowerCase());
return includes(validChangefreqs, changefreq.toLowerCase());
}

@@ -116,0 +116,0 @@

{
"name": "gulp-sitemap",
"version": "2.0.2",
"version": "2.1.0",
"description": "Generate a search engine friendly sitemap.xml using a Gulp stream",

@@ -37,15 +37,15 @@ "repository": "pgilad/gulp-sitemap",

"dependencies": {
"chalk": "^0.5.1",
"gulp-util": "^3.0.1",
"lodash.contains": "^2.4.1",
"lodash.defaults": "^2.4.1",
"chalk": "^1.0.0",
"gulp-util": "^3.0.4",
"lodash.defaults": "^3.1.1",
"lodash.includes": "^3.1.1",
"multimatch": "^2.0.0",
"slash": "^1.0.0",
"through2": "^0.6.3"
"through2": "^0.6.5"
},
"devDependencies": {
"gulp": "^3.8.10",
"mocha": "*",
"should": "*"
"gulp": "^3.8.11",
"mocha": "^2.2.4",
"should": "^6.0.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc