|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## v7.0.0 |
| 4 | + |
| 5 | +- **Breaking:** the package is now published as native ESM only. The CommonJS build (`build/index-cjs.js`) has been removed. Use `import`, or `require()` on Node.js 20.19+ / 22.12+ where loading ESM from CommonJS is supported. |
| 6 | +- **Breaking:** the minimum supported Node.js version is now 20.19 (or 22.12+). |
| 7 | +- The test suite now runs on vitest instead of mocha. |
| 8 | +- Updated all dependencies. |
| 9 | + |
3 | 10 | ## v6.2.0 |
4 | 11 |
|
5 | | -- Fixed an issue where if the first value of a `$eq` operation was null or undefined it did not always return false. |
| 12 | +- Fixed an issue where if the first value of a `$eq` operation was null or undefined it did not always return false. |
6 | 13 |
|
7 | 14 | ## v6.1.0 |
8 | 15 |
|
9 | | -- Added support for arrays of objects in array operations. |
| 16 | +- Added support for arrays of objects in array operations. |
10 | 17 |
|
11 | 18 | ## v6.0.0 |
12 | 19 |
|
13 | | -- Fixed an issue where trying to run actions in an invalid way would cause errors. They now no-op. |
| 20 | +- Fixed an issue where trying to run actions in an invalid way would cause errors. They now no-op. |
14 | 21 |
|
15 | 22 | ## v5.9.3 |
16 | 23 |
|
17 | | -- Fixed an issue where when a timer performs a state transition, events were still ran with the old state. |
| 24 | +- Fixed an issue where when a timer performs a state transition, events were still ran with the old state. |
18 | 25 |
|
19 | 26 | ## v5.9.2 |
20 | 27 |
|
21 | | -- Timers are now properly returned and saved when `doEventHandlers` is called. |
| 28 | +- Timers are now properly returned and saved when `doEventHandlers` is called. |
22 | 29 |
|
23 | 30 | ## v5.9.1 |
24 | 31 |
|
25 | | -- Timers are now cleared using pop to ensure they're garbage collected. |
| 32 | +- Timers are now cleared using pop to ensure they're garbage collected. |
26 | 33 |
|
27 | 34 | ## v5.9.0 |
28 | 35 |
|
29 | | -- Timers are now properly cleared on state transition. |
30 | | -- Timers are now handled first before anything else. |
| 36 | +- Timers are now properly cleared on state transition. |
| 37 | +- Timers are now handled first before anything else. |
31 | 38 |
|
32 | 39 | ## v5.8.0 |
33 | 40 |
|
34 | | -- Context is only read from if a reference is prepended with a `$`. |
35 | | -- Switch statements are now used when handling ops, this means ordering is now respected. |
| 41 | +- Context is only read from if a reference is prepended with a `$`. |
| 42 | +- Switch statements are now used when handling ops, this means ordering is now respected. |
36 | 43 |
|
37 | 44 | ## v5.7.0 |
38 | 45 |
|
39 | | -- Added support for 2 operand `$mul` actions. |
| 46 | +- Added support for 2 operand `$mul` actions. |
40 | 47 |
|
41 | 48 | ## v5.6.2 |
42 | 49 |
|
43 | | -- Fixed values not being properly deleted if they were truthy. |
| 50 | +- Fixed values not being properly deleted if they were truthy. |
44 | 51 |
|
45 | 52 | ## v5.6.1 |
46 | 53 |
|
47 | | -- Fixed actions not getting constants from the definition. |
| 54 | +- Fixed actions not getting constants from the definition. |
48 | 55 |
|
49 | 56 | ## v5.6.0 |
50 | 57 |
|
51 | | -- Added support for the `$reset` operator using the original context from the definition. |
52 | | -- Added `originalContext` option to `HandleActionsOptions`. |
| 58 | +- Added support for the `$reset` operator using the original context from the definition. |
| 59 | +- Added `originalContext` option to `HandleActionsOptions`. |
53 | 60 |
|
54 | 61 | ## v5.5.2 |
55 | 62 |
|
56 | | -- Fixed irregular events not being handled correctly. |
| 63 | +- Fixed irregular events not being handled correctly. |
57 | 64 |
|
58 | 65 | ## v5.5.1 |
59 | 66 |
|
60 | | -- Fixed contract IDs not being passed to conditions and transitions. |
| 67 | +- Fixed contract IDs not being passed to conditions and transitions. |
61 | 68 |
|
62 | 69 | ## v5.5.0 |
63 | 70 |
|
64 | | -- Added support for long arrays to the `$eq` operator. |
| 71 | +- Added support for long arrays to the `$eq` operator. |
65 | 72 |
|
66 | 73 | ## v5.4.0 |
67 | 74 |
|
68 | | -- Added support for contract IDs in `$pushunique`. |
| 75 | +- Added support for contract IDs in `$pushunique`. |
69 | 76 |
|
70 | 77 | ## v5.3.0 |
71 | 78 |
|
72 | | -- Fixed a bug which would cause timers to be persisted, preventing them from starting again. |
| 79 | +- Fixed a bug which would cause timers to be persisted, preventing them from starting again. |
73 | 80 |
|
74 | 81 | ## v5.2.0 |
75 | 82 |
|
76 | 83 | NOTE: This release contains 2 potentially breaking changes. |
77 | 84 | They are in a semver-minor release because both align the parser more with the IOI behavior. |
78 | 85 |
|
79 | | -- Added prepack script so building from source works properly. |
80 | | -- _Breaking_: Fixed handleEvent resetting the context when an event is disregarded. |
81 | | -- _Breaking_: Removed support for `$div`, as it never actually existed in the game. |
82 | | -- Updated build dependencies. |
| 86 | +- Added prepack script so building from source works properly. |
| 87 | +- _Breaking_: Fixed handleEvent resetting the context when an event is disregarded. |
| 88 | +- _Breaking_: Removed support for `$div`, as it never actually existed in the game. |
| 89 | +- Updated build dependencies. |
83 | 90 |
|
84 | 91 | ## v5.1.0 |
85 | 92 |
|
86 | | -- Require a timestamp on all events (for timers). This is breaking, but needed to be done. |
| 93 | +- Require a timestamp on all events (for timers). This is breaking, but needed to be done. |
87 | 94 |
|
88 | 95 | ## v5.0.0 |
89 | 96 |
|
90 | | -- Removed debug in favor of a user-provided logging function. |
91 | | -- Reworked timers to use a better system that is controlled by the library consumer. |
92 | | -- Fixed the `$le` implementation. |
93 | | -- Refactored type definitions a bit. |
| 97 | +- Removed debug in favor of a user-provided logging function. |
| 98 | +- Reworked timers to use a better system that is controlled by the library consumer. |
| 99 | +- Fixed the `$le` implementation. |
| 100 | +- Refactored type definitions a bit. |
94 | 101 |
|
95 | 102 | ## v4.3.0 |
96 | 103 |
|
97 | | -- Fixed inconsistent getting and setting behavior as a result of the last patch. |
98 | | -- Added new documentation, and improved existing documentation. |
99 | | -- Renamed `$gte` and `$lte` to `$ge` and `$le` to be consistent with the usage of the game. |
| 104 | +- Fixed inconsistent getting and setting behavior as a result of the last patch. |
| 105 | +- Added new documentation, and improved existing documentation. |
| 106 | +- Renamed `$gte` and `$lte` to `$ge` and `$le` to be consistent with the usage of the game. |
100 | 107 |
|
101 | 108 | ## v4.2.0 |
102 | 109 |
|
103 | | -- `$pushunique` can now be used as a condition. |
104 | | -- `(`, `)`, and leading `$` (and `$.`) are now automatically removed from strings if resolved. |
| 110 | +- `$pushunique` can now be used as a condition. |
| 111 | +- `(`, `)`, and leading `$` (and `$.`) are now automatically removed from strings if resolved. |
105 | 112 |
|
106 | 113 | ## v4.1.0 |
107 | 114 |
|
108 | | -- Added `Count` property to arrays. |
109 | | -- Removed support for comparing arrays with `$eq`. |
| 115 | +- Added `Count` property to arrays. |
| 116 | +- Removed support for comparing arrays with `$eq`. |
110 | 117 |
|
111 | 118 | ## v4.0.0 |
112 | 119 |
|
113 | | -- Added tracing functionality to assist with finding bugs. |
114 | | -- Support `$remove` action. |
115 | | -- Synchronized copyright headers. |
116 | | -- `handleEvent` now automatically handles the immediately invoked event upon transitions. |
| 120 | +- Added tracing functionality to assist with finding bugs. |
| 121 | +- Support `$remove` action. |
| 122 | +- Synchronized copyright headers. |
| 123 | +- `handleEvent` now automatically handles the immediately invoked event upon transitions. |
117 | 124 |
|
118 | 125 | ## v3.3.0 |
119 | 126 |
|
120 | | -- Moved the build setup to esbuild. |
121 | | -- Proper ES modules are now published that can be loaded by Node.js and the browser. |
122 | | -- Added code coverage. |
123 | | -- Handle nested array nodes. |
124 | | -- Fixed a crash that could be caused by handling actions in `handleEvent`. |
125 | | -- Added some new tests. |
| 127 | +- Moved the build setup to esbuild. |
| 128 | +- Proper ES modules are now published that can be loaded by Node.js and the browser. |
| 129 | +- Added code coverage. |
| 130 | +- Handle nested array nodes. |
| 131 | +- Fixed a crash that could be caused by handling actions in `handleEvent`. |
| 132 | +- Added some new tests. |
126 | 133 |
|
127 | 134 | ## v3.2.1 |
128 | 135 |
|
129 | | -- Fixed the actions not being executed correctly in `handleEvent`. |
130 | | -- Fixed some outstanding issues with timers. |
| 136 | +- Fixed the actions not being executed correctly in `handleEvent`. |
| 137 | +- Fixed some outstanding issues with timers. |
131 | 138 |
|
132 | 139 | ## v3.2.0 |
133 | 140 |
|
134 | | -- Remove `lodash`'s `set` implementation in favor of a smaller one. |
135 | | -- Better handling in `handleEvent` for falsy values. |
| 141 | +- Remove `lodash`'s `set` implementation in favor of a smaller one. |
| 142 | +- Better handling in `handleEvent` for falsy values. |
136 | 143 |
|
137 | 144 | ## v3.1.0 |
138 | 145 |
|
139 | | -- Handle immediately executing event handlers. |
140 | | -- Enable enhanced tree shaking. |
| 146 | +- Handle immediately executing event handlers. |
| 147 | +- Enable enhanced tree shaking. |
141 | 148 |
|
142 | 149 | ## v3.0.0 |
143 | 150 |
|
144 | | -- Basically rewrote the whole thing to be faster and smaller, and have fewer issues. |
145 | | -- Handling side effect state machines and conditional state machines are now separate functions. |
146 | | -- Many other improvements, such as properly shipped ES modules, less file duplication, and more. |
| 151 | +- Basically rewrote the whole thing to be faster and smaller, and have fewer issues. |
| 152 | +- Handling side effect state machines and conditional state machines are now separate functions. |
| 153 | +- Many other improvements, such as properly shipped ES modules, less file duplication, and more. |
147 | 154 |
|
148 | 155 | ## v2.1.0 |
149 | 156 |
|
150 | | -- `$pushunique` and `$push` nodes now use the same implementation. |
151 | | -- Added tests for `$inc` and `$dec` (+ fixed associated bugs). |
152 | | -- Excluded TypeScript build info files from release files. |
153 | | -- Replaced our implementation of `setObjectChild` with Lodash's version. |
154 | | -- Updated dependencies. |
| 157 | +- `$pushunique` and `$push` nodes now use the same implementation. |
| 158 | +- Added tests for `$inc` and `$dec` (+ fixed associated bugs). |
| 159 | +- Excluded TypeScript build info files from release files. |
| 160 | +- Replaced our implementation of `setObjectChild` with Lodash's version. |
| 161 | +- Updated dependencies. |
155 | 162 |
|
156 | 163 | ## v2.0.0 |
157 | 164 |
|
158 | | -- The statemachine conditions can no longer be null or undefined. |
159 | | -- The globals can no longer be null or undefined. |
160 | | -- Support side effect nodes (`$set`, `$mul`, `$inc`, `$dec`, `$div` all work properly now). |
161 | | -- The `check` method now returns an object in the format of `{ bool: boolean, globals: any }`, because side effect nodes can modify the globals object. |
162 | | -- `findObjectChild` (formerly `$referenceToData`) and `setObjectChild` are now exported. |
163 | | -- Added inline JSDoc. |
| 165 | +- The statemachine conditions can no longer be null or undefined. |
| 166 | +- The globals can no longer be null or undefined. |
| 167 | +- Support side effect nodes (`$set`, `$mul`, `$inc`, `$dec`, `$div` all work properly now). |
| 168 | +- The `check` method now returns an object in the format of `{ bool: boolean, globals: any }`, because side effect nodes can modify the globals object. |
| 169 | +- `findObjectChild` (formerly `$referenceToData`) and `setObjectChild` are now exported. |
| 170 | +- Added inline JSDoc. |
164 | 171 |
|
165 | 172 | ## v1.0.1 |
166 | 173 |
|
167 | | -- Same as v1.0.0 but re-published due to a bug. |
| 174 | +- Same as v1.0.0 but re-published due to a bug. |
168 | 175 |
|
169 | 176 | ## v1.0.0 |
170 | 177 |
|
171 | | -- First release. |
| 178 | +- First release. |
0 commit comments