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

react-native\packages\react-native\Libraries\Blob\URL.js Changes #48333

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

Conversation

bobbysharma05
Copy link

@bobbysharma05 bobbysharma05 commented Dec 19, 2024

SUMMARY

The URL class was refactored to handle blob URLs more effectively, improving URL construction and parsing. Changes include better error handling in the createObjectURL method and the addition of functions to extract URL components like username, host, and protocol.

Changelog:

  • Replaced static URL construction with dynamic initialization using NativeBlobModule.
  • Enhanced createObjectURL with better validation and error handling.
  • Added methods to extract URL components (username, host, protocol).
  • Cleaned up unnecessary code for better readability.

Test Plan:

  • Test createObjectURL with valid and invalid Blob data.
  • Verify that URL components (hostname, pathname, etc.) are parsed correctly.
  • Test integration with URLSearchParams for query handling.

@facebook-github-bot
Copy link
Contributor

Hi @bobbysharma05!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@react-native-bot
Copy link
Collaborator

react-native-bot commented Dec 19, 2024

Fails
🚫

📋 Verify Changelog Format - See Changelog format

Generated by 🚫 dangerJS against d4174f6

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 19, 2024
@cipolleschi
Copy link
Contributor

Hi @bobbysharma05, thanks for working on this.
Could you please add a Summary explaining the changes and a Changelog in the PR, following the suggested structure?

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

Code changes look good to me, but the PR is missing information in the Description.
We can't import without Summary, Changelog and TestPlan

@cipolleschi
Copy link
Contributor

Also, the test_js signal is failing, can you have a look at it?

@bobbysharma05
Copy link
Author

ok sir I will look into it and also add the summary.

@bobbysharma05
Copy link
Author

Sir I am new to the open source. Could you please help me in which part I am getting stuck.

@cipolleschi
Copy link
Contributor

When a new pr is open, we provide a template that has to be filled. For the Changelog, specifically, it has to follow a predefined format, which is described here.

For this pr, it should be something like:

[General][Fixed] -  implemented missing methods on URL.js

For the failures, you can click on the failed signals in the github UI and read through the logs, looking for the errors (the search function is your friend).

For example, the linter says that the community-cli-plugin has been built and it should not. If you inspect the changed files, you see that you committed a package.json that should not be committed.

The test_js says that there is an invalid expression at line 25 of the URL.js file.

Build_android failure is related to the failure for the linter, so it should be fixed by reverting the changes in the community-cli-plugin/package.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants