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 history info for URLSearchParams #55840

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

skyclouds2001
Copy link
Contributor

@skyclouds2001 skyclouds2001 commented Nov 13, 2024

Refs: #17365
Refs: #9484
Refs: #7448
Refs: #10801
Refs: mdn/browser-compat-data#24998

Add version table for:

Test screenshots taken from mdn/browser-compat-data#24998:

image

image

image

image

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. url Issues and PRs related to the legacy built-in url module. labels Nov 13, 2024
@skyclouds2001 skyclouds2001 marked this pull request as ready for review November 13, 2024 19:14
doc/api/url.md Outdated
@@ -771,10 +771,22 @@ console.log(myURL.href);

#### `new URLSearchParams()`

<!-- YAML
added:
- v7.0.0
Copy link
Member

Choose a reason for hiding this comment

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

The class was added in v7.5.0 and the constructor in v7.0.0 🤔 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops! my mistake

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think those additions are adding much, it's already implied that if there are no history data, it inherits from the class, having redundant info only increases the risk to let a mistake pass through

Copy link
Contributor

@aduh95 aduh95 Nov 13, 2024

Choose a reason for hiding this comment

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

OK, so the nuance is that require('url').URLSearchParams only existed after 7.5.0 (021338d), but the actual class was added along the rest of the URL API (a8ece14) and was accessible via new URL().searchParams. I wonder if any of our user would be sensible to the nuance – hopefully there are no v7.x users left so it doesn't matter anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's true that this history info may be useless for users (it's quite impossible to see v7.x users left)

But it is required in some cases, like browser-compat-data. And it is normal way to add history info for every single feature (especially for new features, like web crypto, web stream, worker threads). Also, parent feature and children feature are not always have the same history info, like in this PR.

@aduh95
Copy link
Contributor

aduh95 commented Nov 14, 2024

The commit message does not match the changes

@skyclouds2001
Copy link
Contributor Author

The commit message does not match the changes

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants