Skip to content

September 1, 2022

Compare
Choose a tag to compare
@mkellner mkellner released this 03 Sep 01:27
· 2862 commits to public since this release

This release contains changes to the Moddable SDK made between August 5, 2022 and September 1, 2022

Highlights of this release include:

  • Deep cloning objects with the standard web structuredClone function optimized for microcontrollers. Complements deepEqual added last month.
  • Big progress on implementation of the ECMA-419 standard: RTC, sensors, HTTP server, TypeScript typings for I/O, and more
  • Networking enhancements including TLS certificates updates and improved reliability for dropped Wi-Fi connections
  • Detailed documentation on writing unit tests to run on microcontrollers using testmc

Note: The original simulator in the Moddable SDK, screentest, will be removed from the Moddable SDK later this month. The default simulator has been mcsim for several months. If you haven't already transitioned to mcsim, now is the time.

If you have questions or suggestions about anything here, drop by our Gitter to chat about it, start a new Discussion on our GitHub repository, or contact us on Twitter at @moddabletech.

  • XS JavaScript Engine

    • Updated Compartment implementation (for Secure ECMAScript / Hardened JavaScript) to match the latest proposal discussed in TC39. See the XS Compartments document for details and a link to the proposal.
    • Fix memory leak when writing XS snapshot
  • Modules

    • littefs reports detailed error messages for exceptions in debug builds and error code number in instrumented and release builds
    • File systems on macOS and ESP32 support read/write of more kinds of buffers
    • structuredClone now available! See "Going Deep with XS: deepEqual and structuredClone" for details.
    • Updated built-in TLS certificates to replace expired certificates and add newer certificates. Reported by @stc1988. #828
    • Piu idle handling optimization eliminates frequent calls from C to JavaScript
    • Fixes to lwip Socket to improve reliability when Wi-Fi connection dropped unexpectedly
    • Original MQTT client properly parses topics of more than 255 bytes
    • SNTP client update to clean-up implementation and handle failures reliably
    • Start of MCU-optimized implementation of HTML standard URL class together with tests. Expected to completed in September 2022.
  • ECMA-419

    • First draft of proposed ECMA-419 HTTP Server with example.
    • First draft of high-level async-generator based HTTP server inspired by fetch and Deno built on proposed ECMA-419 HTTP server with example.
    • Sensor driver implementations updated to match draft ECMA-419 2nd Edition sensor classes
      • CCS811 - environment
      • BMP180 - pressure and temperature
      • BMP280 - pressure and temperature
      • Capacitive moisture
      • Qwiic soil moisture
      • AK8963 - magnetometer
      • HMC5883 - magnetometer
    • RTC (Real-Time Clock) driver implementations updated to match draft ECMA-419 2nd Edition RTC peripheral
      • DS1307
      • DS3231
      • MCP7940
      • PCF85063
      • PCF8523
      • PCF8563
      • RV3028
    • Updated RTC examples and hosts using RTC to latest API
    • ECMA-419 Listener implementation for macOS
  • Devices

    • Update to ESP-IDF v4.4.2 for ESP32 builds (previously using v4.3)
    • Re-enable stop bit control in I²C APIs, now that underlying issue is fixed in ESP-IDF v4.4.2 #929
    • ECMA-419 Serial on ESP32 has fewer dependencies on ESP-IDF serial driver after being broken by ESP-DF v4.2.2 update. Reported by @meganetaaan. #931
    • Pico LCD 1.3 device now supported. Contributed by @stc1988. #905
  • TypeScript

    • Type declarations (aka typings) for most ECMA-419 I/O classes: Digital, DigitalBank, PWM, I²C, Serial, PulseCount, SMBus, SPI, TCP, Listener, and UDP. Contributed by @meganetaaan. #928
  • Tools

    • xsbug options to color traces to console log and show/hide exceptions, colorize TypeScript and *.mjs source files, and show correct cursor over non-linkable log lines. Contributed by @cmidgley. #909
    • New mcprintski tool to regenerate TLS certificate index (macOS only)
    • xsbug resolves symbolic links so Moddable SDK tests no longer need to be copied to test262 directory to be used with test262 and testmc
    • XS Linker no longer strips async iterator when async generator is used
    • nodered2mcu tool to support Node-RED MCU Edition initiative. Optimizes flows by compiling portions to JavaScript.
    • M5Paper simulator updated to work with Compartment updates that blocked access to MODEL global. Reported by @gingerbeardman in #933.
  • Documentation

  • Testing

    • test262-style tests added for Compartment
    • New BLE client tests for rssi and properties in advertisements.
    • testmc allows tests to extend assert (convenient for test fixtures)
    • testmc times out when attempting to connect to unavailable Wi-Fi access point