From d1ae934fefb1a89dcaab58f44620fd6d0ade9a13 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Mon, 8 Nov 2021 18:06:21 -0500 Subject: [PATCH 01/30] WIP --- .gitignore | 2 +- dist-raw/NODE-LICENSE.md | 24 + dist-raw/README.md | 10 + dist-raw/node-cjs-helpers.d.ts | 1 - dist-raw/node-internal-errors.js | 50 + ...s => node-internal-modules-cjs-helpers.js} | 0 ...> node-internal-modules-cjs-loader-old.js} | 48 +- dist-raw/node-internal-modules-cjs-loader.js | 864 ++++++++++++ package.json | 3 +- ...ode-internal-modules-cjs-loader-v17.0.1.js | 1197 +++++++++++++++++ ...-internal-modules-esm-resolve-v13.12.0.js} | 1 + ...e-internal-modules-esm-resolve-v15.3.0.js} | 1 + ...l-await.js => node-internal-repl-await.js} | 0 src/bin.ts | 2 +- src/configuration.ts | 38 +- src/index.ts | 2 +- src/node-resolver-functions.ts | 366 +++++ src/ts-compiler-types.ts | 3 + 18 files changed, 2555 insertions(+), 57 deletions(-) create mode 100644 dist-raw/NODE-LICENSE.md delete mode 100644 dist-raw/node-cjs-helpers.d.ts create mode 100644 dist-raw/node-internal-errors.js rename dist-raw/{node-cjs-helpers.js => node-internal-modules-cjs-helpers.js} (100%) rename dist-raw/{node-cjs-loader-utils.js => node-internal-modules-cjs-loader-old.js} (57%) create mode 100644 dist-raw/node-internal-modules-cjs-loader.js create mode 100644 raw/node-internal-modules-cjs-loader-v17.0.1.js rename raw/{node-esm-resolve-implementation-v13.12.0.js => node-internal-modules-esm-resolve-v13.12.0.js} (99%) rename raw/{node-esm-resolve-implementation-v15.3.0.js => node-internal-modules-esm-resolve-v15.3.0.js} (99%) rename raw/{node-repl-await.js => node-internal-repl-await.js} (100%) create mode 100644 src/node-resolver-functions.ts diff --git a/.gitignore b/.gitignore index f8e97ed5f..5b0df0a80 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ coverage/ .DS_Store npm-debug.log -dist/ +/dist/ tsconfig.schema.json tsconfig.schemastore-schema.json .idea/ diff --git a/dist-raw/NODE-LICENSE.md b/dist-raw/NODE-LICENSE.md new file mode 100644 index 000000000..c1de8e9d2 --- /dev/null +++ b/dist-raw/NODE-LICENSE.md @@ -0,0 +1,24 @@ +This directory contains portions of Node.js source code which is licensed as follows: + +--- + +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dist-raw/README.md b/dist-raw/README.md index b7b4c4d7d..fa4bbcb03 100644 --- a/dist-raw/README.md +++ b/dist-raw/README.md @@ -11,3 +11,13 @@ in a factory function, we will not indent the function body, to avoid whitespace One obvious problem with this approach: the code has been pulled from one version of node, whereas users of ts-node run multiple versions of node. Users running node 12 may see that ts-node behaves like node 14, for example. + +--- + +## Naming convention + +Not used consistently, but the idea is: + +`node-(...-)-.js` + +`node-internal-errors.js` -> `github.com/nodejs/node/blob/TAG/lib/internal/errors.js` diff --git a/dist-raw/node-cjs-helpers.d.ts b/dist-raw/node-cjs-helpers.d.ts deleted file mode 100644 index a57c2f831..000000000 --- a/dist-raw/node-cjs-helpers.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function addBuiltinLibsToObject(object: any): void; diff --git a/dist-raw/node-internal-errors.js b/dist-raw/node-internal-errors.js new file mode 100644 index 000000000..75148b85c --- /dev/null +++ b/dist-raw/node-internal-errors.js @@ -0,0 +1,50 @@ +// Native ERR_REQUIRE_ESM Error is declared here: +// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L1294-L1313 +// Error class factory is implemented here: +// function E: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L323-L341 +// function makeNodeErrorWithCode: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L251-L278 +// The code below should create an error that matches the native error as closely as possible. +// Third-party libraries which attempt to catch the native ERR_REQUIRE_ESM should recognize our imitation error. +function createErrRequireEsm(filename, parentPath, packageJsonPath) { + const code = 'ERR_REQUIRE_ESM' + const err = new Error(getMessage(filename, parentPath, packageJsonPath)) + // Set `name` to be used in stack trace, generate stack trace with that name baked in, then re-declare the `name` field. + // This trick is copied from node's source. + err.name = `Error [${ code }]` + err.stack + Object.defineProperty(err, 'name', { + value: 'Error', + enumerable: false, + writable: true, + configurable: true + }) + err.code = code + return err + + // Copy-pasted from https://github.com/nodejs/node/blob/b533fb3508009e5f567cc776daba8fbf665386a6/lib/internal/errors.js#L1293-L1311 + // so that our error message is identical to the native message. + function getMessage(filename, parentPath = null, packageJsonPath = null) { + const ext = path.extname(filename) + let msg = `Must use import to load ES Module: ${filename}`; + if (parentPath && packageJsonPath) { + const path = require('path'); + const basename = path.basename(filename) === path.basename(parentPath) ? + filename : path.basename(filename); + msg += + '\nrequire() of ES modules is not supported.\nrequire() of ' + + `${filename} ${parentPath ? `from ${parentPath} ` : ''}` + + `is an ES module file as it is a ${ext} file whose nearest parent ` + + `package.json contains "type": "module" which defines all ${ext} ` + + 'files in that package scope as ES modules.\nInstead ' + + 'change the requiring code to use ' + + 'import(), or remove "type": "module" from ' + + `${packageJsonPath}.\n`; + return msg; + } + return msg; + } +} + +module.exports = { + createErrRequireEsm +}; diff --git a/dist-raw/node-cjs-helpers.js b/dist-raw/node-internal-modules-cjs-helpers.js similarity index 100% rename from dist-raw/node-cjs-helpers.js rename to dist-raw/node-internal-modules-cjs-helpers.js diff --git a/dist-raw/node-cjs-loader-utils.js b/dist-raw/node-internal-modules-cjs-loader-old.js similarity index 57% rename from dist-raw/node-cjs-loader-utils.js rename to dist-raw/node-internal-modules-cjs-loader-old.js index b7ec0d531..ba19fb049 100644 --- a/dist-raw/node-cjs-loader-utils.js +++ b/dist-raw/node-internal-modules-cjs-loader-old.js @@ -6,6 +6,7 @@ const path = require('path'); const packageJsonReader = require('./node-package-json-reader'); const {JSONParse} = require('./node-primordials'); const {normalizeSlashes} = require('../dist/util'); +const {createErrRequireEsm} = require('./node-internal-errors'); module.exports.assertScriptCanLoadAsCJSImpl = assertScriptCanLoadAsCJSImpl; @@ -84,50 +85,3 @@ function readPackage(requestPath) { throw e; } } - -// Native ERR_REQUIRE_ESM Error is declared here: -// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L1294-L1313 -// Error class factory is implemented here: -// function E: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L323-L341 -// function makeNodeErrorWithCode: https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L251-L278 -// The code below should create an error that matches the native error as closely as possible. -// Third-party libraries which attempt to catch the native ERR_REQUIRE_ESM should recognize our imitation error. -function createErrRequireEsm(filename, parentPath, packageJsonPath) { - const code = 'ERR_REQUIRE_ESM' - const err = new Error(getMessage(filename, parentPath, packageJsonPath)) - // Set `name` to be used in stack trace, generate stack trace with that name baked in, then re-declare the `name` field. - // This trick is copied from node's source. - err.name = `Error [${ code }]` - err.stack - Object.defineProperty(err, 'name', { - value: 'Error', - enumerable: false, - writable: true, - configurable: true - }) - err.code = code - return err - - // Copy-pasted from https://github.com/nodejs/node/blob/b533fb3508009e5f567cc776daba8fbf665386a6/lib/internal/errors.js#L1293-L1311 - // so that our error message is identical to the native message. - function getMessage(filename, parentPath = null, packageJsonPath = null) { - const ext = path.extname(filename) - let msg = `Must use import to load ES Module: ${filename}`; - if (parentPath && packageJsonPath) { - const path = require('path'); - const basename = path.basename(filename) === path.basename(parentPath) ? - filename : path.basename(filename); - msg += - '\nrequire() of ES modules is not supported.\nrequire() of ' + - `${filename} ${parentPath ? `from ${parentPath} ` : ''}` + - `is an ES module file as it is a ${ext} file whose nearest parent ` + - `package.json contains "type": "module" which defines all ${ext} ` + - 'files in that package scope as ES modules.\nInstead ' + - 'change the requiring code to use ' + - 'import(), or remove "type": "module" from ' + - `${packageJsonPath}.\n`; - return msg; - } - return msg; - } -} diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js new file mode 100644 index 000000000..9f3e5bd7e --- /dev/null +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -0,0 +1,864 @@ +// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/loader.js + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const { + ArrayIsArray, + ArrayPrototypeConcat, + ArrayPrototypeFilter, + ArrayPrototypeIncludes, + ArrayPrototypeIndexOf, + ArrayPrototypeJoin, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, + ArrayPrototypeUnshiftApply, + Boolean, + Error, + JSONParse, + ObjectCreate, + ObjectDefineProperty, + ObjectFreeze, + ObjectGetOwnPropertyDescriptor, + ObjectGetPrototypeOf, + ObjectKeys, + ObjectPrototype, + ObjectPrototypeHasOwnProperty, + ObjectSetPrototypeOf, + Proxy, + ReflectApply, + ReflectSet, + RegExpPrototypeExec, + RegExpPrototypeTest, + SafeMap, + SafeWeakMap, + String, + StringPrototypeCharAt, + StringPrototypeCharCodeAt, + StringPrototypeEndsWith, + StringPrototypeLastIndexOf, + StringPrototypeIndexOf, + StringPrototypeMatch, + StringPrototypeRepeat, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, +} = primordials; + +// Map used to store CJS parsing data. +const cjsParseCache = new SafeWeakMap(); + +// Set first due to cycle with ESM loader functions. +module.exports = { + wrapSafe, Module, toRealPath, readPackageScope, cjsParseCache, + get hasLoadedAnyUserCJSModule() { return hasLoadedAnyUserCJSModule; } +}; + +const { NativeModule } = require('internal/bootstrap/loaders'); +const { + maybeCacheSourceMap, +} = require('internal/source_map/source_map_cache'); +const { pathToFileURL, fileURLToPath, isURLInstance } = require('internal/url'); +const { deprecate } = require('internal/util'); +const vm = require('vm'); +const assert = require('internal/assert'); +const fs = require('fs'); +const internalFS = require('internal/fs/utils'); +const path = require('path'); +const { sep } = path; +const { internalModuleStat } = internalBinding('fs'); +const packageJsonReader = require('internal/modules/package_json_reader'); +const { safeGetenv } = internalBinding('credentials'); +const { + cjsConditions, + hasEsmSyntax, + loadNativeModule, + makeRequireFunction, + normalizeReferrerURL, + stripBOM, +} = require('internal/modules/cjs/helpers'); +const { getOptionValue } = require('internal/options'); +const preserveSymlinks = getOptionValue('--preserve-symlinks'); +const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); +// Do not eagerly grab .manifest, it may be in TDZ +const policy = getOptionValue('--experimental-policy') ? + require('internal/process/policy') : + null; + +// Whether any user-provided CJS modules had been loaded (executed). +// Used for internal assertions. +let hasLoadedAnyUserCJSModule = false; + +const { + codes: { + ERR_INVALID_ARG_VALUE, + ERR_INVALID_MODULE_SPECIFIER, + ERR_REQUIRE_ESM, + ERR_UNKNOWN_BUILTIN_MODULE, + }, + setArrowMessage, +} = require('internal/errors'); +const { validateString } = require('internal/validators'); +const pendingDeprecation = getOptionValue('--pending-deprecation'); + +const { + CHAR_FORWARD_SLASH, + CHAR_BACKWARD_SLASH, + CHAR_COLON +} = require('internal/constants'); + +const { + isProxy +} = require('internal/util/types'); + +const asyncESM = require('internal/process/esm_loader'); +const { enrichCJSError } = require('internal/modules/esm/translators'); +const { kEvaluated } = internalBinding('module_wrap'); +const { + encodedSepRegEx, + packageExportsResolve, + packageImportsResolve +} = require('internal/modules/esm/resolve'); + +const isWindows = process.platform === 'win32'; + +const relativeResolveCache = ObjectCreate(null); + +let requireDepth = 0; +let statCache = null; +let isPreloading = false; + +function stat(filename) { + filename = path.toNamespacedPath(filename); + if (statCache !== null) { + const result = statCache.get(filename); + if (result !== undefined) return result; + } + const result = internalModuleStat(filename); + if (statCache !== null && result >= 0) { + // Only set cache when `internalModuleStat(filename)` succeeds. + statCache.set(filename, result); + } + return result; +} + +function updateChildren(parent, child, scan) { + const children = parent?.children; + if (children && !(scan && ArrayPrototypeIncludes(children, child))) + ArrayPrototypePush(children, child); +} + +const moduleParentCache = new SafeWeakMap(); +function Module(id = '', parent) { + this.id = id; + this.path = path.dirname(id); + this.exports = {}; + moduleParentCache.set(this, parent); + updateChildren(parent, this, false); + this.filename = null; + this.loaded = false; + this.children = []; +} + +const builtinModules = []; +for (const { 0: id, 1: mod } of NativeModule.map) { + if (mod.canBeRequiredByUsers) { + ArrayPrototypePush(builtinModules, id); + } +} + +ObjectFreeze(builtinModules); +Module.builtinModules = builtinModules; + +Module._cache = ObjectCreate(null); +Module._pathCache = ObjectCreate(null); +Module._extensions = ObjectCreate(null); +let modulePaths = []; +Module.globalPaths = []; + +let patched = false; + +// eslint-disable-next-line func-style +let wrap = function(script) { + return Module.wrapper[0] + script + Module.wrapper[1]; +}; + +const wrapper = [ + '(function (exports, require, module, __filename, __dirname) { ', + '\n});', +]; + +let wrapperProxy = new Proxy(wrapper, { + set(target, property, value, receiver) { + patched = true; + return ReflectSet(target, property, value, receiver); + }, + + defineProperty(target, property, descriptor) { + patched = true; + return ObjectDefineProperty(target, property, descriptor); + } +}); + +ObjectDefineProperty(Module, 'wrap', { + get() { + return wrap; + }, + + set(value) { + patched = true; + wrap = value; + } +}); + +ObjectDefineProperty(Module, 'wrapper', { + get() { + return wrapperProxy; + }, + + set(value) { + patched = true; + wrapperProxy = value; + } +}); + +const isPreloadingDesc = { get() { return isPreloading; } }; +ObjectDefineProperty(Module.prototype, 'isPreloading', isPreloadingDesc); +ObjectDefineProperty(NativeModule.prototype, 'isPreloading', isPreloadingDesc); + +function getModuleParent() { + return moduleParentCache.get(this); +} + +function setModuleParent(value) { + moduleParentCache.set(this, value); +} + +ObjectDefineProperty(Module.prototype, 'parent', { + get: pendingDeprecation ? deprecate( + getModuleParent, + 'module.parent is deprecated due to accuracy issues. Please use ' + + 'require.main to find program entry point instead.', + 'DEP0144' + ) : getModuleParent, + set: pendingDeprecation ? deprecate( + setModuleParent, + 'module.parent is deprecated due to accuracy issues. Please use ' + + 'require.main to find program entry point instead.', + 'DEP0144' + ) : setModuleParent, +}); + +let debug = require('internal/util/debuglog').debuglog('module', (fn) => { + debug = fn; +}); +Module._debug = deprecate(debug, 'Module._debug is deprecated.', 'DEP0077'); + +// Given a module name, and a list of paths to test, returns the first +// matching file in the following precedence. +// +// require("a.") +// -> a. +// +// require("a") +// -> a +// -> a. +// -> a/index. + +const packageJsonCache = new SafeMap(); + +function readPackage(requestPath) { + const jsonPath = path.resolve(requestPath, 'package.json'); + + const existing = packageJsonCache.get(jsonPath); + if (existing !== undefined) return existing; + + const result = packageJsonReader.read(jsonPath); + const json = result.containsKeys === false ? '{}' : result.string; + if (json === undefined) { + packageJsonCache.set(jsonPath, false); + return false; + } + + try { + const parsed = JSONParse(json); + const filtered = { + name: parsed.name, + main: parsed.main, + exports: parsed.exports, + imports: parsed.imports, + type: parsed.type + }; + packageJsonCache.set(jsonPath, filtered); + return filtered; + } catch (e) { + e.path = jsonPath; + e.message = 'Error parsing ' + jsonPath + ': ' + e.message; + throw e; + } +} + +function readPackageScope(checkPath) { + const rootSeparatorIndex = StringPrototypeIndexOf(checkPath, sep); + let separatorIndex; + do { + separatorIndex = StringPrototypeLastIndexOf(checkPath, sep); + checkPath = StringPrototypeSlice(checkPath, 0, separatorIndex); + if (StringPrototypeEndsWith(checkPath, sep + 'node_modules')) + return false; + const pjson = readPackage(checkPath + sep); + if (pjson) return { + data: pjson, + path: checkPath, + }; + } while (separatorIndex > rootSeparatorIndex); + return false; +} + +function tryPackage(requestPath, exts, isMain, originalPath) { + const pkg = readPackage(requestPath)?.main; + + if (!pkg) { + return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + } + + const filename = path.resolve(requestPath, pkg); + let actual = tryFile(filename, isMain) || + tryExtensions(filename, exts, isMain) || + tryExtensions(path.resolve(filename, 'index'), exts, isMain); + if (actual === false) { + actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + if (!actual) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error( + `Cannot find module '${filename}'. ` + + 'Please verify that the package.json has a valid "main" entry' + ); + err.code = 'MODULE_NOT_FOUND'; + err.path = path.resolve(requestPath, 'package.json'); + err.requestPath = originalPath; + // TODO(BridgeAR): Add the requireStack as well. + throw err; + } else { + const jsonPath = path.resolve(requestPath, 'package.json'); + process.emitWarning( + `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + + 'Please either fix that or report it to the module author', + 'DeprecationWarning', + 'DEP0128' + ); + } + } + return actual; +} + +// In order to minimize unnecessary lstat() calls, +// this cache is a list of known-real paths. +// Set to an empty Map to reset. +const realpathCache = new SafeMap(); + +// Check if the file exists and is not a directory +// if using --preserve-symlinks and isMain is false, +// keep symlinks intact, otherwise resolve to the +// absolute realpath. +function tryFile(requestPath, isMain) { + const rc = stat(requestPath); + if (rc !== 0) return; + if (preserveSymlinks && !isMain) { + return path.resolve(requestPath); + } + return toRealPath(requestPath); +} + +function toRealPath(requestPath) { + return fs.realpathSync(requestPath, { + [internalFS.realpathCacheKey]: realpathCache + }); +} + +// Given a path, check if the file exists with any of the set extensions +function tryExtensions(p, exts, isMain) { + for (let i = 0; i < exts.length; i++) { + const filename = tryFile(p + exts[i], isMain); + + if (filename) { + return filename; + } + } + return false; +} + +// Find the longest (possibly multi-dot) extension registered in +// Module._extensions +function findLongestRegisteredExtension(filename) { + const name = path.basename(filename); + let currentExtension; + let index; + let startIndex = 0; + while ((index = StringPrototypeIndexOf(name, '.', startIndex)) !== -1) { + startIndex = index + 1; + if (index === 0) continue; // Skip dotfiles like .gitignore + currentExtension = StringPrototypeSlice(name, index); + if (Module._extensions[currentExtension]) return currentExtension; + } + return '.js'; +} + +function trySelfParentPath(parent) { + if (!parent) return false; + + if (parent.filename) { + return parent.filename; + } else if (parent.id === '' || parent.id === 'internal/preload') { + try { + return process.cwd() + path.sep; + } catch { + return false; + } + } +} + +function trySelf(parentPath, request) { + if (!parentPath) return false; + + const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; + if (!pkg || pkg.exports === undefined) return false; + if (typeof pkg.name !== 'string') return false; + + let expansion; + if (request === pkg.name) { + expansion = '.'; + } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { + expansion = '.' + StringPrototypeSlice(request, pkg.name.length); + } else { + return false; + } + + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), expansion, pkg, + pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } +} + +// This only applies to requests of a specific form: +// 1. name/.* +// 2. @scope/name/.* +const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; +function resolveExports(nmPath, request) { + // The implementation's behavior is meant to mirror resolution in ESM. + const { 1: name, 2: expansion = '' } = + StringPrototypeMatch(request, EXPORTS_PATTERN) || []; + if (!name) + return; + const pkgPath = path.resolve(nmPath, name); + const pkg = readPackage(pkgPath); + if (pkg?.exports != null) { + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, + cjsConditions), null, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } + } +} + +const trailingSlashRegex = /(?:^|\/)\.?\.$/; +Module._findPath = function(request, paths, isMain) { + const absoluteRequest = path.isAbsolute(request); + if (absoluteRequest) { + paths = ['']; + } else if (!paths || paths.length === 0) { + return false; + } + + const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); + const entry = Module._pathCache[cacheKey]; + if (entry) + return entry; + + let exts; + let trailingSlash = request.length > 0 && + StringPrototypeCharCodeAt(request, request.length - 1) === + CHAR_FORWARD_SLASH; + if (!trailingSlash) { + trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); + } + + // For each path + for (let i = 0; i < paths.length; i++) { + // Don't search further if path doesn't exist + const curPath = paths[i]; + if (curPath && stat(curPath) < 1) continue; + + if (!absoluteRequest) { + const exportsResolved = resolveExports(curPath, request); + if (exportsResolved) + return exportsResolved; + } + + const basePath = path.resolve(curPath, request); + let filename; + + const rc = stat(basePath); + if (!trailingSlash) { + if (rc === 0) { // File. + if (!isMain) { + if (preserveSymlinks) { + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } else if (preserveSymlinksMain) { + // For the main module, we use the preserveSymlinksMain flag instead + // mainly for backward compatibility, as the preserveSymlinks flag + // historically has not applied to the main module. Most likely this + // was intended to keep .bin/ binaries working, as following those + // symlinks is usually required for the imports in the corresponding + // files to resolve; that said, in some use cases following symlinks + // causes bigger problems which is why the preserveSymlinksMain option + // is needed. + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } + + if (!filename) { + // Try it with each of the extensions + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryExtensions(basePath, exts, isMain); + } + } + + if (!filename && rc === 1) { // Directory. + // try it with each of the extensions at "index" + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryPackage(basePath, exts, isMain, request); + } + + if (filename) { + Module._pathCache[cacheKey] = filename; + return filename; + } + } + + return false; +}; + +// 'node_modules' character codes reversed +const nmChars = [ 115, 101, 108, 117, 100, 111, 109, 95, 101, 100, 111, 110 ]; +const nmLen = nmChars.length; +if (isWindows) { + // 'from' is the __dirname of the module. + Module._nodeModulePaths = function(from) { + // Guarantee that 'from' is absolute. + from = path.resolve(from); + + // note: this approach *only* works when the path is guaranteed + // to be absolute. Doing a fully-edge-case-correct path.split + // that works on both Windows and Posix is non-trivial. + + // return root node_modules when path is 'D:\\'. + // path.resolve will make sure from.length >=3 in Windows. + if (StringPrototypeCharCodeAt(from, from.length - 1) === + CHAR_BACKWARD_SLASH && + StringPrototypeCharCodeAt(from, from.length - 2) === CHAR_COLON) + return [from + 'node_modules']; + + const paths = []; + for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { + const code = StringPrototypeCharCodeAt(from, i); + // The path segment separator check ('\' and '/') was used to get + // node_modules path for every path segment. + // Use colon as an extra condition since we can get node_modules + // path for drive root like 'C:\node_modules' and don't need to + // parse drive name. + if (code === CHAR_BACKWARD_SLASH || + code === CHAR_FORWARD_SLASH || + code === CHAR_COLON) { + if (p !== nmLen) + ArrayPrototypePush( + paths, + StringPrototypeSlice(from, 0, last) + '\\node_modules' + ); + last = i; + p = 0; + } else if (p !== -1) { + if (nmChars[p] === code) { + ++p; + } else { + p = -1; + } + } + } + + return paths; + }; +} else { // posix + // 'from' is the __dirname of the module. + Module._nodeModulePaths = function(from) { + // Guarantee that 'from' is absolute. + from = path.resolve(from); + // Return early not only to avoid unnecessary work, but to *avoid* returning + // an array of two items for a root: [ '//node_modules', '/node_modules' ] + if (from === '/') + return ['/node_modules']; + + // note: this approach *only* works when the path is guaranteed + // to be absolute. Doing a fully-edge-case-correct path.split + // that works on both Windows and Posix is non-trivial. + const paths = []; + for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { + const code = StringPrototypeCharCodeAt(from, i); + if (code === CHAR_FORWARD_SLASH) { + if (p !== nmLen) + ArrayPrototypePush( + paths, + StringPrototypeSlice(from, 0, last) + '/node_modules' + ); + last = i; + p = 0; + } else if (p !== -1) { + if (nmChars[p] === code) { + ++p; + } else { + p = -1; + } + } + } + + // Append /node_modules to handle root paths. + ArrayPrototypePush(paths, '/node_modules'); + + return paths; + }; +} + +Module._resolveLookupPaths = function(request, parent) { + if (NativeModule.canBeRequiredByUsers(request)) { + debug('looking for %j in []', request); + return null; + } + + // Check for node modules paths. + if (StringPrototypeCharAt(request, 0) !== '.' || + (request.length > 1 && + StringPrototypeCharAt(request, 1) !== '.' && + StringPrototypeCharAt(request, 1) !== '/' && + (!isWindows || StringPrototypeCharAt(request, 1) !== '\\'))) { + + let paths = modulePaths; + if (parent?.paths?.length) { + paths = ArrayPrototypeConcat(parent.paths, paths); + } + + debug('looking for %j in %j', request, paths); + return paths.length > 0 ? paths : null; + } + + // In REPL, parent.filename is null. + if (!parent || !parent.id || !parent.filename) { + // Make require('./path/to/foo') work - normally the path is taken + // from realpath(__filename) but in REPL there is no filename + const mainPaths = ['.']; + + debug('looking for %j in %j', request, mainPaths); + return mainPaths; + } + + debug('RELATIVE: requested: %s from parent.id %s', request, parent.id); + + const parentDir = [path.dirname(parent.filename)]; + debug('looking for %j', parentDir); + return parentDir; +}; + +function emitCircularRequireWarning(prop) { + process.emitWarning( + `Accessing non-existent property '${String(prop)}' of module exports ` + + 'inside circular dependency' + ); +} + +// A Proxy that can be used as the prototype of a module.exports object and +// warns when non-existent properties are accessed. +const CircularRequirePrototypeWarningProxy = new Proxy({}, { + get(target, prop) { + // Allow __esModule access in any case because it is used in the output + // of transpiled code to determine whether something comes from an + // ES module, and is not used as a regular key of `module.exports`. + if (prop in target || prop === '__esModule') return target[prop]; + emitCircularRequireWarning(prop); + return undefined; + }, + + getOwnPropertyDescriptor(target, prop) { + if (ObjectPrototypeHasOwnProperty(target, prop) || prop === '__esModule') + return ObjectGetOwnPropertyDescriptor(target, prop); + emitCircularRequireWarning(prop); + return undefined; + } +}); + +function getExportsForCircularRequire(module) { + if (module.exports && + !isProxy(module.exports) && + ObjectGetPrototypeOf(module.exports) === ObjectPrototype && + // Exclude transpiled ES6 modules / TypeScript code because those may + // employ unusual patterns for accessing 'module.exports'. That should + // be okay because ES6 modules have a different approach to circular + // dependencies anyway. + !module.exports.__esModule) { + // This is later unset once the module is done loading. + ObjectSetPrototypeOf( + module.exports, CircularRequirePrototypeWarningProxy); + } + + return module.exports; +} + +const _resolveFilename = function(request, parent, isMain, options) { + if (StringPrototypeStartsWith(request, 'node:') || + NativeModule.canBeRequiredByUsers(request)) { + return request; + } + + let paths; + + if (typeof options === 'object' && options !== null) { + if (ArrayIsArray(options.paths)) { + const isRelative = StringPrototypeStartsWith(request, './') || + StringPrototypeStartsWith(request, '../') || + ((isWindows && StringPrototypeStartsWith(request, '.\\')) || + StringPrototypeStartsWith(request, '..\\')); + + if (isRelative) { + paths = options.paths; + } else { + const fakeParent = new Module('', null); + + paths = []; + + for (let i = 0; i < options.paths.length; i++) { + const path = options.paths[i]; + fakeParent.paths = Module._nodeModulePaths(path); + const lookupPaths = Module._resolveLookupPaths(request, fakeParent); + + for (let j = 0; j < lookupPaths.length; j++) { + if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) + ArrayPrototypePush(paths, lookupPaths[j]); + } + } + } + } else if (options.paths === undefined) { + paths = Module._resolveLookupPaths(request, parent); + } else { + throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); + } + } else { + paths = Module._resolveLookupPaths(request, parent); + } + + if (parent?.filename) { + if (request[0] === '#') { + const pkg = readPackageScope(parent.filename) || {}; + if (pkg.data?.imports != null) { + try { + return finalizeEsmResolution( + packageImportsResolve(request, pathToFileURL(parent.filename), + cjsConditions), parent.filename, + pkg.path); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request); + throw e; + } + } + } + } + + // Try module self resolution first + const parentPath = trySelfParentPath(parent); + const selfResolved = trySelf(parentPath, request); + if (selfResolved) { + const cacheKey = request + '\x00' + + (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); + Module._pathCache[cacheKey] = selfResolved; + return selfResolved; + } + + // Look up the filename first, since that's the cache key. + const filename = Module._findPath(request, paths, isMain, false); + if (filename) return filename; + const requireStack = []; + for (let cursor = parent; + cursor; + cursor = moduleParentCache.get(cursor)) { + ArrayPrototypePush(requireStack, cursor.filename || cursor.id); + } + let message = `Cannot find module '${request}'`; + if (requireStack.length > 0) { + message = message + '\nRequire stack:\n- ' + + ArrayPrototypeJoin(requireStack, '\n- '); + } + // eslint-disable-next-line no-restricted-syntax + const err = new Error(message); + err.code = 'MODULE_NOT_FOUND'; + err.requireStack = requireStack; + throw err; +}; + +function finalizeEsmResolution(resolved, parentPath, pkgPath) { + if (RegExpPrototypeTest(encodedSepRegEx, resolved)) + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved, 'must not include encoded "/" or "\\" characters', parentPath); + const filename = fileURLToPath(resolved); + const actual = tryFile(filename); + if (actual) + return actual; + const err = createEsmNotFoundErr(filename, + path.resolve(pkgPath, 'package.json')); + throw err; +} + +function createEsmNotFoundErr(request, path) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error(`Cannot find module '${request}'`); + err.code = 'MODULE_NOT_FOUND'; + if (path) + err.path = path; + // TODO(BridgeAR): Add the requireStack as well. + return err; +} diff --git a/package.json b/package.json index 060a78c44..b1ca723a4 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "/transpilers/", "/dist/", "!/dist/test", + "/dist-raw/NODE-LICENSE.md", "/dist-raw/**.js", "/register/", "/esm/", @@ -113,7 +114,7 @@ "@types/node": "13.13.5", "@types/proper-lockfile": "^4.1.2", "@types/proxyquire": "^1.3.28", - "@types/react": "^16.0.2", + "@types/react": "^16.14.19", "@types/rimraf": "^3.0.0", "@types/semver": "^7.1.0", "@yarnpkg/fslib": "^2.4.0", diff --git a/raw/node-internal-modules-cjs-loader-v17.0.1.js b/raw/node-internal-modules-cjs-loader-v17.0.1.js new file mode 100644 index 000000000..0ea7182d2 --- /dev/null +++ b/raw/node-internal-modules-cjs-loader-v17.0.1.js @@ -0,0 +1,1197 @@ +// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/loader.js + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +const { + ArrayIsArray, + ArrayPrototypeConcat, + ArrayPrototypeFilter, + ArrayPrototypeIncludes, + ArrayPrototypeIndexOf, + ArrayPrototypeJoin, + ArrayPrototypePush, + ArrayPrototypeSlice, + ArrayPrototypeSplice, + ArrayPrototypeUnshift, + ArrayPrototypeUnshiftApply, + Boolean, + Error, + JSONParse, + ObjectCreate, + ObjectDefineProperty, + ObjectFreeze, + ObjectGetOwnPropertyDescriptor, + ObjectGetPrototypeOf, + ObjectKeys, + ObjectPrototype, + ObjectPrototypeHasOwnProperty, + ObjectSetPrototypeOf, + Proxy, + ReflectApply, + ReflectSet, + RegExpPrototypeExec, + RegExpPrototypeTest, + SafeMap, + SafeWeakMap, + String, + StringPrototypeCharAt, + StringPrototypeCharCodeAt, + StringPrototypeEndsWith, + StringPrototypeLastIndexOf, + StringPrototypeIndexOf, + StringPrototypeMatch, + StringPrototypeRepeat, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, +} = primordials; + +// Map used to store CJS parsing data. +const cjsParseCache = new SafeWeakMap(); + +// Set first due to cycle with ESM loader functions. +module.exports = { + wrapSafe, Module, toRealPath, readPackageScope, cjsParseCache, + get hasLoadedAnyUserCJSModule() { return hasLoadedAnyUserCJSModule; } +}; + +const { NativeModule } = require('internal/bootstrap/loaders'); +const { + maybeCacheSourceMap, +} = require('internal/source_map/source_map_cache'); +const { pathToFileURL, fileURLToPath, isURLInstance } = require('internal/url'); +const { deprecate } = require('internal/util'); +const vm = require('vm'); +const assert = require('internal/assert'); +const fs = require('fs'); +const internalFS = require('internal/fs/utils'); +const path = require('path'); +const { sep } = path; +const { internalModuleStat } = internalBinding('fs'); +const packageJsonReader = require('internal/modules/package_json_reader'); +const { safeGetenv } = internalBinding('credentials'); +const { + cjsConditions, + hasEsmSyntax, + loadNativeModule, + makeRequireFunction, + normalizeReferrerURL, + stripBOM, +} = require('internal/modules/cjs/helpers'); +const { getOptionValue } = require('internal/options'); +const preserveSymlinks = getOptionValue('--preserve-symlinks'); +const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); +// Do not eagerly grab .manifest, it may be in TDZ +const policy = getOptionValue('--experimental-policy') ? + require('internal/process/policy') : + null; + +// Whether any user-provided CJS modules had been loaded (executed). +// Used for internal assertions. +let hasLoadedAnyUserCJSModule = false; + +const { + codes: { + ERR_INVALID_ARG_VALUE, + ERR_INVALID_MODULE_SPECIFIER, + ERR_REQUIRE_ESM, + ERR_UNKNOWN_BUILTIN_MODULE, + }, + setArrowMessage, +} = require('internal/errors'); +const { validateString } = require('internal/validators'); +const pendingDeprecation = getOptionValue('--pending-deprecation'); + +const { + CHAR_FORWARD_SLASH, + CHAR_BACKWARD_SLASH, + CHAR_COLON +} = require('internal/constants'); + +const { + isProxy +} = require('internal/util/types'); + +const asyncESM = require('internal/process/esm_loader'); +const { enrichCJSError } = require('internal/modules/esm/translators'); +const { kEvaluated } = internalBinding('module_wrap'); +const { + encodedSepRegEx, + packageExportsResolve, + packageImportsResolve +} = require('internal/modules/esm/resolve'); + +const isWindows = process.platform === 'win32'; + +const relativeResolveCache = ObjectCreate(null); + +let requireDepth = 0; +let statCache = null; +let isPreloading = false; + +function stat(filename) { + filename = path.toNamespacedPath(filename); + if (statCache !== null) { + const result = statCache.get(filename); + if (result !== undefined) return result; + } + const result = internalModuleStat(filename); + if (statCache !== null && result >= 0) { + // Only set cache when `internalModuleStat(filename)` succeeds. + statCache.set(filename, result); + } + return result; +} + +function updateChildren(parent, child, scan) { + const children = parent?.children; + if (children && !(scan && ArrayPrototypeIncludes(children, child))) + ArrayPrototypePush(children, child); +} + +const moduleParentCache = new SafeWeakMap(); + +let modulePaths = []; + +let patched = false; + +function getModuleParent() { + return moduleParentCache.get(this); +} + +function setModuleParent(value) { + moduleParentCache.set(this, value); +} + +let debug = require('internal/util/debuglog').debuglog('module', (fn) => { + debug = fn; +}); + +// Given a module name, and a list of paths to test, returns the first +// matching file in the following precedence. +// +// require("a.") +// -> a. +// +// require("a") +// -> a +// -> a. +// -> a/index. + +const packageJsonCache = new SafeMap(); + +function readPackage(requestPath) { + const jsonPath = path.resolve(requestPath, 'package.json'); + + const existing = packageJsonCache.get(jsonPath); + if (existing !== undefined) return existing; + + const result = packageJsonReader.read(jsonPath); + const json = result.containsKeys === false ? '{}' : result.string; + if (json === undefined) { + packageJsonCache.set(jsonPath, false); + return false; + } + + try { + const parsed = JSONParse(json); + const filtered = { + name: parsed.name, + main: parsed.main, + exports: parsed.exports, + imports: parsed.imports, + type: parsed.type + }; + packageJsonCache.set(jsonPath, filtered); + return filtered; + } catch (e) { + e.path = jsonPath; + e.message = 'Error parsing ' + jsonPath + ': ' + e.message; + throw e; + } +} + +function readPackageScope(checkPath) { + const rootSeparatorIndex = StringPrototypeIndexOf(checkPath, sep); + let separatorIndex; + do { + separatorIndex = StringPrototypeLastIndexOf(checkPath, sep); + checkPath = StringPrototypeSlice(checkPath, 0, separatorIndex); + if (StringPrototypeEndsWith(checkPath, sep + 'node_modules')) + return false; + const pjson = readPackage(checkPath + sep); + if (pjson) return { + data: pjson, + path: checkPath, + }; + } while (separatorIndex > rootSeparatorIndex); + return false; +} + +function tryPackage(requestPath, exts, isMain, originalPath) { + const pkg = readPackage(requestPath)?.main; + + if (!pkg) { + return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + } + + const filename = path.resolve(requestPath, pkg); + let actual = tryFile(filename, isMain) || + tryExtensions(filename, exts, isMain) || + tryExtensions(path.resolve(filename, 'index'), exts, isMain); + if (actual === false) { + actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + if (!actual) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error( + `Cannot find module '${filename}'. ` + + 'Please verify that the package.json has a valid "main" entry' + ); + err.code = 'MODULE_NOT_FOUND'; + err.path = path.resolve(requestPath, 'package.json'); + err.requestPath = originalPath; + // TODO(BridgeAR): Add the requireStack as well. + throw err; + } else { + const jsonPath = path.resolve(requestPath, 'package.json'); + process.emitWarning( + `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + + 'Please either fix that or report it to the module author', + 'DeprecationWarning', + 'DEP0128' + ); + } + } + return actual; +} + +// In order to minimize unnecessary lstat() calls, +// this cache is a list of known-real paths. +// Set to an empty Map to reset. +const realpathCache = new SafeMap(); + +// Check if the file exists and is not a directory +// if using --preserve-symlinks and isMain is false, +// keep symlinks intact, otherwise resolve to the +// absolute realpath. +function tryFile(requestPath, isMain) { + const rc = stat(requestPath); + if (rc !== 0) return; + if (preserveSymlinks && !isMain) { + return path.resolve(requestPath); + } + return toRealPath(requestPath); +} + +function toRealPath(requestPath) { + return fs.realpathSync(requestPath, { + [internalFS.realpathCacheKey]: realpathCache + }); +} + +// Given a path, check if the file exists with any of the set extensions +function tryExtensions(p, exts, isMain) { + for (let i = 0; i < exts.length; i++) { + const filename = tryFile(p + exts[i], isMain); + + if (filename) { + return filename; + } + } + return false; +} + +// Find the longest (possibly multi-dot) extension registered in +// Module._extensions +function findLongestRegisteredExtension(filename) { + const name = path.basename(filename); + let currentExtension; + let index; + let startIndex = 0; + while ((index = StringPrototypeIndexOf(name, '.', startIndex)) !== -1) { + startIndex = index + 1; + if (index === 0) continue; // Skip dotfiles like .gitignore + currentExtension = StringPrototypeSlice(name, index); + if (Module._extensions[currentExtension]) return currentExtension; + } + return '.js'; +} + +function trySelfParentPath(parent) { + if (!parent) return false; + + if (parent.filename) { + return parent.filename; + } else if (parent.id === '' || parent.id === 'internal/preload') { + try { + return process.cwd() + path.sep; + } catch { + return false; + } + } +} + +function trySelf(parentPath, request) { + if (!parentPath) return false; + + const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; + if (!pkg || pkg.exports === undefined) return false; + if (typeof pkg.name !== 'string') return false; + + let expansion; + if (request === pkg.name) { + expansion = '.'; + } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { + expansion = '.' + StringPrototypeSlice(request, pkg.name.length); + } else { + return false; + } + + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), expansion, pkg, + pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } +} + +// This only applies to requests of a specific form: +// 1. name/.* +// 2. @scope/name/.* +const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; +function resolveExports(nmPath, request) { + // The implementation's behavior is meant to mirror resolution in ESM. + const { 1: name, 2: expansion = '' } = + StringPrototypeMatch(request, EXPORTS_PATTERN) || []; + if (!name) + return; + const pkgPath = path.resolve(nmPath, name); + const pkg = readPackage(pkgPath); + if (pkg?.exports != null) { + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, + cjsConditions), null, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } + } +} + +const trailingSlashRegex = /(?:^|\/)\.?\.$/; +Module._findPath = function(request, paths, isMain) { + const absoluteRequest = path.isAbsolute(request); + if (absoluteRequest) { + paths = ['']; + } else if (!paths || paths.length === 0) { + return false; + } + + const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); + const entry = Module._pathCache[cacheKey]; + if (entry) + return entry; + + let exts; + let trailingSlash = request.length > 0 && + StringPrototypeCharCodeAt(request, request.length - 1) === + CHAR_FORWARD_SLASH; + if (!trailingSlash) { + trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); + } + + // For each path + for (let i = 0; i < paths.length; i++) { + // Don't search further if path doesn't exist + const curPath = paths[i]; + if (curPath && stat(curPath) < 1) continue; + + if (!absoluteRequest) { + const exportsResolved = resolveExports(curPath, request); + if (exportsResolved) + return exportsResolved; + } + + const basePath = path.resolve(curPath, request); + let filename; + + const rc = stat(basePath); + if (!trailingSlash) { + if (rc === 0) { // File. + if (!isMain) { + if (preserveSymlinks) { + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } else if (preserveSymlinksMain) { + // For the main module, we use the preserveSymlinksMain flag instead + // mainly for backward compatibility, as the preserveSymlinks flag + // historically has not applied to the main module. Most likely this + // was intended to keep .bin/ binaries working, as following those + // symlinks is usually required for the imports in the corresponding + // files to resolve; that said, in some use cases following symlinks + // causes bigger problems which is why the preserveSymlinksMain option + // is needed. + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } + + if (!filename) { + // Try it with each of the extensions + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryExtensions(basePath, exts, isMain); + } + } + + if (!filename && rc === 1) { // Directory. + // try it with each of the extensions at "index" + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryPackage(basePath, exts, isMain, request); + } + + if (filename) { + Module._pathCache[cacheKey] = filename; + return filename; + } + } + + return false; +}; + +// 'node_modules' character codes reversed +const nmChars = [ 115, 101, 108, 117, 100, 111, 109, 95, 101, 100, 111, 110 ]; +const nmLen = nmChars.length; +if (isWindows) { + // 'from' is the __dirname of the module. + Module._nodeModulePaths = function(from) { + // Guarantee that 'from' is absolute. + from = path.resolve(from); + + // note: this approach *only* works when the path is guaranteed + // to be absolute. Doing a fully-edge-case-correct path.split + // that works on both Windows and Posix is non-trivial. + + // return root node_modules when path is 'D:\\'. + // path.resolve will make sure from.length >=3 in Windows. + if (StringPrototypeCharCodeAt(from, from.length - 1) === + CHAR_BACKWARD_SLASH && + StringPrototypeCharCodeAt(from, from.length - 2) === CHAR_COLON) + return [from + 'node_modules']; + + const paths = []; + for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { + const code = StringPrototypeCharCodeAt(from, i); + // The path segment separator check ('\' and '/') was used to get + // node_modules path for every path segment. + // Use colon as an extra condition since we can get node_modules + // path for drive root like 'C:\node_modules' and don't need to + // parse drive name. + if (code === CHAR_BACKWARD_SLASH || + code === CHAR_FORWARD_SLASH || + code === CHAR_COLON) { + if (p !== nmLen) + ArrayPrototypePush( + paths, + StringPrototypeSlice(from, 0, last) + '\\node_modules' + ); + last = i; + p = 0; + } else if (p !== -1) { + if (nmChars[p] === code) { + ++p; + } else { + p = -1; + } + } + } + + return paths; + }; +} else { // posix + // 'from' is the __dirname of the module. + Module._nodeModulePaths = function(from) { + // Guarantee that 'from' is absolute. + from = path.resolve(from); + // Return early not only to avoid unnecessary work, but to *avoid* returning + // an array of two items for a root: [ '//node_modules', '/node_modules' ] + if (from === '/') + return ['/node_modules']; + + // note: this approach *only* works when the path is guaranteed + // to be absolute. Doing a fully-edge-case-correct path.split + // that works on both Windows and Posix is non-trivial. + const paths = []; + for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { + const code = StringPrototypeCharCodeAt(from, i); + if (code === CHAR_FORWARD_SLASH) { + if (p !== nmLen) + ArrayPrototypePush( + paths, + StringPrototypeSlice(from, 0, last) + '/node_modules' + ); + last = i; + p = 0; + } else if (p !== -1) { + if (nmChars[p] === code) { + ++p; + } else { + p = -1; + } + } + } + + // Append /node_modules to handle root paths. + ArrayPrototypePush(paths, '/node_modules'); + + return paths; + }; +} + +Module._resolveLookupPaths = function(request, parent) { + if (NativeModule.canBeRequiredByUsers(request)) { + debug('looking for %j in []', request); + return null; + } + + // Check for node modules paths. + if (StringPrototypeCharAt(request, 0) !== '.' || + (request.length > 1 && + StringPrototypeCharAt(request, 1) !== '.' && + StringPrototypeCharAt(request, 1) !== '/' && + (!isWindows || StringPrototypeCharAt(request, 1) !== '\\'))) { + + let paths = modulePaths; + if (parent?.paths?.length) { + paths = ArrayPrototypeConcat(parent.paths, paths); + } + + debug('looking for %j in %j', request, paths); + return paths.length > 0 ? paths : null; + } + + // In REPL, parent.filename is null. + if (!parent || !parent.id || !parent.filename) { + // Make require('./path/to/foo') work - normally the path is taken + // from realpath(__filename) but in REPL there is no filename + const mainPaths = ['.']; + + debug('looking for %j in %j', request, mainPaths); + return mainPaths; + } + + debug('RELATIVE: requested: %s from parent.id %s', request, parent.id); + + const parentDir = [path.dirname(parent.filename)]; + debug('looking for %j', parentDir); + return parentDir; +}; + +function emitCircularRequireWarning(prop) { + process.emitWarning( + `Accessing non-existent property '${String(prop)}' of module exports ` + + 'inside circular dependency' + ); +} + +// A Proxy that can be used as the prototype of a module.exports object and +// warns when non-existent properties are accessed. +const CircularRequirePrototypeWarningProxy = new Proxy({}, { + get(target, prop) { + // Allow __esModule access in any case because it is used in the output + // of transpiled code to determine whether something comes from an + // ES module, and is not used as a regular key of `module.exports`. + if (prop in target || prop === '__esModule') return target[prop]; + emitCircularRequireWarning(prop); + return undefined; + }, + + getOwnPropertyDescriptor(target, prop) { + if (ObjectPrototypeHasOwnProperty(target, prop) || prop === '__esModule') + return ObjectGetOwnPropertyDescriptor(target, prop); + emitCircularRequireWarning(prop); + return undefined; + } +}); + +function getExportsForCircularRequire(module) { + if (module.exports && + !isProxy(module.exports) && + ObjectGetPrototypeOf(module.exports) === ObjectPrototype && + // Exclude transpiled ES6 modules / TypeScript code because those may + // employ unusual patterns for accessing 'module.exports'. That should + // be okay because ES6 modules have a different approach to circular + // dependencies anyway. + !module.exports.__esModule) { + // This is later unset once the module is done loading. + ObjectSetPrototypeOf( + module.exports, CircularRequirePrototypeWarningProxy); + } + + return module.exports; +} + +// Check the cache for the requested file. +// 1. If a module already exists in the cache: return its exports object. +// 2. If the module is native: call +// `NativeModule.prototype.compileForPublicLoader()` and return the exports. +// 3. Otherwise, create a new module for the file and save it to the cache. +// Then have it load the file contents before returning its exports +// object. +Module._load = function(request, parent, isMain) { + let relResolveCacheIdentifier; + if (parent) { + debug('Module._load REQUEST %s parent: %s', request, parent.id); + // Fast path for (lazy loaded) modules in the same directory. The indirect + // caching is required to allow cache invalidation without changing the old + // cache key names. + relResolveCacheIdentifier = `${parent.path}\x00${request}`; + const filename = relativeResolveCache[relResolveCacheIdentifier]; + if (filename !== undefined) { + const cachedModule = Module._cache[filename]; + if (cachedModule !== undefined) { + updateChildren(parent, cachedModule, true); + if (!cachedModule.loaded) + return getExportsForCircularRequire(cachedModule); + return cachedModule.exports; + } + delete relativeResolveCache[relResolveCacheIdentifier]; + } + } + + const filename = Module._resolveFilename(request, parent, isMain); + if (StringPrototypeStartsWith(filename, 'node:')) { + // Slice 'node:' prefix + const id = StringPrototypeSlice(filename, 5); + + const module = loadNativeModule(id, request); + if (!module?.canBeRequiredByUsers) { + throw new ERR_UNKNOWN_BUILTIN_MODULE(filename); + } + + return module.exports; + } + + const cachedModule = Module._cache[filename]; + if (cachedModule !== undefined) { + updateChildren(parent, cachedModule, true); + if (!cachedModule.loaded) { + const parseCachedModule = cjsParseCache.get(cachedModule); + if (!parseCachedModule || parseCachedModule.loaded) + return getExportsForCircularRequire(cachedModule); + parseCachedModule.loaded = true; + } else { + return cachedModule.exports; + } + } + + const mod = loadNativeModule(filename, request); + if (mod?.canBeRequiredByUsers) return mod.exports; + + // Don't call updateChildren(), Module constructor already does. + const module = cachedModule || new Module(filename, parent); + + if (isMain) { + process.mainModule = module; + module.id = '.'; + } + + Module._cache[filename] = module; + if (parent !== undefined) { + relativeResolveCache[relResolveCacheIdentifier] = filename; + } + + let threw = true; + try { + module.load(filename); + threw = false; + } finally { + if (threw) { + delete Module._cache[filename]; + if (parent !== undefined) { + delete relativeResolveCache[relResolveCacheIdentifier]; + const children = parent?.children; + if (ArrayIsArray(children)) { + const index = ArrayPrototypeIndexOf(children, module); + if (index !== -1) { + ArrayPrototypeSplice(children, index, 1); + } + } + } + } else if (module.exports && + !isProxy(module.exports) && + ObjectGetPrototypeOf(module.exports) === + CircularRequirePrototypeWarningProxy) { + ObjectSetPrototypeOf(module.exports, ObjectPrototype); + } + } + + return module.exports; +}; + +Module._resolveFilename = function(request, parent, isMain, options) { + if (StringPrototypeStartsWith(request, 'node:') || + NativeModule.canBeRequiredByUsers(request)) { + return request; + } + + let paths; + + if (typeof options === 'object' && options !== null) { + if (ArrayIsArray(options.paths)) { + const isRelative = StringPrototypeStartsWith(request, './') || + StringPrototypeStartsWith(request, '../') || + ((isWindows && StringPrototypeStartsWith(request, '.\\')) || + StringPrototypeStartsWith(request, '..\\')); + + if (isRelative) { + paths = options.paths; + } else { + const fakeParent = new Module('', null); + + paths = []; + + for (let i = 0; i < options.paths.length; i++) { + const path = options.paths[i]; + fakeParent.paths = Module._nodeModulePaths(path); + const lookupPaths = Module._resolveLookupPaths(request, fakeParent); + + for (let j = 0; j < lookupPaths.length; j++) { + if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) + ArrayPrototypePush(paths, lookupPaths[j]); + } + } + } + } else if (options.paths === undefined) { + paths = Module._resolveLookupPaths(request, parent); + } else { + throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); + } + } else { + paths = Module._resolveLookupPaths(request, parent); + } + + if (parent?.filename) { + if (request[0] === '#') { + const pkg = readPackageScope(parent.filename) || {}; + if (pkg.data?.imports != null) { + try { + return finalizeEsmResolution( + packageImportsResolve(request, pathToFileURL(parent.filename), + cjsConditions), parent.filename, + pkg.path); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request); + throw e; + } + } + } + } + + // Try module self resolution first + const parentPath = trySelfParentPath(parent); + const selfResolved = trySelf(parentPath, request); + if (selfResolved) { + const cacheKey = request + '\x00' + + (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); + Module._pathCache[cacheKey] = selfResolved; + return selfResolved; + } + + // Look up the filename first, since that's the cache key. + const filename = Module._findPath(request, paths, isMain, false); + if (filename) return filename; + const requireStack = []; + for (let cursor = parent; + cursor; + cursor = moduleParentCache.get(cursor)) { + ArrayPrototypePush(requireStack, cursor.filename || cursor.id); + } + let message = `Cannot find module '${request}'`; + if (requireStack.length > 0) { + message = message + '\nRequire stack:\n- ' + + ArrayPrototypeJoin(requireStack, '\n- '); + } + // eslint-disable-next-line no-restricted-syntax + const err = new Error(message); + err.code = 'MODULE_NOT_FOUND'; + err.requireStack = requireStack; + throw err; +}; + +function finalizeEsmResolution(resolved, parentPath, pkgPath) { + if (RegExpPrototypeTest(encodedSepRegEx, resolved)) + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved, 'must not include encoded "/" or "\\" characters', parentPath); + const filename = fileURLToPath(resolved); + const actual = tryFile(filename); + if (actual) + return actual; + const err = createEsmNotFoundErr(filename, + path.resolve(pkgPath, 'package.json')); + throw err; +} + +function createEsmNotFoundErr(request, path) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error(`Cannot find module '${request}'`); + err.code = 'MODULE_NOT_FOUND'; + if (path) + err.path = path; + // TODO(BridgeAR): Add the requireStack as well. + return err; +} + +// Given a file name, pass it to the proper extension handler. +Module.prototype.load = function(filename) { + debug('load %j for module %j', filename, this.id); + + assert(!this.loaded); + this.filename = filename; + this.paths = Module._nodeModulePaths(path.dirname(filename)); + + const extension = findLongestRegisteredExtension(filename); + // allow .mjs to be overridden + if (StringPrototypeEndsWith(filename, '.mjs') && !Module._extensions['.mjs']) + throw new ERR_REQUIRE_ESM(filename, true); + + Module._extensions[extension](this, filename); + this.loaded = true; + + const esmLoader = asyncESM.esmLoader; + // Create module entry at load time to snapshot exports correctly + const exports = this.exports; + // Preemptively cache + if ((module?.module === undefined || + module.module.getStatus() < kEvaluated) && + !esmLoader.cjsCache.has(this)) + esmLoader.cjsCache.set(this, exports); +}; + + +// Loads a module at the given file path. Returns that module's +// `exports` property. +Module.prototype.require = function(id) { + validateString(id, 'id'); + if (id === '') { + throw new ERR_INVALID_ARG_VALUE('id', id, + 'must be a non-empty string'); + } + requireDepth++; + try { + return Module._load(id, this, /* isMain */ false); + } finally { + requireDepth--; + } +}; + + +// Resolved path to process.argv[1] will be lazily placed here +// (needed for setting breakpoint when called with --inspect-brk) +let resolvedArgv; +let hasPausedEntry = false; + +function wrapSafe(filename, content, cjsModuleInstance) { + if (patched) { + const wrapper = Module.wrap(content); + return vm.runInThisContext(wrapper, { + filename, + lineOffset: 0, + displayErrors: true, + importModuleDynamically: async (specifier) => { + const loader = asyncESM.esmLoader; + return loader.import(specifier, normalizeReferrerURL(filename)); + }, + }); + } + try { + return vm.compileFunction(content, [ + 'exports', + 'require', + 'module', + '__filename', + '__dirname', + ], { + filename, + importModuleDynamically(specifier) { + const loader = asyncESM.esmLoader; + return loader.import(specifier, normalizeReferrerURL(filename)); + }, + }); + } catch (err) { + if (process.mainModule === cjsModuleInstance) + enrichCJSError(err, content); + throw err; + } +} + +// Run the file contents in the correct scope or sandbox. Expose +// the correct helper variables (require, module, exports) to +// the file. +// Returns exception, if any. +Module.prototype._compile = function(content, filename) { + let moduleURL; + let redirects; + if (policy?.manifest) { + moduleURL = pathToFileURL(filename); + redirects = policy.manifest.getDependencyMapper(moduleURL); + policy.manifest.assertIntegrity(moduleURL, content); + } + + maybeCacheSourceMap(filename, content, this); + const compiledWrapper = wrapSafe(filename, content, this); + + let inspectorWrapper = null; + if (getOptionValue('--inspect-brk') && process._eval == null) { + if (!resolvedArgv) { + // We enter the repl if we're not given a filename argument. + if (process.argv[1]) { + try { + resolvedArgv = Module._resolveFilename(process.argv[1], null, false); + } catch { + // We only expect this codepath to be reached in the case of a + // preloaded module (it will fail earlier with the main entry) + assert(ArrayIsArray(getOptionValue('--require'))); + } + } else { + resolvedArgv = 'repl'; + } + } + + // Set breakpoint on module start + if (resolvedArgv && !hasPausedEntry && filename === resolvedArgv) { + hasPausedEntry = true; + inspectorWrapper = internalBinding('inspector').callAndPauseOnStart; + } + } + const dirname = path.dirname(filename); + const require = makeRequireFunction(this, redirects); + let result; + const exports = this.exports; + const thisValue = exports; + const module = this; + if (requireDepth === 0) statCache = new SafeMap(); + if (inspectorWrapper) { + result = inspectorWrapper(compiledWrapper, thisValue, exports, + require, module, filename, dirname); + } else { + result = ReflectApply(compiledWrapper, thisValue, + [exports, require, module, filename, dirname]); + } + hasLoadedAnyUserCJSModule = true; + if (requireDepth === 0) statCache = null; + return result; +}; + +// Native extension for .js +Module._extensions['.js'] = function(module, filename) { + // If already analyzed the source, then it will be cached. + const cached = cjsParseCache.get(module); + let content; + if (cached?.source) { + content = cached.source; + cached.source = undefined; + } else { + content = fs.readFileSync(filename, 'utf8'); + } + if (StringPrototypeEndsWith(filename, '.js')) { + const pkg = readPackageScope(filename); + // Function require shouldn't be used in ES modules. + if (pkg?.data?.type === 'module') { + const parent = moduleParentCache.get(module); + const parentPath = parent?.filename; + const packageJsonPath = path.resolve(pkg.path, 'package.json'); + const usesEsm = hasEsmSyntax(content); + const err = new ERR_REQUIRE_ESM(filename, usesEsm, parentPath, + packageJsonPath); + // Attempt to reconstruct the parent require frame. + if (Module._cache[parentPath]) { + let parentSource; + try { + parentSource = fs.readFileSync(parentPath, 'utf8'); + } catch {} + if (parentSource) { + const errLine = StringPrototypeSplit( + StringPrototypeSlice(err.stack, StringPrototypeIndexOf( + err.stack, ' at ')), '\n', 1)[0]; + const { 1: line, 2: col } = + RegExpPrototypeExec(/(\d+):(\d+)\)/, errLine) || []; + if (line && col) { + const srcLine = StringPrototypeSplit(parentSource, '\n')[line - 1]; + const frame = `${parentPath}:${line}\n${srcLine}\n${ + StringPrototypeRepeat(' ', col - 1)}^\n`; + setArrowMessage(err, frame); + } + } + } + throw err; + } + } + module._compile(content, filename); +}; + + +// Native extension for .json +Module._extensions['.json'] = function(module, filename) { + const content = fs.readFileSync(filename, 'utf8'); + + if (policy?.manifest) { + const moduleURL = pathToFileURL(filename); + policy.manifest.assertIntegrity(moduleURL, content); + } + + try { + module.exports = JSONParse(stripBOM(content)); + } catch (err) { + err.message = filename + ': ' + err.message; + throw err; + } +}; + + +// Native extension for .node +Module._extensions['.node'] = function(module, filename) { + if (policy?.manifest) { + const content = fs.readFileSync(filename); + const moduleURL = pathToFileURL(filename); + policy.manifest.assertIntegrity(moduleURL, content); + } + // Be aware this doesn't use `content` + return process.dlopen(module, path.toNamespacedPath(filename)); +}; + +function createRequireFromPath(filename) { + // Allow a directory to be passed as the filename + const trailingSlash = + StringPrototypeEndsWith(filename, '/') || + (isWindows && StringPrototypeEndsWith(filename, '\\')); + + const proxyPath = trailingSlash ? + path.join(filename, 'noop.js') : + filename; + + const m = new Module(proxyPath); + m.filename = proxyPath; + + m.paths = Module._nodeModulePaths(m.path); + return makeRequireFunction(m, null); +} + +const createRequireError = 'must be a file URL object, file URL string, or ' + + 'absolute path string'; + +function createRequire(filename) { + let filepath; + + if (isURLInstance(filename) || + (typeof filename === 'string' && !path.isAbsolute(filename))) { + try { + filepath = fileURLToPath(filename); + } catch { + throw new ERR_INVALID_ARG_VALUE('filename', filename, + createRequireError); + } + } else if (typeof filename !== 'string') { + throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError); + } else { + filepath = filename; + } + return createRequireFromPath(filepath); +} + +Module.createRequire = createRequire; + +Module._initPaths = function() { + const homeDir = isWindows ? process.env.USERPROFILE : safeGetenv('HOME'); + const nodePath = isWindows ? process.env.NODE_PATH : safeGetenv('NODE_PATH'); + + // process.execPath is $PREFIX/bin/node except on Windows where it is + // $PREFIX\node.exe where $PREFIX is the root of the Node.js installation. + const prefixDir = isWindows ? + path.resolve(process.execPath, '..') : + path.resolve(process.execPath, '..', '..'); + + const paths = [path.resolve(prefixDir, 'lib', 'node')]; + + if (homeDir) { + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules')); + } + + if (nodePath) { + ArrayPrototypeUnshiftApply(paths, ArrayPrototypeFilter( + StringPrototypeSplit(nodePath, path.delimiter), + Boolean + )); + } + + modulePaths = paths; + + // Clone as a shallow copy, for introspection. + Module.globalPaths = ArrayPrototypeSlice(modulePaths); +}; + +Module._preloadModules = function(requests) { + if (!ArrayIsArray(requests)) + return; + + isPreloading = true; + + // Preloaded modules have a dummy parent module which is deemed to exist + // in the current working directory. This seeds the search path for + // preloaded modules. + const parent = new Module('internal/preload', null); + try { + parent.paths = Module._nodeModulePaths(process.cwd()); + } catch (e) { + if (e.code !== 'ENOENT') { + isPreloading = false; + throw e; + } + } + for (let n = 0; n < requests.length; n++) + parent.require(requests[n]); + isPreloading = false; +}; + +Module.syncBuiltinESMExports = function syncBuiltinESMExports() { + for (const mod of NativeModule.map.values()) { + if (mod.canBeRequiredByUsers) { + mod.syncExports(); + } + } +}; + +// Backwards compatibility +Module.Module = Module; diff --git a/raw/node-esm-resolve-implementation-v13.12.0.js b/raw/node-internal-modules-esm-resolve-v13.12.0.js similarity index 99% rename from raw/node-esm-resolve-implementation-v13.12.0.js rename to raw/node-internal-modules-esm-resolve-v13.12.0.js index 1c2b8e67f..fef59f133 100644 --- a/raw/node-esm-resolve-implementation-v13.12.0.js +++ b/raw/node-internal-modules-esm-resolve-v13.12.0.js @@ -1,3 +1,4 @@ +// Copied from https://github.com/nodejs/node/blob/v13.12.0/lib/internal/modules/esm/resolve.js 'use strict'; const { diff --git a/raw/node-esm-resolve-implementation-v15.3.0.js b/raw/node-internal-modules-esm-resolve-v15.3.0.js similarity index 99% rename from raw/node-esm-resolve-implementation-v15.3.0.js rename to raw/node-internal-modules-esm-resolve-v15.3.0.js index 782b892a6..bde4be0a0 100644 --- a/raw/node-esm-resolve-implementation-v15.3.0.js +++ b/raw/node-internal-modules-esm-resolve-v15.3.0.js @@ -1,3 +1,4 @@ +// Copied from https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/esm/resolve.js 'use strict'; const { diff --git a/raw/node-repl-await.js b/raw/node-internal-repl-await.js similarity index 100% rename from raw/node-repl-await.js rename to raw/node-internal-repl-await.js diff --git a/src/bin.ts b/src/bin.ts index 95c7f9320..14d9ed4c7 100644 --- a/src/bin.ts +++ b/src/bin.ts @@ -19,7 +19,7 @@ import { } from './repl'; import { VERSION, TSError, register } from './index'; import type { TSInternal } from './ts-compiler-types'; -import { addBuiltinLibsToObject } from '../dist-raw/node-cjs-helpers'; +import { addBuiltinLibsToObject } from '../dist-raw/node-internal-modules-cjs-helpers'; /** * Main `bin` functionality. diff --git a/src/configuration.ts b/src/configuration.ts index a970b49c4..6805f2331 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -190,10 +190,6 @@ export function readConfig( // Remove resolution of "files". const files = rawApiOptions.files ?? tsNodeOptionsFromTsconfig.files ?? DEFAULTS.files; - if (!files) { - config.files = []; - config.include = []; - } // Only if a config file is *not* loaded, load an implicit configuration from @tsconfig/bases const skipDefaultCompilerOptions = configFilePath != null; @@ -228,7 +224,9 @@ export function readConfig( { fileExists, readFile, - readDirectory: ts.sys.readDirectory, + // Only used for globbing "files", "include", "exclude" + // When `files` option disabled, we want to avoid the fs calls + readDirectory: files ? ts.sys.readDirectory : () => [], useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames, }, basePath, @@ -304,3 +302,33 @@ function filterRecognizedTsConfigTsNodeOptions( const catchMissingProps: keyof typeof filteredTsConfigOptions = (null as any) as keyof TsConfigOptions; return { recognized: filteredTsConfigOptions, unrecognized }; } + +/** @internal */ +export const ComputeAsCommonRootOfFiles = Symbol(); + +/** + * Some TS compiler options have defaults which are not provided by TS's config parsing functions. + * This function centralizes the logic for computing those defaults. + * @internal + */ +export function getTsConfigDefaults(config: _ts.ParsedCommandLine, basePath: string, _files: string[] | undefined, _include: string[] | undefined, _exclude: string[] | undefined) { + const {composite = false} = config.options; + let rootDir: string | typeof ComputeAsCommonRootOfFiles = config.options.rootDir!; + if(rootDir == null) { + if(composite) rootDir = basePath; + // Return this symbol to avoid computing from `files`, which would require fs calls + else rootDir = ComputeAsCommonRootOfFiles; + } + const {outDir = rootDir} = config.options; + // Docs are wrong: https://www.typescriptlang.org/tsconfig#include + // Docs say **, but it's actually **/*; compiler throws error for ** + const include = _files ? [] : ['**/*']; + const files = _files ?? []; + // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude + // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of "include" + const exclude = _exclude ?? [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern? + + // TODO compute baseUrl + + return {rootDir, outDir, include, files, exclude, composite}; +} diff --git a/src/index.ts b/src/index.ts index 977922ea5..2e3d87950 100644 --- a/src/index.ts +++ b/src/index.ts @@ -91,7 +91,7 @@ let assertScriptCanLoadAsCJS: ( module: NodeJS.Module, filename: string ) => void = engineSupportsPackageTypeField - ? require('../dist-raw/node-cjs-loader-utils').assertScriptCanLoadAsCJSImpl + ? require('../dist-raw/node-internal-modules-cjs-loader-old').assertScriptCanLoadAsCJSImpl : () => { /* noop */ }; diff --git a/src/node-resolver-functions.ts b/src/node-resolver-functions.ts new file mode 100644 index 000000000..441d4e553 --- /dev/null +++ b/src/node-resolver-functions.ts @@ -0,0 +1,366 @@ +import { cachedLookup, normalizeSlashes } from "./util"; +import type * as _ts from 'typescript'; +import { dirname, resolve } from "path"; +import { getPatternFromSpec } from './ts-internals'; +import type { TSInternal } from "./ts-compiler-types"; +import { getDefaultTsconfigJsonForNodeVersion } from "./tsconfigs"; +import { getTsConfigDefaults, ComputeAsCommonRootOfFiles } from "./configuration"; + +interface SrcOutPair { + preferSrc: boolean; + root: string; + out: string; +} +// interface RootDirsSet { +// rootDirs: string[]; +// } + +function contains(parentDirWithTrailingSlash: string, childDir: string) { + return childDir.startsWith(parentDirWithTrailingSlash); +} + +class SolutionResolver { + +} + +class ProjectResolver { + files: string[]; + includeRe: RegExp; + excludeRe: Regexp; + + constuctor( + ts: TSInternal, + tsconfig: _ts.ParsedCommandLine, + configFilePathOrCwd: string, + basePath: string, + files: string[] | undefined, + include: string[] | undefined, + exclude: string[] | undefined + ) { + // const configBaseDir = normalizeSlashes(dirname(configFilePathOrCwd)); + const {rootDir, include: includeSpecs, files: filesArray, exclude: excludeSpecs} = getTsConfigDefaults(tsconfig, basePath, files, include, exclude); + if(rootDir === ComputeAsCommonRootOfFiles) { + throw new Error('Cannot determine rootDir if composite is not set. Either enable composite or set explicit rootDir'); + } + + this.files = filesArray.map(f => normalizeSlashes(resolve(basePath, f))); + const reString = ts.getRegularExpressionForWildcard(includeSpecs, basePath, 'files'); + this.includeRe = new RegExp(reString ?? '$^'); + const reString2 = ts.getRegularExpressionForWildcard(excludeSpecs as string[], basePath, 'exclude'); + this.excludeRe = new RegExp(reString2 ?? '$^'); + } +} + +function createNodeResolverFunctions(opts: { + allowJs: boolean, + jsx: boolean, + cjsMjs: boolean +}) { + const {allowJs, cjsMjs, jsx} = opts; + + const rootOutPairs: SrcOutPair[] = []; + // const rootDirsSets: RootDirsSet[] = []; + + /** + * Must be passed normalized slashes! + * Assumes root and out are different! + */ + function addRootOutPair(root: string, out: string, preferSrc = true) { + root = ensureTrailingSlash(root); + out = ensureTrailingSlash(out); + rootOutPairs.push({root, out, preferSrc}); + } + + function ensureTrailingSlash(str: string) { + if(str.includes('\\')) throw new Error('String must have normalized slashes'); + if(!str.endsWith('/')) str += '/'; + return str; + } + + // function mapFromOutToRoot(directory: string) { + // directory = ensureTrailingSlash(directory); + // for(const {out, root} of rootOutPairs) { + // if(directory.startsWith(out)) { + // return root + directory.slice(out.length); + // } + // } + // return directory; + // } + function mapFromRootToOut(directory: string) { + directory = ensureTrailingSlash(directory); + for(const {out, root} of rootOutPairs) { + if(directory.startsWith(root)) { + // TODO how to exclude node_modules from this mapping?? + // Check regexp patterns to see if this file is included? + return out + directory.slice(root.length); + } + } + return directory; + } + + // /** Must be passed normalized slashes! */ + // function addRootDirs(rootDirs: string[]) { + // rootDirsSets.push({ + // rootDirs: rootDirs.map(rootDir => rootDir.endsWith('/') ? rootDir : rootDir + '/') + // }); + // } + + const getAlternativeDirectoriesCached = cachedLookup(getAlternativeDirectories); + + /** Get array of alternative directories to check because they're overlaid over each other */ + function* getAlternativeDirectories(directory: string) { + directory = ensureTrailingSlash(directory); + for(const {out, preferSrc, root} of rootOutPairs) { + if(contains(root, directory)) { + if(preferSrc) { + yield directory; // directory is in src; preferred + yield out + directory.slice(root.length) + } else { + yield out + directory.slice(root.length); + yield directory; + } + } else if(contains(out, directory)) { + if(preferSrc) { + yield root + directory.slice(out.length); + yield directory; // directory is in out + } else { + yield directory; + yield root + directory.slice(out.length); + } + } else { + yield directory; + } + } + // for(const rootDirsSet of rootDirsSets) { + // const alternatives2: string[] = []; + // for(const alternative of alternatives!) { + // ForRootDirsInSingleSet: + // for(const rootDir of rootDirsSet.rootDirs) { + // if(contains(rootDir, alternative)) { + // // alternative matches; replace it with each rootDir in the set + // for(const rootDir2 of rootDirsSet.rootDirs) { + // alternatives2.push(rootDir2 + alternative.slice(rootDir.length)); + // } + // break ForRootDirsInSingleSet; + // } + // } + // // alternative does not match; passthrough + // alternatives2.push(alternative); + // } + // alternatives = alternatives2; + // } + } + + // If extension is omitted and we are expected to add one, try these + const extensionlessExtensions = [ + 'js', + 'cjs', + 'mjs', + jsx && 'jsx', + 'ts', + 'cts', + 'mts', + jsx && 'tsx' + ]; + // If extension already specified, and is recognized, attempt these replacements + const jsExtensions = [ + 'js', + jsx && 'jsx', + 'ts', + jsx && 'tsx' + ].filter(v => v) as string[]; + const cjsExtensions = [ + 'cjs', + 'cts', + ]; + const mjsExtensions = [ + 'mjs', + 'mts', + ]; + + /** + * Get alternative filenames to check because they're equivalent. + * + * Alternatives should only be attempted in: + * -- rootDir, if was able to map root<==>out + * -- otherwise attempt in dir, whatever it is. + */ + function* getAlternativeFilenames(filename: string, allowOmitFileExtension: boolean) { + // TODO be sure to avoid .d.ts, .d.mts, and .d.cts + const lastDotIndex = filename.lastIndexOf('.'); + let emittedReplacements = false; + if(lastDotIndex > 0) { + const endsInDts = filename.endsWith('.d.ts') || filename.endsWith('.d.cts') || filename.endsWith('.d.mts'); + if(!endsInDts) { + const name = filename.slice(0, lastDotIndex); + const extension = filename.slice(lastDotIndex + 1); + const replacements = extension === 'js' ? jsExtensions : extension === 'cjs' ? cjsExtensions : extension === 'mjs' ? mjsExtensions : undefined; + if(replacements) { + emittedReplacements = true; + for(const replacement of replacements) { + yield name + '.' + replacement; + } + } + } + } + if(!emittedReplacements) yield filename; + if(allowOmitFileExtension) { + for(const replacement of extensionlessExtensions) { + yield filename + '.' + replacement; + } + } + } + + return { + addRootOutPair, + getAlternativeDirectories, + getAlternativeDirectoriesCached, + getAlternativeFilenames + }; +} + +/* +. +dist + +If rootDir matches any rootDirs entry: +- generate list of alternative rootDir +- map each to outDir + +foo +bar +baz + +For path foo/hello: + +foo/hello +bar/hello +baz/hello +dist/foo/hello +dist/bar/hello +dist/baz/hello + +For path node_modules/lodash +node_modules/lodash +dist/node_modules/lodash + +If directory is outside of common root of all mappings, skip + +If parent mappings were computed, how can they be augmented? +For each directory, a given mapping is either APPLIED, IRRELEVANT, or NOTYET +- src <-> out +- if any rootDirs are child of src or dist +*/ + +/* + +src/foo +dist/foo + +src/foo +src/bar +src/baz +dist/foo +dist/bar +dist/baz + +foo/src/lib +dist + +foo/src/lib +bar/src/lib +baz/src/lib +dist/lib + +outDir mapping: src/foo->dist +rootDirs mappings: ./foo, ./bar, ./baz +src/foo +src/bar +src/baz +dist + +outDir mapping: src->dist +rootDirs mappings: ./foo, ./bar, ./baz +src/foo +src/bar +src/baz +dist/foo +dist/bar +dist/baz + +expand src by rootDirs +then expand each by root->out mappings +*/ + +/* +For now, think about *only* rootDir<->outDir mappings +Sort all rootDir by length descending +Sort all outDir by length descending +Attempt mapping for each. +As soon as mapping succeeds for *any single entry*, stop attempting others. +*/ + +/* +rootDirs +src/foo +src/bar +src/baz + +preprocess to include rootDir<->outDir +src/foo +src/bar +src/baz +dist/foo +dist/bar +dist/baz +*/ + +/* +First must map importer from src to dist if possible. + +Then attempt import relative to the dist location, +checking dist<-src whenever possible. + +*/ + +// const ts: typeof _ts; + +// ts.createLanguageServiceSourceFile +// ts.createSourceFile +// ts.createUnparsedSourceFile +// ts.create + +/* +To use experimentalResolver: +- must set explicit rootDir, imply it with composite, or imply it with references + +When resolving an import + +##Step one: convert importer path to outDir if appropriate + +If importer is within rootDir & matched by include/files/exclude, map it to outDir +- Abandon mapping if `outDir` and `rootDir` identical +- Abandon mapping if import already within outDir +- sort by rootDir specificity so that workspaces are matched prior to ancestors +- mapping logic can be cached per __dirname&tsconfig pair, but must still consider if filename matches regexps + - allows supporting multiple tsconfigs with same rootDir +- allows respecting `path` mappings when we know which tsconfig governs the importer, because we have a single tsconfig to use for mappings + +##Step two: convert (many) target paths to rootDir if appropriate + +While resolving, we check many directories. +If resolution target is within `outDir`, attempt mapping to `rootDir` + - Abandon mapping if `outDir` and `rootDir` identical + - Abandon mapping if target already within `rootDir` + - Abandon mapping if is not matched by include/files/exclude + - HOW TO CHECK THIS BEFORE WE HAVE A FILE EXTENSION? For each include/files/exclude, generate a version that ignores file extensions? Test the directory with it? + - `TsconfigFilesMatcher.directoryChildMightMatch(dirname)` + - `TsconfigFilesMatcher.directoryAncestorMightMatch(dirname)` + + - OPTIMIZATION + - If none of the include / files patterns contain `node_modules`, and if target directory after basedir contains `node_modules`, then we *know* the entire + directory tree is excluded + - This optimization should apply to almost all projects + + - OPTIMIZATION detect when all file extensions are treated identically?? +*/ diff --git a/src/ts-compiler-types.ts b/src/ts-compiler-types.ts index b17111c3a..9a4d20edb 100644 --- a/src/ts-compiler-types.ts +++ b/src/ts-compiler-types.ts @@ -69,6 +69,9 @@ export interface TSInternal { redirectedReference?: _ts.ResolvedProjectReference, lookupConfig?: boolean ): _ts.ResolvedModuleWithFailedLookupLocations; + // TODO do we need these? Which TS version adds them? + getPatternFromSpec(spec: string, basePath: string, usage: "files" | "directories" | "exclude"): string | undefined; + getRegularExpressionForWildcard(specs: readonly string[] | undefined, basePath: string, usage: "files" | "directories" | "exclude"): string | undefined; } /** @internal */ export namespace TSInternal { From 9a8f87e35ff383a2bd4d1a29881759646da103e1 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Mon, 8 Nov 2021 18:17:01 -0500 Subject: [PATCH 02/30] restore .d.ts file --- dist-raw/node-internal-modules-cjs-helpers.d.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 dist-raw/node-internal-modules-cjs-helpers.d.ts diff --git a/dist-raw/node-internal-modules-cjs-helpers.d.ts b/dist-raw/node-internal-modules-cjs-helpers.d.ts new file mode 100644 index 000000000..a57c2f831 --- /dev/null +++ b/dist-raw/node-internal-modules-cjs-helpers.d.ts @@ -0,0 +1 @@ +export function addBuiltinLibsToObject(object: any): void; From 7da5958d41b2c12df2c2ddb721addd5f8e135568 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Wed, 20 Apr 2022 17:14:03 -0400 Subject: [PATCH 03/30] add notes and todos --- NOTES.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TODO.md | 14 +++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 NOTES.md create mode 100644 TODO.md diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 000000000..0f0cbf15d --- /dev/null +++ b/NOTES.md @@ -0,0 +1,61 @@ +*Delete this file before merging this PR* + +## PnP interop + +Asked about it here: +https://discord.com/channels/226791405589233664/654372321225605128/957301175609344070 + +PnP API checks if import specifiers are for dependencies: non-relative, non-absolute + libfoo + @scope/libfoo + +When they are, it does `resolveToUnqualified` to map to an unqualified path. +This path points to the module's location on disk (in a zip, perhaps) but does +not handle file extension resolution or stuff like that. + +To interop with PnP, we need PnP to *only* `resolveToUnqualified`. +We do everything else. + +```typescript +import { Module } from 'module'; +import fs from 'fs'; + +const pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; + +const originalModuleResolveFilename = Module._resolveFilename; +Module._resolveFilename = function ( + request: string, + parent: typeof Module | null | undefined, + isMain: boolean, + options?: { [key: string]: any } +) { + const dependencyNameMatch = request.match(pathRegExp); + if (dependencyNameMatch !== null) { + + const [, dependencyName, subPath] = dependencyNameMatch; + + const unqualified = pnpapi.resolveToUnqualified(....); + + // Do your modified resolution on the unqualified path here + + } else { + + // Do your modified resolution here; no need for PnP + + } + +}; +``` + +PnP can be installed at runtime. + +To conditionally check if PnP is available at the start of *every* resolution: + +```typescript +// Get the pnpapi of either the issuer or the specifier. +// The latter is required when the specifier is an absolute path to a +// zip file and the issuer doesn't belong to a pnpapi +const {findPnPApi} = Module; +const pnpapi = findPnPApi ? (findPnpApi(issuer) ?? (url ? findPnpApi(specifier) : null)) : null; +if (pnpapi) {...} +``` diff --git a/TODO.md b/TODO.md new file mode 100644 index 000000000..69f07097d --- /dev/null +++ b/TODO.md @@ -0,0 +1,14 @@ +*Delete this file before merging this PR* + +## TODOs + +Copy any relevant changes from `add-cjs-loader-resolve` + +I forgot exactly where I was in `add-cjs-loader-resolve` +Re-do the renaming and moving that I did in that branch. +Then diff to see that I did it correctly. +Avoid introducing any accidental behavioral changes. + +Make list of changes from vanilla node in dist-raw/node-internal-modules-cjs-loader-old.js +Apply those changes to dist-raw/node-internal-modules-cjs-loader.js + From a61dba47743b1d179b321b3dd1a745107aa4201b Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Mon, 2 May 2022 16:24:57 -0400 Subject: [PATCH 04/30] strip down node-internal-modules-cjs-loader to match main branch; will build it back up from here --- dist-raw/node-internal-modules-cjs-loader.js | 823 +----------------- ...ts => node-resolver-functions.ts.disabled} | 135 +-- 2 files changed, 107 insertions(+), 851 deletions(-) rename src/{node-resolver-functions.ts => node-resolver-functions.ts.disabled} (74%) diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 9f3e5bd7e..9d532e7fb 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -1,294 +1,27 @@ -// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/loader.js - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; +// Copied from several files in node's source code. +// https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js +// Each function and variable below must have a comment linking to the source in node's github repo. const { - ArrayIsArray, - ArrayPrototypeConcat, - ArrayPrototypeFilter, - ArrayPrototypeIncludes, - ArrayPrototypeIndexOf, - ArrayPrototypeJoin, - ArrayPrototypePush, - ArrayPrototypeSlice, - ArrayPrototypeSplice, - ArrayPrototypeUnshift, - ArrayPrototypeUnshiftApply, - Boolean, - Error, JSONParse, - ObjectCreate, - ObjectDefineProperty, - ObjectFreeze, - ObjectGetOwnPropertyDescriptor, - ObjectGetPrototypeOf, - ObjectKeys, - ObjectPrototype, - ObjectPrototypeHasOwnProperty, - ObjectSetPrototypeOf, - Proxy, - ReflectApply, - ReflectSet, - RegExpPrototypeExec, - RegExpPrototypeTest, SafeMap, - SafeWeakMap, - String, - StringPrototypeCharAt, - StringPrototypeCharCodeAt, StringPrototypeEndsWith, StringPrototypeLastIndexOf, StringPrototypeIndexOf, - StringPrototypeMatch, - StringPrototypeRepeat, StringPrototypeSlice, - StringPrototypeSplit, - StringPrototypeStartsWith, -} = primordials; - -// Map used to store CJS parsing data. -const cjsParseCache = new SafeWeakMap(); - -// Set first due to cycle with ESM loader functions. -module.exports = { - wrapSafe, Module, toRealPath, readPackageScope, cjsParseCache, - get hasLoadedAnyUserCJSModule() { return hasLoadedAnyUserCJSModule; } -}; - -const { NativeModule } = require('internal/bootstrap/loaders'); -const { - maybeCacheSourceMap, -} = require('internal/source_map/source_map_cache'); -const { pathToFileURL, fileURLToPath, isURLInstance } = require('internal/url'); -const { deprecate } = require('internal/util'); -const vm = require('vm'); -const assert = require('internal/assert'); -const fs = require('fs'); -const internalFS = require('internal/fs/utils'); +} = require('./node-primordials'); const path = require('path'); const { sep } = path; -const { internalModuleStat } = internalBinding('fs'); -const packageJsonReader = require('internal/modules/package_json_reader'); -const { safeGetenv } = internalBinding('credentials'); -const { - cjsConditions, - hasEsmSyntax, - loadNativeModule, - makeRequireFunction, - normalizeReferrerURL, - stripBOM, -} = require('internal/modules/cjs/helpers'); -const { getOptionValue } = require('internal/options'); -const preserveSymlinks = getOptionValue('--preserve-symlinks'); -const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); -// Do not eagerly grab .manifest, it may be in TDZ -const policy = getOptionValue('--experimental-policy') ? - require('internal/process/policy') : - null; - -// Whether any user-provided CJS modules had been loaded (executed). -// Used for internal assertions. -let hasLoadedAnyUserCJSModule = false; - -const { - codes: { - ERR_INVALID_ARG_VALUE, - ERR_INVALID_MODULE_SPECIFIER, - ERR_REQUIRE_ESM, - ERR_UNKNOWN_BUILTIN_MODULE, - }, - setArrowMessage, -} = require('internal/errors'); -const { validateString } = require('internal/validators'); -const pendingDeprecation = getOptionValue('--pending-deprecation'); - -const { - CHAR_FORWARD_SLASH, - CHAR_BACKWARD_SLASH, - CHAR_COLON -} = require('internal/constants'); - -const { - isProxy -} = require('internal/util/types'); - -const asyncESM = require('internal/process/esm_loader'); -const { enrichCJSError } = require('internal/modules/esm/translators'); -const { kEvaluated } = internalBinding('module_wrap'); -const { - encodedSepRegEx, - packageExportsResolve, - packageImportsResolve -} = require('internal/modules/esm/resolve'); - -const isWindows = process.platform === 'win32'; - -const relativeResolveCache = ObjectCreate(null); +const packageJsonReader = require('./node-internal-modules-package_json_reader'); +const {normalizeSlashes} = require('../dist/util'); +const {createErrRequireEsm} = require('./node-internal-errors'); -let requireDepth = 0; -let statCache = null; -let isPreloading = false; -function stat(filename) { - filename = path.toNamespacedPath(filename); - if (statCache !== null) { - const result = statCache.get(filename); - if (result !== undefined) return result; - } - const result = internalModuleStat(filename); - if (statCache !== null && result >= 0) { - // Only set cache when `internalModuleStat(filename)` succeeds. - statCache.set(filename, result); - } - return result; -} - -function updateChildren(parent, child, scan) { - const children = parent?.children; - if (children && !(scan && ArrayPrototypeIncludes(children, child))) - ArrayPrototypePush(children, child); -} - -const moduleParentCache = new SafeWeakMap(); -function Module(id = '', parent) { - this.id = id; - this.path = path.dirname(id); - this.exports = {}; - moduleParentCache.set(this, parent); - updateChildren(parent, this, false); - this.filename = null; - this.loaded = false; - this.children = []; -} - -const builtinModules = []; -for (const { 0: id, 1: mod } of NativeModule.map) { - if (mod.canBeRequiredByUsers) { - ArrayPrototypePush(builtinModules, id); - } -} - -ObjectFreeze(builtinModules); -Module.builtinModules = builtinModules; - -Module._cache = ObjectCreate(null); -Module._pathCache = ObjectCreate(null); -Module._extensions = ObjectCreate(null); -let modulePaths = []; -Module.globalPaths = []; - -let patched = false; - -// eslint-disable-next-line func-style -let wrap = function(script) { - return Module.wrapper[0] + script + Module.wrapper[1]; -}; - -const wrapper = [ - '(function (exports, require, module, __filename, __dirname) { ', - '\n});', -]; - -let wrapperProxy = new Proxy(wrapper, { - set(target, property, value, receiver) { - patched = true; - return ReflectSet(target, property, value, receiver); - }, - - defineProperty(target, property, descriptor) { - patched = true; - return ObjectDefineProperty(target, property, descriptor); - } -}); - -ObjectDefineProperty(Module, 'wrap', { - get() { - return wrap; - }, - - set(value) { - patched = true; - wrap = value; - } -}); - -ObjectDefineProperty(Module, 'wrapper', { - get() { - return wrapperProxy; - }, - - set(value) { - patched = true; - wrapperProxy = value; - } -}); - -const isPreloadingDesc = { get() { return isPreloading; } }; -ObjectDefineProperty(Module.prototype, 'isPreloading', isPreloadingDesc); -ObjectDefineProperty(NativeModule.prototype, 'isPreloading', isPreloadingDesc); - -function getModuleParent() { - return moduleParentCache.get(this); -} - -function setModuleParent(value) { - moduleParentCache.set(this, value); -} - -ObjectDefineProperty(Module.prototype, 'parent', { - get: pendingDeprecation ? deprecate( - getModuleParent, - 'module.parent is deprecated due to accuracy issues. Please use ' + - 'require.main to find program entry point instead.', - 'DEP0144' - ) : getModuleParent, - set: pendingDeprecation ? deprecate( - setModuleParent, - 'module.parent is deprecated due to accuracy issues. Please use ' + - 'require.main to find program entry point instead.', - 'DEP0144' - ) : setModuleParent, -}); - -let debug = require('internal/util/debuglog').debuglog('module', (fn) => { - debug = fn; -}); -Module._debug = deprecate(debug, 'Module._debug is deprecated.', 'DEP0077'); - -// Given a module name, and a list of paths to test, returns the first -// matching file in the following precedence. -// -// require("a.") -// -> a. -// -// require("a") -// -> a -// -> a. -// -> a/index. +// Copied from https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js#L249 const packageJsonCache = new SafeMap(); +// Copied from https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L275-L304 function readPackage(requestPath) { const jsonPath = path.resolve(requestPath, 'package.json'); @@ -337,528 +70,28 @@ function readPackageScope(checkPath) { return false; } -function tryPackage(requestPath, exts, isMain, originalPath) { - const pkg = readPackage(requestPath)?.main; - - if (!pkg) { - return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); - } - - const filename = path.resolve(requestPath, pkg); - let actual = tryFile(filename, isMain) || - tryExtensions(filename, exts, isMain) || - tryExtensions(path.resolve(filename, 'index'), exts, isMain); - if (actual === false) { - actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); - if (!actual) { - // eslint-disable-next-line no-restricted-syntax - const err = new Error( - `Cannot find module '${filename}'. ` + - 'Please verify that the package.json has a valid "main" entry' - ); - err.code = 'MODULE_NOT_FOUND'; - err.path = path.resolve(requestPath, 'package.json'); - err.requestPath = originalPath; - // TODO(BridgeAR): Add the requireStack as well. - throw err; - } else { - const jsonPath = path.resolve(requestPath, 'package.json'); - process.emitWarning( - `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + - 'Please either fix that or report it to the module author', - 'DeprecationWarning', - 'DEP0128' - ); - } - } - return actual; -} - -// In order to minimize unnecessary lstat() calls, -// this cache is a list of known-real paths. -// Set to an empty Map to reset. -const realpathCache = new SafeMap(); - -// Check if the file exists and is not a directory -// if using --preserve-symlinks and isMain is false, -// keep symlinks intact, otherwise resolve to the -// absolute realpath. -function tryFile(requestPath, isMain) { - const rc = stat(requestPath); - if (rc !== 0) return; - if (preserveSymlinks && !isMain) { - return path.resolve(requestPath); - } - return toRealPath(requestPath); -} - -function toRealPath(requestPath) { - return fs.realpathSync(requestPath, { - [internalFS.realpathCacheKey]: realpathCache - }); -} - -// Given a path, check if the file exists with any of the set extensions -function tryExtensions(p, exts, isMain) { - for (let i = 0; i < exts.length; i++) { - const filename = tryFile(p + exts[i], isMain); - - if (filename) { - return filename; - } - } - return false; -} - -// Find the longest (possibly multi-dot) extension registered in -// Module._extensions -function findLongestRegisteredExtension(filename) { - const name = path.basename(filename); - let currentExtension; - let index; - let startIndex = 0; - while ((index = StringPrototypeIndexOf(name, '.', startIndex)) !== -1) { - startIndex = index + 1; - if (index === 0) continue; // Skip dotfiles like .gitignore - currentExtension = StringPrototypeSlice(name, index); - if (Module._extensions[currentExtension]) return currentExtension; - } - return '.js'; -} - -function trySelfParentPath(parent) { - if (!parent) return false; - - if (parent.filename) { - return parent.filename; - } else if (parent.id === '' || parent.id === 'internal/preload') { - try { - return process.cwd() + path.sep; - } catch { - return false; - } - } -} - -function trySelf(parentPath, request) { - if (!parentPath) return false; - - const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; - if (!pkg || pkg.exports === undefined) return false; - if (typeof pkg.name !== 'string') return false; - - let expansion; - if (request === pkg.name) { - expansion = '.'; - } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { - expansion = '.' + StringPrototypeSlice(request, pkg.name.length); - } else { - return false; - } - - try { - return finalizeEsmResolution(packageExportsResolve( - pathToFileURL(pkgPath + '/package.json'), expansion, pkg, - pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request, pkgPath + '/package.json'); - throw e; - } -} - -// This only applies to requests of a specific form: -// 1. name/.* -// 2. @scope/name/.* -const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; -function resolveExports(nmPath, request) { - // The implementation's behavior is meant to mirror resolution in ESM. - const { 1: name, 2: expansion = '' } = - StringPrototypeMatch(request, EXPORTS_PATTERN) || []; - if (!name) - return; - const pkgPath = path.resolve(nmPath, name); - const pkg = readPackage(pkgPath); - if (pkg?.exports != null) { - try { - return finalizeEsmResolution(packageExportsResolve( - pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, - cjsConditions), null, pkgPath); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request, pkgPath + '/package.json'); - throw e; - } - } -} - -const trailingSlashRegex = /(?:^|\/)\.?\.$/; -Module._findPath = function(request, paths, isMain) { - const absoluteRequest = path.isAbsolute(request); - if (absoluteRequest) { - paths = ['']; - } else if (!paths || paths.length === 0) { - return false; - } - - const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); - const entry = Module._pathCache[cacheKey]; - if (entry) - return entry; - - let exts; - let trailingSlash = request.length > 0 && - StringPrototypeCharCodeAt(request, request.length - 1) === - CHAR_FORWARD_SLASH; - if (!trailingSlash) { - trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); - } - - // For each path - for (let i = 0; i < paths.length; i++) { - // Don't search further if path doesn't exist - const curPath = paths[i]; - if (curPath && stat(curPath) < 1) continue; - - if (!absoluteRequest) { - const exportsResolved = resolveExports(curPath, request); - if (exportsResolved) - return exportsResolved; - } - - const basePath = path.resolve(curPath, request); - let filename; - - const rc = stat(basePath); - if (!trailingSlash) { - if (rc === 0) { // File. - if (!isMain) { - if (preserveSymlinks) { - filename = path.resolve(basePath); - } else { - filename = toRealPath(basePath); - } - } else if (preserveSymlinksMain) { - // For the main module, we use the preserveSymlinksMain flag instead - // mainly for backward compatibility, as the preserveSymlinks flag - // historically has not applied to the main module. Most likely this - // was intended to keep .bin/ binaries working, as following those - // symlinks is usually required for the imports in the corresponding - // files to resolve; that said, in some use cases following symlinks - // causes bigger problems which is why the preserveSymlinksMain option - // is needed. - filename = path.resolve(basePath); - } else { - filename = toRealPath(basePath); - } - } - - if (!filename) { - // Try it with each of the extensions - if (exts === undefined) - exts = ObjectKeys(Module._extensions); - filename = tryExtensions(basePath, exts, isMain); - } - } - - if (!filename && rc === 1) { // Directory. - // try it with each of the extensions at "index" - if (exts === undefined) - exts = ObjectKeys(Module._extensions); - filename = tryPackage(basePath, exts, isMain, request); - } - - if (filename) { - Module._pathCache[cacheKey] = filename; - return filename; - } - } - - return false; -}; - -// 'node_modules' character codes reversed -const nmChars = [ 115, 101, 108, 117, 100, 111, 109, 95, 101, 100, 111, 110 ]; -const nmLen = nmChars.length; -if (isWindows) { - // 'from' is the __dirname of the module. - Module._nodeModulePaths = function(from) { - // Guarantee that 'from' is absolute. - from = path.resolve(from); - - // note: this approach *only* works when the path is guaranteed - // to be absolute. Doing a fully-edge-case-correct path.split - // that works on both Windows and Posix is non-trivial. - - // return root node_modules when path is 'D:\\'. - // path.resolve will make sure from.length >=3 in Windows. - if (StringPrototypeCharCodeAt(from, from.length - 1) === - CHAR_BACKWARD_SLASH && - StringPrototypeCharCodeAt(from, from.length - 2) === CHAR_COLON) - return [from + 'node_modules']; - - const paths = []; - for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { - const code = StringPrototypeCharCodeAt(from, i); - // The path segment separator check ('\' and '/') was used to get - // node_modules path for every path segment. - // Use colon as an extra condition since we can get node_modules - // path for drive root like 'C:\node_modules' and don't need to - // parse drive name. - if (code === CHAR_BACKWARD_SLASH || - code === CHAR_FORWARD_SLASH || - code === CHAR_COLON) { - if (p !== nmLen) - ArrayPrototypePush( - paths, - StringPrototypeSlice(from, 0, last) + '\\node_modules' - ); - last = i; - p = 0; - } else if (p !== -1) { - if (nmChars[p] === code) { - ++p; - } else { - p = -1; - } - } - } - - return paths; - }; -} else { // posix - // 'from' is the __dirname of the module. - Module._nodeModulePaths = function(from) { - // Guarantee that 'from' is absolute. - from = path.resolve(from); - // Return early not only to avoid unnecessary work, but to *avoid* returning - // an array of two items for a root: [ '//node_modules', '/node_modules' ] - if (from === '/') - return ['/node_modules']; - - // note: this approach *only* works when the path is guaranteed - // to be absolute. Doing a fully-edge-case-correct path.split - // that works on both Windows and Posix is non-trivial. - const paths = []; - for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { - const code = StringPrototypeCharCodeAt(from, i); - if (code === CHAR_FORWARD_SLASH) { - if (p !== nmLen) - ArrayPrototypePush( - paths, - StringPrototypeSlice(from, 0, last) + '/node_modules' - ); - last = i; - p = 0; - } else if (p !== -1) { - if (nmChars[p] === code) { - ++p; - } else { - p = -1; - } - } - } - - // Append /node_modules to handle root paths. - ArrayPrototypePush(paths, '/node_modules'); - - return paths; - }; -} - -Module._resolveLookupPaths = function(request, parent) { - if (NativeModule.canBeRequiredByUsers(request)) { - debug('looking for %j in []', request); - return null; - } - - // Check for node modules paths. - if (StringPrototypeCharAt(request, 0) !== '.' || - (request.length > 1 && - StringPrototypeCharAt(request, 1) !== '.' && - StringPrototypeCharAt(request, 1) !== '/' && - (!isWindows || StringPrototypeCharAt(request, 1) !== '\\'))) { - - let paths = modulePaths; - if (parent?.paths?.length) { - paths = ArrayPrototypeConcat(parent.paths, paths); - } +/** + * copied from Module._extensions['.js'] + * https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L1113-L1120 + * @param {import('../src/index').Service} service + * @param {NodeJS.Module} module + * @param {string} filename + */ +function assertScriptCanLoadAsCJSImpl(service, module, filename) { + const pkg = readPackageScope(filename); - debug('looking for %j in %j', request, paths); - return paths.length > 0 ? paths : null; - } - - // In REPL, parent.filename is null. - if (!parent || !parent.id || !parent.filename) { - // Make require('./path/to/foo') work - normally the path is taken - // from realpath(__filename) but in REPL there is no filename - const mainPaths = ['.']; + // ts-node modification: allow our configuration to override + const tsNodeClassification = service.moduleTypeClassifier.classifyModule(normalizeSlashes(filename)); + if(tsNodeClassification.moduleType === 'cjs') return; - debug('looking for %j in %j', request, mainPaths); - return mainPaths; + // Function require shouldn't be used in ES modules. + if (tsNodeClassification.moduleType === 'esm' || (pkg && pkg.data && pkg.data.type === 'module')) { + const parentPath = module.parent && module.parent.filename; + const packageJsonPath = pkg ? path.resolve(pkg.path, 'package.json') : null; + throw createErrRequireEsm(filename, parentPath, packageJsonPath); } - - debug('RELATIVE: requested: %s from parent.id %s', request, parent.id); - - const parentDir = [path.dirname(parent.filename)]; - debug('looking for %j', parentDir); - return parentDir; -}; - -function emitCircularRequireWarning(prop) { - process.emitWarning( - `Accessing non-existent property '${String(prop)}' of module exports ` + - 'inside circular dependency' - ); } -// A Proxy that can be used as the prototype of a module.exports object and -// warns when non-existent properties are accessed. -const CircularRequirePrototypeWarningProxy = new Proxy({}, { - get(target, prop) { - // Allow __esModule access in any case because it is used in the output - // of transpiled code to determine whether something comes from an - // ES module, and is not used as a regular key of `module.exports`. - if (prop in target || prop === '__esModule') return target[prop]; - emitCircularRequireWarning(prop); - return undefined; - }, - - getOwnPropertyDescriptor(target, prop) { - if (ObjectPrototypeHasOwnProperty(target, prop) || prop === '__esModule') - return ObjectGetOwnPropertyDescriptor(target, prop); - emitCircularRequireWarning(prop); - return undefined; - } -}); - -function getExportsForCircularRequire(module) { - if (module.exports && - !isProxy(module.exports) && - ObjectGetPrototypeOf(module.exports) === ObjectPrototype && - // Exclude transpiled ES6 modules / TypeScript code because those may - // employ unusual patterns for accessing 'module.exports'. That should - // be okay because ES6 modules have a different approach to circular - // dependencies anyway. - !module.exports.__esModule) { - // This is later unset once the module is done loading. - ObjectSetPrototypeOf( - module.exports, CircularRequirePrototypeWarningProxy); - } - - return module.exports; -} - -const _resolveFilename = function(request, parent, isMain, options) { - if (StringPrototypeStartsWith(request, 'node:') || - NativeModule.canBeRequiredByUsers(request)) { - return request; - } - - let paths; - - if (typeof options === 'object' && options !== null) { - if (ArrayIsArray(options.paths)) { - const isRelative = StringPrototypeStartsWith(request, './') || - StringPrototypeStartsWith(request, '../') || - ((isWindows && StringPrototypeStartsWith(request, '.\\')) || - StringPrototypeStartsWith(request, '..\\')); - - if (isRelative) { - paths = options.paths; - } else { - const fakeParent = new Module('', null); - - paths = []; - - for (let i = 0; i < options.paths.length; i++) { - const path = options.paths[i]; - fakeParent.paths = Module._nodeModulePaths(path); - const lookupPaths = Module._resolveLookupPaths(request, fakeParent); - - for (let j = 0; j < lookupPaths.length; j++) { - if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) - ArrayPrototypePush(paths, lookupPaths[j]); - } - } - } - } else if (options.paths === undefined) { - paths = Module._resolveLookupPaths(request, parent); - } else { - throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); - } - } else { - paths = Module._resolveLookupPaths(request, parent); - } - - if (parent?.filename) { - if (request[0] === '#') { - const pkg = readPackageScope(parent.filename) || {}; - if (pkg.data?.imports != null) { - try { - return finalizeEsmResolution( - packageImportsResolve(request, pathToFileURL(parent.filename), - cjsConditions), parent.filename, - pkg.path); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request); - throw e; - } - } - } - } - - // Try module self resolution first - const parentPath = trySelfParentPath(parent); - const selfResolved = trySelf(parentPath, request); - if (selfResolved) { - const cacheKey = request + '\x00' + - (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); - Module._pathCache[cacheKey] = selfResolved; - return selfResolved; - } - - // Look up the filename first, since that's the cache key. - const filename = Module._findPath(request, paths, isMain, false); - if (filename) return filename; - const requireStack = []; - for (let cursor = parent; - cursor; - cursor = moduleParentCache.get(cursor)) { - ArrayPrototypePush(requireStack, cursor.filename || cursor.id); - } - let message = `Cannot find module '${request}'`; - if (requireStack.length > 0) { - message = message + '\nRequire stack:\n- ' + - ArrayPrototypeJoin(requireStack, '\n- '); - } - // eslint-disable-next-line no-restricted-syntax - const err = new Error(message); - err.code = 'MODULE_NOT_FOUND'; - err.requireStack = requireStack; - throw err; +module.exports = { + assertScriptCanLoadAsCJSImpl }; - -function finalizeEsmResolution(resolved, parentPath, pkgPath) { - if (RegExpPrototypeTest(encodedSepRegEx, resolved)) - throw new ERR_INVALID_MODULE_SPECIFIER( - resolved, 'must not include encoded "/" or "\\" characters', parentPath); - const filename = fileURLToPath(resolved); - const actual = tryFile(filename); - if (actual) - return actual; - const err = createEsmNotFoundErr(filename, - path.resolve(pkgPath, 'package.json')); - throw err; -} - -function createEsmNotFoundErr(request, path) { - // eslint-disable-next-line no-restricted-syntax - const err = new Error(`Cannot find module '${request}'`); - err.code = 'MODULE_NOT_FOUND'; - if (path) - err.path = path; - // TODO(BridgeAR): Add the requireStack as well. - return err; -} diff --git a/src/node-resolver-functions.ts b/src/node-resolver-functions.ts.disabled similarity index 74% rename from src/node-resolver-functions.ts rename to src/node-resolver-functions.ts.disabled index 441d4e553..3d56b028e 100644 --- a/src/node-resolver-functions.ts +++ b/src/node-resolver-functions.ts.disabled @@ -1,10 +1,13 @@ -import { cachedLookup, normalizeSlashes } from "./util"; +import { cachedLookup, normalizeSlashes } from './util'; import type * as _ts from 'typescript'; -import { dirname, resolve } from "path"; +import { dirname, resolve } from 'path'; import { getPatternFromSpec } from './ts-internals'; -import type { TSInternal } from "./ts-compiler-types"; -import { getDefaultTsconfigJsonForNodeVersion } from "./tsconfigs"; -import { getTsConfigDefaults, ComputeAsCommonRootOfFiles } from "./configuration"; +import type { TSInternal } from './ts-compiler-types'; +import { getDefaultTsconfigJsonForNodeVersion } from './tsconfigs'; +import { + getTsConfigDefaults, + ComputeAsCommonRootOfFiles, +} from './configuration'; interface SrcOutPair { preferSrc: boolean; @@ -19,9 +22,7 @@ function contains(parentDirWithTrailingSlash: string, childDir: string) { return childDir.startsWith(parentDirWithTrailingSlash); } -class SolutionResolver { - -} +class SolutionResolver {} class ProjectResolver { files: string[]; @@ -38,25 +39,40 @@ class ProjectResolver { exclude: string[] | undefined ) { // const configBaseDir = normalizeSlashes(dirname(configFilePathOrCwd)); - const {rootDir, include: includeSpecs, files: filesArray, exclude: excludeSpecs} = getTsConfigDefaults(tsconfig, basePath, files, include, exclude); - if(rootDir === ComputeAsCommonRootOfFiles) { - throw new Error('Cannot determine rootDir if composite is not set. Either enable composite or set explicit rootDir'); + const { + rootDir, + include: includeSpecs, + files: filesArray, + exclude: excludeSpecs, + } = getTsConfigDefaults(tsconfig, basePath, files, include, exclude); + if (rootDir === ComputeAsCommonRootOfFiles) { + throw new Error( + 'Cannot determine rootDir if composite is not set. Either enable composite or set explicit rootDir' + ); } - this.files = filesArray.map(f => normalizeSlashes(resolve(basePath, f))); - const reString = ts.getRegularExpressionForWildcard(includeSpecs, basePath, 'files'); + this.files = filesArray.map((f) => normalizeSlashes(resolve(basePath, f))); + const reString = ts.getRegularExpressionForWildcard( + includeSpecs, + basePath, + 'files' + ); this.includeRe = new RegExp(reString ?? '$^'); - const reString2 = ts.getRegularExpressionForWildcard(excludeSpecs as string[], basePath, 'exclude'); + const reString2 = ts.getRegularExpressionForWildcard( + excludeSpecs as string[], + basePath, + 'exclude' + ); this.excludeRe = new RegExp(reString2 ?? '$^'); } } function createNodeResolverFunctions(opts: { - allowJs: boolean, - jsx: boolean, - cjsMjs: boolean + allowJs: boolean; + jsx: boolean; + cjsMjs: boolean; }) { - const {allowJs, cjsMjs, jsx} = opts; + const { allowJs, cjsMjs, jsx } = opts; const rootOutPairs: SrcOutPair[] = []; // const rootDirsSets: RootDirsSet[] = []; @@ -68,12 +84,13 @@ function createNodeResolverFunctions(opts: { function addRootOutPair(root: string, out: string, preferSrc = true) { root = ensureTrailingSlash(root); out = ensureTrailingSlash(out); - rootOutPairs.push({root, out, preferSrc}); + rootOutPairs.push({ root, out, preferSrc }); } function ensureTrailingSlash(str: string) { - if(str.includes('\\')) throw new Error('String must have normalized slashes'); - if(!str.endsWith('/')) str += '/'; + if (str.includes('\\')) + throw new Error('String must have normalized slashes'); + if (!str.endsWith('/')) str += '/'; return str; } @@ -88,8 +105,8 @@ function createNodeResolverFunctions(opts: { // } function mapFromRootToOut(directory: string) { directory = ensureTrailingSlash(directory); - for(const {out, root} of rootOutPairs) { - if(directory.startsWith(root)) { + for (const { out, root } of rootOutPairs) { + if (directory.startsWith(root)) { // TODO how to exclude node_modules from this mapping?? // Check regexp patterns to see if this file is included? return out + directory.slice(root.length); @@ -105,22 +122,24 @@ function createNodeResolverFunctions(opts: { // }); // } - const getAlternativeDirectoriesCached = cachedLookup(getAlternativeDirectories); + const getAlternativeDirectoriesCached = cachedLookup( + getAlternativeDirectories + ); /** Get array of alternative directories to check because they're overlaid over each other */ function* getAlternativeDirectories(directory: string) { directory = ensureTrailingSlash(directory); - for(const {out, preferSrc, root} of rootOutPairs) { - if(contains(root, directory)) { - if(preferSrc) { + for (const { out, preferSrc, root } of rootOutPairs) { + if (contains(root, directory)) { + if (preferSrc) { yield directory; // directory is in src; preferred - yield out + directory.slice(root.length) + yield out + directory.slice(root.length); } else { yield out + directory.slice(root.length); yield directory; } - } else if(contains(out, directory)) { - if(preferSrc) { + } else if (contains(out, directory)) { + if (preferSrc) { yield root + directory.slice(out.length); yield directory; // directory is in out } else { @@ -160,23 +179,14 @@ function createNodeResolverFunctions(opts: { 'ts', 'cts', 'mts', - jsx && 'tsx' + jsx && 'tsx', ]; // If extension already specified, and is recognized, attempt these replacements - const jsExtensions = [ - 'js', - jsx && 'jsx', - 'ts', - jsx && 'tsx' - ].filter(v => v) as string[]; - const cjsExtensions = [ - 'cjs', - 'cts', - ]; - const mjsExtensions = [ - 'mjs', - 'mts', - ]; + const jsExtensions = ['js', jsx && 'jsx', 'ts', jsx && 'tsx'].filter( + (v) => v + ) as string[]; + const cjsExtensions = ['cjs', 'cts']; + const mjsExtensions = ['mjs', 'mts']; /** * Get alternative filenames to check because they're equivalent. @@ -185,27 +195,40 @@ function createNodeResolverFunctions(opts: { * -- rootDir, if was able to map root<==>out * -- otherwise attempt in dir, whatever it is. */ - function* getAlternativeFilenames(filename: string, allowOmitFileExtension: boolean) { + function* getAlternativeFilenames( + filename: string, + allowOmitFileExtension: boolean + ) { // TODO be sure to avoid .d.ts, .d.mts, and .d.cts const lastDotIndex = filename.lastIndexOf('.'); let emittedReplacements = false; - if(lastDotIndex > 0) { - const endsInDts = filename.endsWith('.d.ts') || filename.endsWith('.d.cts') || filename.endsWith('.d.mts'); - if(!endsInDts) { + if (lastDotIndex > 0) { + const endsInDts = + filename.endsWith('.d.ts') || + filename.endsWith('.d.cts') || + filename.endsWith('.d.mts'); + if (!endsInDts) { const name = filename.slice(0, lastDotIndex); const extension = filename.slice(lastDotIndex + 1); - const replacements = extension === 'js' ? jsExtensions : extension === 'cjs' ? cjsExtensions : extension === 'mjs' ? mjsExtensions : undefined; - if(replacements) { + const replacements = + extension === 'js' + ? jsExtensions + : extension === 'cjs' + ? cjsExtensions + : extension === 'mjs' + ? mjsExtensions + : undefined; + if (replacements) { emittedReplacements = true; - for(const replacement of replacements) { + for (const replacement of replacements) { yield name + '.' + replacement; } } } } - if(!emittedReplacements) yield filename; - if(allowOmitFileExtension) { - for(const replacement of extensionlessExtensions) { + if (!emittedReplacements) yield filename; + if (allowOmitFileExtension) { + for (const replacement of extensionlessExtensions) { yield filename + '.' + replacement; } } @@ -215,7 +238,7 @@ function createNodeResolverFunctions(opts: { addRootOutPair, getAlternativeDirectories, getAlternativeDirectoriesCached, - getAlternativeFilenames + getAlternativeFilenames, }; } From df272ab9408edc883f9762e45b8128f8e396f8d9 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 7 May 2022 10:24:14 -0400 Subject: [PATCH 05/30] committing all local stuff --- dist-raw/node-internal-constants.js | 4 + dist-raw/node-internal-fs.js | 15 +- dist-raw/node-internal-modules-cjs-loader.js | 456 +++++++++++++++++- dist-raw/node-internal-modules-esm-resolve.js | 3 + ...de-internal-modules-package_json_reader.js | 2 +- dist-raw/node-internalBinding-fs.d.ts | 5 + dist-raw/node-internalBinding-fs.js | 5 + dist-raw/node-primordials.js | 2 + notes1.md | 9 + notes2.md | 32 ++ package.json | 2 +- tests/nmtest/node_modules/foo/index.ts | 0 tests/nmtest/node_modules/foo/package.json | 0 tests/nmtest/out/index.js | 0 tests/nmtest/out/node_modules/foo/index.d.ts | 0 tests/nmtest/out/node_modules/foo/index.js | 0 tests/nmtest/out/packageFoo/index.d.ts | 0 tests/nmtest/out/packageFoo/index.js | 0 tests/nmtest/out/tsconfig.tsbuildinfo | 1 + tests/nmtest/package.json | 1 + tests/nmtest/packageFoo/index.ts | 0 tests/nmtest/packageFoo/out/index.d.ts | 0 tests/nmtest/packageFoo/out/index.js | 0 .../packageFoo/out/tsconfig.tsbuildinfo | 1 + tests/nmtest/packageFoo/package.json | 1 + tests/nmtest/packageFoo/tsconfig.json | 7 + tests/nmtest/tsconfig.json | 13 + tests/resolver/README.md | 46 ++ tests/resolver/generate-tests.ts | 178 +++++++ .../junk/dist/in-both-src-and-dist-cts.cjs | 1 + .../junk/dist/in-both-src-and-dist-ts.js | 1 + .../junk/dist/in-both-src-and-dist-tsx.js | 1 + .../junk/dist/index-dist-local-byext.js | 4 + tests/resolver/junk/dist/index-dist-local.js | 8 + .../junk/dist/index-dist-to-src-byext.js | 5 + tests/resolver/junk/dist/index-dist-to-src.js | 8 + tests/resolver/junk/dist/only-in-dist-cts.cjs | 1 + tests/resolver/junk/dist/only-in-dist-ts.js | 1 + .../junk/src/in-both-src-and-dist-cts.cts | 1 + .../junk/src/in-both-src-and-dist-ts.ts | 1 + .../junk/src/in-both-src-and-dist-tsx.tsx | 1 + .../junk/src/index-src-local-byext.js | 8 + tests/resolver/junk/src/index-src-local.js | 8 + .../junk/src/index-src-to-dist-byext.js | 8 + tests/resolver/junk/src/index-src-to-dist.js | 8 + tests/resolver/junk/src/only-in-src-cts.cts | 1 + tests/resolver/junk/src/only-in-src-ts.ts | 1 + tests/resolver/junk/src/only-in-src-tsx.tsx | 1 + tests/resolver/junk/tsconfig.json | 9 + tests/resolver/package.json | 1 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../project-preferOut-typeModule/package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 21 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 21 + .../out/index-out-to-src-withext.cjs | 21 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 21 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 1 + .../src/index-src-to-out-withext.cjs | 21 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 21 + .../src/index-src-to-src-withext.cjs | 21 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 21 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-out.mjs | 22 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/index-out-to-src.mjs | 22 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-out.mjs | 22 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/index-src-to-src.mjs | 22 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + .../out/index-out-to-out-withext.cjs | 11 + .../out/index-out-to-out-withext.mjs | 22 + .../out/index-out-to-out.cjs | 11 + .../out/index-out-to-src-withext.cjs | 11 + .../out/index-out-to-src-withext.mjs | 22 + .../out/index-out-to-src.cjs | 11 + .../out/lib-inboth-cjs.cjs | 1 + .../out/lib-inboth-cts.cjs | 1 + .../out/lib-inboth-js.js | 1 + .../out/lib-inboth-jsx.js | 1 + .../out/lib-inboth-mjs.mjs | 1 + .../out/lib-inboth-mts.mjs | 1 + .../out/lib-inboth-ts.js | 1 + .../out/lib-inboth-tsx.js | 1 + .../out/lib-onlyout-cjs.cjs | 1 + .../out/lib-onlyout-js.js | 1 + .../out/lib-onlyout-mjs.mjs | 1 + .../project-preferSrc-typeModule/package.json | 3 + .../src/index-src-to-out-withext.cjs | 11 + .../src/index-src-to-out-withext.mjs | 22 + .../src/index-src-to-out.cjs | 11 + .../src/index-src-to-src-withext.cjs | 11 + .../src/index-src-to-src-withext.mjs | 22 + .../src/index-src-to-src.cjs | 11 + .../src/lib-inboth-cjs.cjs | 1 + .../src/lib-inboth-cts.cts | 1 + .../src/lib-inboth-js.js | 1 + .../src/lib-inboth-jsx.jsx | 1 + .../src/lib-inboth-mjs.mjs | 1 + .../src/lib-inboth-mts.mts | 1 + .../src/lib-inboth-ts.ts | 1 + .../src/lib-inboth-tsx.tsx | 1 + .../src/lib-onlysrc-cjs.cjs | 1 + .../src/lib-onlysrc-cts.cts | 1 + .../src/lib-onlysrc-js.js | 1 + .../src/lib-onlysrc-jsx.jsx | 1 + .../src/lib-onlysrc-mjs.mjs | 1 + .../src/lib-onlysrc-mts.mts | 1 + .../src/lib-onlysrc-ts.ts | 1 + .../src/lib-onlysrc-tsx.tsx | 1 + .../tsconfig.json | 11 + tests/resolver/test.sh | 4 + 739 files changed, 5661 insertions(+), 4 deletions(-) create mode 100644 dist-raw/node-internal-constants.js create mode 100644 dist-raw/node-internalBinding-fs.d.ts create mode 100644 dist-raw/node-internalBinding-fs.js create mode 100644 notes1.md create mode 100644 notes2.md create mode 100644 tests/nmtest/node_modules/foo/index.ts create mode 100644 tests/nmtest/node_modules/foo/package.json create mode 100644 tests/nmtest/out/index.js create mode 100644 tests/nmtest/out/node_modules/foo/index.d.ts create mode 100644 tests/nmtest/out/node_modules/foo/index.js create mode 100644 tests/nmtest/out/packageFoo/index.d.ts create mode 100644 tests/nmtest/out/packageFoo/index.js create mode 100644 tests/nmtest/out/tsconfig.tsbuildinfo create mode 100644 tests/nmtest/package.json create mode 100644 tests/nmtest/packageFoo/index.ts create mode 100644 tests/nmtest/packageFoo/out/index.d.ts create mode 100644 tests/nmtest/packageFoo/out/index.js create mode 100644 tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo create mode 100644 tests/nmtest/packageFoo/package.json create mode 100644 tests/nmtest/packageFoo/tsconfig.json create mode 100644 tests/nmtest/tsconfig.json create mode 100644 tests/resolver/README.md create mode 100755 tests/resolver/generate-tests.ts create mode 100644 tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs create mode 100644 tests/resolver/junk/dist/in-both-src-and-dist-ts.js create mode 100644 tests/resolver/junk/dist/in-both-src-and-dist-tsx.js create mode 100644 tests/resolver/junk/dist/index-dist-local-byext.js create mode 100644 tests/resolver/junk/dist/index-dist-local.js create mode 100644 tests/resolver/junk/dist/index-dist-to-src-byext.js create mode 100644 tests/resolver/junk/dist/index-dist-to-src.js create mode 100644 tests/resolver/junk/dist/only-in-dist-cts.cjs create mode 100644 tests/resolver/junk/dist/only-in-dist-ts.js create mode 100644 tests/resolver/junk/src/in-both-src-and-dist-cts.cts create mode 100644 tests/resolver/junk/src/in-both-src-and-dist-ts.ts create mode 100644 tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx create mode 100644 tests/resolver/junk/src/index-src-local-byext.js create mode 100644 tests/resolver/junk/src/index-src-local.js create mode 100644 tests/resolver/junk/src/index-src-to-dist-byext.js create mode 100644 tests/resolver/junk/src/index-src-to-dist.js create mode 100644 tests/resolver/junk/src/only-in-src-cts.cts create mode 100644 tests/resolver/junk/src/only-in-src-ts.ts create mode 100644 tests/resolver/junk/src/only-in-src-tsx.tsx create mode 100644 tests/resolver/junk/tsconfig.json create mode 100644 tests/resolver/package.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/package.json create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/package.json create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/package.json create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/package.json create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeCommonjs/tsconfig.json create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/package.json create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json create mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/package.json create mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferOut-typeModule/tsconfig.json create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/package.json create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/package.json create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json create mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/package.json create mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts create mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx create mode 100644 tests/resolver/project-preferSrc-typeModule/tsconfig.json create mode 100644 tests/resolver/test.sh diff --git a/dist-raw/node-internal-constants.js b/dist-raw/node-internal-constants.js new file mode 100644 index 000000000..b4aa7aadb --- /dev/null +++ b/dist-raw/node-internal-constants.js @@ -0,0 +1,4 @@ +// Copied from https://github.com/nodejs/node/blob/master/lib/internal/constants.js +module.exports = { + CHAR_FORWARD_SLASH: 47, /* / */ +}; diff --git a/dist-raw/node-internal-fs.js b/dist-raw/node-internal-fs.js index d9a2528dd..7bf59402b 100644 --- a/dist-raw/node-internal-fs.js +++ b/dist-raw/node-internal-fs.js @@ -17,6 +17,19 @@ function internalModuleReadJSON(path) { return [string, containsKeys] } +// In node's core, this is implemented in C +// https://github.com/nodejs/node/blob/63e7dc1e5c71b70c80ed9eda230991edb00811e2/src/node_file.cc#L987-L1005 +function internalModuleStat(path) { + try { + const stat = fs.statSync(path); + if(stat.isFile()) return 0; + if(stat.isDirectory()) return 1; + } catch(e) { + return -e.errno || -1; + } +} + module.exports = { - internalModuleReadJSON + internalModuleReadJSON, + internalModuleStat }; diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 9d532e7fb..4a1f41386 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -1,3 +1,4 @@ +//@ts-check // Copied from several files in node's source code. // https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js // Each function and variable below must have a comment linking to the source in node's github repo. @@ -9,12 +10,63 @@ const { StringPrototypeLastIndexOf, StringPrototypeIndexOf, StringPrototypeSlice, + ArrayPrototypeJoin, + StringPrototypeCharCodeAt, + RegExpPrototypeTest, + ObjectKeys, + StringPrototypeMatch, } = require('./node-primordials'); +const { pathToFileURL, fileURLToPath } = require('url'); +const fs = require('fs'); const path = require('path'); const { sep } = path; +const { internalModuleStat } = require('./node-internal-fs'); const packageJsonReader = require('./node-internal-modules-package_json_reader'); +const { + cjsConditions, +} = require('./node-internal-modules-cjs-helpers'); +const { getOptionValue } = require('./node-options'); +const preserveSymlinks = getOptionValue('--preserve-symlinks'); +const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); const {normalizeSlashes} = require('../dist/util'); const {createErrRequireEsm} = require('./node-internal-errors'); +const { + codes: { + // ERR_INVALID_ARG_VALUE, + ERR_INVALID_MODULE_SPECIFIER, + // ERR_REQUIRE_ESM, + // ERR_UNKNOWN_BUILTIN_MODULE, + }, + // setArrowMessage, +} = require('./node-internal-errors'); + +const { + CHAR_FORWARD_SLASH, +} = require('./node-internal-constants'); + + +function createCjsLoader(nodeInternalModulesEsmResolver) { +const { + encodedSepRegEx, + packageExportsResolve, + // packageImportsResolve +} = nodeInternalModulesEsmResolver; + +let statCache = null; + +function stat(filename) { + filename = path.toNamespacedPath(filename); + if (statCache !== null) { + const result = statCache.get(filename); + if (result !== undefined) return result; + } + const result = internalModuleStat(filename); + if (statCache !== null && result >= 0) { + // Only set cache when `internalModuleStat(filename)` succeeds. + statCache.set(filename, result); + } + return result; +} @@ -70,6 +122,401 @@ function readPackageScope(checkPath) { return false; } +function tryPackage(requestPath, exts, isMain, originalPath) { + const pkg = readPackage(requestPath)?.main; + + if (!pkg) { + return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + } + + const filename = path.resolve(requestPath, pkg); + let actual = tryFile(filename, isMain) || + tryExtensions(filename, exts, isMain) || + tryExtensions(path.resolve(filename, 'index'), exts, isMain); + if (actual === false) { + actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); + if (!actual) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error( + `Cannot find module '${filename}'. ` + + 'Please verify that the package.json has a valid "main" entry' + ); + err.code = 'MODULE_NOT_FOUND'; + err.path = path.resolve(requestPath, 'package.json'); + err.requestPath = originalPath; + // TODO(BridgeAR): Add the requireStack as well. + throw err; + } else { + const jsonPath = path.resolve(requestPath, 'package.json'); + process.emitWarning( + `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + + 'Please either fix that or report it to the module author', + 'DeprecationWarning', + 'DEP0128' + ); + } + } + return actual; +} + +// In order to minimize unnecessary lstat() calls, +// this cache is a list of known-real paths. +// Set to an empty Map to reset. +const realpathCache = new SafeMap(); + +// Check if the file exists and is not a directory +// if using --preserve-symlinks and isMain is false, +// keep symlinks intact, otherwise resolve to the +// absolute realpath. +function tryFile(requestPath, isMain) { + const rc = stat(requestPath); + if (rc !== 0) return; + if (preserveSymlinks && !isMain) { + return path.resolve(requestPath); + } + return toRealPath(requestPath); +} + +function toRealPath(requestPath) { + return fs.realpathSync(requestPath, { + // [internalFS.realpathCacheKey]: realpathCache + }); +} + +// Given a path, check if the file exists with any of the set extensions +function tryExtensions(p, exts, isMain) { + for (let i = 0; i < exts.length; i++) { + const filename = tryFile(p + exts[i], isMain); + + if (filename) { + return filename; + } + } + return false; +} + +// This only applies to requests of a specific form: +// 1. name/.* +// 2. @scope/name/.* +const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; +function resolveExports(nmPath, request) { + // The implementation's behavior is meant to mirror resolution in ESM. + const { 1: name, 2: expansion = '' } = + StringPrototypeMatch(request, EXPORTS_PATTERN) || []; + if (!name) + return; + const pkgPath = path.resolve(nmPath, name); + const pkg = readPackage(pkgPath); + if (pkg?.exports != null) { + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, + cjsConditions), null, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } + } +} + + + + +// function trySelfParentPath(parent) { +// if (!parent) return false; + +// if (parent.filename) { +// return parent.filename; +// } else if (parent.id === '' || parent.id === 'internal/preload') { +// try { +// return process.cwd() + path.sep; +// } catch { +// return false; +// } +// } +// } + +// function trySelf(parentPath, request) { +// if (!parentPath) return false; + +// const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; +// if (!pkg || pkg.exports === undefined) return false; +// if (typeof pkg.name !== 'string') return false; + +// let expansion; +// if (request === pkg.name) { +// expansion = '.'; +// } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { +// expansion = '.' + StringPrototypeSlice(request, pkg.name.length); +// } else { +// return false; +// } + +// try { +// return finalizeEsmResolution(packageExportsResolve( +// pathToFileURL(pkgPath + '/package.json'), expansion, pkg, +// pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); +// } catch (e) { +// if (e.code === 'ERR_MODULE_NOT_FOUND') +// throw createEsmNotFoundErr(request, pkgPath + '/package.json'); +// throw e; +// } +// } + +// // This only applies to requests of a specific form: +// // 1. name/.* +// // 2. @scope/name/.* +// const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; +// function resolveExports(nmPath, request) { +// // The implementation's behavior is meant to mirror resolution in ESM. +// const { 1: name, 2: expansion = '' } = +// StringPrototypeMatch(request, EXPORTS_PATTERN) || []; +// if (!name) +// return; +// const pkgPath = path.resolve(nmPath, name); +// const pkg = readPackage(pkgPath); +// if (pkg?.exports != null) { +// try { +// return finalizeEsmResolution(packageExportsResolve( +// pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, +// cjsConditions), null, pkgPath); +// } catch (e) { +// if (e.code === 'ERR_MODULE_NOT_FOUND') +// throw createEsmNotFoundErr(request, pkgPath + '/package.json'); +// throw e; +// } +// } +// } + +// Backwards compat for old node versions +const hasModulePathCache = !!require('module')._pathCache; +const Module_pathCache = Object.create(null); +const Module_pathCache_get = hasModulePathCache ? (cacheKey) => Module._pathCache[cacheKey] : (cacheKey) => Module_pathCache[cacheKey]; +const Module_pathCache_set = hasModulePathCache ? (cacheKey, value) => (Module._pathCache[cacheKey] = value) : (cacheKey) => (Module_pathCache[cacheKey] = value); + +const trailingSlashRegex = /(?:^|\/)\.?\.$/; +const Module_findPath = function _findPath(request, paths, isMain) { + const absoluteRequest = path.isAbsolute(request); + if (absoluteRequest) { + paths = ['']; + } else if (!paths || paths.length === 0) { + return false; + } + + const cacheKey = request + '\x00' + ArrayPrototypeJoin(paths, '\x00'); + const entry = Module_pathCache_get(cacheKey); + if (entry) + return entry; + + let exts; + let trailingSlash = request.length > 0 && + StringPrototypeCharCodeAt(request, request.length - 1) === + CHAR_FORWARD_SLASH; + if (!trailingSlash) { + trailingSlash = RegExpPrototypeTest(trailingSlashRegex, request); + } + + // For each path + for (let i = 0; i < paths.length; i++) { + // Don't search further if path doesn't exist + const curPath = paths[i]; + if (curPath && stat(curPath) < 1) continue; + + if (!absoluteRequest) { + const exportsResolved = resolveExports(curPath, request); + if (exportsResolved) + return exportsResolved; + } + + const basePath = path.resolve(curPath, request); + let filename; + + const rc = stat(basePath); + if (!trailingSlash) { + if (rc === 0) { // File. + if (!isMain) { + if (preserveSymlinks) { + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } else if (preserveSymlinksMain) { + // For the main module, we use the preserveSymlinksMain flag instead + // mainly for backward compatibility, as the preserveSymlinks flag + // historically has not applied to the main module. Most likely this + // was intended to keep .bin/ binaries working, as following those + // symlinks is usually required for the imports in the corresponding + // files to resolve; that said, in some use cases following symlinks + // causes bigger problems which is why the preserveSymlinksMain option + // is needed. + filename = path.resolve(basePath); + } else { + filename = toRealPath(basePath); + } + } + + if (!filename) { + // Try it with each of the extensions + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryExtensions(basePath, exts, isMain); + } + } + + if (!filename && rc === 1) { // Directory. + // try it with each of the extensions at "index" + if (exts === undefined) + exts = ObjectKeys(Module._extensions); + filename = tryPackage(basePath, exts, isMain, request); + } + + if (filename) { + Module_pathCache_set(cacheKey, filename); + return filename; + } + } + + return false; +}; + +function finalizeEsmResolution(resolved, parentPath, pkgPath) { + if (RegExpPrototypeTest(encodedSepRegEx, resolved)) + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved, 'must not include encoded "/" or "\\" characters', parentPath); + const filename = fileURLToPath(resolved); + const actual = tryFile(filename); + if (actual) + return actual; + const err = createEsmNotFoundErr(filename, + path.resolve(pkgPath, 'package.json')); + throw err; +} + +function createEsmNotFoundErr(request, path) { + // eslint-disable-next-line no-restricted-syntax + const err = new Error(`Cannot find module '${request}'`); + err.code = 'MODULE_NOT_FOUND'; + if (path) + err.path = path; + // TODO(BridgeAR): Add the requireStack as well. + return err; +} + +// Module._resolveFilename = function(request, parent, isMain, options) { +// if (StringPrototypeStartsWith(request, 'node:') || +// NativeModule.canBeRequiredByUsers(request)) { +// return request; +// } + +// let paths; + +// if (typeof options === 'object' && options !== null) { +// if (ArrayIsArray(options.paths)) { +// const isRelative = StringPrototypeStartsWith(request, './') || +// StringPrototypeStartsWith(request, '../') || +// ((isWindows && StringPrototypeStartsWith(request, '.\\')) || +// StringPrototypeStartsWith(request, '..\\')); + +// if (isRelative) { +// paths = options.paths; +// } else { +// const fakeParent = new Module('', null); + +// paths = []; + +// for (let i = 0; i < options.paths.length; i++) { +// const path = options.paths[i]; +// fakeParent.paths = Module._nodeModulePaths(path); +// const lookupPaths = Module._resolveLookupPaths(request, fakeParent); + +// for (let j = 0; j < lookupPaths.length; j++) { +// if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) +// ArrayPrototypePush(paths, lookupPaths[j]); +// } +// } +// } +// } else if (options.paths === undefined) { +// paths = Module._resolveLookupPaths(request, parent); +// } else { +// throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); +// } +// } else { +// paths = Module._resolveLookupPaths(request, parent); +// } + +// if (parent?.filename) { +// if (request[0] === '#') { +// const pkg = readPackageScope(parent.filename) || {}; +// if (pkg.data?.imports != null) { +// try { +// return finalizeEsmResolution( +// packageImportsResolve(request, pathToFileURL(parent.filename), +// cjsConditions), parent.filename, +// pkg.path); +// } catch (e) { +// if (e.code === 'ERR_MODULE_NOT_FOUND') +// throw createEsmNotFoundErr(request); +// throw e; +// } +// } +// } +// } + +// // Try module self resolution first +// const parentPath = trySelfParentPath(parent); +// const selfResolved = trySelf(parentPath, request); +// if (selfResolved) { +// const cacheKey = request + '\x00' + +// (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); +// Module._pathCache[cacheKey] = selfResolved; +// return selfResolved; +// } + +// // Look up the filename first, since that's the cache key. +// const filename = Module._findPath(request, paths, isMain, false); +// if (filename) return filename; +// const requireStack = []; +// for (let cursor = parent; +// cursor; +// cursor = moduleParentCache.get(cursor)) { +// ArrayPrototypePush(requireStack, cursor.filename || cursor.id); +// } +// let message = `Cannot find module '${request}'`; +// if (requireStack.length > 0) { +// message = message + '\nRequire stack:\n- ' + +// ArrayPrototypeJoin(requireStack, '\n- '); +// } +// // eslint-disable-next-line no-restricted-syntax +// const err = new Error(message); +// err.code = 'MODULE_NOT_FOUND'; +// err.requireStack = requireStack; +// throw err; +// }; + +// function finalizeEsmResolution(resolved, parentPath, pkgPath) { +// if (RegExpPrototypeTest(encodedSepRegEx, resolved)) +// throw new ERR_INVALID_MODULE_SPECIFIER( +// resolved, 'must not include encoded "/" or "\\" characters', parentPath); +// const filename = fileURLToPath(resolved); +// const actual = tryFile(filename); +// if (actual) +// return actual; +// const err = createEsmNotFoundErr(filename, +// path.resolve(pkgPath, 'package.json')); +// throw err; +// } + +// function createEsmNotFoundErr(request, path) { +// // eslint-disable-next-line no-restricted-syntax +// const err = new Error(`Cannot find module '${request}'`); +// err.code = 'MODULE_NOT_FOUND'; +// if (path) +// err.path = path; +// // TODO(BridgeAR): Add the requireStack as well. +// return err; +// } + /** * copied from Module._extensions['.js'] * https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L1113-L1120 @@ -92,6 +539,13 @@ function assertScriptCanLoadAsCJSImpl(service, module, filename) { } } +return { + assertScriptCanLoadAsCJSImpl, + Module_findPath +} + +} + module.exports = { - assertScriptCanLoadAsCJSImpl + createCjsLoader }; diff --git a/dist-raw/node-internal-modules-esm-resolve.js b/dist-raw/node-internal-modules-esm-resolve.js index c5d5b38b9..652905d6f 100644 --- a/dist-raw/node-internal-modules-esm-resolve.js +++ b/dist-raw/node-internal-modules-esm-resolve.js @@ -296,6 +296,7 @@ function legacyMainResolve(packageJSONUrl, packageConfig, base) { fileURLToPath(new URL('.', packageJSONUrl)), fileURLToPath(base)); } +/** tries exact name, then attempts replacement extensions, then attempts appending extensions */ function resolveExtensionsWithTryExactName(search) { if (fileExists(search)) return search; const resolvedReplacementExtension = resolveReplacementExtensions(search); @@ -311,6 +312,7 @@ const extensions = Array.from(new Set([ ...tsExtensions ])); +// This appends missing extensions function resolveExtensions(search) { for (let i = 0; i < extensions.length; i++) { const extension = extensions[i]; @@ -326,6 +328,7 @@ function resolveExtensions(search) { */ const replacementExtensions = extensions.filter(ext => ['.js', '.jsx', '.ts', '.tsx'].includes(ext)); +/** This replaces JS with TS extensions */ function resolveReplacementExtensions(search) { if (search.pathname.match(/\.js$/)) { const pathnameWithoutExtension = search.pathname.slice(0, search.pathname.length - 3); diff --git a/dist-raw/node-internal-modules-package_json_reader.js b/dist-raw/node-internal-modules-package_json_reader.js index e9f82c6f4..f35c619cd 100644 --- a/dist-raw/node-internal-modules-package_json_reader.js +++ b/dist-raw/node-internal-modules-package_json_reader.js @@ -13,7 +13,7 @@ let manifest; /** * @param {string} jsonPath - * @return {[string, boolean]} + * @return {{string: string, containsKeys: boolean}} */ function read(jsonPath) { if (cache.has(jsonPath)) { diff --git a/dist-raw/node-internalBinding-fs.d.ts b/dist-raw/node-internalBinding-fs.d.ts new file mode 100644 index 000000000..e1b17da23 --- /dev/null +++ b/dist-raw/node-internalBinding-fs.d.ts @@ -0,0 +1,5 @@ +// Copied from https://github.com/nodejs/node/blob/b66a75a3a4361614dde9bc1a52d7e9021b4efc26/typings/internalBinding/fs.d.ts +declare namespace InternalFSBinding { + function internalModuleStat(path: string): number; +} +export const internalModuleStat: typeof InternalFSBinding.internalModuleStat; diff --git a/dist-raw/node-internalBinding-fs.js b/dist-raw/node-internalBinding-fs.js new file mode 100644 index 000000000..9535a210b --- /dev/null +++ b/dist-raw/node-internalBinding-fs.js @@ -0,0 +1,5 @@ +// TODO unify this with node-internal-fs? + +exports.internalModuleStat = function(path) { + +} diff --git a/dist-raw/node-primordials.js b/dist-raw/node-primordials.js index 21d8cfd19..62d3f22d0 100644 --- a/dist-raw/node-primordials.js +++ b/dist-raw/node-primordials.js @@ -30,5 +30,7 @@ module.exports = { StringPrototypeSplit: (str, ...rest) => String.prototype.split.apply(str, rest), StringPrototypeStartsWith: (str, ...rest) => String.prototype.startsWith.apply(str, rest), StringPrototypeSubstr: (str, ...rest) => String.prototype.substr.apply(str, rest), + StringPrototypeCharCodeAt: (str, ...rest) => String.prototype.charCodeAt.apply(str, rest), + StringPrototypeMatch: (str, ...rest) => String.prototype.match.apply(str, rest), SyntaxError: SyntaxError }; diff --git a/notes1.md b/notes1.md new file mode 100644 index 000000000..ee561f48d --- /dev/null +++ b/notes1.md @@ -0,0 +1,9 @@ +const patterns = getRegularExpressionsForWildcards(specs, basePath, usage); +const pattern = patterns.map(pattern => `(${pattern})`).join("|"); +// If excluding, match "foo/bar/baz...", but if including, only allow "foo". +const terminator = usage === "exclude" ? "($|/)" : "$"; +return `^(${pattern})${terminator}`; + + +const pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]); +return pattern && `^(${pattern})${usage === "exclude" ? "($|/)" : "$"}`; diff --git a/notes2.md b/notes2.md new file mode 100644 index 000000000..93e6bac65 --- /dev/null +++ b/notes2.md @@ -0,0 +1,32 @@ +When /dist and /src are understood to be overlaid because of src -> dist compiling +/dist/ +/src/ + +Loop over require.extensions +/src/foo.js +/src/foo.mjs +/src/foo.cjs +/src/foo.ts +/src/foo.mts +/src/foo.cts +/src/foo/index.js +/src/foo/index.mjs +/src/foo/index.ts +// Where do we check package.json main?? + + +/dist/foo.js +/dist/foo.ts + + +_resolveLookupPaths +_findPath +_resolveFilename + +_findPath calls resolveExports calls packageExportsResolve, which is in the ESM loader + +Is anything within packageExportsResolve hooked/modified by us? File extension swapping? + + +When resolver calls statSync('./dist/foo.js') and we intercept and discover './src/foo.ts' +How to redirect? We need to rewrite whatever local variable is storing `./dist/foo.js` diff --git a/package.json b/package.json index 0ed599333..948e93f25 100644 --- a/package.json +++ b/package.json @@ -175,7 +175,7 @@ "singleQuote": true }, "volta": { - "node": "17.5.0", + "node": "17.9.0", "npm": "6.14.15" } } diff --git a/tests/nmtest/node_modules/foo/index.ts b/tests/nmtest/node_modules/foo/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/node_modules/foo/package.json b/tests/nmtest/node_modules/foo/package.json new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/out/index.js b/tests/nmtest/out/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/out/node_modules/foo/index.d.ts b/tests/nmtest/out/node_modules/foo/index.d.ts new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/out/node_modules/foo/index.js b/tests/nmtest/out/node_modules/foo/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/out/packageFoo/index.d.ts b/tests/nmtest/out/packageFoo/index.d.ts new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/out/packageFoo/index.js b/tests/nmtest/out/packageFoo/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/out/tsconfig.tsbuildinfo b/tests/nmtest/out/tsconfig.tsbuildinfo new file mode 100644 index 000000000..42696e6fc --- /dev/null +++ b/tests/nmtest/out/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../packageFoo/index.ts","../node_modules/foo/index.ts","../../../node_modules/@types/argparse/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/color-name/index.d.ts","../../../node_modules/@types/diff/index.d.ts","../../../node_modules/@types/emscripten/index.d.ts","../../../node_modules/@types/events/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/base.d.ts","../../../node_modules/@types/node/ts3.2/fs.d.ts","../../../node_modules/@types/node/ts3.2/util.d.ts","../../../node_modules/@types/node/ts3.2/globals.d.ts","../../../node_modules/@types/node/ts3.2/base.d.ts","../../../node_modules/@types/node/ts3.5/wasi.d.ts","../../../node_modules/@types/node/ts3.5/base.d.ts","../../../node_modules/@types/node/ts3.7/assert.d.ts","../../../node_modules/@types/node/ts3.7/base.d.ts","../../../node_modules/@types/node/ts3.7/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/glob/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/lodash/ts3.1/common/common.d.ts","../../../node_modules/@types/lodash/ts3.1/common/array.d.ts","../../../node_modules/@types/lodash/ts3.1/common/collection.d.ts","../../../node_modules/@types/lodash/ts3.1/common/date.d.ts","../../../node_modules/@types/lodash/ts3.1/common/function.d.ts","../../../node_modules/@types/lodash/ts3.1/common/lang.d.ts","../../../node_modules/@types/lodash/ts3.1/common/math.d.ts","../../../node_modules/@types/lodash/ts3.1/common/number.d.ts","../../../node_modules/@types/lodash/ts3.1/common/object.d.ts","../../../node_modules/@types/lodash/ts3.1/common/seq.d.ts","../../../node_modules/@types/lodash/ts3.1/common/string.d.ts","../../../node_modules/@types/lodash/ts3.1/common/util.d.ts","../../../node_modules/@types/lodash/ts3.1/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/retry/index.d.ts","../../../node_modules/@types/proper-lockfile/index.d.ts","../../../node_modules/@types/proxyquire/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/rimraf/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646",{"version":"514f46744035160ab6d90ee6528f2a27a0b787427a0a7d7892a5c960066df47e","affectsGlobalScope":true},"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","162cb6760a1fb4c786a745093431e3279ad005db5c19c2cc95f1906becb6b021",{"version":"4a72ef2edbfb19987b3bc76cc56953cb19217c01c955fe6f37707b547091c024","affectsGlobalScope":true},"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935",{"version":"9d0b32c595a2e0d320a56b3d0e8f0a317e4149239ec913aa8f11eeb73edc92be","affectsGlobalScope":true},"96e547b51f95ee76bdb25731c92420fa6f93b59c3f38f23d505be36e2de394ee","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","3ca89ecb953fe3b63dae41e5bb986506e812754dde0369c5fe61de26eff47dbe","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d56c93b6bf66e602869e926ddc8b1b4630d1ff397909291767d18d4ffc22d33f","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","5ffa4219ee64e130980a4231392cbc628544df137ccf650ae8d76e0a1744fd2b","e1a12c7e7951b9762cfbcc43c72eb5611120967706a7c3142ad303c6b7ee767f","b5fd0a137bd6d0afe291d465e99c7469b082b66b3ee89273b3b22801b6c2948e","873da589b78a1f1fa7d623483bd2c2730a02e0852259fb8fdcfe5221ac51d18a","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c","a376e245f494b58365a4391a2568e6dd9da372c3453f4732eb6e15ebb9038451","ffe8912b7c45288810c870b768190c6c097459930a587dd6ef0d900a5529a811","f53678bdb9f25445c8cdf021f2b003b74fd638e69bb1959dde8e370e8cc1e4fa","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","d74b8e644da7415e3757a17a42b7f284597b577e3c87b80f4b3ba0cc2db1184f","7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","893d1b5dd98f1c01a0ec4122dfd7f774e0fa1560e1aa19e509c96ed543c6244e","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","5ff4ecfd544d596de3c8011a6d44c59443c85e1f99065095e556b15237eb39ac","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"8a70903bbbdad1d58e3936ca90b3ad993e54827ea324e20f2f63cef4e14e9d55","0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","d8f4f38ca537e6e6d38579c881125b81b546ffae0dd216f68269e72636af43ae","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","d852d6282c8dc8156d26d6bda83ab4bde51fee05ba2fe0ecdc165ddda009d3ee","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","4025cf62742c5bb3d383c8a62342481622c87e3397ea5e7b7baab18b9efd5798","c21830111d49a5cd7a9f384370db5b41c659d045fe920bcac1cc9f507c88125d","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","035b95793288bf4457a2b80bfe9b7500a29324ad62adcf9991277198e8833096","c2d47e5668f89ed8768d306919c42bb88d50d4029d68f58343141360895cfcc0","65648639567d214f62c1b21d200c852807e68bdb08311f95ab6f526ef5b98995","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","7fc5a3d7cff296cea5c225911726a56283b663328709088fcc912d61f73682fc","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","e34f3f6159b1e23de9bb5521382795aaa5aaed6f53b4702e70a2ec45bc76ddb5","2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5",{"version":"bbf144d4354e2aaa6439f32761f3ee798cc68d1600adab6e2a596f25269f106d","affectsGlobalScope":true},"c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","3a1b96d993dbbb8d6fb9740714daa605bcdbbb751143851a431f388948e37ce1","2bca896d780555ea2b1d74895833067da5410b312f7bb1baa99ca1502b79d09c",{"version":"989a02f06c40e911bf5bbecba5669d1fa5fff2bf25ffdb3937aeed166aa60a94","affectsGlobalScope":true},{"version":"0d0202f2947aad59e475735a139dc857c0c4b74d0b662c0e20c763452e2b8325","affectsGlobalScope":true},"ad23ef9834b5b8819ca9da91e9d534514d47d31d33fa384d82697c7b9502572c","9e6975cf0b1095af433b1eebd0498af85a02f1d7cd7e9cca19a837229e9b6722","f25b858b85a866a2c2d3d76931015f461f2411ed1f9632c5078f6057395a2953","aa1edccbdbf6d46ee703e645343b63fc9f55298aade357b9a32d39a6c1c7df63","55ca133bf28d14756551b14403db076ca40abdb9dd1cdc0ac5f9e69e75305f3a","1a32e8f6e0b0355b38b1b84468d87569aa8dd417413acf1b0401d2635ced092d","e5995912322aa71d87fd9e3b52c7079ec462b3ba298a326f0f04646b6437c0e4","e59b506fa1621eaa48567155a73cc264fb69597234500962d5c99ca2cbf5dcfd","1d874fdf6944039b9a841f14f9acf225c636b4076d0e4acf6b7a7b88291ad117","fcca9875c9a0617fbe8008ad2d2df300c19f54296907834c56c77c2a9411e841","ffebeb335146d8a85fae6627a1777ca7fb4b833ed2ed147dfe71691ce2b36e8e","ea68d3bdeb7fc7a39772ff27d21e01a6a6c68c12877ba960d314649389ffd111","34de169048a5267c472e1cf562c4a575e805683ea18f88518019f624a23e53d9","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","9eb2875a1e4c583066af7d6194ea8162191b2756e5d87ccb3c562fdf74d06869","2155c677d647aad82674498fd473cf77598355ef479844224f79bc4a1e4fffce","3cec507f07190f2fdffb93b3a3ea2b161061015d16fac9ee48d0bf717631310a","271095be81df8b130167e2cfa1882d84280a8bcffa59b50716e57818bbe9ad6d","a982221baea5467bbbaddf1d46c3fdfab20073c7ced35869feecfcb4e39c28ac","94b06460133208aaf61f01d6be479cba513c2413ad52645a9806c69e65a04b17","5d4a5730e1d010e2b117ee1e9876783586f8c9e9da1976664fc0ff3bdcfb0ed6","2a4bc0a2dfb607d4dc64ddf4a8bd95675c4b344170075d080617040ca8f8788b","ba2734a02d311863f7758f9bd258d7f5e67b58c5d002e3f87951607171c1eef4","908877cfe2edfff50b94c312bed96ac6cd74a5e93ee471de1bfe7ed7ef861e74","44b157ef6c4ded3f6b0a0494c899edb4502e7c7cf38193b3693efa4d9a94810e","5ff56f6c2212fd5fb5ba2435282ed35021962ed3dbbd3a46fe973985bb73f70f","c2d595df1bad709f1d861e5b874c31bed79c19aaa6b10b9ec16b44b597d12afb","5bc76884b68fd1156fa9b32d26c380a2b00a5f9fb499ce24929cc94f72fd8a9e","f4bfabb664153ca62c78d996c8f7d4ecd15edbbc8d18819e96d7435cdb821939","06c2c4176ef57591d1e6c7008d52d71372efddbbd81bb0139efb770a36812af7","16df90604f2c60da2687efe67de611ba323b2e6a922874bf31ec6aad72e08ed2","c74a0c397b3e35eb3fa7098c413f6908495d1fe1254e4d373a72da8eef999b63","ead194b3eca20113ac04b5c7cd76a59b451df84bd84df9ebb8cdc0ab545cb097","697882d97df41aacc1ecb9320483ad6da7ef51f73c8d9118f71048f3c3a80b7d","99c08b6b0d65c0ec55411a55bc0ac7673835a7c1565ecc6f314bf78330ce7d95","f09b5b78b5c31d85a57e5ea5491dec61a1f666a6d7ddc04fada0ba641aaeb8f5","453ab4b37dd377e9c7371183c22a1a8550ccb19899cac5be4994044b878e306b","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","1e9c6c8763e567c465a7c6517393cff9b96afd337bb30f1fe8c09e135cf1ed19","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","1db6491f25ced62f23f06d1f3700a790df0971726acb33669bbf4a8de2f769a9"],"options":{"composite":true,"outDir":"./","rootDir":".."},"fileIdsList":[[52,74,80,81],[51,52,74,80,81,88,89],[52,74,80,81,91],[52,74,80,81,92],[52,74,80,81,95,97,98,99,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,98,99,100,101,102,103,104,105,106,107],[52,74,80,81,96,97,98,99,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,99,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,104,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,104,105,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,104,105,106],[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,80,81],[51,52,58,67,74,80,81],[43,51,52,58,74,80,81],[47,52,59,74,80,81],[52,67,74,80,81],[49,51,52,58,74,80,81],[51,52,74,80,81],[51,67,73,74,80,81],[51,52,58,67,73,74,80,81],[51,52,53,58,67,70,73,74,80,81],[51,52,53,70,73,74,80,81],[52,73,74,80,81],[49,51,52,67,74,80,81],[41,52,74,80,81],[52,72,74,80,81],[51,52,67,74,80,81],[52,65,74,76,80,81],[47,49,52,58,67,74,80,81],[52,74,79,80,81,82],[52,74,81],[40,52,74,80,81],[52,74,80],[52,74,80,81,83,84],[52,74,80,81,85,86],[52,74,80,81,87],[52,58,74,80,81],[52,64,74,80,81],[52,80,81],[51,52,67,73,74,76,80,81],[52,74,80,81,109],[52,74,80,81,112],[52,74,80,81,88,90],[52,74,80,81,115,152],[52,74,80,81,115,139,152],[52,74,80,81,152],[52,74,80,81,115],[52,74,80,81,115,140,152],[52,74,80,81,88,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151],[52,74,80,81,140,152],[52,74,80,81,154]],"referencedMap":[[34,1],[35,1],[36,1],[37,1],[38,1],[39,1],[90,2],[91,1],[92,3],[93,4],[94,1],[96,5],[97,6],[95,7],[98,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[89,1],[41,1],[79,18],[42,1],[43,19],[44,20],[45,1],[46,21],[47,22],[48,23],[49,1],[50,24],[51,1],[52,25],[40,1],[53,26],[54,27],[55,28],[56,24],[57,29],[58,30],[59,1],[60,1],[61,31],[62,32],[63,1],[64,1],[65,33],[66,34],[67,24],[68,1],[69,1],[70,35],[71,1],[83,36],[80,37],[82,38],[81,39],[85,40],[84,1],[86,1],[87,41],[88,42],[72,43],[73,44],[74,45],[75,22],[76,1],[77,46],[78,22],[108,1],[110,47],[111,1],[112,1],[113,48],[109,1],[114,49],[139,50],[140,51],[115,52],[118,52],[137,50],[138,50],[128,53],[127,53],[125,50],[120,50],[133,50],[131,50],[135,50],[119,50],[132,50],[136,50],[121,50],[122,50],[134,50],[116,50],[123,50],[124,50],[126,50],[130,50],[141,54],[129,50],[117,50],[152,55],[151,1],[148,54],[150,56],[149,54],[142,54],[143,54],[145,54],[147,54],[144,56],[146,56],[153,1],[154,1],[155,57],[33,1],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"exportedModulesMap":[[34,1],[35,1],[36,1],[37,1],[38,1],[39,1],[90,2],[91,1],[92,3],[93,4],[94,1],[96,5],[97,6],[95,7],[98,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[89,1],[41,1],[79,18],[42,1],[43,19],[44,20],[45,1],[46,21],[47,22],[48,23],[49,1],[50,24],[51,1],[52,25],[40,1],[53,26],[54,27],[55,28],[56,24],[57,29],[58,30],[59,1],[60,1],[61,31],[62,32],[63,1],[64,1],[65,33],[66,34],[67,24],[68,1],[69,1],[70,35],[71,1],[83,36],[80,37],[82,38],[81,39],[85,40],[84,1],[86,1],[87,41],[88,42],[72,43],[73,44],[74,45],[75,22],[76,1],[77,46],[78,22],[108,1],[110,47],[111,1],[112,1],[113,48],[109,1],[114,49],[139,50],[140,51],[115,52],[118,52],[137,50],[138,50],[128,53],[127,53],[125,50],[120,50],[133,50],[131,50],[135,50],[119,50],[132,50],[136,50],[121,50],[122,50],[134,50],[116,50],[123,50],[124,50],[126,50],[130,50],[141,54],[129,50],[117,50],[152,55],[151,1],[148,54],[150,56],[149,54],[142,54],[143,54],[145,54],[147,54],[144,56],[146,56],[153,1],[154,1],[155,57],[33,1],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"semanticDiagnosticsPerFile":[34,35,36,37,38,39,90,91,92,93,94,96,97,95,98,99,100,101,102,103,104,105,106,107,89,41,79,42,43,44,45,46,47,48,49,50,51,52,40,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,83,80,82,81,85,84,86,87,88,72,73,74,75,76,77,78,108,110,111,112,113,109,114,139,140,115,118,137,138,128,127,125,120,133,131,135,119,132,136,121,122,134,116,123,124,126,130,141,129,117,152,151,148,150,149,142,143,145,147,144,146,153,154,155,33,32,1,7,11,10,3,12,13,14,15,16,17,18,19,4,5,23,20,21,22,24,25,26,6,27,28,29,30,2,31,9,8]},"version":"4.3.5"} \ No newline at end of file diff --git a/tests/nmtest/package.json b/tests/nmtest/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/nmtest/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/nmtest/packageFoo/index.ts b/tests/nmtest/packageFoo/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/packageFoo/out/index.d.ts b/tests/nmtest/packageFoo/out/index.d.ts new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/packageFoo/out/index.js b/tests/nmtest/packageFoo/out/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo b/tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo new file mode 100644 index 000000000..7a7e676e9 --- /dev/null +++ b/tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../index.ts","../../../../node_modules/@types/argparse/index.d.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../../../node_modules/@types/diff/index.d.ts","../../../../node_modules/@types/emscripten/index.d.ts","../../../../node_modules/@types/events/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/ts3.2/fs.d.ts","../../../../node_modules/@types/node/ts3.2/util.d.ts","../../../../node_modules/@types/node/ts3.2/globals.d.ts","../../../../node_modules/@types/node/ts3.2/base.d.ts","../../../../node_modules/@types/node/ts3.5/wasi.d.ts","../../../../node_modules/@types/node/ts3.5/base.d.ts","../../../../node_modules/@types/node/ts3.7/assert.d.ts","../../../../node_modules/@types/node/ts3.7/base.d.ts","../../../../node_modules/@types/node/ts3.7/index.d.ts","../../../../node_modules/@types/minimatch/index.d.ts","../../../../node_modules/@types/glob/index.d.ts","../../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../../node_modules/@types/istanbul-reports/index.d.ts","../../../../node_modules/@types/json-schema/index.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/common.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/array.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/collection.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/date.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/function.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/lang.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/math.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/number.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/object.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/seq.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/string.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/util.d.ts","../../../../node_modules/@types/lodash/ts3.1/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/@types/retry/index.d.ts","../../../../node_modules/@types/proper-lockfile/index.d.ts","../../../../node_modules/@types/proxyquire/index.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/rimraf/index.d.ts","../../../../node_modules/@types/semver/classes/semver.d.ts","../../../../node_modules/@types/semver/functions/parse.d.ts","../../../../node_modules/@types/semver/functions/valid.d.ts","../../../../node_modules/@types/semver/functions/clean.d.ts","../../../../node_modules/@types/semver/functions/inc.d.ts","../../../../node_modules/@types/semver/functions/diff.d.ts","../../../../node_modules/@types/semver/functions/major.d.ts","../../../../node_modules/@types/semver/functions/minor.d.ts","../../../../node_modules/@types/semver/functions/patch.d.ts","../../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../../node_modules/@types/semver/functions/compare.d.ts","../../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../../node_modules/@types/semver/functions/sort.d.ts","../../../../node_modules/@types/semver/functions/rsort.d.ts","../../../../node_modules/@types/semver/functions/gt.d.ts","../../../../node_modules/@types/semver/functions/lt.d.ts","../../../../node_modules/@types/semver/functions/eq.d.ts","../../../../node_modules/@types/semver/functions/neq.d.ts","../../../../node_modules/@types/semver/functions/gte.d.ts","../../../../node_modules/@types/semver/functions/lte.d.ts","../../../../node_modules/@types/semver/functions/cmp.d.ts","../../../../node_modules/@types/semver/functions/coerce.d.ts","../../../../node_modules/@types/semver/classes/comparator.d.ts","../../../../node_modules/@types/semver/classes/range.d.ts","../../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../../node_modules/@types/semver/ranges/valid.d.ts","../../../../node_modules/@types/semver/ranges/outside.d.ts","../../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../../node_modules/@types/semver/index.d.ts","../../../../node_modules/@types/stack-utils/index.d.ts","../../../../node_modules/@types/yargs-parser/index.d.ts","../../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646",{"version":"514f46744035160ab6d90ee6528f2a27a0b787427a0a7d7892a5c960066df47e","affectsGlobalScope":true},"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","162cb6760a1fb4c786a745093431e3279ad005db5c19c2cc95f1906becb6b021",{"version":"4a72ef2edbfb19987b3bc76cc56953cb19217c01c955fe6f37707b547091c024","affectsGlobalScope":true},"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935",{"version":"9d0b32c595a2e0d320a56b3d0e8f0a317e4149239ec913aa8f11eeb73edc92be","affectsGlobalScope":true},"96e547b51f95ee76bdb25731c92420fa6f93b59c3f38f23d505be36e2de394ee","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","3ca89ecb953fe3b63dae41e5bb986506e812754dde0369c5fe61de26eff47dbe","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d56c93b6bf66e602869e926ddc8b1b4630d1ff397909291767d18d4ffc22d33f","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","5ffa4219ee64e130980a4231392cbc628544df137ccf650ae8d76e0a1744fd2b","e1a12c7e7951b9762cfbcc43c72eb5611120967706a7c3142ad303c6b7ee767f","b5fd0a137bd6d0afe291d465e99c7469b082b66b3ee89273b3b22801b6c2948e","873da589b78a1f1fa7d623483bd2c2730a02e0852259fb8fdcfe5221ac51d18a","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c","a376e245f494b58365a4391a2568e6dd9da372c3453f4732eb6e15ebb9038451","ffe8912b7c45288810c870b768190c6c097459930a587dd6ef0d900a5529a811","f53678bdb9f25445c8cdf021f2b003b74fd638e69bb1959dde8e370e8cc1e4fa","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","d74b8e644da7415e3757a17a42b7f284597b577e3c87b80f4b3ba0cc2db1184f","7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","893d1b5dd98f1c01a0ec4122dfd7f774e0fa1560e1aa19e509c96ed543c6244e","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","5ff4ecfd544d596de3c8011a6d44c59443c85e1f99065095e556b15237eb39ac","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"8a70903bbbdad1d58e3936ca90b3ad993e54827ea324e20f2f63cef4e14e9d55","0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","d8f4f38ca537e6e6d38579c881125b81b546ffae0dd216f68269e72636af43ae","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","d852d6282c8dc8156d26d6bda83ab4bde51fee05ba2fe0ecdc165ddda009d3ee","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","4025cf62742c5bb3d383c8a62342481622c87e3397ea5e7b7baab18b9efd5798","c21830111d49a5cd7a9f384370db5b41c659d045fe920bcac1cc9f507c88125d","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","035b95793288bf4457a2b80bfe9b7500a29324ad62adcf9991277198e8833096","c2d47e5668f89ed8768d306919c42bb88d50d4029d68f58343141360895cfcc0","65648639567d214f62c1b21d200c852807e68bdb08311f95ab6f526ef5b98995","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","7fc5a3d7cff296cea5c225911726a56283b663328709088fcc912d61f73682fc","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","e34f3f6159b1e23de9bb5521382795aaa5aaed6f53b4702e70a2ec45bc76ddb5","2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5",{"version":"bbf144d4354e2aaa6439f32761f3ee798cc68d1600adab6e2a596f25269f106d","affectsGlobalScope":true},"c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","3a1b96d993dbbb8d6fb9740714daa605bcdbbb751143851a431f388948e37ce1","2bca896d780555ea2b1d74895833067da5410b312f7bb1baa99ca1502b79d09c",{"version":"989a02f06c40e911bf5bbecba5669d1fa5fff2bf25ffdb3937aeed166aa60a94","affectsGlobalScope":true},{"version":"0d0202f2947aad59e475735a139dc857c0c4b74d0b662c0e20c763452e2b8325","affectsGlobalScope":true},"ad23ef9834b5b8819ca9da91e9d534514d47d31d33fa384d82697c7b9502572c","9e6975cf0b1095af433b1eebd0498af85a02f1d7cd7e9cca19a837229e9b6722","f25b858b85a866a2c2d3d76931015f461f2411ed1f9632c5078f6057395a2953","aa1edccbdbf6d46ee703e645343b63fc9f55298aade357b9a32d39a6c1c7df63","55ca133bf28d14756551b14403db076ca40abdb9dd1cdc0ac5f9e69e75305f3a","1a32e8f6e0b0355b38b1b84468d87569aa8dd417413acf1b0401d2635ced092d","e5995912322aa71d87fd9e3b52c7079ec462b3ba298a326f0f04646b6437c0e4","e59b506fa1621eaa48567155a73cc264fb69597234500962d5c99ca2cbf5dcfd","1d874fdf6944039b9a841f14f9acf225c636b4076d0e4acf6b7a7b88291ad117","fcca9875c9a0617fbe8008ad2d2df300c19f54296907834c56c77c2a9411e841","ffebeb335146d8a85fae6627a1777ca7fb4b833ed2ed147dfe71691ce2b36e8e","ea68d3bdeb7fc7a39772ff27d21e01a6a6c68c12877ba960d314649389ffd111","34de169048a5267c472e1cf562c4a575e805683ea18f88518019f624a23e53d9","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","9eb2875a1e4c583066af7d6194ea8162191b2756e5d87ccb3c562fdf74d06869","2155c677d647aad82674498fd473cf77598355ef479844224f79bc4a1e4fffce","3cec507f07190f2fdffb93b3a3ea2b161061015d16fac9ee48d0bf717631310a","271095be81df8b130167e2cfa1882d84280a8bcffa59b50716e57818bbe9ad6d","a982221baea5467bbbaddf1d46c3fdfab20073c7ced35869feecfcb4e39c28ac","94b06460133208aaf61f01d6be479cba513c2413ad52645a9806c69e65a04b17","5d4a5730e1d010e2b117ee1e9876783586f8c9e9da1976664fc0ff3bdcfb0ed6","2a4bc0a2dfb607d4dc64ddf4a8bd95675c4b344170075d080617040ca8f8788b","ba2734a02d311863f7758f9bd258d7f5e67b58c5d002e3f87951607171c1eef4","908877cfe2edfff50b94c312bed96ac6cd74a5e93ee471de1bfe7ed7ef861e74","44b157ef6c4ded3f6b0a0494c899edb4502e7c7cf38193b3693efa4d9a94810e","5ff56f6c2212fd5fb5ba2435282ed35021962ed3dbbd3a46fe973985bb73f70f","c2d595df1bad709f1d861e5b874c31bed79c19aaa6b10b9ec16b44b597d12afb","5bc76884b68fd1156fa9b32d26c380a2b00a5f9fb499ce24929cc94f72fd8a9e","f4bfabb664153ca62c78d996c8f7d4ecd15edbbc8d18819e96d7435cdb821939","06c2c4176ef57591d1e6c7008d52d71372efddbbd81bb0139efb770a36812af7","16df90604f2c60da2687efe67de611ba323b2e6a922874bf31ec6aad72e08ed2","c74a0c397b3e35eb3fa7098c413f6908495d1fe1254e4d373a72da8eef999b63","ead194b3eca20113ac04b5c7cd76a59b451df84bd84df9ebb8cdc0ab545cb097","697882d97df41aacc1ecb9320483ad6da7ef51f73c8d9118f71048f3c3a80b7d","99c08b6b0d65c0ec55411a55bc0ac7673835a7c1565ecc6f314bf78330ce7d95","f09b5b78b5c31d85a57e5ea5491dec61a1f666a6d7ddc04fada0ba641aaeb8f5","453ab4b37dd377e9c7371183c22a1a8550ccb19899cac5be4994044b878e306b","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","1e9c6c8763e567c465a7c6517393cff9b96afd337bb30f1fe8c09e135cf1ed19","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","1db6491f25ced62f23f06d1f3700a790df0971726acb33669bbf4a8de2f769a9"],"options":{"composite":true,"outDir":"./","rootDir":".."},"fileIdsList":[[51,73,79,80],[50,51,73,79,80,87,88],[51,73,79,80,90],[51,73,79,80,91],[51,73,79,80,94,96,97,98,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,97,98,99,100,101,102,103,104,105,106],[51,73,79,80,95,96,97,98,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,98,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,103,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,103,104,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,103,104,105],[39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80],[50,51,57,66,73,79,80],[42,50,51,57,73,79,80],[46,51,58,73,79,80],[51,66,73,79,80],[48,50,51,57,73,79,80],[50,51,73,79,80],[50,66,72,73,79,80],[50,51,57,66,72,73,79,80],[50,51,52,57,66,69,72,73,79,80],[50,51,52,69,72,73,79,80],[51,72,73,79,80],[48,50,51,66,73,79,80],[40,51,73,79,80],[51,71,73,79,80],[50,51,66,73,79,80],[51,64,73,75,79,80],[46,48,51,57,66,73,79,80],[51,73,78,79,80,81],[51,73,80],[39,51,73,79,80],[51,73,79],[51,73,79,80,82,83],[51,73,79,80,84,85],[51,73,79,80,86],[51,57,73,79,80],[51,63,73,79,80],[51,79,80],[50,51,66,72,73,75,79,80],[51,73,79,80,108],[51,73,79,80,111],[51,73,79,80,87,89],[51,73,79,80,114,151],[51,73,79,80,114,138,151],[51,73,79,80,151],[51,73,79,80,114],[51,73,79,80,114,139,151],[51,73,79,80,87,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],[51,73,79,80,139,151],[51,73,79,80,153]],"referencedMap":[[33,1],[34,1],[35,1],[36,1],[37,1],[38,1],[89,2],[90,1],[91,3],[92,4],[93,1],[95,5],[96,6],[94,7],[97,8],[98,9],[99,10],[100,11],[101,12],[102,13],[103,14],[104,15],[105,16],[106,17],[88,1],[40,1],[78,18],[41,1],[42,19],[43,20],[44,1],[45,21],[46,22],[47,23],[48,1],[49,24],[50,1],[51,25],[39,1],[52,26],[53,27],[54,28],[55,24],[56,29],[57,30],[58,1],[59,1],[60,31],[61,32],[62,1],[63,1],[64,33],[65,34],[66,24],[67,1],[68,1],[69,35],[70,1],[82,36],[79,37],[81,38],[80,39],[84,40],[83,1],[85,1],[86,41],[87,42],[71,43],[72,44],[73,45],[74,22],[75,1],[76,46],[77,22],[107,1],[109,47],[110,1],[111,1],[112,48],[108,1],[113,49],[138,50],[139,51],[114,52],[117,52],[136,50],[137,50],[127,53],[126,53],[124,50],[119,50],[132,50],[130,50],[134,50],[118,50],[131,50],[135,50],[120,50],[121,50],[133,50],[115,50],[122,50],[123,50],[125,50],[129,50],[140,54],[128,50],[116,50],[151,55],[150,1],[147,54],[149,56],[148,54],[141,54],[142,54],[144,54],[146,54],[143,56],[145,56],[152,1],[153,1],[154,57],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"exportedModulesMap":[[33,1],[34,1],[35,1],[36,1],[37,1],[38,1],[89,2],[90,1],[91,3],[92,4],[93,1],[95,5],[96,6],[94,7],[97,8],[98,9],[99,10],[100,11],[101,12],[102,13],[103,14],[104,15],[105,16],[106,17],[88,1],[40,1],[78,18],[41,1],[42,19],[43,20],[44,1],[45,21],[46,22],[47,23],[48,1],[49,24],[50,1],[51,25],[39,1],[52,26],[53,27],[54,28],[55,24],[56,29],[57,30],[58,1],[59,1],[60,31],[61,32],[62,1],[63,1],[64,33],[65,34],[66,24],[67,1],[68,1],[69,35],[70,1],[82,36],[79,37],[81,38],[80,39],[84,40],[83,1],[85,1],[86,41],[87,42],[71,43],[72,44],[73,45],[74,22],[75,1],[76,46],[77,22],[107,1],[109,47],[110,1],[111,1],[112,48],[108,1],[113,49],[138,50],[139,51],[114,52],[117,52],[136,50],[137,50],[127,53],[126,53],[124,50],[119,50],[132,50],[130,50],[134,50],[118,50],[131,50],[135,50],[120,50],[121,50],[133,50],[115,50],[122,50],[123,50],[125,50],[129,50],[140,54],[128,50],[116,50],[151,55],[150,1],[147,54],[149,56],[148,54],[141,54],[142,54],[144,54],[146,54],[143,56],[145,56],[152,1],[153,1],[154,57],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"semanticDiagnosticsPerFile":[33,34,35,36,37,38,89,90,91,92,93,95,96,94,97,98,99,100,101,102,103,104,105,106,88,40,78,41,42,43,44,45,46,47,48,49,50,51,39,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,82,79,81,80,84,83,85,86,87,71,72,73,74,75,76,77,107,109,110,111,112,108,113,138,139,114,117,136,137,127,126,124,119,132,130,134,118,131,135,120,121,133,115,122,123,125,129,140,128,116,151,150,147,149,148,141,142,144,146,143,145,152,153,154,32,1,7,11,10,3,12,13,14,15,16,17,18,19,4,5,23,20,21,22,24,25,26,6,27,28,29,30,2,31,9,8]},"version":"4.3.5"} \ No newline at end of file diff --git a/tests/nmtest/packageFoo/package.json b/tests/nmtest/packageFoo/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/nmtest/packageFoo/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/nmtest/packageFoo/tsconfig.json b/tests/nmtest/packageFoo/tsconfig.json new file mode 100644 index 000000000..a7b54e05e --- /dev/null +++ b/tests/nmtest/packageFoo/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "composite": true, + "rootDir": ".", + "outDir": "out" + } +} diff --git a/tests/nmtest/tsconfig.json b/tests/nmtest/tsconfig.json new file mode 100644 index 000000000..c2d788be7 --- /dev/null +++ b/tests/nmtest/tsconfig.json @@ -0,0 +1,13 @@ +{ + "include": ["**/*", "node_modules"], + "references": [ + { + "path": "packageFoo/tsconfig.json" + } + ], + "compilerOptions": { + "composite": true, + "rootDir": ".", + "outDir": "out" + } +} diff --git a/tests/resolver/README.md b/tests/resolver/README.md new file mode 100644 index 000000000..50ec74246 --- /dev/null +++ b/tests/resolver/README.md @@ -0,0 +1,46 @@ +TODO must require explicit rootDir; do not allow to be inferred. +TODO resolve JSON if resolveJsonModules?? + +Test a bunch of permutations of: + +config permutations: + +- allowJs +- not allowJs + +- preferSrc +- not preferSrc + +import permutations: + +- Relative import of file +- Relative import of index +- rootless library import of main +- rootless library import of index +- rootless library import of exports sub-path +- rootless self-import of main +- rootless self-import of index +- rootless self-import of exports sub-path + + - Require with extension + - Require without extension + + - Require from dist to dist + - Require from dist to src + - Require from src to dist + - Require from src to src + +lib permutations: + +- module exists in both src and dist (precompilation ran) +- module exists in only dist (came from elsewhere) +- module exists only in src (did not precompile) + +- .ts / .js extension +- .tsx / .js extension +- .cts / .cjs extension +- .mts / .mjs extension +- .js / .js extension +- .jsx / .js extension +- .cjs / .cjs extension +- .mjs / .mjs extension diff --git a/tests/resolver/generate-tests.ts b/tests/resolver/generate-tests.ts new file mode 100755 index 000000000..59920c6f2 --- /dev/null +++ b/tests/resolver/generate-tests.ts @@ -0,0 +1,178 @@ +#!/usr/bin/env ts-node + +import * as Path from 'path'; +import * as fs from 'fs'; + +for (const allowJs of [false, true]) { + for (const preferSrc of [false, true]) { + for (const typeModule of [false, true]) { + for (const experimentalSpecifierResolutionNode of [false, true]) { + const projectName = `project${allowJs ? '-allowJs' : ''}-${ + preferSrc ? 'preferSrc' : 'preferOut' + }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ + experimentalSpecifierResolutionNode ? '-esrn' : '' + }`; + const projectDir = Path.join(__dirname, projectName); + if (fs.existsSync(projectDir)) { + fs.rmdirSync(projectDir, { + recursive: true, + }); + } + fs.mkdirSync(Path.join(projectDir, 'src'), { + recursive: true, + }); + fs.mkdirSync(Path.join(projectDir, 'out'), { + recursive: true, + }); + + fs.writeFileSync( + Path.join(projectDir, 'package.json'), + JSON.stringify( + { + type: typeModule ? 'module' : undefined, + }, + null, + 2 + ) + ); + fs.writeFileSync( + Path.join(projectDir, 'tsconfig.json'), + JSON.stringify( + { + 'ts-node': { + experimentalResolver: true, + preferSrc, + transpileOnly: true, + }, + compilerOptions: { + allowJs, + skipLibCheck: true, + }, + }, + null, + 2 + ) + ); + + /** Array of outDir names, including extension */ + const libFiles: string[] = []; + // TODO does allowJs matter? + for (const inOut of [false, true]) { + for (const inSrc of [false, true]) { + // Don't bother with src-only extensions when only emitting to `out` + for (const srcExt of inSrc + ? ['ts', 'tsx', 'cts', 'mts', 'js', 'jsx', 'cjs', 'mjs'] + : ['js', 'cjs', 'mjs']) { + const outExt = srcExt.replace('ts', 'js').replace('x', ''); + const basename = `lib-${ + inOut && inSrc ? 'inboth' : inOut ? 'onlyout' : 'onlysrc' + }-${srcExt}`; + const srcName = `${basename}.${srcExt}`; + const outName = `${basename}.${outExt}`; + libFiles.push(outName); + if (inOut) { + fs.writeFileSync( + Path.join(projectDir, 'out', outName), + String.raw` + console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); + ` + ); + } + if (inSrc) { + fs.writeFileSync( + Path.join(projectDir, 'src', srcName), + String.raw` + console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); + ` + ); + } + } + } + } + for (const indexExt of ['cjs', 'mjs'] as const) { + for (const withExt of indexExt == 'mjs' && + experimentalSpecifierResolutionNode === false + ? [true] + : [false, true]) { + for (const indexLocation of ['src', 'out'] as const) { + for (const indexTarget of ['src', 'out'] as const) { + const indexFilename = `index-${indexLocation}-to-${indexTarget}${ + withExt ? '-withext' : '' + }.${indexExt}`; + fs.writeFileSync( + Path.join(projectDir, indexLocation, indexFilename), + ` + ${libFiles + .map((libFile) => { + const libFileExt = libFile.match(/\.(.*)$/)![1]; + const libFileIsMjs = + (typeModule && libFileExt === 'js') || + libFileExt === 'mjs'; + // Do not try to import mjs from cjs + if (libFileIsMjs && indexExt === 'cjs') return ''; + const specifier = `${ + indexTarget === indexLocation + ? './' + : `../${indexTarget}` + }${withExt ? libFile : libFile.replace(/\..+$/, '')}`; + return `${ + indexExt === 'cjs' + ? `require('${specifier}');` + : `await import('${specifier}');` + }`; + }) + .join('\n')} + ` + ); + } + } + } + } + } + } + } +} + +// Test a bunch of permutations of: + +// config permutations: + +// - allowJs +// - not allowJs + +// - preferSrc +// - not preferSrc + +// import permutations: + +// - Relative import of file +// - Relative import of index +// - rootless library import of main +// - rootless library import of index +// - rootless library import of exports sub-path +// - rootless self-import of main +// - rootless self-import of index +// - rootless self-import of exports sub-path + +// - Require with extension +// - Require without extension + +// - Require from dist to dist +// - Require from dist to src +// - Require from src to dist +// - Require from src to src + +// lib permutations: + +// - module exists in both src and dist (precompilation ran) +// - module exists in only dist (came from elsewhere) +// - module exists only in src (did not precompile) + +// - .ts / .js extension +// - .tsx / .js extension +// - .cts / .cjs extension +// - .mts / .mjs extension +// - .js / .js extension +// - .jsx / .js extension +// - .cjs / .cjs extension +// - .mjs / .mjs extension diff --git a/tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs b/tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs new file mode 100644 index 000000000..bc9a37930 --- /dev/null +++ b/tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/in-both-src-and-dist-ts.js b/tests/resolver/junk/dist/in-both-src-and-dist-ts.js new file mode 100644 index 000000000..bc9a37930 --- /dev/null +++ b/tests/resolver/junk/dist/in-both-src-and-dist-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/in-both-src-and-dist-tsx.js b/tests/resolver/junk/dist/in-both-src-and-dist-tsx.js new file mode 100644 index 000000000..bc9a37930 --- /dev/null +++ b/tests/resolver/junk/dist/in-both-src-and-dist-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/index-dist-local-byext.js b/tests/resolver/junk/dist/index-dist-local-byext.js new file mode 100644 index 000000000..ddb447e7f --- /dev/null +++ b/tests/resolver/junk/dist/index-dist-local-byext.js @@ -0,0 +1,4 @@ +require('./in-both-src-and-dist-byext.js.js'); +require('./in-both-src-and-dist-tsx-byext.js.js'); +require('./only-in-src-byext.js.js'); +require('./only-in-src-tsx-byext.jsx.js'); diff --git a/tests/resolver/junk/dist/index-dist-local.js b/tests/resolver/junk/dist/index-dist-local.js new file mode 100644 index 000000000..56a1dbb43 --- /dev/null +++ b/tests/resolver/junk/dist/index-dist-local.js @@ -0,0 +1,8 @@ +require('./in-both-src-and-dist-ts'); +require('./in-both-src-and-dist-tsx'); +require('./in-both-src-and-dist-byext.js.js'); +require('./in-both-src-and-dist-tsx-byext.js.js'); +require('./only-in-src'); +require('./only-in-src-tsx'); +require('./only-in-src-byext.js.js'); +require('./only-in-src-tsx-byext.jsx.js'); diff --git a/tests/resolver/junk/dist/index-dist-to-src-byext.js b/tests/resolver/junk/dist/index-dist-to-src-byext.js new file mode 100644 index 000000000..e5a5b05fa --- /dev/null +++ b/tests/resolver/junk/dist/index-dist-to-src-byext.js @@ -0,0 +1,5 @@ +require('./in-both-src-and-dist-ts.js'); +require('./in-both-src-and-dist-tsx.js'); +require('./in-both-src-and-dist-cts.cjs'); +require('../src/only-in-src-ts.js'); +require('../src/only-in-src-tsx.jsx'); diff --git a/tests/resolver/junk/dist/index-dist-to-src.js b/tests/resolver/junk/dist/index-dist-to-src.js new file mode 100644 index 000000000..10254cde6 --- /dev/null +++ b/tests/resolver/junk/dist/index-dist-to-src.js @@ -0,0 +1,8 @@ +require('./in-both-src-and-dist-ts'); +require('./in-both-src-and-dist-tsx'); +require('./in-both-src-and-dist-byext.js.js'); +require('./in-both-src-and-dist-tsx-byext.js.js'); +require('../src/only-in-src-ts'); +require('../src/only-in-src-tsx'); +require('../src/only-in-src-byext.js'); +require('../src/only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/dist/only-in-dist-cts.cjs b/tests/resolver/junk/dist/only-in-dist-cts.cjs new file mode 100644 index 000000000..bc9a37930 --- /dev/null +++ b/tests/resolver/junk/dist/only-in-dist-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/only-in-dist-ts.js b/tests/resolver/junk/dist/only-in-dist-ts.js new file mode 100644 index 000000000..bc9a37930 --- /dev/null +++ b/tests/resolver/junk/dist/only-in-dist-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/src/in-both-src-and-dist-cts.cts b/tests/resolver/junk/src/in-both-src-and-dist-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/junk/src/in-both-src-and-dist-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/in-both-src-and-dist-ts.ts b/tests/resolver/junk/src/in-both-src-and-dist-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/junk/src/in-both-src-and-dist-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx b/tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/index-src-local-byext.js b/tests/resolver/junk/src/index-src-local-byext.js new file mode 100644 index 000000000..c140ac178 --- /dev/null +++ b/tests/resolver/junk/src/index-src-local-byext.js @@ -0,0 +1,8 @@ +require('./in-both-src-and-dist-ts'); +require('./in-both-src-and-dist-tsx'); +require('./in-both-src-and-dist-byext.js'); +require('./in-both-src-and-dist-tsx-byext.jsx'); +require('./only-in-src-ts'); +require('./only-in-src-tsx'); +require('./only-in-src-byext.js'); +require('./only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/index-src-local.js b/tests/resolver/junk/src/index-src-local.js new file mode 100644 index 000000000..c140ac178 --- /dev/null +++ b/tests/resolver/junk/src/index-src-local.js @@ -0,0 +1,8 @@ +require('./in-both-src-and-dist-ts'); +require('./in-both-src-and-dist-tsx'); +require('./in-both-src-and-dist-byext.js'); +require('./in-both-src-and-dist-tsx-byext.jsx'); +require('./only-in-src-ts'); +require('./only-in-src-tsx'); +require('./only-in-src-byext.js'); +require('./only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/index-src-to-dist-byext.js b/tests/resolver/junk/src/index-src-to-dist-byext.js new file mode 100644 index 000000000..833487a05 --- /dev/null +++ b/tests/resolver/junk/src/index-src-to-dist-byext.js @@ -0,0 +1,8 @@ +require('../dist/in-both-src-and-dist-ts'); +require('../dist/in-both-src-and-dist-tsx'); +require('../dist/in-both-src-and-dist-byext.js'); +require('../dist/in-both-src-and-dist-tsx-byext.jsx'); +require('../dist/only-in-src'); +require('../dist/only-in-src-tsx'); +require('../dist/only-in-src-byext.js'); +require('../dist/only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/index-src-to-dist.js b/tests/resolver/junk/src/index-src-to-dist.js new file mode 100644 index 000000000..833487a05 --- /dev/null +++ b/tests/resolver/junk/src/index-src-to-dist.js @@ -0,0 +1,8 @@ +require('../dist/in-both-src-and-dist-ts'); +require('../dist/in-both-src-and-dist-tsx'); +require('../dist/in-both-src-and-dist-byext.js'); +require('../dist/in-both-src-and-dist-tsx-byext.jsx'); +require('../dist/only-in-src'); +require('../dist/only-in-src-tsx'); +require('../dist/only-in-src-byext.js'); +require('../dist/only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/only-in-src-cts.cts b/tests/resolver/junk/src/only-in-src-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/junk/src/only-in-src-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/only-in-src-ts.ts b/tests/resolver/junk/src/only-in-src-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/junk/src/only-in-src-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/only-in-src-tsx.tsx b/tests/resolver/junk/src/only-in-src-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/junk/src/only-in-src-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/tsconfig.json b/tests/resolver/junk/tsconfig.json new file mode 100644 index 000000000..68dfde9b9 --- /dev/null +++ b/tests/resolver/junk/tsconfig.json @@ -0,0 +1,9 @@ +{ + "ts-node": { + "preferTsExts": false + }, + "compilerOptions": { + "outDir": "junk/dist", + "rootDir": "src" + } +} diff --git a/tests/resolver/package.json b/tests/resolver/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json new file mode 100644 index 000000000..845f4c74b --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json new file mode 100644 index 000000000..845f4c74b --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json new file mode 100644 index 000000000..845f4c74b --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/package.json b/tests/resolver/project-allowJs-preferOut-typeModule/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json new file mode 100644 index 000000000..845f4c74b --- /dev/null +++ b/tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json new file mode 100644 index 000000000..a27a51d74 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json new file mode 100644 index 000000000..a27a51d74 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json new file mode 100644 index 000000000..a27a51d74 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/package.json b/tests/resolver/project-allowJs-preferSrc-typeModule/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json new file mode 100644 index 000000000..a27a51d74 --- /dev/null +++ b/tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": true, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/package.json b/tests/resolver/project-preferOut-typeCommonjs-esrn/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json new file mode 100644 index 000000000..4d0269a59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/package.json b/tests/resolver/project-preferOut-typeCommonjs/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/tsconfig.json b/tests/resolver/project-preferOut-typeCommonjs/tsconfig.json new file mode 100644 index 000000000..4d0269a59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeCommonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/package.json b/tests/resolver/project-preferOut-typeModule-esrn/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json b/tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json new file mode 100644 index 000000000..4d0269a59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/package.json b/tests/resolver/project-preferOut-typeModule/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/tsconfig.json b/tests/resolver/project-preferOut-typeModule/tsconfig.json new file mode 100644 index 000000000..4d0269a59 --- /dev/null +++ b/tests/resolver/project-preferOut-typeModule/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": false, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json b/tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json new file mode 100644 index 000000000..4c1ddab98 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..c384ba2ee --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-ts.js'); +require('../srclib-onlysrc-tsx.js'); +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-js.js'); +require('../srclib-onlysrc-jsx.js'); +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-js.js'); +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-ts.js'); +require('../srclib-inboth-tsx.js'); +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-js.js'); +require('../srclib-inboth-jsx.js'); +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs new file mode 100644 index 000000000..194c2b161 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs @@ -0,0 +1,21 @@ +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-ts'); +require('../srclib-onlysrc-tsx'); +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-js'); +require('../srclib-onlysrc-jsx'); +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-js'); +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-ts'); +require('../srclib-inboth-tsx'); +require('../srclib-inboth-cts'); + +require('../srclib-inboth-js'); +require('../srclib-inboth-jsx'); +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/package.json b/tests/resolver/project-preferSrc-typeCommonjs/package.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/package.json @@ -0,0 +1 @@ +{} diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..99a819f26 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-ts.js'); +require('../outlib-onlysrc-tsx.js'); +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-js.js'); +require('../outlib-onlysrc-jsx.js'); +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-js.js'); +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-ts.js'); +require('../outlib-inboth-tsx.js'); +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-js.js'); +require('../outlib-inboth-jsx.js'); +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs new file mode 100644 index 000000000..7b09a3db7 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs @@ -0,0 +1,21 @@ +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-ts'); +require('../outlib-onlysrc-tsx'); +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-js'); +require('../outlib-onlysrc-jsx'); +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-js'); +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-ts'); +require('../outlib-inboth-tsx'); +require('../outlib-inboth-cts'); + +require('../outlib-inboth-js'); +require('../outlib-inboth-jsx'); +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..843edaece --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-ts.js'); +require('./lib-onlysrc-tsx.js'); +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-js.js'); +require('./lib-onlysrc-jsx.js'); +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-js.js'); +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-ts.js'); +require('./lib-inboth-tsx.js'); +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-js.js'); +require('./lib-inboth-jsx.js'); +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs new file mode 100644 index 000000000..5dab2b7e1 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs @@ -0,0 +1,21 @@ +require('./lib-onlysrc-js'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-ts'); +require('./lib-onlysrc-tsx'); +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-js'); +require('./lib-onlysrc-jsx'); +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-js'); +require('./lib-onlyout-cjs'); + +require('./lib-inboth-ts'); +require('./lib-inboth-tsx'); +require('./lib-inboth-cts'); + +require('./lib-inboth-js'); +require('./lib-inboth-jsx'); +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json b/tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json new file mode 100644 index 000000000..4c1ddab98 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs new file mode 100644 index 000000000..593b8a42b --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlysrc-ts'); +await import('../srclib-onlysrc-tsx'); +await import('../srclib-onlysrc-cts'); +await import('../srclib-onlysrc-mts'); +await import('../srclib-onlysrc-js'); +await import('../srclib-onlysrc-jsx'); +await import('../srclib-onlysrc-cjs'); +await import('../srclib-onlysrc-mjs'); +await import('../srclib-onlyout-js'); +await import('../srclib-onlyout-cjs'); +await import('../srclib-onlyout-mjs'); +await import('../srclib-inboth-ts'); +await import('../srclib-inboth-tsx'); +await import('../srclib-inboth-cts'); +await import('../srclib-inboth-mts'); +await import('../srclib-inboth-js'); +await import('../srclib-inboth-jsx'); +await import('../srclib-inboth-cjs'); +await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/package.json b/tests/resolver/project-preferSrc-typeModule-esrn/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs new file mode 100644 index 000000000..1c5ec6053 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlysrc-ts'); +await import('../outlib-onlysrc-tsx'); +await import('../outlib-onlysrc-cts'); +await import('../outlib-onlysrc-mts'); +await import('../outlib-onlysrc-js'); +await import('../outlib-onlysrc-jsx'); +await import('../outlib-onlysrc-cjs'); +await import('../outlib-onlysrc-mjs'); +await import('../outlib-onlyout-js'); +await import('../outlib-onlyout-cjs'); +await import('../outlib-onlyout-mjs'); +await import('../outlib-inboth-ts'); +await import('../outlib-inboth-tsx'); +await import('../outlib-inboth-cts'); +await import('../outlib-inboth-mts'); +await import('../outlib-inboth-js'); +await import('../outlib-inboth-jsx'); +await import('../outlib-inboth-cjs'); +await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs new file mode 100644 index 000000000..31aad0fcc --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlysrc-ts'); +await import('./lib-onlysrc-tsx'); +await import('./lib-onlysrc-cts'); +await import('./lib-onlysrc-mts'); +await import('./lib-onlysrc-js'); +await import('./lib-onlysrc-jsx'); +await import('./lib-onlysrc-cjs'); +await import('./lib-onlysrc-mjs'); +await import('./lib-onlyout-js'); +await import('./lib-onlyout-cjs'); +await import('./lib-onlyout-mjs'); +await import('./lib-inboth-ts'); +await import('./lib-inboth-tsx'); +await import('./lib-inboth-cts'); +await import('./lib-inboth-mts'); +await import('./lib-inboth-js'); +await import('./lib-inboth-jsx'); +await import('./lib-inboth-cjs'); +await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json b/tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json new file mode 100644 index 000000000..4c1ddab98 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs new file mode 100644 index 000000000..2c90325c0 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlysrc-cts.cjs'); + +require('../srclib-onlysrc-cjs.cjs'); + +require('../srclib-onlyout-cjs.cjs'); + +require('../srclib-inboth-cts.cjs'); + +require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs new file mode 100644 index 000000000..3b2e86d95 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlysrc-ts.js'); +await import('../srclib-onlysrc-tsx.js'); +await import('../srclib-onlysrc-cts.cjs'); +await import('../srclib-onlysrc-mts.mjs'); +await import('../srclib-onlysrc-js.js'); +await import('../srclib-onlysrc-jsx.js'); +await import('../srclib-onlysrc-cjs.cjs'); +await import('../srclib-onlysrc-mjs.mjs'); +await import('../srclib-onlyout-js.js'); +await import('../srclib-onlyout-cjs.cjs'); +await import('../srclib-onlyout-mjs.mjs'); +await import('../srclib-inboth-ts.js'); +await import('../srclib-inboth-tsx.js'); +await import('../srclib-inboth-cts.cjs'); +await import('../srclib-inboth-mts.mjs'); +await import('../srclib-inboth-js.js'); +await import('../srclib-inboth-jsx.js'); +await import('../srclib-inboth-cjs.cjs'); +await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs new file mode 100644 index 000000000..a97ef19c8 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs @@ -0,0 +1,11 @@ +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlysrc-cts'); + +require('../srclib-onlysrc-cjs'); + +require('../srclib-onlyout-cjs'); + +require('../srclib-inboth-cts'); + +require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs new file mode 100644 index 000000000..f37e13a11 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/package.json b/tests/resolver/project-preferSrc-typeModule/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs new file mode 100644 index 000000000..f23e300de --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlysrc-cts.cjs'); + +require('../outlib-onlysrc-cjs.cjs'); + +require('../outlib-onlyout-cjs.cjs'); + +require('../outlib-inboth-cts.cjs'); + +require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs new file mode 100644 index 000000000..36a292107 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs @@ -0,0 +1,22 @@ +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlysrc-ts.js'); +await import('../outlib-onlysrc-tsx.js'); +await import('../outlib-onlysrc-cts.cjs'); +await import('../outlib-onlysrc-mts.mjs'); +await import('../outlib-onlysrc-js.js'); +await import('../outlib-onlysrc-jsx.js'); +await import('../outlib-onlysrc-cjs.cjs'); +await import('../outlib-onlysrc-mjs.mjs'); +await import('../outlib-onlyout-js.js'); +await import('../outlib-onlyout-cjs.cjs'); +await import('../outlib-onlyout-mjs.mjs'); +await import('../outlib-inboth-ts.js'); +await import('../outlib-inboth-tsx.js'); +await import('../outlib-inboth-cts.cjs'); +await import('../outlib-inboth-mts.mjs'); +await import('../outlib-inboth-js.js'); +await import('../outlib-inboth-jsx.js'); +await import('../outlib-inboth-cjs.cjs'); +await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs new file mode 100644 index 000000000..ee4dd75be --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs @@ -0,0 +1,11 @@ +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlysrc-cts'); + +require('../outlib-onlysrc-cjs'); + +require('../outlib-onlyout-cjs'); + +require('../outlib-inboth-cts'); + +require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs new file mode 100644 index 000000000..8adbcdb15 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlysrc-cts.cjs'); + +require('./lib-onlysrc-cjs.cjs'); + +require('./lib-onlyout-cjs.cjs'); + +require('./lib-inboth-cts.cjs'); + +require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs new file mode 100644 index 000000000..1a5eda75f --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs @@ -0,0 +1,22 @@ +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlysrc-ts.js'); +await import('./lib-onlysrc-tsx.js'); +await import('./lib-onlysrc-cts.cjs'); +await import('./lib-onlysrc-mts.mjs'); +await import('./lib-onlysrc-js.js'); +await import('./lib-onlysrc-jsx.js'); +await import('./lib-onlysrc-cjs.cjs'); +await import('./lib-onlysrc-mjs.mjs'); +await import('./lib-onlyout-js.js'); +await import('./lib-onlyout-cjs.cjs'); +await import('./lib-onlyout-mjs.mjs'); +await import('./lib-inboth-ts.js'); +await import('./lib-inboth-tsx.js'); +await import('./lib-inboth-cts.cjs'); +await import('./lib-inboth-mts.mjs'); +await import('./lib-inboth-js.js'); +await import('./lib-inboth-jsx.js'); +await import('./lib-inboth-cjs.cjs'); +await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs new file mode 100644 index 000000000..749271d59 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs @@ -0,0 +1,11 @@ +require('./lib-onlysrc-cjs'); + +require('./lib-onlysrc-cts'); + +require('./lib-onlysrc-cjs'); + +require('./lib-onlyout-cjs'); + +require('./lib-inboth-cts'); + +require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx new file mode 100644 index 000000000..928b95cf9 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx @@ -0,0 +1 @@ +console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/tsconfig.json b/tests/resolver/project-preferSrc-typeModule/tsconfig.json new file mode 100644 index 000000000..4c1ddab98 --- /dev/null +++ b/tests/resolver/project-preferSrc-typeModule/tsconfig.json @@ -0,0 +1,11 @@ +{ + "ts-node": { + "experimentalResolver": true, + "preferSrc": true, + "transpileOnly": true + }, + "compilerOptions": { + "allowJs": false, + "skipLibCheck": true + } +} diff --git a/tests/resolver/test.sh b/tests/resolver/test.sh new file mode 100644 index 000000000..a30080e33 --- /dev/null +++ b/tests/resolver/test.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd project-preferSrc-typeModule From 8782c3f3de8a761878f3c17b19bd7fe1b6e6fd94 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 8 May 2022 22:02:12 +0000 Subject: [PATCH 06/30] update --- dist-raw/node-internal-errors.js | 7 +- dist-raw/node-internal-modules-cjs-loader.js | 31 ++- package-lock.json | 37 ++- package.json | 2 +- src/configuration.ts | 47 ++-- src/test/exec-helpers.ts | 1 + src/test/fs-helpers.ts | 102 ++++++++ src/test/helpers.ts | 2 +- src/test/resolver.spec.ts | 220 ++++++++++++++++++ src/ts-compiler-types.ts | 12 +- tests/.gitignore | 1 + tests/resolver/generate-tests.ts | 178 -------------- .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../project-preferOut-typeModule/package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 21 -- .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 21 -- .../out/index-out-to-src-withext.cjs | 21 -- .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 21 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 1 - .../src/index-src-to-out-withext.cjs | 21 -- .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 21 -- .../src/index-src-to-src-withext.cjs | 21 -- .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 21 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-out.mjs | 22 -- .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/index-out-to-src.mjs | 22 -- .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-out.mjs | 22 -- .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/index-src-to-src.mjs | 22 -- .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - .../out/index-out-to-out-withext.cjs | 11 - .../out/index-out-to-out-withext.mjs | 22 -- .../out/index-out-to-out.cjs | 11 - .../out/index-out-to-src-withext.cjs | 11 - .../out/index-out-to-src-withext.mjs | 22 -- .../out/index-out-to-src.cjs | 11 - .../out/lib-inboth-cjs.cjs | 1 - .../out/lib-inboth-cts.cjs | 1 - .../out/lib-inboth-js.js | 1 - .../out/lib-inboth-jsx.js | 1 - .../out/lib-inboth-mjs.mjs | 1 - .../out/lib-inboth-mts.mjs | 1 - .../out/lib-inboth-ts.js | 1 - .../out/lib-inboth-tsx.js | 1 - .../out/lib-onlyout-cjs.cjs | 1 - .../out/lib-onlyout-js.js | 1 - .../out/lib-onlyout-mjs.mjs | 1 - .../project-preferSrc-typeModule/package.json | 3 - .../src/index-src-to-out-withext.cjs | 11 - .../src/index-src-to-out-withext.mjs | 22 -- .../src/index-src-to-out.cjs | 11 - .../src/index-src-to-src-withext.cjs | 11 - .../src/index-src-to-src-withext.mjs | 22 -- .../src/index-src-to-src.cjs | 11 - .../src/lib-inboth-cjs.cjs | 1 - .../src/lib-inboth-cts.cts | 1 - .../src/lib-inboth-js.js | 1 - .../src/lib-inboth-jsx.jsx | 1 - .../src/lib-inboth-mjs.mjs | 1 - .../src/lib-inboth-mts.mts | 1 - .../src/lib-inboth-ts.ts | 1 - .../src/lib-inboth-tsx.tsx | 1 - .../src/lib-onlysrc-cjs.cjs | 1 - .../src/lib-onlysrc-cts.cts | 1 - .../src/lib-onlysrc-js.js | 1 - .../src/lib-onlysrc-jsx.jsx | 1 - .../src/lib-onlysrc-mjs.mjs | 1 - .../src/lib-onlysrc-mts.mts | 1 - .../src/lib-onlysrc-ts.ts | 1 - .../src/lib-onlysrc-tsx.tsx | 1 - .../tsconfig.json | 11 - 700 files changed, 414 insertions(+), 5026 deletions(-) create mode 100644 src/test/fs-helpers.ts create mode 100755 src/test/resolver.spec.ts delete mode 100755 tests/resolver/generate-tests.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/package.json delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/package.json delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/package.json delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/package.json delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeCommonjs/tsconfig.json delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/package.json delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json delete mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/package.json delete mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferOut-typeModule/tsconfig.json delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/package.json delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/package.json delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/package.json delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts delete mode 100644 tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx delete mode 100644 tests/resolver/project-preferSrc-typeModule/tsconfig.json diff --git a/dist-raw/node-internal-errors.js b/dist-raw/node-internal-errors.js index 244d32505..624a142f5 100644 --- a/dist-raw/node-internal-errors.js +++ b/dist-raw/node-internal-errors.js @@ -3,7 +3,12 @@ const path = require('path'); module.exports = { - createErrRequireEsm + createErrRequireEsm, + codes: { + // TODO + ERR_INVALID_MODULE_SPECIFIER: class ERR_INVALID_MODULE_SPECIFIER extends Error { + } + } }; // Native ERR_REQUIRE_ESM Error is declared here: diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 4a1f41386..99d3bbb66 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -45,13 +45,6 @@ const { } = require('./node-internal-constants'); -function createCjsLoader(nodeInternalModulesEsmResolver) { -const { - encodedSepRegEx, - packageExportsResolve, - // packageImportsResolve -} = nodeInternalModulesEsmResolver; - let statCache = null; function stat(filename) { @@ -68,8 +61,6 @@ function stat(filename) { return result; } - - // Copied from https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js#L249 const packageJsonCache = new SafeMap(); @@ -122,6 +113,13 @@ function readPackageScope(checkPath) { return false; } +function createCjsLoader(nodeInternalModulesEsmResolver) { +const { + encodedSepRegEx, + packageExportsResolve, + // packageImportsResolve +} = nodeInternalModulesEsmResolver; + function tryPackage(requestPath, exts, isMain, originalPath) { const pkg = readPackage(requestPath)?.main; @@ -517,6 +515,12 @@ function createEsmNotFoundErr(request, path) { // return err; // } +return { + Module_findPath +} + +} + /** * copied from Module._extensions['.js'] * https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L1113-L1120 @@ -539,13 +543,8 @@ function assertScriptCanLoadAsCJSImpl(service, module, filename) { } } -return { - assertScriptCanLoadAsCJSImpl, - Module_findPath -} - -} module.exports = { - createCjsLoader + createCjsLoader, + assertScriptCanLoadAsCJSImpl }; diff --git a/package-lock.json b/package-lock.json index bb969e51a..e19a808ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -858,6 +858,12 @@ "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", "dev": true }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true + }, "@types/proper-lockfile": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/@types/proper-lockfile/-/proper-lockfile-4.1.2.tgz", @@ -874,10 +880,15 @@ "dev": true }, "@types/react": { - "version": "16.0.31", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.31.tgz", - "integrity": "sha512-ft7OuDGUo39e+9LGwUewf2RyEaNBOjWbHUmD5bzjNuSuDabccE/1IuO7iR0dkzLjVUKxTMq69E+FmKfbgBcfbQ==", - "dev": true + "version": "16.14.26", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.26.tgz", + "integrity": "sha512-c/5CYyciOO4XdFcNhZW1O2woVx86k4T+DO2RorHZL7EhitkNQgSD/SgpdZJAUJa/qjVgOmTM44gHkAdZSXeQuQ==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } }, "@types/retry": { "version": "0.12.1", @@ -895,6 +906,12 @@ "@types/node": "*" } }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, "@types/semver": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.1.0.tgz", @@ -1887,6 +1904,12 @@ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, + "csstype": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz", + "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==", + "dev": true + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -4616,9 +4639,9 @@ } }, "typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true }, "typescript-json-schema": { diff --git a/package.json b/package.json index 948e93f25..e48b8f3ae 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "semver": "^7.1.3", "throat": "^6.0.1", "typedoc": "^0.22.10", - "typescript": "4.6.3", + "typescript": "4.6.4", "typescript-json-schema": "^0.53.0", "util.promisify": "^1.0.1" }, diff --git a/src/configuration.ts b/src/configuration.ts index d93456f36..d44b0ffc7 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -424,24 +424,31 @@ export const ComputeAsCommonRootOfFiles = Symbol(); * This function centralizes the logic for computing those defaults. * @internal */ -export function getTsConfigDefaults(config: _ts.ParsedCommandLine, basePath: string, _files: string[] | undefined, _include: string[] | undefined, _exclude: string[] | undefined) { - const {composite = false} = config.options; - let rootDir: string | typeof ComputeAsCommonRootOfFiles = config.options.rootDir!; - if(rootDir == null) { - if(composite) rootDir = basePath; - // Return this symbol to avoid computing from `files`, which would require fs calls - else rootDir = ComputeAsCommonRootOfFiles; - } - const {outDir = rootDir} = config.options; - // Docs are wrong: https://www.typescriptlang.org/tsconfig#include - // Docs say **, but it's actually **/*; compiler throws error for ** - const include = _files ? [] : ['**/*']; - const files = _files ?? []; - // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude - // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of "include" - const exclude = _exclude ?? [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern? - - // TODO compute baseUrl - - return {rootDir, outDir, include, files, exclude, composite}; +export function getTsConfigDefaults( + config: _ts.ParsedCommandLine, + basePath: string, + _files: string[] | undefined, + _include: string[] | undefined, + _exclude: string[] | undefined +) { + const { composite = false } = config.options; + let rootDir: string | typeof ComputeAsCommonRootOfFiles = + config.options.rootDir!; + if (rootDir == null) { + if (composite) rootDir = basePath; + // Return this symbol to avoid computing from `files`, which would require fs calls + else rootDir = ComputeAsCommonRootOfFiles; + } + const { outDir = rootDir } = config.options; + // Docs are wrong: https://www.typescriptlang.org/tsconfig#include + // Docs say **, but it's actually **/*; compiler throws error for ** + const include = _files ? [] : ['**/*']; + const files = _files ?? []; + // Docs are misleading: https://www.typescriptlang.org/tsconfig#exclude + // Docs say it excludes node_modules, bower_components, jspm_packages, but actually those are excluded via behavior of "include" + const exclude = _exclude ?? [outDir]; // TODO technically, outDir is absolute path, but exclude should be relative glob pattern? + + // TODO compute baseUrl + + return { rootDir, outDir, include, files, exclude, composite }; } diff --git a/src/test/exec-helpers.ts b/src/test/exec-helpers.ts index bf0766475..c98c4c7ba 100644 --- a/src/test/exec-helpers.ts +++ b/src/test/exec-helpers.ts @@ -100,6 +100,7 @@ export function createSpawn>( } const defaultExec = createExec(); +export { defaultExec as exec }; export interface ExecTesterOptions { cmd: string; diff --git a/src/test/fs-helpers.ts b/src/test/fs-helpers.ts new file mode 100644 index 000000000..80b460f46 --- /dev/null +++ b/src/test/fs-helpers.ts @@ -0,0 +1,102 @@ +import { TEST_DIR } from './helpers'; +import * as fs from 'fs'; +import * as Path from 'path'; + +// Helpers to describe a bunch of files in a project programmatically, +// then write them to disk in a temp directory. + +export interface File { + path: string; + content: string; +} +export interface JsonFile extends File { + obj: T; +} +export interface DirectoryApi { + add(file: File): File; + addFile(...args: Parameters): File; + addJsonFile(...args: Parameters): JsonFile; + dir(dirPath: string, cb?: (dir: DirectoryApi) => void): DirectoryApi; +} + +export type ProjectAPI = ReturnType; + +export function file(path: string, content = '') { + return { path, content }; +} +export function jsonFile(path: string, obj: T) { + const file: JsonFile = { + path, + obj, + get content() { + return JSON.stringify(obj, null, 2); + }, + }; + return file; +} + +export function tempdirProject(name = '') { + const rootTmpDir = `${TEST_DIR}/tmp/`; + fs.mkdirSync(rootTmpDir, { recursive: true }); + const tmpdir = fs.mkdtempSync(`${TEST_DIR}/tmp/${name}`); + return projectInternal(tmpdir); +} + +export function project(name: string) { + return projectInternal(`${TEST_DIR}/tmp/${name}`); +} + +function projectInternal(cwd: string) { + const files: File[] = []; + function write() { + for (const file of files) { + fs.mkdirSync(Path.dirname(file.path), { recursive: true }); + fs.writeFileSync(file.path, file.content); + } + } + function rm() { + try { + fs.rmdirSync(cwd, { recursive: true }); + } catch (err) { + if (fs.existsSync(cwd)) throw err; + } + } + const { add, addFile, addJsonFile, dir } = createDirectory(cwd); + function createDirectory( + dirPath: string, + cb?: (dir: DirectoryApi) => void + ): DirectoryApi { + function add(file: File) { + file.path = Path.join(dirPath, file.path); + files.push(file); + return file; + } + function addFile(...args: Parameters) { + return add(file(...args)); + } + function addJsonFile(...args: Parameters) { + return add(jsonFile(...args)) as JsonFile; + } + function dir(path: string, cb?: (dir: DirectoryApi) => void) { + return createDirectory(Path.join(dirPath, path), cb); + } + const _dir: DirectoryApi = { + add, + addFile, + addJsonFile, + dir, + }; + cb?.(_dir); + return _dir; + } + return { + cwd, + files: [], + dir, + add, + addFile, + addJsonFile, + write, + rm, + }; +} diff --git a/src/test/helpers.ts b/src/test/helpers.ts index 5856959f4..d9a85895a 100644 --- a/src/test/helpers.ts +++ b/src/test/helpers.ts @@ -233,7 +233,7 @@ export function resetNodeEnvironment() { // source-map-support swaps out the prepareStackTrace function resetObject(Error, defaultError); - // _resolveFilename is modified by tsconfig-paths, future versions of source-map-support, and maybe future versions of ts-node + // _resolveFilename et.al. are modified by ts-node, tsconfig-paths, source-map-support, yarn, maybe other things? resetObject(require('module'), defaultModule); // May be modified by REPL tests, since the REPL sets globals. diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts new file mode 100755 index 000000000..26777ec97 --- /dev/null +++ b/src/test/resolver.spec.ts @@ -0,0 +1,220 @@ +import { context } from './testlib'; +import { ctxTsNode, resetNodeEnvironment } from './helpers'; +import { project } from './fs-helpers'; +import { join } from 'path'; + +const test = context(ctxTsNode); +test.suite('Resolver hooks', (test) => { + test.runSerially(); + + /* + * Each test case is a separate TS project, with a different permutation of + * project options. The project is written to disc, then ts-node is installed, + * then several index-* files are imported to test our resolver. + * + * High-level structure of these tests: + * package.json, tsconfig.json, src/, and out/ + * index-* files are the entrypoints + * they import a bunch of lib-* files + * + * The heart of this test is every time an index-* imports a lib-*. + * We are testing if the resolver figures out the correct lib-* file to import. + */ + for (const allowJs of [false, true]) { + for (const preferSrc of [false, true]) { + for (const typeModule of [false, true]) { + for (const experimentalSpecifierResolutionNode of [false, true]) { + const projectName = `resolver-${ + preferSrc ? 'preferSrc' : 'preferOut' + }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ + allowJs ? '-allowJs' : '' + }${ + experimentalSpecifierResolutionNode + ? '-experimentalSpecifierResolutionNode' + : '' + }`; + + test(`${projectName}`, async (t) => { + t.teardown(() => { + resetNodeEnvironment(); + }); + + const p = project(projectName); + p.rm(); + + p.addJsonFile('package.json', { + type: typeModule ? 'module' : undefined, + }); + p.addJsonFile('tsconfig.json', { + 'ts-node': { + experimentalResolver: true, + preferSrc, + transpileOnly: true, + }, + compilerOptions: { + allowJs, + skipLibCheck: true, + }, + }); + const outDir = p.dir('out'); + const srcDir = p.dir('src'); + + // + // Generate all lib-* files + // + + /** Array of outDir names, including extension */ + const libFiles: string[] = []; + // TODO does allowJs matter? + for (const inOut of [false, true]) { + for (const inSrc of [false, true]) { + // Don't bother with src-only extensions when only emitting to `out` + for (const srcExt of inSrc + ? ['ts', 'tsx', 'cts', 'mts', 'js', 'jsx', 'cjs', 'mjs'] + : ['js', 'cjs', 'mjs']) { + const outExt = srcExt.replace('ts', 'js').replace('x', ''); + const basename = `lib-${ + inOut && inSrc ? 'inboth' : inOut ? 'onlyout' : 'onlysrc' + }-${srcExt}`; + const srcName = `${basename}.${srcExt}`; + const outName = `${basename}.${outExt}`; + libFiles.push(outName); + if (inOut) { + outDir.addFile( + outName, + String.raw`console.log(__filename.replace(/.*[\\\/]/, ''), 'out');` + ); + } + if (inSrc) { + srcDir.addFile( + srcName, + String.raw`console.log(__filename.replace(/.*[\\\/]/, ''), 'src');` + ); + } + } + } + } + + // + // Generate all index-* files + // + + /** Array of index files to be imported during the test */ + let indexFiles: string[] = []; + for (const indexExt of ['cjs', 'mjs'] as const) { + for (const withExt of indexExt == 'mjs' && + experimentalSpecifierResolutionNode === false + ? [true] + : [false, true]) { + for (const indexLocation of ['src', 'out'] as const) { + for (const indexTarget of ['src', 'out'] as const) { + if (indexLocation !== indexTarget) continue; + + const indexFilename = `index-${indexLocation}-to-${indexTarget}${ + withExt ? '-withext' : '' + }.${indexExt}`; + let indexContent = ''; + + indexFiles.push(indexLocation + '/' + indexFilename); + for (const libFile of libFiles) { + const libFileExt = libFile.match(/\.(.*)$/)![1]; + const libFileIsMjs = + (typeModule && libFileExt === 'js') || + libFileExt === 'mjs'; + + let specifier = + indexTarget === indexLocation + ? './' + : `../${indexTarget}/`; + specifier += withExt + ? libFile + : libFile.replace(/\..+$/, ''); + + // Do not try to import mjs from cjs + if (libFileIsMjs && indexExt === 'cjs') { + indexContent += `// skipping ${specifier} because we cannot import mjs from cjs\n`; + continue; + } + + // Do not try to import mjs or cjs without extension; node always requires these extensions, even in CommonJS. + if ( + !withExt && + (libFileExt === 'cjs' || libFileExt === 'mjs') + ) { + indexContent += `// skipping ${specifier} because we cannot omit extension from cjs or mjs files; node always requires them\n`; + continue; + } + + indexContent += + indexExt === 'cjs' + ? `require('${specifier}');\n` + : `await import('${specifier}');\n`; + } + p.dir(indexLocation).addFile(indexFilename, indexContent); + } + } + } + } + p.write(); + + // + // Install ts-node and try to import all the index-* files + // + + t.context.tsNodeUnderTest.register({ + projectSearchDir: p.cwd, + }); + + for (const indexFile of indexFiles) { + await import(join(p.cwd, indexFile)); + } + }); + } + } + } + } +}); + +// Test a bunch of permutations of: + +// config permutations: + +// - allowJs +// - not allowJs + +// - preferSrc +// - not preferSrc + +// import permutations: + +// - Relative import of file +// - Relative import of index +// - rootless library import of main +// - rootless library import of index +// - rootless library import of exports sub-path +// - rootless self-import of main +// - rootless self-import of index +// - rootless self-import of exports sub-path + +// - Require with extension +// - Require without extension + +// - Require from dist to dist +// - Require from dist to src +// - Require from src to dist +// - Require from src to src + +// lib permutations: + +// - module exists in both src and dist (precompilation ran) +// - module exists in only dist (came from elsewhere) +// - module exists only in src (did not precompile) + +// - .ts / .js extension +// - .tsx / .js extension +// - .cts / .cjs extension +// - .mts / .mjs extension +// - .js / .js extension +// - .jsx / .js extension +// - .cjs / .cjs extension +// - .mjs / .mjs extension diff --git a/src/ts-compiler-types.ts b/src/ts-compiler-types.ts index 5ddff6603..9c9d180d4 100644 --- a/src/ts-compiler-types.ts +++ b/src/ts-compiler-types.ts @@ -113,8 +113,16 @@ export interface TSInternal { containingFileMode: _ts.SourceFile['impliedNodeFormat'] ) => _ts.SourceFile['impliedNodeFormat']; // TODO do we need these? Which TS version adds them? - getPatternFromSpec(spec: string, basePath: string, usage: "files" | "directories" | "exclude"): string | undefined; - getRegularExpressionForWildcard(specs: readonly string[] | undefined, basePath: string, usage: "files" | "directories" | "exclude"): string | undefined; + getPatternFromSpec( + spec: string, + basePath: string, + usage: 'files' | 'directories' | 'exclude' + ): string | undefined; + getRegularExpressionForWildcard( + specs: readonly string[] | undefined, + basePath: string, + usage: 'files' | 'directories' | 'exclude' + ): string | undefined; } /** @internal */ export namespace TSInternal { diff --git a/tests/.gitignore b/tests/.gitignore index 1f16711ae..405b1ced6 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,3 +1,4 @@ !from-node-modules/node_modules/ package-lock.json ts-node-packed.tgz +/tmp \ No newline at end of file diff --git a/tests/resolver/generate-tests.ts b/tests/resolver/generate-tests.ts deleted file mode 100755 index 59920c6f2..000000000 --- a/tests/resolver/generate-tests.ts +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env ts-node - -import * as Path from 'path'; -import * as fs from 'fs'; - -for (const allowJs of [false, true]) { - for (const preferSrc of [false, true]) { - for (const typeModule of [false, true]) { - for (const experimentalSpecifierResolutionNode of [false, true]) { - const projectName = `project${allowJs ? '-allowJs' : ''}-${ - preferSrc ? 'preferSrc' : 'preferOut' - }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ - experimentalSpecifierResolutionNode ? '-esrn' : '' - }`; - const projectDir = Path.join(__dirname, projectName); - if (fs.existsSync(projectDir)) { - fs.rmdirSync(projectDir, { - recursive: true, - }); - } - fs.mkdirSync(Path.join(projectDir, 'src'), { - recursive: true, - }); - fs.mkdirSync(Path.join(projectDir, 'out'), { - recursive: true, - }); - - fs.writeFileSync( - Path.join(projectDir, 'package.json'), - JSON.stringify( - { - type: typeModule ? 'module' : undefined, - }, - null, - 2 - ) - ); - fs.writeFileSync( - Path.join(projectDir, 'tsconfig.json'), - JSON.stringify( - { - 'ts-node': { - experimentalResolver: true, - preferSrc, - transpileOnly: true, - }, - compilerOptions: { - allowJs, - skipLibCheck: true, - }, - }, - null, - 2 - ) - ); - - /** Array of outDir names, including extension */ - const libFiles: string[] = []; - // TODO does allowJs matter? - for (const inOut of [false, true]) { - for (const inSrc of [false, true]) { - // Don't bother with src-only extensions when only emitting to `out` - for (const srcExt of inSrc - ? ['ts', 'tsx', 'cts', 'mts', 'js', 'jsx', 'cjs', 'mjs'] - : ['js', 'cjs', 'mjs']) { - const outExt = srcExt.replace('ts', 'js').replace('x', ''); - const basename = `lib-${ - inOut && inSrc ? 'inboth' : inOut ? 'onlyout' : 'onlysrc' - }-${srcExt}`; - const srcName = `${basename}.${srcExt}`; - const outName = `${basename}.${outExt}`; - libFiles.push(outName); - if (inOut) { - fs.writeFileSync( - Path.join(projectDir, 'out', outName), - String.raw` - console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); - ` - ); - } - if (inSrc) { - fs.writeFileSync( - Path.join(projectDir, 'src', srcName), - String.raw` - console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); - ` - ); - } - } - } - } - for (const indexExt of ['cjs', 'mjs'] as const) { - for (const withExt of indexExt == 'mjs' && - experimentalSpecifierResolutionNode === false - ? [true] - : [false, true]) { - for (const indexLocation of ['src', 'out'] as const) { - for (const indexTarget of ['src', 'out'] as const) { - const indexFilename = `index-${indexLocation}-to-${indexTarget}${ - withExt ? '-withext' : '' - }.${indexExt}`; - fs.writeFileSync( - Path.join(projectDir, indexLocation, indexFilename), - ` - ${libFiles - .map((libFile) => { - const libFileExt = libFile.match(/\.(.*)$/)![1]; - const libFileIsMjs = - (typeModule && libFileExt === 'js') || - libFileExt === 'mjs'; - // Do not try to import mjs from cjs - if (libFileIsMjs && indexExt === 'cjs') return ''; - const specifier = `${ - indexTarget === indexLocation - ? './' - : `../${indexTarget}` - }${withExt ? libFile : libFile.replace(/\..+$/, '')}`; - return `${ - indexExt === 'cjs' - ? `require('${specifier}');` - : `await import('${specifier}');` - }`; - }) - .join('\n')} - ` - ); - } - } - } - } - } - } - } -} - -// Test a bunch of permutations of: - -// config permutations: - -// - allowJs -// - not allowJs - -// - preferSrc -// - not preferSrc - -// import permutations: - -// - Relative import of file -// - Relative import of index -// - rootless library import of main -// - rootless library import of index -// - rootless library import of exports sub-path -// - rootless self-import of main -// - rootless self-import of index -// - rootless self-import of exports sub-path - -// - Require with extension -// - Require without extension - -// - Require from dist to dist -// - Require from dist to src -// - Require from src to dist -// - Require from src to src - -// lib permutations: - -// - module exists in both src and dist (precompilation ran) -// - module exists in only dist (came from elsewhere) -// - module exists only in src (did not precompile) - -// - .ts / .js extension -// - .tsx / .js extension -// - .cts / .cjs extension -// - .mts / .mjs extension -// - .js / .js extension -// - .jsx / .js extension -// - .cjs / .cjs extension -// - .mjs / .mjs extension diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json deleted file mode 100644 index 845f4c74b..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json deleted file mode 100644 index 845f4c74b..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeCommonjs/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json deleted file mode 100644 index 845f4c74b..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/package.json b/tests/resolver/project-allowJs-preferOut-typeModule/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json b/tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json deleted file mode 100644 index 845f4c74b..000000000 --- a/tests/resolver/project-allowJs-preferOut-typeModule/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json deleted file mode 100644 index a27a51d74..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json deleted file mode 100644 index a27a51d74..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeCommonjs/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json deleted file mode 100644 index a27a51d74..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/package.json b/tests/resolver/project-allowJs-preferSrc-typeModule/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json b/tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json deleted file mode 100644 index a27a51d74..000000000 --- a/tests/resolver/project-allowJs-preferSrc-typeModule/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": true, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/package.json b/tests/resolver/project-preferOut-typeCommonjs-esrn/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json deleted file mode 100644 index 4d0269a59..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/package.json b/tests/resolver/project-preferOut-typeCommonjs/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeCommonjs/tsconfig.json b/tests/resolver/project-preferOut-typeCommonjs/tsconfig.json deleted file mode 100644 index 4d0269a59..000000000 --- a/tests/resolver/project-preferOut-typeCommonjs/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/package.json b/tests/resolver/project-preferOut-typeModule-esrn/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json b/tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json deleted file mode 100644 index 4d0269a59..000000000 --- a/tests/resolver/project-preferOut-typeModule-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferOut-typeModule/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferOut-typeModule/package.json b/tests/resolver/project-preferOut-typeModule/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-preferOut-typeModule/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferOut-typeModule/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferOut-typeModule/tsconfig.json b/tests/resolver/project-preferOut-typeModule/tsconfig.json deleted file mode 100644 index 4d0269a59..000000000 --- a/tests/resolver/project-preferOut-typeModule/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": false, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json b/tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json b/tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json deleted file mode 100644 index 4c1ddab98..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs deleted file mode 100644 index c384ba2ee..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-ts.js'); -require('../srclib-onlysrc-tsx.js'); -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-js.js'); -require('../srclib-onlysrc-jsx.js'); -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-js.js'); -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-ts.js'); -require('../srclib-inboth-tsx.js'); -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-js.js'); -require('../srclib-inboth-jsx.js'); -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs deleted file mode 100644 index 194c2b161..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/index-out-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-ts'); -require('../srclib-onlysrc-tsx'); -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-js'); -require('../srclib-onlysrc-jsx'); -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-js'); -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-ts'); -require('../srclib-inboth-tsx'); -require('../srclib-inboth-cts'); - -require('../srclib-inboth-js'); -require('../srclib-inboth-jsx'); -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/package.json b/tests/resolver/project-preferSrc-typeCommonjs/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs deleted file mode 100644 index 99a819f26..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-ts.js'); -require('../outlib-onlysrc-tsx.js'); -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-js.js'); -require('../outlib-onlysrc-jsx.js'); -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-js.js'); -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-ts.js'); -require('../outlib-inboth-tsx.js'); -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-js.js'); -require('../outlib-inboth-jsx.js'); -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs deleted file mode 100644 index 7b09a3db7..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-out.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-ts'); -require('../outlib-onlysrc-tsx'); -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-js'); -require('../outlib-onlysrc-jsx'); -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-js'); -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-ts'); -require('../outlib-inboth-tsx'); -require('../outlib-inboth-cts'); - -require('../outlib-inboth-js'); -require('../outlib-inboth-jsx'); -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs deleted file mode 100644 index 843edaece..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-ts.js'); -require('./lib-onlysrc-tsx.js'); -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-js.js'); -require('./lib-onlysrc-jsx.js'); -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-js.js'); -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-ts.js'); -require('./lib-inboth-tsx.js'); -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-js.js'); -require('./lib-inboth-jsx.js'); -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs deleted file mode 100644 index 5dab2b7e1..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/index-src-to-src.cjs +++ /dev/null @@ -1,21 +0,0 @@ -require('./lib-onlysrc-js'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-ts'); -require('./lib-onlysrc-tsx'); -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-js'); -require('./lib-onlysrc-jsx'); -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-js'); -require('./lib-onlyout-cjs'); - -require('./lib-inboth-ts'); -require('./lib-inboth-tsx'); -require('./lib-inboth-cts'); - -require('./lib-inboth-js'); -require('./lib-inboth-jsx'); -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json b/tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json deleted file mode 100644 index 4c1ddab98..000000000 --- a/tests/resolver/project-preferSrc-typeCommonjs/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs deleted file mode 100644 index 593b8a42b..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/index-out-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlysrc-ts'); -await import('../srclib-onlysrc-tsx'); -await import('../srclib-onlysrc-cts'); -await import('../srclib-onlysrc-mts'); -await import('../srclib-onlysrc-js'); -await import('../srclib-onlysrc-jsx'); -await import('../srclib-onlysrc-cjs'); -await import('../srclib-onlysrc-mjs'); -await import('../srclib-onlyout-js'); -await import('../srclib-onlyout-cjs'); -await import('../srclib-onlyout-mjs'); -await import('../srclib-inboth-ts'); -await import('../srclib-inboth-tsx'); -await import('../srclib-inboth-cts'); -await import('../srclib-inboth-mts'); -await import('../srclib-inboth-js'); -await import('../srclib-inboth-jsx'); -await import('../srclib-inboth-cjs'); -await import('../srclib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/package.json b/tests/resolver/project-preferSrc-typeModule-esrn/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs deleted file mode 100644 index 1c5ec6053..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-out.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlysrc-ts'); -await import('../outlib-onlysrc-tsx'); -await import('../outlib-onlysrc-cts'); -await import('../outlib-onlysrc-mts'); -await import('../outlib-onlysrc-js'); -await import('../outlib-onlysrc-jsx'); -await import('../outlib-onlysrc-cjs'); -await import('../outlib-onlysrc-mjs'); -await import('../outlib-onlyout-js'); -await import('../outlib-onlyout-cjs'); -await import('../outlib-onlyout-mjs'); -await import('../outlib-inboth-ts'); -await import('../outlib-inboth-tsx'); -await import('../outlib-inboth-cts'); -await import('../outlib-inboth-mts'); -await import('../outlib-inboth-js'); -await import('../outlib-inboth-jsx'); -await import('../outlib-inboth-cjs'); -await import('../outlib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs deleted file mode 100644 index 31aad0fcc..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/index-src-to-src.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlysrc-ts'); -await import('./lib-onlysrc-tsx'); -await import('./lib-onlysrc-cts'); -await import('./lib-onlysrc-mts'); -await import('./lib-onlysrc-js'); -await import('./lib-onlysrc-jsx'); -await import('./lib-onlysrc-cjs'); -await import('./lib-onlysrc-mjs'); -await import('./lib-onlyout-js'); -await import('./lib-onlyout-cjs'); -await import('./lib-onlyout-mjs'); -await import('./lib-inboth-ts'); -await import('./lib-inboth-tsx'); -await import('./lib-inboth-cts'); -await import('./lib-inboth-mts'); -await import('./lib-inboth-js'); -await import('./lib-inboth-jsx'); -await import('./lib-inboth-cjs'); -await import('./lib-inboth-mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json b/tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json deleted file mode 100644 index 4c1ddab98..000000000 --- a/tests/resolver/project-preferSrc-typeModule-esrn/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs deleted file mode 100644 index 2c90325c0..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlysrc-cts.cjs'); - -require('../srclib-onlysrc-cjs.cjs'); - -require('../srclib-onlyout-cjs.cjs'); - -require('../srclib-inboth-cts.cjs'); - -require('../srclib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs deleted file mode 100644 index 3b2e86d95..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlysrc-ts.js'); -await import('../srclib-onlysrc-tsx.js'); -await import('../srclib-onlysrc-cts.cjs'); -await import('../srclib-onlysrc-mts.mjs'); -await import('../srclib-onlysrc-js.js'); -await import('../srclib-onlysrc-jsx.js'); -await import('../srclib-onlysrc-cjs.cjs'); -await import('../srclib-onlysrc-mjs.mjs'); -await import('../srclib-onlyout-js.js'); -await import('../srclib-onlyout-cjs.cjs'); -await import('../srclib-onlyout-mjs.mjs'); -await import('../srclib-inboth-ts.js'); -await import('../srclib-inboth-tsx.js'); -await import('../srclib-inboth-cts.cjs'); -await import('../srclib-inboth-mts.mjs'); -await import('../srclib-inboth-js.js'); -await import('../srclib-inboth-jsx.js'); -await import('../srclib-inboth-cjs.cjs'); -await import('../srclib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs b/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs deleted file mode 100644 index a97ef19c8..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/index-out-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlysrc-cts'); - -require('../srclib-onlysrc-cjs'); - -require('../srclib-onlyout-cjs'); - -require('../srclib-inboth-cts'); - -require('../srclib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-jsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-mts.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js b/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-inboth-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs deleted file mode 100644 index f37e13a11..000000000 --- a/tests/resolver/project-preferSrc-typeModule/out/lib-onlyout-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'out'); diff --git a/tests/resolver/project-preferSrc-typeModule/package.json b/tests/resolver/project-preferSrc-typeModule/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/tests/resolver/project-preferSrc-typeModule/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs deleted file mode 100644 index f23e300de..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlysrc-cts.cjs'); - -require('../outlib-onlysrc-cjs.cjs'); - -require('../outlib-onlyout-cjs.cjs'); - -require('../outlib-inboth-cts.cjs'); - -require('../outlib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs deleted file mode 100644 index 36a292107..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlysrc-ts.js'); -await import('../outlib-onlysrc-tsx.js'); -await import('../outlib-onlysrc-cts.cjs'); -await import('../outlib-onlysrc-mts.mjs'); -await import('../outlib-onlysrc-js.js'); -await import('../outlib-onlysrc-jsx.js'); -await import('../outlib-onlysrc-cjs.cjs'); -await import('../outlib-onlysrc-mjs.mjs'); -await import('../outlib-onlyout-js.js'); -await import('../outlib-onlyout-cjs.cjs'); -await import('../outlib-onlyout-mjs.mjs'); -await import('../outlib-inboth-ts.js'); -await import('../outlib-inboth-tsx.js'); -await import('../outlib-inboth-cts.cjs'); -await import('../outlib-inboth-mts.mjs'); -await import('../outlib-inboth-js.js'); -await import('../outlib-inboth-jsx.js'); -await import('../outlib-inboth-cjs.cjs'); -await import('../outlib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs deleted file mode 100644 index ee4dd75be..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-out.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlysrc-cts'); - -require('../outlib-onlysrc-cjs'); - -require('../outlib-onlyout-cjs'); - -require('../outlib-inboth-cts'); - -require('../outlib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs deleted file mode 100644 index 8adbcdb15..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlysrc-cts.cjs'); - -require('./lib-onlysrc-cjs.cjs'); - -require('./lib-onlyout-cjs.cjs'); - -require('./lib-inboth-cts.cjs'); - -require('./lib-inboth-cjs.cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs deleted file mode 100644 index 1a5eda75f..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src-withext.mjs +++ /dev/null @@ -1,22 +0,0 @@ -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlysrc-ts.js'); -await import('./lib-onlysrc-tsx.js'); -await import('./lib-onlysrc-cts.cjs'); -await import('./lib-onlysrc-mts.mjs'); -await import('./lib-onlysrc-js.js'); -await import('./lib-onlysrc-jsx.js'); -await import('./lib-onlysrc-cjs.cjs'); -await import('./lib-onlysrc-mjs.mjs'); -await import('./lib-onlyout-js.js'); -await import('./lib-onlyout-cjs.cjs'); -await import('./lib-onlyout-mjs.mjs'); -await import('./lib-inboth-ts.js'); -await import('./lib-inboth-tsx.js'); -await import('./lib-inboth-cts.cjs'); -await import('./lib-inboth-mts.mjs'); -await import('./lib-inboth-js.js'); -await import('./lib-inboth-jsx.js'); -await import('./lib-inboth-cjs.cjs'); -await import('./lib-inboth-mjs.mjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs b/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs deleted file mode 100644 index 749271d59..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/index-src-to-src.cjs +++ /dev/null @@ -1,11 +0,0 @@ -require('./lib-onlysrc-cjs'); - -require('./lib-onlysrc-cts'); - -require('./lib-onlysrc-cjs'); - -require('./lib-onlyout-cjs'); - -require('./lib-inboth-cts'); - -require('./lib-inboth-cjs'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx b/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-inboth-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cjs.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-js.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-jsx.jsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mjs.mjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-mts.mts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx b/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/project-preferSrc-typeModule/src/lib-onlysrc-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/project-preferSrc-typeModule/tsconfig.json b/tests/resolver/project-preferSrc-typeModule/tsconfig.json deleted file mode 100644 index 4c1ddab98..000000000 --- a/tests/resolver/project-preferSrc-typeModule/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ts-node": { - "experimentalResolver": true, - "preferSrc": true, - "transpileOnly": true - }, - "compilerOptions": { - "allowJs": false, - "skipLibCheck": true - } -} From f6e85a351ffaa68ab57fd6c622baf959d2f4b202 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 21:58:05 -0400 Subject: [PATCH 07/30] it kinda works! --- .vscode/launch.json | 10 + ava.config.cjs | 1 + dist-raw/node-internal-fs.js | 4 + .../node-internal-modules-cjs-helpers.d.ts | 1 - dist-raw/node-internal-modules-cjs-helpers.js | 4 + dist-raw/node-internal-modules-cjs-loader.js | 275 ++----- .../node-internal-modules-esm-get_format.js | 23 +- dist-raw/node-internal-modules-esm-resolve.js | 84 +- dprint.json | 3 +- justfile | 2 +- package.json | 2 +- ...nal-modules-cjs-loader-v17.0.1-stripped.js | 776 ------------------ ...-filename-hook.ts => cjs-resolve-hooks.ts} | 6 +- src/configuration.ts | 6 +- src/esm.ts | 22 +- src/index.ts | 99 ++- src/test/fs-helpers.ts | 2 +- src/test/helpers.ts | 3 + src/test/resolver.spec.ts | 712 ++++++++++++---- src/test/test-loader.d.ts | 8 + src/test/test-loader.mjs | 16 + src/util.ts | 13 + tsconfig.build-dist-raw.json | 18 + tsconfig.build-dist.json | 18 + tsconfig.build-schema.json | 7 +- tsconfig.json | 14 +- website/docs/options.md | 2 +- 27 files changed, 911 insertions(+), 1220 deletions(-) delete mode 100644 dist-raw/node-internal-modules-cjs-helpers.d.ts rename src/{cjs-resolve-filename-hook.ts => cjs-resolve-hooks.ts} (85%) create mode 100644 src/test/test-loader.d.ts create mode 100644 src/test/test-loader.mjs create mode 100644 tsconfig.build-dist-raw.json create mode 100644 tsconfig.build-dist.json diff --git a/.vscode/launch.json b/.vscode/launch.json index 8b1ffa3f4..a41cb743b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,6 +11,16 @@ "skipFiles": [ "/**/*.js" ], + }, + { + "name": "Debug resolver tests (example)", + "type": "pwa-node", + "request": "launch", + "cwd": "${workspaceFolder}/tests/tmp/resolver-0015-preferSrc-typeModule-allowJs-experimentalSpecifierResolutionNode", + "runtimeArgs": [ + "--loader", "../../../esm.mjs" + ], + "program": "./src/entrypoint-0054-src-to-src.mjs" } ], } diff --git a/ava.config.cjs b/ava.config.cjs index b3a5904b7..acdf29ade 100644 --- a/ava.config.cjs +++ b/ava.config.cjs @@ -14,6 +14,7 @@ module.exports = { NODE_PATH: '' }, require: ['./src/test/remove-env-var-force-color.js'], + nodeArguments: ['--loader', './src/test/test-loader.mjs', '--no-warnings'], timeout: '300s', concurrency: 1, }; diff --git a/dist-raw/node-internal-fs.js b/dist-raw/node-internal-fs.js index 7bf59402b..651dcd145 100644 --- a/dist-raw/node-internal-fs.js +++ b/dist-raw/node-internal-fs.js @@ -2,6 +2,10 @@ const fs = require('fs'); // In node's core, this is implemented in C // https://github.com/nodejs/node/blob/v15.3.0/src/node_file.cc#L891-L985 +/** + * @param {string} path + * @returns {[] | [string, boolean]} + */ function internalModuleReadJSON(path) { let string try { diff --git a/dist-raw/node-internal-modules-cjs-helpers.d.ts b/dist-raw/node-internal-modules-cjs-helpers.d.ts deleted file mode 100644 index a57c2f831..000000000 --- a/dist-raw/node-internal-modules-cjs-helpers.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function addBuiltinLibsToObject(object: any): void; diff --git a/dist-raw/node-internal-modules-cjs-helpers.js b/dist-raw/node-internal-modules-cjs-helpers.js index 20bfb44f8..98c5e4671 100644 --- a/dist-raw/node-internal-modules-cjs-helpers.js +++ b/dist-raw/node-internal-modules-cjs-helpers.js @@ -3,6 +3,10 @@ const {ArrayPrototypeForEach, StringPrototypeStartsWith, ObjectPrototypeHasOwnPr exports.addBuiltinLibsToObject = addBuiltinLibsToObject; // Copied from https://github.com/nodejs/node/blob/21f5a56914a3b24ad77535ef369b93c6b1c11d18/lib/internal/modules/cjs/helpers.js#L133-L178 +/** + * @param {any} object + * @return {void} + */ function addBuiltinLibsToObject(object) { // Make built-in modules available directly (loaded lazily). const { builtinModules } = require('module').Module; diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 99d3bbb66..be9406d9c 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -1,8 +1,9 @@ -//@ts-check // Copied from several files in node's source code. // https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js // Each function and variable below must have a comment linking to the source in node's github repo. +'use strict'; + const { JSONParse, SafeMap, @@ -32,18 +33,15 @@ const {normalizeSlashes} = require('../dist/util'); const {createErrRequireEsm} = require('./node-internal-errors'); const { codes: { - // ERR_INVALID_ARG_VALUE, ERR_INVALID_MODULE_SPECIFIER, - // ERR_REQUIRE_ESM, - // ERR_UNKNOWN_BUILTIN_MODULE, }, - // setArrowMessage, } = require('./node-internal-errors'); const { CHAR_FORWARD_SLASH, } = require('./node-internal-constants'); +const Module = require('module'); let statCache = null; @@ -61,10 +59,20 @@ function stat(filename) { return result; } -// Copied from https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/modules/cjs/loader.js#L249 + +// Given a module name, and a list of paths to test, returns the first +// matching file in the following precedence. +// +// require("a.") +// -> a. +// +// require("a") +// -> a +// -> a. +// -> a/index. + const packageJsonCache = new SafeMap(); -// Copied from https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/cjs/loader.js#L275-L304 function readPackage(requestPath) { const jsonPath = path.resolve(requestPath, 'package.json'); @@ -113,12 +121,21 @@ function readPackageScope(checkPath) { return false; } -function createCjsLoader(nodeInternalModulesEsmResolver) { +/** + * @param {{ + * nodeEsmResolver: ReturnType, + * compiledExtensions: string[], + * preferTsExts + * }} opts + */ +function createCjsLoader(opts) { + // TODO don't need this if we get it from Object.keys(module.extensions) always? + const {nodeEsmResolver, compiledExtensions, preferTsExts} = opts; const { encodedSepRegEx, packageExportsResolve, // packageImportsResolve -} = nodeInternalModulesEsmResolver; +} = nodeEsmResolver; function tryPackage(requestPath, exts, isMain, originalPath) { const pkg = readPackage(requestPath)?.main; @@ -128,7 +145,8 @@ function tryPackage(requestPath, exts, isMain, originalPath) { } const filename = path.resolve(requestPath, pkg); - let actual = tryFile(filename, isMain) || + let actual = tryReplacementExtensions(filename, isMain) || + tryFile(filename, isMain) || tryExtensions(filename, exts, isMain) || tryExtensions(path.resolve(filename, 'index'), exts, isMain); if (actual === false) { @@ -181,6 +199,53 @@ function toRealPath(requestPath) { }); } +/** + * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions. + * IMPORTANT: preserve ordering according to preferTsExts; this affects resolution behavior! + */ +const extensions = Array.from(new Set([ + ...(preferTsExts ? compiledExtensions : []), + '.js', '.json', '.node', '.mjs', '.cjs', + ...compiledExtensions +])); +const replacementExtensions = { + '.js': extensions.filter(ext => ['.js', '.jsx', '.ts', '.tsx'].includes(ext)), + '.cjs': extensions.filter(ext => ['.cjs', '.cts'].includes(ext)), + '.mjs': extensions.filter(ext => ['.mjs', '.mts'].includes(ext)), +}; + +const replacableExtensionRe = /(\.(?:js|cjs|mjs))$/; + +function statReplacementExtensions(p) { + const match = p.match(replacableExtensionRe); + if (match) { + const replacementExts = replacementExtensions[match[1]]; + const pathnameWithoutExtension = p.slice(0, -match[1].length); + for (let i = 0; i < replacementExts.length; i++) { + const filename = pathnameWithoutExtension + replacementExts[i]; + const rc = stat(filename); + if (rc === 0) { + return [rc, filename]; + } + } + } + return [stat(p), p]; +} +function tryReplacementExtensions(p, isMain) { + const match = p.match(replacableExtensionRe); + if (match) { + const replacementExts = replacementExtensions[match[1]]; + const pathnameWithoutExtension = p.slice(0, -match[1].length); + for (let i = 0; i < replacementExts.length; i++) { + const filename = tryFile(pathnameWithoutExtension + replacementExts[i], isMain); + if (filename) { + return filename; + } + } + } + return false; +} + // Given a path, check if the file exists with any of the set extensions function tryExtensions(p, exts, isMain) { for (let i = 0; i < exts.length; i++) { @@ -209,7 +274,7 @@ function resolveExports(nmPath, request) { try { return finalizeEsmResolution(packageExportsResolve( pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, - cjsConditions), null, pkgPath); + cjsConditions).resolved, null, pkgPath); } catch (e) { if (e.code === 'ERR_MODULE_NOT_FOUND') throw createEsmNotFoundErr(request, pkgPath + '/package.json'); @@ -218,75 +283,6 @@ function resolveExports(nmPath, request) { } } - - - -// function trySelfParentPath(parent) { -// if (!parent) return false; - -// if (parent.filename) { -// return parent.filename; -// } else if (parent.id === '' || parent.id === 'internal/preload') { -// try { -// return process.cwd() + path.sep; -// } catch { -// return false; -// } -// } -// } - -// function trySelf(parentPath, request) { -// if (!parentPath) return false; - -// const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; -// if (!pkg || pkg.exports === undefined) return false; -// if (typeof pkg.name !== 'string') return false; - -// let expansion; -// if (request === pkg.name) { -// expansion = '.'; -// } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { -// expansion = '.' + StringPrototypeSlice(request, pkg.name.length); -// } else { -// return false; -// } - -// try { -// return finalizeEsmResolution(packageExportsResolve( -// pathToFileURL(pkgPath + '/package.json'), expansion, pkg, -// pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); -// } catch (e) { -// if (e.code === 'ERR_MODULE_NOT_FOUND') -// throw createEsmNotFoundErr(request, pkgPath + '/package.json'); -// throw e; -// } -// } - -// // This only applies to requests of a specific form: -// // 1. name/.* -// // 2. @scope/name/.* -// const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; -// function resolveExports(nmPath, request) { -// // The implementation's behavior is meant to mirror resolution in ESM. -// const { 1: name, 2: expansion = '' } = -// StringPrototypeMatch(request, EXPORTS_PATTERN) || []; -// if (!name) -// return; -// const pkgPath = path.resolve(nmPath, name); -// const pkg = readPackage(pkgPath); -// if (pkg?.exports != null) { -// try { -// return finalizeEsmResolution(packageExportsResolve( -// pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, -// cjsConditions), null, pkgPath); -// } catch (e) { -// if (e.code === 'ERR_MODULE_NOT_FOUND') -// throw createEsmNotFoundErr(request, pkgPath + '/package.json'); -// throw e; -// } -// } -// } - // Backwards compat for old node versions const hasModulePathCache = !!require('module')._pathCache; const Module_pathCache = Object.create(null); @@ -327,10 +323,10 @@ const Module_findPath = function _findPath(request, paths, isMain) { return exportsResolved; } - const basePath = path.resolve(curPath, request); + const _basePath = path.resolve(curPath, request); let filename; - const rc = stat(basePath); + const [rc, basePath] = statReplacementExtensions(_basePath); if (!trailingSlash) { if (rc === 0) { // File. if (!isMain) { @@ -383,7 +379,7 @@ function finalizeEsmResolution(resolved, parentPath, pkgPath) { throw new ERR_INVALID_MODULE_SPECIFIER( resolved, 'must not include encoded "/" or "\\" characters', parentPath); const filename = fileURLToPath(resolved); - const actual = tryFile(filename); + const actual = tryReplacementExtensions(filename) || tryFile(filename); if (actual) return actual; const err = createEsmNotFoundErr(filename, @@ -401,119 +397,6 @@ function createEsmNotFoundErr(request, path) { return err; } -// Module._resolveFilename = function(request, parent, isMain, options) { -// if (StringPrototypeStartsWith(request, 'node:') || -// NativeModule.canBeRequiredByUsers(request)) { -// return request; -// } - -// let paths; - -// if (typeof options === 'object' && options !== null) { -// if (ArrayIsArray(options.paths)) { -// const isRelative = StringPrototypeStartsWith(request, './') || -// StringPrototypeStartsWith(request, '../') || -// ((isWindows && StringPrototypeStartsWith(request, '.\\')) || -// StringPrototypeStartsWith(request, '..\\')); - -// if (isRelative) { -// paths = options.paths; -// } else { -// const fakeParent = new Module('', null); - -// paths = []; - -// for (let i = 0; i < options.paths.length; i++) { -// const path = options.paths[i]; -// fakeParent.paths = Module._nodeModulePaths(path); -// const lookupPaths = Module._resolveLookupPaths(request, fakeParent); - -// for (let j = 0; j < lookupPaths.length; j++) { -// if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) -// ArrayPrototypePush(paths, lookupPaths[j]); -// } -// } -// } -// } else if (options.paths === undefined) { -// paths = Module._resolveLookupPaths(request, parent); -// } else { -// throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); -// } -// } else { -// paths = Module._resolveLookupPaths(request, parent); -// } - -// if (parent?.filename) { -// if (request[0] === '#') { -// const pkg = readPackageScope(parent.filename) || {}; -// if (pkg.data?.imports != null) { -// try { -// return finalizeEsmResolution( -// packageImportsResolve(request, pathToFileURL(parent.filename), -// cjsConditions), parent.filename, -// pkg.path); -// } catch (e) { -// if (e.code === 'ERR_MODULE_NOT_FOUND') -// throw createEsmNotFoundErr(request); -// throw e; -// } -// } -// } -// } - -// // Try module self resolution first -// const parentPath = trySelfParentPath(parent); -// const selfResolved = trySelf(parentPath, request); -// if (selfResolved) { -// const cacheKey = request + '\x00' + -// (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); -// Module._pathCache[cacheKey] = selfResolved; -// return selfResolved; -// } - -// // Look up the filename first, since that's the cache key. -// const filename = Module._findPath(request, paths, isMain, false); -// if (filename) return filename; -// const requireStack = []; -// for (let cursor = parent; -// cursor; -// cursor = moduleParentCache.get(cursor)) { -// ArrayPrototypePush(requireStack, cursor.filename || cursor.id); -// } -// let message = `Cannot find module '${request}'`; -// if (requireStack.length > 0) { -// message = message + '\nRequire stack:\n- ' + -// ArrayPrototypeJoin(requireStack, '\n- '); -// } -// // eslint-disable-next-line no-restricted-syntax -// const err = new Error(message); -// err.code = 'MODULE_NOT_FOUND'; -// err.requireStack = requireStack; -// throw err; -// }; - -// function finalizeEsmResolution(resolved, parentPath, pkgPath) { -// if (RegExpPrototypeTest(encodedSepRegEx, resolved)) -// throw new ERR_INVALID_MODULE_SPECIFIER( -// resolved, 'must not include encoded "/" or "\\" characters', parentPath); -// const filename = fileURLToPath(resolved); -// const actual = tryFile(filename); -// if (actual) -// return actual; -// const err = createEsmNotFoundErr(filename, -// path.resolve(pkgPath, 'package.json')); -// throw err; -// } - -// function createEsmNotFoundErr(request, path) { -// // eslint-disable-next-line no-restricted-syntax -// const err = new Error(`Cannot find module '${request}'`); -// err.code = 'MODULE_NOT_FOUND'; -// if (path) -// err.path = path; -// // TODO(BridgeAR): Add the requireStack as well. -// return err; -// } return { Module_findPath diff --git a/dist-raw/node-internal-modules-esm-get_format.js b/dist-raw/node-internal-modules-esm-get_format.js index 02bb65670..302701223 100644 --- a/dist-raw/node-internal-modules-esm-get_format.js +++ b/dist-raw/node-internal-modules-esm-get_format.js @@ -13,10 +13,8 @@ const experimentalJsonModules = nodeMajor > 17 || (nodeMajor === 17 && nodeMinor >= 5) || getOptionValue('--experimental-json-modules'); -const experimentalSpeciferResolution = - getOptionValue('--experimental-specifier-resolution'); const experimentalWasmModules = getOptionValue('--experimental-wasm-modules'); -const { getPackageType } = require('./node-internal-modules-esm-resolve').createResolve({tsExtensions: [], jsExtensions: []}); +const { getPackageType } = require('./node-internal-modules-esm-resolve').createResolve({compiledExtensions: []}); const { URL, fileURLToPath } = require('url'); const { ERR_UNKNOWN_FILE_EXTENSION } = require('./node-errors').codes; @@ -42,6 +40,17 @@ if (experimentalWasmModules) if (experimentalJsonModules) extensionFormatMap['.json'] = legacyExtensionFormatMap['.json'] = 'json'; +/** + * @param {'node' | 'explicit'} [tsNodeExperimentalSpecifierResolution] */ +function createGetFormat(tsNodeExperimentalSpecifierResolution) { +const experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); + +/** + * @param {string} url + * @param {{}} context + * @param {any} defaultGetFormatUnused + * @returns {ReturnType} + */ function defaultGetFormat(url, context, defaultGetFormatUnused) { if (StringPrototypeStartsWith(url, 'node:')) { return { format: 'builtin' }; @@ -81,4 +90,10 @@ function defaultGetFormat(url, context, defaultGetFormatUnused) { } return { format: null }; } -exports.defaultGetFormat = defaultGetFormat; + +return {defaultGetFormat}; +} + +module.exports = { + createGetFormat +}; diff --git a/dist-raw/node-internal-modules-esm-resolve.js b/dist-raw/node-internal-modules-esm-resolve.js index 652905d6f..066645eca 100644 --- a/dist-raw/node-internal-modules-esm-resolve.js +++ b/dist-raw/node-internal-modules-esm-resolve.js @@ -98,7 +98,8 @@ const pendingDeprecation = getOptionValue('--pending-deprecation'); function createResolve(opts) { // TODO receive cached fs implementations here -const {tsExtensions, jsExtensions, preferTsExts} = opts; +const {compiledExtensions, preferTsExts, tsNodeExperimentalSpecifierResolution} = opts; +const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); const emittedPackageWarnings = new SafeSet(); function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { @@ -251,65 +252,49 @@ function legacyMainResolve(packageJSONUrl, packageConfig, base) { let guess; if (packageConfig.main !== undefined) { // Note: fs check redundances will be handled by Descriptor cache here. - if (fileExists(guess = new URL(`./${packageConfig.main}`, - packageJSONUrl))) { + if(guess = resolveReplacementExtensions(new URL(`./${packageConfig.main}`, packageJSONUrl))) { return guess; } - if (fileExists(guess = new URL(`./${packageConfig.main}.js`, - packageJSONUrl))) { - return guess; - } - if (fileExists(guess = new URL(`./${packageConfig.main}.json`, - packageJSONUrl))) { - return guess; - } - if (fileExists(guess = new URL(`./${packageConfig.main}.node`, - packageJSONUrl))) { - return guess; - } - if (fileExists(guess = new URL(`./${packageConfig.main}/index.js`, + if (fileExists(guess = new URL(`./${packageConfig.main}`, packageJSONUrl))) { return guess; } - if (fileExists(guess = new URL(`./${packageConfig.main}/index.json`, - packageJSONUrl))) { - return guess; + for(const extension of extensions) { + if (fileExists(guess = new URL(`./${packageConfig.main}${extension}`, + packageJSONUrl))) { + return guess; + } } - if (fileExists(guess = new URL(`./${packageConfig.main}/index.node`, - packageJSONUrl))) { - return guess; + for(const extension of extensions) { + if (fileExists(guess = new URL(`./${packageConfig.main}/index${extension}`, + packageJSONUrl))) { + return guess; + } } // Fallthrough. } - if (fileExists(guess = new URL('./index.js', packageJSONUrl))) { - return guess; - } - // So fs. - if (fileExists(guess = new URL('./index.json', packageJSONUrl))) { - return guess; - } - if (fileExists(guess = new URL('./index.node', packageJSONUrl))) { - return guess; + for(const extension of extensions) { + if (fileExists(guess = new URL(`./index${extension}`, packageJSONUrl))) { + return guess; + } } // Not found. throw new ERR_MODULE_NOT_FOUND( fileURLToPath(new URL('.', packageJSONUrl)), fileURLToPath(base)); } -/** tries exact name, then attempts replacement extensions, then attempts appending extensions */ +/** attempts replacement extensions, then tries exact name, then attempts appending extensions */ function resolveExtensionsWithTryExactName(search) { - if (fileExists(search)) return search; const resolvedReplacementExtension = resolveReplacementExtensions(search); if(resolvedReplacementExtension) return resolvedReplacementExtension; + if (fileExists(search)) return search; return resolveExtensions(search); } const extensions = Array.from(new Set([ - ...(preferTsExts ? tsExtensions : []), - '.js', - ...jsExtensions, - '.json', '.node', '.mjs', - ...tsExtensions + ...(preferTsExts ? compiledExtensions : []), + '.js', '.json', '.node', '.mjs', + ...compiledExtensions ])); // This appends missing extensions @@ -326,15 +311,22 @@ function resolveExtensions(search) { * TS's resolver can resolve foo.js to foo.ts, by replacing .js extension with several source extensions. * IMPORTANT: preserve ordering according to preferTsExts; this affects resolution behavior! */ -const replacementExtensions = extensions.filter(ext => ['.js', '.jsx', '.ts', '.tsx'].includes(ext)); +const replacementExtensions = { + '.js': extensions.filter(ext => ['.js', '.jsx', '.ts', '.tsx'].includes(ext)), + '.cjs': extensions.filter(ext => ['.cjs', '.cts'].includes(ext)), + '.mjs': extensions.filter(ext => ['.mjs', '.mts'].includes(ext)), +}; +const replacableExtensionRe = /(\.(?:js|cjs|mjs))$/; /** This replaces JS with TS extensions */ function resolveReplacementExtensions(search) { - if (search.pathname.match(/\.js$/)) { - const pathnameWithoutExtension = search.pathname.slice(0, search.pathname.length - 3); - for (let i = 0; i < replacementExtensions.length; i++) { - const extension = replacementExtensions[i]; - const guess = new URL(search.toString()); + const match = search.pathname.match(replacableExtensionRe); + if (match) { + const replacementExts = replacementExtensions[match[1]]; + const pathnameWithoutExtension = search.pathname.slice(0, -match[1].length); + const guess = new URL(search.toString()); + for (let i = 0; i < replacementExts.length; i++) { + const extension = replacementExts[i]; guess.pathname = `${pathnameWithoutExtension}${extension}`; if (fileExists(guess)) return guess; } @@ -353,7 +345,7 @@ function finalizeResolution(resolved, base) { resolved.pathname, 'must not include encoded "/" or "\\" characters', fileURLToPath(base)); - if (getOptionValue('--experimental-specifier-resolution') === 'node') { + if (experimentalSpecifierResolution === 'node') { const path = fileURLToPath(resolved); let file = resolveExtensionsWithTryExactName(resolved); if (file !== undefined) return file; @@ -566,7 +558,7 @@ function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { * @param {object} packageConfig * @param {string} base * @param {Set} conditions - * @returns {URL} + * @returns {{resolved: URL, exact: boolean}} */ function packageExportsResolve( packageJSONUrl, packageSubpath, packageConfig, base, conditions) { diff --git a/dprint.json b/dprint.json index afa5d0ea9..3fcf217d5 100644 --- a/dprint.json +++ b/dprint.json @@ -28,7 +28,8 @@ "tests/throw error react tsx.tsx", "tests/esm/throw error.ts", "tests/legacy-source-map-support-interop/index.ts", - "tests/main-realpath/symlink/symlink.tsx" + "tests/main-realpath/symlink/symlink.tsx", + "tests/tmp" ], "plugins": [ "https://plugins.dprint.dev/prettier-0.6.2.exe-plugin@36dd4f8b9710ab323c471017ecd00a20cf1dca2728c12242c7dabb8dfacad0e2" diff --git a/justfile b/justfile index 08b4612e6..a4079ee66 100644 --- a/justfile +++ b/justfile @@ -39,7 +39,7 @@ build *ARGS: build-nopack *ARGS: just build-tsc && just build-configSchema "$@" build-tsc *ARGS: - tsc "$@" + tsc -b ./tsconfig.build-dist.json "$@" build-configSchema *ARGS: typescript-json-schema --topRef --refs --validationKeywords allOf --out tsconfig.schema.json tsconfig.build-schema.json TsConfigSchema && node --require ./register ./scripts/create-merged-schema "$@" build-pack *ARGS: diff --git a/package.json b/package.json index e48b8f3ae..cc2595b08 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "rebuild": "npm run clean && npm run build", "build": "npm run build-nopack && npm run build-pack", "build-nopack": "npm run build-tsc && npm run build-configSchema", - "build-tsc": "tsc", + "build-tsc": "tsc -b ./tsconfig.build-dist.json", "build-configSchema": "typescript-json-schema --topRef --refs --validationKeywords allOf --out tsconfig.schema.json tsconfig.build-schema.json TsConfigSchema && node --require ./register ./scripts/create-merged-schema", "build-pack": "node ./scripts/build-pack.js", "test-spec": "ava", diff --git a/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js b/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js index 0ea7182d2..33ac1f181 100644 --- a/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js +++ b/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js @@ -1,26 +1,5 @@ // Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/loader.js -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - 'use strict'; const { @@ -67,37 +46,17 @@ const { StringPrototypeStartsWith, } = primordials; -// Map used to store CJS parsing data. -const cjsParseCache = new SafeWeakMap(); - -// Set first due to cycle with ESM loader functions. -module.exports = { - wrapSafe, Module, toRealPath, readPackageScope, cjsParseCache, - get hasLoadedAnyUserCJSModule() { return hasLoadedAnyUserCJSModule; } -}; - const { NativeModule } = require('internal/bootstrap/loaders'); -const { - maybeCacheSourceMap, -} = require('internal/source_map/source_map_cache'); const { pathToFileURL, fileURLToPath, isURLInstance } = require('internal/url'); -const { deprecate } = require('internal/util'); -const vm = require('vm'); -const assert = require('internal/assert'); const fs = require('fs'); const internalFS = require('internal/fs/utils'); const path = require('path'); const { sep } = path; const { internalModuleStat } = internalBinding('fs'); const packageJsonReader = require('internal/modules/package_json_reader'); -const { safeGetenv } = internalBinding('credentials'); const { cjsConditions, hasEsmSyntax, - loadNativeModule, - makeRequireFunction, - normalizeReferrerURL, - stripBOM, } = require('internal/modules/cjs/helpers'); const { getOptionValue } = require('internal/options'); const preserveSymlinks = getOptionValue('--preserve-symlinks'); @@ -107,35 +66,17 @@ const policy = getOptionValue('--experimental-policy') ? require('internal/process/policy') : null; -// Whether any user-provided CJS modules had been loaded (executed). -// Used for internal assertions. -let hasLoadedAnyUserCJSModule = false; - const { codes: { - ERR_INVALID_ARG_VALUE, ERR_INVALID_MODULE_SPECIFIER, ERR_REQUIRE_ESM, - ERR_UNKNOWN_BUILTIN_MODULE, }, - setArrowMessage, } = require('internal/errors'); -const { validateString } = require('internal/validators'); -const pendingDeprecation = getOptionValue('--pending-deprecation'); const { CHAR_FORWARD_SLASH, - CHAR_BACKWARD_SLASH, - CHAR_COLON } = require('internal/constants'); -const { - isProxy -} = require('internal/util/types'); - -const asyncESM = require('internal/process/esm_loader'); -const { enrichCJSError } = require('internal/modules/esm/translators'); -const { kEvaluated } = internalBinding('module_wrap'); const { encodedSepRegEx, packageExportsResolve, @@ -164,29 +105,6 @@ function stat(filename) { return result; } -function updateChildren(parent, child, scan) { - const children = parent?.children; - if (children && !(scan && ArrayPrototypeIncludes(children, child))) - ArrayPrototypePush(children, child); -} - -const moduleParentCache = new SafeWeakMap(); - -let modulePaths = []; - -let patched = false; - -function getModuleParent() { - return moduleParentCache.get(this); -} - -function setModuleParent(value) { - moduleParentCache.set(this, value); -} - -let debug = require('internal/util/debuglog').debuglog('module', (fn) => { - debug = fn; -}); // Given a module name, and a list of paths to test, returns the first // matching file in the following precedence. @@ -322,63 +240,6 @@ function tryExtensions(p, exts, isMain) { return false; } -// Find the longest (possibly multi-dot) extension registered in -// Module._extensions -function findLongestRegisteredExtension(filename) { - const name = path.basename(filename); - let currentExtension; - let index; - let startIndex = 0; - while ((index = StringPrototypeIndexOf(name, '.', startIndex)) !== -1) { - startIndex = index + 1; - if (index === 0) continue; // Skip dotfiles like .gitignore - currentExtension = StringPrototypeSlice(name, index); - if (Module._extensions[currentExtension]) return currentExtension; - } - return '.js'; -} - -function trySelfParentPath(parent) { - if (!parent) return false; - - if (parent.filename) { - return parent.filename; - } else if (parent.id === '' || parent.id === 'internal/preload') { - try { - return process.cwd() + path.sep; - } catch { - return false; - } - } -} - -function trySelf(parentPath, request) { - if (!parentPath) return false; - - const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; - if (!pkg || pkg.exports === undefined) return false; - if (typeof pkg.name !== 'string') return false; - - let expansion; - if (request === pkg.name) { - expansion = '.'; - } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { - expansion = '.' + StringPrototypeSlice(request, pkg.name.length); - } else { - return false; - } - - try { - return finalizeEsmResolution(packageExportsResolve( - pathToFileURL(pkgPath + '/package.json'), expansion, pkg, - pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request, pkgPath + '/package.json'); - throw e; - } -} - // This only applies to requests of a specific form: // 1. name/.* // 2. @scope/name/.* @@ -489,367 +350,6 @@ Module._findPath = function(request, paths, isMain) { return false; }; -// 'node_modules' character codes reversed -const nmChars = [ 115, 101, 108, 117, 100, 111, 109, 95, 101, 100, 111, 110 ]; -const nmLen = nmChars.length; -if (isWindows) { - // 'from' is the __dirname of the module. - Module._nodeModulePaths = function(from) { - // Guarantee that 'from' is absolute. - from = path.resolve(from); - - // note: this approach *only* works when the path is guaranteed - // to be absolute. Doing a fully-edge-case-correct path.split - // that works on both Windows and Posix is non-trivial. - - // return root node_modules when path is 'D:\\'. - // path.resolve will make sure from.length >=3 in Windows. - if (StringPrototypeCharCodeAt(from, from.length - 1) === - CHAR_BACKWARD_SLASH && - StringPrototypeCharCodeAt(from, from.length - 2) === CHAR_COLON) - return [from + 'node_modules']; - - const paths = []; - for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { - const code = StringPrototypeCharCodeAt(from, i); - // The path segment separator check ('\' and '/') was used to get - // node_modules path for every path segment. - // Use colon as an extra condition since we can get node_modules - // path for drive root like 'C:\node_modules' and don't need to - // parse drive name. - if (code === CHAR_BACKWARD_SLASH || - code === CHAR_FORWARD_SLASH || - code === CHAR_COLON) { - if (p !== nmLen) - ArrayPrototypePush( - paths, - StringPrototypeSlice(from, 0, last) + '\\node_modules' - ); - last = i; - p = 0; - } else if (p !== -1) { - if (nmChars[p] === code) { - ++p; - } else { - p = -1; - } - } - } - - return paths; - }; -} else { // posix - // 'from' is the __dirname of the module. - Module._nodeModulePaths = function(from) { - // Guarantee that 'from' is absolute. - from = path.resolve(from); - // Return early not only to avoid unnecessary work, but to *avoid* returning - // an array of two items for a root: [ '//node_modules', '/node_modules' ] - if (from === '/') - return ['/node_modules']; - - // note: this approach *only* works when the path is guaranteed - // to be absolute. Doing a fully-edge-case-correct path.split - // that works on both Windows and Posix is non-trivial. - const paths = []; - for (let i = from.length - 1, p = 0, last = from.length; i >= 0; --i) { - const code = StringPrototypeCharCodeAt(from, i); - if (code === CHAR_FORWARD_SLASH) { - if (p !== nmLen) - ArrayPrototypePush( - paths, - StringPrototypeSlice(from, 0, last) + '/node_modules' - ); - last = i; - p = 0; - } else if (p !== -1) { - if (nmChars[p] === code) { - ++p; - } else { - p = -1; - } - } - } - - // Append /node_modules to handle root paths. - ArrayPrototypePush(paths, '/node_modules'); - - return paths; - }; -} - -Module._resolveLookupPaths = function(request, parent) { - if (NativeModule.canBeRequiredByUsers(request)) { - debug('looking for %j in []', request); - return null; - } - - // Check for node modules paths. - if (StringPrototypeCharAt(request, 0) !== '.' || - (request.length > 1 && - StringPrototypeCharAt(request, 1) !== '.' && - StringPrototypeCharAt(request, 1) !== '/' && - (!isWindows || StringPrototypeCharAt(request, 1) !== '\\'))) { - - let paths = modulePaths; - if (parent?.paths?.length) { - paths = ArrayPrototypeConcat(parent.paths, paths); - } - - debug('looking for %j in %j', request, paths); - return paths.length > 0 ? paths : null; - } - - // In REPL, parent.filename is null. - if (!parent || !parent.id || !parent.filename) { - // Make require('./path/to/foo') work - normally the path is taken - // from realpath(__filename) but in REPL there is no filename - const mainPaths = ['.']; - - debug('looking for %j in %j', request, mainPaths); - return mainPaths; - } - - debug('RELATIVE: requested: %s from parent.id %s', request, parent.id); - - const parentDir = [path.dirname(parent.filename)]; - debug('looking for %j', parentDir); - return parentDir; -}; - -function emitCircularRequireWarning(prop) { - process.emitWarning( - `Accessing non-existent property '${String(prop)}' of module exports ` + - 'inside circular dependency' - ); -} - -// A Proxy that can be used as the prototype of a module.exports object and -// warns when non-existent properties are accessed. -const CircularRequirePrototypeWarningProxy = new Proxy({}, { - get(target, prop) { - // Allow __esModule access in any case because it is used in the output - // of transpiled code to determine whether something comes from an - // ES module, and is not used as a regular key of `module.exports`. - if (prop in target || prop === '__esModule') return target[prop]; - emitCircularRequireWarning(prop); - return undefined; - }, - - getOwnPropertyDescriptor(target, prop) { - if (ObjectPrototypeHasOwnProperty(target, prop) || prop === '__esModule') - return ObjectGetOwnPropertyDescriptor(target, prop); - emitCircularRequireWarning(prop); - return undefined; - } -}); - -function getExportsForCircularRequire(module) { - if (module.exports && - !isProxy(module.exports) && - ObjectGetPrototypeOf(module.exports) === ObjectPrototype && - // Exclude transpiled ES6 modules / TypeScript code because those may - // employ unusual patterns for accessing 'module.exports'. That should - // be okay because ES6 modules have a different approach to circular - // dependencies anyway. - !module.exports.__esModule) { - // This is later unset once the module is done loading. - ObjectSetPrototypeOf( - module.exports, CircularRequirePrototypeWarningProxy); - } - - return module.exports; -} - -// Check the cache for the requested file. -// 1. If a module already exists in the cache: return its exports object. -// 2. If the module is native: call -// `NativeModule.prototype.compileForPublicLoader()` and return the exports. -// 3. Otherwise, create a new module for the file and save it to the cache. -// Then have it load the file contents before returning its exports -// object. -Module._load = function(request, parent, isMain) { - let relResolveCacheIdentifier; - if (parent) { - debug('Module._load REQUEST %s parent: %s', request, parent.id); - // Fast path for (lazy loaded) modules in the same directory. The indirect - // caching is required to allow cache invalidation without changing the old - // cache key names. - relResolveCacheIdentifier = `${parent.path}\x00${request}`; - const filename = relativeResolveCache[relResolveCacheIdentifier]; - if (filename !== undefined) { - const cachedModule = Module._cache[filename]; - if (cachedModule !== undefined) { - updateChildren(parent, cachedModule, true); - if (!cachedModule.loaded) - return getExportsForCircularRequire(cachedModule); - return cachedModule.exports; - } - delete relativeResolveCache[relResolveCacheIdentifier]; - } - } - - const filename = Module._resolveFilename(request, parent, isMain); - if (StringPrototypeStartsWith(filename, 'node:')) { - // Slice 'node:' prefix - const id = StringPrototypeSlice(filename, 5); - - const module = loadNativeModule(id, request); - if (!module?.canBeRequiredByUsers) { - throw new ERR_UNKNOWN_BUILTIN_MODULE(filename); - } - - return module.exports; - } - - const cachedModule = Module._cache[filename]; - if (cachedModule !== undefined) { - updateChildren(parent, cachedModule, true); - if (!cachedModule.loaded) { - const parseCachedModule = cjsParseCache.get(cachedModule); - if (!parseCachedModule || parseCachedModule.loaded) - return getExportsForCircularRequire(cachedModule); - parseCachedModule.loaded = true; - } else { - return cachedModule.exports; - } - } - - const mod = loadNativeModule(filename, request); - if (mod?.canBeRequiredByUsers) return mod.exports; - - // Don't call updateChildren(), Module constructor already does. - const module = cachedModule || new Module(filename, parent); - - if (isMain) { - process.mainModule = module; - module.id = '.'; - } - - Module._cache[filename] = module; - if (parent !== undefined) { - relativeResolveCache[relResolveCacheIdentifier] = filename; - } - - let threw = true; - try { - module.load(filename); - threw = false; - } finally { - if (threw) { - delete Module._cache[filename]; - if (parent !== undefined) { - delete relativeResolveCache[relResolveCacheIdentifier]; - const children = parent?.children; - if (ArrayIsArray(children)) { - const index = ArrayPrototypeIndexOf(children, module); - if (index !== -1) { - ArrayPrototypeSplice(children, index, 1); - } - } - } - } else if (module.exports && - !isProxy(module.exports) && - ObjectGetPrototypeOf(module.exports) === - CircularRequirePrototypeWarningProxy) { - ObjectSetPrototypeOf(module.exports, ObjectPrototype); - } - } - - return module.exports; -}; - -Module._resolveFilename = function(request, parent, isMain, options) { - if (StringPrototypeStartsWith(request, 'node:') || - NativeModule.canBeRequiredByUsers(request)) { - return request; - } - - let paths; - - if (typeof options === 'object' && options !== null) { - if (ArrayIsArray(options.paths)) { - const isRelative = StringPrototypeStartsWith(request, './') || - StringPrototypeStartsWith(request, '../') || - ((isWindows && StringPrototypeStartsWith(request, '.\\')) || - StringPrototypeStartsWith(request, '..\\')); - - if (isRelative) { - paths = options.paths; - } else { - const fakeParent = new Module('', null); - - paths = []; - - for (let i = 0; i < options.paths.length; i++) { - const path = options.paths[i]; - fakeParent.paths = Module._nodeModulePaths(path); - const lookupPaths = Module._resolveLookupPaths(request, fakeParent); - - for (let j = 0; j < lookupPaths.length; j++) { - if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) - ArrayPrototypePush(paths, lookupPaths[j]); - } - } - } - } else if (options.paths === undefined) { - paths = Module._resolveLookupPaths(request, parent); - } else { - throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); - } - } else { - paths = Module._resolveLookupPaths(request, parent); - } - - if (parent?.filename) { - if (request[0] === '#') { - const pkg = readPackageScope(parent.filename) || {}; - if (pkg.data?.imports != null) { - try { - return finalizeEsmResolution( - packageImportsResolve(request, pathToFileURL(parent.filename), - cjsConditions), parent.filename, - pkg.path); - } catch (e) { - if (e.code === 'ERR_MODULE_NOT_FOUND') - throw createEsmNotFoundErr(request); - throw e; - } - } - } - } - - // Try module self resolution first - const parentPath = trySelfParentPath(parent); - const selfResolved = trySelf(parentPath, request); - if (selfResolved) { - const cacheKey = request + '\x00' + - (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); - Module._pathCache[cacheKey] = selfResolved; - return selfResolved; - } - - // Look up the filename first, since that's the cache key. - const filename = Module._findPath(request, paths, isMain, false); - if (filename) return filename; - const requireStack = []; - for (let cursor = parent; - cursor; - cursor = moduleParentCache.get(cursor)) { - ArrayPrototypePush(requireStack, cursor.filename || cursor.id); - } - let message = `Cannot find module '${request}'`; - if (requireStack.length > 0) { - message = message + '\nRequire stack:\n- ' + - ArrayPrototypeJoin(requireStack, '\n- '); - } - // eslint-disable-next-line no-restricted-syntax - const err = new Error(message); - err.code = 'MODULE_NOT_FOUND'; - err.requireStack = requireStack; - throw err; -}; - function finalizeEsmResolution(resolved, parentPath, pkgPath) { if (RegExpPrototypeTest(encodedSepRegEx, resolved)) throw new ERR_INVALID_MODULE_SPECIFIER( @@ -873,147 +373,6 @@ function createEsmNotFoundErr(request, path) { return err; } -// Given a file name, pass it to the proper extension handler. -Module.prototype.load = function(filename) { - debug('load %j for module %j', filename, this.id); - - assert(!this.loaded); - this.filename = filename; - this.paths = Module._nodeModulePaths(path.dirname(filename)); - - const extension = findLongestRegisteredExtension(filename); - // allow .mjs to be overridden - if (StringPrototypeEndsWith(filename, '.mjs') && !Module._extensions['.mjs']) - throw new ERR_REQUIRE_ESM(filename, true); - - Module._extensions[extension](this, filename); - this.loaded = true; - - const esmLoader = asyncESM.esmLoader; - // Create module entry at load time to snapshot exports correctly - const exports = this.exports; - // Preemptively cache - if ((module?.module === undefined || - module.module.getStatus() < kEvaluated) && - !esmLoader.cjsCache.has(this)) - esmLoader.cjsCache.set(this, exports); -}; - - -// Loads a module at the given file path. Returns that module's -// `exports` property. -Module.prototype.require = function(id) { - validateString(id, 'id'); - if (id === '') { - throw new ERR_INVALID_ARG_VALUE('id', id, - 'must be a non-empty string'); - } - requireDepth++; - try { - return Module._load(id, this, /* isMain */ false); - } finally { - requireDepth--; - } -}; - - -// Resolved path to process.argv[1] will be lazily placed here -// (needed for setting breakpoint when called with --inspect-brk) -let resolvedArgv; -let hasPausedEntry = false; - -function wrapSafe(filename, content, cjsModuleInstance) { - if (patched) { - const wrapper = Module.wrap(content); - return vm.runInThisContext(wrapper, { - filename, - lineOffset: 0, - displayErrors: true, - importModuleDynamically: async (specifier) => { - const loader = asyncESM.esmLoader; - return loader.import(specifier, normalizeReferrerURL(filename)); - }, - }); - } - try { - return vm.compileFunction(content, [ - 'exports', - 'require', - 'module', - '__filename', - '__dirname', - ], { - filename, - importModuleDynamically(specifier) { - const loader = asyncESM.esmLoader; - return loader.import(specifier, normalizeReferrerURL(filename)); - }, - }); - } catch (err) { - if (process.mainModule === cjsModuleInstance) - enrichCJSError(err, content); - throw err; - } -} - -// Run the file contents in the correct scope or sandbox. Expose -// the correct helper variables (require, module, exports) to -// the file. -// Returns exception, if any. -Module.prototype._compile = function(content, filename) { - let moduleURL; - let redirects; - if (policy?.manifest) { - moduleURL = pathToFileURL(filename); - redirects = policy.manifest.getDependencyMapper(moduleURL); - policy.manifest.assertIntegrity(moduleURL, content); - } - - maybeCacheSourceMap(filename, content, this); - const compiledWrapper = wrapSafe(filename, content, this); - - let inspectorWrapper = null; - if (getOptionValue('--inspect-brk') && process._eval == null) { - if (!resolvedArgv) { - // We enter the repl if we're not given a filename argument. - if (process.argv[1]) { - try { - resolvedArgv = Module._resolveFilename(process.argv[1], null, false); - } catch { - // We only expect this codepath to be reached in the case of a - // preloaded module (it will fail earlier with the main entry) - assert(ArrayIsArray(getOptionValue('--require'))); - } - } else { - resolvedArgv = 'repl'; - } - } - - // Set breakpoint on module start - if (resolvedArgv && !hasPausedEntry && filename === resolvedArgv) { - hasPausedEntry = true; - inspectorWrapper = internalBinding('inspector').callAndPauseOnStart; - } - } - const dirname = path.dirname(filename); - const require = makeRequireFunction(this, redirects); - let result; - const exports = this.exports; - const thisValue = exports; - const module = this; - if (requireDepth === 0) statCache = new SafeMap(); - if (inspectorWrapper) { - result = inspectorWrapper(compiledWrapper, thisValue, exports, - require, module, filename, dirname); - } else { - result = ReflectApply(compiledWrapper, thisValue, - [exports, require, module, filename, dirname]); - } - hasLoadedAnyUserCJSModule = true; - if (requireDepth === 0) statCache = null; - return result; -}; - // Native extension for .js Module._extensions['.js'] = function(module, filename) { // If already analyzed the source, then it will be cached. @@ -1060,138 +419,3 @@ Module._extensions['.js'] = function(module, filename) { } module._compile(content, filename); }; - - -// Native extension for .json -Module._extensions['.json'] = function(module, filename) { - const content = fs.readFileSync(filename, 'utf8'); - - if (policy?.manifest) { - const moduleURL = pathToFileURL(filename); - policy.manifest.assertIntegrity(moduleURL, content); - } - - try { - module.exports = JSONParse(stripBOM(content)); - } catch (err) { - err.message = filename + ': ' + err.message; - throw err; - } -}; - - -// Native extension for .node -Module._extensions['.node'] = function(module, filename) { - if (policy?.manifest) { - const content = fs.readFileSync(filename); - const moduleURL = pathToFileURL(filename); - policy.manifest.assertIntegrity(moduleURL, content); - } - // Be aware this doesn't use `content` - return process.dlopen(module, path.toNamespacedPath(filename)); -}; - -function createRequireFromPath(filename) { - // Allow a directory to be passed as the filename - const trailingSlash = - StringPrototypeEndsWith(filename, '/') || - (isWindows && StringPrototypeEndsWith(filename, '\\')); - - const proxyPath = trailingSlash ? - path.join(filename, 'noop.js') : - filename; - - const m = new Module(proxyPath); - m.filename = proxyPath; - - m.paths = Module._nodeModulePaths(m.path); - return makeRequireFunction(m, null); -} - -const createRequireError = 'must be a file URL object, file URL string, or ' + - 'absolute path string'; - -function createRequire(filename) { - let filepath; - - if (isURLInstance(filename) || - (typeof filename === 'string' && !path.isAbsolute(filename))) { - try { - filepath = fileURLToPath(filename); - } catch { - throw new ERR_INVALID_ARG_VALUE('filename', filename, - createRequireError); - } - } else if (typeof filename !== 'string') { - throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError); - } else { - filepath = filename; - } - return createRequireFromPath(filepath); -} - -Module.createRequire = createRequire; - -Module._initPaths = function() { - const homeDir = isWindows ? process.env.USERPROFILE : safeGetenv('HOME'); - const nodePath = isWindows ? process.env.NODE_PATH : safeGetenv('NODE_PATH'); - - // process.execPath is $PREFIX/bin/node except on Windows where it is - // $PREFIX\node.exe where $PREFIX is the root of the Node.js installation. - const prefixDir = isWindows ? - path.resolve(process.execPath, '..') : - path.resolve(process.execPath, '..', '..'); - - const paths = [path.resolve(prefixDir, 'lib', 'node')]; - - if (homeDir) { - ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); - ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules')); - } - - if (nodePath) { - ArrayPrototypeUnshiftApply(paths, ArrayPrototypeFilter( - StringPrototypeSplit(nodePath, path.delimiter), - Boolean - )); - } - - modulePaths = paths; - - // Clone as a shallow copy, for introspection. - Module.globalPaths = ArrayPrototypeSlice(modulePaths); -}; - -Module._preloadModules = function(requests) { - if (!ArrayIsArray(requests)) - return; - - isPreloading = true; - - // Preloaded modules have a dummy parent module which is deemed to exist - // in the current working directory. This seeds the search path for - // preloaded modules. - const parent = new Module('internal/preload', null); - try { - parent.paths = Module._nodeModulePaths(process.cwd()); - } catch (e) { - if (e.code !== 'ENOENT') { - isPreloading = false; - throw e; - } - } - for (let n = 0; n < requests.length; n++) - parent.require(requests[n]); - isPreloading = false; -}; - -Module.syncBuiltinESMExports = function syncBuiltinESMExports() { - for (const mod of NativeModule.map.values()) { - if (mod.canBeRequiredByUsers) { - mod.syncExports(); - } - } -}; - -// Backwards compatibility -Module.Module = Module; diff --git a/src/cjs-resolve-filename-hook.ts b/src/cjs-resolve-hooks.ts similarity index 85% rename from src/cjs-resolve-filename-hook.ts rename to src/cjs-resolve-hooks.ts index 9c6f66b02..fa8a7feef 100644 --- a/src/cjs-resolve-filename-hook.ts +++ b/src/cjs-resolve-hooks.ts @@ -11,6 +11,7 @@ export type ModuleConstructorWithInternals = typeof Module & { ...rest: any[] ): string; _preloadModules(requests?: string[]): void; + _findPath(request: string, paths: string[], isMain: boolean): string; }; interface ModuleResolveFilenameOptions { @@ -20,12 +21,13 @@ interface ModuleResolveFilenameOptions { /** * @internal */ -export function installCommonjsResolveHookIfNecessary(tsNodeService: Service) { +export function installCommonjsResolveHooksIfNecessary(tsNodeService: Service) { const Module = require('module') as ModuleConstructorWithInternals; const originalResolveFilename = Module._resolveFilename; - const shouldInstallHook = tsNodeService.options.experimentalResolverFeatures; + const shouldInstallHook = tsNodeService.options.experimentalResolver; if (shouldInstallHook) { Module._resolveFilename = _resolveFilename; + Module._findPath = tsNodeService.getNodeCjsLoader().Module_findPath; } function _resolveFilename( this: any, diff --git a/src/configuration.ts b/src/configuration.ts index d44b0ffc7..5142a3584 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -380,8 +380,9 @@ function filterRecognizedTsConfigTsNodeOptions(jsonObject: any): { moduleTypes, experimentalReplAwait, swc, - experimentalResolverFeatures, + experimentalResolver, esm, + experimentalSpecifierResolution, ...unrecognized } = jsonObject as TsConfigOptions; const filteredTsConfigOptions = { @@ -405,8 +406,9 @@ function filterRecognizedTsConfigTsNodeOptions(jsonObject: any): { scopeDir, moduleTypes, swc, - experimentalResolverFeatures, + experimentalResolver, esm, + experimentalSpecifierResolution, }; // Use the typechecker to make sure this implementation has the correct set of properties const catchExtraneousProps: keyof TsConfigOptions = diff --git a/src/esm.ts b/src/esm.ts index a92210bb9..d84567a96 100644 --- a/src/esm.ts +++ b/src/esm.ts @@ -16,12 +16,6 @@ import { extname } from 'path'; import * as assert from 'assert'; import { normalizeSlashes } from './util'; import { createRequire } from 'module'; -const { - createResolve, -} = require('../dist-raw/node-internal-modules-esm-resolve'); -const { - defaultGetFormat, -} = require('../dist-raw/node-internal-modules-esm-get_format'); // Note: On Windows, URLs look like this: file:///D:/dev/@TypeStrong/ts-node-examples/foo.ts @@ -139,10 +133,8 @@ export function createEsmHooks(tsNodeService: Service) { tsNodeService.enableExperimentalEsmLoaderInterop(); // Custom implementation that considers additional file extensions and automatically adds file extensions - const nodeResolveImplementation = createResolve({ - ...getExtensions(tsNodeService.config), - preferTsExts: tsNodeService.options.preferTsExts, - }); + const nodeResolveImplementation = tsNodeService.getNodeEsmResolver(); + const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat(); const hooksAPI = filterHooksByAPIVersion({ resolve, @@ -180,7 +172,7 @@ export function createEsmHooks(tsNodeService: Service) { // See: https://github.com/nodejs/node/discussions/41711 // nodejs will likely implement a similar fallback. Till then, we can do our users a favor and fallback today. async function entrypointFallback( - cb: () => ReturnType + cb: () => ReturnType | Awaited> ): ReturnType { try { const resolution = await cb(); @@ -259,7 +251,13 @@ export function createEsmHooks(tsNodeService: Service) { // otherwise call the old getFormat() hook using node's old built-in defaultGetFormat() that ships with ts-node const format = context.format ?? - (await getFormat(url, context, defaultGetFormat)).format; + ( + await getFormat( + url, + context, + nodeGetFormatImplementation.defaultGetFormat + ) + ).format; let source = undefined; if (format !== 'builtin' && format !== 'commonjs') { diff --git a/src/index.ts b/src/index.ts index ff2186ba3..4d1370deb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,7 @@ import { cachedLookup, createProjectLocalResolveHelper, normalizeSlashes, + once, parse, ProjectLocalResolveHelper, split, @@ -26,9 +27,12 @@ import { import { createResolverFunctions } from './resolver-functions'; import type { createEsmHooks as createEsmHooksFn } from './esm'; import { - installCommonjsResolveHookIfNecessary, + installCommonjsResolveHooksIfNecessary, ModuleConstructorWithInternals, -} from './cjs-resolve-filename-hook'; +} from './cjs-resolve-hooks'; +import type * as _nodeInternalModulesEsmResolve from '../dist-raw/node-internal-modules-esm-resolve'; +import type * as _nodeInternalModulesEsmGetFormat from '../dist-raw/node-internal-modules-esm-get_format'; +import type * as _nodeInternalModulesCjsLoader from '../dist-raw/node-internal-modules-cjs-loader'; export { TSCommon }; export { @@ -96,8 +100,9 @@ let assertScriptCanLoadAsCJS: ( module: NodeJS.Module, filename: string ) => void = engineSupportsPackageTypeField - ? require('../dist-raw/node-internal-modules-cjs-loader') - .assertScriptCanLoadAsCJSImpl + ? ( + require('../dist-raw/node-internal-modules-cjs-loader') as typeof _nodeInternalModulesCjsLoader + ).assertScriptCanLoadAsCJSImpl : () => { /* noop */ }; @@ -408,7 +413,10 @@ export interface RegisterOptions extends CreateOptions { * * For details, see https://github.com/TypeStrong/ts-node/issues/1514 */ - experimentalResolverFeatures?: boolean; + experimentalResolver?: boolean; + + /** @internal */ + experimentalSpecifierResolution?: 'node' | 'explicit'; } /** @@ -532,6 +540,18 @@ export interface Service { transpileOnly: boolean; /** @internal */ projectLocalResolveHelper: ProjectLocalResolveHelper; + /** @internal */ + getNodeEsmResolver: () => ReturnType< + typeof import('../dist-raw/node-internal-modules-esm-resolve').createResolve + >; + /** @internal */ + getNodeEsmGetFormat: () => ReturnType< + typeof import('../dist-raw/node-internal-modules-esm-get_format').createGetFormat + >; + /** @internal */ + getNodeCjsLoader: () => ReturnType< + typeof import('../dist-raw/node-internal-modules-cjs-loader').createCjsLoader + >; } /** @@ -552,15 +572,28 @@ export interface DiagnosticFilter { } /** @internal */ -export function getExtensions(config: _ts.ParsedCommandLine) { - const tsExtensions = ['.ts']; - const jsExtensions = []; +export function getExtensions( + config: _ts.ParsedCommandLine, + options: RegisterOptions +) { + const compiledExtensions = []; + + // .js, .cjs, .mjs take precedence if preferTsExts is off + if (!options.preferTsExts && config.options.allowJs) + compiledExtensions.push('.js'); + + compiledExtensions.push('.ts'); // Enable additional extensions when JSX or `allowJs` is enabled. - if (config.options.jsx) tsExtensions.push('.tsx'); - if (config.options.allowJs) jsExtensions.push('.js'); - if (config.options.jsx && config.options.allowJs) jsExtensions.push('.jsx'); - return { tsExtensions, jsExtensions }; + if (config.options.jsx) compiledExtensions.push('.tsx'); + if (config.options.jsx && config.options.allowJs) + compiledExtensions.push('.jsx'); + if (config.options.preferTsExt && config.options.allowJs) + compiledExtensions.push('.js'); + return { + /** All file extensions we transform, ordered by resolution preference according to preferTsExts */ + compiledExtensions, + }; } /** @@ -586,8 +619,7 @@ export function register( } const originalJsHandler = require.extensions['.js']; - const { tsExtensions, jsExtensions } = getExtensions(service.config); - const extensions = [...tsExtensions, ...jsExtensions]; + const { compiledExtensions } = getExtensions(service.config, service.options); // Expose registered instance globally. process[REGISTER_INSTANCE] = service; @@ -595,12 +627,12 @@ export function register( // Register the extensions. registerExtensions( service.options.preferTsExts, - extensions, + compiledExtensions, service, originalJsHandler ); - installCommonjsResolveHookIfNecessary(service); + installCommonjsResolveHooksIfNecessary(service); // Require specified modules before start-up. (Module as ModuleConstructorWithInternals)._preloadModules( @@ -1364,14 +1396,11 @@ export function createFromPreloadedConfig( let active = true; const enabled = (enabled?: boolean) => enabled === undefined ? active : (active = !!enabled); - const extensions = getExtensions(config); + const extensions = getExtensions(config, options); const ignored = (fileName: string) => { if (!active) return true; const ext = extname(fileName); - if ( - extensions.tsExtensions.includes(ext) || - extensions.jsExtensions.includes(ext) - ) { + if (extensions.compiledExtensions.includes(ext)) { return !isScoped(fileName) || shouldIgnore(fileName); } return true; @@ -1386,6 +1415,31 @@ export function createFromPreloadedConfig( }); } + const getNodeEsmResolver = once(() => + ( + require('../dist-raw/node-internal-modules-esm-resolve') as typeof _nodeInternalModulesEsmResolve + ).createResolve({ + ...extensions, + preferTsExts: options.preferTsExts, + tsNodeExperimentalSpecifierResolution: + options.experimentalSpecifierResolution, + }) + ); + const getNodeEsmGetFormat = once(() => + ( + require('../dist-raw/node-internal-modules-esm-get_format') as typeof _nodeInternalModulesEsmGetFormat + ).createGetFormat(options.experimentalSpecifierResolution) + ); + const getNodeCjsLoader = once(() => + ( + require('../dist-raw/node-internal-modules-cjs-loader') as typeof _nodeInternalModulesCjsLoader + ).createCjsLoader({ + ...extensions, + preferTsExts: options.preferTsExts, + nodeEsmResolver: getNodeEsmResolver(), + }) + ); + return { [TS_NODE_SERVICE_BRAND]: true, ts, @@ -1404,6 +1458,9 @@ export function createFromPreloadedConfig( enableExperimentalEsmLoaderInterop, transpileOnly, projectLocalResolveHelper, + getNodeEsmResolver, + getNodeEsmGetFormat, + getNodeCjsLoader, }; } diff --git a/src/test/fs-helpers.ts b/src/test/fs-helpers.ts index 80b460f46..3f609a34d 100644 --- a/src/test/fs-helpers.ts +++ b/src/test/fs-helpers.ts @@ -41,7 +41,7 @@ export function tempdirProject(name = '') { const tmpdir = fs.mkdtempSync(`${TEST_DIR}/tmp/${name}`); return projectInternal(tmpdir); } - +export type Project = ReturnType; export function project(name: string) { return projectInternal(`${TEST_DIR}/tmp/${name}`); } diff --git a/src/test/helpers.ts b/src/test/helpers.ts index d9a85895a..4586e3173 100644 --- a/src/test/helpers.ts +++ b/src/test/helpers.ts @@ -239,6 +239,9 @@ export function resetNodeEnvironment() { // May be modified by REPL tests, since the REPL sets globals. // Avoid deleting nyc's coverage data. resetObject(global, defaultGlobal, ['__coverage__']); + + // Reset our ESM hooks + process.__test_setloader__?.(undefined); } function captureObjectState(object: any, avoidGetters: string[] = []) { diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 26777ec97..bbd85660c 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -1,179 +1,589 @@ -import { context } from './testlib'; +import { context, ExecutionContext, TestInterface } from './testlib'; import { ctxTsNode, resetNodeEnvironment } from './helpers'; -import { project } from './fs-helpers'; +import { project as fsProject, Project as FsProject } from './fs-helpers'; import { join } from 'path'; +import { padStart } from 'lodash'; +import { isIndexedAccessTypeNode, isWhiteSpaceLike } from 'typescript'; + +// TODO with skipIgnore turned off, `node_modules` imports of output extension should not resolve to src extension + +// Side-step compiler transformation of import() into require() +const dynamicImport = new Function('specifier', 'return import(specifier)'); const test = context(ctxTsNode); +type Test = TestInterface; +type T = ExecutionContext; + +/* + * Each test case is a separate TS project, with a different permutation of + * project options. The project is written to disc, then ts-node is installed, + * then several entrypoint-* files are imported to test our resolver. + * + * High-level structure of these tests: + * package.json, tsconfig.json, src/, and out/ + * entrypoint-* files are the entrypoints + * they import a bunch of target-* files + * + * The heart of this test is every time an entrypoint imports a target. + * We are testing if the resolver figures out the correct target-* file to import. + * + * To better understand the emitted projects, run the tests, then look in `tests/tmp/resolver-*` + * + * Whenever a test fails, the error will log a command you can paste into your terminal to re-run + * that project *outside* of this test suite. This may be helpful in understanding and debugging + * these tests. + */ + +const projectSeq = seqGenerator(); +const entrypointSeq = seqGenerator(); +const targetSeq = seqGenerator(); + +interface Project { + identifier: string; + allowJs: boolean; + preferSrc: boolean; + typeModule: boolean; + experimentalSpecifierResolutionNode: boolean; +} +type Entrypoint = string; +interface Target { + /** If true, is an index.* file within a directory */ + isIndex: boolean; + targetIdentifier: string; + outName: string; + srcName: string; + srcExt: string; + outExt: string; + inSrc: boolean; + inOut: boolean; + /** If true, should be imported as an npm package, not relative import */ + isPackage: boolean; + packageFlavor: ExternalPackageFlavor; + typeModule: boolean; +} test.suite('Resolver hooks', (test) => { test.runSerially(); - /* - * Each test case is a separate TS project, with a different permutation of - * project options. The project is written to disc, then ts-node is installed, - * then several index-* files are imported to test our resolver. - * - * High-level structure of these tests: - * package.json, tsconfig.json, src/, and out/ - * index-* files are the entrypoints - * they import a bunch of lib-* files - * - * The heart of this test is every time an index-* imports a lib-*. - * We are testing if the resolver figures out the correct lib-* file to import. - */ + // + // Generate all permutations of projects + // for (const allowJs of [false, true]) { for (const preferSrc of [false, true]) { for (const typeModule of [false, true]) { for (const experimentalSpecifierResolutionNode of [false, true]) { - const projectName = `resolver-${ - preferSrc ? 'preferSrc' : 'preferOut' - }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ - allowJs ? '-allowJs' : '' - }${ - experimentalSpecifierResolutionNode - ? '-experimentalSpecifierResolutionNode' - : '' - }`; - - test(`${projectName}`, async (t) => { - t.teardown(() => { - resetNodeEnvironment(); - }); - - const p = project(projectName); - p.rm(); - - p.addJsonFile('package.json', { - type: typeModule ? 'module' : undefined, - }); - p.addJsonFile('tsconfig.json', { - 'ts-node': { - experimentalResolver: true, - preferSrc, - transpileOnly: true, - }, - compilerOptions: { - allowJs, - skipLibCheck: true, - }, - }); - const outDir = p.dir('out'); - const srcDir = p.dir('src'); - - // - // Generate all lib-* files - // - - /** Array of outDir names, including extension */ - const libFiles: string[] = []; - // TODO does allowJs matter? - for (const inOut of [false, true]) { - for (const inSrc of [false, true]) { - // Don't bother with src-only extensions when only emitting to `out` - for (const srcExt of inSrc - ? ['ts', 'tsx', 'cts', 'mts', 'js', 'jsx', 'cjs', 'mjs'] - : ['js', 'cjs', 'mjs']) { - const outExt = srcExt.replace('ts', 'js').replace('x', ''); - const basename = `lib-${ - inOut && inSrc ? 'inboth' : inOut ? 'onlyout' : 'onlysrc' - }-${srcExt}`; - const srcName = `${basename}.${srcExt}`; - const outName = `${basename}.${outExt}`; - libFiles.push(outName); - if (inOut) { - outDir.addFile( - outName, - String.raw`console.log(__filename.replace(/.*[\\\/]/, ''), 'out');` - ); - } - if (inSrc) { - srcDir.addFile( - srcName, - String.raw`console.log(__filename.replace(/.*[\\\/]/, ''), 'src');` - ); - } + const project: Project = { + identifier: `resolver-${projectSeq()}-${ + preferSrc ? 'preferSrc' : 'preferOut' + }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ + allowJs ? '-allowJs' : '' + }${ + experimentalSpecifierResolutionNode + ? '-experimentalSpecifierResolutionNode' + : '' + }`, + allowJs, + preferSrc, + typeModule, + experimentalSpecifierResolutionNode, + }; + declareProject(test, project); + } + } + } + } +}); + +function declareProject(test: Test, project: Project) { + const { + allowJs, + experimentalSpecifierResolutionNode, + preferSrc, + typeModule, + } = project; + + test(`${project.identifier}`, async (t) => { + t.teardown(() => { + resetNodeEnvironment(); + }); + + const p = fsProject(project.identifier); + p.rm(); + + p.addJsonFile('package.json', { + type: project.typeModule ? 'module' : undefined, + }); + p.addJsonFile('tsconfig.json', { + 'ts-node': { + experimentalResolver: true, + // TODO rename this option? Or keep the legacy name + preferSrc, + preferTsExts: preferSrc, + transpileOnly: true, + experimentalSpecifierResolution: experimentalSpecifierResolutionNode + ? 'node' + : undefined, + skipIgnore: true, + }, + compilerOptions: { + allowJs, + skipLibCheck: true, + // TODO add nodenext permutation + module: typeModule ? 'esnext' : 'commonjs', + jsx: 'react', + }, + }); + + const targets = generateTargets(project, p); + const entrypoints = generateEntrypoints(project, p, targets); + p.write(); + await execute(t, p, entrypoints); + }); +} +type ExternalPackageFlavor = typeof externalPackageFlavors[number]; +const externalPackageFlavors = [ + false, + 'main-src-with-extension', + 'main-src-with-out-extension', + 'main-out-with-extension', + 'main-src-extensionless', + 'main-out-extensionless', + 'exports-src-with-extension', + 'exports-src-with-out-extension', + 'exports-out-with-extension', +] as const; +function generateTargets(project: Project, p: FsProject) { + // + // Generate all target-* files + // + + /** Array of metadata about target files to be imported */ + const targets: Array = []; + // TODO does allowJs matter? + for (const inOut of [false, true]) { + for (const inSrc of [false, true]) { + for (const srcExt of [ + 'ts', + 'tsx', + 'cts', + 'mts', + 'jsx', + 'js', + 'cjs', + 'mjs', + ]) { + for (const externalPackageFlavor of externalPackageFlavors) { + const targetPackageTypeModulePermutations = externalPackageFlavor + ? [true, false] + : [project.typeModule]; + for (const targetPackageTypeModule of targetPackageTypeModulePermutations) { + const isIndexPermutations = externalPackageFlavor + ? [false] + : [true, false]; + // TODO test main pointing to a directory containing an `index.` file? + for (const isIndex of isIndexPermutations) { + //#region SKIPPING + if (!inSrc && !inOut) continue; + + // Don't bother with jsx if we don't have allowJs enabled + // TODO Get rid of this? "Just work" in this case? + if (srcExt === 'jsx' && !project.allowJs) continue; + // Don't bother with src-only extensions when only emitting to `out` + if (!inSrc && ['ts', 'tsx', 'cts', 'mts', 'jsx'].includes(srcExt)) + continue; + + // TODO re-enable with src <-> out mapping + if ( + !inOut && + [ + 'main-out-with-extension', + 'main-out-extensionless', + 'exports-out-with-extension', + ].includes(externalPackageFlavor as any) + ) + continue; + if ( + !inSrc && + [ + 'main-src-with-extension', + 'main-src-extensionless', + 'exports-src-with-extension', + ].includes(externalPackageFlavor as any) + ) + continue; + if ( + [ + 'main-out-with-extension', + 'main-out-extensionless', + 'exports-out-with-extension', + ].includes(externalPackageFlavor as any) + ) + continue; + //#endregion + + const outExt = srcExt.replace('ts', 'js').replace('x', ''); + let targetIdentifier = `target-${targetSeq()}-${ + inOut && inSrc ? 'inboth' : inOut ? 'onlyout' : 'onlysrc' + }-${srcExt}`; + + if (externalPackageFlavor) + targetIdentifier = `${targetIdentifier}-${externalPackageFlavor}-${ + targetPackageTypeModule ? 'module' : 'commonjs' + }`; + let prefix = externalPackageFlavor + ? `node_modules/${targetIdentifier}/` + : ''; + let suffix = externalPackageFlavor ? 'target' : targetIdentifier; + if (isIndex) suffix += '-dir/index'; + const srcName = `${prefix}src/${suffix}.${srcExt}`; + const srcDirOutExtName = `${prefix}src/${suffix}.${outExt}`; + const outName = `${prefix}out/${suffix}.${outExt}`; + const target: Target = { + srcName, + outName, + srcExt, + outExt, + inSrc, + inOut, + isIndex, + targetIdentifier, + isPackage: !!externalPackageFlavor, + packageFlavor: externalPackageFlavor, + typeModule: targetPackageTypeModule, + }; + targets.push(target); + const { isMjs: targetIsMjs } = fileInfo( + '.' + srcExt, + targetPackageTypeModule, + project.allowJs + ); + function targetContent(loc: string) { + let content = ''; + if (targetIsMjs) { + content += String.raw` + const {fileURLToPath} = await import('url'); + const filenameNative = fileURLToPath(import.meta.url); + export const directory = filenameNative.replace(/.*[\\\/](.*?)[\\\/]/, '$1'); + export const filename = filenameNative.replace(/.*[\\\/]/, ''); + export const targetIdentifier = '${targetIdentifier}'; + export const ext = filenameNative.replace(/.*\./, ''); + export const loc = '${loc}'; + `; + } else { + content += String.raw` + const filenameNative = __filename; + exports.filename = filenameNative.replace(/.*[\\\/]/, ''); + exports.directory = filenameNative.replace(/.*[\\\/](.*?)[\\\/].*/, '$1'); + exports.targetIdentifier = '${targetIdentifier}'; + exports.ext = filenameNative.replace(/.*\./, ''); + exports.loc = '${loc}'; + `; } + return content; + } + if (inOut) { + p.addFile(outName, targetContent('out')); + // TODO so we can test multiple file extensions in a single directory, preferTsExt + p.addFile(srcDirOutExtName, targetContent('out')); + } + if (inSrc) { + p.addFile(srcName, targetContent('src')); + } + function writePackageJson(obj: any) { + p.addJsonFile(`${prefix}/package.json`, { + type: targetPackageTypeModule ? 'module' : undefined, + ...obj, + }); + } + switch (externalPackageFlavor) { + case 'exports-src-with-extension': + writePackageJson({ + exports: { + '.': `./src/${suffix}.${srcExt}`, + }, + }); + break; + case 'exports-src-with-out-extension': + writePackageJson({ + exports: { + '.': `./src/${suffix}.${outExt}`, + }, + }); + break; + case 'exports-out-with-extension': + writePackageJson({ + exports: { + '.': `./out/${suffix}.${outExt}`, + }, + }); + break; + case 'main-src-extensionless': + writePackageJson({ + main: `src/${suffix}`, + }); + break; + case 'main-out-extensionless': + writePackageJson({ + main: `out/${suffix}`, + }); + break; + case 'main-src-with-extension': + writePackageJson({ + main: `src/${suffix}.${srcExt}`, + }); + break; + case 'main-src-with-out-extension': + writePackageJson({ + main: `src/${suffix}.${outExt}`, + }); + break; + case 'main-out-with-extension': + writePackageJson({ + main: `src/${suffix}.${outExt}`, + }); + break; + default: + const _assert: false = externalPackageFlavor; } } + } + } + } + } + } + return targets; +} - // - // Generate all index-* files - // - - /** Array of index files to be imported during the test */ - let indexFiles: string[] = []; - for (const indexExt of ['cjs', 'mjs'] as const) { - for (const withExt of indexExt == 'mjs' && - experimentalSpecifierResolutionNode === false - ? [true] - : [false, true]) { - for (const indexLocation of ['src', 'out'] as const) { - for (const indexTarget of ['src', 'out'] as const) { - if (indexLocation !== indexTarget) continue; - - const indexFilename = `index-${indexLocation}-to-${indexTarget}${ - withExt ? '-withext' : '' - }.${indexExt}`; - let indexContent = ''; - - indexFiles.push(indexLocation + '/' + indexFilename); - for (const libFile of libFiles) { - const libFileExt = libFile.match(/\.(.*)$/)![1]; - const libFileIsMjs = - (typeModule && libFileExt === 'js') || - libFileExt === 'mjs'; - - let specifier = - indexTarget === indexLocation - ? './' - : `../${indexTarget}/`; - specifier += withExt - ? libFile - : libFile.replace(/\..+$/, ''); - - // Do not try to import mjs from cjs - if (libFileIsMjs && indexExt === 'cjs') { - indexContent += `// skipping ${specifier} because we cannot import mjs from cjs\n`; - continue; - } - - // Do not try to import mjs or cjs without extension; node always requires these extensions, even in CommonJS. - if ( - !withExt && - (libFileExt === 'cjs' || libFileExt === 'mjs') - ) { - indexContent += `// skipping ${specifier} because we cannot omit extension from cjs or mjs files; node always requires them\n`; - continue; - } - - indexContent += - indexExt === 'cjs' - ? `require('${specifier}');\n` - : `await import('${specifier}');\n`; - } - p.dir(indexLocation).addFile(indexFilename, indexContent); - } - } +/** + * Generate all entrypoint-* files + */ +function generateEntrypoints( + project: Project, + p: FsProject, + targets: Target[] +) { + /** Array of entrypoint files to be imported during the test */ + let entrypoints: string[] = []; + for (const entrypointExt of ['cjs', 'mjs'] as const) { + const withExtPermutations = + entrypointExt == 'mjs' && + project.experimentalSpecifierResolutionNode === false + ? [true] + : [false, true]; + for (const withExt of withExtPermutations) { + // Location of the entrypoint + for (const entrypointLocation of ['src', 'out'] as const) { + // Target of the entrypoint's import statements + for (const entrypointTargetting of ['src', 'out'] as const) { + // TODO + if (entrypointLocation !== 'src') continue; + if (entrypointTargetting !== 'src') continue; + + const entrypointFilename = `entrypoint-${entrypointSeq()}-${entrypointLocation}-to-${entrypointTargetting}${ + withExt ? '-withext' : '' + }.${entrypointExt}`; + const { isMjs: entrypointIsMjs } = fileInfo( + entrypointFilename, + project.typeModule, + project.allowJs + ); + let entrypointContent = 'let mod;\n'; + if (entrypointIsMjs) { + entrypointContent += `import assert from 'assert';\n`; + } else { + entrypointContent += `const assert = require('assert');\n`; + } + + entrypoints.push(entrypointLocation + '/' + entrypointFilename); + for (const target of targets) { + // TODO re-enable these when we have outDir <-> rootDir mapping + if ( + target.srcName.includes('onlyout') && + entrypointTargetting === 'src' + ) + continue; + if ( + target.srcName.includes('onlysrc') && + //@ts-expect-error + entrypointTargetting === 'out' + ) + continue; + + const { + ext: targetSrcExt, + isMjs: targetIsMjs, + isCompiled: targetIsCompiled, + } = fileInfo(target.srcName, target.typeModule, project.allowJs); + const { ext: targetOutExt } = fileInfo( + target.outName, + project.typeModule, + project.allowJs + ); + + let targetExtPermutations = ['']; + if (!target.isPackage) { + if ( + // @ts-expect-error + entrypointTargetting === 'out' && + target.outExt !== target.srcExt + ) { + // TODO re-enable when we have out <-> src mapping + targetExtPermutations = [target.outExt]; + } else if (target.srcExt !== target.outExt) { + targetExtPermutations = [target.srcExt, target.outExt]; + } else { + targetExtPermutations = [target.srcExt]; } } - p.write(); + for (const targetExt of targetExtPermutations) { + entrypointContent += `\n// ${target.targetIdentifier}`; + if (target.isPackage) { + entrypointContent + ' node_modules package'; + } else { + entrypointContent += `.${targetExt}`; + } + entrypointContent += '\n'; + + // should specifier be relative or absolute? + let specifier: string; + if (target.isPackage) { + specifier = target.targetIdentifier; + } else { + if (entrypointTargetting === entrypointLocation) + specifier = './'; + else specifier = `../${entrypointTargetting}/`; + specifier += target.targetIdentifier; + if (target.isIndex) specifier += '-dir'; + if (!target.isIndex && withExt) specifier += '.' + targetExt; + } + + // Do not try to import mjs from cjs + if (targetIsMjs && entrypointExt === 'cjs') { + entrypointContent += `// skipping ${specifier} because we cannot import mjs from cjs\n`; + continue; + } + + // Do not try to import mjs or cjs without extension; node always requires these extensions, even in CommonJS. + if ( + !withExt && + (targetSrcExt === 'cjs' || targetSrcExt === 'mjs') + ) { + entrypointContent += `// skipping ${specifier} because we cannot omit extension from cjs or mjs files; node always requires them\n`; + continue; + } - // - // Install ts-node and try to import all the index-* files - // + // Do not try to import a transpiled file if compiler options disagree with node's extension-based classification + if (targetIsCompiled && targetIsMjs && !project.typeModule) { + entrypointContent += `// skipping ${specifier} because it is compiled and compiler options disagree with node's module classification: extension=${targetSrcExt}, tsconfig module=commonjs\n`; + continue; + } + if (targetIsCompiled && !targetIsMjs && project.typeModule) { + entrypointContent += `// skipping ${specifier} because it is compiled and compiler options disagree with node's module classification: extension=${targetSrcExt}, tsconfig module=esnext\n`; + continue; + } + // Do not try to import cjs/mjs/cts/mts extensions because they are being added by a different pull request + if (['cts', 'mts', 'cjs', 'mjs'].includes(targetSrcExt)) { + entrypointContent += `// skipping ${specifier} because it uses a file extension that requires us to merge the relevant pull request\n`; + continue; + } - t.context.tsNodeUnderTest.register({ - projectSearchDir: p.cwd, - }); + // Do not try to import index from a directory if is forbidden by node's ESM resolver + if ( + entrypointIsMjs && + target.isIndex && + !project.experimentalSpecifierResolutionNode + ) { + entrypointContent += `// skipping ${specifier} because it relies on node automatically resolving a directory to index.*, but experimental-specifier-resolution is not enabled\n`; + continue; + } - for (const indexFile of indexFiles) { - await import(join(p.cwd, indexFile)); + // NOTE: if you try to explicitly import foo.ts, we will load foo.ts, EVEN IF you have `preferTsExts` off + const assertIsSrcOrOut = !target.inSrc + ? 'out' + : !target.inOut + ? 'src' + : project.preferSrc || + (!target.isIndex && targetExt === target.srcExt && withExt) || + target.srcExt === target.outExt || // <-- TODO re-enable when we have src <-> out mapping + (target.isPackage && + [ + 'main-src-with-extension', + 'exports-src-with-extension', + ].includes(target.packageFlavor as any)) + ? 'src' + : 'out'; + const assertHasExt = + assertIsSrcOrOut === 'src' ? target.srcExt : target.outExt; + + entrypointContent += + entrypointExt === 'cjs' + ? `mod = require('${specifier}');\n` + : `mod = await import('${specifier}');\n`; + entrypointContent += `assert.equal(mod.loc, '${assertIsSrcOrOut}');\n`; + entrypointContent += `assert.equal(mod.targetIdentifier, '${target.targetIdentifier}');\n`; + entrypointContent += `assert.equal(mod.ext, '${assertHasExt}');\n`; + // indexContent += `assert.equal(mod.filename.match(/^.*?\\./)[0], '${assertHasName}');\n`; + // indexContent += `assert.equal(mod.filename.match(/\\..*?$/)[0], '.${assertHasExtension}');\n`; } - }); + } + p.dir(entrypointLocation).addFile( + entrypointFilename, + entrypointContent + ); } } } } -}); + return entrypoints; +} + +/** + * Assertions happen here + */ +async function execute(t: T, p: FsProject, entrypoints: Entrypoint[]) { + // + // Install ts-node and try to import all the index-* files + // + + const service = t.context.tsNodeUnderTest.register({ + projectSearchDir: p.cwd, + }); + process.__test_setloader__(t.context.tsNodeUnderTest.createEsmHooks(service)); + + for (const entrypoint of entrypoints) { + try { + await dynamicImport(join(p.cwd, entrypoint)); + } catch (e) { + throw new Error( + [ + 'Error in resolver test. It might be easier to investigate by running outside of the test suite.', + 'To do that, try pasting this into your bash shell (windows invocation will be similar but maybe not identical):', + `( cd ${p.cwd} ; node --loader ../../../esm.mjs ./${entrypoint} )`, + ].join('\n') + ); + } + } +} + +function fileInfo(filename: string, typeModule: boolean, allowJs: boolean) { + const ext = filename.match(/\.(.*)$/)?.[1] ?? filename; + // ['ts', 'tsx', 'cts', 'mts', 'js', 'jsx', 'cjs', 'mjs'] + return { + ext, + isMjs: ['mts', 'mjs'].includes(ext) + ? true + : ['cts', 'cjs'].includes(ext) + ? false + : typeModule, + isCompiled: allowJs || ['ts', 'tsx', 'jsx', 'mts', 'cts'].includes(ext), + }; +} + +function seqGenerator() { + let next = 0; + return function () { + return padStart('' + next++, 4, '0'); + }; +} // Test a bunch of permutations of: diff --git a/src/test/test-loader.d.ts b/src/test/test-loader.d.ts new file mode 100644 index 000000000..1d83a9976 --- /dev/null +++ b/src/test/test-loader.d.ts @@ -0,0 +1,8 @@ +export {}; +declare global { + namespace NodeJS { + interface Process { + __test_setloader__(hooks: any): void; + } + } +} diff --git a/src/test/test-loader.mjs b/src/test/test-loader.mjs new file mode 100644 index 000000000..f82d199ef --- /dev/null +++ b/src/test/test-loader.mjs @@ -0,0 +1,16 @@ +// Grant ourselves the ability to install ESM loader behaviors in-process during tests + +let hooks = undefined; +process.__test_setloader__ = function (_hooks) { + hooks = _hooks; +}; +function resolve(a, b, c) { + const target = hooks?.resolve ?? c; + return target(...arguments); +} +function load(a, b, c) { + const target = hooks?.load ?? c; + return target(...arguments); +} + +export { resolve, load }; diff --git a/src/util.ts b/src/util.ts index adc5eaca9..b8454ca26 100644 --- a/src/util.ts +++ b/src/util.ts @@ -156,3 +156,16 @@ export function getBasePathForProjectLocalDependencyResolution( // and we attempt to resolve relative specifiers. By the time we resolve relative specifiers, // should have configFilePath, so not reach this codepath. } + +/** @internal */ +export function once any>(fn: Fn) { + let value: ReturnType; + let ran = false; + function onceFn(...args: Parameters): ReturnType { + if (ran) return value; + value = fn(...args); + ran = true; + return value; + } + return onceFn; +} diff --git a/tsconfig.build-dist-raw.json b/tsconfig.build-dist-raw.json new file mode 100644 index 000000000..82ee4b184 --- /dev/null +++ b/tsconfig.build-dist-raw.json @@ -0,0 +1,18 @@ +// This tsconfig.json is referenced by tsconfig.build-dist.json, a little trick to keep tsc happy. +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": true, + "allowJs": true, + "checkJs": false, + "noResolve": true, + "declaration": true, + "noEmit": false, + "emitDeclarationOnly": true, + "rootDir": "dist-raw", + "outDir": "temp/dist-raw" + }, + "include": [ + "dist-raw/**/*" + ] +} diff --git a/tsconfig.build-dist.json b/tsconfig.build-dist.json new file mode 100644 index 000000000..8889d3d91 --- /dev/null +++ b/tsconfig.build-dist.json @@ -0,0 +1,18 @@ +// This tsconfig.json drives compiling the src/ directory into the dist/ directory +{ + "extends": "./tsconfig.json", + "references": [{ + "path": "./tsconfig.build-dist-raw.json" + }], + "compilerOptions": { + "noEmit": false, + "rootDir": "src", + "outDir": "dist", + "tsBuildInfoFile": "temp/tsconfig.build-dist.tsbuildinfo", + "allowJs": false, + "rootDirs": ["temp", "."] + }, + "include": [ + "src/**/*" + ] +} diff --git a/tsconfig.build-schema.json b/tsconfig.build-schema.json index adf48b4c9..f3f762f5a 100644 --- a/tsconfig.build-schema.json +++ b/tsconfig.build-schema.json @@ -1,6 +1,11 @@ +// This tsconfig.json is used when we generate the tsconfig JSON schema { "extends": "./tsconfig.json", "compilerOptions": { - "incremental": false + "incremental": false, + "tsBuildInfoFile": null, + "noEmit": false, + "allowJs": true, + "checkJs": false, } } diff --git a/tsconfig.json b/tsconfig.json index 2b2231bf2..0b879a942 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,14 @@ +// This tsconfig.json drives Intellisense { "$schema": "./tsconfig.schemastore-schema.json", "compilerOptions": { // `target` and `lib` match @tsconfig/bases for node12, since that's the oldest node LTS, so it's the oldest node we support "target": "es2019", "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string", "dom"], - "rootDir": "src", - "outDir": "dist", + "rootDir": ".", + "outDir": "temp", + "tsBuildInfoFile": "temp/tsconfig.tsbuildinfo", + "noEmit": true, "module": "commonjs", "moduleResolution": "node", "strict": true, @@ -16,7 +19,12 @@ "stripInternal": true, "incremental": true, "skipLibCheck": true, - "importsNotUsedAsValues": "error" + "importsNotUsedAsValues": "error", + "allowJs": true, + + // Enable to assist in sanity-checking your changes to JS files, but note you will see many unrelated type errors! + // "checkJs": true, + // "noImplicitAny": false }, "include": [ "src/**/*" diff --git a/website/docs/options.md b/website/docs/options.md index 726741ad1..bcfce5563 100644 --- a/website/docs/options.md +++ b/website/docs/options.md @@ -367,7 +367,7 @@ Disable top-level await in REPL. Equivalent to node's [`--no-experimental-repl- *Default:* Enabled if TypeScript version is 3.8 or higher and target is ES2018 or higher.
*Environment:* `TS_NODE_EXPERIMENTAL_REPL_AWAIT` set `false` to disable -### experimentalResolverFeatures +### experimentalResolver Enable experimental features that re-map imports and require calls to support: `baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings, `outDir` to `rootDir` mappings for composite projects and monorepos. For details, see [#1514](https://github.com/TypeStrong/ts-node/issues/1514) From f166f4441744f86a9dd83af28aa42416b31dd139 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 22:25:57 -0400 Subject: [PATCH 08/30] fix CI? --- scripts/build-pack.js | 2 +- tests/.gitignore | 2 +- tests/nmtest/node_modules/foo/index.ts | 0 tests/nmtest/node_modules/foo/package.json | 0 tests/nmtest/out/index.js | 0 tests/nmtest/out/node_modules/foo/index.d.ts | 0 tests/nmtest/out/node_modules/foo/index.js | 0 tests/nmtest/out/packageFoo/index.d.ts | 0 tests/nmtest/out/packageFoo/index.js | 0 tests/nmtest/out/tsconfig.tsbuildinfo | 1 - tests/nmtest/package.json | 1 - tests/nmtest/packageFoo/index.ts | 0 tests/nmtest/packageFoo/out/index.d.ts | 0 tests/nmtest/packageFoo/out/index.js | 0 tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo | 1 - tests/nmtest/packageFoo/package.json | 1 - tests/nmtest/packageFoo/tsconfig.json | 7 ------- tests/nmtest/tsconfig.json | 13 ------------- .../resolver/junk/dist/in-both-src-and-dist-cts.cjs | 1 - tests/resolver/junk/dist/in-both-src-and-dist-ts.js | 1 - .../resolver/junk/dist/in-both-src-and-dist-tsx.js | 1 - tests/resolver/junk/dist/index-dist-local-byext.js | 4 ---- tests/resolver/junk/dist/index-dist-local.js | 8 -------- tests/resolver/junk/dist/index-dist-to-src-byext.js | 5 ----- tests/resolver/junk/dist/index-dist-to-src.js | 8 -------- tests/resolver/junk/dist/only-in-dist-cts.cjs | 1 - tests/resolver/junk/dist/only-in-dist-ts.js | 1 - .../resolver/junk/src/in-both-src-and-dist-cts.cts | 1 - tests/resolver/junk/src/in-both-src-and-dist-ts.ts | 1 - .../resolver/junk/src/in-both-src-and-dist-tsx.tsx | 1 - tests/resolver/junk/src/index-src-local-byext.js | 8 -------- tests/resolver/junk/src/index-src-local.js | 8 -------- tests/resolver/junk/src/index-src-to-dist-byext.js | 8 -------- tests/resolver/junk/src/index-src-to-dist.js | 8 -------- tests/resolver/junk/src/only-in-src-cts.cts | 1 - tests/resolver/junk/src/only-in-src-ts.ts | 1 - tests/resolver/junk/src/only-in-src-tsx.tsx | 1 - tests/resolver/junk/tsconfig.json | 9 --------- 38 files changed, 2 insertions(+), 103 deletions(-) delete mode 100644 tests/nmtest/node_modules/foo/index.ts delete mode 100644 tests/nmtest/node_modules/foo/package.json delete mode 100644 tests/nmtest/out/index.js delete mode 100644 tests/nmtest/out/node_modules/foo/index.d.ts delete mode 100644 tests/nmtest/out/node_modules/foo/index.js delete mode 100644 tests/nmtest/out/packageFoo/index.d.ts delete mode 100644 tests/nmtest/out/packageFoo/index.js delete mode 100644 tests/nmtest/out/tsconfig.tsbuildinfo delete mode 100644 tests/nmtest/package.json delete mode 100644 tests/nmtest/packageFoo/index.ts delete mode 100644 tests/nmtest/packageFoo/out/index.d.ts delete mode 100644 tests/nmtest/packageFoo/out/index.js delete mode 100644 tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo delete mode 100644 tests/nmtest/packageFoo/package.json delete mode 100644 tests/nmtest/packageFoo/tsconfig.json delete mode 100644 tests/nmtest/tsconfig.json delete mode 100644 tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs delete mode 100644 tests/resolver/junk/dist/in-both-src-and-dist-ts.js delete mode 100644 tests/resolver/junk/dist/in-both-src-and-dist-tsx.js delete mode 100644 tests/resolver/junk/dist/index-dist-local-byext.js delete mode 100644 tests/resolver/junk/dist/index-dist-local.js delete mode 100644 tests/resolver/junk/dist/index-dist-to-src-byext.js delete mode 100644 tests/resolver/junk/dist/index-dist-to-src.js delete mode 100644 tests/resolver/junk/dist/only-in-dist-cts.cjs delete mode 100644 tests/resolver/junk/dist/only-in-dist-ts.js delete mode 100644 tests/resolver/junk/src/in-both-src-and-dist-cts.cts delete mode 100644 tests/resolver/junk/src/in-both-src-and-dist-ts.ts delete mode 100644 tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx delete mode 100644 tests/resolver/junk/src/index-src-local-byext.js delete mode 100644 tests/resolver/junk/src/index-src-local.js delete mode 100644 tests/resolver/junk/src/index-src-to-dist-byext.js delete mode 100644 tests/resolver/junk/src/index-src-to-dist.js delete mode 100644 tests/resolver/junk/src/only-in-src-cts.cts delete mode 100644 tests/resolver/junk/src/only-in-src-ts.ts delete mode 100644 tests/resolver/junk/src/only-in-src-tsx.tsx delete mode 100644 tests/resolver/junk/tsconfig.json diff --git a/scripts/build-pack.js b/scripts/build-pack.js index ac5e19768..830794f4d 100644 --- a/scripts/build-pack.js +++ b/scripts/build-pack.js @@ -23,7 +23,7 @@ exec( console.error(err); process.exit(1); } - const tempTarballPath = join(tempDir, readdirSync(tempDir)[0]); + const tempTarballPath = join(tempDir, readdirSync(tempDir).find(name => name.endsWith('.tgz'))); writeFileSync(tarballPath, readFileSync(tempTarballPath)); unlinkSync(tempTarballPath); rmdirSync(tempDir); diff --git a/tests/.gitignore b/tests/.gitignore index 405b1ced6..33ac13eac 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,4 @@ !from-node-modules/node_modules/ package-lock.json ts-node-packed.tgz -/tmp \ No newline at end of file +/tmp diff --git a/tests/nmtest/node_modules/foo/index.ts b/tests/nmtest/node_modules/foo/index.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/node_modules/foo/package.json b/tests/nmtest/node_modules/foo/package.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/out/index.js b/tests/nmtest/out/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/out/node_modules/foo/index.d.ts b/tests/nmtest/out/node_modules/foo/index.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/out/node_modules/foo/index.js b/tests/nmtest/out/node_modules/foo/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/out/packageFoo/index.d.ts b/tests/nmtest/out/packageFoo/index.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/out/packageFoo/index.js b/tests/nmtest/out/packageFoo/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/out/tsconfig.tsbuildinfo b/tests/nmtest/out/tsconfig.tsbuildinfo deleted file mode 100644 index 42696e6fc..000000000 --- a/tests/nmtest/out/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"program":{"fileNames":["../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../packageFoo/index.ts","../node_modules/foo/index.ts","../../../node_modules/@types/argparse/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/color-name/index.d.ts","../../../node_modules/@types/diff/index.d.ts","../../../node_modules/@types/emscripten/index.d.ts","../../../node_modules/@types/events/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/base.d.ts","../../../node_modules/@types/node/ts3.2/fs.d.ts","../../../node_modules/@types/node/ts3.2/util.d.ts","../../../node_modules/@types/node/ts3.2/globals.d.ts","../../../node_modules/@types/node/ts3.2/base.d.ts","../../../node_modules/@types/node/ts3.5/wasi.d.ts","../../../node_modules/@types/node/ts3.5/base.d.ts","../../../node_modules/@types/node/ts3.7/assert.d.ts","../../../node_modules/@types/node/ts3.7/base.d.ts","../../../node_modules/@types/node/ts3.7/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/glob/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/lodash/ts3.1/common/common.d.ts","../../../node_modules/@types/lodash/ts3.1/common/array.d.ts","../../../node_modules/@types/lodash/ts3.1/common/collection.d.ts","../../../node_modules/@types/lodash/ts3.1/common/date.d.ts","../../../node_modules/@types/lodash/ts3.1/common/function.d.ts","../../../node_modules/@types/lodash/ts3.1/common/lang.d.ts","../../../node_modules/@types/lodash/ts3.1/common/math.d.ts","../../../node_modules/@types/lodash/ts3.1/common/number.d.ts","../../../node_modules/@types/lodash/ts3.1/common/object.d.ts","../../../node_modules/@types/lodash/ts3.1/common/seq.d.ts","../../../node_modules/@types/lodash/ts3.1/common/string.d.ts","../../../node_modules/@types/lodash/ts3.1/common/util.d.ts","../../../node_modules/@types/lodash/ts3.1/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/retry/index.d.ts","../../../node_modules/@types/proper-lockfile/index.d.ts","../../../node_modules/@types/proxyquire/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/rimraf/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646",{"version":"514f46744035160ab6d90ee6528f2a27a0b787427a0a7d7892a5c960066df47e","affectsGlobalScope":true},"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","162cb6760a1fb4c786a745093431e3279ad005db5c19c2cc95f1906becb6b021",{"version":"4a72ef2edbfb19987b3bc76cc56953cb19217c01c955fe6f37707b547091c024","affectsGlobalScope":true},"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935",{"version":"9d0b32c595a2e0d320a56b3d0e8f0a317e4149239ec913aa8f11eeb73edc92be","affectsGlobalScope":true},"96e547b51f95ee76bdb25731c92420fa6f93b59c3f38f23d505be36e2de394ee","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","3ca89ecb953fe3b63dae41e5bb986506e812754dde0369c5fe61de26eff47dbe","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d56c93b6bf66e602869e926ddc8b1b4630d1ff397909291767d18d4ffc22d33f","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","5ffa4219ee64e130980a4231392cbc628544df137ccf650ae8d76e0a1744fd2b","e1a12c7e7951b9762cfbcc43c72eb5611120967706a7c3142ad303c6b7ee767f","b5fd0a137bd6d0afe291d465e99c7469b082b66b3ee89273b3b22801b6c2948e","873da589b78a1f1fa7d623483bd2c2730a02e0852259fb8fdcfe5221ac51d18a","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c","a376e245f494b58365a4391a2568e6dd9da372c3453f4732eb6e15ebb9038451","ffe8912b7c45288810c870b768190c6c097459930a587dd6ef0d900a5529a811","f53678bdb9f25445c8cdf021f2b003b74fd638e69bb1959dde8e370e8cc1e4fa","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","d74b8e644da7415e3757a17a42b7f284597b577e3c87b80f4b3ba0cc2db1184f","7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","893d1b5dd98f1c01a0ec4122dfd7f774e0fa1560e1aa19e509c96ed543c6244e","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","5ff4ecfd544d596de3c8011a6d44c59443c85e1f99065095e556b15237eb39ac","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"8a70903bbbdad1d58e3936ca90b3ad993e54827ea324e20f2f63cef4e14e9d55","0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","d8f4f38ca537e6e6d38579c881125b81b546ffae0dd216f68269e72636af43ae","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","d852d6282c8dc8156d26d6bda83ab4bde51fee05ba2fe0ecdc165ddda009d3ee","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","4025cf62742c5bb3d383c8a62342481622c87e3397ea5e7b7baab18b9efd5798","c21830111d49a5cd7a9f384370db5b41c659d045fe920bcac1cc9f507c88125d","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","035b95793288bf4457a2b80bfe9b7500a29324ad62adcf9991277198e8833096","c2d47e5668f89ed8768d306919c42bb88d50d4029d68f58343141360895cfcc0","65648639567d214f62c1b21d200c852807e68bdb08311f95ab6f526ef5b98995","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","7fc5a3d7cff296cea5c225911726a56283b663328709088fcc912d61f73682fc","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","e34f3f6159b1e23de9bb5521382795aaa5aaed6f53b4702e70a2ec45bc76ddb5","2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5",{"version":"bbf144d4354e2aaa6439f32761f3ee798cc68d1600adab6e2a596f25269f106d","affectsGlobalScope":true},"c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","3a1b96d993dbbb8d6fb9740714daa605bcdbbb751143851a431f388948e37ce1","2bca896d780555ea2b1d74895833067da5410b312f7bb1baa99ca1502b79d09c",{"version":"989a02f06c40e911bf5bbecba5669d1fa5fff2bf25ffdb3937aeed166aa60a94","affectsGlobalScope":true},{"version":"0d0202f2947aad59e475735a139dc857c0c4b74d0b662c0e20c763452e2b8325","affectsGlobalScope":true},"ad23ef9834b5b8819ca9da91e9d534514d47d31d33fa384d82697c7b9502572c","9e6975cf0b1095af433b1eebd0498af85a02f1d7cd7e9cca19a837229e9b6722","f25b858b85a866a2c2d3d76931015f461f2411ed1f9632c5078f6057395a2953","aa1edccbdbf6d46ee703e645343b63fc9f55298aade357b9a32d39a6c1c7df63","55ca133bf28d14756551b14403db076ca40abdb9dd1cdc0ac5f9e69e75305f3a","1a32e8f6e0b0355b38b1b84468d87569aa8dd417413acf1b0401d2635ced092d","e5995912322aa71d87fd9e3b52c7079ec462b3ba298a326f0f04646b6437c0e4","e59b506fa1621eaa48567155a73cc264fb69597234500962d5c99ca2cbf5dcfd","1d874fdf6944039b9a841f14f9acf225c636b4076d0e4acf6b7a7b88291ad117","fcca9875c9a0617fbe8008ad2d2df300c19f54296907834c56c77c2a9411e841","ffebeb335146d8a85fae6627a1777ca7fb4b833ed2ed147dfe71691ce2b36e8e","ea68d3bdeb7fc7a39772ff27d21e01a6a6c68c12877ba960d314649389ffd111","34de169048a5267c472e1cf562c4a575e805683ea18f88518019f624a23e53d9","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","9eb2875a1e4c583066af7d6194ea8162191b2756e5d87ccb3c562fdf74d06869","2155c677d647aad82674498fd473cf77598355ef479844224f79bc4a1e4fffce","3cec507f07190f2fdffb93b3a3ea2b161061015d16fac9ee48d0bf717631310a","271095be81df8b130167e2cfa1882d84280a8bcffa59b50716e57818bbe9ad6d","a982221baea5467bbbaddf1d46c3fdfab20073c7ced35869feecfcb4e39c28ac","94b06460133208aaf61f01d6be479cba513c2413ad52645a9806c69e65a04b17","5d4a5730e1d010e2b117ee1e9876783586f8c9e9da1976664fc0ff3bdcfb0ed6","2a4bc0a2dfb607d4dc64ddf4a8bd95675c4b344170075d080617040ca8f8788b","ba2734a02d311863f7758f9bd258d7f5e67b58c5d002e3f87951607171c1eef4","908877cfe2edfff50b94c312bed96ac6cd74a5e93ee471de1bfe7ed7ef861e74","44b157ef6c4ded3f6b0a0494c899edb4502e7c7cf38193b3693efa4d9a94810e","5ff56f6c2212fd5fb5ba2435282ed35021962ed3dbbd3a46fe973985bb73f70f","c2d595df1bad709f1d861e5b874c31bed79c19aaa6b10b9ec16b44b597d12afb","5bc76884b68fd1156fa9b32d26c380a2b00a5f9fb499ce24929cc94f72fd8a9e","f4bfabb664153ca62c78d996c8f7d4ecd15edbbc8d18819e96d7435cdb821939","06c2c4176ef57591d1e6c7008d52d71372efddbbd81bb0139efb770a36812af7","16df90604f2c60da2687efe67de611ba323b2e6a922874bf31ec6aad72e08ed2","c74a0c397b3e35eb3fa7098c413f6908495d1fe1254e4d373a72da8eef999b63","ead194b3eca20113ac04b5c7cd76a59b451df84bd84df9ebb8cdc0ab545cb097","697882d97df41aacc1ecb9320483ad6da7ef51f73c8d9118f71048f3c3a80b7d","99c08b6b0d65c0ec55411a55bc0ac7673835a7c1565ecc6f314bf78330ce7d95","f09b5b78b5c31d85a57e5ea5491dec61a1f666a6d7ddc04fada0ba641aaeb8f5","453ab4b37dd377e9c7371183c22a1a8550ccb19899cac5be4994044b878e306b","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","1e9c6c8763e567c465a7c6517393cff9b96afd337bb30f1fe8c09e135cf1ed19","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","1db6491f25ced62f23f06d1f3700a790df0971726acb33669bbf4a8de2f769a9"],"options":{"composite":true,"outDir":"./","rootDir":".."},"fileIdsList":[[52,74,80,81],[51,52,74,80,81,88,89],[52,74,80,81,91],[52,74,80,81,92],[52,74,80,81,95,97,98,99,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,98,99,100,101,102,103,104,105,106,107],[52,74,80,81,96,97,98,99,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,99,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,100,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,101,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,102,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,103,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,104,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,105,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,104,106,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,104,105,107],[52,74,80,81,95,96,97,98,99,100,101,102,103,104,105,106],[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,80,81],[51,52,58,67,74,80,81],[43,51,52,58,74,80,81],[47,52,59,74,80,81],[52,67,74,80,81],[49,51,52,58,74,80,81],[51,52,74,80,81],[51,67,73,74,80,81],[51,52,58,67,73,74,80,81],[51,52,53,58,67,70,73,74,80,81],[51,52,53,70,73,74,80,81],[52,73,74,80,81],[49,51,52,67,74,80,81],[41,52,74,80,81],[52,72,74,80,81],[51,52,67,74,80,81],[52,65,74,76,80,81],[47,49,52,58,67,74,80,81],[52,74,79,80,81,82],[52,74,81],[40,52,74,80,81],[52,74,80],[52,74,80,81,83,84],[52,74,80,81,85,86],[52,74,80,81,87],[52,58,74,80,81],[52,64,74,80,81],[52,80,81],[51,52,67,73,74,76,80,81],[52,74,80,81,109],[52,74,80,81,112],[52,74,80,81,88,90],[52,74,80,81,115,152],[52,74,80,81,115,139,152],[52,74,80,81,152],[52,74,80,81,115],[52,74,80,81,115,140,152],[52,74,80,81,88,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151],[52,74,80,81,140,152],[52,74,80,81,154]],"referencedMap":[[34,1],[35,1],[36,1],[37,1],[38,1],[39,1],[90,2],[91,1],[92,3],[93,4],[94,1],[96,5],[97,6],[95,7],[98,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[89,1],[41,1],[79,18],[42,1],[43,19],[44,20],[45,1],[46,21],[47,22],[48,23],[49,1],[50,24],[51,1],[52,25],[40,1],[53,26],[54,27],[55,28],[56,24],[57,29],[58,30],[59,1],[60,1],[61,31],[62,32],[63,1],[64,1],[65,33],[66,34],[67,24],[68,1],[69,1],[70,35],[71,1],[83,36],[80,37],[82,38],[81,39],[85,40],[84,1],[86,1],[87,41],[88,42],[72,43],[73,44],[74,45],[75,22],[76,1],[77,46],[78,22],[108,1],[110,47],[111,1],[112,1],[113,48],[109,1],[114,49],[139,50],[140,51],[115,52],[118,52],[137,50],[138,50],[128,53],[127,53],[125,50],[120,50],[133,50],[131,50],[135,50],[119,50],[132,50],[136,50],[121,50],[122,50],[134,50],[116,50],[123,50],[124,50],[126,50],[130,50],[141,54],[129,50],[117,50],[152,55],[151,1],[148,54],[150,56],[149,54],[142,54],[143,54],[145,54],[147,54],[144,56],[146,56],[153,1],[154,1],[155,57],[33,1],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"exportedModulesMap":[[34,1],[35,1],[36,1],[37,1],[38,1],[39,1],[90,2],[91,1],[92,3],[93,4],[94,1],[96,5],[97,6],[95,7],[98,8],[99,9],[100,10],[101,11],[102,12],[103,13],[104,14],[105,15],[106,16],[107,17],[89,1],[41,1],[79,18],[42,1],[43,19],[44,20],[45,1],[46,21],[47,22],[48,23],[49,1],[50,24],[51,1],[52,25],[40,1],[53,26],[54,27],[55,28],[56,24],[57,29],[58,30],[59,1],[60,1],[61,31],[62,32],[63,1],[64,1],[65,33],[66,34],[67,24],[68,1],[69,1],[70,35],[71,1],[83,36],[80,37],[82,38],[81,39],[85,40],[84,1],[86,1],[87,41],[88,42],[72,43],[73,44],[74,45],[75,22],[76,1],[77,46],[78,22],[108,1],[110,47],[111,1],[112,1],[113,48],[109,1],[114,49],[139,50],[140,51],[115,52],[118,52],[137,50],[138,50],[128,53],[127,53],[125,50],[120,50],[133,50],[131,50],[135,50],[119,50],[132,50],[136,50],[121,50],[122,50],[134,50],[116,50],[123,50],[124,50],[126,50],[130,50],[141,54],[129,50],[117,50],[152,55],[151,1],[148,54],[150,56],[149,54],[142,54],[143,54],[145,54],[147,54],[144,56],[146,56],[153,1],[154,1],[155,57],[33,1],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"semanticDiagnosticsPerFile":[34,35,36,37,38,39,90,91,92,93,94,96,97,95,98,99,100,101,102,103,104,105,106,107,89,41,79,42,43,44,45,46,47,48,49,50,51,52,40,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,83,80,82,81,85,84,86,87,88,72,73,74,75,76,77,78,108,110,111,112,113,109,114,139,140,115,118,137,138,128,127,125,120,133,131,135,119,132,136,121,122,134,116,123,124,126,130,141,129,117,152,151,148,150,149,142,143,145,147,144,146,153,154,155,33,32,1,7,11,10,3,12,13,14,15,16,17,18,19,4,5,23,20,21,22,24,25,26,6,27,28,29,30,2,31,9,8]},"version":"4.3.5"} \ No newline at end of file diff --git a/tests/nmtest/package.json b/tests/nmtest/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/nmtest/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/nmtest/packageFoo/index.ts b/tests/nmtest/packageFoo/index.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/packageFoo/out/index.d.ts b/tests/nmtest/packageFoo/out/index.d.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/packageFoo/out/index.js b/tests/nmtest/packageFoo/out/index.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo b/tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo deleted file mode 100644 index 7a7e676e9..000000000 --- a/tests/nmtest/packageFoo/out/tsconfig.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"program":{"fileNames":["../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.dom.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.scripthost.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../../home/cspotcode/.volta/tools/image/packages/typescript/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts","../index.ts","../../../../node_modules/@types/argparse/index.d.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/color-name/index.d.ts","../../../../node_modules/@types/diff/index.d.ts","../../../../node_modules/@types/emscripten/index.d.ts","../../../../node_modules/@types/events/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/ts3.2/fs.d.ts","../../../../node_modules/@types/node/ts3.2/util.d.ts","../../../../node_modules/@types/node/ts3.2/globals.d.ts","../../../../node_modules/@types/node/ts3.2/base.d.ts","../../../../node_modules/@types/node/ts3.5/wasi.d.ts","../../../../node_modules/@types/node/ts3.5/base.d.ts","../../../../node_modules/@types/node/ts3.7/assert.d.ts","../../../../node_modules/@types/node/ts3.7/base.d.ts","../../../../node_modules/@types/node/ts3.7/index.d.ts","../../../../node_modules/@types/minimatch/index.d.ts","../../../../node_modules/@types/glob/index.d.ts","../../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../../node_modules/@types/istanbul-reports/index.d.ts","../../../../node_modules/@types/json-schema/index.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/common.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/array.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/collection.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/date.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/function.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/lang.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/math.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/number.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/object.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/seq.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/string.d.ts","../../../../node_modules/@types/lodash/ts3.1/common/util.d.ts","../../../../node_modules/@types/lodash/ts3.1/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/@types/retry/index.d.ts","../../../../node_modules/@types/proper-lockfile/index.d.ts","../../../../node_modules/@types/proxyquire/index.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/rimraf/index.d.ts","../../../../node_modules/@types/semver/classes/semver.d.ts","../../../../node_modules/@types/semver/functions/parse.d.ts","../../../../node_modules/@types/semver/functions/valid.d.ts","../../../../node_modules/@types/semver/functions/clean.d.ts","../../../../node_modules/@types/semver/functions/inc.d.ts","../../../../node_modules/@types/semver/functions/diff.d.ts","../../../../node_modules/@types/semver/functions/major.d.ts","../../../../node_modules/@types/semver/functions/minor.d.ts","../../../../node_modules/@types/semver/functions/patch.d.ts","../../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../../node_modules/@types/semver/functions/compare.d.ts","../../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../../node_modules/@types/semver/functions/sort.d.ts","../../../../node_modules/@types/semver/functions/rsort.d.ts","../../../../node_modules/@types/semver/functions/gt.d.ts","../../../../node_modules/@types/semver/functions/lt.d.ts","../../../../node_modules/@types/semver/functions/eq.d.ts","../../../../node_modules/@types/semver/functions/neq.d.ts","../../../../node_modules/@types/semver/functions/gte.d.ts","../../../../node_modules/@types/semver/functions/lte.d.ts","../../../../node_modules/@types/semver/functions/cmp.d.ts","../../../../node_modules/@types/semver/functions/coerce.d.ts","../../../../node_modules/@types/semver/classes/comparator.d.ts","../../../../node_modules/@types/semver/classes/range.d.ts","../../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../../node_modules/@types/semver/ranges/valid.d.ts","../../../../node_modules/@types/semver/ranges/outside.d.ts","../../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../../node_modules/@types/semver/index.d.ts","../../../../node_modules/@types/stack-utils/index.d.ts","../../../../node_modules/@types/yargs-parser/index.d.ts","../../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","dc3b172ee27054dbcedcf5007b78c256021db936f6313a9ce9a3ecbb503fd646",{"version":"514f46744035160ab6d90ee6528f2a27a0b787427a0a7d7892a5c960066df47e","affectsGlobalScope":true},"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","162cb6760a1fb4c786a745093431e3279ad005db5c19c2cc95f1906becb6b021",{"version":"4a72ef2edbfb19987b3bc76cc56953cb19217c01c955fe6f37707b547091c024","affectsGlobalScope":true},"400db42c3a46984118bff14260d60cec580057dc1ab4c2d7310beb643e4f5935",{"version":"9d0b32c595a2e0d320a56b3d0e8f0a317e4149239ec913aa8f11eeb73edc92be","affectsGlobalScope":true},"96e547b51f95ee76bdb25731c92420fa6f93b59c3f38f23d505be36e2de394ee","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","3ca89ecb953fe3b63dae41e5bb986506e812754dde0369c5fe61de26eff47dbe","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d56c93b6bf66e602869e926ddc8b1b4630d1ff397909291767d18d4ffc22d33f","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","5ffa4219ee64e130980a4231392cbc628544df137ccf650ae8d76e0a1744fd2b","e1a12c7e7951b9762cfbcc43c72eb5611120967706a7c3142ad303c6b7ee767f","b5fd0a137bd6d0afe291d465e99c7469b082b66b3ee89273b3b22801b6c2948e","873da589b78a1f1fa7d623483bd2c2730a02e0852259fb8fdcfe5221ac51d18a","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","4218ced3933a31eed1278d350dd63c5900df0f0904f57d61c054d7a4b83dbe4c","a376e245f494b58365a4391a2568e6dd9da372c3453f4732eb6e15ebb9038451","ffe8912b7c45288810c870b768190c6c097459930a587dd6ef0d900a5529a811","f53678bdb9f25445c8cdf021f2b003b74fd638e69bb1959dde8e370e8cc1e4fa","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","d74b8e644da7415e3757a17a42b7f284597b577e3c87b80f4b3ba0cc2db1184f","7e62aac2cc9c0710d772047ad89e8d7117f52592c791eb995ce1f865fedab432","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","893d1b5dd98f1c01a0ec4122dfd7f774e0fa1560e1aa19e509c96ed543c6244e","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","5ff4ecfd544d596de3c8011a6d44c59443c85e1f99065095e556b15237eb39ac","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"8a70903bbbdad1d58e3936ca90b3ad993e54827ea324e20f2f63cef4e14e9d55","0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","d8f4f38ca537e6e6d38579c881125b81b546ffae0dd216f68269e72636af43ae","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","d852d6282c8dc8156d26d6bda83ab4bde51fee05ba2fe0ecdc165ddda009d3ee","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","4025cf62742c5bb3d383c8a62342481622c87e3397ea5e7b7baab18b9efd5798","c21830111d49a5cd7a9f384370db5b41c659d045fe920bcac1cc9f507c88125d","0c75b204aed9cf6ff1c7b4bed87a3ece0d9d6fc857a6350c0c95ed0c38c814e8","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","035b95793288bf4457a2b80bfe9b7500a29324ad62adcf9991277198e8833096","c2d47e5668f89ed8768d306919c42bb88d50d4029d68f58343141360895cfcc0","65648639567d214f62c1b21d200c852807e68bdb08311f95ab6f526ef5b98995","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","7fc5a3d7cff296cea5c225911726a56283b663328709088fcc912d61f73682fc","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","e34f3f6159b1e23de9bb5521382795aaa5aaed6f53b4702e70a2ec45bc76ddb5","2630a7cbb597e85d713b7ef47f2946d4280d3d4c02733282770741d40672b1a5",{"version":"bbf144d4354e2aaa6439f32761f3ee798cc68d1600adab6e2a596f25269f106d","affectsGlobalScope":true},"c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","3a1b96d993dbbb8d6fb9740714daa605bcdbbb751143851a431f388948e37ce1","2bca896d780555ea2b1d74895833067da5410b312f7bb1baa99ca1502b79d09c",{"version":"989a02f06c40e911bf5bbecba5669d1fa5fff2bf25ffdb3937aeed166aa60a94","affectsGlobalScope":true},{"version":"0d0202f2947aad59e475735a139dc857c0c4b74d0b662c0e20c763452e2b8325","affectsGlobalScope":true},"ad23ef9834b5b8819ca9da91e9d534514d47d31d33fa384d82697c7b9502572c","9e6975cf0b1095af433b1eebd0498af85a02f1d7cd7e9cca19a837229e9b6722","f25b858b85a866a2c2d3d76931015f461f2411ed1f9632c5078f6057395a2953","aa1edccbdbf6d46ee703e645343b63fc9f55298aade357b9a32d39a6c1c7df63","55ca133bf28d14756551b14403db076ca40abdb9dd1cdc0ac5f9e69e75305f3a","1a32e8f6e0b0355b38b1b84468d87569aa8dd417413acf1b0401d2635ced092d","e5995912322aa71d87fd9e3b52c7079ec462b3ba298a326f0f04646b6437c0e4","e59b506fa1621eaa48567155a73cc264fb69597234500962d5c99ca2cbf5dcfd","1d874fdf6944039b9a841f14f9acf225c636b4076d0e4acf6b7a7b88291ad117","fcca9875c9a0617fbe8008ad2d2df300c19f54296907834c56c77c2a9411e841","ffebeb335146d8a85fae6627a1777ca7fb4b833ed2ed147dfe71691ce2b36e8e","ea68d3bdeb7fc7a39772ff27d21e01a6a6c68c12877ba960d314649389ffd111","34de169048a5267c472e1cf562c4a575e805683ea18f88518019f624a23e53d9","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","9eb2875a1e4c583066af7d6194ea8162191b2756e5d87ccb3c562fdf74d06869","2155c677d647aad82674498fd473cf77598355ef479844224f79bc4a1e4fffce","3cec507f07190f2fdffb93b3a3ea2b161061015d16fac9ee48d0bf717631310a","271095be81df8b130167e2cfa1882d84280a8bcffa59b50716e57818bbe9ad6d","a982221baea5467bbbaddf1d46c3fdfab20073c7ced35869feecfcb4e39c28ac","94b06460133208aaf61f01d6be479cba513c2413ad52645a9806c69e65a04b17","5d4a5730e1d010e2b117ee1e9876783586f8c9e9da1976664fc0ff3bdcfb0ed6","2a4bc0a2dfb607d4dc64ddf4a8bd95675c4b344170075d080617040ca8f8788b","ba2734a02d311863f7758f9bd258d7f5e67b58c5d002e3f87951607171c1eef4","908877cfe2edfff50b94c312bed96ac6cd74a5e93ee471de1bfe7ed7ef861e74","44b157ef6c4ded3f6b0a0494c899edb4502e7c7cf38193b3693efa4d9a94810e","5ff56f6c2212fd5fb5ba2435282ed35021962ed3dbbd3a46fe973985bb73f70f","c2d595df1bad709f1d861e5b874c31bed79c19aaa6b10b9ec16b44b597d12afb","5bc76884b68fd1156fa9b32d26c380a2b00a5f9fb499ce24929cc94f72fd8a9e","f4bfabb664153ca62c78d996c8f7d4ecd15edbbc8d18819e96d7435cdb821939","06c2c4176ef57591d1e6c7008d52d71372efddbbd81bb0139efb770a36812af7","16df90604f2c60da2687efe67de611ba323b2e6a922874bf31ec6aad72e08ed2","c74a0c397b3e35eb3fa7098c413f6908495d1fe1254e4d373a72da8eef999b63","ead194b3eca20113ac04b5c7cd76a59b451df84bd84df9ebb8cdc0ab545cb097","697882d97df41aacc1ecb9320483ad6da7ef51f73c8d9118f71048f3c3a80b7d","99c08b6b0d65c0ec55411a55bc0ac7673835a7c1565ecc6f314bf78330ce7d95","f09b5b78b5c31d85a57e5ea5491dec61a1f666a6d7ddc04fada0ba641aaeb8f5","453ab4b37dd377e9c7371183c22a1a8550ccb19899cac5be4994044b878e306b","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","1e9c6c8763e567c465a7c6517393cff9b96afd337bb30f1fe8c09e135cf1ed19","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","1db6491f25ced62f23f06d1f3700a790df0971726acb33669bbf4a8de2f769a9"],"options":{"composite":true,"outDir":"./","rootDir":".."},"fileIdsList":[[51,73,79,80],[50,51,73,79,80,87,88],[51,73,79,80,90],[51,73,79,80,91],[51,73,79,80,94,96,97,98,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,97,98,99,100,101,102,103,104,105,106],[51,73,79,80,95,96,97,98,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,98,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,99,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,100,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,101,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,102,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,103,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,104,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,103,105,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,103,104,106],[51,73,79,80,94,95,96,97,98,99,100,101,102,103,104,105],[39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,79,80],[50,51,57,66,73,79,80],[42,50,51,57,73,79,80],[46,51,58,73,79,80],[51,66,73,79,80],[48,50,51,57,73,79,80],[50,51,73,79,80],[50,66,72,73,79,80],[50,51,57,66,72,73,79,80],[50,51,52,57,66,69,72,73,79,80],[50,51,52,69,72,73,79,80],[51,72,73,79,80],[48,50,51,66,73,79,80],[40,51,73,79,80],[51,71,73,79,80],[50,51,66,73,79,80],[51,64,73,75,79,80],[46,48,51,57,66,73,79,80],[51,73,78,79,80,81],[51,73,80],[39,51,73,79,80],[51,73,79],[51,73,79,80,82,83],[51,73,79,80,84,85],[51,73,79,80,86],[51,57,73,79,80],[51,63,73,79,80],[51,79,80],[50,51,66,72,73,75,79,80],[51,73,79,80,108],[51,73,79,80,111],[51,73,79,80,87,89],[51,73,79,80,114,151],[51,73,79,80,114,138,151],[51,73,79,80,151],[51,73,79,80,114],[51,73,79,80,114,139,151],[51,73,79,80,87,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],[51,73,79,80,139,151],[51,73,79,80,153]],"referencedMap":[[33,1],[34,1],[35,1],[36,1],[37,1],[38,1],[89,2],[90,1],[91,3],[92,4],[93,1],[95,5],[96,6],[94,7],[97,8],[98,9],[99,10],[100,11],[101,12],[102,13],[103,14],[104,15],[105,16],[106,17],[88,1],[40,1],[78,18],[41,1],[42,19],[43,20],[44,1],[45,21],[46,22],[47,23],[48,1],[49,24],[50,1],[51,25],[39,1],[52,26],[53,27],[54,28],[55,24],[56,29],[57,30],[58,1],[59,1],[60,31],[61,32],[62,1],[63,1],[64,33],[65,34],[66,24],[67,1],[68,1],[69,35],[70,1],[82,36],[79,37],[81,38],[80,39],[84,40],[83,1],[85,1],[86,41],[87,42],[71,43],[72,44],[73,45],[74,22],[75,1],[76,46],[77,22],[107,1],[109,47],[110,1],[111,1],[112,48],[108,1],[113,49],[138,50],[139,51],[114,52],[117,52],[136,50],[137,50],[127,53],[126,53],[124,50],[119,50],[132,50],[130,50],[134,50],[118,50],[131,50],[135,50],[120,50],[121,50],[133,50],[115,50],[122,50],[123,50],[125,50],[129,50],[140,54],[128,50],[116,50],[151,55],[150,1],[147,54],[149,56],[148,54],[141,54],[142,54],[144,54],[146,54],[143,56],[145,56],[152,1],[153,1],[154,57],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"exportedModulesMap":[[33,1],[34,1],[35,1],[36,1],[37,1],[38,1],[89,2],[90,1],[91,3],[92,4],[93,1],[95,5],[96,6],[94,7],[97,8],[98,9],[99,10],[100,11],[101,12],[102,13],[103,14],[104,15],[105,16],[106,17],[88,1],[40,1],[78,18],[41,1],[42,19],[43,20],[44,1],[45,21],[46,22],[47,23],[48,1],[49,24],[50,1],[51,25],[39,1],[52,26],[53,27],[54,28],[55,24],[56,29],[57,30],[58,1],[59,1],[60,31],[61,32],[62,1],[63,1],[64,33],[65,34],[66,24],[67,1],[68,1],[69,35],[70,1],[82,36],[79,37],[81,38],[80,39],[84,40],[83,1],[85,1],[86,41],[87,42],[71,43],[72,44],[73,45],[74,22],[75,1],[76,46],[77,22],[107,1],[109,47],[110,1],[111,1],[112,48],[108,1],[113,49],[138,50],[139,51],[114,52],[117,52],[136,50],[137,50],[127,53],[126,53],[124,50],[119,50],[132,50],[130,50],[134,50],[118,50],[131,50],[135,50],[120,50],[121,50],[133,50],[115,50],[122,50],[123,50],[125,50],[129,50],[140,54],[128,50],[116,50],[151,55],[150,1],[147,54],[149,56],[148,54],[141,54],[142,54],[144,54],[146,54],[143,56],[145,56],[152,1],[153,1],[154,57],[32,1],[1,1],[7,1],[11,1],[10,1],[3,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[4,1],[5,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[6,1],[27,1],[28,1],[29,1],[30,1],[2,1],[31,1],[9,1],[8,1]],"semanticDiagnosticsPerFile":[33,34,35,36,37,38,89,90,91,92,93,95,96,94,97,98,99,100,101,102,103,104,105,106,88,40,78,41,42,43,44,45,46,47,48,49,50,51,39,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,82,79,81,80,84,83,85,86,87,71,72,73,74,75,76,77,107,109,110,111,112,108,113,138,139,114,117,136,137,127,126,124,119,132,130,134,118,131,135,120,121,133,115,122,123,125,129,140,128,116,151,150,147,149,148,141,142,144,146,143,145,152,153,154,32,1,7,11,10,3,12,13,14,15,16,17,18,19,4,5,23,20,21,22,24,25,26,6,27,28,29,30,2,31,9,8]},"version":"4.3.5"} \ No newline at end of file diff --git a/tests/nmtest/packageFoo/package.json b/tests/nmtest/packageFoo/package.json deleted file mode 100644 index 0967ef424..000000000 --- a/tests/nmtest/packageFoo/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/tests/nmtest/packageFoo/tsconfig.json b/tests/nmtest/packageFoo/tsconfig.json deleted file mode 100644 index a7b54e05e..000000000 --- a/tests/nmtest/packageFoo/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "rootDir": ".", - "outDir": "out" - } -} diff --git a/tests/nmtest/tsconfig.json b/tests/nmtest/tsconfig.json deleted file mode 100644 index c2d788be7..000000000 --- a/tests/nmtest/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "include": ["**/*", "node_modules"], - "references": [ - { - "path": "packageFoo/tsconfig.json" - } - ], - "compilerOptions": { - "composite": true, - "rootDir": ".", - "outDir": "out" - } -} diff --git a/tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs b/tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs deleted file mode 100644 index bc9a37930..000000000 --- a/tests/resolver/junk/dist/in-both-src-and-dist-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/in-both-src-and-dist-ts.js b/tests/resolver/junk/dist/in-both-src-and-dist-ts.js deleted file mode 100644 index bc9a37930..000000000 --- a/tests/resolver/junk/dist/in-both-src-and-dist-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/in-both-src-and-dist-tsx.js b/tests/resolver/junk/dist/in-both-src-and-dist-tsx.js deleted file mode 100644 index bc9a37930..000000000 --- a/tests/resolver/junk/dist/in-both-src-and-dist-tsx.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/index-dist-local-byext.js b/tests/resolver/junk/dist/index-dist-local-byext.js deleted file mode 100644 index ddb447e7f..000000000 --- a/tests/resolver/junk/dist/index-dist-local-byext.js +++ /dev/null @@ -1,4 +0,0 @@ -require('./in-both-src-and-dist-byext.js.js'); -require('./in-both-src-and-dist-tsx-byext.js.js'); -require('./only-in-src-byext.js.js'); -require('./only-in-src-tsx-byext.jsx.js'); diff --git a/tests/resolver/junk/dist/index-dist-local.js b/tests/resolver/junk/dist/index-dist-local.js deleted file mode 100644 index 56a1dbb43..000000000 --- a/tests/resolver/junk/dist/index-dist-local.js +++ /dev/null @@ -1,8 +0,0 @@ -require('./in-both-src-and-dist-ts'); -require('./in-both-src-and-dist-tsx'); -require('./in-both-src-and-dist-byext.js.js'); -require('./in-both-src-and-dist-tsx-byext.js.js'); -require('./only-in-src'); -require('./only-in-src-tsx'); -require('./only-in-src-byext.js.js'); -require('./only-in-src-tsx-byext.jsx.js'); diff --git a/tests/resolver/junk/dist/index-dist-to-src-byext.js b/tests/resolver/junk/dist/index-dist-to-src-byext.js deleted file mode 100644 index e5a5b05fa..000000000 --- a/tests/resolver/junk/dist/index-dist-to-src-byext.js +++ /dev/null @@ -1,5 +0,0 @@ -require('./in-both-src-and-dist-ts.js'); -require('./in-both-src-and-dist-tsx.js'); -require('./in-both-src-and-dist-cts.cjs'); -require('../src/only-in-src-ts.js'); -require('../src/only-in-src-tsx.jsx'); diff --git a/tests/resolver/junk/dist/index-dist-to-src.js b/tests/resolver/junk/dist/index-dist-to-src.js deleted file mode 100644 index 10254cde6..000000000 --- a/tests/resolver/junk/dist/index-dist-to-src.js +++ /dev/null @@ -1,8 +0,0 @@ -require('./in-both-src-and-dist-ts'); -require('./in-both-src-and-dist-tsx'); -require('./in-both-src-and-dist-byext.js.js'); -require('./in-both-src-and-dist-tsx-byext.js.js'); -require('../src/only-in-src-ts'); -require('../src/only-in-src-tsx'); -require('../src/only-in-src-byext.js'); -require('../src/only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/dist/only-in-dist-cts.cjs b/tests/resolver/junk/dist/only-in-dist-cts.cjs deleted file mode 100644 index bc9a37930..000000000 --- a/tests/resolver/junk/dist/only-in-dist-cts.cjs +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/dist/only-in-dist-ts.js b/tests/resolver/junk/dist/only-in-dist-ts.js deleted file mode 100644 index bc9a37930..000000000 --- a/tests/resolver/junk/dist/only-in-dist-ts.js +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'dist'); diff --git a/tests/resolver/junk/src/in-both-src-and-dist-cts.cts b/tests/resolver/junk/src/in-both-src-and-dist-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/junk/src/in-both-src-and-dist-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/in-both-src-and-dist-ts.ts b/tests/resolver/junk/src/in-both-src-and-dist-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/junk/src/in-both-src-and-dist-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx b/tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/junk/src/in-both-src-and-dist-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/index-src-local-byext.js b/tests/resolver/junk/src/index-src-local-byext.js deleted file mode 100644 index c140ac178..000000000 --- a/tests/resolver/junk/src/index-src-local-byext.js +++ /dev/null @@ -1,8 +0,0 @@ -require('./in-both-src-and-dist-ts'); -require('./in-both-src-and-dist-tsx'); -require('./in-both-src-and-dist-byext.js'); -require('./in-both-src-and-dist-tsx-byext.jsx'); -require('./only-in-src-ts'); -require('./only-in-src-tsx'); -require('./only-in-src-byext.js'); -require('./only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/index-src-local.js b/tests/resolver/junk/src/index-src-local.js deleted file mode 100644 index c140ac178..000000000 --- a/tests/resolver/junk/src/index-src-local.js +++ /dev/null @@ -1,8 +0,0 @@ -require('./in-both-src-and-dist-ts'); -require('./in-both-src-and-dist-tsx'); -require('./in-both-src-and-dist-byext.js'); -require('./in-both-src-and-dist-tsx-byext.jsx'); -require('./only-in-src-ts'); -require('./only-in-src-tsx'); -require('./only-in-src-byext.js'); -require('./only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/index-src-to-dist-byext.js b/tests/resolver/junk/src/index-src-to-dist-byext.js deleted file mode 100644 index 833487a05..000000000 --- a/tests/resolver/junk/src/index-src-to-dist-byext.js +++ /dev/null @@ -1,8 +0,0 @@ -require('../dist/in-both-src-and-dist-ts'); -require('../dist/in-both-src-and-dist-tsx'); -require('../dist/in-both-src-and-dist-byext.js'); -require('../dist/in-both-src-and-dist-tsx-byext.jsx'); -require('../dist/only-in-src'); -require('../dist/only-in-src-tsx'); -require('../dist/only-in-src-byext.js'); -require('../dist/only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/index-src-to-dist.js b/tests/resolver/junk/src/index-src-to-dist.js deleted file mode 100644 index 833487a05..000000000 --- a/tests/resolver/junk/src/index-src-to-dist.js +++ /dev/null @@ -1,8 +0,0 @@ -require('../dist/in-both-src-and-dist-ts'); -require('../dist/in-both-src-and-dist-tsx'); -require('../dist/in-both-src-and-dist-byext.js'); -require('../dist/in-both-src-and-dist-tsx-byext.jsx'); -require('../dist/only-in-src'); -require('../dist/only-in-src-tsx'); -require('../dist/only-in-src-byext.js'); -require('../dist/only-in-src-tsx-byext.jsx'); diff --git a/tests/resolver/junk/src/only-in-src-cts.cts b/tests/resolver/junk/src/only-in-src-cts.cts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/junk/src/only-in-src-cts.cts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/only-in-src-ts.ts b/tests/resolver/junk/src/only-in-src-ts.ts deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/junk/src/only-in-src-ts.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/src/only-in-src-tsx.tsx b/tests/resolver/junk/src/only-in-src-tsx.tsx deleted file mode 100644 index 928b95cf9..000000000 --- a/tests/resolver/junk/src/only-in-src-tsx.tsx +++ /dev/null @@ -1 +0,0 @@ -console.log(__filename.replace(/.*[\\\/]/, ''), 'src'); diff --git a/tests/resolver/junk/tsconfig.json b/tests/resolver/junk/tsconfig.json deleted file mode 100644 index 68dfde9b9..000000000 --- a/tests/resolver/junk/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ts-node": { - "preferTsExts": false - }, - "compilerOptions": { - "outDir": "junk/dist", - "rootDir": "src" - } -} From a239ab484a7619c60660a8e514aff8b968fd0128 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 22:29:20 -0400 Subject: [PATCH 09/30] fix? --- justfile | 2 +- package.json | 2 +- scripts/build-pack.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index a4079ee66..e6b8b1a90 100644 --- a/justfile +++ b/justfile @@ -31,7 +31,7 @@ lint *ARGS: lint-fix *ARGS: dprint fmt "$@" clean *ARGS: - rimraf dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz "$@" + rimraf temp dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz tests/tmp "$@" rebuild *ARGS: just clean && just build "$@" build *ARGS: diff --git a/package.json b/package.json index 0970b9347..84778a1a0 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "scripts": { "lint": "dprint check", "lint-fix": "dprint fmt", - "clean": "rimraf dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz", + "clean": "rimraf temp dist tsconfig.schema.json tsconfig.schemastore-schema.json tsconfig.tsbuildinfo tests/ts-node-packed.tgz tests/node_modules tests/tmp", "rebuild": "npm run clean && npm run build", "build": "npm run build-nopack && npm run build-pack", "build-nopack": "npm run build-tsc && npm run build-configSchema", diff --git a/scripts/build-pack.js b/scripts/build-pack.js index 830794f4d..5ee399b58 100644 --- a/scripts/build-pack.js +++ b/scripts/build-pack.js @@ -23,7 +23,10 @@ exec( console.error(err); process.exit(1); } - const tempTarballPath = join(tempDir, readdirSync(tempDir).find(name => name.endsWith('.tgz'))); + const tempTarballPath = join( + tempDir, + readdirSync(tempDir).find((name) => name.endsWith('.tgz')) + ); writeFileSync(tarballPath, readFileSync(tempTarballPath)); unlinkSync(tempTarballPath); rmdirSync(tempDir); From 05cee32efe4384713b1ba28f33afc3dacd861afc Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:08:29 -0400 Subject: [PATCH 10/30] fix? --- dist-raw/node-internal-modules-cjs-loader.js | 7 +++++-- dist-raw/node-internal-modules-esm-get_format.js | 3 ++- dist-raw/node-internal-modules-esm-resolve.js | 3 ++- src/test/resolver.spec.ts | 2 ++ src/test/test-loader.mjs | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index be9406d9c..548b61f46 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -138,7 +138,9 @@ const { } = nodeEsmResolver; function tryPackage(requestPath, exts, isMain, originalPath) { - const pkg = readPackage(requestPath)?.main; + // const pkg = readPackage(requestPath)?.main; + const tmp = readPackage(requestPath) + const pkg = tmp != null ? tmp.main : undefined; if (!pkg) { return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); @@ -270,7 +272,8 @@ function resolveExports(nmPath, request) { return; const pkgPath = path.resolve(nmPath, name); const pkg = readPackage(pkgPath); - if (pkg?.exports != null) { + // if (pkg?.exports != null) { + if (pkg != null && pkg.exports != null) { try { return finalizeEsmResolution(packageExportsResolve( pathToFileURL(pkgPath + '/package.json'), '.' + expansion, pkg, null, diff --git a/dist-raw/node-internal-modules-esm-get_format.js b/dist-raw/node-internal-modules-esm-get_format.js index 302701223..2488cc597 100644 --- a/dist-raw/node-internal-modules-esm-get_format.js +++ b/dist-raw/node-internal-modules-esm-get_format.js @@ -43,7 +43,8 @@ if (experimentalJsonModules) /** * @param {'node' | 'explicit'} [tsNodeExperimentalSpecifierResolution] */ function createGetFormat(tsNodeExperimentalSpecifierResolution) { -const experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); +// const experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); +let experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); /** * @param {string} url diff --git a/dist-raw/node-internal-modules-esm-resolve.js b/dist-raw/node-internal-modules-esm-resolve.js index 066645eca..4a138e370 100644 --- a/dist-raw/node-internal-modules-esm-resolve.js +++ b/dist-raw/node-internal-modules-esm-resolve.js @@ -99,7 +99,8 @@ const pendingDeprecation = getOptionValue('--pending-deprecation'); function createResolve(opts) { // TODO receive cached fs implementations here const {compiledExtensions, preferTsExts, tsNodeExperimentalSpecifierResolution} = opts; -const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); +// const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); +const experimentalSpecifierResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); const emittedPackageWarnings = new SafeSet(); function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index bbd85660c..95f2a896a 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -2,6 +2,7 @@ import { context, ExecutionContext, TestInterface } from './testlib'; import { ctxTsNode, resetNodeEnvironment } from './helpers'; import { project as fsProject, Project as FsProject } from './fs-helpers'; import { join } from 'path'; +import * as semver from 'semver'; import { padStart } from 'lodash'; import { isIndexedAccessTypeNode, isWhiteSpaceLike } from 'typescript'; @@ -63,6 +64,7 @@ interface Target { } test.suite('Resolver hooks', (test) => { test.runSerially(); + test.runIf(semver.gte(process.version, '14.0.0')); // // Generate all permutations of projects diff --git a/src/test/test-loader.mjs b/src/test/test-loader.mjs index f82d199ef..bee514d83 100644 --- a/src/test/test-loader.mjs +++ b/src/test/test-loader.mjs @@ -5,11 +5,11 @@ process.__test_setloader__ = function (_hooks) { hooks = _hooks; }; function resolve(a, b, c) { - const target = hooks?.resolve ?? c; + const target = (hooks && hooks.resolve) || c; return target(...arguments); } function load(a, b, c) { - const target = hooks?.load ?? c; + const target = (hooks && hooks.load) || c; return target(...arguments); } From 3c6defe639bf4bf3e9f86ca0220c21e21254c7df Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:21:04 -0400 Subject: [PATCH 11/30] fix --- dist-raw/node-internal-modules-cjs-helpers.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dist-raw/node-internal-modules-cjs-helpers.js b/dist-raw/node-internal-modules-cjs-helpers.js index 98c5e4671..66a6ac857 100644 --- a/dist-raw/node-internal-modules-cjs-helpers.js +++ b/dist-raw/node-internal-modules-cjs-helpers.js @@ -1,6 +1,18 @@ -const {ArrayPrototypeForEach, StringPrototypeStartsWith, ObjectPrototypeHasOwnProperty, StringPrototypeIncludes, ObjectDefineProperty} = require('./node-primordials'); +const {ArrayPrototypeForEach, StringPrototypeStartsWith, ObjectPrototypeHasOwnProperty, StringPrototypeIncludes, ObjectDefineProperty, SafeSet} = require('./node-primordials'); -exports.addBuiltinLibsToObject = addBuiltinLibsToObject; + +const { getOptionValue } = require('./node-options'); +const userConditions = getOptionValue('--conditions'); +const noAddons = getOptionValue('--no-addons'); +const addonConditions = noAddons ? [] : ['node-addons']; + +// TODO: Use this set when resolving pkg#exports conditions in loader.js. +const cjsConditions = new SafeSet([ + 'require', + 'node', + ...addonConditions, + ...userConditions, +]); // Copied from https://github.com/nodejs/node/blob/21f5a56914a3b24ad77535ef369b93c6b1c11d18/lib/internal/modules/cjs/helpers.js#L133-L178 /** @@ -53,3 +65,6 @@ function addBuiltinLibsToObject(object) { }); }); } + +exports.addBuiltinLibsToObject = addBuiltinLibsToObject; +exports.cjsConditions = cjsConditions; From 9c06277fef8b32588b14ffe9558560a048208c6d Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:26:14 -0400 Subject: [PATCH 12/30] bump up to node 18 cuz why not --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84778a1a0..0bd18bf59 100644 --- a/package.json +++ b/package.json @@ -175,7 +175,7 @@ "singleQuote": true }, "volta": { - "node": "17.9.0", + "node": "18.1.0", "npm": "6.14.15" } } From f4959d8d07a8e2eb9a6e2614effd0ca9c7bf4682 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:36:16 -0400 Subject: [PATCH 13/30] test matrix: replace node17 with node18 --- .github/workflows/continuous-integration.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index dc4f034ab..e645f103c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -122,10 +122,10 @@ jobs: typescript: next typescriptFlag: next downgradeNpm: true - # Node 17 + # Node 18 - flavor: 12 - node: 17 - nodeFlag: 17 + node: 18 + nodeFlag: 18 typescript: latest typescriptFlag: latest downgradeNpm: true From 104f045bf6758277847a68875312fa5178498277 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:36:27 -0400 Subject: [PATCH 14/30] fix node12 test failure --- ava.config.cjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ava.config.cjs b/ava.config.cjs index acdf29ade..f6dc6951c 100644 --- a/ava.config.cjs +++ b/ava.config.cjs @@ -1,4 +1,5 @@ const expect = require('expect'); +const semver = require('semver'); const { createRequire } = require('module'); module.exports = { @@ -14,7 +15,9 @@ module.exports = { NODE_PATH: '' }, require: ['./src/test/remove-env-var-force-color.js'], - nodeArguments: ['--loader', './src/test/test-loader.mjs', '--no-warnings'], + nodeArguments: semver.gte(process.version, '14.0.0') + ? ['--loader', './src/test/test-loader.mjs', '--no-warnings'] + : [], timeout: '300s', concurrency: 1, }; From 1574a43cd94131f26fb1375fc13933a05efb2441 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:45:13 -0400 Subject: [PATCH 15/30] fix for prior hooks API --- src/test/resolver.spec.ts | 4 +++- src/test/test-loader.mjs | 23 ++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 95f2a896a..2a3a92a16 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -557,7 +557,9 @@ async function execute(t: T, p: FsProject, entrypoints: Entrypoint[]) { } catch (e) { throw new Error( [ - 'Error in resolver test. It might be easier to investigate by running outside of the test suite.', + (e as Error).message, + '', + 'This is an error in a resolver test. It might be easier to investigate by running outside of the test suite.', 'To do that, try pasting this into your bash shell (windows invocation will be similar but maybe not identical):', `( cd ${p.cwd} ; node --loader ../../../esm.mjs ./${entrypoint} )`, ].join('\n') diff --git a/src/test/test-loader.mjs b/src/test/test-loader.mjs index bee514d83..b7fd7bbc8 100644 --- a/src/test/test-loader.mjs +++ b/src/test/test-loader.mjs @@ -1,16 +1,21 @@ // Grant ourselves the ability to install ESM loader behaviors in-process during tests +import semver from 'semver'; + +const newHooksAPI = semver.gte(process.versions.node, '16.12.0'); let hooks = undefined; process.__test_setloader__ = function (_hooks) { hooks = _hooks; }; -function resolve(a, b, c) { - const target = (hooks && hooks.resolve) || c; - return target(...arguments); -} -function load(a, b, c) { - const target = (hooks && hooks.load) || c; - return target(...arguments); +function createHook(name) { + return function (a, b, c) { + const target = (hooks && hooks[name]) || c; + return target(...arguments); + }; } - -export { resolve, load }; +export const resolve = createHook('resolve'); +export const load = newHooksAPI ? createHook('load') : null; +export const getFormat = !newHooksAPI ? createHook('getFormat') : null; +export const transformSource = !newHooksAPI + ? createHook('transformSource') + : null; From 1bd8f101f59337c5e221ceded3f476e645207005 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Fri, 13 May 2022 23:57:44 -0400 Subject: [PATCH 16/30] tweak --- src/test/resolver.spec.ts | 2 +- tests/package.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 2a3a92a16..6a870c156 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -557,7 +557,7 @@ async function execute(t: T, p: FsProject, entrypoints: Entrypoint[]) { } catch (e) { throw new Error( [ - (e as Error).message, + (e as Error).toString(), '', 'This is an error in a resolver test. It might be easier to investigate by running outside of the test suite.', 'To do that, try pasting this into your bash shell (windows invocation will be similar but maybe not identical):', diff --git a/tests/package.json b/tests/package.json index 371b90084..1db06d541 100644 --- a/tests/package.json +++ b/tests/package.json @@ -3,5 +3,8 @@ "@swc/core": "latest", "ts-node": "file:ts-node-packed.tgz", "tslog": "3.2.2" + }, + "volta": { + "extends": "../package.json" } } From 9cb076cede62c0a30c802e7979ce9295dd4b4e4b Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 14 May 2022 00:09:38 -0400 Subject: [PATCH 17/30] fix --- src/test/resolver.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 6a870c156..7478411b7 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -4,7 +4,6 @@ import { project as fsProject, Project as FsProject } from './fs-helpers'; import { join } from 'path'; import * as semver from 'semver'; import { padStart } from 'lodash'; -import { isIndexedAccessTypeNode, isWhiteSpaceLike } from 'typescript'; // TODO with skipIgnore turned off, `node_modules` imports of output extension should not resolve to src extension @@ -557,7 +556,8 @@ async function execute(t: T, p: FsProject, entrypoints: Entrypoint[]) { } catch (e) { throw new Error( [ - (e as Error).toString(), + (e as Error).message, + (e as Error).stack, '', 'This is an error in a resolver test. It might be easier to investigate by running outside of the test suite.', 'To do that, try pasting this into your bash shell (windows invocation will be similar but maybe not identical):', From 9699ceef8cd8eb37e68a46b7b1182f0ebef0feb5 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 14 May 2022 00:51:06 -0400 Subject: [PATCH 18/30] teach node environment resetter to re-sort require.extensions --- src/test/helpers.ts | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/test/helpers.ts b/src/test/helpers.ts index 4586e3173..23b05d8e6 100644 --- a/src/test/helpers.ts +++ b/src/test/helpers.ts @@ -12,7 +12,7 @@ import type { Readable } from 'stream'; */ import type * as tsNodeTypes from '../index'; import type _createRequire from 'create-require'; -import { has, mapValues, once } from 'lodash'; +import { has, mapValues, once, sortBy } from 'lodash'; import semver = require('semver'); import type { ExecutionContext } from './testlib'; const createRequire: typeof _createRequire = require('create-require'); @@ -201,6 +201,10 @@ export function getStream(stream: Readable, waitForPattern?: string | RegExp) { //#region Reset node environment +// Delete any added by nyc that aren't in vanilla nodejs +for (const ext of Object.keys(require.extensions)) { + if (!['.js', '.json', '.node'].includes(ext)) delete require.extensions[ext]; +} const defaultRequireExtensions = captureObjectState(require.extensions); // Avoid node deprecation warning for accessing _channel const defaultProcess = captureObjectState(process, ['_channel']); @@ -223,7 +227,14 @@ export function resetNodeEnvironment() { sms.resetRetrieveHandlers(); // Modified by ts-node hooks - resetObject(require.extensions, defaultRequireExtensions); + resetObject( + require.extensions, + defaultRequireExtensions, + undefined, + undefined, + undefined, + true + ); // ts-node attaches a property when it registers an instance // source-map-support monkey-patches the emit function @@ -261,7 +272,8 @@ function resetObject( state: ReturnType, doNotDeleteTheseKeys: string[] = [], doNotSetTheseKeys: string[] = [], - avoidSetterIfUnchanged: string[] = [] + avoidSetterIfUnchanged: string[] = [], + reorderProperties = false ) { const currentDescriptors = Object.getOwnPropertyDescriptors(object); for (const key of Object.keys(currentDescriptors)) { @@ -280,6 +292,19 @@ function resetObject( } // Reset descriptors Object.defineProperties(object, state.descriptors); + + if (reorderProperties) { + // Delete and re-define each property so that they are in original order + const originalOrder = Object.keys(state.descriptors); + const properties = Object.getOwnPropertyDescriptors(object); + const sortedKeys = sortBy(Object.keys(properties), (name) => + originalOrder.includes(name) ? originalOrder.indexOf(name) : 999 + ); + for (const key of sortedKeys) { + delete object[key]; + Object.defineProperty(object, key, properties[key]); + } + } } //#endregion From f9b50a72cdccf51143707ed93b243583d24f4b50 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 14 May 2022 01:03:26 -0400 Subject: [PATCH 19/30] fix --- src/test/resolver.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 7478411b7..0563eae6b 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -1,9 +1,10 @@ import { context, ExecutionContext, TestInterface } from './testlib'; -import { ctxTsNode, resetNodeEnvironment } from './helpers'; +import { ctxTsNode, resetNodeEnvironment, ts } from './helpers'; import { project as fsProject, Project as FsProject } from './fs-helpers'; import { join } from 'path'; import * as semver from 'semver'; import { padStart } from 'lodash'; +import _ = require('lodash'); // TODO with skipIgnore turned off, `node_modules` imports of output extension should not resolve to src extension @@ -63,7 +64,7 @@ interface Target { } test.suite('Resolver hooks', (test) => { test.runSerially(); - test.runIf(semver.gte(process.version, '14.0.0')); + test.runIf(semver.gte(process.version, '14.0.0') && !semver.satisfies(ts.version, '2.7.x')); // // Generate all permutations of projects From d73f7d4dd6f1545a7dd3459ea22fae0ea317f7fa Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 14 May 2022 01:22:31 -0400 Subject: [PATCH 20/30] fix --- src/test/index.spec.ts | 12 +++++++----- src/test/resolver.spec.ts | 5 ++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/test/index.spec.ts b/src/test/index.spec.ts index 707993853..3d269f786 100644 --- a/src/test/index.spec.ts +++ b/src/test/index.spec.ts @@ -69,11 +69,13 @@ test.suite('ts-node', (test) => { testsDirRequire.resolve('ts-node/register/transpile-only'); testsDirRequire.resolve('ts-node/register/type-check'); - // `node --loader ts-node/esm` - testsDirRequire.resolve('ts-node/esm'); - testsDirRequire.resolve('ts-node/esm.mjs'); - testsDirRequire.resolve('ts-node/esm/transpile-only'); - testsDirRequire.resolve('ts-node/esm/transpile-only.mjs'); + if(semver.gte(process.version, '12.17.0')) { + // `node --loader ts-node/esm` + testsDirRequire.resolve('ts-node/esm'); + testsDirRequire.resolve('ts-node/esm.mjs'); + testsDirRequire.resolve('ts-node/esm/transpile-only'); + testsDirRequire.resolve('ts-node/esm/transpile-only.mjs'); + } testsDirRequire.resolve('ts-node/transpilers/swc'); testsDirRequire.resolve('ts-node/transpilers/swc-experimental'); diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 0563eae6b..965e5e89b 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -64,7 +64,10 @@ interface Target { } test.suite('Resolver hooks', (test) => { test.runSerially(); - test.runIf(semver.gte(process.version, '14.0.0') && !semver.satisfies(ts.version, '2.7.x')); + test.runIf( + semver.gte(process.version, '14.0.0') && + !semver.satisfies(ts.version, '2.7.x') + ); // // Generate all permutations of projects From 284d118c1d3d5aac55e23df12b877f722618be25 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 14 May 2022 01:23:03 -0400 Subject: [PATCH 21/30] fix --- src/test/index.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/index.spec.ts b/src/test/index.spec.ts index 3d269f786..5571a2480 100644 --- a/src/test/index.spec.ts +++ b/src/test/index.spec.ts @@ -69,7 +69,7 @@ test.suite('ts-node', (test) => { testsDirRequire.resolve('ts-node/register/transpile-only'); testsDirRequire.resolve('ts-node/register/type-check'); - if(semver.gte(process.version, '12.17.0')) { + if (semver.gte(process.version, '12.17.0')) { // `node --loader ts-node/esm` testsDirRequire.resolve('ts-node/esm'); testsDirRequire.resolve('ts-node/esm.mjs'); From 5cf6772746cfc9a03fae0543fe00f76538abe9e5 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sat, 14 May 2022 01:39:30 -0400 Subject: [PATCH 22/30] windows fix? --- src/test/resolver.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 965e5e89b..8e73d21ae 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -5,6 +5,7 @@ import { join } from 'path'; import * as semver from 'semver'; import { padStart } from 'lodash'; import _ = require('lodash'); +import { pathToFileURL } from 'url'; // TODO with skipIgnore turned off, `node_modules` imports of output extension should not resolve to src extension @@ -556,7 +557,7 @@ async function execute(t: T, p: FsProject, entrypoints: Entrypoint[]) { for (const entrypoint of entrypoints) { try { - await dynamicImport(join(p.cwd, entrypoint)); + await dynamicImport(pathToFileURL(join(p.cwd, entrypoint))); } catch (e) { throw new Error( [ From 59dd604c486fdae90c86da4597446e2ba1f0250b Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 10:38:19 -0400 Subject: [PATCH 23/30] Addressing TODOs --- .github/workflows/continuous-integration.yml | 1 - dist-raw/node-errors.js | 32 ----------------- dist-raw/node-internal-errors.js | 35 +++++++++++++++---- .../node-internal-modules-esm-get_format.js | 2 +- dist-raw/node-internal-modules-esm-resolve.js | 2 +- 5 files changed, 31 insertions(+), 41 deletions(-) delete mode 100644 dist-raw/node-errors.js diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e645f103c..3c824b554 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -54,7 +54,6 @@ jobs: flavor: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] include: # Node 12.15 - # TODO Add comments about why we test 12.15; I think git blame says it's because of an ESM behavioral change that happened at 12.16 - flavor: 1 node: 12.15 nodeFlag: 12_15 diff --git a/dist-raw/node-errors.js b/dist-raw/node-errors.js deleted file mode 100644 index e327734a8..000000000 --- a/dist-raw/node-errors.js +++ /dev/null @@ -1,32 +0,0 @@ -// TODO Sync this with node-internal-errors? - -exports.codes = { - ERR_INPUT_TYPE_NOT_ALLOWED: createErrorCtor(joinArgs('ERR_INPUT_TYPE_NOT_ALLOWED')), - ERR_INVALID_ARG_VALUE: createErrorCtor(joinArgs('ERR_INVALID_ARG_VALUE')), - ERR_INVALID_MODULE_SPECIFIER: createErrorCtor(joinArgs('ERR_INVALID_MODULE_SPECIFIER')), - ERR_INVALID_PACKAGE_CONFIG: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_CONFIG')), - ERR_INVALID_PACKAGE_TARGET: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_TARGET')), - ERR_MANIFEST_DEPENDENCY_MISSING: createErrorCtor(joinArgs('ERR_MANIFEST_DEPENDENCY_MISSING')), - ERR_MODULE_NOT_FOUND: createErrorCtor((path, base, type = 'package') => { - return `Cannot find ${type} '${path}' imported from ${base}` - }), - ERR_PACKAGE_IMPORT_NOT_DEFINED: createErrorCtor(joinArgs('ERR_PACKAGE_IMPORT_NOT_DEFINED')), - ERR_PACKAGE_PATH_NOT_EXPORTED: createErrorCtor(joinArgs('ERR_PACKAGE_PATH_NOT_EXPORTED')), - ERR_UNSUPPORTED_DIR_IMPORT: createErrorCtor(joinArgs('ERR_UNSUPPORTED_DIR_IMPORT')), - ERR_UNSUPPORTED_ESM_URL_SCHEME: createErrorCtor(joinArgs('ERR_UNSUPPORTED_ESM_URL_SCHEME')), - ERR_UNKNOWN_FILE_EXTENSION: createErrorCtor(joinArgs('ERR_UNKNOWN_FILE_EXTENSION')), -} - -function joinArgs(name) { - return (...args) => { - return [name, ...args].join(' ') - } -} - -function createErrorCtor(errorMessageCreator) { - return class CustomError extends Error { - constructor(...args) { - super(errorMessageCreator(...args)) - } - } -} diff --git a/dist-raw/node-internal-errors.js b/dist-raw/node-internal-errors.js index 624a142f5..ddcd66178 100644 --- a/dist-raw/node-internal-errors.js +++ b/dist-raw/node-internal-errors.js @@ -2,14 +2,37 @@ const path = require('path'); -module.exports = { - createErrRequireEsm, - codes: { - // TODO - ERR_INVALID_MODULE_SPECIFIER: class ERR_INVALID_MODULE_SPECIFIER extends Error { +exports.codes = { + ERR_INPUT_TYPE_NOT_ALLOWED: createErrorCtor(joinArgs('ERR_INPUT_TYPE_NOT_ALLOWED')), + ERR_INVALID_ARG_VALUE: createErrorCtor(joinArgs('ERR_INVALID_ARG_VALUE')), + ERR_INVALID_MODULE_SPECIFIER: createErrorCtor(joinArgs('ERR_INVALID_MODULE_SPECIFIER')), + ERR_INVALID_PACKAGE_CONFIG: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_CONFIG')), + ERR_INVALID_PACKAGE_TARGET: createErrorCtor(joinArgs('ERR_INVALID_PACKAGE_TARGET')), + ERR_MANIFEST_DEPENDENCY_MISSING: createErrorCtor(joinArgs('ERR_MANIFEST_DEPENDENCY_MISSING')), + ERR_MODULE_NOT_FOUND: createErrorCtor((path, base, type = 'package') => { + return `Cannot find ${type} '${path}' imported from ${base}` + }), + ERR_PACKAGE_IMPORT_NOT_DEFINED: createErrorCtor(joinArgs('ERR_PACKAGE_IMPORT_NOT_DEFINED')), + ERR_PACKAGE_PATH_NOT_EXPORTED: createErrorCtor(joinArgs('ERR_PACKAGE_PATH_NOT_EXPORTED')), + ERR_UNSUPPORTED_DIR_IMPORT: createErrorCtor(joinArgs('ERR_UNSUPPORTED_DIR_IMPORT')), + ERR_UNSUPPORTED_ESM_URL_SCHEME: createErrorCtor(joinArgs('ERR_UNSUPPORTED_ESM_URL_SCHEME')), + ERR_UNKNOWN_FILE_EXTENSION: createErrorCtor(joinArgs('ERR_UNKNOWN_FILE_EXTENSION')), +} + +function joinArgs(name) { + return (...args) => { + return [name, ...args].join(' ') + } +} + +function createErrorCtor(errorMessageCreator) { + return class CustomError extends Error { + constructor(...args) { + super(errorMessageCreator(...args)) } } -}; +} +exports.createErrRequireEsm = createErrRequireEsm; // Native ERR_REQUIRE_ESM Error is declared here: // https://github.com/nodejs/node/blob/2d5d77306f6dff9110c1f77fefab25f973415770/lib/internal/errors.js#L1294-L1313 diff --git a/dist-raw/node-internal-modules-esm-get_format.js b/dist-raw/node-internal-modules-esm-get_format.js index 2488cc597..8f16449ae 100644 --- a/dist-raw/node-internal-modules-esm-get_format.js +++ b/dist-raw/node-internal-modules-esm-get_format.js @@ -16,7 +16,7 @@ const experimentalJsonModules = const experimentalWasmModules = getOptionValue('--experimental-wasm-modules'); const { getPackageType } = require('./node-internal-modules-esm-resolve').createResolve({compiledExtensions: []}); const { URL, fileURLToPath } = require('url'); -const { ERR_UNKNOWN_FILE_EXTENSION } = require('./node-errors').codes; +const { ERR_UNKNOWN_FILE_EXTENSION } = require('./node-internal-errors').codes; const extensionFormatMap = { '__proto__': null, diff --git a/dist-raw/node-internal-modules-esm-resolve.js b/dist-raw/node-internal-modules-esm-resolve.js index 4a138e370..0a97b27e3 100644 --- a/dist-raw/node-internal-modules-esm-resolve.js +++ b/dist-raw/node-internal-modules-esm-resolve.js @@ -83,7 +83,7 @@ const { ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_ESM_URL_SCHEME, // } = require('internal/errors').codes; -} = require('./node-errors').codes; +} = require('./node-internal-errors').codes; // const { Module: CJSModule } = require('internal/modules/cjs/loader'); const CJSModule = Module; From cc1f36dd2f9db66f2eb42d71262ab5b0f18b9777 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 10:53:03 -0400 Subject: [PATCH 24/30] sync another raw file with upstream --- dist-raw/node-internal-modules-cjs-helpers.js | 29 ++- raw/download-and-compare.sh | 9 + ...al-modules-cjs-helpers-v17.0.1-stripped.js | 81 ++++++ ...de-internal-modules-cjs-helpers-v17.0.1.js | 231 ++++++++++++++++++ 4 files changed, 345 insertions(+), 5 deletions(-) create mode 100644 raw/node-internal-modules-cjs-helpers-v17.0.1-stripped.js create mode 100644 raw/node-internal-modules-cjs-helpers-v17.0.1.js diff --git a/dist-raw/node-internal-modules-cjs-helpers.js b/dist-raw/node-internal-modules-cjs-helpers.js index 66a6ac857..bd4f70204 100644 --- a/dist-raw/node-internal-modules-cjs-helpers.js +++ b/dist-raw/node-internal-modules-cjs-helpers.js @@ -1,8 +1,19 @@ -const {ArrayPrototypeForEach, StringPrototypeStartsWith, ObjectPrototypeHasOwnProperty, StringPrototypeIncludes, ObjectDefineProperty, SafeSet} = require('./node-primordials'); +// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/helpers.js +'use strict'; + +const { + ArrayPrototypeForEach, + ObjectDefineProperty, + ObjectPrototypeHasOwnProperty, + SafeSet, + StringPrototypeIncludes, + StringPrototypeStartsWith, +} = require('./node-primordials'); const { getOptionValue } = require('./node-options'); const userConditions = getOptionValue('--conditions'); + const noAddons = getOptionValue('--no-addons'); const addonConditions = noAddons ? [] : ['node-addons']; @@ -14,14 +25,21 @@ const cjsConditions = new SafeSet([ ...userConditions, ]); -// Copied from https://github.com/nodejs/node/blob/21f5a56914a3b24ad77535ef369b93c6b1c11d18/lib/internal/modules/cjs/helpers.js#L133-L178 /** * @param {any} object + * @param {string} [dummyModuleName] * @return {void} */ -function addBuiltinLibsToObject(object) { +function addBuiltinLibsToObject(object, dummyModuleName) { // Make built-in modules available directly (loaded lazily). - const { builtinModules } = require('module').Module; + const Module = require('module').Module; + const { builtinModules } = Module; + + // To require built-in modules in user-land and ignore modules whose + // `canBeRequiredByUsers` is false. So we create a dummy module object and not + // use `require()` directly. + const dummyModule = new Module(dummyModuleName); + ArrayPrototypeForEach(builtinModules, (name) => { // Neither add underscored modules, nor ones that contain slashes (e.g., // 'fs/promises') or ones that are already defined. @@ -45,7 +63,8 @@ function addBuiltinLibsToObject(object) { ObjectDefineProperty(object, name, { get: () => { - const lib = require(name); + // Node 12 hack; remove when we drop node12 support + const lib = (dummyModule.require || require)(name); // Disable the current getter/setter and set up a new // non-enumerable property. diff --git a/raw/download-and-compare.sh b/raw/download-and-compare.sh index 62c3b7685..bb8967207 100755 --- a/raw/download-and-compare.sh +++ b/raw/download-and-compare.sh @@ -40,6 +40,14 @@ download #### +path=lib/internal/modules/cjs/helpers +local=node-internal-modules-cjs-helpers +version=v17.0.1 +download +# compare + +#### + path=lib/internal/modules/esm/resolve local=node-internal-modules-esm-resolve version=v13.12.0 @@ -97,5 +105,6 @@ set -x assertStrippedIsOnlyDeletions node-internal-modules-cjs-loader-v15.3.0 assertStrippedIsOnlyDeletions node-internal-modules-cjs-loader-v17.0.1 +assertStrippedIsOnlyDeletions node-internal-modules-cjs-helpers-v17.0.1 assertStrippedIsOnlyDeletions node-internal-errors-2d5d77306f6dff9110c1f77fefab25f973415770 assertStrippedIsOnlyDeletions node-internal-errors-b533fb3508009e5f567cc776daba8fbf665386a6 diff --git a/raw/node-internal-modules-cjs-helpers-v17.0.1-stripped.js b/raw/node-internal-modules-cjs-helpers-v17.0.1-stripped.js new file mode 100644 index 000000000..746acaafb --- /dev/null +++ b/raw/node-internal-modules-cjs-helpers-v17.0.1-stripped.js @@ -0,0 +1,81 @@ +// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/helpers.js + +'use strict'; + +const { + ArrayPrototypeForEach, + ObjectDefineProperty, + ObjectPrototypeHasOwnProperty, + SafeSet, + StringPrototypeIncludes, + StringPrototypeSlice, + StringPrototypeStartsWith, +} = primordials; + +const { getOptionValue } = require('internal/options'); +const userConditions = getOptionValue('--conditions'); + +const noAddons = getOptionValue('--no-addons'); +const addonConditions = noAddons ? [] : ['node-addons']; + +// TODO: Use this set when resolving pkg#exports conditions in loader.js. +const cjsConditions = new SafeSet([ + 'require', + 'node', + ...addonConditions, + ...userConditions, +]); + +function addBuiltinLibsToObject(object, dummyModuleName) { + // Make built-in modules available directly (loaded lazily). + const Module = require('internal/modules/cjs/loader').Module; + const { builtinModules } = Module; + + // To require built-in modules in user-land and ignore modules whose + // `canBeRequiredByUsers` is false. So we create a dummy module object and not + // use `require()` directly. + const dummyModule = new Module(dummyModuleName); + + ArrayPrototypeForEach(builtinModules, (name) => { + // Neither add underscored modules, nor ones that contain slashes (e.g., + // 'fs/promises') or ones that are already defined. + if (StringPrototypeStartsWith(name, '_') || + StringPrototypeIncludes(name, '/') || + ObjectPrototypeHasOwnProperty(object, name)) { + return; + } + // Goals of this mechanism are: + // - Lazy loading of built-in modules + // - Having all built-in modules available as non-enumerable properties + // - Allowing the user to re-assign these variables as if there were no + // pre-existing globals with the same name. + + const setReal = (val) => { + // Deleting the property before re-assigning it disables the + // getter/setter mechanism. + delete object[name]; + object[name] = val; + }; + + ObjectDefineProperty(object, name, { + get: () => { + const lib = dummyModule.require(name); + + // Disable the current getter/setter and set up a new + // non-enumerable property. + delete object[name]; + ObjectDefineProperty(object, name, { + get: () => lib, + set: setReal, + configurable: true, + enumerable: false + }); + + return lib; + }, + set: setReal, + configurable: true, + enumerable: false + }); + }); +} diff --git a/raw/node-internal-modules-cjs-helpers-v17.0.1.js b/raw/node-internal-modules-cjs-helpers-v17.0.1.js new file mode 100644 index 000000000..3dffdd340 --- /dev/null +++ b/raw/node-internal-modules-cjs-helpers-v17.0.1.js @@ -0,0 +1,231 @@ +// Copied from https://github.com/nodejs/node/blob/v17.0.1/lib/internal/modules/cjs/helpers.js + +'use strict'; + +const { + ArrayPrototypeForEach, + ArrayPrototypeJoin, + ArrayPrototypeSome, + ObjectDefineProperty, + ObjectPrototypeHasOwnProperty, + SafeMap, + SafeSet, + StringPrototypeCharCodeAt, + StringPrototypeIncludes, + StringPrototypeSlice, + StringPrototypeStartsWith, +} = primordials; +const { + ERR_MANIFEST_DEPENDENCY_MISSING, + ERR_UNKNOWN_BUILTIN_MODULE +} = require('internal/errors').codes; +const { NativeModule } = require('internal/bootstrap/loaders'); + +const { validateString } = require('internal/validators'); +const path = require('path'); +const { pathToFileURL, fileURLToPath, URL } = require('internal/url'); + +const { getOptionValue } = require('internal/options'); +const userConditions = getOptionValue('--conditions'); + +let debug = require('internal/util/debuglog').debuglog('module', (fn) => { + debug = fn; +}); + +const noAddons = getOptionValue('--no-addons'); +const addonConditions = noAddons ? [] : ['node-addons']; + +// TODO: Use this set when resolving pkg#exports conditions in loader.js. +const cjsConditions = new SafeSet([ + 'require', + 'node', + ...addonConditions, + ...userConditions, +]); + +function loadNativeModule(filename, request) { + const mod = NativeModule.map.get(filename); + if (mod?.canBeRequiredByUsers) { + debug('load native module %s', request); + // compileForPublicLoader() throws if mod.canBeRequiredByUsers is false: + mod.compileForPublicLoader(); + return mod; + } +} + +// Invoke with makeRequireFunction(module) where |module| is the Module object +// to use as the context for the require() function. +// Use redirects to set up a mapping from a policy and restrict dependencies +const urlToFileCache = new SafeMap(); +function makeRequireFunction(mod, redirects) { + const Module = mod.constructor; + + let require; + if (redirects) { + const id = mod.filename || mod.id; + const conditions = cjsConditions; + const { resolve, reaction } = redirects; + require = function require(specifier) { + let missing = true; + const destination = resolve(specifier, conditions); + if (destination === true) { + missing = false; + } else if (destination) { + const href = destination.href; + if (destination.protocol === 'node:') { + const specifier = destination.pathname; + const mod = loadNativeModule(specifier, href); + if (mod && mod.canBeRequiredByUsers) { + return mod.exports; + } + throw new ERR_UNKNOWN_BUILTIN_MODULE(specifier); + } else if (destination.protocol === 'file:') { + let filepath; + if (urlToFileCache.has(href)) { + filepath = urlToFileCache.get(href); + } else { + filepath = fileURLToPath(destination); + urlToFileCache.set(href, filepath); + } + return mod.require(filepath); + } + } + if (missing) { + reaction(new ERR_MANIFEST_DEPENDENCY_MISSING( + id, + specifier, + ArrayPrototypeJoin([...conditions], ', ') + )); + } + return mod.require(specifier); + }; + } else { + require = function require(path) { + return mod.require(path); + }; + } + + function resolve(request, options) { + validateString(request, 'request'); + return Module._resolveFilename(request, mod, false, options); + } + + require.resolve = resolve; + + function paths(request) { + validateString(request, 'request'); + return Module._resolveLookupPaths(request, mod); + } + + resolve.paths = paths; + + require.main = process.mainModule; + + // Enable support to add extra extension types. + require.extensions = Module._extensions; + + require.cache = Module._cache; + + return require; +} + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * because the buffer-to-string conversion in `fs.readFileSync()` + * translates it to FEFF, the UTF-16 BOM. + */ +function stripBOM(content) { + if (StringPrototypeCharCodeAt(content) === 0xFEFF) { + content = StringPrototypeSlice(content, 1); + } + return content; +} + +function addBuiltinLibsToObject(object, dummyModuleName) { + // Make built-in modules available directly (loaded lazily). + const Module = require('internal/modules/cjs/loader').Module; + const { builtinModules } = Module; + + // To require built-in modules in user-land and ignore modules whose + // `canBeRequiredByUsers` is false. So we create a dummy module object and not + // use `require()` directly. + const dummyModule = new Module(dummyModuleName); + + ArrayPrototypeForEach(builtinModules, (name) => { + // Neither add underscored modules, nor ones that contain slashes (e.g., + // 'fs/promises') or ones that are already defined. + if (StringPrototypeStartsWith(name, '_') || + StringPrototypeIncludes(name, '/') || + ObjectPrototypeHasOwnProperty(object, name)) { + return; + } + // Goals of this mechanism are: + // - Lazy loading of built-in modules + // - Having all built-in modules available as non-enumerable properties + // - Allowing the user to re-assign these variables as if there were no + // pre-existing globals with the same name. + + const setReal = (val) => { + // Deleting the property before re-assigning it disables the + // getter/setter mechanism. + delete object[name]; + object[name] = val; + }; + + ObjectDefineProperty(object, name, { + get: () => { + const lib = dummyModule.require(name); + + // Disable the current getter/setter and set up a new + // non-enumerable property. + delete object[name]; + ObjectDefineProperty(object, name, { + get: () => lib, + set: setReal, + configurable: true, + enumerable: false + }); + + return lib; + }, + set: setReal, + configurable: true, + enumerable: false + }); + }); +} + +function normalizeReferrerURL(referrer) { + if (typeof referrer === 'string' && path.isAbsolute(referrer)) { + return pathToFileURL(referrer).href; + } + return new URL(referrer).href; +} + +// For error messages only - used to check if ESM syntax is in use. +function hasEsmSyntax(code) { + debug('Checking for ESM syntax'); + const parser = require('internal/deps/acorn/acorn/dist/acorn').Parser; + let root; + try { + root = parser.parse(code, { sourceType: 'module', ecmaVersion: 'latest' }); + } catch { + return false; + } + + return ArrayPrototypeSome(root.body, (stmt) => + stmt.type === 'ExportDefaultDeclaration' || + stmt.type === 'ExportNamedDeclaration' || + stmt.type === 'ImportDeclaration' || + stmt.type === 'ExportAllDeclaration'); +} + +module.exports = { + addBuiltinLibsToObject, + cjsConditions, + hasEsmSyntax, + loadNativeModule, + makeRequireFunction, + normalizeReferrerURL, + stripBOM, +}; From c9d34b9a3ca0b510953bbd1efeb2f60490030f8d Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 11:03:42 -0400 Subject: [PATCH 25/30] Improve reuse / DI within node ESM stuff --- dist-raw/node-internal-modules-esm-get_format.js | 11 ++++++++--- src/index.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dist-raw/node-internal-modules-esm-get_format.js b/dist-raw/node-internal-modules-esm-get_format.js index 8f16449ae..1f3586adf 100644 --- a/dist-raw/node-internal-modules-esm-get_format.js +++ b/dist-raw/node-internal-modules-esm-get_format.js @@ -14,7 +14,6 @@ const experimentalJsonModules = || (nodeMajor === 17 && nodeMinor >= 5) || getOptionValue('--experimental-json-modules'); const experimentalWasmModules = getOptionValue('--experimental-wasm-modules'); -const { getPackageType } = require('./node-internal-modules-esm-resolve').createResolve({compiledExtensions: []}); const { URL, fileURLToPath } = require('url'); const { ERR_UNKNOWN_FILE_EXTENSION } = require('./node-internal-errors').codes; @@ -41,10 +40,16 @@ if (experimentalJsonModules) extensionFormatMap['.json'] = legacyExtensionFormatMap['.json'] = 'json'; /** - * @param {'node' | 'explicit'} [tsNodeExperimentalSpecifierResolution] */ -function createGetFormat(tsNodeExperimentalSpecifierResolution) { + * + * @param {'node' | 'explicit'} [tsNodeExperimentalSpecifierResolution] + * @param {ReturnType< + * typeof import('../dist-raw/node-internal-modules-esm-resolve').createResolve + * >} nodeEsmResolver + */ +function createGetFormat(tsNodeExperimentalSpecifierResolution, nodeEsmResolver) { // const experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution ?? getOptionValue('--experimental-specifier-resolution'); let experimentalSpeciferResolution = tsNodeExperimentalSpecifierResolution != null ? tsNodeExperimentalSpecifierResolution : getOptionValue('--experimental-specifier-resolution'); +const { getPackageType } = nodeEsmResolver; /** * @param {string} url diff --git a/src/index.ts b/src/index.ts index 4d1370deb..94b489816 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1428,7 +1428,7 @@ export function createFromPreloadedConfig( const getNodeEsmGetFormat = once(() => ( require('../dist-raw/node-internal-modules-esm-get_format') as typeof _nodeInternalModulesEsmGetFormat - ).createGetFormat(options.experimentalSpecifierResolution) + ).createGetFormat(options.experimentalSpecifierResolution, getNodeEsmResolver()) ); const getNodeCjsLoader = once(() => ( From e34adc056cd77d0fa89a913720936a88bafc2ba7 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 11:17:28 -0400 Subject: [PATCH 26/30] cleanup node internalBinding stuff --- dist-raw/node-internal-fs.js | 39 ----------------- dist-raw/node-internal-modules-cjs-loader.js | 3 +- ...de-internal-modules-package_json_reader.js | 2 +- dist-raw/node-internalBinding-fs.d.ts | 5 --- dist-raw/node-internalBinding-fs.js | 42 ++++++++++++++++++- 5 files changed, 42 insertions(+), 49 deletions(-) delete mode 100644 dist-raw/node-internal-fs.js delete mode 100644 dist-raw/node-internalBinding-fs.d.ts diff --git a/dist-raw/node-internal-fs.js b/dist-raw/node-internal-fs.js deleted file mode 100644 index 651dcd145..000000000 --- a/dist-raw/node-internal-fs.js +++ /dev/null @@ -1,39 +0,0 @@ -const fs = require('fs'); - -// In node's core, this is implemented in C -// https://github.com/nodejs/node/blob/v15.3.0/src/node_file.cc#L891-L985 -/** - * @param {string} path - * @returns {[] | [string, boolean]} - */ -function internalModuleReadJSON(path) { - let string - try { - string = fs.readFileSync(path, 'utf8') - } catch (e) { - if (e.code === 'ENOENT') return [] - throw e - } - // Node's implementation checks for the presence of relevant keys: main, name, type, exports, imports - // Node does this for performance to skip unnecessary parsing. - // This would slow us down and, based on our usage, we can skip it. - const containsKeys = true - return [string, containsKeys] -} - -// In node's core, this is implemented in C -// https://github.com/nodejs/node/blob/63e7dc1e5c71b70c80ed9eda230991edb00811e2/src/node_file.cc#L987-L1005 -function internalModuleStat(path) { - try { - const stat = fs.statSync(path); - if(stat.isFile()) return 0; - if(stat.isDirectory()) return 1; - } catch(e) { - return -e.errno || -1; - } -} - -module.exports = { - internalModuleReadJSON, - internalModuleStat -}; diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 548b61f46..8846be1bb 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -21,7 +21,7 @@ const { pathToFileURL, fileURLToPath } = require('url'); const fs = require('fs'); const path = require('path'); const { sep } = path; -const { internalModuleStat } = require('./node-internal-fs'); +const { internalModuleStat } = require('./node-internalBinding-fs'); const packageJsonReader = require('./node-internal-modules-package_json_reader'); const { cjsConditions, @@ -129,7 +129,6 @@ function readPackageScope(checkPath) { * }} opts */ function createCjsLoader(opts) { - // TODO don't need this if we get it from Object.keys(module.extensions) always? const {nodeEsmResolver, compiledExtensions, preferTsExts} = opts; const { encodedSepRegEx, diff --git a/dist-raw/node-internal-modules-package_json_reader.js b/dist-raw/node-internal-modules-package_json_reader.js index f35c619cd..9266bc1c4 100644 --- a/dist-raw/node-internal-modules-package_json_reader.js +++ b/dist-raw/node-internal-modules-package_json_reader.js @@ -2,7 +2,7 @@ 'use strict'; const { SafeMap } = require('./node-primordials'); -const { internalModuleReadJSON } = require('./node-internal-fs'); +const { internalModuleReadJSON } = require('./node-internalBinding-fs'); const { pathToFileURL } = require('url'); const { toNamespacedPath } = require('path'); // const { getOptionValue } = require('./node-options'); diff --git a/dist-raw/node-internalBinding-fs.d.ts b/dist-raw/node-internalBinding-fs.d.ts deleted file mode 100644 index e1b17da23..000000000 --- a/dist-raw/node-internalBinding-fs.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copied from https://github.com/nodejs/node/blob/b66a75a3a4361614dde9bc1a52d7e9021b4efc26/typings/internalBinding/fs.d.ts -declare namespace InternalFSBinding { - function internalModuleStat(path: string): number; -} -export const internalModuleStat: typeof InternalFSBinding.internalModuleStat; diff --git a/dist-raw/node-internalBinding-fs.js b/dist-raw/node-internalBinding-fs.js index 9535a210b..20a42c36c 100644 --- a/dist-raw/node-internalBinding-fs.js +++ b/dist-raw/node-internalBinding-fs.js @@ -1,5 +1,43 @@ -// TODO unify this with node-internal-fs? +const fs = require('fs'); -exports.internalModuleStat = function(path) { +// In node's core, this is implemented in C +// https://github.com/nodejs/node/blob/v15.3.0/src/node_file.cc#L891-L985 +/** + * @param {string} path + * @returns {[] | [string, boolean]} + */ +function internalModuleReadJSON(path) { + let string + try { + string = fs.readFileSync(path, 'utf8') + } catch (e) { + if (e.code === 'ENOENT') return [] + throw e + } + // Node's implementation checks for the presence of relevant keys: main, name, type, exports, imports + // Node does this for performance to skip unnecessary parsing. + // This would slow us down and, based on our usage, we can skip it. + const containsKeys = true + return [string, containsKeys] +} +// In node's core, this is implemented in C +// https://github.com/nodejs/node/blob/63e7dc1e5c71b70c80ed9eda230991edb00811e2/src/node_file.cc#L987-L1005 +/** + * @param {string} path + * @returns {number} 0 = file, 1 = dir, negative = error + */ +function internalModuleStat(path) { + try { + const stat = fs.statSync(path); + if(stat.isFile()) return 0; + if(stat.isDirectory()) return 1; + } catch(e) { + return -e.errno || -1; + } } + +module.exports = { + internalModuleReadJSON, + internalModuleStat +}; From 46096ab494e2e39ce561ac5dcea96cc7ef3bf083 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 12:53:20 -0400 Subject: [PATCH 27/30] Adding hint when ts-node is ignoring a file that you might want it to compile; addressing todos; adding a new one --- child-loader.mjs | 1 + src/child/child-loader.ts | 4 ---- src/esm.ts | 27 +++++++++++++++++-------- src/index.ts | 42 +++++++++++++++++++++++++++++++++++---- src/repl.ts | 1 - 5 files changed, 58 insertions(+), 17 deletions(-) diff --git a/child-loader.mjs b/child-loader.mjs index 3a96eeea4..6ef592ac5 100644 --- a/child-loader.mjs +++ b/child-loader.mjs @@ -2,6 +2,7 @@ import { fileURLToPath } from 'url'; import { createRequire } from 'module'; const require = createRequire(fileURLToPath(import.meta.url)); +// TODO why use require() here? I think we can just `import` /** @type {import('./dist/child-loader')} */ const childLoader = require('./dist/child/child-loader'); export const { resolve, load, getFormat, transformSource } = childLoader; diff --git a/src/child/child-loader.ts b/src/child/child-loader.ts index 0ac018132..e65ffe2fe 100644 --- a/src/child/child-loader.ts +++ b/src/child/child-loader.ts @@ -1,7 +1,3 @@ -// TODO same version check as ESM loader, but export stubs -// Also export a binder function that allows re-binding where the stubs -// delegate. - import type { NodeLoaderHooksAPI1, NodeLoaderHooksAPI2 } from '..'; import { filterHooksByAPIVersion } from '../esm'; diff --git a/src/esm.ts b/src/esm.ts index d84567a96..17bbc16a4 100644 --- a/src/esm.ts +++ b/src/esm.ts @@ -102,12 +102,7 @@ export interface NodeImportAssertions { } // The hooks API changed in node version X so we need to check for backwards compatibility. -// TODO: When the new API is backported to v12, v14, update these version checks accordingly. -const newHooksAPI = - versionGteLt(process.versions.node, '17.0.0') || - versionGteLt(process.versions.node, '16.12.0', '17.0.0') || - versionGteLt(process.versions.node, '14.999.999', '15.0.0') || - versionGteLt(process.versions.node, '12.999.999', '13.0.0'); +const newHooksAPI = versionGteLt(process.versions.node, '16.12.0'); /** @internal */ export function filterHooksByAPIVersion( @@ -135,6 +130,7 @@ export function createEsmHooks(tsNodeService: Service) { // Custom implementation that considers additional file extensions and automatically adds file extensions const nodeResolveImplementation = tsNodeService.getNodeEsmResolver(); const nodeGetFormatImplementation = tsNodeService.getNodeEsmGetFormat(); + const extensions = tsNodeService.extensions; const hooksAPI = filterHooksByAPIVersion({ resolve, @@ -335,12 +331,27 @@ export function createEsmHooks(tsNodeService: Service) { // If file has .ts, .tsx, or .jsx extension, then ask node how it would treat this file if it were .js const ext = extname(nativePath); let nodeSays: { format: NodeLoaderHooksFormat }; - if (ext !== '.js' && !tsNodeService.ignored(nativePath)) { + const nodeDoesNotUnderstandExt = + extensions.extensionsNodeDoesNotUnderstand.includes(ext); + const tsNodeIgnored = tsNodeService.ignored(nativePath); + if (nodeDoesNotUnderstandExt && !tsNodeIgnored) { nodeSays = await entrypointFallback(() => defer(formatUrl(pathToFileURL(nativePath + '.js'))) ); } else { - nodeSays = await entrypointFallback(defer); + try { + nodeSays = await entrypointFallback(defer); + } catch (e) { + if (e instanceof Error && tsNodeIgnored && nodeDoesNotUnderstandExt) { + e.message += + `\n\n` + + `Hint:\n` + + `ts-node is configured to ignore this file.\n` + + `If you want ts-node to handle this file, consider enabling the "skipIgnore" option or adjusting your "ignore" patterns.\n` + + `https://typestrong.org/ts-node/docs/scope\n`; + } + throw e; + } } // For files compiled by ts-node that node believes are either CJS or ESM, check if we should override that classification if ( diff --git a/src/index.ts b/src/index.ts index 94b489816..d38213fbd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -552,6 +552,8 @@ export interface Service { getNodeCjsLoader: () => ReturnType< typeof import('../dist-raw/node-internal-modules-cjs-loader').createCjsLoader >; + /** @internal */ + extensions: Extensions; } /** @@ -571,12 +573,30 @@ export interface DiagnosticFilter { diagnosticsIgnored: number[]; } -/** @internal */ +/** + * Centralized specification of how we deal with file extensions based on + * project options: + * which ones we do/don't support, in what situations, etc. These rules drive + * logic elsewhere. + * @internal + * */ +export type Extensions = ReturnType; + +/** + * @internal + */ export function getExtensions( config: _ts.ParsedCommandLine, options: RegisterOptions ) { - const compiledExtensions = []; + const compiledExtensions: string[] = []; + const extensionsNodeDoesNotUnderstand = [ + '.ts', + '.tsx', + '.jsx', + '.cts', + '.mts', + ]; // .js, .cjs, .mjs take precedence if preferTsExts is off if (!options.preferTsExts && config.options.allowJs) @@ -590,9 +610,19 @@ export function getExtensions( compiledExtensions.push('.jsx'); if (config.options.preferTsExt && config.options.allowJs) compiledExtensions.push('.js'); + + const compiledExtensionsNodeDoesNotUnderstand = + extensionsNodeDoesNotUnderstand.filter((ext) => + compiledExtensions.includes(ext) + ); + return { /** All file extensions we transform, ordered by resolution preference according to preferTsExts */ compiledExtensions, + /** Resolved extensions that vanilla node will not understand; we should handle them */ + extensionsNodeDoesNotUnderstand, + /** Like the above, but only the ones we're compiling */ + compiledExtensionsNodeDoesNotUnderstand, }; } @@ -923,7 +953,7 @@ export function createFromPreloadedConfig( const rootFileNames = new Set(config.fileNames); const cachedReadFile = cachedLookup(debugFn('readFile', readFile)); - // Use language services by default (TODO: invert next major version). + // Use language services by default if (!options.compilerHost) { let projectVersion = 1; const fileVersions = new Map( @@ -1428,7 +1458,10 @@ export function createFromPreloadedConfig( const getNodeEsmGetFormat = once(() => ( require('../dist-raw/node-internal-modules-esm-get_format') as typeof _nodeInternalModulesEsmGetFormat - ).createGetFormat(options.experimentalSpecifierResolution, getNodeEsmResolver()) + ).createGetFormat( + options.experimentalSpecifierResolution, + getNodeEsmResolver() + ) ); const getNodeCjsLoader = once(() => ( @@ -1461,6 +1494,7 @@ export function createFromPreloadedConfig( getNodeEsmResolver, getNodeEsmGetFormat, getNodeCjsLoader, + extensions, }; } diff --git a/src/repl.ts b/src/repl.ts index 69d02425c..eed95a0d7 100644 --- a/src/repl.ts +++ b/src/repl.ts @@ -124,7 +124,6 @@ export interface CreateReplOptions { stderr?: NodeJS.WritableStream; /** @internal */ composeWithEvalAwarePartialHost?: EvalAwarePartialHost; - // TODO collapse both of the following two flags into a single `isInteractive` or `isLineByLine` flag. /** * @internal * Ignore diagnostics that are annoying when interactively entering input line-by-line. From f844b397aa572ad88be8dd70d6640cd6ae3c0e41 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 15:04:31 -0400 Subject: [PATCH 28/30] Add tests for self-imports and empty package.json manifests importing a root index.* file --- dist-raw/node-internal-modules-cjs-loader.js | 155 ++- dist-raw/node-internal-modules-esm-resolve.js | 12 +- dist-raw/node-nativemodule.js | 9 + raw/download-and-compare.sh | 1 + ...nal-modules-cjs-loader-v17.0.1-stripped.js | 133 +++ ...al-modules-esm-resolve-v15.3.0-stripped.js | 899 ++++++++++++++++++ src/cjs-resolve-hooks.ts | 52 +- src/test/resolver.spec.ts | 487 +++++----- 8 files changed, 1490 insertions(+), 258 deletions(-) create mode 100644 dist-raw/node-nativemodule.js create mode 100644 raw/node-internal-modules-esm-resolve-v15.3.0-stripped.js diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 8846be1bb..503cec558 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -5,18 +5,20 @@ 'use strict'; const { + ArrayPrototypeJoin, JSONParse, + ObjectKeys, + RegExpPrototypeTest, SafeMap, + StringPrototypeCharCodeAt, StringPrototypeEndsWith, StringPrototypeLastIndexOf, StringPrototypeIndexOf, - StringPrototypeSlice, - ArrayPrototypeJoin, - StringPrototypeCharCodeAt, - RegExpPrototypeTest, - ObjectKeys, StringPrototypeMatch, + StringPrototypeSlice, + StringPrototypeStartsWith, } = require('./node-primordials'); +const { NativeModule } = require('./node-nativemodule'); const { pathToFileURL, fileURLToPath } = require('url'); const fs = require('fs'); const path = require('path'); @@ -59,6 +61,12 @@ function stat(filename) { return result; } +// Note: +// we cannot get access to node's internal cache, which is populated from +// within node's Module constructor. So the cache here will always be empty. +// It's possible we could approximate our own cache by building it up with +// hacky workarounds, but it's not worth the complexity and flakiness. +const moduleParentCache = new SafeWeakMap(); // Given a module name, and a list of paths to test, returns the first // matching file in the following precedence. @@ -133,7 +141,7 @@ function createCjsLoader(opts) { const { encodedSepRegEx, packageExportsResolve, - // packageImportsResolve + packageImportsResolve } = nodeEsmResolver; function tryPackage(requestPath, exts, isMain, originalPath) { @@ -259,6 +267,47 @@ function tryExtensions(p, exts, isMain) { return false; } +function trySelfParentPath(parent) { + if (!parent) return false; + + if (parent.filename) { + return parent.filename; + } else if (parent.id === '' || parent.id === 'internal/preload') { + try { + return process.cwd() + path.sep; + } catch { + return false; + } + } +} + +function trySelf(parentPath, request) { + if (!parentPath) return false; + + const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; + if (!pkg || pkg.exports === undefined) return false; + if (typeof pkg.name !== 'string') return false; + + let expansion; + if (request === pkg.name) { + expansion = '.'; + } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { + expansion = '.' + StringPrototypeSlice(request, pkg.name.length); + } else { + return false; + } + + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), expansion, pkg, + pathToFileURL(parentPath), cjsConditions).resolved, parentPath, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } +} + // This only applies to requests of a specific form: // 1. name/.* // 2. @scope/name/.* @@ -376,6 +425,97 @@ const Module_findPath = function _findPath(request, paths, isMain) { return false; }; +const Module_resolveFilename = function _resolveFilename(request, parent, isMain, options) { + if (StringPrototypeStartsWith(request, 'node:') || + NativeModule.canBeRequiredByUsers(request)) { + return request; + } + + let paths; + + if (typeof options === 'object' && options !== null) { + if (ArrayIsArray(options.paths)) { + const isRelative = StringPrototypeStartsWith(request, './') || + StringPrototypeStartsWith(request, '../') || + ((isWindows && StringPrototypeStartsWith(request, '.\\')) || + StringPrototypeStartsWith(request, '..\\')); + + if (isRelative) { + paths = options.paths; + } else { + const fakeParent = new Module('', null); + + paths = []; + + for (let i = 0; i < options.paths.length; i++) { + const path = options.paths[i]; + fakeParent.paths = Module._nodeModulePaths(path); + const lookupPaths = Module._resolveLookupPaths(request, fakeParent); + + for (let j = 0; j < lookupPaths.length; j++) { + if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) + ArrayPrototypePush(paths, lookupPaths[j]); + } + } + } + } else if (options.paths === undefined) { + paths = Module._resolveLookupPaths(request, parent); + } else { + throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); + } + } else { + paths = Module._resolveLookupPaths(request, parent); + } + + if (parent?.filename) { + if (request[0] === '#') { + const pkg = readPackageScope(parent.filename) || {}; + if (pkg.data?.imports != null) { + try { + return finalizeEsmResolution( + packageImportsResolve(request, pathToFileURL(parent.filename), + cjsConditions), parent.filename, + pkg.path); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request); + throw e; + } + } + } + } + + // Try module self resolution first + const parentPath = trySelfParentPath(parent); + const selfResolved = trySelf(parentPath, request); + if (selfResolved) { + const cacheKey = request + '\x00' + + (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); + Module._pathCache[cacheKey] = selfResolved; + return selfResolved; + } + + // Look up the filename first, since that's the cache key. + const filename = Module._findPath(request, paths, isMain, false); + if (filename) return filename; + const requireStack = []; + for (let cursor = parent; + cursor; + cursor = moduleParentCache.get(cursor)) { + ArrayPrototypePush(requireStack, cursor.filename || cursor.id); + } + let message = `Cannot find module '${request}'`; + if (requireStack.length > 0) { + message = message + '\nRequire stack:\n- ' + + ArrayPrototypeJoin(requireStack, '\n- '); + } + // eslint-disable-next-line no-restricted-syntax + const err = new Error(message); + err.code = 'MODULE_NOT_FOUND'; + err.requireStack = requireStack; + throw err; +}; + function finalizeEsmResolution(resolved, parentPath, pkgPath) { if (RegExpPrototypeTest(encodedSepRegEx, resolved)) throw new ERR_INVALID_MODULE_SPECIFIER( @@ -401,7 +541,8 @@ function createEsmNotFoundErr(request, path) { return { - Module_findPath + Module_findPath, + Module_resolveFilename } } diff --git a/dist-raw/node-internal-modules-esm-resolve.js b/dist-raw/node-internal-modules-esm-resolve.js index 0a97b27e3..b32f8aab1 100644 --- a/dist-raw/node-internal-modules-esm-resolve.js +++ b/dist-raw/node-internal-modules-esm-resolve.js @@ -1,4 +1,5 @@ // Copied from https://raw.githubusercontent.com/nodejs/node/v15.3.0/lib/internal/modules/esm/resolve.js + 'use strict'; const [nodeMajor, nodeMinor, nodePatch] = process.versions.node.split('.').map(s => parseInt(s, 10)) @@ -28,11 +29,9 @@ const { ObjectFreeze, ObjectGetOwnPropertyNames, ObjectPrototypeHasOwnProperty, - // RegExp, RegExpPrototypeTest, SafeMap, SafeSet, - // String, StringPrototypeEndsWith, StringPrototypeIndexOf, StringPrototypeLastIndexOf, @@ -44,13 +43,8 @@ const { } = require('./node-primordials'); // const internalFS = require('internal/fs/utils'); -// const { NativeModule } = require('internal/bootstrap/loaders'); -const Module = require('module') -const NativeModule = { - canBeRequiredByUsers(specifier) { - return Module.builtinModules.includes(specifier) - } -} +const Module = require('module'); +const { NativeModule } = require('./node-nativemodule'); const { realpathSync, statSync, diff --git a/dist-raw/node-nativemodule.js b/dist-raw/node-nativemodule.js new file mode 100644 index 000000000..ea54fcd49 --- /dev/null +++ b/dist-raw/node-nativemodule.js @@ -0,0 +1,9 @@ + +// Node imports this from 'internal/bootstrap/loaders' +const Module = require('module'); +const NativeModule = { + canBeRequiredByUsers(specifier) { + return Module.builtinModules.includes(specifier) + } +}; +exports.NativeModule = NativeModule; diff --git a/raw/download-and-compare.sh b/raw/download-and-compare.sh index bb8967207..fdfc9c287 100755 --- a/raw/download-and-compare.sh +++ b/raw/download-and-compare.sh @@ -106,5 +106,6 @@ set -x assertStrippedIsOnlyDeletions node-internal-modules-cjs-loader-v15.3.0 assertStrippedIsOnlyDeletions node-internal-modules-cjs-loader-v17.0.1 assertStrippedIsOnlyDeletions node-internal-modules-cjs-helpers-v17.0.1 +assertStrippedIsOnlyDeletions node-internal-modules-esm-resolve-v15.3.0 assertStrippedIsOnlyDeletions node-internal-errors-2d5d77306f6dff9110c1f77fefab25f973415770 assertStrippedIsOnlyDeletions node-internal-errors-b533fb3508009e5f567cc776daba8fbf665386a6 diff --git a/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js b/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js index 33ac1f181..5788979df 100644 --- a/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js +++ b/raw/node-internal-modules-cjs-loader-v17.0.1-stripped.js @@ -105,6 +105,7 @@ function stat(filename) { return result; } +const moduleParentCache = new SafeWeakMap(); // Given a module name, and a list of paths to test, returns the first // matching file in the following precedence. @@ -240,6 +241,47 @@ function tryExtensions(p, exts, isMain) { return false; } +function trySelfParentPath(parent) { + if (!parent) return false; + + if (parent.filename) { + return parent.filename; + } else if (parent.id === '' || parent.id === 'internal/preload') { + try { + return process.cwd() + path.sep; + } catch { + return false; + } + } +} + +function trySelf(parentPath, request) { + if (!parentPath) return false; + + const { data: pkg, path: pkgPath } = readPackageScope(parentPath) || {}; + if (!pkg || pkg.exports === undefined) return false; + if (typeof pkg.name !== 'string') return false; + + let expansion; + if (request === pkg.name) { + expansion = '.'; + } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { + expansion = '.' + StringPrototypeSlice(request, pkg.name.length); + } else { + return false; + } + + try { + return finalizeEsmResolution(packageExportsResolve( + pathToFileURL(pkgPath + '/package.json'), expansion, pkg, + pathToFileURL(parentPath), cjsConditions), parentPath, pkgPath); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw e; + } +} + // This only applies to requests of a specific form: // 1. name/.* // 2. @scope/name/.* @@ -350,6 +392,97 @@ Module._findPath = function(request, paths, isMain) { return false; }; +Module._resolveFilename = function(request, parent, isMain, options) { + if (StringPrototypeStartsWith(request, 'node:') || + NativeModule.canBeRequiredByUsers(request)) { + return request; + } + + let paths; + + if (typeof options === 'object' && options !== null) { + if (ArrayIsArray(options.paths)) { + const isRelative = StringPrototypeStartsWith(request, './') || + StringPrototypeStartsWith(request, '../') || + ((isWindows && StringPrototypeStartsWith(request, '.\\')) || + StringPrototypeStartsWith(request, '..\\')); + + if (isRelative) { + paths = options.paths; + } else { + const fakeParent = new Module('', null); + + paths = []; + + for (let i = 0; i < options.paths.length; i++) { + const path = options.paths[i]; + fakeParent.paths = Module._nodeModulePaths(path); + const lookupPaths = Module._resolveLookupPaths(request, fakeParent); + + for (let j = 0; j < lookupPaths.length; j++) { + if (!ArrayPrototypeIncludes(paths, lookupPaths[j])) + ArrayPrototypePush(paths, lookupPaths[j]); + } + } + } + } else if (options.paths === undefined) { + paths = Module._resolveLookupPaths(request, parent); + } else { + throw new ERR_INVALID_ARG_VALUE('options.paths', options.paths); + } + } else { + paths = Module._resolveLookupPaths(request, parent); + } + + if (parent?.filename) { + if (request[0] === '#') { + const pkg = readPackageScope(parent.filename) || {}; + if (pkg.data?.imports != null) { + try { + return finalizeEsmResolution( + packageImportsResolve(request, pathToFileURL(parent.filename), + cjsConditions), parent.filename, + pkg.path); + } catch (e) { + if (e.code === 'ERR_MODULE_NOT_FOUND') + throw createEsmNotFoundErr(request); + throw e; + } + } + } + } + + // Try module self resolution first + const parentPath = trySelfParentPath(parent); + const selfResolved = trySelf(parentPath, request); + if (selfResolved) { + const cacheKey = request + '\x00' + + (paths.length === 1 ? paths[0] : ArrayPrototypeJoin(paths, '\x00')); + Module._pathCache[cacheKey] = selfResolved; + return selfResolved; + } + + // Look up the filename first, since that's the cache key. + const filename = Module._findPath(request, paths, isMain, false); + if (filename) return filename; + const requireStack = []; + for (let cursor = parent; + cursor; + cursor = moduleParentCache.get(cursor)) { + ArrayPrototypePush(requireStack, cursor.filename || cursor.id); + } + let message = `Cannot find module '${request}'`; + if (requireStack.length > 0) { + message = message + '\nRequire stack:\n- ' + + ArrayPrototypeJoin(requireStack, '\n- '); + } + // eslint-disable-next-line no-restricted-syntax + const err = new Error(message); + err.code = 'MODULE_NOT_FOUND'; + err.requireStack = requireStack; + throw err; +}; + function finalizeEsmResolution(resolved, parentPath, pkgPath) { if (RegExpPrototypeTest(encodedSepRegEx, resolved)) throw new ERR_INVALID_MODULE_SPECIFIER( diff --git a/raw/node-internal-modules-esm-resolve-v15.3.0-stripped.js b/raw/node-internal-modules-esm-resolve-v15.3.0-stripped.js new file mode 100644 index 000000000..53599c9ed --- /dev/null +++ b/raw/node-internal-modules-esm-resolve-v15.3.0-stripped.js @@ -0,0 +1,899 @@ +// Copied from https://github.com/nodejs/node/blob/v15.3.0/lib/internal/modules/esm/resolve.js + +'use strict'; + +const { + ArrayIsArray, + ArrayPrototypeJoin, + ArrayPrototypeShift, + JSONParse, + JSONStringify, + ObjectFreeze, + ObjectGetOwnPropertyNames, + ObjectPrototypeHasOwnProperty, + RegExpPrototypeTest, + SafeMap, + SafeSet, + StringPrototypeEndsWith, + StringPrototypeIndexOf, + StringPrototypeLastIndexOf, + StringPrototypeReplace, + StringPrototypeSlice, + StringPrototypeSplit, + StringPrototypeStartsWith, + StringPrototypeSubstr, +} = primordials; +const internalFS = require('internal/fs/utils'); +const { NativeModule } = require('internal/bootstrap/loaders'); +const { + realpathSync, + statSync, + Stats, +} = require('fs'); +const { getOptionValue } = require('internal/options'); +// Do not eagerly grab .manifest, it may be in TDZ +const policy = getOptionValue('--experimental-policy') ? + require('internal/process/policy') : + null; +const { sep, relative } = require('path'); +const preserveSymlinks = getOptionValue('--preserve-symlinks'); +const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); +const typeFlag = getOptionValue('--input-type'); +const { URL, pathToFileURL, fileURLToPath } = require('internal/url'); +const { + ERR_INPUT_TYPE_NOT_ALLOWED, + ERR_INVALID_ARG_VALUE, + ERR_INVALID_MODULE_SPECIFIER, + ERR_INVALID_PACKAGE_CONFIG, + ERR_INVALID_PACKAGE_TARGET, + ERR_MANIFEST_DEPENDENCY_MISSING, + ERR_MODULE_NOT_FOUND, + ERR_PACKAGE_IMPORT_NOT_DEFINED, + ERR_PACKAGE_PATH_NOT_EXPORTED, + ERR_UNSUPPORTED_DIR_IMPORT, + ERR_UNSUPPORTED_ESM_URL_SCHEME, +} = require('internal/errors').codes; +const { Module: CJSModule } = require('internal/modules/cjs/loader'); + +const packageJsonReader = require('internal/modules/package_json_reader'); +const userConditions = getOptionValue('--conditions'); +const DEFAULT_CONDITIONS = ObjectFreeze(['node', 'import', ...userConditions]); +const DEFAULT_CONDITIONS_SET = new SafeSet(DEFAULT_CONDITIONS); + +const pendingDeprecation = getOptionValue('--pending-deprecation'); +const emittedPackageWarnings = new SafeSet(); +function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { + const pjsonPath = fileURLToPath(pjsonUrl); + if (!pendingDeprecation) { + const nodeModulesIndex = StringPrototypeLastIndexOf(pjsonPath, + '/node_modules/'); + if (nodeModulesIndex !== -1) { + const afterNodeModulesPath = StringPrototypeSlice(pjsonPath, + nodeModulesIndex + 14, + -13); + try { + const { packageSubpath } = parsePackageName(afterNodeModulesPath); + if (packageSubpath === '.') + return; + } catch {} + } + } + if (emittedPackageWarnings.has(pjsonPath + '|' + match)) + return; + emittedPackageWarnings.add(pjsonPath + '|' + match); + process.emitWarning( + `Use of deprecated folder mapping "${match}" in the ${isExports ? + '"exports"' : '"imports"'} field module resolution of the package at ${ + pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ''}.\n` + + `Update this package.json to use a subpath pattern like "${match}*".`, + 'DeprecationWarning', + 'DEP0148' + ); +} + +function getConditionsSet(conditions) { + if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) { + if (!ArrayIsArray(conditions)) { + throw new ERR_INVALID_ARG_VALUE('conditions', conditions, + 'expected an array'); + } + return new SafeSet(conditions); + } + return DEFAULT_CONDITIONS_SET; +} + +const realpathCache = new SafeMap(); +const packageJSONCache = new SafeMap(); /* string -> PackageConfig */ + +function tryStatSync(path) { + try { + return statSync(path); + } catch { + return new Stats(); + } +} + +function getPackageConfig(path, specifier, base) { + const existing = packageJSONCache.get(path); + if (existing !== undefined) { + return existing; + } + const source = packageJsonReader.read(path).string; + if (source === undefined) { + const packageConfig = { + pjsonPath: path, + exists: false, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined, + }; + packageJSONCache.set(path, packageConfig); + return packageConfig; + } + + let packageJSON; + try { + packageJSON = JSONParse(source); + } catch (error) { + throw new ERR_INVALID_PACKAGE_CONFIG( + path, + (base ? `"${specifier}" from ` : '') + fileURLToPath(base || specifier), + error.message + ); + } + + let { imports, main, name, type } = packageJSON; + const { exports } = packageJSON; + if (typeof imports !== 'object' || imports === null) imports = undefined; + if (typeof main !== 'string') main = undefined; + if (typeof name !== 'string') name = undefined; + // Ignore unknown types for forwards compatibility + if (type !== 'module' && type !== 'commonjs') type = 'none'; + + const packageConfig = { + pjsonPath: path, + exists: true, + main, + name, + type, + exports, + imports, + }; + packageJSONCache.set(path, packageConfig); + return packageConfig; +} + +function getPackageScopeConfig(resolved) { + let packageJSONUrl = new URL('./package.json', resolved); + while (true) { + const packageJSONPath = packageJSONUrl.pathname; + if (StringPrototypeEndsWith(packageJSONPath, 'node_modules/package.json')) + break; + const packageConfig = getPackageConfig(fileURLToPath(packageJSONUrl), + resolved); + if (packageConfig.exists) return packageConfig; + + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL('../package.json', packageJSONUrl); + + // Terminates at root where ../package.json equals ../../package.json + // (can't just check "/package.json" for Windows support). + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break; + } + const packageJSONPath = fileURLToPath(packageJSONUrl); + const packageConfig = { + pjsonPath: packageJSONPath, + exists: false, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined, + }; + packageJSONCache.set(packageJSONPath, packageConfig); + return packageConfig; +} + +/* + * Legacy CommonJS main resolution: + * 1. let M = pkg_url + (json main field) + * 2. TRY(M, M.js, M.json, M.node) + * 3. TRY(M/index.js, M/index.json, M/index.node) + * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node) + * 5. NOT_FOUND + */ +function fileExists(url) { + return tryStatSync(fileURLToPath(url)).isFile(); +} + +function legacyMainResolve(packageJSONUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== undefined) { + // Note: fs check redundances will be handled by Descriptor cache here. + if (fileExists(guess = new URL(`./${packageConfig.main}`, + packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}.js`, + packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}.json`, + packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}.node`, + packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}/index.js`, + packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}/index.json`, + packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL(`./${packageConfig.main}/index.node`, + packageJSONUrl))) { + return guess; + } + // Fallthrough. + } + if (fileExists(guess = new URL('./index.js', packageJSONUrl))) { + return guess; + } + // So fs. + if (fileExists(guess = new URL('./index.json', packageJSONUrl))) { + return guess; + } + if (fileExists(guess = new URL('./index.node', packageJSONUrl))) { + return guess; + } + // Not found. + throw new ERR_MODULE_NOT_FOUND( + fileURLToPath(new URL('.', packageJSONUrl)), fileURLToPath(base)); +} + +function resolveExtensionsWithTryExactName(search) { + if (fileExists(search)) return search; + return resolveExtensions(search); +} + +const extensions = ['.js', '.json', '.node', '.mjs']; +function resolveExtensions(search) { + for (let i = 0; i < extensions.length; i++) { + const extension = extensions[i]; + const guess = new URL(`${search.pathname}${extension}`, search); + if (fileExists(guess)) return guess; + } + return undefined; +} + +function resolveIndex(search) { + return resolveExtensions(new URL('index', search)); +} + +const encodedSepRegEx = /%2F|%2C/i; +function finalizeResolution(resolved, base) { + if (RegExpPrototypeTest(encodedSepRegEx, resolved.pathname)) + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved.pathname, 'must not include encoded "/" or "\\" characters', + fileURLToPath(base)); + + const path = fileURLToPath(resolved); + if (getOptionValue('--experimental-specifier-resolution') === 'node') { + let file = resolveExtensionsWithTryExactName(resolved); + if (file !== undefined) return file; + if (!StringPrototypeEndsWith(path, '/')) { + file = resolveIndex(new URL(`${resolved}/`)); + if (file !== undefined) return file; + } else { + return resolveIndex(resolved) || resolved; + } + throw new ERR_MODULE_NOT_FOUND( + resolved.pathname, fileURLToPath(base), 'module'); + } + + const stats = tryStatSync(StringPrototypeEndsWith(path, '/') ? + StringPrototypeSlice(path, -1) : path); + if (stats.isDirectory()) { + const err = new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base)); + err.url = String(resolved); + throw err; + } else if (!stats.isFile()) { + throw new ERR_MODULE_NOT_FOUND( + path || resolved.pathname, base && fileURLToPath(base), 'module'); + } + + return resolved; +} + +function throwImportNotDefined(specifier, packageJSONUrl, base) { + throw new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, packageJSONUrl && fileURLToPath(new URL('.', packageJSONUrl)), + fileURLToPath(base)); +} + +function throwExportsNotFound(subpath, packageJSONUrl, base) { + throw new ERR_PACKAGE_PATH_NOT_EXPORTED( + fileURLToPath(new URL('.', packageJSONUrl)), subpath, + base && fileURLToPath(base)); +} + +function throwInvalidSubpath(subpath, packageJSONUrl, internal, base) { + const reason = `request is not a valid subpath for the "${internal ? + 'imports' : 'exports'}" resolution of ${fileURLToPath(packageJSONUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER(subpath, reason, + base && fileURLToPath(base)); +} + +function throwInvalidPackageTarget( + subpath, target, packageJSONUrl, internal, base) { + if (typeof target === 'object' && target !== null) { + target = JSONStringify(target, null, ''); + } else { + target = `${target}`; + } + throw new ERR_INVALID_PACKAGE_TARGET( + fileURLToPath(new URL('.', packageJSONUrl)), subpath, target, + internal, base && fileURLToPath(base)); +} + +const invalidSegmentRegEx = /(^|\\|\/)(\.\.?|node_modules)(\\|\/|$)/; +const patternRegEx = /\*/g; + +function resolvePackageTargetString( + target, subpath, match, packageJSONUrl, base, pattern, internal, conditions) { + if (subpath !== '' && !pattern && target[target.length - 1] !== '/') + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + + if (!StringPrototypeStartsWith(target, './')) { + if (internal && !StringPrototypeStartsWith(target, '../') && + !StringPrototypeStartsWith(target, '/')) { + let isURL = false; + try { + new URL(target); + isURL = true; + } catch {} + if (!isURL) { + const exportTarget = pattern ? + StringPrototypeReplace(target, patternRegEx, subpath) : + target + subpath; + return packageResolve(exportTarget, packageJSONUrl, conditions); + } + } + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + } + + if (RegExpPrototypeTest(invalidSegmentRegEx, StringPrototypeSlice(target, 2))) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + + const resolved = new URL(target, packageJSONUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL('.', packageJSONUrl).pathname; + + if (!StringPrototypeStartsWith(resolvedPath, packagePath)) + throwInvalidPackageTarget(match, target, packageJSONUrl, internal, base); + + if (subpath === '') return resolved; + + if (RegExpPrototypeTest(invalidSegmentRegEx, subpath)) + throwInvalidSubpath(match + subpath, packageJSONUrl, internal, base); + + if (pattern) + return new URL(StringPrototypeReplace(resolved.href, patternRegEx, + subpath)); + return new URL(subpath, resolved); +} + +/** + * @param {string} key + * @returns {boolean} + */ +function isArrayIndex(key) { + const keyNum = +key; + if (`${keyNum}` !== key) return false; + return keyNum >= 0 && keyNum < 0xFFFF_FFFF; +} + +function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, + base, pattern, internal, conditions) { + if (typeof target === 'string') { + return resolvePackageTargetString( + target, subpath, packageSubpath, packageJSONUrl, base, pattern, internal, + conditions); + } else if (ArrayIsArray(target)) { + if (target.length === 0) + return null; + + let lastException; + for (let i = 0; i < target.length; i++) { + const targetItem = target[i]; + let resolved; + try { + resolved = resolvePackageTarget( + packageJSONUrl, targetItem, subpath, packageSubpath, base, pattern, + internal, conditions); + } catch (e) { + lastException = e; + if (e.code === 'ERR_INVALID_PACKAGE_TARGET') + continue; + throw e; + } + if (resolved === undefined) + continue; + if (resolved === null) { + lastException = null; + continue; + } + return resolved; + } + if (lastException === undefined || lastException === null) + return lastException; + throw lastException; + } else if (typeof target === 'object' && target !== null) { + const keys = ObjectGetOwnPropertyNames(target); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJSONUrl), base, + '"exports" cannot contain numeric property keys.'); + } + } + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key === 'default' || conditions.has(key)) { + const conditionalTarget = target[key]; + const resolved = resolvePackageTarget( + packageJSONUrl, conditionalTarget, subpath, packageSubpath, base, + pattern, internal, conditions); + if (resolved === undefined) + continue; + return resolved; + } + } + return undefined; + } else if (target === null) { + return null; + } + throwInvalidPackageTarget(packageSubpath, target, packageJSONUrl, internal, + base); +} + +function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { + if (typeof exports === 'string' || ArrayIsArray(exports)) return true; + if (typeof exports !== 'object' || exports === null) return false; + + const keys = ObjectGetOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + for (let j = 0; j < keys.length; j++) { + const key = keys[j]; + const curIsConditionalSugar = key === '' || key[0] !== '.'; + if (i++ === 0) { + isConditionalSugar = curIsConditionalSugar; + } else if (isConditionalSugar !== curIsConditionalSugar) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJSONUrl), base, + '"exports" cannot contain some keys starting with \'.\' and some not.' + + ' The exports object must either be an object of package subpath keys' + + ' or an object of main entry condition name keys only.'); + } + } + return isConditionalSugar; +} + +/** + * @param {URL} packageJSONUrl + * @param {string} packageSubpath + * @param {object} packageConfig + * @param {string} base + * @param {Set} conditions + * @returns {URL} + */ +function packageExportsResolve( + packageJSONUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJSONUrl, base)) + exports = { '.': exports }; + + if (ObjectPrototypeHasOwnProperty(exports, packageSubpath)) { + const target = exports[packageSubpath]; + const resolved = resolvePackageTarget( + packageJSONUrl, target, '', packageSubpath, base, false, false, conditions + ); + if (resolved === null || resolved === undefined) + throwExportsNotFound(packageSubpath, packageJSONUrl, base); + return { resolved, exact: true }; + } + + let bestMatch = ''; + const keys = ObjectGetOwnPropertyNames(exports); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key[key.length - 1] === '*' && + StringPrototypeStartsWith(packageSubpath, + StringPrototypeSlice(key, 0, -1)) && + packageSubpath.length >= key.length && + key.length > bestMatch.length) { + bestMatch = key; + } else if (key[key.length - 1] === '/' && + StringPrototypeStartsWith(packageSubpath, key) && + key.length > bestMatch.length) { + bestMatch = key; + } + } + + if (bestMatch) { + const target = exports[bestMatch]; + const pattern = bestMatch[bestMatch.length - 1] === '*'; + const subpath = StringPrototypeSubstr(packageSubpath, bestMatch.length - + (pattern ? 1 : 0)); + const resolved = resolvePackageTarget(packageJSONUrl, target, subpath, + bestMatch, base, pattern, false, + conditions); + if (resolved === null || resolved === undefined) + throwExportsNotFound(packageSubpath, packageJSONUrl, base); + if (!pattern) + emitFolderMapDeprecation(bestMatch, packageJSONUrl, true, base); + return { resolved, exact: pattern }; + } + + throwExportsNotFound(packageSubpath, packageJSONUrl, base); +} + +function packageImportsResolve(name, base, conditions) { + if (name === '#' || StringPrototypeStartsWith(name, '#/')) { + const reason = 'is not a valid internal imports specifier name'; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); + } + let packageJSONUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (ObjectPrototypeHasOwnProperty(imports, name)) { + const resolved = resolvePackageTarget( + packageJSONUrl, imports[name], '', name, base, false, true, conditions + ); + if (resolved !== null) + return { resolved, exact: true }; + } else { + let bestMatch = ''; + const keys = ObjectGetOwnPropertyNames(imports); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key[key.length - 1] === '*' && + StringPrototypeStartsWith(name, + StringPrototypeSlice(key, 0, -1)) && + name.length >= key.length && + key.length > bestMatch.length) { + bestMatch = key; + } else if (key[key.length - 1] === '/' && + StringPrototypeStartsWith(name, key) && + key.length > bestMatch.length) { + bestMatch = key; + } + } + + if (bestMatch) { + const target = imports[bestMatch]; + const pattern = bestMatch[bestMatch.length - 1] === '*'; + const subpath = StringPrototypeSubstr(name, bestMatch.length - + (pattern ? 1 : 0)); + const resolved = resolvePackageTarget( + packageJSONUrl, target, subpath, bestMatch, base, pattern, true, + conditions); + if (resolved !== null) { + if (!pattern) + emitFolderMapDeprecation(bestMatch, packageJSONUrl, false, base); + return { resolved, exact: pattern }; + } + } + } + } + } + throwImportNotDefined(name, packageJSONUrl, base); +} + +function getPackageType(url) { + const packageConfig = getPackageScopeConfig(url); + return packageConfig.type; +} + +function parsePackageName(specifier, base) { + let separatorIndex = StringPrototypeIndexOf(specifier, '/'); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === '@') { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) { + validPackageName = false; + } else { + separatorIndex = StringPrototypeIndexOf( + specifier, '/', separatorIndex + 1); + } + } + + const packageName = separatorIndex === -1 ? + specifier : StringPrototypeSlice(specifier, 0, separatorIndex); + + // Package name cannot have leading . and cannot have percent-encoding or + // separators. + for (let i = 0; i < packageName.length; i++) { + if (packageName[i] === '%' || packageName[i] === '\\') { + validPackageName = false; + break; + } + } + + if (!validPackageName) { + throw new ERR_INVALID_MODULE_SPECIFIER( + specifier, 'is not a valid package name', fileURLToPath(base)); + } + + const packageSubpath = '.' + (separatorIndex === -1 ? '' : + StringPrototypeSlice(specifier, separatorIndex)); + + return { packageName, packageSubpath, isScoped }; +} + +/** + * @param {string} specifier + * @param {URL} base + * @param {Set} conditions + * @returns {URL} + */ +function packageResolve(specifier, base, conditions) { + const { packageName, packageSubpath, isScoped } = + parsePackageName(specifier, base); + + // ResolveSelf + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + const packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); + if (packageConfig.name === packageName && + packageConfig.exports !== undefined && packageConfig.exports !== null) { + return packageExportsResolve( + packageJSONUrl, packageSubpath, packageConfig, base, conditions + ).resolved; + } + } + + let packageJSONUrl = + new URL('./node_modules/' + packageName + '/package.json', base); + let packageJSONPath = fileURLToPath(packageJSONUrl); + let lastPath; + do { + const stat = tryStatSync(StringPrototypeSlice(packageJSONPath, 0, + packageJSONPath.length - 13)); + if (!stat.isDirectory()) { + lastPath = packageJSONPath; + packageJSONUrl = new URL((isScoped ? + '../../../../node_modules/' : '../../../node_modules/') + + packageName + '/package.json', packageJSONUrl); + packageJSONPath = fileURLToPath(packageJSONUrl); + continue; + } + + // Package match. + const packageConfig = getPackageConfig(packageJSONPath, specifier, base); + if (packageConfig.exports !== undefined && packageConfig.exports !== null) + return packageExportsResolve( + packageJSONUrl, packageSubpath, packageConfig, base, conditions + ).resolved; + if (packageSubpath === '.') + return legacyMainResolve(packageJSONUrl, packageConfig, base); + return new URL(packageSubpath, packageJSONUrl); + // Cross-platform root check. + } while (packageJSONPath.length !== lastPath.length); + + // eslint can't handle the above code. + // eslint-disable-next-line no-unreachable + throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base)); +} + +function isBareSpecifier(specifier) { + return specifier[0] && specifier[0] !== '/' && specifier[0] !== '.'; +} + +function isRelativeSpecifier(specifier) { + if (specifier[0] === '.') { + if (specifier.length === 1 || specifier[1] === '/') return true; + if (specifier[1] === '.') { + if (specifier.length === 2 || specifier[2] === '/') return true; + } + } + return false; +} + +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === '') return false; + if (specifier[0] === '/') return true; + return isRelativeSpecifier(specifier); +} + +/** + * @param {string} specifier + * @param {URL} base + * @param {Set} conditions + * @returns {URL} + */ +function moduleResolve(specifier, base, conditions) { + // Order swapped from spec for minor perf gain. + // Ok since relative URLs cannot parse as URLs. + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + resolved = new URL(specifier, base); + } else if (specifier[0] === '#') { + ({ resolved } = packageImportsResolve(specifier, base, conditions)); + } else { + try { + resolved = new URL(specifier); + } catch { + resolved = packageResolve(specifier, base, conditions); + } + } + return finalizeResolution(resolved, base); +} + +/** + * Try to resolve an import as a CommonJS module + * @param {string} specifier + * @param {string} parentURL + * @returns {boolean|string} + */ +function resolveAsCommonJS(specifier, parentURL) { + try { + const parent = fileURLToPath(parentURL); + const tmpModule = new CJSModule(parent, null); + tmpModule.paths = CJSModule._nodeModulePaths(parent); + + let found = CJSModule._resolveFilename(specifier, tmpModule, false); + + // If it is a relative specifier return the relative path + // to the parent + if (isRelativeSpecifier(specifier)) { + found = relative(parent, found); + // Add '.separator if the path does not start with '..separator' + // This should be a safe assumption because when loading + // esm modules there should be always a file specified so + // there should not be a specifier like '..' or '.' + if (!StringPrototypeStartsWith(found, `..${sep}`)) { + found = `.${sep}${found}`; + } + } else if (isBareSpecifier(specifier)) { + // If it is a bare specifier return the relative path within the + // module + const pkg = StringPrototypeSplit(specifier, '/')[0]; + const index = StringPrototypeIndexOf(found, pkg); + if (index !== -1) { + found = StringPrototypeSlice(found, index); + } + } + // Normalize the path separator to give a valid suggestion + // on Windows + if (process.platform === 'win32') { + found = StringPrototypeReplace(found, new RegExp(`\\${sep}`, 'g'), '/'); + } + return found; + } catch { + return false; + } +} + +function defaultResolve(specifier, context = {}, defaultResolveUnused) { + let { parentURL, conditions } = context; + if (parentURL && policy?.manifest) { + const redirects = policy.manifest.getDependencyMapper(parentURL); + if (redirects) { + const { resolve, reaction } = redirects; + const destination = resolve(specifier, new SafeSet(conditions)); + let missing = true; + if (destination === true) { + missing = false; + } else if (destination) { + const href = destination.href; + return { url: href }; + } + if (missing) { + reaction(new ERR_MANIFEST_DEPENDENCY_MISSING( + parentURL, + specifier, + ArrayPrototypeJoin([...conditions], ', ')) + ); + } + } + } + let parsed; + try { + parsed = new URL(specifier); + if (parsed.protocol === 'data:') { + return { + url: specifier + }; + } + } catch {} + if (parsed && parsed.protocol === 'node:') + return { url: specifier }; + if (parsed && parsed.protocol !== 'file:' && parsed.protocol !== 'data:') + throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed); + if (NativeModule.canBeRequiredByUsers(specifier)) { + return { + url: 'node:' + specifier + }; + } + if (parentURL && StringPrototypeStartsWith(parentURL, 'data:')) { + // This is gonna blow up, we want the error + new URL(specifier, parentURL); + } + + const isMain = parentURL === undefined; + if (isMain) { + parentURL = pathToFileURL(`${process.cwd()}/`).href; + + // This is the initial entry point to the program, and --input-type has + // been passed as an option; but --input-type can only be used with + // --eval, --print or STDIN string input. It is not allowed with file + // input, to avoid user confusion over how expansive the effect of the + // flag should be (i.e. entry point only, package scope surrounding the + // entry point, etc.). + if (typeFlag) + throw new ERR_INPUT_TYPE_NOT_ALLOWED(); + } + + conditions = getConditionsSet(conditions); + let url; + try { + url = moduleResolve(specifier, parentURL, conditions); + } catch (error) { + // Try to give the user a hint of what would have been the + // resolved CommonJS module + if (error.code === 'ERR_MODULE_NOT_FOUND' || + error.code === 'ERR_UNSUPPORTED_DIR_IMPORT') { + if (StringPrototypeStartsWith(specifier, 'file://')) { + specifier = fileURLToPath(specifier); + } + const found = resolveAsCommonJS(specifier, parentURL); + if (found) { + // Modify the stack and message string to include the hint + const lines = StringPrototypeSplit(error.stack, '\n'); + const hint = `Did you mean to import ${found}?`; + error.stack = + ArrayPrototypeShift(lines) + '\n' + + hint + '\n' + + ArrayPrototypeJoin(lines, '\n'); + error.message += `\n${hint}`; + } + } + throw error; + } + + if (isMain ? !preserveSymlinksMain : !preserveSymlinks) { + const urlPath = fileURLToPath(url); + const real = realpathSync(urlPath, { + [internalFS.realpathCacheKey]: realpathCache + }); + const old = url; + url = pathToFileURL( + real + (StringPrototypeEndsWith(urlPath, sep) ? '/' : '')); + url.search = old.search; + url.hash = old.hash; + } + + return { url: `${url}` }; +} + +module.exports = { + DEFAULT_CONDITIONS, + defaultResolve, + encodedSepRegEx, + getPackageType, + packageExportsResolve, + packageImportsResolve +}; diff --git a/src/cjs-resolve-hooks.ts b/src/cjs-resolve-hooks.ts index fa8a7feef..9300d8f77 100644 --- a/src/cjs-resolve-hooks.ts +++ b/src/cjs-resolve-hooks.ts @@ -24,21 +24,32 @@ interface ModuleResolveFilenameOptions { export function installCommonjsResolveHooksIfNecessary(tsNodeService: Service) { const Module = require('module') as ModuleConstructorWithInternals; const originalResolveFilename = Module._resolveFilename; + const originalFindPath = Module._findPath; const shouldInstallHook = tsNodeService.options.experimentalResolver; if (shouldInstallHook) { + const { Module_findPath, Module_resolveFilename } = + tsNodeService.getNodeCjsLoader(); Module._resolveFilename = _resolveFilename; - Module._findPath = tsNodeService.getNodeCjsLoader().Module_findPath; - } - function _resolveFilename( - this: any, - request: string, - parent?: Module, - isMain?: boolean, - options?: ModuleResolveFilenameOptions, - ...rest: any[] - ): string { - if (!tsNodeService.enabled()) - return originalResolveFilename.call( + Module._findPath = _findPath; + function _resolveFilename( + this: any, + request: string, + parent?: Module, + isMain?: boolean, + options?: ModuleResolveFilenameOptions, + ...rest: [] + ): string { + if (!tsNodeService.enabled()) + return originalResolveFilename.call( + this, + request, + parent, + isMain, + options, + ...rest + ); + + return Module_resolveFilename.call( this, request, parent, @@ -46,16 +57,11 @@ export function installCommonjsResolveHooksIfNecessary(tsNodeService: Service) { options, ...rest ); - - // This is a stub to support other pull requests that will be merged in the near future - // Right now, it does nothing. - return originalResolveFilename.call( - this, - request, - parent, - isMain, - options, - ...rest - ); + } + function _findPath(this: any): string { + if (!tsNodeService.enabled()) + return originalFindPath.apply(this, arguments as any); + return Module_findPath.apply(this, arguments as any); + } } } diff --git a/src/test/resolver.spec.ts b/src/test/resolver.spec.ts index 8e73d21ae..4dc5905cd 100755 --- a/src/test/resolver.spec.ts +++ b/src/test/resolver.spec.ts @@ -7,15 +7,6 @@ import { padStart } from 'lodash'; import _ = require('lodash'); import { pathToFileURL } from 'url'; -// TODO with skipIgnore turned off, `node_modules` imports of output extension should not resolve to src extension - -// Side-step compiler transformation of import() into require() -const dynamicImport = new Function('specifier', 'return import(specifier)'); - -const test = context(ctxTsNode); -type Test = TestInterface; -type T = ExecutionContext; - /* * Each test case is a separate TS project, with a different permutation of * project options. The project is written to disc, then ts-node is installed, @@ -24,10 +15,10 @@ type T = ExecutionContext; * High-level structure of these tests: * package.json, tsconfig.json, src/, and out/ * entrypoint-* files are the entrypoints - * they import a bunch of target-* files + * they import a bunch of target files / directories / node_modules * * The heart of this test is every time an entrypoint imports a target. - * We are testing if the resolver figures out the correct target-* file to import. + * We are testing if the resolver figures out the correct target file to import. * * To better understand the emitted projects, run the tests, then look in `tests/tmp/resolver-*` * @@ -36,6 +27,49 @@ type T = ExecutionContext; * these tests. */ +// Test a bunch of permutations of: + +// import permutations: + +// - [x] Relative import of file +// - [x] Relative import of index +// - [x] rootless library import of main +// - [x] rootless library import of index +// - [x] rootless library import of exports sub-path +// - [x] rootless self-import of main +// - [x] rootless self-import of index +// - [x] rootless self-import of exports sub-path + +// - [x] Require with extension +// - [x] Require without extension + +// - Require from dist to dist +// - Require from dist to src +// - Require from src to dist +// - [x] Require from src to src + +// lib permutations: + +// - [x] module exists in both src and dist (precompilation ran) +// - [x] module exists in only dist (came from elsewhere) +// - [x] module exists only in src (did not precompile) + +// - .ts / .js extension +// - .tsx / .js extension +// - .cts / .cjs extension +// - .mts / .mjs extension +// - .js / .js extension +// - .jsx / .js extension +// - .cjs / .cjs extension +// - .mjs / .mjs extension + +// Side-step compiler transformation of import() into require() +const dynamicImport = new Function('specifier', 'return import(specifier)'); + +const test = context(ctxTsNode); +type Test = TestInterface; +type T = ExecutionContext; + const projectSeq = seqGenerator(); const entrypointSeq = seqGenerator(); const targetSeq = seqGenerator(); @@ -46,6 +80,7 @@ interface Project { preferSrc: boolean; typeModule: boolean; experimentalSpecifierResolutionNode: boolean; + skipIgnore: boolean; } type Entrypoint = string; interface Target { @@ -77,22 +112,26 @@ test.suite('Resolver hooks', (test) => { for (const preferSrc of [false, true]) { for (const typeModule of [false, true]) { for (const experimentalSpecifierResolutionNode of [false, true]) { - const project: Project = { - identifier: `resolver-${projectSeq()}-${ - preferSrc ? 'preferSrc' : 'preferOut' - }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ - allowJs ? '-allowJs' : '' - }${ - experimentalSpecifierResolutionNode - ? '-experimentalSpecifierResolutionNode' - : '' - }`, - allowJs, - preferSrc, - typeModule, - experimentalSpecifierResolutionNode, - }; - declareProject(test, project); + // TODO test against skipIgnore: false, where imports of third-party deps in `node_modules` should not get our mapping behaviors + for (const skipIgnore of [/*false, */ true]) { + const project: Project = { + identifier: `resolver-${projectSeq()}-${ + preferSrc ? 'preferSrc' : 'preferOut' + }-${typeModule ? 'typeModule' : 'typeCommonjs'}${ + allowJs ? '-allowJs' : '' + }${skipIgnore ? '-skipIgnore' : ''}${ + experimentalSpecifierResolutionNode + ? '-experimentalSpecifierResolutionNode' + : '' + }`, + allowJs, + preferSrc, + typeModule, + experimentalSpecifierResolutionNode, + skipIgnore, + }; + declareProject(test, project); + } } } } @@ -105,6 +144,7 @@ function declareProject(test: Test, project: Project) { experimentalSpecifierResolutionNode, preferSrc, typeModule, + skipIgnore, } = project; test(`${project.identifier}`, async (t) => { @@ -121,14 +161,12 @@ function declareProject(test: Test, project: Project) { p.addJsonFile('tsconfig.json', { 'ts-node': { experimentalResolver: true, - // TODO rename this option? Or keep the legacy name - preferSrc, preferTsExts: preferSrc, transpileOnly: true, experimentalSpecifierResolution: experimentalSpecifierResolutionNode ? 'node' : undefined, - skipIgnore: true, + skipIgnore, }, compilerOptions: { allowJs, @@ -148,13 +186,23 @@ function declareProject(test: Test, project: Project) { type ExternalPackageFlavor = typeof externalPackageFlavors[number]; const externalPackageFlavors = [ false, + // test that the package contains /index.* + 'empty-manifest', + // "main": "src/target." 'main-src-with-extension', + // "main": "src/target." 'main-src-with-out-extension', + // "main": "out/target." 'main-out-with-extension', + // "main": "src/target" 'main-src-extensionless', + // "main": "out/target" 'main-out-extensionless', + // "exports": {".": "src/target."} 'exports-src-with-extension', + // "exports": {".": "src/target."} 'exports-src-with-out-extension', + // "exports": {".": "out/target."} 'exports-out-with-extension', ] as const; function generateTargets(project: Project, p: FsProject) { @@ -200,28 +248,28 @@ function generateTargets(project: Project, p: FsProject) { // TODO re-enable with src <-> out mapping if ( !inOut && - [ + isOneOf(externalPackageFlavor, [ 'main-out-with-extension', 'main-out-extensionless', 'exports-out-with-extension', - ].includes(externalPackageFlavor as any) + ]) ) continue; if ( !inSrc && - [ + isOneOf(externalPackageFlavor, [ 'main-src-with-extension', 'main-src-extensionless', 'exports-src-with-extension', - ].includes(externalPackageFlavor as any) + ]) ) continue; if ( - [ + isOneOf(externalPackageFlavor, [ 'main-out-with-extension', 'main-out-extensionless', 'exports-out-with-extension', - ].includes(externalPackageFlavor as any) + ]) ) continue; //#endregion @@ -238,11 +286,22 @@ function generateTargets(project: Project, p: FsProject) { let prefix = externalPackageFlavor ? `node_modules/${targetIdentifier}/` : ''; - let suffix = externalPackageFlavor ? 'target' : targetIdentifier; + let suffix = + externalPackageFlavor === 'empty-manifest' + ? 'index' + : externalPackageFlavor + ? 'target' + : targetIdentifier; if (isIndex) suffix += '-dir/index'; - const srcName = `${prefix}src/${suffix}.${srcExt}`; - const srcDirOutExtName = `${prefix}src/${suffix}.${outExt}`; - const outName = `${prefix}out/${suffix}.${outExt}`; + const srcDirInfix = + externalPackageFlavor === 'empty-manifest' ? '' : 'src/'; + const outDirInfix = + externalPackageFlavor === 'empty-manifest' ? '' : 'out/'; + const srcName = `${prefix}${srcDirInfix}${suffix}.${srcExt}`; + const srcDirOutExtName = `${prefix}${srcDirInfix}${suffix}.${outExt}`; + const outName = `${prefix}${outDirInfix}${suffix}.${outExt}`; + const selfImporterCjsName = `${prefix}self-import-cjs.cjs`; + const selfImporterMjsName = `${prefix}self-import-mjs.mjs`; const target: Target = { srcName, outName, @@ -294,61 +353,79 @@ function generateTargets(project: Project, p: FsProject) { if (inSrc) { p.addFile(srcName, targetContent('src')); } - function writePackageJson(obj: any) { - p.addJsonFile(`${prefix}/package.json`, { - type: targetPackageTypeModule ? 'module' : undefined, - ...obj, - }); - } - switch (externalPackageFlavor) { - case 'exports-src-with-extension': - writePackageJson({ - exports: { - '.': `./src/${suffix}.${srcExt}`, - }, + if (externalPackageFlavor) { + p.addFile( + selfImporterCjsName, + ` + module.exports = require("${targetIdentifier}"); + ` + ); + p.addFile( + selfImporterMjsName, + ` + export * from "${targetIdentifier}"; + ` + ); + function writePackageJson(obj: any) { + p.addJsonFile(`${prefix}/package.json`, { + name: targetIdentifier, + type: targetPackageTypeModule ? 'module' : undefined, + ...obj, }); - break; - case 'exports-src-with-out-extension': - writePackageJson({ - exports: { - '.': `./src/${suffix}.${outExt}`, - }, - }); - break; - case 'exports-out-with-extension': - writePackageJson({ - exports: { - '.': `./out/${suffix}.${outExt}`, - }, - }); - break; - case 'main-src-extensionless': - writePackageJson({ - main: `src/${suffix}`, - }); - break; - case 'main-out-extensionless': - writePackageJson({ - main: `out/${suffix}`, - }); - break; - case 'main-src-with-extension': - writePackageJson({ - main: `src/${suffix}.${srcExt}`, - }); - break; - case 'main-src-with-out-extension': - writePackageJson({ - main: `src/${suffix}.${outExt}`, - }); - break; - case 'main-out-with-extension': - writePackageJson({ - main: `src/${suffix}.${outExt}`, - }); - break; - default: - const _assert: false = externalPackageFlavor; + } + switch (externalPackageFlavor) { + case 'empty-manifest': + writePackageJson({}); + break; + case 'exports-src-with-extension': + writePackageJson({ + exports: { + '.': `./src/${suffix}.${srcExt}`, + }, + }); + break; + case 'exports-src-with-out-extension': + writePackageJson({ + exports: { + '.': `./src/${suffix}.${outExt}`, + }, + }); + break; + case 'exports-out-with-extension': + writePackageJson({ + exports: { + '.': `./out/${suffix}.${outExt}`, + }, + }); + break; + case 'main-src-extensionless': + writePackageJson({ + main: `src/${suffix}`, + }); + break; + case 'main-out-extensionless': + writePackageJson({ + main: `out/${suffix}`, + }); + break; + case 'main-src-with-extension': + writePackageJson({ + main: `src/${suffix}.${srcExt}`, + }); + break; + case 'main-src-with-out-extension': + writePackageJson({ + main: `src/${suffix}.${outExt}`, + }); + break; + case 'main-out-with-extension': + writePackageJson({ + main: `src/${suffix}.${outExt}`, + }); + break; + default: + const _assert: never = externalPackageFlavor; + } } } } @@ -440,97 +517,108 @@ function generateEntrypoints( targetExtPermutations = [target.srcExt]; } } + const externalPackageSelfImportPermutations = target.isPackage + ? [false, true] + : [false]; for (const targetExt of targetExtPermutations) { - entrypointContent += `\n// ${target.targetIdentifier}`; - if (target.isPackage) { - entrypointContent + ' node_modules package'; - } else { - entrypointContent += `.${targetExt}`; - } - entrypointContent += '\n'; + for (const externalPackageSelfImport of externalPackageSelfImportPermutations) { + entrypointContent += `\n// ${target.targetIdentifier}`; + if (target.isPackage) { + entrypointContent += ` node_modules package`; + if (externalPackageSelfImport) { + entrypointContent += ` self-import`; + } + } else { + entrypointContent += `.${targetExt}`; + } + entrypointContent += '\n'; + + // should specifier be relative or absolute? + let specifier: string; + if (externalPackageSelfImport) { + specifier = `../node_modules/${target.targetIdentifier}/self-import-${entrypointExt}.${entrypointExt}`; + } else if (target.isPackage) { + specifier = target.targetIdentifier; + } else { + if (entrypointTargetting === entrypointLocation) + specifier = './'; + else specifier = `../${entrypointTargetting}/`; + specifier += target.targetIdentifier; + if (target.isIndex) specifier += '-dir'; + if (!target.isIndex && withExt) specifier += '.' + targetExt; + } - // should specifier be relative or absolute? - let specifier: string; - if (target.isPackage) { - specifier = target.targetIdentifier; - } else { - if (entrypointTargetting === entrypointLocation) - specifier = './'; - else specifier = `../${entrypointTargetting}/`; - specifier += target.targetIdentifier; - if (target.isIndex) specifier += '-dir'; - if (!target.isIndex && withExt) specifier += '.' + targetExt; - } + // Do not try to import mjs from cjs + if (targetIsMjs && entrypointExt === 'cjs') { + entrypointContent += `// skipping ${specifier} because we cannot import mjs from cjs\n`; + continue; + } - // Do not try to import mjs from cjs - if (targetIsMjs && entrypointExt === 'cjs') { - entrypointContent += `// skipping ${specifier} because we cannot import mjs from cjs\n`; - continue; - } + // Do not try to import mjs or cjs without extension; node always requires these extensions, even in CommonJS. + if ( + !withExt && + (targetSrcExt === 'cjs' || targetSrcExt === 'mjs') + ) { + entrypointContent += `// skipping ${specifier} because we cannot omit extension from cjs or mjs files; node always requires them\n`; + continue; + } - // Do not try to import mjs or cjs without extension; node always requires these extensions, even in CommonJS. - if ( - !withExt && - (targetSrcExt === 'cjs' || targetSrcExt === 'mjs') - ) { - entrypointContent += `// skipping ${specifier} because we cannot omit extension from cjs or mjs files; node always requires them\n`; - continue; - } + // Do not try to import a transpiled file if compiler options disagree with node's extension-based classification + if (targetIsCompiled && targetIsMjs && !project.typeModule) { + entrypointContent += `// skipping ${specifier} because it is compiled and compiler options disagree with node's module classification: extension=${targetSrcExt}, tsconfig module=commonjs\n`; + continue; + } + if (targetIsCompiled && !targetIsMjs && project.typeModule) { + entrypointContent += `// skipping ${specifier} because it is compiled and compiler options disagree with node's module classification: extension=${targetSrcExt}, tsconfig module=esnext\n`; + continue; + } + // Do not try to import cjs/mjs/cts/mts extensions because they are being added by a different pull request + if (['cts', 'mts', 'cjs', 'mjs'].includes(targetSrcExt)) { + entrypointContent += `// skipping ${specifier} because it uses a file extension that requires us to merge the relevant pull request\n`; + continue; + } - // Do not try to import a transpiled file if compiler options disagree with node's extension-based classification - if (targetIsCompiled && targetIsMjs && !project.typeModule) { - entrypointContent += `// skipping ${specifier} because it is compiled and compiler options disagree with node's module classification: extension=${targetSrcExt}, tsconfig module=commonjs\n`; - continue; - } - if (targetIsCompiled && !targetIsMjs && project.typeModule) { - entrypointContent += `// skipping ${specifier} because it is compiled and compiler options disagree with node's module classification: extension=${targetSrcExt}, tsconfig module=esnext\n`; - continue; - } - // Do not try to import cjs/mjs/cts/mts extensions because they are being added by a different pull request - if (['cts', 'mts', 'cjs', 'mjs'].includes(targetSrcExt)) { - entrypointContent += `// skipping ${specifier} because it uses a file extension that requires us to merge the relevant pull request\n`; - continue; - } + // Do not try to import index from a directory if is forbidden by node's ESM resolver + if ( + entrypointIsMjs && + target.isIndex && + !project.experimentalSpecifierResolutionNode + ) { + entrypointContent += `// skipping ${specifier} because it relies on node automatically resolving a directory to index.*, but experimental-specifier-resolution is not enabled\n`; + continue; + } - // Do not try to import index from a directory if is forbidden by node's ESM resolver - if ( - entrypointIsMjs && - target.isIndex && - !project.experimentalSpecifierResolutionNode - ) { - entrypointContent += `// skipping ${specifier} because it relies on node automatically resolving a directory to index.*, but experimental-specifier-resolution is not enabled\n`; - continue; + // NOTE: if you try to explicitly import foo.ts, we will load foo.ts, EVEN IF you have `preferTsExts` off + const assertIsSrcOrOut = !target.inSrc + ? 'out' + : !target.inOut + ? 'src' + : project.preferSrc || + (!target.isIndex && + targetExt === target.srcExt && + withExt) || + target.srcExt === target.outExt || // <-- TODO re-enable when we have src <-> out mapping + (target.isPackage && + isOneOf(target.packageFlavor, [ + 'main-src-with-extension', + 'exports-src-with-extension', + ])) + ? 'src' + : 'out'; + const assertHasExt = + assertIsSrcOrOut === 'src' ? target.srcExt : target.outExt; + + entrypointContent += + entrypointExt === 'cjs' + ? `mod = require('${specifier}');\n` + : `mod = await import('${specifier}');\n`; + entrypointContent += `assert.equal(mod.loc, '${assertIsSrcOrOut}');\n`; + entrypointContent += `assert.equal(mod.targetIdentifier, '${target.targetIdentifier}');\n`; + entrypointContent += `assert.equal(mod.ext, '${assertHasExt}');\n`; } - - // NOTE: if you try to explicitly import foo.ts, we will load foo.ts, EVEN IF you have `preferTsExts` off - const assertIsSrcOrOut = !target.inSrc - ? 'out' - : !target.inOut - ? 'src' - : project.preferSrc || - (!target.isIndex && targetExt === target.srcExt && withExt) || - target.srcExt === target.outExt || // <-- TODO re-enable when we have src <-> out mapping - (target.isPackage && - [ - 'main-src-with-extension', - 'exports-src-with-extension', - ].includes(target.packageFlavor as any)) - ? 'src' - : 'out'; - const assertHasExt = - assertIsSrcOrOut === 'src' ? target.srcExt : target.outExt; - - entrypointContent += - entrypointExt === 'cjs' - ? `mod = require('${specifier}');\n` - : `mod = await import('${specifier}');\n`; - entrypointContent += `assert.equal(mod.loc, '${assertIsSrcOrOut}');\n`; - entrypointContent += `assert.equal(mod.targetIdentifier, '${target.targetIdentifier}');\n`; - entrypointContent += `assert.equal(mod.ext, '${assertHasExt}');\n`; - // indexContent += `assert.equal(mod.filename.match(/^.*?\\./)[0], '${assertHasName}');\n`; - // indexContent += `assert.equal(mod.filename.match(/\\..*?$/)[0], '.${assertHasExtension}');\n`; } } + function writeAssertions(specifier: string) {} p.dir(entrypointLocation).addFile( entrypointFilename, entrypointContent @@ -594,46 +682,7 @@ function seqGenerator() { }; } -// Test a bunch of permutations of: - -// config permutations: - -// - allowJs -// - not allowJs - -// - preferSrc -// - not preferSrc - -// import permutations: - -// - Relative import of file -// - Relative import of index -// - rootless library import of main -// - rootless library import of index -// - rootless library import of exports sub-path -// - rootless self-import of main -// - rootless self-import of index -// - rootless self-import of exports sub-path - -// - Require with extension -// - Require without extension - -// - Require from dist to dist -// - Require from dist to src -// - Require from src to dist -// - Require from src to src - -// lib permutations: - -// - module exists in both src and dist (precompilation ran) -// - module exists in only dist (came from elsewhere) -// - module exists only in src (did not precompile) - -// - .ts / .js extension -// - .tsx / .js extension -// - .cts / .cjs extension -// - .mts / .mjs extension -// - .js / .js extension -// - .jsx / .js extension -// - .cjs / .cjs extension -// - .mjs / .mjs extension +/** Essentially Array:includes, but with tweaked types for checks on enums */ +function isOneOf(value: V, arrayOfPossibilities: ReadonlyArray) { + return arrayOfPossibilities.includes(value as any); +} From e54686c48bd6f0ca78374914e1b1eb027d95b2fc Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 15:13:05 -0400 Subject: [PATCH 29/30] fix --- dist-raw/node-internal-modules-cjs-loader.js | 1 + dist-raw/node-primordials.js | 1 + 2 files changed, 2 insertions(+) diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 503cec558..269098230 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -10,6 +10,7 @@ const { ObjectKeys, RegExpPrototypeTest, SafeMap, + SafeWeakMap, StringPrototypeCharCodeAt, StringPrototypeEndsWith, StringPrototypeLastIndexOf, diff --git a/dist-raw/node-primordials.js b/dist-raw/node-primordials.js index 62d3f22d0..a7c1574af 100644 --- a/dist-raw/node-primordials.js +++ b/dist-raw/node-primordials.js @@ -20,6 +20,7 @@ module.exports = { RegExpPrototypeSymbolReplace: (obj, ...rest) => RegExp.prototype[Symbol.replace].apply(obj, rest), SafeMap: Map, SafeSet: Set, + SafeWeakMap: WeakMap, StringPrototypeEndsWith: (str, ...rest) => String.prototype.endsWith.apply(str, rest), StringPrototypeIncludes: (str, ...rest) => String.prototype.includes.apply(str, rest), StringPrototypeLastIndexOf: (str, ...rest) => String.prototype.lastIndexOf.apply(str, rest), From 6f3fdd79255f1ed5b62bcb7d2b31e9ac47a5f507 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 15 May 2022 15:42:41 -0400 Subject: [PATCH 30/30] fix node12 --- dist-raw/node-internal-modules-cjs-loader.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dist-raw/node-internal-modules-cjs-loader.js b/dist-raw/node-internal-modules-cjs-loader.js index 269098230..ae17939d6 100644 --- a/dist-raw/node-internal-modules-cjs-loader.js +++ b/dist-raw/node-internal-modules-cjs-loader.js @@ -468,10 +468,15 @@ const Module_resolveFilename = function _resolveFilename(request, parent, isMain paths = Module._resolveLookupPaths(request, parent); } - if (parent?.filename) { + // if (parent?.filename) { + // node 12 hack + if (parent != null && parent.filename) { if (request[0] === '#') { const pkg = readPackageScope(parent.filename) || {}; - if (pkg.data?.imports != null) { + + // if (pkg.data?.imports != null) { + // node 12 hack + if (pkg.data != null && pkg.data.imports != null) { try { return finalizeEsmResolution( packageImportsResolve(request, pathToFileURL(parent.filename),