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

fix: Restrict officially supported browserlist #2159

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

AkshatJawne
Copy link
Contributor

@AkshatJawne AkshatJawne commented Jul 18, 2024

Closes #1752

** The only thing I am not 100% sure about is how we can test this before merging **

I tried experimenting with checking the compatible browsers on their own website: https://browsersl.ist/

@AkshatJawne AkshatJawne self-assigned this Jul 18, 2024
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.67%. Comparing base (8b20692) to head (c89eab8).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2159      +/-   ##
==========================================
- Coverage   46.68%   46.67%   -0.02%     
==========================================
  Files         691      692       +1     
  Lines       38588    38620      +32     
  Branches     9622     9809     +187     
==========================================
+ Hits        18016    18025       +9     
+ Misses      20561    20542      -19     
- Partials       11       53      +42     
Flag Coverage Δ
unit 46.67% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1,4 +1,6 @@
# Use the default value for browsers we support https://browsersl.ist/#q=defaults
# Used by post-css only, JS browser targeting is controlled by Vite https://vitejs.dev/config/build-options.html#build-target
Copy link
Member

@mofojed mofojed Jul 24, 2024

Choose a reason for hiding this comment

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

Take a look at this comment you removed (about how this is just for post-css...). We need to wire up Vite to use .browserslistrc in place of build.target using the browserslist-to-esbuild module it looks like: vitejs/vite#11489

Otherwise this .browserslistrc is only going to be used for CSS, and not used when building JS.

A blog post about Vite and browserslist may be information as well: https://dev.to/meduzen/when-vite-ignores-your-browserslist-configuration-3hoe

We should also be able to compare the package size before/after and see the impact (check the size of the code-studio/build folder after doing an npm run build before and after).

package.json Outdated Show resolved Hide resolved
@AkshatJawne
Copy link
Contributor Author

@mofojed Size Comparison of code-studio/build:

Before changes: 56.4 MB
After changes: 56.9 MB

@AkshatJawne AkshatJawne requested a review from mofojed July 24, 2024 20:06
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

Update the web-client-ui README with the browsers we support/link to this file: https://github.com/deephaven/web-client-ui?tab=readme-ov-file#browser-support
@dsmmcken was there any other testing you wanted to be done for this?

@AkshatJawne AkshatJawne requested a review from mofojed July 29, 2024 15:30
@dsmmcken
Copy link
Contributor

No, I had no specific testing requirements. Which browser doesn't support top level await?

@AkshatJawne
Copy link
Contributor Author

@dsmmcken This link outlines which versions of which browsers can use top level await https://caniuse.com/mdn-javascript_operators_await_top_level , it seems that with our new restrictions, the browsers and versions that we have outlined should support top level await

@AkshatJawne AkshatJawne merged commit 5b06ecc into deephaven:main Jul 30, 2024
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change officially supported browserlist to be more restrictive
3 participants