Skip to content
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

Add support for String Literal Unions in addition to enums for Lumberjack Levels #192

Closed
NachoVazquez opened this issue Jan 6, 2024 · 0 comments · Fixed by #199
Closed
Assignees
Labels
enhancement New feature or request lumberjack Applies to issues of the Lumberjack project. v17 This issue will be solve as part of the Lumberjack version 17

Comments

@NachoVazquez
Copy link
Contributor

What is the motivation/use case for changing the behavior?

We want to remove TypeScript Enums and replace them with TypeScript string literal unions.

Describe the solution you'd like

  • Add support for string literal unions along with the current Enums
  • Deprecate current Enums and notify that they will be released on version 19

Describe alternatives you've considered

Replace the enums in one movement without deprecation. This might be necessary if supporting enums and string literal unions becomes too complex.

Additional context

#188

@NachoVazquez NachoVazquez added enhancement New feature or request lumberjack Applies to issues of the Lumberjack project. v17 This issue will be solve as part of the Lumberjack version 17 labels Jan 6, 2024
@NachoVazquez NachoVazquez added this to the Lumberjack 17.x milestone Jan 6, 2024
@NachoVazquez NachoVazquez self-assigned this Jan 21, 2024
NachoVazquez added a commit that referenced this issue Jan 23, 2024
## PR Checklist

Please check if your PR fulfills the following requirements:

- [x] The commit message follows our guidelines: CONTRIBUTING.md#commit
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

```
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
```

## What is the current behavior?

Our log levels are represented using TypeScript enums. 

Fixes #192 

## What is the new behavior?

We added support for literal unions for our log levels and deprecated
the enums.

## Does this PR introduce a breaking change?

```
[x] Yes
[ ] No
```

BREAKING CHANGES: 
- enums levels are deprecated and will be removed on
version 19.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lumberjack Applies to issues of the Lumberjack project. v17 This issue will be solve as part of the Lumberjack version 17
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant