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

Remove node's url from lib/i18n-utils. #38560

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

sgomes
Copy link
Contributor

@sgomes sgomes commented Dec 20, 2019

Also adds a new getUrlFromParts method to lib/url.

Changes proposed in this Pull Request

  • Adds new getUrlFromParts method to lib/url.
  • Remove usage of node's deprecated url module from lib/i18n-utils.
  • Drive-by lint fixes.

Testing instructions

Ensure that the unit tests for lib/i18n-utils continue to work correctly.

Also adds a new `getUrlFromParts` to `lib/url`.
@sgomes sgomes added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Janitorial labels Dec 20, 2019
@sgomes sgomes requested a review from a team December 20, 2019 15:59
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~1661 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-domains-landing      -9675 B  (-1.8%)    -3562 B  (-2.4%)
entry-main                 +2208 B  (+0.1%)     +640 B  (+0.2%)
entry-login                +2208 B  (+0.2%)     +634 B  (+0.2%)
entry-gutenboarding        +2208 B  (+0.1%)     +627 B  (+0.1%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~124829 bytes added 📈 [gzipped])

name         parsed_size            gzip_size
post-editor    +488725 B  (+34.1%)  +124829 B  (+31.3%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@griffbrad griffbrad left a comment

Choose a reason for hiding this comment

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

🚢 Tests well for me. Also, thanks for the globalThis/window tidying.

@sgomes
Copy link
Contributor Author

sgomes commented Jan 6, 2020

Thanks for the review, @griffbrad !

@sgomes sgomes merged commit 6d0dacc into master Jan 6, 2020
@sgomes sgomes deleted the update/remove-url-from-i18n-utils branch January 6, 2020 10:12
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 6, 2020
griffbrad added a commit that referenced this pull request Jan 6, 2020
griffbrad added a commit that referenced this pull request Jan 6, 2020
* Revert "Remove node's url from lib/i18n-utils. (#38560)"

This reverts commit 6d0dacc.

*  Add globalThis back to fetch call to avoid linter noise.
@griffbrad
Copy link
Contributor

griffbrad commented Jan 6, 2020

@sgomes We reverted this to address issue #38668. Wasn't able to quickly spot the cause of the ":0" port specifier in Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants