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
url: add value argument to has and delete methods #47885
url: add value argument to has and delete methods #47885
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution.
Can you run git node wpt url
and update URL web-platform tests? You need to install node-core-utils
in order to get access to the script.
Additionally, can you update the documentation url.md
to reflect the changes?
@anonrig Yes, I will update the documentation accordingly. |
6514d52
to
7cc66e4
Compare
@anonrig need your help. one of the WPT is not working.
|
I think it's supposed to fail because the URLSearchParams interface changes haven't reached the main branch. https://github.com/whatwg/url/pull/735/files
|
@anonrig need your help with above. |
Hey the spec PR has landed, I am restarting the CI jobs should pass now i think |
Ah i think setting |
Thanks @debadree25 I think that fixed it. |
The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete. Fixes: nodejs#47883
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are failing due to the WPT update, and unrelated to this pull request. I'll update the WPT in a different pull request and fix the issues, leaving you to only implement what this pull request was originally intended to include.
Edit: Actually it seems they are related. Only updating the WPT did not break any tests. @sankalp1999
I synced my branch, made a new node build. then ran A couple of tests are failing. These are different from the ones that are failing in the PR (edit: I mean Github workflow). I will paste those messages in the next comment for visibility.
|
Landed in 9f3aacb |
Thank you for your contribution @sankalp1999 🎉🎉 |
This is my first contribution to node. Looking forward to contribute more in the future. I am grateful to @anonrig , @debadree25 and all the reviewers who helped me and reviewed my code. I also improved my learning of the node repository and got an idea of how things work here. Thanks a lot folks. |
The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete. Fixes: #47883 PR-URL: #47885 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete. Fixes: #47883 PR-URL: #47885 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Notable changes: doc: * add ovflowd to collaborators (Claudio Wunder) #47844 http: * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) #47732 sea: * (SEMVER-MINOR) add option to disable the experimental SEA warning (Darshan Sen) #47588 test_runner: * (SEMVER-MINOR) add `skip`, `todo`, and `only` shorthands to `test` (Chemi Atlow) #47909 url: * (SEMVER-MINOR) add value argument to `URLSearchParams` `has` and `delete` methods (Sankalp Shubham) #47885 PR-URL: #48020
Notable changes: doc: * add ovflowd to collaborators (Claudio Wunder) #47844 http: * (SEMVER-MINOR) prevent writing to the body when not allowed by HTTP spec (Gerrard Lindsay) #47732 sea: * (SEMVER-MINOR) add option to disable the experimental SEA warning (Darshan Sen) #47588 test_runner: * (SEMVER-MINOR) add `skip`, `todo`, and `only` shorthands to `test` (Chemi Atlow) #47909 url: * (SEMVER-MINOR) add value argument to `URLSearchParams` `has` and `delete` methods (Sankalp Shubham) #47885 PR-URL: #48020
This PR includes a change in |
I'll try to land it in the current v18.18.0 proposal and run CI to see how it looks like, in case CI is green this should be good to go. |
The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete. Fixes: #47883 PR-URL: #47885 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Notable changes: crypto: * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 doc: * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: crypto: * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 doc: * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: crypto: * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 doc: * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: crypto: * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 doc: * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: build: * sync libuv header change (Jiawen Geng) #48078 crypto: * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 deps: * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078 * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078 * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078 doc: * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596 fs, stream: * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: build: * sync libuv header change (Jiawen Geng) #48078 crypto: * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341 * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 deps: * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078 * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078 * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078 doc: * add atlowChemi to collaborators (atlowChemi) #48757 * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596 fs, stream: * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: build: * sync libuv header change (Jiawen Geng) #48078 crypto: * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341 * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 deps: * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078 * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078 * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078 doc: * add atlowChemi to collaborators (atlowChemi) #48757 * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596 fs, stream: * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: build: * sync libuv header change (Jiawen Geng) #48078 crypto: * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341 * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 deps: * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078 * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078 * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078 doc: * add atlowChemi to collaborators (atlowChemi) #48757 * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596 fs, stream: * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: build: * sync libuv header change (Jiawen Geng) #48078 crypto: * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341 * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416 deps: * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078 * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078 * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078 doc: * add atlowChemi to collaborators (atlowChemi) #48757 * add vmoroz to collaborators (Vladimir Morozov) #48527 * add kvakil to collaborators (Keyhan Vakil) #48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596 fs, stream: * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518 net: * add autoSelectFamily global getter and setter (Paolo Insogna) #45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885 PR-URL: #49220
Notable changes: build: * sync libuv header change (Jiawen Geng) nodejs#48078 crypto: * update root certificates to NSS 3.93 (Node.js GitHub Bot) nodejs#49341 * update root certificates to NSS 3.90 (Node.js GitHub Bot) nodejs#48416 deps: * add missing thread-common.c in uv.gyp (Santiago Gimeno) nodejs#48078 * upgrade to libuv 1.46.0 (Santiago Gimeno) nodejs#48078 * upgrade to libuv 1.45.0 (Santiago Gimeno) nodejs#48078 doc: * add atlowChemi to collaborators (atlowChemi) nodejs#48757 * add vmoroz to collaborators (Vladimir Morozov) nodejs#48527 * add kvakil to collaborators (Keyhan Vakil) nodejs#48449 esm: * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) nodejs#43942 events: * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) nodejs#48596 fs, stream: * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) nodejs#48518 net: * add autoSelectFamily global getter and setter (Paolo Insogna) nodejs#45777 url: * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) nodejs#47885 PR-URL: nodejs#49220
The change aims to add value argument to two methods of URLSearchParams class i.e the has method and the delete method. For has method, if value argument is provided, then use it to check for presence. For delete method, if value argument provided, use it to delete.
Fixes: #47883