Skip to content

Commit 60c71f3

Browse files
madflowbenjamingr
authored andcommitted
process: fix named report export
PR-URL: #41861 Fixes: #41774 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent a07757d commit 60c71f3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/internal/bootstrap/pre_execution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function setupStacktracePrinterOnSigint() {
253253
function initializeReport() {
254254
const { report } = require('internal/process/report');
255255
ObjectDefineProperty(process, 'report', {
256-
enumerable: false,
256+
enumerable: true,
257257
configurable: true,
258258
get() {
259259
return report;

test/es-module/test-esm-process.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import '../common/index.mjs';
22
import assert from 'assert';
3-
import process from 'process';
3+
import process, { report } from 'process';
44

55
assert.strictEqual(Object.prototype.toString.call(process), '[object process]');
66
assert(Object.getOwnPropertyDescriptor(process, Symbol.toStringTag).writable);
7+
assert(report);

0 commit comments

Comments
 (0)