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

Avoid assigning globalThis.process when not defined. #94

Merged
merged 2 commits into from
Mar 17, 2021

Commits on Mar 17, 2021

  1. Avoid assigning globalThis.process when not defined.

    Follow-up to #91.
    
    Some websites use the existence of a global process object to
    feature-detect the Node.js host environment, so it's not safe for this
    package to initialize globalThis.process when it does not already exist.
    benjamn committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    b1a3288 View commit details
    Browse the repository at this point in the history
  2. Also export processStub.

    This export can be imported and assigned to a local variable called
    `process`, which is convenient because the existing export named `process`
    would likely be rewritten by bundlers as tsInvariant.process, or collide
    with a local variable called `process`.
    benjamn committed Mar 17, 2021
    Configuration menu
    Copy the full SHA
    5fbbd73 View commit details
    Browse the repository at this point in the history