forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Consolidate checks that test if the current environment is Node #21
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9702a2e
to
63ac570
Compare
1927056
to
275c748
Compare
142f87b
to
6382230
Compare
275c748
to
b2807ab
Compare
effc622
to
99a9841
Compare
b2807ab
to
1a97904
Compare
99a9841
to
da5cddf
Compare
1a97904
to
c388116
Compare
da5cddf
to
77c9a92
Compare
c388116
to
2a701a0
Compare
77c9a92
to
96794e4
Compare
2a701a0
to
c292ea6
Compare
96794e4
to
fe854f0
Compare
c292ea6
to
bb4001f
Compare
fe854f0
to
864d946
Compare
bb4001f
to
5813ec9
Compare
864d946
to
5d1269d
Compare
5813ec9
to
58f41e1
Compare
8642f50
to
084b7ea
Compare
f84fe87
to
a0d1831
Compare
084b7ea
to
aab52d6
Compare
a0d1831
to
b7bb4b4
Compare
aab52d6
to
de670ad
Compare
b7bb4b4
to
b98da1f
Compare
de670ad
to
384fe8d
Compare
b98da1f
to
510bf54
Compare
384fe8d
to
026e6e9
Compare
510bf54
to
93f297c
Compare
026e6e9
to
af1a0d3
Compare
93f297c
to
1b88373
Compare
af1a0d3
to
d93aadf
Compare
1b88373
to
fc68862
Compare
d93aadf
to
2601d2b
Compare
fc68862
to
e0ee7b5
Compare
2601d2b
to
fd98dd3
Compare
e0ee7b5
to
3a27a32
Compare
fd98dd3
to
231f965
Compare
3a27a32
to
f4e3ead
Compare
231f965
to
8e7607f
Compare
f4e3ead
to
704bc03
Compare
8e7607f
to
ba01ac8
Compare
704bc03
to
438d60c
Compare
ba01ac8
to
cd0bfbc
Compare
438d60c
to
0a33553
Compare
When bundled, it's very likely that the function "require" will actually exist at runtime, so we can't use this to determine if we are running in Node. Consolidate that logic and use other things to check instead. This is still not perfectly accurate, but I don't want to change this _too_ much, lest someone downstream depend on our inconsistent logic. There are yet other places this commit does not fix; search for "typeof process" for more examples.
cd0bfbc
to
423ad68
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When bundled, it's very likely that the function "require" will actually
exist at runtime, so we can't use this to determine if we are running in
Node. Consolidate that logic and use other things to check instead.
This is still not perfectly accurate, but I don't want to change this
too much, lest someone downstream depend on our inconsistent logic.
There are yet other places this commit does not fix; search for "typeof
process" for more examples.
Please do not comment on this PR. Depending on how this set of PRs evolves, this PR's contents may change entirely based on the order of commits.
This PR is a part of a stack: