timers-browserify dependency on setimmediate pollutes global environment

Open
#36 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, webpack

Research direction

Start by tracing how the setimmediate dependency is included in timers-browserify and reproduce the behavior in a Webpack build. Check whether setImmediate and clearImmediate become globals, then verify the chosen behavior no longer pollutes the consuming page while preserving the timers API.

Written by the indexing model from the issue text.

Description

timers-browserify depends on setimmediate to make available setImmediate and clearImmediate functions.

This breaks proper encapsulation in Webpack builds where we don't want to pollute the global environment with polyfills. E.g. when authoring drop-in widgets for use within someone else's website and acting as a third-party.

Dominant language
JavaScript
Stars
24
Forks
19
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.