Skip to content

fix: add polyfill for clearInterval and update injection in unenv preset #172

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

jcbsfilho
Copy link
Collaborator

This pull request introduces updates to the unenv-preset package, including the addition of a polyfill for clearInterval and the removal of an unused utility alias. These changes enhance compatibility and simplify the codebase.

Enhancements to polyfills:

  • Added clearInterval polyfill: Introduced a new polyfill for clearInterval in packages/unenv-preset/src/polyfills/node/globals/clear-interval.js. This implementation ensures compatibility with various interval object formats by checking for properties like id, _id, or a close method.
  • Registered clearInterval in exports: Added the clearInterval polyfill to the globals section in packages/unenv-preset/src/index.ts.

Code cleanup:

  • Removed unused alias for util/types: Eliminated the alias for util/types in packages/unenv-preset/src/index.ts, as it is no longer required.

@jcbsfilho jcbsfilho merged commit ea99874 into stage Jun 9, 2025
2 checks passed
@jcbsfilho jcbsfilho deleted the fix/clear-interval branch June 9, 2025 13:46
jotanarciso pushed a commit that referenced this pull request Jun 9, 2025
[skip ci]
## [1.20.0-stage.10](v1.20.0-stage.9...v1.20.0-stage.10) (2025-06-09)

### Bug Fixes

* add polyfill for clearInterval and update injection in unenv preset (#172) ([ea99874](ea99874))
@jotanarciso
Copy link
Collaborator

🎉 This PR is included in version 1.20.0-stage.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants