Skip to content

Commit 9ccf7db

Browse files
committed
build,lib,test: change whitelist to allowlist
PR-URL: #36406 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent afad5e6 commit 9ccf7db

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
@@ -857,7 +857,7 @@ def get_gas_version(cc):
857857

858858
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes
859859
# the version check more by accident than anything else but a more rigorous
860-
# check involves checking the build number against a whitelist. I'm not
860+
# check involves checking the build number against an allowlist. I'm not
861861
# quite prepared to go that far yet.
862862
def check_compiler(o):
863863
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
@@ -39,12 +39,12 @@ The `benchmark` module is used by tests to run benchmarks.
3939
The `common` module is used by tests for consistency across repeated
4040
tasks.
4141

42-
### `allowGlobals(...whitelist)`
42+
### `allowGlobals(...allowlist)`
4343

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

47-
Takes `whitelist` and concats that with predefined `knownGlobals`.
47+
Takes `allowlist` and concats that with predefined `knownGlobals`.
4848

4949
### `canCreateSymLink()`
5050

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

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

606606
## Fixtures Module

test/common/index.js

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

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

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

test/parallel/test-process-binding-internalbinding-whitelist.js renamed to 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)