/
githubmirror
/
jest
Обзор
Документация
Войти
/
githubmirror
/
jest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/jest-runtime/src/internals/nodeCapabilities.ts
23 строки
679 B
Simen Bekkhus
chore: lift synthetic module builders (#16083)
02 май 2026, 20:18
Не верифицирован
02 май 2026, 20:18
f23e8f6
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {SourceTextModule, SyntheticModule} from 'node:vm'; export const runtimeSupportsVmModules = typeof SyntheticModule === 'function'; export const supportsSyncEvaluate = // @ts-expect-error - `hasAsyncGraph` is in Node v24.9+, not yet typed in @types/node@18 typeof SourceTextModule?.prototype.hasAsyncGraph === 'function'; export const supportsNodeColonModulePrefixInRequire = (() => { try { require('node:fs'); return true; } catch { return false; } })();