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

sitemap

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sitemap - npm Package Versions

1
8

6.1.1

Diff

Changelog

Source

6.1.1

  • Fix #286 sitemapindex tag not closing for deprecated createSitemapsAndIndex
derduher
published 6.1.0 •

Changelog

Source

6.1.0

  • Added back xslUrl option removed in 5.0.0
ekalinin
published 6.0.0 •

Changelog

Source

6.0.0

  • removed xmlbuilder as a dependency
  • added stronger validity checking on values supplied to sitemap
  • Added the ability to turn off or add custom xml namespaces
  • CLI and library now can accept a stream which will automatically write both the index and the sitemaps. See README for usage.
ekalinin
published 5.1.0 •

Changelog

Source

5.1.0

Fix for #255. Baidu does not like timestamp in its sitemap.xml, this adds an option to truncate lastmod

new SitemapStream({ lastmodDateOnly: true });
ekalinin
published 5.0.1 •

Changelog

Source

5.0.1

Fix for issue #254.

warning: failed to load external entity "./schema/all.xsd"
Schemas parser error : Failed to locate the main schema resource at './schema/all.xsd'.
WXS schema ./schema/all.xsd failed to compile
ekalinin
published 5.0.0 •

Changelog

Source

5.0.0

Streams

This release is heavily focused on converting the core methods of this library to use streams. Why? Overall its made the API ~20% faster and uses only 10% or less of the memory. Some tradeoffs had to be made as in their nature streams are operate on individual segments of data as opposed to the whole. For instance, the streaming interface does not support removal of sitemap items as it does not hold on to a sitemap item after its converted to XML. It should however be possible to create your own transform that filters out entries should you desire it. The existing synchronous interfaces will remain for this release at least. Do not be surprised if they go away in a future breaking release.

Sitemap Index

This library interface has been overhauled to use streams internally. Although it would have been preferable to convert this to a stream as well, I could not think of an interface that wouldn't actually end up more complex or confusing. It may be altered in the near future to accept a stream in addition to a simple list.

Misc

  • runnable examples, some pulled straight from README have been added to the examples directory.
  • createSitemapsIndex was renamed createSitemapsAndIndex to more accurately reflect its function. It now returns a promise that resolves to true or throws with an error.
  • You can now add to existing sitemap.xml files via the cli using npx sitemap --prepend existingSitemap.xml < listOfNewURLs.json.txt

5.0 Breaking Changes

  • Dropped support for mobile sitemap - Google appears to have deleted their dtd and all references to it, strongly implying that they do not want you to use it. As its absence now breaks the validator, it has been dropped.
  • normalizeURL(url, XMLRoot, hostname) -> normalizeURL(url, hostname)
    • The second argument was unused and has been eliminated
  • Support for Node 8 dropped - Node 8 is reaching its EOL December 2019
  • xslURL is being dropped from all apis - styling xml is out of scope of this library.
  • createSitemapIndex has been converted to a promised based api rather than callback.
  • createSitemapIndex now gzips by default - pass gzip: false to disable
  • cacheTime is being dropped from createSitemapIndex - This didn't actually cache the way it was written so this should be a non-breaking change in effect.
  • SitemapIndex as a class has been dropped. The class did all its work on construction and there was no reason to hold on to it once you created it.
  • The options for the cli have been overhauled
    • --json is now inferred
    • --line-separated has been flipped to --single-line-json to by default output options immediately compatible with feeding back into sitemap
ekalinin
published 4.1.1 •

Changelog

Source

4.1.1

Add a pretty print option to toString(false) pass true pretty print

Add an xmlparser that will output a config that would generate that same file

cli: use --parser to output the complete config --line-separated to print out line separated config compatible with the --json input option for cli

lib: import parseSitemap and pass it a stream

ekalinin
published 4.0.2 •

Changelog

Source

4.0.2

Fix npx script error - needs the shebang

ekalinin
published 4.0.1 •

Changelog

Source

4.0.1

Validation functions which depend on xmllint will now warn if you do not have xmllint installed.

ekalinin
published 3.2.2 •

Changelog

Source

3.2.2

  • revert https everywhere added in 3.2.0. xmlns is not url.
  • adds alias for lastmod in the form of lastmodiso
  • fixes bug in lastmod option for buildSitemapIndex where option would be overwritten if a lastmod option was provided with a single url
  • fixes #201, fixes #203
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