Skip to content

December 30, 2020

Compare
Choose a tag to compare
@phoddie phoddie released this 31 Dec 00:05
· 5208 commits to public since this release

Welcome to the final Moddable SDK release of 2020.

  • XS JavaScript engine
    • Debugging support for source text parsed by eval! Watch the demo. It is still not recommended to use eval in embedded projects. (requested by @Agoric)
    • Remove unused historic features thanks to a very through review of runtime properties by @erights (see #523 and #524 for details)
    • Fix dead-strip bug introduced by removing historic features #530, #531 (independently reported by @cmidgley and @menway)
    • Closing braces } in the body of a script or a module were parsed as EOF. The bug was probably there for a decade or so! #526 (reported by @YaoHouyou)
    • Fixes for several obscure new issues reported by test262:
      • Sloppy direct eval that defines arguments in the default value of a parameter of an arrow function: (x, y = eval("var arguments = x")) => { print(arguments) }
      • Most Atomics methods can be used on TypedArray based on ArrayBuffer now (instead of only TypedArray based on SharedArrayBuffer).
      • The prototype of GeneratorFunction and AsyncGeneratorFunction is not a function.
      • Proxies can be created with revoked proxy as target or handler.
      • If the length of a function is Infinite, the length of its bound functions is also Infinite.
      • Function.prototype.toString behaves correctly if the function name is no identifier.
      • Setting or defining the length of an array coerce the length before checking if the length property is read-only.
    • Add documentation on static size allocations in XS (requested by @chances)
  • New HX711 driver. Supports digital scales. (contributed by @meganetaaan)
  • New module allows preferences to work on the simulator on Linux. Pure JavaScript implementation. (contributed by @cmidgley)
  • Add native API to get and set preference values for ESP32 (matches ESP8266)
  • BLE
    • Removed bonded property passed to client onConnected callback. Code should check bonded state from the onAuthenticated callback.
  • Graphics
    • Poco renderer's clip function return value indicates when fully clipped out to optimize drawing code
    • Commodetto's ReadPNG module now properly decodes PNG images that use a filter on the first scan line
  • Audio
    • AudioOut instances no longer crash when closed from a callback
    • M5Stack host waits for start-up sound to finishing playing before running app. (Same behavior as all other hosts with a start-up sound)
  • FT2606 touch driver
    • Implement calibration for FT2606 touch driver
    • Add calibration app for FT2606 running on Moddable One and Moddable Two
    • Add default touch calibration settings for Moddable One and Moddable Two
  • TypeScript support
    • Fixed case of piu/MC.d.ts and Resource.d.ts files for case sensitive file systems
    • Include Piu declarations in manifest_typings.json #527 (reported by @stc1988)
    • Add global declarations for Piu's Skin, Texture, Style, Behavior, Content, Container, Application, Scroller, Row, Column, Layout, Die, Port, Label, and Transition
    • Add declarations for the interpolators Piu adds to Math
    • Add declarations for piu/CombTransition and piu/WipeTransition
    • Add ArrayBuffer.prototype.concat, BigInt.fromArrayBuffer, and BigInt.bitLength to XS typings (found as result of @erights review in #523)
    • Remove DOM typings from build (the Moddable SDK does not provide a browser runtime!)

Note: Several of these changes are to the Moddable SDK tools. Therefore, after updating it is necessary to rebuild Moddable SDK tools and perform a clean build of your project. Details on how to do that are in the Update sections of the Getting Started guide for macOS, Windows, and Linux.