-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1972 from endojs/module-namespace-object
refactor(ses): Improve module namespace object representation and documentation ## Description ### Module namespace object representation Adds a `Symbol.toStringTag` property to the `proxiedExports` object in order to make it appear more like an ESM Module Namespace object. This necessitated changes in `ses` and corresponding changes in `compartment-mapper`. During testing, the output of `console.log()` is indistinguishable from an actual ESM Module Namespace object in Chromium. In Node, however, we would need to outsmart `node:util.inspect()` by implementing the `@@node:util.inspect.custom` method on our object. (The call chain for logging non-strings in Node being: `console.log()` -> `node:util.format()` -> `node:util.inspect()`.) ### Module namespace proxy naming and documentation Renames deferred exports `proxiedExports` property to `exportsTarget` and adds a docstring to `getDeferredExports` to explain the purpose of the deferred export values: `exportsTarget`, `exportsProxy`, and `activate`.
- Loading branch information
Showing
9 changed files
with
109 additions
and
52 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.