Skip to content

Commit 1330995

Browse files
committed
build,lib,test: change whitelist to allowlist
PR-URL: #36406 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 129053f commit 1330995

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

configure.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ def get_gas_version(cc):
948948

949949
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes
950950
# the version check more by accident than anything else but a more rigorous
951-
# check involves checking the build number against a whitelist. I'm not
951+
# check involves checking the build number against an allowlist. I'm not
952952
# quite prepared to go that far yet.
953953
def check_compiler(o):
954954
if sys.platform == 'win32':

lib/internal/bootstrap/loaders.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ ObjectDefineProperty(process, 'moduleLoadList', {
6969
});
7070

7171

72-
// internalBindingWhitelist contains the name of internalBinding modules
73-
// that are whitelisted for access via process.binding()... This is used
72+
// internalBindingAllowlist contains the name of internalBinding modules
73+
// that are allowed for access via process.binding()... This is used
7474
// to provide a transition path for modules that are being moved over to
7575
// internalBinding.
76-
const internalBindingWhitelist = new SafeSet([
76+
const internalBindingAllowlist = new SafeSet([
7777
'async_wrap',
7878
'buffer',
7979
'cares_wrap',
@@ -113,7 +113,7 @@ const internalBindingWhitelist = new SafeSet([
113113
module = String(module);
114114
// Deprecated specific process.binding() modules, but not all, allow
115115
// selective fallback to internalBinding for the deprecated ones.
116-
if (internalBindingWhitelist.has(module)) {
116+
if (internalBindingAllowlist.has(module)) {
117117
return internalBinding(module);
118118
}
119119
// eslint-disable-next-line no-restricted-syntax

test/common/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ The `benchmark` module is used by tests to run benchmarks.
4040
The `common` module is used by tests for consistency across repeated
4141
tasks.
4242

43-
### `allowGlobals(...whitelist)`
43+
### `allowGlobals(...allowlist)`
4444

45-
* `whitelist` [&lt;Array>][] Array of Globals
45+
* `allowlist` [&lt;Array>][] Array of Globals
4646
* return [&lt;Array>][]
4747

48-
Takes `whitelist` and concats that with predefined `knownGlobals`.
48+
Takes `allowlist` and concats that with predefined `knownGlobals`.
4949

5050
### `canCreateSymLink()`
5151

@@ -601,7 +601,7 @@ If set, crypto tests are skipped.
601601
### `NODE_TEST_KNOWN_GLOBALS`
602602

603603
A comma-separated list of variables names that are appended to the global
604-
variable whitelist. Alternatively, if `NODE_TEST_KNOWN_GLOBALS` is set to `'0'`,
604+
variable allowlist. Alternatively, if `NODE_TEST_KNOWN_GLOBALS` is set to `'0'`,
605605
global leak detection is disabled.
606606

607607
## Fixtures Module

test/common/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ if (global.gc) {
276276
knownGlobals.push(global.gc);
277277
}
278278

279-
function allowGlobals(...whitelist) {
280-
knownGlobals = knownGlobals.concat(whitelist);
279+
function allowGlobals(...allowlist) {
280+
knownGlobals = knownGlobals.concat(allowlist);
281281
}
282282

283283
if (process.env.NODE_TEST_KNOWN_GLOBALS !== '0') {

test/parallel/test-process-binding-internalbinding-whitelist.js test/parallel/test-process-binding-internalbinding-allowlist.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const common = require('../common');
55
const assert = require('assert');
66

7-
// Assert that whitelisted internalBinding modules are accessible via
7+
// Assert that allowed internalBinding modules are accessible via
88
// process.binding().
99
assert(process.binding('async_wrap'));
1010
assert(process.binding('buffer'));

0 commit comments

Comments
 (0)