Skip to content

Installation

RequirementMinimum
Node.js18.x or later
TypeScript4.7 or later (optional)
BrowserChrome 90+, Firefox 88+, Safari 14+
Runtime dependencies0

Terminal window
npm install @gouranga_samrat/log-wiz

log-wiz ships four compiled targets. Your toolchain picks the right one automatically via the exports field in package.json.

FormatPathUsed by
ESMdist/esm/Vite, Rollup, esbuild, native import
CJSdist/cjs/Node.js require(), Jest
Browserdist/browser/Browser bundles — fs/path excluded
Typesdist/types/TypeScript declarations

log-wiz works with any reasonable tsconfig.json. For best results:

{
"compilerOptions": {
"strict": true,
"moduleResolution": "bundler",
"esModuleInterop": true
}
}

All types ship with the package — no @types/ package needed:

import type {
WizConfig,
LogEntry,
LogLevel,
Transport,
} from "@gouranga_samrat/log-wiz";

Terminal window
node -e "import('@gouranga_samrat/log-wiz').then(m => m.wiz.info('install OK'))"

Expected output:

INF 2024-05-15 14:32:01.123 install OK