October 20, 2020
This most significant change in this release is a fix to JSON parsing. The XS JavaScript engine has always been lenient in parsing for convenience, accepting trailing commas that are prohibited by the JSON specification. Here's an example, where the comma after "./main", ], and } are all disallowed in JSON (though allowed in JavaScript code):
{
"include": "$(MODDABLE)/examples/manifest_base.json",
"modules": {
"*": [
"./main",
],
},
}With this release, XS fully conforms to the JSON specification, rejecting trailing commas. If your project manifests included trailing commas, you will now encounter parsing errors when building your project with mcconfig.
Note: This update to XS is backwards compatible with the byte-code from the October 14, 2020 release. Therefore, you do not have to rebuild the Moddable SDK tools, though it is recommended.
- XS JavaScript engine fully conforms to JSON parsing requirements
- All JSON files (about 300!) in the Moddable SDK have been updated to eliminate trailing commas #476 (reported by @erights)
mcconfigandmcrunnow report manifest parsing errors with the file name and line number. Previously this only worked with debug builds of the tools.- Add
$USERHOMEenvironment variable tomcconfigwhich maps to$HOMEon macOS and Linux, and$USERPROFILEon Windows. This is used to access some device specific build resources. - Fix build of servo module on Windows by using
$USERPROFILE - Replace stray comma with semicolon in piu/bars example. Fixes #475 (reported by @stc1988)
- Fix for display brightness control on all versions of M5Stick-C hardware #474 (from @wilberforce).
- 16 color (4-bit palette color) displays work again in simulator and ESP8266. Works for the first time on ESP32. #477 (reported by @stc1988)
- Added I2S to the Windows ESP8266 build to allow audio examples to build