@ui5/logger
Advanced tools
Comparing version 3.0.0-alpha.0 to 3.0.0-beta.1
@@ -5,10 +5,48 @@ # Changelog | ||
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-logger/compare/v3.0.0-alpha.0...HEAD). | ||
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-logger/compare/v3.0.0-beta.1...HEAD). | ||
<a name="v3.0.0-alpha.0"></a> | ||
## [v3.0.0-alpha.0] - 2021-12-14 | ||
<a name="v3.0.0-beta.1"></a> | ||
## [v3.0.0-beta.1] - 2022-11-04 | ||
<a name="v3.0.1-alpha.3"></a> | ||
## [v3.0.1-alpha.3] - 2022-10-24 | ||
### Breaking Changes | ||
- Transform to native ESM ([#306](https://github.com/SAP/ui5-logger/issues/306)) [`c79608b`](https://github.com/SAP/ui5-logger/commit/c79608b0e432168ca8570530b63a456b9ddd12cb) | ||
### BREAKING CHANGE | ||
This package has been transformed to native ESM. Therefore it no longer provides a CommonJS export. | ||
If your project uses CommonJS, it needs to be converted to ESM or use a dynamic import. | ||
For more information see also: | ||
- https://sap.github.io/ui5-tooling/updates/migrate-v3/ | ||
- https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c | ||
<a name="v3.0.1-alpha.2"></a> | ||
## [v3.0.1-alpha.2] - 2022-07-28 | ||
### Features | ||
- Add new log level "perf" [`acf0c71`](https://github.com/SAP/ui5-logger/commit/acf0c717612f440ea7a114e757c05d358ae523a7) | ||
<a name="v3.0.1-alpha.1"></a> | ||
## [v3.0.1-alpha.1] - 2022-01-25 | ||
### Breaking Changes | ||
- Require Node.js >= 16.13.2 / npm >= 8 [`a8af8a7`](https://github.com/SAP/ui5-logger/commit/a8af8a7a82c6f657ac10b5018e654939d90fd81f) | ||
### BREAKING CHANGE | ||
Support for older Node.js and npm releases has been dropped. | ||
Only Node.js v16.13.2 and npm v8 or higher are supported. | ||
<a name="v3.0.1-alpha.0"></a> | ||
## [v3.0.1-alpha.0] - 2021-12-14 | ||
<a name="v3.0.0-next.0"></a> | ||
## [v3.0.0-next.0] - 2021-11-29 | ||
<a name="v3.0.0-alpha.0"></a> | ||
## [v3.0.0-alpha.0] - 2021-12-14 | ||
<a name="v2.0.1"></a> | ||
@@ -61,4 +99,9 @@ ## [v2.0.1] - 2020-10-22 | ||
[v3.0.0-alpha.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-next.0...v3.0.0-alpha.0 | ||
[v3.0.0-next.0]: https://github.com/SAP/ui5-logger/compare/v2.0.1...v3.0.0-next.0 | ||
[v3.0.0-beta.1]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.3...v3.0.0-beta.1 | ||
[v3.0.1-alpha.3]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.2...v3.0.1-alpha.3 | ||
[v3.0.1-alpha.2]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.1...v3.0.1-alpha.2 | ||
[v3.0.1-alpha.1]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.0...v3.0.1-alpha.1 | ||
[v3.0.1-alpha.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-next.0...v3.0.1-alpha.0 | ||
[v3.0.0-next.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-alpha.0...v3.0.0-next.0 | ||
[v3.0.0-alpha.0]: https://github.com/SAP/ui5-logger/compare/v2.0.1...v3.0.0-alpha.0 | ||
[v2.0.1]: https://github.com/SAP/ui5-logger/compare/v2.0.0...v2.0.1 | ||
@@ -65,0 +108,0 @@ [v2.0.0]: https://github.com/SAP/ui5-logger/compare/v1.0.2...v2.0.0 |
# Contributing to the UI5 Tooling | ||
See CONTRIBUTING.md in the [SAP/ui5-tooling](https://github.com/SAP/ui5-tooling/blob/master/CONTRIBUTING.md) repository. | ||
See CONTRIBUTING.md in the [SAP/ui5-tooling](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md) repository. |
117
jsdoc.json
{ | ||
"tags": { | ||
"allowUnknownTags": false | ||
}, | ||
"source": { | ||
"include": ["README.md", "index.js"], | ||
"includePattern": ".+\\.js$", | ||
"excludePattern": "(node_modules(\\\\|/))" | ||
}, | ||
"plugins": [], | ||
"opts": { | ||
"template": "node_modules/docdash/", | ||
"encoding": "utf8", | ||
"destination": "jsdocs/", | ||
"recurse": true, | ||
"verbose": true, | ||
"access": "public" | ||
}, | ||
"templates": { | ||
"cleverLinks": false, | ||
"monospaceLinks": false, | ||
"default": { | ||
"useLongnameInNav": true | ||
} | ||
}, | ||
"openGraph": { | ||
"title": "UI5 Tooling - API Reference", | ||
"type": "website", | ||
"image": "https://sap.github.io/ui5-tooling/docs/images/UI5_logo_wide.png", | ||
"site_name": "UI5 Tooling - API Reference", | ||
"url": "https://sap.github.io/ui5-tooling/" | ||
}, | ||
"docdash": { | ||
"sectionOrder": [ | ||
"Modules", | ||
"Namespaces", | ||
"Classes", | ||
"Externals", | ||
"Events", | ||
"Mixins", | ||
"Tutorials", | ||
"Interfaces" | ||
], | ||
"meta": { | ||
"title": "UI5 Tooling - API Reference - UI5 Logger", | ||
"description": "UI5 Tooling - API Reference - UI5 Logger", | ||
"keyword": "openui5 sapui5 ui5 build development tool api reference" | ||
}, | ||
"search": true, | ||
"wrap": true, | ||
"menu": { | ||
"GitHub": { | ||
"href": "https://github.com/SAP/ui5-logger", | ||
"target": "_blank", | ||
"class": "menu-item", | ||
"id": "github_link" | ||
} | ||
} | ||
} | ||
"tags": { | ||
"allowUnknownTags": false | ||
}, | ||
"source": { | ||
"include": ["README.md"], | ||
"includePattern": ".+\\.js$", | ||
"excludePattern": "(node_modules(\\\\|/))" | ||
}, | ||
"plugins": [ | ||
"jsdoc-plugin.cjs" | ||
], | ||
"opts": { | ||
"encoding": "utf8", | ||
"destination": "jsdocs/", | ||
"recurse": true, | ||
"verbose": true, | ||
"access": "public" | ||
}, | ||
"templates": { | ||
"cleverLinks": false, | ||
"monospaceLinks": false, | ||
"default": { | ||
"useLongnameInNav": true | ||
} | ||
}, | ||
"openGraph": { | ||
"title": "UI5 Tooling - API Reference", | ||
"type": "website", | ||
"image": "https://sap.github.io/ui5-tooling/docs/images/UI5_logo_wide.png", | ||
"site_name": "UI5 Tooling - API Reference", | ||
"url": "https://sap.github.io/ui5-tooling/" | ||
}, | ||
"docdash": { | ||
"sectionOrder": [ | ||
"Modules", | ||
"Namespaces", | ||
"Classes", | ||
"Externals", | ||
"Events", | ||
"Mixins", | ||
"Tutorials", | ||
"Interfaces" | ||
], | ||
"meta": { | ||
"title": "UI5 Tooling - API Reference - UI5 Logger", | ||
"description": "UI5 Tooling - API Reference - UI5 Logger", | ||
"keyword": "openui5 sapui5 ui5 build development tool api reference" | ||
}, | ||
"search": true, | ||
"wrap": true, | ||
"menu": { | ||
"GitHub": { | ||
"href": "https://github.com/SAP/ui5-logger", | ||
"target": "_blank", | ||
"class": "menu-item", | ||
"id": "github_link" | ||
} | ||
} | ||
} | ||
} |
@@ -1,4 +0,4 @@ | ||
const npmlog = require("npmlog"); | ||
import npmlog from "npmlog"; | ||
const levels = ["silly", "verbose", "info", "warn", "error", "silent"]; | ||
const levels = ["silly", "verbose", "perf", "info", "warn", "error", "silent"]; | ||
if (process.env.UI5_LOG_LVL) { | ||
@@ -15,4 +15,9 @@ const logLvl = process.env.UI5_LOG_LVL; | ||
npmlog.enableUnicode(); | ||
npmlog.enableUnicode(); // TODO: Check whether unicode is actually supported | ||
npmlog.prefixStyle = {fg: "blue"}; | ||
npmlog.headingStyle = {fg: "white", bg: "black"}; | ||
// Verbose is at level 1000, info at 2000 | ||
npmlog.addLevel("perf", 1500, {fg: "white", bg: "red"}, "PERF"); | ||
npmlog.on("error", (err) => { | ||
@@ -56,2 +61,6 @@ console.log(err); | ||
perf(...messages) { | ||
return this._logger.perf(this._moduleName, ...messages); | ||
} | ||
info(...messages) { | ||
@@ -156,2 +165,3 @@ return this._logger.info(this._moduleName, ...messages); | ||
// Export internal classes for testing only | ||
/* istanbul ignore else */ | ||
if (process.env.NODE_ENV === "test") { | ||
@@ -163,2 +173,2 @@ logger.__test__ = { | ||
module.exports = logger; | ||
export default logger; |
{ | ||
"name": "@ui5/logger", | ||
"version": "3.0.0-alpha.0", | ||
"version": "3.0.0-beta.1", | ||
"description": "UI5 Tooling - Internal Logger", | ||
@@ -19,6 +19,10 @@ "author": { | ||
], | ||
"main": "index.js", | ||
"type": "module", | ||
"exports": { | ||
".": "./lib/logger.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"engines": { | ||
"node": ">= 10", | ||
"npm": ">= 5" | ||
"node": ">= 16.13.2", | ||
"npm": ">= 8" | ||
}, | ||
@@ -31,19 +35,19 @@ "scripts": { | ||
"unit-verbose": "rimraf test/tmp && cross-env UI5_LOG_LVL=verbose ava --verbose --serial", | ||
"unit-watch": "rimraf test/tmp && ava --watch", | ||
"unit-nyan": "rimraf test/tmp && ava --tap | tnyan", | ||
"unit-xunit": "rimraf test/tmp && ava --tap | tap-xunit --dontUseCommentsAsTestNames=true > test-results.xml", | ||
"unit-watch": "npm run unit -- --watch", | ||
"unit-nyan": "npm run unit -- --tap | tnyan", | ||
"unit-xunit": "rimraf test/tmp && ava --node-arguments=\"--experimental-loader=@istanbuljs/esm-loader-hook\" --tap | tap-xunit --dontUseCommentsAsTestNames=true > test-results.xml", | ||
"unit-inspect": "cross-env UI5_LOG_LVL=verbose ava debug --break", | ||
"coverage": "nyc npm run unit", | ||
"coverage": "rimraf test/tmp && nyc ava --node-arguments=\"--experimental-loader=@istanbuljs/esm-loader-hook\"", | ||
"coverage-xunit": "nyc --reporter=text --reporter=text-summary --reporter=cobertura npm run unit-xunit", | ||
"jsdoc": "npm run jsdoc-generate && open-cli jsdocs/index.html", | ||
"jsdoc-generate": "node_modules/.bin/jsdoc -c ./jsdoc.json ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", | ||
"jsdoc-generate": "jsdoc -c ./jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", | ||
"jsdoc-watch": "npm run jsdoc && chokidar \"./lib/**/*.js\" -c \"npm run jsdoc-generate\"", | ||
"preversion": "npm test", | ||
"version": "git-chglog --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md", | ||
"version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md", | ||
"postversion": "git push --follow-tags", | ||
"release-note": "git-chglog -c .chglog/release-config.yml v$npm_package_version", | ||
"depcheck": "depcheck --ignores docdash" | ||
"release-note": "git-chglog --sort semver -c .chglog/release-config.yml v$npm_package_version", | ||
"depcheck": "depcheck --ignores docdash,@istanbuljs/esm-loader-hook" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"CHANGELOG.md", | ||
"CONTRIBUTING.md", | ||
@@ -58,2 +62,6 @@ "jsdoc.json", | ||
"test/lib/**/*.js" | ||
], | ||
"nodeArguments": [ | ||
"--loader=esmock", | ||
"--no-warnings" | ||
] | ||
@@ -72,4 +80,4 @@ }, | ||
"test/**", | ||
".eslintrc.js", | ||
"jsdoc-plugin.js" | ||
".eslintrc.cjs", | ||
"jsdoc-plugin.cjs" | ||
], | ||
@@ -107,20 +115,21 @@ "check-coverage": true, | ||
"dependencies": { | ||
"npmlog": "^5.0.1" | ||
"npmlog": "^6.0.2" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"@istanbuljs/esm-loader-hook": "^0.2.0", | ||
"ava": "^5.0.1", | ||
"chokidar-cli": "^3.0.0", | ||
"cross-env": "^7.0.3", | ||
"depcheck": "^1.4.2", | ||
"depcheck": "^1.4.3", | ||
"docdash": "^1.2.0", | ||
"eslint": "^7.32.0", | ||
"eslint": "^8.27.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint-plugin-ava": "^13.1.0", | ||
"eslint-plugin-jsdoc": "^37.2.0", | ||
"eslint-plugin-ava": "^13.2.0", | ||
"eslint-plugin-jsdoc": "^39.6.2", | ||
"esmock": "^2.0.7", | ||
"jsdoc": "^3.6.7", | ||
"mock-require": "^3.0.3", | ||
"nyc": "^15.1.0", | ||
"open-cli": "^6.0.1", | ||
"open-cli": "^7.1.0", | ||
"rimraf": "^3.0.2", | ||
"sinon": "^11.1.2", | ||
"sinon": "^14.0.0", | ||
"tap-nyan": "^1.1.0", | ||
@@ -127,0 +136,0 @@ "tap-xunit": "^2.4.1" |
@@ -1,2 +0,2 @@ | ||
![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-tooling/master/docs/images/UI5_logo_wide.png) | ||
![UI5 icon](https://raw.githubusercontent.com/SAP/ui5-tooling/main/docs/images/UI5_logo_wide.png) | ||
@@ -8,3 +8,3 @@ # ui5-logger | ||
[![REUSE status](https://api.reuse.software/badge/github.com/SAP/ui5-logger)](https://api.reuse.software/info/github.com/SAP/ui5-logger) | ||
[![Build Status](https://dev.azure.com/sap/opensource/_apis/build/status/SAP.ui5-logger?branchName=master)](https://dev.azure.com/sap/opensource/_build/latest?definitionId=37&branchName=master) | ||
[![Build Status](https://dev.azure.com/sap/opensource/_apis/build/status/SAP.ui5-logger?branchName=main)](https://dev.azure.com/sap/opensource/_build/latest?definitionId=37&branchName=main) | ||
[![npm Package Version](https://badge.fury.io/js/%40ui5%2Flogger.svg)](https://www.npmjs.com/package/@ui5/logger) | ||
@@ -19,6 +19,6 @@ | ||
## Contributing | ||
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/master/CONTRIBUTING.md). | ||
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md). | ||
## Support | ||
Please follow our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/master/CONTRIBUTING.md#report-an-issue) on how to report an issue. | ||
Please follow our [Contribution Guidelines](https://github.com/SAP/ui5-tooling/blob/main/CONTRIBUTING.md#report-an-issue) on how to report an issue. | ||
@@ -25,0 +25,0 @@ Please report issues in the main [UI5 Tooling](https://github.com/SAP/ui5-tooling) repository. |
Sorry, the diff of this file is not supported yet
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
37748
199
Yes
18
9
+ Addedare-we-there-yet@3.0.1(transitive)
+ Addedgauge@4.0.4(transitive)
+ Addednpmlog@6.0.2(transitive)
- Removedare-we-there-yet@2.0.0(transitive)
- Removedgauge@3.0.2(transitive)
- Removednpmlog@5.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
Updatednpmlog@^6.0.2