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

gulp-sitemap

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-sitemap - npm Package Compare versions

Comparing version 4.2.0 to 4.3.0

16

index.js
'use strict';
var chalk = require('chalk');
var defaults = require('lodash/defaults');
var gutil = require('gulp-util');
var log = require('fancy-log');
var path = require('path');
var PluginError = require('plugin-error');
var through = require('through2');
var Vinyl = require('vinyl');

@@ -17,3 +19,3 @@ var pluginName = 'gulp-sitemap';

mappings: [],
newLine: gutil.linefeed,
newLine: '\n',
priority: undefined,

@@ -29,7 +31,7 @@ spacing: ' ',

msg = 'siteUrl is a required param';
throw new gutil.PluginError(pluginName, msg);
throw new PluginError(pluginName, msg);
}
if (options.changeFreq) {
msg = chalk.magenta('changeFreq') + ' has been deprecated. Please use ' + chalk.cyan('changefreq');
throw new gutil.PluginError(pluginName, msg);
throw new PluginError(pluginName, msg);
}

@@ -49,3 +51,3 @@ // site url should have a trailing slash

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

@@ -73,6 +75,6 @@

msg = 'Files in sitemap: ' + entries.length;
gutil.log(pluginName, msg);
log(pluginName, msg);
}
//create and push new vinyl file for sitemap
this.push(new gutil.File({
this.push(new Vinyl({
cwd: firstFile.cwd,

@@ -79,0 +81,0 @@ base: firstFile.cwd,

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

@@ -38,7 +38,9 @@ "repository": "pgilad/gulp-sitemap",

"chalk": "^1.1.1",
"gulp-util": "^3.0.7",
"fancy-log": "^1.3.2",
"lodash": "^4.6.1",
"multimatch": "^2.0.0",
"plugin-error": "^0.1.2",
"slash": "^1.0.0",
"through2": "^2.0.0"
"through2": "^2.0.0",
"vinyl": "^2.1.0"
},

@@ -45,0 +47,0 @@ "devDependencies": {

@@ -182,3 +182,4 @@ # [gulp](https://github.com/wearefractal/gulp)-sitemap

getLoc(siteUrl, loc, entry) {
return loc.substr(0, loc.lastIndexOf('.')) || loc; // Removes the file extension
// Removes the file extension if it exists
return loc.replace(/\.\w+$/, '');
},

@@ -238,3 +239,3 @@ hreflang: [{

getLoc: function(siteUrl, loc, entry) {
return loc.substr(0, loc.lastIndexOf('.')) || loc; // Removes the file extension
return loc.replace(/\.\w+$/, '');
}

@@ -241,0 +242,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