You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hainenber (via GitHub)" <gi...@apache.org> on 2025/06/21 15:37:23 UTC

[PR] build(deps): remove legacy browser polyfills [superset]

hainenber opened a new pull request, #33853:
URL: https://github.com/apache/superset/pull/33853

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   build(deps): remove legacy browser polyfills
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Remove polyfills for `fetch` and `abortcontroller` that are no longer relevant thanks to built-in support modern browsers.
   
   <img width="801" alt="image" src="https://github.com/user-attachments/assets/0a7e33e8-7be5-4805-b3ca-09dcd89c711b" />
   
   <img width="804" alt="image" src="https://github.com/user-attachments/assets/c5ebad85-5f7a-4795-b87d-624fa6e4d523" />
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] build(deps): remove legacy browser polyfills [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #33853:
URL: https://github.com/apache/superset/pull/33853#discussion_r2160075558


##########
superset-frontend/jest.config.js:
##########
@@ -32,7 +32,7 @@ module.exports = {
       '<rootDir>/node_modules/@superset-ui/$1/src/$2',
     '^@superset-ui/([^/]+)$': '<rootDir>/node_modules/@superset-ui/$1/src',
   },
-  testEnvironment: 'jsdom',
+  testEnvironment: '<rootDir>/spec/helpers/jsDomWithFetchAPI.ts',

Review Comment:
   ### Missing Test Environment File Validation <sub>![category Functionality](https://img.shields.io/badge/Functionality-0284c7)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   The Jest configuration points to a test environment file (jsDomWithFetchAPI.ts) without verifying its existence or providing a fallback.
   
   
   ###### Why this matters
   If the referenced test environment file is missing or incorrectly implemented, all tests will fail to run, breaking the test suite functionality.
   
   ###### Suggested change ∙ *Feature Preview*
   Ensure the jsDomWithFetchAPI.ts file exists in the spec/helpers directory and contains proper test environment setup code. A basic implementation should look like:
   ```typescript
   const JSDOMEnvironment = require('jest-environment-jsdom').default;
   
   class CustomEnvironment extends JSDOMEnvironment {
     constructor(config) {
       super(config);
       this.global.fetch = fetch;
       this.global.Headers = Headers;
       this.global.Request = Request;
       this.global.Response = Response;
     }
   }
   
   module.exports = CustomEnvironment;
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7303aa79-9ae0-4b7a-8ece-85181e302921/upvote) [![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7303aa79-9ae0-4b7a-8ece-85181e302921?what_not_true=true)  [![Not in Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7303aa79-9ae0-4b7a-8ece-85181e302921?what_out_of_scope=true) [![Not in coding standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7303aa79-9ae0-4b7a-8ece-85181e302921?what_not_in_standard=true) [![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/7303aa79-9ae0-4b7a-8ece-85181e302921)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:b1ca0408-7be3-40af-b350-8ba843fe8347 -->
   
   
   [](b1ca0408-7be3-40af-b350-8ba843fe8347)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] build(deps): remove legacy browser polyfills [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on PR #33853:
URL: https://github.com/apache/superset/pull/33853#issuecomment-2993639981

   Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment `/korbit-review`.
   
   > Your admin can change your review schedule in the [Korbit Console](https://app.korbit.ai/settings)
   
   
   
   [](b4de6be1-eb39-4917-b9d3-73c386dc4f51)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] build(deps): remove legacy browser polyfills [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #33853:
URL: https://github.com/apache/superset/pull/33853


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] build(deps): remove legacy browser polyfills [superset]

Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on PR #33853:
URL: https://github.com/apache/superset/pull/33853#issuecomment-2994415431

   > Spoiler alert: 
   
   Quite the opposite of a spoiler :) you'll be unspoiling here :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] build(deps): remove legacy browser polyfills [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on PR #33853:
URL: https://github.com/apache/superset/pull/33853#issuecomment-2994066047

   Yes, there are plenty of deps plus dev-deps we can revisit to assess their necessity. Spoiler alert: more upcoming PRs from me on this aspect ;)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org