Skip to content

Conditionally polyfill globals#160

Open
cgatian wants to merge 1 commit into
davidmyersdev:mainfrom
cgatian:fix/conditionally-polyfill
Open

Conditionally polyfill globals#160
cgatian wants to merge 1 commit into
davidmyersdev:mainfrom
cgatian:fix/conditionally-polyfill

Conversation

@cgatian
Copy link
Copy Markdown

@cgatian cgatian commented May 28, 2026

In 0.27.0+, polyfills were always applied to globals. This breaks Vitest environments where an actual Node process is present. This change adds conditionals checks to the shims, only applying the polyfills when globalThis is missing.

I'll admit I don't have full understanding of the codebase, but gave it a shot with the help of Claude. Hope this at least steers the maintainers towards a proper fix.

Fixes #159

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Breaking changes between 0.26.0 and 0.27.0

1 participant