Skip to content

Releases: mint-lang/mint

0.28.1

02 Dec 15:22

Choose a tag to compare

Fixed a performance regression involving component records and record unification.

0.28.0

01 Dec 13:39

Choose a tag to compare

Language

  • Update function for providers are not required anymore.
  • Added size directive @size(reference). (#795)
  • Add default value for types unsed as context. (#795)
  • Properly parse the target of a record update. (#769)
  • Allow connecting providers and modules in components.
  • Add fallback value to blocks.
  • Allow type expansion of variants. (#805)
  • Allow awaiting array of promises.
  • Allow unifing of promise branches in some cases.

Standard Library

  • Http requests now parse text/xml as Http.RequestBody.XML.

Compiler

  • Don't compile debug information when optimize flag is set.
  • References are now tracked with signals instead of refs.

Runtime

  • Make sure we don't get into an infinite loop when comparing signals.
  • Fix typo in program initializer agrument.

Formatter

  • Add separator to locale formatter.

Bundling

  • Make sure public files are available when using --hash-routing in reactor.
  • Use main.js file for initialization.

Type Checker

  • Fix type checking of unboxing.

CI

  • Enhance CI workflow with OpenSSL support.

Housekeeping

0.27.0

14 Aug 11:56

Choose a tag to compare

Language

  • Removed syntaxes which were deprecated in 0.20.0 (to migrate automatically run mint format with any binary between 0.20.0 and 0.26.0):

    • Constant access using colon :
    • Type variants using double colon ::
    • enum, record keywords
    • HTML expressions <{ }>
  • Added context feature to pass down props without prop drilling. (#783)

  • Allow testing and unboxing on Maybe, Result and Html in if.

  • Allow record destructuring in statements.

LSP

  • Return all locations of an error for linting and diagnostics.

Bugfixes

  • Fix a bug in Regexp.exec.
  • Properly resolve type definitions.

Housekeeping

0.26.0

09 Jul 16:23

Choose a tag to compare

Standard Library

  • Added arguments for upload and download progress to Http.send.
  • Added FormData variant to Http.ResponseBody.
  • Added FormData.getFile and FormData.getString functions.
  • Added File.fromUrl function.
  • Added Regexp.exec function.
  • Added Html.DataTransfer.getMimeTypes function.

Exporting Entities

The build command now takes any number of --export arguments which allows exporting entities from the final bundle.

Functions and constants can be exported from modules, variant constructors from types and components. Components are exported in a way that they can be used easily.

Here is a minimal example:

component Greeter {
  property name : String = ""

  fun render {
    "Hello #{name}!"
  }
}
mint build --export Greeter
import { Greeter } from `index.js`;

// Render the component into a DOM element.
Main.render(document.querySelector('div'), { name: "Joe" })

Bugfixes

  • Properly resolve static type signature of Ast::Type
  • Make sure that variable labels survive pruning. (#780)

0.25.0

20 Jun 11:10

Choose a tag to compare

Language

  • Allow defining fallback Html for async components. (#772)
  • Allow decoding and encoding Map with any type of keys. (#513)
  • Implement hash routing. (#779)

Standard Library

  • Added Object.Error.fromString function.

CLI

  • Add command line switch to display browser output during mint test. (#770 @MathiusD)
  • Add more information for the lint command with the --json flag. (#465)
  • Show warning for port mismatch when running tests. (#684)

Language Server

  • Implement textDocument/documentSymbol request for the language server. (#647)
  • Implement simple diagnostics provider for the language server.
  • Add keyword completions to the language server. (#512)

Bugfixes

  • Copy mappings when creating fresh records.
  • Make sure captured arguments are compiled into the correct place.
  • Don't restrict environment variables to the project directory. (#771)

Housekeeping

  • Fix mint compilation with Crystal version between 1.8.X & 1.10.X. (#769 @MathiusD)
  • Use latest version of Crystal. (1.16.0)

0.24.1

05 May 15:15

Choose a tag to compare

Fixed a regression where recursive types returned a recursion error.

0.24.0

05 May 07:33

Choose a tag to compare

Language

  • 🚧 Constants cannot be used in pattern matching.
  • Alternative patterns can be defined for case expressions. (#757)
  • Allow matching on records in pattern matching. (#755)
  • Automatically serialize custom types. (#750)

Standard Library

  • Added Array.all function. (#753)

Bug fixes

  • Don't raise error when trying to substitute on records.
  • Parenthesize state setters generated function. (#766)
  • Fix decoding tuples where the value was nullable.

Housekeeping

0.23.2

20 Mar 13:36

Choose a tag to compare

  • Make sure piping to a captured function works as intended.

0.23.1

20 Mar 04:41

Choose a tag to compare

  • Function captures now properly return the value from the inner function call.

0.23.0

19 Mar 15:09

Choose a tag to compare

Language

  • Implement function captures. (#749)

Type Checker

  • Show proper error message when trying to destrucutre a paramter that doesn't exist. (#746)
  • Show proper error when there are component and module with the same name. (#736)
  • Add proper error message for the impossible error. (#737)
  • Build scope for destructurings.

Parser

  • Fix a bug in parsing whitespace in certain conditions.

Compiler

  • Parenthesize inline functions following await keyword.

Standard Library

  • Added Set.reduce, Set.union, Set.intersection, Set.difference, Set.isDisjoint and Set.isSuperset functions. (#739)
  • Use proper type variable name for Array.findByAndMap (#748)

Runtime

  • Intercept submit events for navigation with GET method. (#742)

Bundler

  • Don't try bundle unused async components.
  • Follow symlink for public files.

Housekeeping