Update dependency ts-enum-util to v4 #10
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.1.0
->4.0.2
Release Notes
UselessPickles/ts-enum-util
v4.0.2
: Removed peer dependency on TypeScriptCompare Source
The peer dependency on TypeScript was more trouble than it was worth. See #16
v4.0.1
: Non-positive-integer enum value bug fixesCompare Source
This is a bug fix for numeric enums whose values are not all positive integers.
The code that gets all of the keys of an enum (ignoring the reverse lookup keys that typescript automatically adds) incorrectly assumed that all numeric enum values (and therefore the reverse lookup keys) would be limited valid array index values (basically, non-negative integers within the range of a signed 32-bit value).
This was a bad assumption. Numeric enums can contain any numeric values, including floating point and negative values. The end result was widespread bugs if you had a numeric enum values that was negative or not an integer.
v4.0.0
: New Value Visitor/Mapper FunctionalityCompare Source
Huge New Feature!
The functionality of
ts-string-visitor
(npm, github) has been merged intots-enum-util
and improved to also support numeric literal/enum values. See the README for a link to full documentation of Value Visitor/Mapper functionality, and also a Migration Guide if you previously usedts-string-visitor
.This unfortunately brought with it a breaking change: TypeScript 2.9 is now the minimum supported version.
Other New Features
$enum().map()
to create options for a dropdown UI component, for example.$enum().indexOfValue()
to get the index of an enum entry based on a value. Can be useful for implementing sort comparators for grids, etc.$enum().indexOfKey()
to get the index of an enum entry based on a key. Can be useful for implementing sort comparators for grids, etc.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.