Skip to content
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

test: use strict mode in global setters test #56742

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Changes from all commits
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
8 changes: 7 additions & 1 deletion test/parallel/test-global-setters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/* eslint-disable strict */
// When setters and getters were added for global.process and global.Buffer to
// create a deprecation path for them in ESM, this test was added to make sure
// the setters and getters behaved as expected.
Comment on lines +1 to +2
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be worth noting at this point it's no longer about creating a deprecation path since that ship has likely sailed short of a very big breaking change, but that these getters and setters may be used to attenuate access if we gain the ability to gate the global object by module accessor in future somehow.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't really sure how to word this for the comment, but if someone wants to open a fast-track PR to update the comment to reflect this, please do! (I kind of wonder if it makes sense to remove the getters/setters at this point. But I'm not terribly informed on all the details/context, so that might be misguided of me.)

// Ref: https://github.com/nodejs/node/pull/26882
// Ref: https://github.com/nodejs/node/pull/26334

'use strict';
require('../common');
Trott marked this conversation as resolved.
Show resolved Hide resolved
const assert = require('assert');
const _process = require('process');
Expand Down
Loading