Skip to content

lib: revokeObjectURL throws error on empty args - #50433

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
DylanTet:local-branch
Nov 30, 2023
Merged

lib: revokeObjectURL throws error on empty args#50433
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
DylanTet:local-branch

Conversation

@DylanTet

Copy link
Copy Markdown
Contributor

Fixes: #50432

Added a check to see if url wasnt included as an argument which will then throw an error.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/url

@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 Oct 27, 2023

@anonriganonrig left a comment

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.

Can you add a test as well?

Comment threadlib/internal/url.js Outdated
Comment threadlib/internal/url.js Outdated
@DylanTet

Copy link
Copy Markdown
ContributorAuthor

@anonrig yessir ill knock that out

@DylanTet

Copy link
Copy Markdown
ContributorAuthor

@anonrig just added the test for the function

Comment threadtest/parallel/test-url-revokeobjecturl.js Outdated
Comment threadtest/parallel/test-url-revokeobjecturl.js Outdated

@jasnelljasnell left a comment

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.

LGTM with some linting fixes

@deokjinkimdeokjinkim left a comment

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.

First line of commit message has to be started with imperative verb. For example, url: check argument length of revokeObjectURL. Could you please modify first line of commit message?

Refs: https://github.com/nodejs/node/blob/main/doc/contributing/pull-requests.md#commit-message-guidelines

Comment threadlib/internal/url.js Outdated
Comment threadtest/parallel/test-url-revokeobjecturl.js Outdated
@DylanTetDylanTet changed the title lib: revokeObjectURL throws error if arg length is 0 in url.jsurl: check argument length of revokeObjectURLOct 29, 2023
@H4ad

H4ad commented Oct 29, 2023

Copy link
Copy Markdown
Member

@DylanTet can you remove the unnecessary commits? The PR was polluted because of them, but in general, it looks great.

@DylanTet

Copy link
Copy Markdown
ContributorAuthor

@H4ad just removed the other commits, sorry about that, I am still getting better at git :)

@H4adH4ad added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Oct 29, 2023
@H4ad

H4ad commented Oct 29, 2023

Copy link
Copy Markdown
Member

@DylanTet Can you rename the message of the first commit?

https://github.com/nodejs/node/actions/runs/6683924004/job/18160770160?pr=50433

It should be less than 50 characters, maybe something like: lib: revokeObjectURL throws error on empty args.

You should also fix the linting errors: https://github.com/nodejs/node/actions/runs/6683924005/job/18160770724?pr=50433

You can test locally using make lint-js or make lint-md.

Comment threadtest/parallel/test-url-revokeobjecturl.js Outdated
@DylanTetDylanTet changed the title url: check argument length of revokeObjectURLlib: revokeObjectURL throws error on empty argsOct 30, 2023

@lpincalpinca left a comment

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.

LGTM with lint errors and commit message title fixed.

@shubham9411

Copy link
Copy Markdown
Contributor

Hey @DylanTet, Are you working on this?

@DylanTet

Copy link
Copy Markdown
ContributorAuthor

@shubham9411 i am, last I remember I updated the PR but it's still waiting review

@shubham9411

Copy link
Copy Markdown
Contributor

@DylanTet, I think you just need to rename the first commit message as H4ad suggested above.

@DylanTet

Copy link
Copy Markdown
ContributorAuthor

@shubham9411 done :)

@H4ad

H4ad commented Nov 26, 2023

Copy link
Copy Markdown
Member

@DylanTet the first message is still failing the CI, did you forgot to push?

@deokjinkimdeokjinkim added request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Nov 28, 2023
Added a check to see if url wasn't included as an argument
which will then throw an error.
Fixes: nodejs#50432
@deokjinkimdeokjinkim added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 28, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 28, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@H4adH4ad added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 30, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 30, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 2f40652 into nodejs:mainNov 30, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 2f40652

targos pushed a commit that referenced this pull request Dec 4, 2023
Added a check to see if url wasn't included as an argument
which will then throw an error.
Fixes: #50432
PR-URL: #50433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
@targostargos mentioned this pull request Dec 4, 2023
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Added a check to see if url wasn't included as an argument
which will then throw an error.
Fixes: #50432
PR-URL: #50433
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
@richardlaurichardlau mentioned this pull request Mar 25, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.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.

URL: URL.revokeObjectURL accepts no parameters when 1 is required

9 participants

@DylanTet@nodejs-github-bot@H4ad@shubham9411@jasnell@lpinca@anonrig@deokjinkim@himself65