docs: improve JSDoc for version comparison methods #822
+15
−4
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.
🎨 Palette: DX/UX Improvement
💡 What:
Improved JSDoc comments in
src/types.tsandsrc/index.tsto explicitly document edge case behaviors (fail-closed on invalid input) and strict equality nuances.🎯 Why:
For a library, the "User" is the Developer. Improving Developer Experience (DX) via clear, accessible documentation reduces confusion and potential bugs (e.g., expecting
is('v20.0.0')to work when it requires strict matching). This aligns with Palette's mission to improve interface accessibility—in this case, the API interface.♿ Accessibility (DX):
falsereturns for invalid strings.vprefix handling foris().Verified implementation behavior with a script to ensure documentation matches reality.
PR created automatically by Jules for task 12459724324433348593 started by @srod
Summary by cubic
Updated JSDoc for version checks to clarify that is() uses strict equality (no 'v' prefix normalization) and that all comparison methods return false on invalid version strings. Added a link to the Node.js release schedule in the EOL_DATES docs.
Written for commit 1a6aa99. Summary will update on new commits.