0.20.0-alpha.1
Pre-release
Pre-release
·
378 commits
to master
since this release
Big Refactors
- The underlying structure of the runtime changed from class components to functional components and signals, this allows a two level structure (components have internal entities otherwise is everything is one level)
- The error messages have been reworked internally, texts were reviewed, and the UI is a bit simpler, all in all it's easier to work with internally.
- The compiler was fully refactored to emit ES5 modules and to support code-splitting.
- All commands now use the same bundler (development server, builder, test runner) instead of their own implementation.
- How variables are resolved has been rewritten from scratch.
Performance
The development server was type checking twice on each change, and it was checking everything. Now it only checks what the application is actually using, and it checks only once.
Language
- Added
asynckeyword for components (to be loaded later from a different file). - Added
returnkeyword for early returns in blocks with destructuring. - Added
deferkeyword for loading code from different files. - Added builtins feature for interfacing with the runtime.
- Added syntax sugar for creating maps:
{ key => value }. - Added syntax sugar for setting state:
-> name. - Added
highlightparameter for here documents. - Added
@highlight-filedirective. - Allow routes to be
await-ed to wait with the hash navigation. - Allow grouping inline comments (for documentation purposes).
- Allow full destructuring in if lets.
- Allow functions in test suites.
- Expressions can now be used as children of
Htmlas is (no Html expression is needed). - Arguments with default values are now typed, checked against the defined type.
- Html expressions
<{...}>are deprecated in favor of Html fragments<></>. - Field access
.namenow requires the type as a parameter.name(User). <,>,<=,>=operators are now only work with numbers.- Removed the feature of memoizing static virtual DOM nodes.
recordandenumkeywords are replaced bytype.&&,||operators now only work with booleans.- Removed record constructors
User(name, age).
Maintenance
- Support ARM mac in build workflow.
- Dry CI workflows (Crystal latest / nightly).
Standard Library
- Code is updated to reflect the changes in the language (use builtins, changed keywords, etc…).
Dom.setValuenow returns the element when setting the value to empty string.- Some
Arrayfunctions have been refactored to not use inlined JavaScript. - Removed
Html.fromEvent(was used internally). - Convert
FileSize.formatto Mint only. - Added
Test.Context.assertfunction.
Runtime
The runtime has been refactored and moved into the repository (the other will be archived).
Formatter
- Update formatting of listed entities (honor whitespace).
- Added missing
@font-faceformatter.
Language Server
- Improve here document and string literal highlighting (semantic tokenizer).
CLI
- Most commands have been reviewed and changes were made to them.
- The
--envflag is now local to commands that can use them. - Removed
compilecommand since it's no longer possible to emit a single JS file. - Removed
docscommand temporary (it will be added back in a future release).
build
- The command is now less verbose by default.
- The generated assets are now stored in the
__mint__directory instead ofassets. --skip-service-workerflag was removed, since no service worker is generated now.--inlineflag was removed, it's no longer possible to emit a single HTML file.--skip-manifestflag was removed, manifest is now not generated by default.--minifyflag was removed, code is optimized by default.- Added
--timingsflag to show more information about the build process. - Added
--generate-manifestflag to generate a web application manifest. - Added
--no-optimizeflag to disabled optimization. - Added
--verboseflag to show the generated files. - Added
--envflag.
clean
- The
--globalflag has been renamed to--package-cache.
format
- The command has been refactored and should operate more sanely.
- No longer need a
mint.jsonto format files.
init
- Scaffold application has been reworked to help new developers.
- Added
--bareflag to generate a bare project.
sandbox-server
- Removed the
--runtimeflag.
start
- Renamed
--auto-formatto--format - Renamed
live_reloadto--reload - Added
--envflag.
test
- Added
--watchflag to re-run test when files change. - Added
--envflag.