All Versions
Latest Version
Avg Release Cycle
57 days
Latest Release
1147 days ago

Changelog History
Page 1

  • v0.10.0-pre Changes

    August 05, 2020

    ๐Ÿš€ This is a test release for upcoming 0.10.0 version, DO NOT USE!

  • v0.9.0 Changes

    April 06, 2020

    This release containes 67 commits from 7 contributors ๐ŸŽ‰

    Type system changes

    There are several improvements relating to the type system (#216)

    • the return type signature of a function is now optional
    • the type signature of a computed property is now optional
    • the type signature of a property is now optional
    • the type signature of a state is now optional
    • the type of an arrays items can be specified using the of keyword
    • the type of an inline javascript can be specified using the as keyword

    CSS features

    โž• Added support for @font-face, @supports, @keyframes rules #166 #238

    ๐Ÿ”„ Changes / Additions

    • ๐Ÿ›  fix whitespace parsing in list type nodes #232
    • โž• added record constructors #191
    • it is now possible to pipe into any expression #228
    • 0๏ธโƒฃ the default value of a property is no optional #132
    • config option to turn off generation of icons #224
    • โž• add Array.min, Array.max now returns Maybe(Number) #229
    • 0๏ธโƒฃ when running mint start if default port is taken, allow return (with no explicit Y) to start dev server
    • ๐Ÿ›  fixed exhaustivness check for case which contains array destructuring #225
    • ๐Ÿ–จ print alternative link when starting a server if it's different # 230
    • โž• added String.toArray and String.fromArray #178
    • ๐Ÿ”„ change failing test indicator from red dot to red "F"
    • โž• add Mint::VERSION constant shelled-out to shards version

    ๐Ÿ”จ Special thanks to @Sija for doing an overall code review and many refactors and optimizations.

  • v0.8.0 Changes

    March 13, 2020

    This release contains 122 commits from 6 contributors ๐ŸŽ‰

    ๐Ÿฑ ๐Ÿšง Breaking changes ๐Ÿšง

    Mint now uses Preact instead of React (this should not break anything though) which will result in smaller compile files.

    ๐Ÿฑ External assets are now handled differently:

    • stylesheets are now supported as well
    • javascripts and stylesheets are now compiled into their own file

    - more information in issues and PRs: #151 #155 #183

    CSS rules whith multiple selectors are now compiled separately f2eab4b:

    div,p { color: red; }

    now compiles as:

    div { color: red; }p { color: red; }

    โž• Additions

    Implemented constants for stores , components and modules #194

    Implemented unary minus expression #201

    Implemented tuples #209

    Implemented array destructuring #210

    ๐Ÿ‘ Allows inline functions to be called recursively #181, #199

    โž• Added more functions to the core library:

    • Clipboard.set
    • FileSize.format
    • Provider.MediaQuery
    • Provider.Resize
    • Provider.Shortcuts
    • Dom.containedInSelector
    • Dom.getAttribute
    • Dom.setStyle
    • Dom.focus
    • Dom.getElementFromPoint
    • String.trim
    • String.withDefault
    • Window.prompt
    • Window.getScrollbarWidth
    • Maybe.andThen #197
    • Math.random #190

    ๐Ÿ›  Fixes and other changes

    • ๐Ÿ‘‰ Show error for formatter if the pattern is invalid #157
    • โœ… Format files in both source-directories and test-directories #158
    • ๐Ÿ‘ Allow underscores in environment variable names
    • ๐Ÿ›  Fixed an issue when media query provider triggering events for non subscribers
    • ๐Ÿ›  Fixed String.trim
    • ๐Ÿ›  Fixed Time.range because of DatFNS update
    • ๐Ÿ›  Fixed an error when rendering HTML errors on WSL
    • ๐Ÿ›  Fixed an issue of resolving function type definitions #212
    • sequence and parallel reserved variable names #185
    • ๐Ÿ”ง Make host:port configurable for test server #207
    • ๐Ÿ‘‰ Show more context for the missing closing tag syntax error #213
    • Display more relevant errors for property and state if the type is a record without definition #188
  • v0.7.1 Changes

    December 13, 2019

    โšก๏ธ Update code for Crystal 0.32.0

  • v0.7.0 Changes

    December 09, 2019

    Global components

    ๐Ÿ›  Components can be prefixed with the global keyword, this will add them to the DOM automatically and it's methods can be called the same way as a store or module.

    It is useful for components that only need one instance in the application,
    like modals and notifications:

    global component AlertModal {
      state shown : Bool = false
      fun open : Promise(Never, Void) {
        next { shown = true }
      fun close : Promise(Never, Void) {
        next { shown = flase }
      style base {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
      fun render : Html {
        if (shown) {
              Are you sure?
            <button onClick={close}>
        } else {
    /* Later on somewhere else */

    Statically compiled components / HTML

    ๐Ÿš€ In this release the compiler will detect components and HTML fragments that are essentially static, meaning that subsequent renders would always result in the same virtual DOM structure.

    These fragments and components will be cached so to speak, they will only rendered once and get reused after that.

    To give you an example, the following component will only be rendered once and is reused after that:

    component Icons.Checkmark {
      fun render : Html {
          /* The svg data */
    component Main {
      fun render : Html {

    ๐Ÿ†• New Features

    • ๐Ÿ‘ Allow omitting else branch of if in HTML
    • โž• Added command to generate the documentation in JSON format
    • ๐Ÿ‘ Allow "&" for attributes and classes (CSS)
    • ๐Ÿ‘ Allow embedding the Main component without taking over the body


    • ๐Ÿ“š Updated documentation of some functions

    ๐Ÿ›  Bugfixes:

    • ๐Ÿ›  Fix compiling of multiple sytles with parameters.
    • ๐Ÿ›  Fix compiling of interpolations in css values
    • ๐Ÿ’… Properly merge ifs and cases in a style and preseve their order
    • ๐Ÿ‘ Allow creating records for nested records in encode
    • Don't catch and unbox values from the last returning result in a try expression.
    • ๐Ÿ‘‰ Make sure we scope to the entities correctly.
  • v0.6.0 Changes

    October 30, 2019

    ๐Ÿ’ฅ Breaking Changes

    • References of elements and components now return a Maybe
    • โœ‚ Remove pre defined global styles from the generated HTML #125
    • Type variables are not allow in component properties and records
    • Record definitions are needed for records except records for encode

    ๐Ÿ†• New Features

    ๐Ÿ‘Œ Improvements for the style tag #140 #128

    String interpolation #141

    Implemented member access function for records:

    object = Maybe::Just({
      name: "Joe"
    }) /* Maybe::Just("Joe") */

    Implemented safe operators (&. and &() for dealing with Maybe in specific cases:

    Maybe::Just({ name: "Joe" })&.name /* Maybe::Just("Joe") */
    Maybe::Just(() : String { "Joe" })&() /* Maybe::Just("Joe") */

    Implement static and runtime type checking for route parameters #134

    ๐Ÿ”„ Changes

    • โž• Add chromium as recognized executable name for test runner #116
    • ๐Ÿ‘ Allow namespaces in HTML attributes #119
    • ๐Ÿ‘ Allow string style attributes on elements
    • ๐Ÿ‘ Allow function recursion by using it's static type definition
    • ๐Ÿ‘ Allow decoding time from a number (unix timestamp) #137
    • ๐Ÿ‘ Allow decoding Object as itself
    • Parenthesize JS interpolated values to avoid confusion #135
    • Serve files from baked files and public folder with right mime types #129
    • Don't generate links for icons if there aren't any #126
    • Replace native Maybe and Result implementations with enums #133
    • ๐Ÿ‘‰ Use static recrod of a component when accessing it as a ref

    ๐Ÿ›  Bugfixes:

    • ๐Ÿ›  Fix formatting of multiline strings #129
    • ๐Ÿ›  Fix readonly attribute compiling
    • ๐Ÿ›  Fix crash with remainder % operator


    • โž• Added Array.sumBy
    • โž• Added Array.sum
    • โž• Added Dom.focusWhenVisible
    • โž• Added Dom.contains
    • โž• Added Number.format
    • โž• Added String.replace
    • โž• Added Test.Html.assertActiveElement
    • โž• Added Set.size
    • ๐Ÿ›  Fix some Set functions
    • ๐Ÿ›  Fix Time.month and Time.year comment
    • ๐Ÿ›  Fix Array.indexBy by adding tests and using interpolation
  • v0.5.0 Changes

    April 15, 2019

    JavaScript output optimizations

    โšก๏ธ All generated JavaScript code is now optimized in the following way:

    • top level entity names are now mangled (Components, Stores, Modules, etc.)
    • entity level names are now mangled
    • ๐Ÿ— white space is removed from the generated code (build only)
    • the CSS selectors and variables are now mangled

    This change means that inlined JavaScripts no longer can access arguments by name.

    This will result in a runtime error because the argument message is mangled:

    fun log (message : String) : Void {

    To fix this we need to interpolate the argument:

    fun log (message : String) : Void {

    Calls on expressions

    Previously the calls to functions were implemented in two forms: call on a
    variable and call on a module function.

    This meant that calling a function which
    is in a record or which is a result of a function call were not possible.

    ๐Ÿš€ This release makes it possible to make a call on the result of an expression.

    This is an example which raises in error in 0.4.0 but compiles properly in 0.5.0:

    module Test {
      fun a (message : String) : Function(String) {
        () : String => { message }
      fun b : String {
      fun c : String {
        try {
          record = {
            function = (message : String) : String => { message }

    Partial Application

    Functions now can be partially applied by calling them with less arguments than

    An example of using partial application:

      /* Format a number by thousands, output: 1,000,000 */
      |> String.split("")
      |> Array.groupsOfFromEnd(3)
      |> String.join(",")
        The argument String.join("") (to is a partially applied function
        where it's type is Function(Array(String), String)

    โš  Warning for unkown CSS properties

    CSS properties are now checked against a list and will result in an error if
    they are not in the list.

    ๐Ÿ”„ Changes

    • ๐Ÿ›  Fixed array access ([]) when an expression is used as an index
    • 0๏ธโƒฃ Default values of properties are now only calucated once when the component is initialized
    • Providers can now be accessed the same a stores, or modules for introspection
    • Records now can be created without type definition. Such records have a temporary type definition created for them during type checking
    • [Runtime] Functions are bound to components and modules only once (in the constructor) instead of using .bind every time they are called


    • Inline functions can now be forced to format the body on a new line by adding
      a line break after the opening bracket {
    • 0๏ธโƒฃ Properties can now be forced to format the default values on a new line by
      โž• adding a line break after the equal sign =
    • โž• Added missing formatter for array access ([])


    • โž• Added Array.groupsOfFromEnd which is the same as Array.groupsOf but grouping from the end
    • โž• Added Array.indexBy to get an items index by a function
    • โž• Added Http.requests for inspection purposes
    • โž• Added String.rchop
    • โž• Added String.lchop
    • Html.Event is now wrapped in an actual record, so it can now be safely used in sequence or parallell expression
  • v0.4.0 Changes

    February 23, 2019

    ๐Ÿ’ฅ Breaking Changes

    • โœ‚ Removed => from inline functions
    • ๐Ÿ“ฆ mint-core package is now included in the binary (no longer needed as a dependency)

    ๐Ÿ”‹ Features

    • โž• Added --skip-service-worker flag to skip generation of service worker #96
    • Added for expression to allow iterating over some types #110
    • โž• Added ability to expose an item of a store with a different name (connect X exposing { y as z })
    • โž• Added formatter-config field in mint.json to allow setting indent-size #10
    • Implemented language feature for loading environment variables using the @VARIABLE syntax
    • Implemented Dead Code Elimination #98
    • Implemented JavaScript interpolation using the #{...} syntax
    • Implemented referencing childen of a component #108
    • ๐Ÿ‘ Allow passing Map(String, String) to the style attribute of an element.

    ๐Ÿ›  Bugfixes / Improvements

    • ๐Ÿ“œ Raise proper exception when parsing type. #95
    • ๐Ÿ‘ Allow hash to be matched in routes #101
    • ๐Ÿ‘ Allow whitespace at the end of parameter list of inline function
    • ๐Ÿ‘ Allow whitespace between parentheses of if condition #100
    • ๐Ÿ‘ Allow functions without the event parameter to be passed to event attributes.
    • โž• Added progress bar about parsing files in the CLI
    • The type checker now checks for naming conflicts of Types and Enums
    • โž• Added formatter for array access.
    • Automatically break connect exposes if there is at least new line between them.
    • Don't automatically split long strings only if they are split at least once.
  • v0.3.1 Changes

    September 10, 2018

    ๐Ÿ›  Fixes for the PWA (Progressive Web App) building process.

  • v0.3.0 Changes

    September 09, 2018

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿšš do has been removed
    • Variable shadowing are not allowed and will result in a type error

    Language features

    • โž• Added sequence and parallel for better asynchronous task handling
    • Enums now can have parameters and can now be destructured in case statements (essentially they become type ADTs) #71
    • else if can be written now #72
    • โž• Added empty catch to catch all errors #69
    • โž• Added version command to the CLI #80
    • โž• Added type checks for case branches
    • โž• Added support for encoding and decoding Map
    • โž• Added initial support for progressive web apps (PWA) by caching all files for offline use
    • encode can now encode records which have no associated type

    ๐Ÿ›  Smaller features / bug fixes

    • ๐Ÿ›  Fixed typo in build command
    • Block comment improvements #89
    • ๐Ÿ›  Fix error on project initialization #87
    • ๐Ÿ‘ Allow specifing dependencies without the .git extension #77
    • Generate icons in more sizes
    • Correctly format empty fragments <></>
    • Break function arguments into separate lines if they would result in long lines
    • ๐Ÿ“œ Don't raise initial parsing error when running the development server
    • ๐Ÿ›  Fix incorrect resolving of function type
    • โœ‚ Removed Void type restriction from route


    • ๐Ÿ‘ Crystal 0.26 support
    • ๐Ÿ’… Use underscores to avoid style name conflicts
    • โž• Added contributing guide