Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cr proto:null
  • Loading branch information
atlowChemi committed Mar 26, 2023
commit b123070defc703ff3ac810f7e48b106eb4580a9c
1 change: 1 addition & 0 deletions lib/test/reporters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let spec;
let tap;

ObjectDefineProperties(module.exports, {
Comment thread
atlowChemi marked this conversation as resolved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

are we sure that cjs-module-lexer will be able to pick up this pattern as named exports?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it is a pretty common pattern in node's built-in modules, so it probably does:

ObjectDefineProperties(module.exports, {

ObjectDefineProperties(module.exports, {

node/lib/dns.js

Line 345 in 9dbb162

ObjectDefineProperties(module.exports, {

node/lib/os.js

Line 399 in 9dbb162

ObjectDefineProperties(module.exports, {

ObjectDefineProperties(module.exports, {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It probably doesn’t but we don’t use cjs-module-lexer for core modules, because core modules are not CJS (or at least, not regular CJS) and the use of named imports for core modules predates the introduction of cjs-module-lexer.

__proto__: null,
dot: {
__proto__: null,
configurable: true,
Expand Down