Add Node.js 24 LTS support (second atempt) #913
Merged
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.
Checklist
CHANGES.md) or test/build only changesDescription
Resolve issues and add Node.js 24 LTS to supported engines.
Fixes i508
Approach
feat: add Node.js 24 LTS to enginesfix: don't call pause/resume after closecloseevent to aonceand added a flag to mark when it closed and avoid calling pause/resume after that.closedproperty, but it is undocumented, so I decided to add our own flagSee also: nodejs/node#58283 and nodejs/node#60507
patternand it did not actually do it. The issue was only exposed intermittently depending on the chunks. Here switch to usingreplaceAllwith the string instead.fix: force escape unicode for Node.js 24 readlinereadlineaddingU+2028andU+2029to the possible line endings - this has the effect of breaking the reading of jsonlines files (like the backup file) where any of the JSON values contain those characters.LinerPassThroughto aTransformthat escapes those characters to e.g.\u2028which can be safely read asU+2028byJSON.parse(as JSON allows for any unicode character to be optionally escaped)fix: add liner sanitize option and use for restorefrom Add Node.js 24 LTS to supported engines #905 squashed in.U+2028orU+2029so there is no need to waste effort doing the escaping when reading those files.sanitizeoption to theLinerconstructor that defaults tofalseand set it totruefor processing a backup file.See also nodejs/node#57591 and nodejs/node#60606
fix: avoid write after destroy errors on Node 24targetWritable.destroyedproperty before writingSee also nodejs/node#55270
Schema & API Changes
Security and Privacy
Testing
Monitoring and Logging