bootstrap: consolidate global properties definition#43357
bootstrap: consolidate global properties definition#43357legendecas wants to merge 1 commit intonodejs:masterfrom
Conversation
|
Review requested:
|
09634a7 to
dd593ec
Compare
dd593ec to
ba792a8
Compare
ba792a8 to
89b291b
Compare
89b291b to
39fbce4
Compare
lib/internal/bootstrap/node.js
Outdated
| configurable: true | ||
| }); | ||
|
|
||
| // globalThis.process is been installed at `internal/bootstrap/pre_execution.js`. |
There was a problem hiding this comment.
| // globalThis.process is been installed at `internal/bootstrap/pre_execution.js`. | |
| // globalThis.process will be installed at `internal/bootstrap/pre_execution.js`. |
There was a problem hiding this comment.
But why are we removing these anyway? Removing these results in a breaking change for the embedders, which is why the tests have to be updated.
There was a problem hiding this comment.
I was reviewing the installation point of globalThis.process and globalThis.Buffer. It can be more intuitive to install them once rather than duplicate the installation.
It is true that removing can cause breaking changes on embedders with custom entry points. What do you think about moving the actual installation here?
There was a problem hiding this comment.
I think the reason that they are overriden in pre_execution is that we thought we were going to make this optional for ESM (probably behind flags), which didn't seem to happen...
There was a problem hiding this comment.
Yeah, that's true. From what I could tell, the current shape of the property descriptor is not going to be changed in anytime soon.
c64d580 to
39394c2
Compare
`globalThis.process` and `globalThis.Buffer` has been re-defined with a getter/setter pair. `atob` and `bota` are defined as enumerable properties according to WebIDL definition.
39394c2 to
9c4ae03
Compare
|
Landed in 511e289 |
`globalThis.process` and `globalThis.Buffer` has been re-defined with a getter/setter pair. `atob` and `bota` are defined as enumerable properties according to WebIDL definition. PR-URL: #43357 Refs: #26882 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
`globalThis.process` and `globalThis.Buffer` has been re-defined with a getter/setter pair. `atob` and `bota` are defined as enumerable properties according to WebIDL definition. PR-URL: #43357 Refs: #26882 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
globalThis.processandglobalThis.Bufferhas been re-defined witha getter/setter pair.
atobandbotaare defined as enumerable properties according toWebIDL definition.
Refs: #26882
Refs: #37786 (comment)