|
2 | 2 |
|
3 | 3 | The implementation for the original Moonscript language 0.5.0 can be found in the `0.5.0` branch of Yuescript. The Moonscript with fixes and new features is in the main branch of Yuescript. Here are the changelogs for each Yuescript version. |
4 | 4 |
|
| 5 | +## v0.33.x |
| 6 | + |
| 7 | +### Added Features |
| 8 | + |
| 9 | +* Expanded documentation deliverables with an all-in-one documentation output. |
| 10 | +* Improved `break` feature set by supporting multiple break values (extends the `break with value` work introduced in `v0.28.x`). |
| 11 | +* Further improved reserved-comment preservation behavior for table/class blocks (parser, AST and code generation), with dedicated test coverage. |
| 12 | + |
| 13 | +### Fixed Issues |
| 14 | + |
| 15 | +* Fixed formatter issues and improved formatting stability. |
| 16 | +* Fixed comma placement/insertion issues when line-number comments are enabled (including class-member cases, issue #240). |
| 17 | +* Fixed more comment-preserving code paths and issue #245. |
| 18 | +* Improved documentation site rendering/highlighting and updated documentation content/assets. |
| 19 | + |
| 20 | +## v0.32.x |
| 21 | + |
| 22 | +### Added Features |
| 23 | + |
| 24 | +* Added `;` as a statement separator. |
| 25 | + ```moonscript |
| 26 | + a = 1; b = 2; result = a + b |
| 27 | + ``` |
| 28 | +* Migrated the documentation site to VitePress and added/expanded localized docs (including German and Portuguese-Brazil). |
| 29 | +* Added substantial compiler test coverage (including large regression/spec batches). |
| 30 | + |
| 31 | +### Fixed Issues |
| 32 | + |
| 33 | +* Fixed `import global` related issues after the `v0.31.x` syntax addition. |
| 34 | +* Fixed global-variable lint behavior. |
| 35 | +* Improved cross-platform build support (LuaJIT, MSVC/Windows, CMake, rockspec updates). |
| 36 | +* Added Lua 5.5 support in CMake configuration and fixed CI/build workflow issues. |
| 37 | +* Fixed issue #227 and multiple documentation/site regressions. |
| 38 | + |
| 39 | +## v0.31.x |
| 40 | + |
| 41 | +### Added Features |
| 42 | + |
| 43 | +* Added const attributes. |
| 44 | + ```moonscript |
| 45 | + const a = 123 |
| 46 | + const {:x, :y} = point |
| 47 | + ``` |
| 48 | +* Added `import global` syntax. |
| 49 | + ```moonscript |
| 50 | + import global |
| 51 | + print "hello" |
| 52 | + math.random 10 |
| 53 | + ``` |
| 54 | +* These are the primary language-level additions in `v0.31.x` (with follow-up fixes landing in `v0.32.x`). |
| 55 | + |
| 56 | +### Fixed Issues |
| 57 | + |
| 58 | +* Fixed global import ordering. |
| 59 | +* Fixed a crash issue in `v0.31.1`. |
| 60 | +* Updated Windows workflow/build-related integration. |
| 61 | + |
| 62 | +## v0.30.x |
| 63 | + |
| 64 | +### Added Features |
| 65 | + |
| 66 | +* Added named vararg support. |
| 67 | + ```moonscript |
| 68 | + f = (...t) -> |
| 69 | + for i = 1, t.n |
| 70 | + print t[i] |
| 71 | + ``` |
| 72 | +* Improved syntax error messages with more contextual details (not syntax-changing, but a meaningful compiler UX improvement). |
| 73 | + |
| 74 | +### Fixed Issues |
| 75 | + |
| 76 | +* Fixed empty-line-as-block parsing issue. |
| 77 | +* Fixed formatter crash and other formatting-related issues. |
| 78 | +* Refactored `FnArgsDef` rules and fixed issue #224. |
| 79 | +* Updated reserved-comments behavior/functionality. |
| 80 | + |
| 81 | +## v0.29.x |
| 82 | + |
| 83 | +### Added Features |
| 84 | + |
| 85 | +* Introduced/iterated new syntax around `try` flow, including `try!` / `try?` related changes. |
| 86 | + ```moonscript |
| 87 | + a, b, c = try? func! |
| 88 | + a = (try? func!) ?? "default" |
| 89 | + |
| 90 | + f try? |
| 91 | + print 123 |
| 92 | + func! |
| 93 | + catch e |
| 94 | + print e |
| 95 | + e |
| 96 | + ``` |
| 97 | +* Added more reversed-index support for slice expressions and later fixed reversed-index edge cases. |
| 98 | + ```moonscript |
| 99 | + tab = [1, 2, 3, 4, 5] |
| 100 | + print tab[#], tab[#-1] |
| 101 | + ``` |
| 102 | +* Added function argument destructuring. |
| 103 | + ```moonscript |
| 104 | + f = ({:x, :y}) -> x + y |
| 105 | + print f x: 1, y: 2 |
| 106 | + ``` |
| 107 | +* Added YAML multiline string support and macro argument checking. |
| 108 | + ```moonscript |
| 109 | + config = | |
| 110 | + database: |
| 111 | + host: localhost |
| 112 | + port: 5432 |
| 113 | + ``` |
| 114 | + |
| 115 | +### Fixed Issues |
| 116 | + |
| 117 | +* Fixed a crash in `yue.to_ast()` and additional reference/crash issues. |
| 118 | +* Stopped linting explicitly defined global variables. |
| 119 | +* Fixed issue #222 and #223. |
| 120 | +* Improved platform/build compatibility: Windows x64, Lua 5.1, Termux, WASM/build pipeline issues. |
| 121 | +* Renamed builtin JSON library to `cojson`, included a minimal JSON lib in the compiler tool, and removed `codecvt` usage for C++26 compatibility. |
| 122 | + |
| 123 | +## v0.28.x |
| 124 | + |
| 125 | +### Added Features |
| 126 | + |
| 127 | +* Allowed backcall without parentheses. |
| 128 | + ```moonscript |
| 129 | + results = do |
| 130 | + data <- readAsync "data.txt" |
| 131 | + process data |
| 132 | + ``` |
| 133 | +* Added global `const` declaration support, including declaration without initializer. |
| 134 | + ```moonscript |
| 135 | + import global |
| 136 | + global const Flag = 1 |
| 137 | + global const math, table |
| 138 | + ``` |
| 139 | +* Added `break with value` syntax. |
| 140 | + ```moonscript |
| 141 | + x, y = for i = 1, 10 |
| 142 | + if i > 5 |
| 143 | + break i, i * 2 |
| 144 | + ``` |
| 145 | +* Added `-` for implicit object. |
| 146 | + ```moonscript |
| 147 | + items = |
| 148 | + - "a" |
| 149 | + - "b" |
| 150 | + - "c" |
| 151 | + ``` |
| 152 | + |
| 153 | +### Fixed Issues |
| 154 | + |
| 155 | +* Added/expanded related tests/docs and table-matching support around the new syntax behaviors. |
| 156 | + |
| 157 | +## v0.27.x |
| 158 | + |
| 159 | +### Added Features |
| 160 | + |
| 161 | +* Adjusted macro behavior by aligning Lua inserter macro behavior with common Yue macro behavior (semantic behavior alignment rather than new syntax). |
| 162 | + |
| 163 | +### Fixed Issues |
| 164 | + |
| 165 | +* Fixed issues #194, #195, #198, #201, #204, #206 and #209. |
| 166 | +* Updated `efsw` and fixed build-related issues. |
| 167 | +* Added/updated tests and documentation examples. |
| 168 | + |
| 169 | +## v0.26.x |
| 170 | + |
| 171 | +### Added Features |
| 172 | + |
| 173 | +* Added WASM distribution support for ESM/CommonJS modules and TypeScript integration (#176). |
| 174 | + |
| 175 | +### Fixed Issues |
| 176 | + |
| 177 | +* Fixed WASM build issues and updated WASM build pipeline. |
| 178 | +* Fixed issues #174, #175, #177, #178, #183, #185 and #188. |
| 179 | +* Fixed MoonScript issue #459. |
| 180 | +* Fixed build flags and related release/build issues; refreshed specs/docs/readme. |
| 181 | + |
| 182 | +## v0.25.x |
| 183 | + |
| 184 | +### Added Features |
| 185 | + |
| 186 | +* This series mainly improves semantic correctness and code generation consistency. |
| 187 | + |
| 188 | +### Fixed Issues |
| 189 | + |
| 190 | +* Fixed multi-value assignment evaluation order (including more edge cases in `v0.25.1`). |
| 191 | +* Disallowed some semantically incorrect syntax to improve code consistency. |
| 192 | +* Removed redundant/useless `do` blocks in generated code (`with` and related cases). |
| 193 | +* Fixed indentation/missed-indent issue and a few additional regressions. |
| 194 | + |
| 195 | +## v0.24.x |
| 196 | + |
| 197 | +### Added Features |
| 198 | + |
| 199 | +* Added reusable macro environment support. |
| 200 | +* Added builtin macros `$to_ast()` and `$is_ast()`. |
| 201 | +* Added `yue.is_ast()`. |
| 202 | + ```moonscript |
| 203 | + import "yue" |
| 204 | + formated = yue.format code, 0, true |
| 205 | + ``` |
| 206 | + |
| 207 | +### Fixed Issues |
| 208 | + |
| 209 | +* Fixed macro function line-number handling. |
| 210 | +* Fixed Lua 5.1 build. |
| 211 | +* Fixed Lua stack size insufficiency issue. |
| 212 | + |
| 213 | +## v0.23.x |
| 214 | + |
| 215 | +### Added Features |
| 216 | + |
| 217 | +* Added macros-generating-macros feature (`v0.23.9`), expanding macro metaprogramming capability. |
| 218 | + ```moonscript |
| 219 | + macro Enum = (...) -> |
| 220 | + items = {...} |
| 221 | + itemSet = {item, true for item in *items} |
| 222 | + (item) -> |
| 223 | + error "got \"#{item}\", expecting one of #{table.concat items, ', '}" unless itemSet[item] |
| 224 | + "\"#{item}\"" |
| 225 | + |
| 226 | + macro BodyType = $Enum( |
| 227 | + Static |
| 228 | + Dynamic |
| 229 | + Kinematic |
| 230 | + ) |
| 231 | + |
| 232 | + print "Valid enum type:", $BodyType Static |
| 233 | + ``` |
| 234 | +* Most other `v0.23.x` changes focus on try-catch/code-generation correctness rather than new syntax forms. |
| 235 | +* Added more tests/spec cases and documentation updates (including object literal docs in README, #165). |
| 236 | + |
| 237 | +### Fixed Issues |
| 238 | + |
| 239 | +* Fixed multiple try-catch syntax ambiguity/corner cases and removed redundant generated `do` blocks. |
| 240 | +* Fixed spread expression list issue in up-value functions. |
| 241 | +* Prevented extra anonymous function generation from `const`/`close` declarations. |
| 242 | +* Fixed nil-coalescing/anonymous-function movement issue and anonymous-function argument ordering. |
| 243 | +* Fixed a for-each key variable const-marking issue and traceback rewrite/codegen checks. |
| 244 | + |
| 245 | +## v0.22.x |
| 246 | + |
| 247 | +### Added Features |
| 248 | + |
| 249 | +* Added default return declaration for function literals. |
| 250 | + ```moonscript |
| 251 | + findValue = (items): "not found" -> |
| 252 | + for item in *items |
| 253 | + if item.name == "target" |
| 254 | + return item.name |
| 255 | + ``` |
| 256 | +* Added option to stop implicit returns on the root (#164). |
| 257 | +* `v0.22.x` also adjusts `for`-loop const behavior to align with Lua 5.5 changes, then refines the rule in `v0.22.1` (only index/key variable is const). |
| 258 | + |
| 259 | +### Fixed Issues |
| 260 | + |
| 261 | +* Fixed undeclared specifier in `yue_compiler.cpp` (#163). |
| 262 | +* Removed an unnecessary const declaration. |
| 263 | +* Corrected/refined `for`-loop const default behavior introduced in `v0.22.0`. |
| 264 | + |
| 265 | +## v0.21.x |
| 266 | + |
| 267 | +### Added Features |
| 268 | + |
| 269 | +* Changed the if-assignment syntax to prevent error-prone cases (syntax/grammar behavior change). |
| 270 | + ```moonscript |
| 271 | + if user := obj\find_user "valid" |
| 272 | + print user.name |
| 273 | + elseif other := obj\find_user "fallback" |
| 274 | + print other.name |
| 275 | + ``` |
| 276 | +* Added `yue.format()` and fixed `yue` AST-to-code conversion related functionality. |
| 277 | + ```moonscript |
| 278 | + import "yue" |
| 279 | + formated = yue.format code, 0, true |
| 280 | + ``` |
| 281 | + |
| 282 | +### Fixed Issues |
| 283 | + |
| 284 | +* Fixed issues #157 and #158 (including a web compiler issue). |
| 285 | +* Fixed invalid formatting/formation cases and in-expression formatting issues. |
| 286 | +* Fixed more invalid in-expression use cases. |
| 287 | +* Fixed const list destructuring, empty-check/empty-block-at-EOF cases, and crash/format edge cases. |
| 288 | +* Fixed `luaminify` related issue and updated Lua 5.4 integration/tooling. |
| 289 | + |
| 290 | +## v0.20.x (after v0.20.2) |
| 291 | + |
| 292 | +### Added Features |
| 293 | + |
| 294 | +* This interval mainly contains follow-up fixes for newly introduced `v0.20.2` features (chaining conditions, list/switch matching, import handling) plus release pipeline improvements. |
| 295 | + |
| 296 | +### Fixed Issues |
| 297 | + |
| 298 | +* Fixed table-matching syntax in `switch` statements with list tables. |
| 299 | +* Fixed a missing condition-chaining case. |
| 300 | +* Fixed a crash case for `import` statements. |
| 301 | +* Made function-call argument behavior consistent with table-list behavior. |
| 302 | +* Improved release/build pipeline setup (CI workflows, LuaRocks upload, docs code checks, test workflow setup). |
| 303 | + |
5 | 304 | ## v0.20.2 |
6 | 305 |
|
7 | 306 | ### Added Features |
|
0 commit comments