-
Notifications
You must be signed in to change notification settings - Fork 1
chore(logger): bumped consola #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ | |
| "@types/cli-table": "0.3.0", | ||
| "@types/find": "0.2.1", | ||
| "@types/jest": "29.4.0", | ||
| "@types/node": "20.4.9", | ||
| "@types/rimraf": "3.0.1", | ||
| "@types/valid-url": "1.0.3", | ||
| "babel-jest": "29.4.3", | ||
|
|
@@ -48,15 +49,15 @@ | |
| "ts-jest": "29.0.5", | ||
| "ts-loader": "9.2.6", | ||
| "ts-node": "10.9.1", | ||
| "typescript": "4.5.4" | ||
| "typescript": "5.1.6" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correctness: Bumping This happens because Fix: Widen the parameter type in export function unifyFilePath(
filePath: string,
separator: string = path.sep,
separatorToReplace = '/'
)Note: |
||
| }, | ||
| "dependencies": { | ||
| "@fast-csv/format": "4.3.5", | ||
| "@types/fs-extra": "9.0.13", | ||
| "@types/prompts": "2.0.13", | ||
| "chalk": "4.1.1", | ||
| "cli-table": "0.3.6", | ||
| "consola": "2.15.0", | ||
| "consola": "3.2.3", | ||
| "find": "0.3.0", | ||
| "fs-extra": "10.0.0", | ||
| "jwt-decode": "3.1.2", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,22 +4,20 @@ export const isLowerThanOrEqualTo = ( | |
| currentLevel: LogLevel, | ||
| level: LogLevel | ||
| ): boolean => { | ||
| // REFACTOR: use switch | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style: The |
||
| if (currentLevel === LogLevel.Off) return false | ||
|
|
||
| if (currentLevel === LogLevel.Debug) return true | ||
|
|
||
| if (currentLevel === LogLevel.Trace) return true | ||
|
|
||
| if (currentLevel === LogLevel.Info) { | ||
| return ( | ||
| level === LogLevel.Info || | ||
| level === LogLevel.Warn || | ||
| level === LogLevel.Error | ||
| ) | ||
| } | ||
|
|
||
| if (currentLevel === LogLevel.Warn) | ||
| if (currentLevel === LogLevel.Warn) { | ||
| return level === LogLevel.Warn || level === LogLevel.Error | ||
| } | ||
|
|
||
| return level === LogLevel.Error | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import consola from 'consola' | ||
| import { consola } from 'consola' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests: The source file now uses the named import |
||
| import { isLowerThanOrEqualTo } from './isLowerThanOrEqualTo' | ||
| import { isNullOrUndefined } from './isNullOrUndefined' | ||
| import { LogLevel } from './logLevel' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scope: The PR title says "chore(logger): bumped consola", but this commit also bumps
typescript(4.5.4 to 5.1.6) and@types/node(17.0.12 to 20.4.9). These are significant upgrades that warrant mention in the PR title or description, since they introduce breaking type changes (see comment on line 52).