-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
esm: fixup process Proxy to handle toString correctly #25963
Conversation
7215790
to
4b8cc5f
Compare
Should we just set this unconditionally when we setup the process Object to begin with? Why do it lazily? |
The process object is not a proxy, only the one exported by |
This seems kind of backward, why not just install Symbol.toStringTag on the process object anyway? |
I've run into a few test failures when experimenting with removing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 👎 on this work. Next week (2019-02-13) the Module WG will resolve a bunch of things that affect the direction and features of experimental modules. I don't see a strong pull for this addition when it will likely change come April.
This is a bug fix to existing behaviour. If you're against the existing behaviour, sure, but I don't think complaints against the existing behaviour should stop bug fixes from landing against it, that seems very counter-productive. |
@jdalton the freeze on modules in Node.js core was for new features not bug fixes as well. Note also that the current minimal implementation also retains this work as well so that this isn't currently slated for any changes or removals either. |
@devsnek could you share a code example of what you mean here? I thought that was what this is doing already? |
@guybedford right now the toString behaviour comes from setting a native name in the V8 API. instead of doing that, let's just put a toStringTag on the original process object, and then no changes to the proxy need to be made. |
4b8cc5f
to
6453a66
Compare
Ok, I've updated this approach to simply define |
PR-URL: nodejs#25963 Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
6453a66
to
ed15c58
Compare
Manual LGTM as the Review button appears to currently be broken in the Github UI |
Running CI again due to a bsd flaky case, just to be sure - https://ci.nodejs.org/job/node-test-pull-request/21165/. |
Landed in ccaebde. |
PR-URL: #25963 Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This change has broken Jest (4.5M weekly downloads): jestjs/jest#8069 While this is fixed in Jest on master old versions are still broken. Not sure if just making it writable fixes it? |
Sure we can make this writeable, PR welcome.
…On Thu, 07 Mar 2019 at 11:44, Simen Bekkhus ***@***.***> wrote:
This change has broken Jest (4.5M weekly downloads): jestjs/jest#8069
<jestjs/jest#8069>
While this is fixed in Jest on master old versions are still broken. Not
sure if just making it writable fixes it?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#25963 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAkiyhEeqDd4xRRHf5RsbZn0NXbm3bviks5vUN9ygaJpZM4algtR>
.
|
Is there anything blocking us from having Jest tested in CITGM? Edit: Yes. I opened nodejs/citgm#684 |
I labeled this dont-land on LTS |
We've tried before, but colors were wrong (a whole bunch of Jest's tests fail if terminal colors do not work), ref nodejs/citgm#560 (comment) |
Should fix the jest failure on master. * nodejs/node#25963 (comment) * jestjs/jest#8069
Should fix the jest failure on master. * nodejs/node#25963 (comment) * jestjs/jest#8069
Should fix the jest failure on master. * nodejs/node#25963 (comment) * jestjs/jest#8069
This fixes the following
--experimental-modules
bug://cc @devsnek
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes