chore(deps): update dependency sitemap to v9#220
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d71dba0 to
550dcaa
Compare
|
Thank you for following the naming conventions! 🙏 |
550dcaa to
b41fccb
Compare
b41fccb to
b476639
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
8.0.2→9.0.0Release Notes
ekalinin/sitemap.js (sitemap)
v9.0.0Compare Source
This major release modernizes the package with ESM-first architecture, drops support for Node.js < 20, and includes comprehensive security and robustness improvements.
[BREAKING CHANGES]
Dropped Node.js < 20 Support
ESM Conversion with Dual Package Support
Package now uses
"type": "module"in package.jsonBuilt as dual ESM/CJS package with conditional exports
Import paths in ESM require
.jsextensions (TypeScript will add these automatically)Both ESM and CommonJS imports continue to work:
CLI remains ESM-only at
dist/esm/cli.jsBuild Output Changes
dist/esm/(wasdist/)dist/cjs/(new)dist/esm/index.d.ts(wasdist/index.d.ts)Node.js Modernization
node:protocol imports (node:stream,node:fs, etc.)pipelinefromnode:stream/promises(instead ofpromisify(pipeline))New Exports
The following validation functions and constants are now part of the public API:
Validation Functions (from
lib/validation.js):validateURL(),validatePath(),validateLimit(),validatePublicBasePath(),validateXSLUrl()isPriceType(),isResolution(),isValidChangeFreq(),isValidYesNo(),isAllowDeny()validators- object containing regex validators for all sitemap fieldsConstants (from
lib/constants.js):LIMITS- security limits object (max URL length, max items per sitemap, video/news/image constraints, etc.)DEFAULT_SITEMAP_ITEM_LIMIT- default items per sitemap file (45,000)New Type Export:
SimpleSitemapAndIndexOptionsinterface now exportedFeatures
Comprehensive Security Validation
Parser Security (#461): Added resource limits and comprehensive validation to sitemap index parser and stream
..sequences)Stream Validation (#456, #455, #454): Added comprehensive validation to all stream classes
>character)XML Generation Security (#457): Comprehensive validation and documentation in sitemap-xml
Robustness Improvements
Fixes
Refactoring
lib/constants.ts- single source of truth for all shared constantslib/validation.ts- centralized all validation logic and type guardsInfrastructure
Build System
tsconfig.json- ESM build (NodeNext module resolution)tsconfig.cjs.json- CJS build (CommonJS module)package.jsonwith"type": "commonjs"todist/cjs/Testing
.mjsformatDependencies
saxfrom ^1.2.4 to ^1.4.1@types/nodefrom ^17.0.5 to ^24.7.2Developer Experience
Upgrade Guide for 9.0.0
1. Update Node.js Version
Ensure you are running Node.js >=20.19.5 and npm >=10.8.2:
2. Update Package
3. Import Syntax (No Changes Required for Most Users)
Both ESM and CommonJS imports continue to work:
Note: If you're importing from the package in an ESM context, the module resolution happens automatically. If you're directly importing library files (not recommended), you'll need
.jsextensions.4. Existing Code Compatibility
ErrorLevel.WARNdefault behavior maintained5. TypeScript Users
tsconfig.jsonif needed to support ES2023dist/esm/index.d.ts(automatically resolved by package.json exports)6. New Optional Features
You can now import validation utilities and constants if needed:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.