|
2 | 2 |
|
3 | 3 | # enum-plus Changelog |
4 | 4 |
|
5 | | -## Unreleased |
| 5 | +## 2.2.10 |
| 6 | + |
| 7 | +2025-5-14 |
6 | 8 |
|
7 | 9 | ### Features |
8 | 10 |
|
9 | | -- |
| 11 | +- ✨ Enhance the type inference of the `raw` method. When the input value matches a specific enum item, it only returns the raw object of that enum item instead of returning the raw objects of all enum items. |
| 12 | + |
| 13 | +### Bug Fixes |
| 14 | + |
| 15 | +- 🐞 The output `lib` directory structure is incorrect. This will break legacy Node.js applications using the `CommonJS` module spec, while modern Node.js applications using the `NodeNext` module spec remain unaffected. This issue was introduced in `v2.2.7`. For node.js applications, it's strongly recommended to upgrade. |
10 | 16 |
|
11 | 17 | ## 2.2.9 |
12 | 18 |
|
13 | 19 | 2025-4-20 |
14 | 20 |
|
15 | 21 | ### Features |
16 | 22 |
|
17 | | -- 🛠 emit a warning while trying to modify an `EnumItem` |
| 23 | +- 🛠 Emit a warning while trying to modify an `EnumItem` |
18 | 24 |
|
19 | 25 | ### Bug Fixes |
20 | 26 |
|
|
26 | 32 |
|
27 | 33 | ### Bug Fixes |
28 | 34 |
|
29 | | -- 🐞 fix `exports` configuration for moduleResolution `ESNext` |
| 35 | +- 🐞 Fix `exports` configuration for moduleResolution `ESNext` |
30 | 36 |
|
31 | 37 | ## 2.2.7 |
32 | 38 |
|
|
62 | 68 |
|
63 | 69 | ### Features |
64 | 70 |
|
65 | | -- 🛠 supports global type extension for enum localization keys, providing better editor intelligence awareness |
| 71 | +- 🛠 Support global type extension for enum localization keys, providing better editor intelligence awareness |
66 | 72 |
|
67 | 73 | ## 2.2.3 |
68 | 74 |
|
|
78 | 84 |
|
79 | 85 | ### Features |
80 | 86 |
|
81 | | -- 🛠 change the return type of `Enum.options.getKey` |
82 | | -- 📖 update docs |
| 87 | +- 🛠 Change the return type of `Enum.options.getKey` |
| 88 | +- 📖 Update docs |
83 | 89 |
|
84 | 90 | ## 2.2.1 |
85 | 91 |
|
86 | 92 | 2025-2-10 |
87 | 93 |
|
88 | | -- 📖 update docs |
| 94 | +- 📖 Update docs |
89 | 95 |
|
90 | 96 | ## 2.2.0 |
91 | 97 |
|
92 | 98 | 2025-2-9 |
93 | 99 |
|
94 | 100 | ### Features |
95 | 101 |
|
96 | | -- 🔥 support initializing Enum with native enums |
97 | | -- 🔥 adds `items` array, deprecated the _`values`_ array. Reduces package size. |
| 102 | +- 🔥 Support initializing Enum with native enums |
| 103 | +- 🔥 Add `items` array, deprecated the _`values`_ array. Reduces package size. |
98 | 104 |
|
99 | 105 | ## 2.1.1 |
100 | 106 |
|
101 | 107 | 2025-2-8 |
102 | 108 |
|
103 | 109 | ### Bug Fixes |
104 | 110 |
|
105 | | -- 🐞 fix typing error in `EnumExtension` interface |
| 111 | +- 🐞 Fix typing error in `EnumExtension` interface |
106 | 112 |
|
107 | 113 | ## 2.1.0 |
108 | 114 |
|
109 | 115 | 2025-2-8 |
110 | 116 |
|
111 | | -> **Note:** this version has a typing issue, please use `v2.1.1` |
| 117 | +> **Note:** This version has a typing issue, please use `v2.1.1` |
112 | 118 |
|
113 | 119 | ### Features |
114 | 120 |
|
115 | | -- 🔥 add `toSelect` method, deprecated the _`options`_ method |
116 | | -- 🔥 add `toMenu` method, deprecated the _`menus`_ method |
117 | | -- 🔥 add `toFilter` method, deprecated the _`filters`_ method |
118 | | -- 🔥 add `toValueMap` method, the _`valuesEnum`_ method |
119 | | -- 🔥 support global extension, custom methods can be added to Enums |
| 121 | +- 🔥 Add `toSelect` method, deprecated the _`options`_ method |
| 122 | +- 🔥 Add `toMenu` method, deprecated the _`menus`_ method |
| 123 | +- 🔥 Add `toFilter` method, deprecated the _`filters`_ method |
| 124 | +- 🔥 Add `toValueMap` method, the _`valuesEnum`_ method |
| 125 | +- 🔥 Support global extension, custom methods can be added to Enums |
120 | 126 |
|
121 | 127 | ## 2.0.3 |
122 | 128 |
|
123 | 129 | 2025-2-6 |
124 | 130 |
|
125 | 131 | ### Features |
126 | 132 |
|
127 | | -- 🛠 downgrade EcmaScript version to `ES2015` |
| 133 | +- 🛠 Downgrade EcmaScript version to `ES2015` |
128 | 134 |
|
129 | 135 | ## 2.0.2 |
130 | 136 |
|
131 | 137 | 2025-2-3 |
132 | 138 |
|
133 | 139 | ### Features |
134 | 140 |
|
135 | | -- 🔥 the `firstOption` of `options` method supports localization |
| 141 | +- 🔥 The `firstOption` of `options` method supports localization |
136 | 142 |
|
137 | 143 | ## 2.0.1 |
138 | 144 |
|
139 | 145 | 2025-2-2 |
140 | 146 |
|
141 | 147 | ### Features |
142 | 148 |
|
143 | | -- 🔥 support for enum text localization |
| 149 | +- 🔥 Support for enum text localization |
144 | 150 | - the `Enum` method now accepts a `localize` option that can be used to localize the enum text |
145 | 151 | - you can also set the `Enum.localize` static method to localize all enums in a lower priority |
146 | | -- 🔥 add `menus` method |
| 152 | +- 🔥 Add `menus` method |
147 | 153 |
|
148 | 154 | ### Breaking Changes |
149 | 155 |
|
150 | | -- 💣 all parameters after the first of the `Enum` method has been changed to an `options` object |
| 156 | +- 💣 All parameters after the first of the `Enum` method has been changed to an `options` object |
151 | 157 |
|
152 | 158 | ## 1.0.3 |
153 | 159 |
|
154 | 160 | 2023-11-14 |
155 | 161 |
|
156 | | -- 🛠 if an enum is created from array, both the `enum.raw` or `enumItem.raw` methods return the original array item |
| 162 | +- 🛠 Both the `enum.raw` or `enumItem.raw` methods return the original array item, if an enum is created from array, |
157 | 163 |
|
158 | 164 | ## 1.0.2 |
159 | 165 |
|
160 | 166 | 2023-07-31 |
161 | 167 |
|
162 | | -- 🆕 added `rawType` accessor |
| 168 | +- 🆕 Add `rawType` accessor |
163 | 169 |
|
164 | 170 | ## 1.0.1 |
165 | 171 |
|
166 | 172 | 2023-03-09 |
167 | 173 |
|
168 | | -- 🆕 added a new `filters` method that returns an array of enumerated items that can be passed directly to the `Column.filters` of the AntDesign Table component as a list of filtered items for the column |
| 174 | +- 🆕 Add a new `filters` method that returns an array of enumerated items that can be passed directly to the `Column.filters` of the AntDesign Table component as a list of filtered items for the column |
169 | 175 |
|
170 | 176 | - ## 1.0.0 |
171 | 177 |
|
172 | 178 | 2022-10-08 |
173 | 179 |
|
174 | | -- 🆕 the first release of `enum-plus` library |
| 180 | +- 🆕 The first release of `enum-plus` library |
0 commit comments