@peerbit/logger
Advanced tools
Comparing version
{ | ||
"name": "@peerbit/logger", | ||
"version": "1.0.2", | ||
"description": "Logging utils", | ||
"type": "module", | ||
"sideEffects": false, | ||
"module": "lib/esm/index.js", | ||
"types": "lib/esm/index.d.ts", | ||
"exports": { | ||
"import": "./lib/esm/index.js" | ||
}, | ||
"files": [ | ||
"lib", | ||
"src", | ||
"!src/**/__tests__", | ||
"!lib/**/__tests__", | ||
"LICENSE" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"pino": "^8.14.1" | ||
}, | ||
"scripts": { | ||
"clean": "shx rm -rf lib/*", | ||
"build": "yarn clean && tsc -p tsconfig.json", | ||
"test": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.ts --runInBand --forceExit", | ||
"test:unit": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.unit.ts --runInBand --forceExit", | ||
"test:integration": "node ../node_modules/.bin/jest test -c ../../../jest.config.integration.ts --runInBand --forceExit" | ||
}, | ||
"author": "dao.xyz", | ||
"license": "MIT", | ||
"gitHead": "c48cb37d237a25b0bcc849482b43f6941d53e3d5" | ||
"name": "@peerbit/logger", | ||
"version": "1.0.3-5652381", | ||
"description": "Logging utils", | ||
"sideEffects": false, | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
], | ||
"src/*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
] | ||
} | ||
}, | ||
"files": [ | ||
"src", | ||
"dist", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./dist/src/index.js" | ||
} | ||
}, | ||
"eslintConfig": { | ||
"extends": "peerbit", | ||
"parserOptions": { | ||
"project": true, | ||
"sourceType": "module" | ||
}, | ||
"ignorePatterns": [ | ||
"!.aegir.js", | ||
"test/ts-use", | ||
"*.d.ts" | ||
] | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"dependencies": { | ||
"pino": "^8.14.1" | ||
}, | ||
"scripts": { | ||
"clean": "aegir clean", | ||
"build": "aegir build --no-bundle", | ||
"test": "aegir test --target node", | ||
"lint": "aegir lint" | ||
}, | ||
"author": "dao.xyz", | ||
"license": "MIT" | ||
} |
@@ -5,3 +5,3 @@ import pino from "pino"; | ||
export const getEnv = (key) => { | ||
export const getEnv = (key: any) => { | ||
if (isNode) { | ||
@@ -20,3 +20,3 @@ // node | ||
const levels = ["fatal", "error", "warn", "info", "debug", "trace"]; | ||
if (levels.indexOf(level) === -1) { | ||
if (!levels.includes(level)) { | ||
throw new Error( | ||
@@ -26,3 +26,3 @@ "Unexpected LOG_LEVEL: " + | ||
". Expecting one of: " + | ||
JSON.stringify(levels) | ||
JSON.stringify(levels), | ||
); | ||
@@ -29,0 +29,0 @@ } |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6278
7.65%7
16.67%90
-1.1%2
100%