@jalik/logger
Advanced tools
Comparing version 3.0.0 to 3.0.1
# Changelog | ||
## v3.0.1 | ||
- Fixed potentially breaking "export from" syntax in index.js | ||
- Upgraded dependencies | ||
## v3.0.0 | ||
@@ -11,7 +16,8 @@ | ||
- **[BREAKING CHANGE]** Moved log level constants to levels.js | ||
- **[BREAKING CHANGE]** Logger must be imported using a named | ||
import (example: `import { Logger } from '@jalik/logger'`) | ||
- **[BREAKING CHANGE]** Logger must be imported using a named import ( | ||
example: `import { Logger } from '@jalik/logger'`) | ||
- Added `FATAL` constant log level | ||
- Added method `fatal(string|Error, object)` in Logger | ||
- Added option `level: string` in Logger constructor (default: `info`), it can be one of `debug`, `info`, `warn`, `error` or `fatal` | ||
- Added option `level: string` in Logger constructor (default: `info`), it can be one of `debug` | ||
, `info`, `warn`, `error` or `fatal` | ||
- Added option `outputs: Array<function>` in Logger constructor (default: `[consoleOutput()]`) | ||
@@ -18,0 +24,0 @@ - Added option `defaultContext: null|object` in Logger constructor (default: `null`) |
@@ -22,36 +22,36 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "INFO", { | ||
Object.defineProperty(exports, "ERROR", { | ||
enumerable: true, | ||
get: function get() { | ||
return _levels.INFO; | ||
return _levels.ERROR; | ||
} | ||
}); | ||
Object.defineProperty(exports, "WARN", { | ||
Object.defineProperty(exports, "FATAL", { | ||
enumerable: true, | ||
get: function get() { | ||
return _levels.WARN; | ||
return _levels.FATAL; | ||
} | ||
}); | ||
Object.defineProperty(exports, "ERROR", { | ||
Object.defineProperty(exports, "INFO", { | ||
enumerable: true, | ||
get: function get() { | ||
return _levels.ERROR; | ||
return _levels.INFO; | ||
} | ||
}); | ||
Object.defineProperty(exports, "FATAL", { | ||
Object.defineProperty(exports, "WARN", { | ||
enumerable: true, | ||
get: function get() { | ||
return _levels.FATAL; | ||
return _levels.WARN; | ||
} | ||
}); | ||
Object.defineProperty(exports, "consoleOutput", { | ||
Object.defineProperty(exports, "Logger", { | ||
enumerable: true, | ||
get: function get() { | ||
return _consoleOutput["default"]; | ||
return _Logger["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Logger", { | ||
Object.defineProperty(exports, "consoleOutput", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Logger["default"]; | ||
return _consoleOutput["default"]; | ||
} | ||
@@ -62,8 +62,8 @@ }); | ||
var _Logger = _interopRequireDefault(require("./Logger")); | ||
var _consoleOutput = _interopRequireDefault(require("./outputs/consoleOutput")); | ||
var _Logger = _interopRequireDefault(require("./Logger")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } |
{ | ||
"name": "@jalik/logger", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A logging utility to log messages to anywhere.", | ||
@@ -31,5 +31,5 @@ "license": "MIT", | ||
"scripts": { | ||
"build": "babel src -d dist", | ||
"clean": "rimraf dist", | ||
"dev": "babel --watch src -d dist", | ||
"build": "babel ./src -d ./dist", | ||
"clean": "rimraf ./dist", | ||
"dev": "babel --watch ./src -d ./dist", | ||
"lint": "eslint .", | ||
@@ -41,19 +41,21 @@ "lint-fix": "eslint --fix .", | ||
}, | ||
"files": [ | ||
"/dist", | ||
"/src" | ||
], | ||
"dependencies": { | ||
"@babel/runtime": "^7.14.0" | ||
"@babel/runtime": "^7.14.5" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.14.3", | ||
"@babel/core": "^7.14.3", | ||
"@babel/plugin-transform-runtime": "^7.14.3", | ||
"@babel/preset-env": "^7.14.2", | ||
"acorn": "^8.2.4", | ||
"ajv": "^7.2.4", | ||
"eslint": "^7.26.0", | ||
"@babel/cli": "^7.14.5", | ||
"@babel/core": "^7.14.5", | ||
"@babel/plugin-transform-runtime": "^7.14.5", | ||
"@babel/preset-env": "^7.14.5", | ||
"eslint": "^7.28.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-plugin-import": "^2.23.2", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-jest": "^24.3.6", | ||
"jest": "^26.6.3", | ||
"typescript": "^4.2.4" | ||
"jest": "^27.0.4", | ||
"typescript": "^4.3.2" | ||
} | ||
} |
@@ -6,4 +6,13 @@ /* | ||
import levels, { | ||
DEBUG, | ||
ERROR, | ||
FATAL, | ||
INFO, | ||
WARN, | ||
} from './levels'; | ||
import Logger from './Logger'; | ||
import consoleOutput from './outputs/consoleOutput'; | ||
export { | ||
default as levels, | ||
DEBUG, | ||
@@ -14,5 +23,5 @@ INFO, | ||
FATAL, | ||
} from './levels'; | ||
export { default as consoleOutput } from './outputs/consoleOutput'; | ||
export { default as Logger } from './Logger'; | ||
levels, | ||
consoleOutput, | ||
Logger, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36828
10
671
0
14
Updated@babel/runtime@^7.14.5