Skip to content

June 28, 2022

Compare
Choose a tag to compare
@mkellner mkellner released this 30 Jun 23:10
· 3091 commits to public since this release

This release contains changes to the Moddable SDK from June 1 through June 28, 2022.

Highlights of this release include:

  • Our XS JavaScript engine now supports the latest version of JavaScript, ECMAScript 2022
  • We've added a large suite of tests to validate the Moddable SDK and XS
  • The ESP32-C3 MCU is supported by a new port, our first to RISC-V(!)
  • Binaries for all Moddable SDK tools provided for macOS (x86 and ARM), Windows (x86 and ARM), and Linux (x86)
  • Binaries for xst (the XS test tool) are provided for use by jsvu and es-host.

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

  • XS
    • XS now supports the ECMAScript 2022 standard which adds the following features:
      • Class fields
      • Private fields
      • Top-level await
      • Class static block
      • Ergonomic brand check for private fields
      • .at() on Array, TypedArray, & String
      • Object.hasOwn()
      • RegExp Match Indices
      • Error cause
    • Note that "Ergonomic brand checks for private fields" is often misunderstood. This post by Axel Rauschmayer explains the feature well.
    • xst and xsbug (test support) now enable these test262 tests
      • Object.hasOwn
      • class-fields-private-in
      • class-static-block
      • error-cause
    • xst and xsbug (test support) disable test262 tests for unimplemented stage 3 features
      • array-grouping
      • decorators
      • regexp-v-flag
    • Conformance issue report fixes
      • XS appears to incorrectly ignore comma at end-of-line. #899 (reported by @gibson042)
      • "modulo signed zero incorrect?" #895 (reported by @devsnek)
      • "incorrectly interprets zero when used as a multiplication factor" #335 (reported by @jugglinmike)
      • "(,) is incorrectly treated as valid" #726 (reported by @gibson042)
      • "Maps and sets incorrectly distinguish NaN values" #888 (reported by @gibson042)
    • Fuzz testing
    • Uninitialized data in XS snapshot by initializing unused dummy padding field
    • Fix test262 Promise failures on ARM Linux targets (reported by @warner)
    • Fix ancient memory leak in dtoa (rarely happened)
    • Implement memory optimization for Promise proposed by @mhofman
  • TLS (SecureSocket)
    • Certificate transforms
      • PEM to DER
      • PrivateKey to PrivateKeyInfo
      • (transforms support on-device AWS provisioning)
    • Application Layer Protocol Negotiation (ALPN)
      • Fixed exception caused by use of const #916 (reported by @barianand7)
      • Support binary and UTF-8 protocol names
    • BER/DER support
      • Encoding now outputs all integers in canonical format
      • OID encoding fixed
      • Use resizable ArrayBuffer when encoding
      • Fix atring decoding
    • SSL Streams
      • Uses resizable ArrayBuffer for more efficient writes
      • Correct output of all UTF-8 data (previously only handled ASCII correctly)
    • Remove unused Base64 support from crypt/bin module (data/base64 is preferred)
  • Device porting
    • ESP32-C3 is now supported. This is the first Moddable SDK port to RISC-V!! Thank you to @LokiMetaSmith for making this happen.
    • BLE now supported on the ESP32-S3 port
  • ECMA-419
    • Provide manifests for network protocol implementations to make it easier to include them in projects
    • fetch implementation can now be preloaded to reduce RAM use
  • Tests
    • Over 500 test files containing thousands of individual tests are now part of the release. These cover many of the modules in the Moddable SDK and areas of XS not covered by test262.
  • Documentation
  • Tools
    • Simulator now gracefully handles situation where a device cannot be found
    • mcconfig now correctly handles stand-alone string values in the platform section of a manifest platforms (previously only arrays of strings worked)