diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index f075e0ecad7a2b..913935048680eb 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -25,12 +25,11 @@ const assert = require('assert').ok; const Stream = require('stream'); const util = require('util'); const internalUtil = require('internal/util'); -const internalHttp = require('internal/http'); +const { outHeadersKey, utcDate } = require('internal/http'); const { Buffer } = require('buffer'); const common = require('_http_common'); const checkIsHttpToken = common._checkIsHttpToken; const checkInvalidHeaderChar = common._checkInvalidHeaderChar; -const { outHeadersKey } = require('internal/http'); const { defaultTriggerAsyncIdScope, symbols: { async_id_symbol } @@ -48,7 +47,6 @@ const { } = require('internal/errors').codes; const { CRLF, debug } = common; -const { utcDate } = internalHttp; const kIsCorked = Symbol('isCorked'); diff --git a/lib/internal/crypto/random.js b/lib/internal/crypto/random.js index a30f8acdf27786..15fbc37c2239d7 100644 --- a/lib/internal/crypto/random.js +++ b/lib/internal/crypto/random.js @@ -1,7 +1,7 @@ 'use strict'; const { AsyncWrap, Providers } = process.binding('async_wrap'); -const { Buffer } = require('buffer'); +const { Buffer, kMaxLength } = require('buffer'); const { randomBytes: _randomBytes } = process.binding('crypto'); const { ERR_INVALID_ARG_TYPE, @@ -10,7 +10,6 @@ const { } = require('internal/errors').codes; const { isArrayBufferView } = require('internal/util/types'); -const { kMaxLength } = require('buffer'); const kMaxUint32 = 2 ** 32 - 1; const kMaxPossibleLength = Math.min(kMaxLength, kMaxUint32); diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index bbbc3c21300a74..3ef01c836d9cb9 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -2,7 +2,8 @@ /* eslint-disable no-use-before-define */ -require('internal/util').assertCrypto(); +const internalUtil = require('internal/util'); +internalUtil.assertCrypto(); const { internalBinding } = require('internal/bootstrap/loaders'); const { async_id_symbol } = require('internal/async_hooks').symbols; @@ -71,7 +72,7 @@ const { utcDate } = require('internal/http'); const { promisify, customInspectSymbol: kInspect -} = require('internal/util'); +} = internalUtil; const { isArrayBufferView } = require('internal/util/types'); const { defaultTriggerAsyncIdScope } = require('internal/async_hooks'); const { _connectionListener: httpConnectionListener } = http; diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 476a420b8a9620..7785865d6573f9 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -14,8 +14,9 @@ const fs = require('fs'); const { _makeLong } = require('path'); const { SafeMap } = require('internal/safe_globals'); const { URL } = require('url'); -const debug = require('util').debuglog('esm'); -const readFileAsync = require('util').promisify(fs.readFile); +const util = require('util'); +const debug = util.debuglog('esm'); +const readFileAsync = util.promisify(fs.readFile); const readFileSync = fs.readFileSync; const StringReplace = Function.call.bind(String.prototype.replace); const JsonParse = JSON.parse;