In this update
Welcome to the March 2023 edition of “What’s New in RokuCommunity.” Please consider subscribing to stay up to date with what’s happening in RokuCommunity.
We introduced a new “Device View” panel in vscode extension version v2.39.0 that can be used while debugging to view the current video output of the active Roku. We achive this by capturing screenshots as fast as the Roku will provide them (roughly 1 image per second). Perhaps the coolest feature of this new panel is the interactive node inspector which is similar to the “inspect element” feature in modern web based developer tools. When activated, you can hover over any part of the screenshot and it will show the current SGNode and focus that node in the tree view. (#465)
We fixed a bug in the indent formatter that would incorrectly de-indent whenever the ?[
token was encountered.
Before:
After:
The vscode extension (and BrighterScript) now properly flags when using optional chaining in the left-hand-side of assignments since doing that will cause a runtime error on-device. (#782)
severityOverride
optionBrighterScript v0.62.0 added a new ‘severityOverride’ option that can be used to increase or decrease the severity of diagnostics. (#725)
For example, consider the bs1013
warning which says "This file is not referenced by any other file in the project"
. If you wanted to turn that warning into an error, update the bsconfig as follows:
{
//comment
"diagnosticSeverityOverrides": {
"1013": "error"
}
}
Here’s a quick demo showing it in action:
When transpiling optional chaining expressions, there was a bug where the final ?.
in the chain would lose the ?
when used in an assignment statement. As of brighterscript@0.62.0, the bsc compiler will now produce proper output. (PR #781). However, keep in mind that this is not valid syntax and the device will throw a runtime error if this syntax is used. To help with that, brighterscript will flag whenever optional chaining is used in assignments.
Before:
After:
BrighterScript@0.63.0 fixed a bug in the template string transpiler where trailing function attached to the last chunk of the template string instead of the full transpiled string. That has been fixed by wrapping the entire template string output in parentheses. (#788)
Before fix:
After fix:
roku-deploy internally uses fast-glob for file discovery (which uses micromatch for glob logic), but for some reason was using picomatch for the path filtering logic.
roku-deploy#109 aligns on micromatch for path filtering logic, meaning that now all glob logic within roku-deploy is handled using the same library.
Fixed a crash in @rokucommunity/logger (used by all our RokuCommunity projects) when trying to serialize bigint (@rokucommunity/logger#3)
All of our “build status” badges stopped working in December 2022 because shields.io change the URL format for the badge. This month we spent a little time to fix them all (1b31d04, 9df64c6, 248a853, fc087d8, cf63684, a9573f1 b3f0b0d )
When debugging the typescript code in roku-debug, breakpoints should work a lot better now. There was a bug that was incorrectly resolving the sourcemaps in the wrong locations, which often meant that contributors had to fall back to using hardcoded debugger;
statements in their typescript code. (a4a3de2)
Last but certainly not least, a big Thank You to the following people who contributed this month:
Contributions to vscode-brightscript-language:
Contributions to brighterscript:
Contributions to roku-deploy:
Contributions to logger:
Contributions to roku-debug:
Contributions to brighterscript-formatter:
Contributions to bslint:
Contributions to ropm:
Contributions to roku-report-analyzer:
Legal notice
The views and opinions expressed in this website and all of its pages are those from within our open source community and do not represent the views or positions of Roku, Inc. or any entities they represent.
Designed with @arturocuya, powered by Astro
by