Skip to content

Moddable SDK 3.7.0

Compare
Choose a tag to compare
@mkellner mkellner released this 07 Feb 20:49
· 2288 commits to public since this release

This release contains changes to the Moddable SDK made between January 2, 2023 and February 1, 2023.

Highlights of this release include:

  • New sensor drivers for ADPS-9960 (ambient light and proximity), PZEM-004T (energy), and AMG88xx (GridEYE) infrared temperature sensor
  • ESP32 built-in Ethernet support
  • Faster builds on Windows

February Community Call

The monthly Moddable Community Call is this Thursday, February 9th at 4:00 PM PST. Join us live on Zoom to learn more about this month's release, hear about our experience to the FOSDEM open source conference in Belgium, and chat with the Moddable team.

Release details

  • ECMA-419
    • New APDS-9960 sensor driver (Ambient Light Sensor, Proximity, Gesture)
    • New PZEM-004T energy monitor sensor driver with two example apps - command line and GUI
    • New AMG88xx (GridEYE) infrared array temperature sensor
    • lwip versions of TCP and UDP sockets use task-safe API wrappers for greater reliability (based on issue reported by @mshioji)
    • lwip TCP defers error report until pending data read (matches macOS and Linux behavior)
    • TCP write failures due to disconnected socket trigger onError rather than throwing (consistent error handling for client code)
    • HTTP, MQTT, and WebSocket clients report error when TCP constructor throws (based on issue reported by @ralphwetzel)
    • MQTT client
      • timeout when connecting (reported by @mshioji)
      • invokes onError if connection acknowledgment fails (invalid password)
      • defaults to port 1883 (was using 80)
    • HTTP Client
      • read without argument reads all available
      • If error occurs, invoke callback on pending requests
      • Report completion of current request before error that only impacts pending requests
      • onClose renamed to onError for consistency.
      • onDone uses ECMA-419 completion callback semantics to report success and failure
    • TLS client invokes onError on remote disconnect
    • I2C read return value when reading into a buffer is now number of bytes read (conforms to specification) on ESP8266, ESP32, and Pico
    • Update first argument to callbacks in async I2C and SMBus to be null or Error instance to match ECMA-419 spec (which matches Node.js)
    • SPI constructor on ESP8266 and ESP32 throws if port is undefined #1005
    • PulseWidth input property names updated to match Digital names where possible
    • PulseCount on ESP32 now initializes triggered field to eliminate occasional zombie instances
    • GT911 and FT6206 touch drivers conformance fixes - return empty array on last touch up event and undefined until next touch down
    • BMP180 and BMP280 sensors conformance fixes to improve error handling (reported by @kitazaki)
    • BMP280 sensor driver provides useful default configuration (reported by @mshioji)
    • BMP280 sensor driver update to work with I2C read conformance fix
    • TMP102 temperature sensor conformance fixes and don't orphan I2C instance on error
    • LIS3DH accelerometer sensor error handling fix to avoid orphaning I2C instance
    • HC-SR04
      • proximity sensor conformance fixes
      • trigger pin optional
      • add example using multiple HC-SR04 sensors
    • SMBus based sensor drivers updated to eliminate use of deprecated SMBus function names
    • Updated sensor summary document (contributed by @Sineos)
  • Modules
    • Network
      • Ping - update implementation to use private fields to eliminate unintended interactions with client code, better error handling, pass packet identifier to callback, ignore non-ping packets instead of failing
      • TCP socket on macOS reference count fix if error during resolve
      • Remove experimental HTTP suspend support (use ECMA-419 HTTPClient instead)
      • MQTT client
        • Will fix (incorrect length)
        • No callbacks after close
      • WebSocket client
        • No callbacks after close
        • Report errors (e.g. Protocol Upgrade fail) through error callback rather than throwing (so client code can recover)
    • Neopixels driver allows runtime override of build-time configuration
  • Tools
    • Parallel execution of cl for faster Windows builds
    • Optional parallel processing of NMAKE files in Windows Moddable SDK tools build using parallel_build.bat. See the Windows Getting Started Guide for details. - Fix calculations when wav2maud upsamples to avoid generating invalid file
    • mcrun supports -x option to redirect xsbug connection
    • Enable metering in xst for oss-fuzz to catch runaway tests (contributed by @raphdev)
    • Free up system memory in testmc by reducing number of keys (original value based on test262, which needs far more)
    • serial2xsbug on Linux now reliably initializes serial connection to fix intermittent xsbug connection failures (contributed by @tve)
    • Use MACOS_ARCH environment variable to support building universal tool binaries
    • Consistently set minimum macOS version to 10.7
    • Fix Windows build of xst
  • Devices
    • ESP32-C3 build updates to work with ESP-IDF changes for RISC-V #975 & #996
    • ESP32
      • Built-in Ethernet support #844
      • Wi-Fi and Ethernet co-existence
      • Support for WT32-ETH01 development board, platform identifier esp32/wt32_eth01
      • Fix ESP32-S2 build by adding Pulse Width Input stub (not supported by hardware)
    • Pico
      • Remove port from I2C constructor options (can be inferred from pins)
  • XS
    • Fixes for issues found with fuzz testing using Fuzzilli and oss-fuzz. Thank you to @Agoric for their ongoing assistance with this effort.
    • Weak references are garbage collected sooner
    • Add metering macros to xs.h
    • Fix integer overflow in TypedArray constructor (caused by undefined behavior in release builds only)
    • ArrayBuffer.prototype.slice conformance fixes to eliminate vulnerability with buffer size
    • Fix garbage collector trashing behavior
    • Fix buffer overflow in host's fxFindModule implementations with long module paths
  • Tests
    • In-depth tests for original networking modules
      • SNTP client
      • HTTP client
      • DNS resolver
      • WebSocket client
      • MQTT client
      • Ping client
  • TypeScript
    • Add blank text/index.d.ts file to quiet Visual Studio warning (contributed by @tve)

Contact Us

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