BREAKING CHANGE(Smartenv): Add Deno and Bun runtime detection, introduce getSafeModuleFor API, update docs and tests, and make isNode semantics Node-only (breaking change)

This commit is contained in:
2025-11-01 15:26:26 +00:00
parent ce338e27ea
commit aeac92f3fd
15 changed files with 10653 additions and 2151 deletions

View File

@@ -1,4 +1,15 @@
export let defaultme = null;
/**
* Runtime type representing the detected JavaScript runtime environment
*/
export type TRuntimeType = 'node' | 'deno' | 'bun' | 'browser';
/**
* Runtime target for module loading - can be a specific runtime or 'server' for all server-side runtimes
*/
export type TRuntimeTarget = TRuntimeType | 'server';
declare global {
namespace NodeJS {
interface Global {