Skip to content

Commit

Permalink
Update typescript 3.9.10 -> 4.9.5 (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz authored Sep 8, 2023
1 parent e50c796 commit 528cf94
Show file tree
Hide file tree
Showing 25 changed files with 6,864 additions and 2,568 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x ]
node-version: [14.x, 16.x]
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ lerna-debug.log
yarn-error.log
packages/*/node_modules
dist
packages/*/dist
packages/*/dist
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"prettier": "^1.18.2",
"ts-jest": "^24.0.2",
"ts-node": "^8.3.0",
"typescript": "^3.9.7"
"typescript": "^4.9.5"
}
}
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"npm-run-all": "^4.1.5",
"ts-loader": "^6.0.4",
"ts-node": "^8.3.0",
"typescript": "^3.9.7",
"typescript": "^4.9.5",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.7"
},
Expand Down
1,305 changes: 1,007 additions & 298 deletions packages/browser/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/bunyan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/bunyan": "^1.8.6",
"bunyan": "^1.8.12",
"npm-run-all": "^4.1.5",
"typescript": "^3.9.7"
"typescript": "^4.9.5"
},
"peerDependencies": {
"bunyan": ">=1.8.12"
Expand Down
711 changes: 539 additions & 172 deletions packages/bunyan/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"typescript": "^3.9.7"
"typescript": "^4.9.5"
},
"dependencies": {
"@logtail/tools": "^0.4.6",
Expand Down
20 changes: 16 additions & 4 deletions packages/core/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,22 @@ class Logtail {
context: TContext = {} as TContext
): Promise<ILogtailLog & TContext> {
if (this._options.sendLogsToConsoleOutput) {
if (["debug", "info", "warn", "error"].indexOf(level) !== -1) {
console[level as keyof typeof console](message, context)
} else {
console.log(`[${level.toUpperCase()}]`, message, context)
switch (level) {
case "debug":
console.debug(message, context)
break
case "info":
console.info(message, context)
break
case "warn":
console.warn(message, context)
break
case "error":
console.error(message, context)
break
default:
console.log(`[${level.toUpperCase()}]`, message, context)
break
}
}

Expand Down
Loading

0 comments on commit 528cf94

Please sign in to comment.