Skip to content

doc: fix history info for URLSearchParams - #55840

Open
skyclouds2001 wants to merge 1 commit into
nodejs:mainfrom
skyclouds2001:history-URLSearchParams
Open

doc: fix history info for URLSearchParams#55840
skyclouds2001 wants to merge 1 commit into
nodejs:mainfrom
skyclouds2001:history-URLSearchParams

Conversation

@skyclouds2001

@skyclouds2001skyclouds2001 commented Nov 13, 2024

Copy link
Copy Markdown
Contributor

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-botnodejs-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
Comment threaddoc/api/url.md Outdated
@@ -771,10 +771,22 @@ console.log(myURL.href);

#### `new URLSearchParams()`

<!-- YAML
added:
- v7.0.0

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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

@aduh95aduh95Nov 13, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

The commit message does not match the changes

@skyclouds2001

Copy link
Copy Markdown
ContributorAuthor

The commit message does not match the changes

Fixed!

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.staleurlIssues 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

@skyclouds2001@aduh95@lpinca@nodejs-github-bot