mint-lang v0.9.0 Release Notes

Release Date: 2020-04-06 // about 2 months ago
  • 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.


Previous changes from v0.8.0

  • 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.open
    • 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