Skip to content

url,lib: pass urlsearchparams-constructor.any.js - #41197

Closed
XadillaX wants to merge 1 commit into
nodejs:masterfrom
XadillaX:urlsearchparams-constructor.any.js-2
Closed

url,lib: pass urlsearchparams-constructor.any.js#41197
XadillaX wants to merge 1 commit into
nodejs:masterfrom
XadillaX:urlsearchparams-constructor.any.js-2

Conversation

@XadillaX

Copy link
Copy Markdown
Contributor

NOTE: It's a reopening of #39944 because that PR was stuck.

According to WPT:

  1. URLSearchParams constructor should throw exactly TypeError if any
    Error occurrs.
  2. When a record passed to URLSearchParams constructor, two different
    key may result same after toUVString(). We should leave only the
    later one.

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Dec 16, 2021
}

getcode(){return'ERR_INVALID_THIS';}
functionthrowInvalidThisError(Base,type){

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.

Is the change to domexception.js related to the urlsearchparams change? If it is, it's not clear how. Also, it would likely be better to separate this out into a separate commit in the PR if it is related.

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.

This modification is to pass urlsearchparams-contructor.any.js too.

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.

URLSearchParams constructor should throw exactly TypeError if any Error occurrs but not inheritance.

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.

Comment threadlib/internal/url.js Outdated
@XadillaX
XadillaXforce-pushed the urlsearchparams-constructor.any.js-2 branch from c2e77f2 to c0a9720CompareDecember 20, 2021 06:00
According to WPT:
1. `URLSearchParams` constructor should throw exactly `TypeError` if any
Error occurrs.
2. When a record passed to `URLSearchParams` constructor, two different
key may result same after `toUVString()`. We should leave only the
later one.
@XadillaX
XadillaXforce-pushed the urlsearchparams-constructor.any.js-2 branch from c0a9720 to 59e2c32CompareDecember 20, 2021 06:04
@XadillaX

Copy link
Copy Markdown
ContributorAuthor

/ping @aduh95

@XadillaX

Copy link
Copy Markdown
ContributorAuthor

@addaleax Hi Anna, would you please take a look at this PR?

@XadillaX

Copy link
Copy Markdown
ContributorAuthor

/cc @watilde

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

XadillaX added a commit that referenced this pull request Jan 11, 2022
According to WPT:
1. `URLSearchParams` constructor should throw exactly `TypeError` if any
Error occurrs.
2. When a record passed to `URLSearchParams` constructor, two different
key may result same after `toUVString()`. We should leave only the
later one.
PR-URL: #41197
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
@XadillaX

XadillaX commented Jan 11, 2022

Copy link
Copy Markdown
ContributorAuthor

Landed in 38b7961

@aduh95

Copy link
Copy Markdown
Contributor

denoland/deno@b8303c7

Did you mean: "Landed in 38b7961"? 😅

@XadillaX

Copy link
Copy Markdown
ContributorAuthor

denoland/deno@b8303c7

Did you mean: "Landed in 38b7961"? 😅

Yes. I think I copied the wrong text🙈

targos pushed a commit that referenced this pull request Jan 14, 2022
According to WPT:
1. `URLSearchParams` constructor should throw exactly `TypeError` if any
Error occurrs.
2. When a record passed to `URLSearchParams` constructor, two different
key may result same after `toUVString()`. We should leave only the
later one.
PR-URL: #41197
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
@targostargos mentioned this pull request Jan 16, 2022
targos pushed a commit that referenced this pull request Jul 31, 2022
According to WPT:
1. `URLSearchParams` constructor should throw exactly `TypeError` if any
Error occurrs.
2. When a record passed to `URLSearchParams` constructor, two different
key may result same after `toUVString()`. We should leave only the
later one.
PR-URL: #41197
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
@targostargos mentioned this pull request Aug 3, 2022
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
According to WPT:
1. `URLSearchParams` constructor should throw exactly `TypeError` if any
Error occurrs.
2. When a record passed to `URLSearchParams` constructor, two different
key may result same after `toUVString()`. We should leave only the
later one.
PR-URL: nodejs/node#41197
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@XadillaX@nodejs-github-bot@aduh95@jasnell@Lxxyx@targos