Releases: mint-lang/mint
0.20.1
Fixes a bug where a discard pattern _
is not handled when building scope.
Full Changelog: 0.20.0...0.20.1
0.20.0
There were so many changes in this release that it's really hard to gather every one of them so the changelog here is not exhaustive.
Big Refactors
- Proper exhaustiveness checking (same implementation as Gleam). Deep destrucutrings will be property checked and reported.
- The formatter has been rewritten to use a pretty printing algorithm. This means that it now properly honors line length and breaks things when necessary.
- References tracker has been refactored, this means bundles will be calculated more precisely.
- Rewritten the documentation generator, it is now HTML by default.
- Refactored how
mint.json
are parsed, which results in better error messages. - Refactored how workspaces work internally and unified it across the board (development server, test runner, language server, etc...)
- 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
async
keyword for components (to be loaded later from a different file). - Added
return
keyword for early returns in blocks with destructuring. - Added
defer
keyword for loading code from different files. - Added
signal
which is a new kind of self updating state. - Added syntax sugar for creating maps:
{ key => value }
. - Added builtins feature for interfacing with the runtime.
- Added syntax sugar for setting state:
-> name
. - Added
highlight
parameter for here documents. - Added discard pattern
_
for destructurings. - Added
dbg
to print better debug messages. - Added
@highlight-file
directive. - Allow routes to be
await
-ed to wait with the hash navigation. - Allow grouping inline comments (for documentation purposes).
- Allow omitting else of
if
s withPromise(Maybe(a))
type. - Allow
await
anywhere (in pipes as well). - Allow destructuring in
for
expressions. - Allow full destructuring in
if let
s. - Allow functions in test suites.
- Expressions can now be used as children of
Html
as 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
.name
now requires the type as a parameter.name(User)
. <
,>
,<=
,>=
operators are now only work with numbers.- Removed the feature of memoizing static virtual DOM nodes.
record
andenum
keywords are replaced bytype
.&&
,||
operators now only work with booleans.- Removed record constructors
User(name, age)
.
Type Checker
- Fix an issue with multiple parenthesized if conditions.
- Properly detect global name conflicts of
Main
. - Added checks for the children property.
- Allow
Number
as HTML content.
Standard Library
Dom.setValue
now returns the element when setting the value to empty string.- Some
Array
functions have been refactored to not use inlined JavaScript. - Added ordinal formatting of days to
Time.format
. - Removed
Html.fromEvent
(was used internally). - Added
decimals
argument toMath.round
. - Convert
FileSize.format
to Mint only. - Added
Test.Context.assert
function. - Added native CSV parser and generator.
- Fix runtime error in HTTP module.
Installer
- Allow installing packages with extra semver information.
Maintenance
- The runtime has been refactored and moved into the repository (the other repository will be deleted).
- Support ARM mac in build workflow.
- Dry CI workflows (Crystal latest / nightly).
Formatter
- Update formatting of listed entities (honor whitespace).
- Added missing
@font-face
formatter.
Language Server
- Improve here document and string literal highlighting (semantic tokenizer).
CLI
Most commands have been reviewed and changes were made to them, refer to the --help
argument for the current versions
- Removed
compile
command since it's no longer possible to emit a single JS file. - The
--env
flag is now local to commands that can use them.
0.20.0-rc.1
Standard Library
- Add
decimals
argument toMath.round
. - Added ordinal formatting of days to
Time.format
.
Fixes / Changes
- Don't double semantic highlight some comments.
- Restrict the scope of
defer
s. - Allow omitting else of
if
s withPromise(Maybe(a))
type. - Make sure references work properly when used in global components.
- Properly remove test nodes when cleaning up.
- Optimize root tracking algorithm by only tracking relevant nodes.
- Remove not needed console.log call.
Full Changelog: 0.20.0-alpha.3...0.20.0-rc.1
0.20.0-alpha.3
- Fix bundling issue with encoders / decoders resulting in a runtime error.
- Properly load
.env
files when provided.
0.20.0-alpha.2
Big Refactors
-
Proper exhaustiveness checking (same implementation as Gleam). Deep destrucutrings will be property checked and reported.
-
The formatter has been rewritten to use a pretty printing algorithm. This means that it now properly honors line length and breaks things when necessary.
-
References tracker has been refactored, this means bundles will be calculated more precisely.
-
Rewritten the documentation generator, it is now HTML by default.
-
Refactored how
mint.json
are parsed, which results in better error messages. -
Refactored how workspaces work internally and unified it across the board (development server, test runner, language server, etc...)
Standard Library
- Added native CSV parser and generator.
- Fix runtime error in HTTP module.
Language
- Added
signal
which is a new kind of self updating state. - Added
dbg
to print better debug messages.
Type Checker
- Fix an issue with multiple parenthesized if conditions.
- Properly detect global name conflicts of
Main
. - Added discard pattern
_
for destructurings. - Allow destructuring in
for
expressions. - Allow
Number
as HTML content. - Allow
await
anywhere (in pipes as well). - Added checks for the children property.
Installer
- Allow installing packages with extra semver information.
0.20.0-alpha.1
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
async
keyword for components (to be loaded later from a different file). - Added
return
keyword for early returns in blocks with destructuring. - Added
defer
keyword 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
highlight
parameter for here documents. - Added
@highlight-file
directive. - 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
Html
as 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
.name
now requires the type as a parameter.name(User)
. <
,>
,<=
,>=
operators are now only work with numbers.- Removed the feature of memoizing static virtual DOM nodes.
record
andenum
keywords 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.setValue
now returns the element when setting the value to empty string.- Some
Array
functions have been refactored to not use inlined JavaScript. - Removed
Html.fromEvent
(was used internally). - Convert
FileSize.format
to Mint only. - Added
Test.Context.assert
function.
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-face
formatter.
Language Server
- Improve here document and string literal highlighting (semantic tokenizer).
CLI
- Most commands have been reviewed and changes were made to them.
- The
--env
flag is now local to commands that can use them. - Removed
compile
command since it's no longer possible to emit a single JS file. - Removed
docs
command 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-worker
flag was removed, since no service worker is generated now.--inline
flag was removed, it's no longer possible to emit a single HTML file.--skip-manifest
flag was removed, manifest is now not generated by default.--minify
flag was removed, code is optimized by default.- Added
--timings
flag to show more information about the build process. - Added
--generate-manifest
flag to generate a web application manifest. - Added
--no-optimize
flag to disabled optimization. - Added
--verbose
flag to show the generated files. - Added
--env
flag.
clean
- The
--global
flag has been renamed to--package-cache
.
format
- The command has been refactored and should operate more sanely.
- No longer need a
mint.json
to format files.
init
- Scaffold application has been reworked to help new developers.
- Added
--bare
flag to generate a bare project.
sandbox-server
- Removed the
--runtime
flag.
start
- Renamed
--auto-format
to--format
- Renamed
live_reload
to--reload
- Added
--env
flag.
test
- Added
--watch
flag to re-run test when files change. - Added
--env
flag.
0.19.0
Language
- Added localization feature #618
- Added support for named arguments #625
- Added
@highlight
directive #615 - Fix constants/gets not working within a provider #621 (@jansul)
- Fix keywords and operators being kept when parsing a parent node fails #630 (@jansul)
- Fixed a bug with async blocks which caused an error
CLI
- Added
@highlight
command #615
LSP
- Added semantic tokenizer support #615
- Added go to definition support #619, #623, #636
- Fix enum destructuring/id linking to other types with the same name #628 (@jansul)
- Fix
LSP::LocationLink
's not being returned within an array #629 (@jansul)
Standard Library
- Added
Url.toString
#603 (@nilslindemann) - Added
Console
module #660 (@jrrom) - Added functions to the
Math
module #631 (@farism) - Added
Window.jump
function @616 (@nilslindemann) - Added
Provider.Keyboard
#663 (@farism) - Added
Test.Html.triggerKeyUp
andTest.Html.triggerKeydown
#663 (@farism) - Added
Validation.isDigits
#612 (@nilslindemann) - Removed
Provider.Keydown
andProvider.Keyup
#663 (@farism) - Fix
Window.setScrollLeft
andWindow.setScrollTop
#605 (@nilslindemann) - Fix
Window.confirm
#610 (@nilslindemann) Window.triggerHashJump
- when no hash, jump to start of document #611 (@nilslindemann)Number.fromString
- behaves a little different now #612 (@nilslindemann)
Housekeeping
0.18.0
Language
- Make parentheses optional for
case
,for
andif
expressions. (#589, #597) - Allow
let
statement inif
expressions (#590) - Allow nested destructuring (#593, #238, #377, #226)
- Allow
else
branch to be omitted in certain cases (#598)
Parser
- Update
Ast::Constant
to use anAst::Variable
for its name (#594) @jansul - Convert
type_id
fromString
to a node (#592) @jansul
LSP
- Add support for Go to Definition (#575) @jansul
- Add tests for hover feature (#591) @jansul
- Refactor definition to be similar to hover feature @jansul (#595)
CLI
Standard Library
- 🚧 Refactor HTTP module (#588, #494)
- Update
Window.prompt
(#587, #540) - Make sure that the file select input is added to the DOM.
Housekeeping
0.17.0
🚧 !!! This is a big release containing many breaking changes !!! 🚧
This release got pretty big and it would take a long time to gather all the changes, apologies for that.
Breaking Language Changes (check PRs for detailed changes)
- #503
- Allow multiple statements per block and added standalone block notation.
- Promises changed to take a single parameter instead of two
Promise(value)
. - Removed
try
,parallel
,sequence
,with
,where
,catch
,finally
andthen
language features. - Removed partial application language feature (conflicting with default arguments) until we can figure out a solution for the ambiguity.
- Removed safe operators
&.
and&(
. - Added block expressions.
- Added optional
await
keyword to statements. - Added optional
await
keyword to the condition ofcase
expressions. - Added the ability to define default values for function arguments.
- Added the ability to create decoder functions using the
decode
feature by omitting the decodable object:decode as Array(String)
. - Records are now using
:
instead of=
. - Added here document support:
<<#MARKDOWN Renders markdown content to Html MARKDOWN <<-TEXT Text content which leaves leading indentation intact. TEXT <<~TEXT Text content which leaves trims leading indentation to the first line. TEXT
- The pipe operator
|>
now puts the left hand side value as the first argument instead of the last. #571
Standard Library
There are too many changes to list here because of the standard library cleanup and pipe operator changes so consult the PRs #532 #503 and the API documentation if something doesn't work.
Language Server
Housekeeping
0.16.1
Make sure the build
command succeeds if the public/assets
folder is present.