From 72fe9bb47005e720444e65a66e91559287137780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 8 Mar 2023 07:44:54 -0400 Subject: refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme for snapshotted modules (#18041) This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020 --- ext/node/polyfills/internal/util/comparisons.ts | 6 +++--- ext/node/polyfills/internal/util/debuglog.ts | 2 +- ext/node/polyfills/internal/util/inspect.mjs | 8 ++++---- ext/node/polyfills/internal/util/types.ts | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'ext/node/polyfills/internal/util') diff --git a/ext/node/polyfills/internal/util/comparisons.ts b/ext/node/polyfills/internal/util/comparisons.ts index 3f76089f3..1ceeabaae 100644 --- a/ext/node/polyfills/internal/util/comparisons.ts +++ b/ext/node/polyfills/internal/util/comparisons.ts @@ -19,14 +19,14 @@ import { isStringObject, isSymbolObject, isTypedArray, -} from "internal:deno_node/internal/util/types.ts"; +} from "ext:deno_node/internal/util/types.ts"; -import { Buffer } from "internal:deno_node/buffer.ts"; +import { Buffer } from "ext:deno_node/buffer.ts"; import { getOwnNonIndexProperties, ONLY_ENUMERABLE, SKIP_SYMBOLS, -} from "internal:deno_node/internal_binding/util.ts"; +} from "ext:deno_node/internal_binding/util.ts"; enum valueType { noIterator, diff --git a/ext/node/polyfills/internal/util/debuglog.ts b/ext/node/polyfills/internal/util/debuglog.ts index 0ae0820bb..9a92fe956 100644 --- a/ext/node/polyfills/internal/util/debuglog.ts +++ b/ext/node/polyfills/internal/util/debuglog.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. -import { inspect } from "internal:deno_node/internal/util/inspect.mjs"; +import { inspect } from "ext:deno_node/internal/util/inspect.mjs"; // `debugImpls` and `testEnabled` are deliberately not initialized so any call // to `debuglog()` before `initializeDebugEnv()` is called will throw. diff --git a/ext/node/polyfills/internal/util/inspect.mjs b/ext/node/polyfills/internal/util/inspect.mjs index 424773f9a..d8409f198 100644 --- a/ext/node/polyfills/internal/util/inspect.mjs +++ b/ext/node/polyfills/internal/util/inspect.mjs @@ -20,15 +20,15 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import * as types from "internal:deno_node/internal/util/types.ts"; -import { validateObject, validateString } from "internal:deno_node/internal/validators.mjs"; -import { codes } from "internal:deno_node/internal/error_codes.ts"; +import * as types from "ext:deno_node/internal/util/types.ts"; +import { validateObject, validateString } from "ext:deno_node/internal/validators.mjs"; +import { codes } from "ext:deno_node/internal/error_codes.ts"; import { ALL_PROPERTIES, getOwnNonIndexProperties, ONLY_ENUMERABLE, -} from "internal:deno_node/internal_binding/util.ts"; +} from "ext:deno_node/internal_binding/util.ts"; const kObjectType = 0; const kArrayType = 1; diff --git a/ext/node/polyfills/internal/util/types.ts b/ext/node/polyfills/internal/util/types.ts index 0bbf92547..8ed99456b 100644 --- a/ext/node/polyfills/internal/util/types.ts +++ b/ext/node/polyfills/internal/util/types.ts @@ -21,11 +21,11 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -import * as bindingTypes from "internal:deno_node/internal_binding/types.ts"; +import * as bindingTypes from "ext:deno_node/internal_binding/types.ts"; export { isCryptoKey, isKeyObject, -} from "internal:deno_node/internal/crypto/_keys.ts"; +} from "ext:deno_node/internal/crypto/_keys.ts"; // https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag const _getTypedArrayToStringTag = Object.getOwnPropertyDescriptor( -- cgit v1.2.3