From 957064419448c3b85ca697fbce345ee52b0c9ab7 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 27 Apr 2020 13:20:52 -0700 Subject: [PATCH] lib: cosmetic change to builtinLibs list for maintainability This is a largely cosmetic change suggested for easier maintainability of the builtinLibs list. While the QUIC PR no longer modifies this list, the original version of the PR did and the fact that all of the entries were bundled up into the same lines meant that adding one forced a larger change to all. With this PR, when we want to add a new built-in, it won't impact any of the others. PR-URL: https://github.com/nodejs/node/pull/33106 Reviewed-By: Gus Caplan Reviewed-By: Anna Henningsen --- lib/internal/modules/cjs/helpers.js | 38 +++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/lib/internal/modules/cjs/helpers.js b/lib/internal/modules/cjs/helpers.js index 2d73219a77772c..2f62c8623e27be 100644 --- a/lib/internal/modules/cjs/helpers.js +++ b/lib/internal/modules/cjs/helpers.js @@ -110,11 +110,39 @@ function stripBOM(content) { } const builtinLibs = [ - 'assert', 'async_hooks', 'buffer', 'child_process', 'cluster', 'crypto', - 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'http2', 'https', 'net', - 'os', 'path', 'perf_hooks', 'punycode', 'querystring', 'readline', 'repl', - 'stream', 'string_decoder', 'tls', 'trace_events', 'tty', 'url', 'util', - 'v8', 'vm', 'worker_threads', 'zlib' + 'assert', + 'async_hooks', + 'buffer', + 'child_process', + 'cluster', + 'crypto', + 'dgram', + 'dns', + 'domain', + 'events', + 'fs', + 'http', + 'http2', + 'https', + 'net', + 'os', + 'path', + 'perf_hooks', + 'punycode', + 'querystring', + 'readline', + 'repl', + 'stream', + 'string_decoder', + 'tls', + 'trace_events', + 'tty', + 'url', + 'util', + 'v8', + 'vm', + 'worker_threads', + 'zlib', ]; if (internalBinding('config').experimentalWasi) {