June 28, 2022
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()
onArray
,TypedArray
, &String
Object.hasOwn()
RegExp
Match IndicesError
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
- Fixes for runtime issues found by Fuzzilli testing by @Agoric and @moddabletech
- Fixes for parser issues found by ClusterFuzz (OSS-Fuzz) by Google.
- 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
- XS now supports the ECMAScript 2022 standard which adds the following features:
- TLS (
SecureSocket
)- Certificate transforms
- PEM to DER
PrivateKey
toPrivateKeyInfo
- (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
- Fixed exception caused by use of
- 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)
- Uses resizable
- Remove unused Base64 support from crypt/bin module (data/base64 is preferred)
- Certificate transforms
- 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
- New document: Testing the Moddable SDK
- Fix broken links
- Make formatting more consistent across documents
- Add
Timer.unschedule
- Add note about Preference key and value size limits varying by host
- Updated XS conformance document with latest results
- Added documentation for TLS certificate transforms
- 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)