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

Make fallback globalThis process object writable #91

Merged
merged 2 commits into from
Mar 15, 2021
Merged

Conversation

hwillson
Copy link
Member

To fall more in-line with global.process in Node, this commit adjusts the created fallback globalThis.process object to be
writable (and configurable). This helps address issues like: apollographql/apollo-client-devtools#455

To fall more in-line with `global.process` in Node, this commit
adjusts the created fallback `globalThis.process` object to be
writable (and configurable). This helps address issues like:
apollographql/apollo-client-devtools#455
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hwillson!

packages/ts-invariant/package.json Outdated Show resolved Hide resolved
@benjamn benjamn merged commit 12dadc9 into main Mar 15, 2021
@benjamn benjamn deleted the writable-process branch March 15, 2021 19:08
hwillson added a commit to apollographql/apollo-client that referenced this pull request Mar 15, 2021
benjamn pushed a commit to apollographql/apollo-client that referenced this pull request Mar 15, 2021
hwillson added a commit to apollographql/apollo-client-devtools that referenced this pull request Mar 15, 2021
This will allow us to pull in the changes from
apollographql/invariant-packages#91.

Fixes #455
Fixes #457
hwillson added a commit to apollographql/apollo-client-devtools that referenced this pull request Mar 15, 2021
This will allow us to pull in the changes from
apollographql/invariant-packages#91.

Fixes #455
Fixes #457
benjamn added a commit that referenced this pull request Mar 17, 2021
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.
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.

2 participants