@ui5/logger 3.0.1-rc.2 → 4.0.0

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/.reuse/dep5 CHANGED
@@ -25,5 +25,5 @@ Disclaimer: The code in this project may include calls to APIs (“API Calls”)
25
25
  parties the right to use of access any SAP External Product, through API Calls.
26
26
 
27
27
  Files: *
28
- Copyright: 2018-2023 SAP SE or an SAP affiliate company and UI5 Tooling contributors
28
+ Copyright: 2018-2024 SAP SE or an SAP affiliate company and UI5 Tooling contributors
29
29
  License: Apache-2.0
package/CHANGELOG.md CHANGED
@@ -2,109 +2,75 @@
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.1-rc.2...HEAD).
5
+ A list of unreleased changes can be found [here](https://github.com/SAP/ui5-logger/compare/v4.0.0...HEAD).
6
6
 
7
- <a name="v3.0.1-rc.2"></a>
8
- ## [v3.0.1-rc.2] - 2023-01-24
9
-
10
- <a name="v3.0.1-rc.1"></a>
11
- ## [v3.0.1-rc.1] - 2023-01-18
7
+ <a name="v4.0.0"></a>
8
+ ## [v4.0.0] - 2024-07-16
12
9
  ### Breaking Changes
13
- - Replace npmlog with [@ui5](https://github.com/ui5)/logger/Logger ([#363](https://github.com/SAP/ui5-logger/issues/363)) [`66a159a`](https://github.com/SAP/ui5-logger/commit/66a159acd9b67a27dd66d1e8056c362585f51bcf)
14
-
15
- ### BREAKING CHANGE
10
+ - Require Node.js 20.11.x/>=21.2.0 and npm >=10 [`37620d7`](https://github.com/SAP/ui5-logger/commit/37620d7ca67b94b5093670c5ac5383bbb9109c33)
16
11
 
12
+ ### Dependency Updates
13
+ - Bump figures from 5.0.0 to 6.0.1 [`550a3cd`](https://github.com/SAP/ui5-logger/commit/550a3cdd43eee3b2ea28a5db67c1a4485ec52a45)
17
14
 
15
+ ### BREAKING CHANGE
18
16
 
17
+ Support for older Node.js and npm releases has been dropped.
18
+ Only Node.js 20.11.x and >=21.2.0 as well as npm v10 or higher are supported.
19
19
 
20
- <a name="v3.0.1-rc.0"></a>
21
- ## [v3.0.1-rc.0] - 2022-12-23
20
+ <a name="v3.0.0"></a>
21
+ ## [v3.0.0] - 2023-02-09
22
22
  ### Breaking Changes
23
+
24
+ - Replace npmlog with @ui5/logger/Logger (#363) [`66a159a`](https://github.com/SAP/ui5-logger/commit/66a159acd9b67a27dd66d1e8056c362585f51bcf)
23
25
  - Deprecate advanced APIs in preparation of refactoring [`3aea5e7`](https://github.com/SAP/ui5-logger/commit/3aea5e766f9bda156e8c7e62a2e8c65f613ef7e9)
26
+ - Transform to ES Modules ([#306](https://github.com/SAP/ui5-logger/issues/306)) [`c79608b`](https://github.com/SAP/ui5-logger/commit/c79608b0e432168ca8570530b63a456b9ddd12cb)
27
+ - Require Node.js ^16.18.0, >=18.12.0 / npm >= 8 [`a8af8a7`](https://github.com/SAP/ui5-logger/commit/a8af8a7a82c6f657ac10b5018e654939d90fd81f)
24
28
 
25
29
  ### BREAKING CHANGE
26
30
 
31
+ The @ui5/logger got refactored and as a result its API went public.
27
32
 
33
+ Remove the usage of npmlog and refactor @ui5/logger modules to emit log events which are then caught in dedicated handlers. This is somewhat inspired by npm's proc-log module.
28
34
 
35
+ This breaking change removes capabilities that are likely to change and should not be part of a public API.
29
36
 
30
- <a name="v3.0.1-beta.1"></a>
31
- ## [v3.0.1-beta.1] - 2022-11-11
32
- ### Dependency Updates
33
- - Bump npmlog from 5.0.1 to 7.0.1 ([#321](https://github.com/SAP/ui5-logger/issues/321)) [`6c5c154`](https://github.com/SAP/ui5-logger/commit/6c5c154c53d8f81774d588714e8426922fa85271)
34
-
37
+ This will ensure that later changes to the module can be donen in a
38
+ compatible manner.
35
39
 
36
- <a name="v3.0.1-beta.0"></a>
37
- ## [v3.0.1-beta.0] - 2022-11-07
38
-
39
- <a name="v3.0.1-alpha.3"></a>
40
- ## [v3.0.1-alpha.3] - 2022-10-24
41
- ### Breaking Changes
42
- - Transform to native ESM ([#306](https://github.com/SAP/ui5-logger/issues/306)) [`c79608b`](https://github.com/SAP/ui5-logger/commit/c79608b0e432168ca8570530b63a456b9ddd12cb)
40
+ Relevant changes:
43
41
 
44
- ### BREAKING CHANGE
42
+ - Restrict log-methods to two argument only. The use of placeholders
43
+ like '%s' is no longer supported. A warning will be logged if more
44
+ than two argument is supplied. Placeholders will be replaced with a
45
+ deprecation message. We suggest the use of template literals.
46
+ - Deprecate #getGroupLogger method. Calling it throws an error.
47
+ It will be removed in one of the next patch releases
48
+ - Deprecate #setShowProgress method. Calling it throws an error.
49
+ It will be removed in one of the next patch releases
50
+ - Remove GroupLogger and TaskLogger classes. Similar functionality might
51
+ be re-added in a later release.
45
52
 
46
- This package has been transformed to native ESM. Therefore it no longer provides a CommonJS export.
47
- If your project uses CommonJS, it needs to be converted to ESM or use a dynamic import.
53
+ This package has been transformed to ES Modules. Therefore it no longer provides a CommonJS export.
54
+ If your project uses CommonJS, it needs to be converted to ES Modules or use a dynamic import.
48
55
 
49
56
  For more information see also:
57
+
50
58
  - https://sap.github.io/ui5-tooling/updates/migrate-v3/
51
59
  - https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
52
60
 
53
-
54
- <a name="v3.0.1-alpha.2"></a>
55
- ## [v3.0.1-alpha.2] - 2022-07-28
56
- ### Features
57
- - Add new log level "perf" [`acf0c71`](https://github.com/SAP/ui5-logger/commit/acf0c717612f440ea7a114e757c05d358ae523a7)
58
-
59
-
60
- <a name="v3.0.1-alpha.1"></a>
61
- ## [v3.0.1-alpha.1] - 2022-01-25
62
- ### Breaking Changes
63
- - Require Node.js >= 16.13.2 / npm >= 8 [`a8af8a7`](https://github.com/SAP/ui5-logger/commit/a8af8a7a82c6f657ac10b5018e654939d90fd81f)
64
-
65
- ### BREAKING CHANGE
66
-
67
61
  Support for older Node.js and npm releases has been dropped.
68
- Only Node.js v16.13.2 and npm v8 or higher are supported.
69
-
70
-
71
- <a name="v3.0.1-alpha.0"></a>
72
- ## [v3.0.1-alpha.0] - 2021-12-14
73
-
74
- <a name="v3.0.0-next.0"></a>
75
- ## [v3.0.0-next.0] - 2021-11-29
76
-
77
- <a name="v3.0.0-beta.1"></a>
78
- ## [v3.0.0-beta.1] - 2022-11-07
79
- ### Breaking Changes
80
- - Transform to native ESM ([#306](https://github.com/SAP/ui5-logger/issues/306)) [`c79608b`](https://github.com/SAP/ui5-logger/commit/c79608b0e432168ca8570530b63a456b9ddd12cb)
81
- - Require Node.js >= 16.13.2 / npm >= 8 [`a8af8a7`](https://github.com/SAP/ui5-logger/commit/a8af8a7a82c6f657ac10b5018e654939d90fd81f)
62
+ Only Node.js versions v16.18.0, v18.12.0 or higher as well as npm v8 or higher are supported.
82
63
 
83
64
  ### Features
84
- - Add new log level "perf" [`acf0c71`](https://github.com/SAP/ui5-logger/commit/acf0c717612f440ea7a114e757c05d358ae523a7)
85
-
86
- ### BREAKING CHANGE
87
-
88
- This package has been transformed to native ESM. Therefore it no longer provides a CommonJS export.
89
- If your project uses CommonJS, it needs to be converted to ESM or use a dynamic import.
90
-
91
- For more information see also:
92
- - https://sap.github.io/ui5-tooling/updates/migrate-v3/
93
- - https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
94
-
95
- Support for older Node.js and npm releases has been dropped.
96
- Only Node.js v16.13.2 and npm v8 or higher are supported.
97
65
 
66
+ - Add new log level "perf" [`acf0c71`](https://github.com/SAP/ui5-logger/commit/acf0c717612f440ea7a114e757c05d358ae523a7)
98
67
 
99
- <a name="v3.0.0-alpha.0"></a>
100
- ## [v3.0.0-alpha.0] - 2021-12-14
101
68
 
102
69
  <a name="v2.0.1"></a>
103
70
  ## [v2.0.1] - 2020-10-22
104
71
  ### Bug Fixes
105
72
  - Typos in error messages [`1d25902`](https://github.com/SAP/ui5-logger/commit/1d2590223c4332f5ea6f1326b23ecf584fea5934)
106
73
 
107
-
108
74
  <a name="v2.0.0"></a>
109
75
  ## [v2.0.0] - 2020-03-31
110
76
  ### Breaking Changes
@@ -115,13 +81,11 @@ Only Node.js v16.13.2 and npm v8 or higher are supported.
115
81
  Support for older Node.js releases has been dropped.
116
82
  Only Node.js v10 or higher is supported.
117
83
 
118
-
119
84
  <a name="v1.0.2"></a>
120
85
  ## [v1.0.2] - 2019-10-14
121
86
  ### Bug Fixes
122
87
  - Fix handling of log level "silent" [`020ced8`](https://github.com/SAP/ui5-logger/commit/020ced85a82d33c94e429aa28983affa0d8341ba)
123
88
 
124
-
125
89
  <a name="v1.0.1"></a>
126
90
  ## [v1.0.1] - 2019-03-21
127
91
 
@@ -133,7 +97,6 @@ Only Node.js v10 or higher is supported.
133
97
  ### Features
134
98
  - Add UI5_LOG_LVL environment variable [`c3e65c4`](https://github.com/SAP/ui5-logger/commit/c3e65c444045832773e4dc43ffa2baf903a27e52)
135
99
 
136
-
137
100
  <a name="v0.2.1"></a>
138
101
  ## [v0.2.1] - 2018-10-29
139
102
 
@@ -145,19 +108,8 @@ Only Node.js v10 or higher is supported.
145
108
 
146
109
  <a name="v0.0.1"></a>
147
110
  ## v0.0.1 - 2018-06-06
148
-
149
- [v3.0.1-rc.2]: https://github.com/SAP/ui5-logger/compare/v3.0.1-rc.1...v3.0.1-rc.2
150
- [v3.0.1-rc.1]: https://github.com/SAP/ui5-logger/compare/v3.0.1-rc.0...v3.0.1-rc.1
151
- [v3.0.1-rc.0]: https://github.com/SAP/ui5-logger/compare/v3.0.1-beta.1...v3.0.1-rc.0
152
- [v3.0.1-beta.1]: https://github.com/SAP/ui5-logger/compare/v3.0.1-beta.0...v3.0.1-beta.1
153
- [v3.0.1-beta.0]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.3...v3.0.1-beta.0
154
- [v3.0.1-alpha.3]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.2...v3.0.1-alpha.3
155
- [v3.0.1-alpha.2]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.1...v3.0.1-alpha.2
156
- [v3.0.1-alpha.1]: https://github.com/SAP/ui5-logger/compare/v3.0.1-alpha.0...v3.0.1-alpha.1
157
- [v3.0.1-alpha.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-next.0...v3.0.1-alpha.0
158
- [v3.0.0-next.0]: https://github.com/SAP/ui5-logger/compare/v3.0.0-beta.1...v3.0.0-next.0
159
- [v3.0.0-beta.1]: https://github.com/SAP/ui5-logger/compare/v3.0.0-alpha.0...v3.0.0-beta.1
160
- [v3.0.0-alpha.0]: https://github.com/SAP/ui5-logger/compare/v2.0.1...v3.0.0-alpha.0
111
+ [v4.0.0]: https://github.com/SAP/ui5-logger/compare/v3.0.1-rc.3...v4.0.0
112
+ [v3.0.0]: https://github.com/SAP/ui5-logger/compare/v2.0.1...v3.0.0
161
113
  [v2.0.1]: https://github.com/SAP/ui5-logger/compare/v2.0.0...v2.0.1
162
114
  [v2.0.0]: https://github.com/SAP/ui5-logger/compare/v1.0.2...v2.0.0
163
115
  [v1.0.2]: https://github.com/SAP/ui5-logger/compare/v1.0.1...v1.0.2
package/LICENSE.txt CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2018-2023 SAP SE or an SAP affiliate company and UI5 Tooling contributors
189
+ Copyright 2018-2024 SAP SE or an SAP affiliate company and UI5 Tooling contributors
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/jsdoc.json CHANGED
@@ -27,7 +27,7 @@
27
27
  "openGraph": {
28
28
  "title": "UI5 Tooling - API Reference",
29
29
  "type": "website",
30
- "image": "https://sap.github.io/ui5-tooling/v3/images/UI5_logo_wide.png",
30
+ "image": "https://sap.github.io/ui5-tooling/v4/images/UI5_logo_wide.png",
31
31
  "site_name": "UI5 Tooling - API Reference",
32
32
  "url": "https://sap.github.io/ui5-tooling/"
33
33
  },
package/lib/index.js CHANGED
@@ -8,7 +8,7 @@ import Logger from "./loggers/Logger.js";
8
8
  */
9
9
 
10
10
  /**
11
- * Convenience function to create an instance of [@ui5/logger/loggers/Logger]{@link @ui5/logger/loggers/Logger}
11
+ * Convenience function to create an instance of [@ui5/logger/Logger]{@link @ui5/logger/Logger}
12
12
  *
13
13
  * @public
14
14
  * @param {string} moduleName Identifier for messages created by the logger.
@@ -28,6 +28,7 @@ class Console {
28
28
  this._handleProjectBuildStatusEvent = this.#handleProjectBuildStatusEvent.bind(this);
29
29
  this._handleBuildMetadataEvent = this.#handleBuildMetadataEvent.bind(this);
30
30
  this._handleProjectBuildMetadataEvent = this.#handleProjectBuildMetadataEvent.bind(this);
31
+ this._handleStop = this.disable.bind(this);
31
32
  }
32
33
 
33
34
  /**
@@ -41,6 +42,7 @@ class Console {
41
42
  process.on("ui5.project-build-metadata", this._handleProjectBuildMetadataEvent);
42
43
  process.on("ui5.build-status", this._handleBuildStatusEvent);
43
44
  process.on("ui5.project-build-status", this._handleProjectBuildStatusEvent);
45
+ process.on("ui5.log.stop-console", this._handleStop);
44
46
  }
45
47
 
46
48
  /**
@@ -54,6 +56,7 @@ class Console {
54
56
  process.off("ui5.project-build-metadata", this._handleProjectBuildMetadataEvent);
55
57
  process.off("ui5.build-status", this._handleBuildStatusEvent);
56
58
  process.off("ui5.project-build-status", this._handleProjectBuildStatusEvent);
59
+ process.off("ui5.log.stop-console", this._handleStop);
57
60
  if (this.#progressBarContainer) {
58
61
  this.#progressBar.stop();
59
62
  this.#progressBarContainer.stop(); // Will fire internal stop event
@@ -366,6 +369,10 @@ class Console {
366
369
  cH.enable();
367
370
  return cH;
368
371
  }
372
+
373
+ static stop() {
374
+ process.emit("ui5.log.stop-console");
375
+ }
369
376
  }
370
377
 
371
378
  export default Console;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/logger",
3
- "version": "3.0.1-rc.2",
3
+ "version": "4.0.0",
4
4
  "description": "UI5 Tooling - Internal Logger",
5
5
  "author": {
6
6
  "name": "SAP SE",
@@ -25,7 +25,7 @@
25
25
  "./internal/loggers/*": "./lib/loggers/*.js"
26
26
  },
27
27
  "engines": {
28
- "node": "^16.18.0 || >=18.0.0",
28
+ "node": "^20.11.0 || >=21.2.0",
29
29
  "npm": ">= 8"
30
30
  },
31
31
  "scripts": {
@@ -43,8 +43,8 @@
43
43
  "jsdoc-generate": "jsdoc -c ./jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)",
44
44
  "jsdoc-watch": "npm run jsdoc && chokidar \"./lib/**/*.js\" -c \"npm run jsdoc-generate\"",
45
45
  "preversion": "npm test",
46
- "version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md && git add CHANGELOG.md",
47
- "postversion": "git push --follow-tags",
46
+ "version": "git-chglog --sort semver --next-tag v$npm_package_version -o CHANGELOG.md v4.0.0.. && git add CHANGELOG.md",
47
+ "prepublishOnly": "git push --follow-tags",
48
48
  "release-note": "git-chglog --sort semver -c .chglog/release-config.yml v$npm_package_version",
49
49
  "depcheck": "depcheck --ignores @ui5/logger,rimraf,docdash,@istanbuljs/esm-loader-hook"
50
50
  },
@@ -62,7 +62,8 @@
62
62
  ],
63
63
  "nodeArguments": [
64
64
  "--no-warnings"
65
- ]
65
+ ],
66
+ "workerThreads": false
66
67
  },
67
68
  "nyc": {
68
69
  "reporter": [
@@ -109,27 +110,27 @@
109
110
  "url": "git@github.com:SAP/ui5-logger.git"
110
111
  },
111
112
  "dependencies": {
112
- "chalk": "^5.2.0",
113
- "cli-progress": "^3.11.2",
114
- "figures": "^5.0.0"
113
+ "chalk": "^5.3.0",
114
+ "cli-progress": "^3.12.0",
115
+ "figures": "^6.1.0"
115
116
  },
116
117
  "devDependencies": {
117
118
  "@istanbuljs/esm-loader-hook": "^0.2.0",
118
- "ava": "^5.1.1",
119
+ "ava": "^6.1.3",
119
120
  "chokidar-cli": "^3.0.0",
120
121
  "cross-env": "^7.0.3",
121
- "depcheck": "^1.4.3",
122
- "docdash": "^2.0.1",
123
- "eslint": "^8.32.0",
122
+ "depcheck": "^1.4.7",
123
+ "docdash": "^2.0.2",
124
+ "eslint": "^8.57.0",
124
125
  "eslint-config-google": "^0.14.0",
125
126
  "eslint-plugin-ava": "^14.0.0",
126
- "eslint-plugin-jsdoc": "^39.6.7",
127
- "jsdoc": "^3.6.11",
128
- "nyc": "^15.1.0",
129
- "open-cli": "^7.1.0",
130
- "rimraf": "^4.1.1",
131
- "sinon": "^15.0.1",
132
- "strip-ansi": "^7.0.1",
127
+ "eslint-plugin-jsdoc": "^48.7.0",
128
+ "jsdoc": "^4.0.3",
129
+ "nyc": "^17.0.0",
130
+ "open-cli": "^8.0.0",
131
+ "rimraf": "^6.0.1",
132
+ "sinon": "^18.0.0",
133
+ "strip-ansi": "^7.1.0",
133
134
  "tap-xunit": "^2.4.1"
134
135
  }
135
136
  }