Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix Incorrect order in util.parseArgs history #45726

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/util.md
Expand Up @@ -1380,15 +1380,15 @@ added:
- v18.3.0
- v16.17.0
changes:
- version: v18.11.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not seem correct. We put the most recent change first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original issue is the result of the sorting done here

meta.changes.sort((a, b) => versionSort(a.version, b.version));

The versions in the meta.changes array are

['v18.11.0', ['v18.7.0', 'v16.17.0'], 'v18.3.0']

and versionSort() uses the min version ('v16.17.0'), so the array is sorted as follows:

['v18.11.0', 'v18.3.0', ['v18.7.0', 'v16.17.0']]

pr-url: https://github.com/nodejs/node/pull/44631
description: Add support for default values in input `config`.
- version:
- version:
- v18.7.0
- v16.17.0
pr-url: https://github.com/nodejs/node/pull/43459
description: add support for returning detailed parse information
using `tokens` in input `config` and returned properties.
- version: v18.11.0
pr-url: https://github.com/nodejs/node/pull/44631
description: Add support for default values in input `config`.
-->

> Stability: 1 - Experimental
Expand Down