@ui5/logger 3.0.0-next.0 → 3.0.1-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,10 +2,33 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
4
 
5
- A list of unreleased changes can be found [here](https://github.com/SAP/ui5-logger/compare/v3.0.0-next.0...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.2...HEAD).
6
+
7
+ <a name="v3.0.1-alpha.2"></a>
8
+ ## [v3.0.1-alpha.2] - 2022-07-28
9
+ ### Features
10
+ - Add new log level "perf" [`acf0c71`](https://github.com/SAP/ui5-logger/commit/acf0c717612f440ea7a114e757c05d358ae523a7)
11
+
12
+
13
+ <a name="v3.0.1-alpha.1"></a>
14
+ ## [v3.0.1-alpha.1] - 2022-01-25
15
+ ### Breaking Changes
16
+ - Require Node.js >= 16.13.2 / npm >= 8 [`a8af8a7`](https://github.com/SAP/ui5-logger/commit/a8af8a7a82c6f657ac10b5018e654939d90fd81f)
17
+
18
+ ### BREAKING CHANGE
19
+
20
+ Support for older Node.js and npm releases has been dropped.
21
+ Only Node.js v16.13.2 and npm v8 or higher are supported.
22
+
23
+
24
+ <a name="v3.0.1-alpha.0"></a>
25
+ ## [v3.0.1-alpha.0] - 2021-12-14
6
26
 
7
27
  <a name="v3.0.0-next.0"></a>
8
- ## [v3.0.0-next.0] - 2021-11-23
28
+ ## [v3.0.0-next.0] - 2021-11-29
29
+
30
+ <a name="v3.0.0-alpha.0"></a>
31
+ ## [v3.0.0-alpha.0] - 2021-12-14
9
32
 
10
33
  <a name="v2.0.1"></a>
11
34
  ## [v2.0.1] - 2020-10-22
@@ -54,7 +77,11 @@ Only Node.js v10 or higher is supported.
54
77
  <a name="v0.0.1"></a>
55
78
  ## v0.0.1 - 2018-06-06
56
79
 
57
- [v3.0.0-next.0]: https://github.com/SAP/ui5-logger/compare/v2.0.1...v3.0.0-next.0
80
+ [v3.0.1-alpha.2]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.1...v3.0.1-alpha.2
81
+ [v3.0.1-alpha.1]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.0...v3.0.1-alpha.1
82
+ [v3.0.1-alpha.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-next.0...v3.0.1-alpha.0
83
+ [v3.0.0-next.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-alpha.0...v3.0.0-next.0
84
+ [v3.0.0-alpha.0]: https://github.com/SAP/ui5-logger/compare/v2.0.1...v3.0.0-alpha.0
58
85
  [v2.0.1]: https://github.com/SAP/ui5-logger/compare/v2.0.0...v2.0.1
59
86
  [v2.0.0]: https://github.com/SAP/ui5-logger/compare/v1.0.2...v2.0.0
60
87
  [v1.0.2]: https://github.com/SAP/ui5-logger/compare/v1.0.1...v1.0.2
package/jsdoc.json CHANGED
@@ -1,60 +1,61 @@
1
1
  {
2
- "tags": {
3
- "allowUnknownTags": false
4
- },
5
- "source": {
6
- "include": ["README.md", "index.js"],
7
- "includePattern": ".+\\.js$",
8
- "excludePattern": "(node_modules(\\\\|/))"
9
- },
10
- "plugins": [],
11
- "opts": {
12
- "template": "node_modules/docdash/",
13
- "encoding": "utf8",
14
- "destination": "jsdocs/",
15
- "recurse": true,
16
- "verbose": true,
17
- "access": "public"
18
- },
19
- "templates": {
20
- "cleverLinks": false,
21
- "monospaceLinks": false,
22
- "default": {
23
- "useLongnameInNav": true
24
- }
25
- },
26
- "openGraph": {
27
- "title": "UI5 Tooling - API Reference",
28
- "type": "website",
29
- "image": "https://sap.github.io/ui5-tooling/docs/images/UI5_logo_wide.png",
30
- "site_name": "UI5 Tooling - API Reference",
31
- "url": "https://sap.github.io/ui5-tooling/"
32
- },
33
- "docdash": {
34
- "sectionOrder": [
35
- "Modules",
36
- "Namespaces",
37
- "Classes",
38
- "Externals",
39
- "Events",
40
- "Mixins",
41
- "Tutorials",
42
- "Interfaces"
43
- ],
44
- "meta": {
45
- "title": "UI5 Tooling - API Reference - UI5 Logger",
46
- "description": "UI5 Tooling - API Reference - UI5 Logger",
47
- "keyword": "openui5 sapui5 ui5 build development tool api reference"
48
- },
49
- "search": true,
50
- "wrap": true,
51
- "menu": {
52
- "GitHub": {
53
- "href": "https://github.com/SAP/ui5-logger",
54
- "target": "_blank",
55
- "class": "menu-item",
56
- "id": "github_link"
57
- }
58
- }
59
- }
2
+ "tags": {
3
+ "allowUnknownTags": false
4
+ },
5
+ "source": {
6
+ "include": ["README.md", "index.js"],
7
+ "includePattern": ".+\\.js$",
8
+ "excludePattern": "(node_modules(\\\\|/))"
9
+ },
10
+ "plugins": [
11
+ "./jsdoc-plugin"
12
+ ],
13
+ "opts": {
14
+ "encoding": "utf8",
15
+ "destination": "jsdocs/",
16
+ "recurse": true,
17
+ "verbose": true,
18
+ "access": "public"
19
+ },
20
+ "templates": {
21
+ "cleverLinks": false,
22
+ "monospaceLinks": false,
23
+ "default": {
24
+ "useLongnameInNav": true
25
+ }
26
+ },
27
+ "openGraph": {
28
+ "title": "UI5 Tooling - API Reference",
29
+ "type": "website",
30
+ "image": "https://sap.github.io/ui5-tooling/docs/images/UI5_logo_wide.png",
31
+ "site_name": "UI5 Tooling - API Reference",
32
+ "url": "https://sap.github.io/ui5-tooling/"
33
+ },
34
+ "docdash": {
35
+ "sectionOrder": [
36
+ "Modules",
37
+ "Namespaces",
38
+ "Classes",
39
+ "Externals",
40
+ "Events",
41
+ "Mixins",
42
+ "Tutorials",
43
+ "Interfaces"
44
+ ],
45
+ "meta": {
46
+ "title": "UI5 Tooling - API Reference - UI5 Logger",
47
+ "description": "UI5 Tooling - API Reference - UI5 Logger",
48
+ "keyword": "openui5 sapui5 ui5 build development tool api reference"
49
+ },
50
+ "search": true,
51
+ "wrap": true,
52
+ "menu": {
53
+ "GitHub": {
54
+ "href": "https://github.com/SAP/ui5-logger",
55
+ "target": "_blank",
56
+ "class": "menu-item",
57
+ "id": "github_link"
58
+ }
59
+ }
60
+ }
60
61
  }
package/lib/logger.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const npmlog = require("npmlog");
2
2
 
3
- const levels = ["silly", "verbose", "info", "warn", "error", "silent"];
3
+ const levels = ["silly", "verbose", "perf", "info", "warn", "error", "silent"];
4
4
  if (process.env.UI5_LOG_LVL) {
5
5
  const logLvl = process.env.UI5_LOG_LVL;
6
6
  if (!levels.includes(logLvl)) {
@@ -12,7 +12,12 @@ if (process.env.UI5_LOG_LVL) {
12
12
  npmlog.level = "info"; // Our default
13
13
  }
14
14
 
15
- npmlog.enableUnicode();
15
+ npmlog.enableUnicode(); // TODO: Check whether unicode is actually supported
16
+ npmlog.prefixStyle = {fg: "blue"};
17
+ npmlog.headingStyle = {fg: "white", bg: "black"};
18
+
19
+ // Verbose is at level 1000, info at 2000
20
+ npmlog.addLevel("perf", 1500, {fg: "white", bg: "red"}, "PERF");
16
21
 
17
22
  npmlog.on("error", (err) => {
18
23
  console.log(err);
@@ -52,6 +57,10 @@ class Logger {
52
57
  return this._logger.verbose(this._moduleName, ...messages);
53
58
  }
54
59
 
60
+ perf(...messages) {
61
+ return this._logger.perf(this._moduleName, ...messages);
62
+ }
63
+
55
64
  info(...messages) {
56
65
  return this._logger.info(this._moduleName, ...messages);
57
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/logger",
3
- "version": "3.0.0-next.0",
3
+ "version": "3.0.1-alpha.2",
4
4
  "description": "UI5 Tooling - Internal Logger",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -18,8 +18,8 @@
18
18
  ],
19
19
  "main": "index.js",
20
20
  "engines": {
21
- "node": ">= 10",
22
- "npm": ">= 5"
21
+ "node": ">= 16.13.2",
22
+ "npm": ">= 8"
23
23
  },
24
24
  "scripts": {
25
25
  "test": "npm run lint && npm run jsdoc-generate && npm run coverage && npm run depcheck",
@@ -34,16 +34,17 @@
34
34
  "coverage": "nyc npm run unit",
35
35
  "coverage-xunit": "nyc --reporter=text --reporter=text-summary --reporter=cobertura npm run unit-xunit",
36
36
  "jsdoc": "npm run jsdoc-generate && open-cli jsdocs/index.html",
37
- "jsdoc-generate": "node_modules/.bin/jsdoc -c ./jsdoc.json ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
37
+ "jsdoc-generate": "jsdoc -c ./jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
38
38
  "jsdoc-watch": "npm run jsdoc && chokidar \"./lib/**/*.js\" -c \"npm run jsdoc-generate\"",
39
39
  "preversion": "npm test",
40
- "version": "git-chglog --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md",
40
+ "version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md",
41
41
  "postversion": "git push --follow-tags",
42
- "release-note": "git-chglog -c .chglog/release-config.yml v$npm_package_version",
42
+ "release-note": "git-chglog --sort semver -c .chglog/release-config.yml v$npm_package_version",
43
43
  "depcheck": "depcheck --ignores docdash"
44
44
  },
45
45
  "files": [
46
46
  "index.js",
47
+ "CHANGELOG.md",
47
48
  "CONTRIBUTING.md",
48
49
  "jsdoc.json",
49
50
  "lib/**",
@@ -100,18 +101,18 @@
100
101
  "url": "git@github.com:SAP/ui5-logger.git"
101
102
  },
102
103
  "dependencies": {
103
- "npmlog": "^5.0.1"
104
+ "npmlog": "^6.0.2"
104
105
  },
105
106
  "devDependencies": {
106
107
  "ava": "^3.15.0",
107
108
  "chokidar-cli": "^3.0.0",
108
109
  "cross-env": "^7.0.3",
109
- "depcheck": "^1.4.2",
110
+ "depcheck": "^1.4.3",
110
111
  "docdash": "^1.2.0",
111
- "eslint": "^7.32.0",
112
+ "eslint": "^8.7.0",
112
113
  "eslint-config-google": "^0.14.0",
113
- "eslint-plugin-ava": "^13.1.0",
114
- "eslint-plugin-jsdoc": "^37.0.3",
114
+ "eslint-plugin-ava": "^13.2.0",
115
+ "eslint-plugin-jsdoc": "^37.6.3",
115
116
  "jsdoc": "^3.6.7",
116
117
  "mock-require": "^3.0.3",
117
118
  "nyc": "^15.1.0",