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

Update nodejs data for URLSearchParams #24998

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

skyclouds2001
Copy link
Contributor

@skyclouds2001 skyclouds2001 commented Nov 8, 2024

Summary

the support for URLSearchParams class is:

  • v7.0.0 - added as an internal instance (can be accessed via URL.prototype.searchParams)
    • constructor
    • append
    • delete
    • set
    • get
    • getAll
    • has
    • toString
    • @@iterator
  • v7.3.0 - exposed via url module, URL.prototype.searchParams no longer returns an empty list
    • keys
    • values
    • forEach
    • entries
  • v7.5.0 - extra support for constructor
    • constructor support a USVString
  • v7.7.0 - support sort() method
  • v7.10.0 - extra support for constructor
    • constructor support a record or sequence
  • v6.13.0 - backlogged url implement

Test results and supporting details

https://nodejs.org/docs/latest/api/globals.html#urlsearchparams
https://nodejs.org/docs/latest/api/url.html#class-urlsearchparams

nodejs/node#7448
https://nodejs.org/en/blog/release/v7.0.0/
https://nodejs.org/en/blog/release/v6.13.0/

nodejs/node#9484
https://nodejs.org/en/blog/release/v7.3.0/
https://nodejs.org/en/blog/release/v6.13.0/

nodejs/node#10399
nodejs/node#10801
nodejs/node#11057
nodejs/node#17365
https://nodejs.org/en/blog/release/v7.5.0/
https://nodejs.org/en/blog/release/v6.13.0/

nodejs/node#11098
https://nodejs.org/en/blog/release/v7.7.0/
https://nodejs.org/en/blog/release/v6.13.0/

nodejs/node#11060
https://nodejs.org/en/blog/release/v7.10.0/

nodejs/node#18281
https://nodejs.org/en/blog/release/v10.0.0/

nodejs/node#47885
https://nodejs.org/en/blog/release/v20.2.0/
https://nodejs.org/en/blog/release/v18.18.0/

image

image

image

image

Related issues

see also #24997
see also nodejs/node#55806

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 8, 2024
@skyclouds2001 skyclouds2001 marked this pull request as ready for review November 8, 2024 09:40
Comment on lines +35 to +40
{
"version_added": "7.0.0",
"version_removed": "7.5.0",
"partial_implementation": true,
"notes": "Only available as an internal instance."
},
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's not exposed to the user, let's remove this entry.

Suggested change
{
"version_added": "7.0.0",
"version_removed": "7.5.0",
"partial_implementation": true,
"notes": "Only available as an internal instance."
},

Copy link
Contributor Author

@skyclouds2001 skyclouds2001 Nov 13, 2024

Choose a reason for hiding this comment

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

though the interface is not exposed directly, it can be accessed via URL.prototype.searchParams (i.e. new url.URL('https://github.com/mdn/browser-compat-data/pull/24998').searchParams.__proto__.constructor is the equal call to URLSearchParams)

api/URLSearchParams.json Outdated Show resolved Hide resolved
Comment on lines +404 to +412
"nodejs": [
{
"version_added": "7.3.0"
},
{
"version_added": "6.13.0",
"version_removed": "7.0.0"
}
],
Copy link
Contributor

Choose a reason for hiding this comment

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

entries() was added in 7.3.0 and apparently not backported: nodejs/node#9484

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +453 to +461
"nodejs": [
{
"version_added": "7.3.0"
},
{
"version_added": "6.13.0",
"version_removed": "7.0.0"
}
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as entries(), forEach() was only added in 7.3.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.

Comment on lines +677 to +685
"nodejs": [
{
"version_added": "7.3.0"
},
{
"version_added": "6.13.0",
"version_removed": "7.0.0"
}
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as entries() and forEach(), keys() was only added in 7.3.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.

Comment on lines +816 to +824
"nodejs": [
{
"version_added": "7.7.0"
},
{
"version_added": "6.13.0",
"version_removed": "7.0.0"
}
],
Copy link
Contributor

Choose a reason for hiding this comment

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

sort() was implemented in nodejs/node#11098 and only backported to 7.7.0.

Suggested change
"nodejs": [
{
"version_added": "7.7.0"
},
{
"version_added": "6.13.0",
"version_removed": "7.0.0"
}
],
"nodejs": {
"version_added": "7.7.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.

see #24998 (comment)

and the test:

image

Comment on lines +908 to +916
"nodejs": [
{
"version_added": "7.3.0"
},
{
"version_added": "6.13.0",
"version_removed": "7.0.0"
}
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as entries(), forEach(), and keys(), values() was only added in 7.3.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.

@@ -896,7 +955,7 @@
"version_added": false
},
"nodejs": {
"version_added": "7.5.0"
"version_added": "6.13.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as here, @@iterator seems to have only been added in 7.3.0.

See: nodejs/node@61d6293#diff-26e6b1e2a90040b1ce20e7f305b2ff3140b483f863ee2573b4c6af9b696ad31eR724

Copy link
Contributor Author

@skyclouds2001 skyclouds2001 Nov 13, 2024

Choose a reason for hiding this comment

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

v7.0.0 support is added here nodejs/node@eaffcf9#diff-26e6b1e2a90040b1ce20e7f305b2ff3140b483f863ee2573b4c6af9b696ad31eR569-R580

per nodejs/node#55806 (comment), the backlog to v6.13.0 is done via nodejs/node#17365, though not mentioned in the release note

and confirmed by test

image

@caugner caugner added the nodejs Data about Node.js label Nov 12, 2024
@github-actions github-actions bot added the data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:browsers 🌍 Data about browsers (versions, release dates, etc). This data is used for validation. nodejs Data about Node.js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants