-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use logger instead of console.log (#683)
* fix: use logger instead of console.log * fix: change set * fix: add dependency * fix: cyclic dependencies * fix: change set * fix: sonar * fix: failing tests * fix: add new package to tsconfig.json * fix: remove duplicate
- Loading branch information
1 parent
6960178
commit a9a2141
Showing
54 changed files
with
1,101 additions
and
892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
"@ui5-language-assistant/vscode-ui5-language-assistant-bas-ext": patch | ||
"vscode-ui5-language-assistant": patch | ||
"@ui5-language-assistant/language-server": patch | ||
"@ui5-language-assistant/semantic-model": patch | ||
"@ui5-language-assistant/logic-utils": patch | ||
"@ui5-language-assistant/binding": patch | ||
"@ui5-language-assistant/context": patch | ||
"@ui5-language-assistant/xml-views-completion": patch | ||
"@ui5-language-assistant/xml-views-validation": patch | ||
"@ui5-language-assistant/xml-views-tooltip": patch | ||
"@ui5-language-assistant/fe": patch | ||
"@ui5-language-assistant/test-utils": patch | ||
"@ui5-language-assistant/test-framework": patch | ||
--- | ||
|
||
Add logger package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
const { join } = require("path"); | ||
|
||
module.exports = { | ||
preset: "ts-jest", | ||
testEnvironment: "node", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
jest.setTimeout(120000); // 2 min | ||
|
||
jest.setTimeout(420000); // 7 min | ||
// add all jest-extended matchers | ||
const matchers = require("jest-extended"); | ||
expect.extend(matchers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
import { | ||
getLogger as logger, | ||
ILogger, | ||
} from "@ui5-language-assistant/logic-utils"; | ||
|
||
const getPackageName = (): string => { | ||
let meta: { name: string }; | ||
try { | ||
meta = require("../../package.json"); | ||
} catch (e) { | ||
meta = require("../../../package.json"); | ||
} | ||
|
||
if (!meta) { | ||
return ""; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires -- Using `require` for .json file as this gets bundled with webpack correctly. | ||
return meta.name; | ||
}; | ||
import { getLogger as logger, ILogger } from "@ui5-language-assistant/logger"; | ||
import { PACKAGE_NAME } from "../constant"; | ||
|
||
export const getLogger = (): ILogger => { | ||
const name = getPackageName(); | ||
return logger(name); | ||
return logger(PACKAGE_NAME); | ||
}; |
Oops, something went wrong.