Skip to content
Open

v1 #1484

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
591 commits
Select commit Hold shift + click to select a range
37997a8
Add lookup tables to DiagnosticsManager to speed up diagnostic cleari…
TwitchBronBron Feb 24, 2025
a6c3930
Use instances for all native types
markwpearce Feb 25, 2025
f447772
Convert to an imported const instead of setting to global. Fix node14…
TwitchBronBron Feb 25, 2025
daeb5b2
Cache built-in method types
markwpearce Feb 25, 2025
3728847
Merge commit 'f44777210917d' into reduce_bsc_type_creation
markwpearce Feb 25, 2025
0efcb94
remove astNode.typecache
markwpearce Feb 25, 2025
f9ce5da
Reduce BscType creation (#1417)
markwpearce Feb 26, 2025
93b61fe
Adds metrics to ScopeValidation for the validation walk
markwpearce Feb 28, 2025
ed6bc6a
fixed lint error
markwpearce Feb 28, 2025
df2fc7a
A few potentgial short circuit savings
markwpearce Mar 5, 2025
700183e
Scope validation part timing metrics (#1420)
markwpearce Mar 9, 2025
b44aa61
Adds diagnosticFiltersV0Compatibility flag to BSConfig.json
markwpearce Mar 10, 2025
96004e8
Fixed build issues
markwpearce Mar 10, 2025
0eceb08
Adds diagnosticFiltersV0Compatibility flag to BSConfig.json (#1424)
markwpearce Mar 10, 2025
b3dbb81
Merge everyting except program
TwitchBronBron Mar 13, 2025
a2969ed
Fix all syntax and validation errors
TwitchBronBron Mar 18, 2025
99e7277
Fix all other failing tests
TwitchBronBron Mar 18, 2025
e33b1f9
Fix remaining failing tests
TwitchBronBron Mar 20, 2025
8e2f948
Fixes an issue where chnaged files & symbols might not be included in…
markwpearce Mar 25, 2025
24f3134
lint fix
markwpearce Mar 25, 2025
48f68e5
Update src/Program.ts
TwitchBronBron Mar 25, 2025
73437c8
Fixes issue when cancelling an in-progress validation (#1435)
TwitchBronBron Mar 25, 2025
e2f987e
Add timing metrics back for validation flow
TwitchBronBron Mar 26, 2025
a0b527f
Merge branch 'merge-master-into-v1' of https://github.com/rokucommuni…
TwitchBronBron Mar 26, 2025
557cb4a
Hide metrics logging behind `info` and `debug` flags
TwitchBronBron Mar 27, 2025
628a6a7
Merge master into v1 (includes lsp rewrite) (#1428)
TwitchBronBron Mar 31, 2025
a8a4146
Re-scraped Roku Docs (March 31 2025)
markwpearce Mar 31, 2025
1922645
Re-scraped Roku Docs (March 31 2025) (#1439)
markwpearce Mar 31, 2025
a492aeb
Fixes missing completions on incomplete if statement
markwpearce Apr 1, 2025
8be7736
Fixes not seeing custom components in completions
markwpearce Apr 1, 2025
dd51512
extra protection on usage of getCLosestExpression
markwpearce Apr 1, 2025
df7c6de
Fixes Code Completion Issues (#1442)
markwpearce Apr 1, 2025
08d6175
Merge master (dbfd744) into v1
TwitchBronBron Apr 1, 2025
cc5153a
Merge branch 'release-1.0.0' of https://github.com/rokucommunity/brig…
TwitchBronBron Apr 1, 2025
04883b8
fixes typecast transpile
markwpearce Apr 2, 2025
94a14bd
Removed duplicated tests - completion tests are in CompletionsProcess…
markwpearce Apr 2, 2025
db3bec6
Fix completions bug having duplicate stuff
TwitchBronBron Apr 2, 2025
96281c2
Merge branch 'merge-master-into-v1-dbfd744' of https://github.com/rok…
TwitchBronBron Apr 2, 2025
3bb79f3
Changed TYPES CREATED to use the logging system
markwpearce Apr 3, 2025
222b967
Update docs/plugins.md
markwpearce Apr 3, 2025
b3b2283
Merge master (dbfd744) into v1 (#1443)
markwpearce Apr 3, 2025
ed2d5e3
Merge branch 'master' into release-1.0.0
TwitchBronBron Apr 4, 2025
18433b4
Merge branch 'master' of https://github.com/rokucommunity/brighterscr…
TwitchBronBron Apr 4, 2025
dfcaf56
Merge master (e8dca23) into v1 (#1449)
TwitchBronBron Apr 4, 2025
41e3657
Update changelog for v1.0.0-alpha.45
TwitchBronBron Apr 4, 2025
f334741
1.0.0-alpha.45
TwitchBronBron Apr 4, 2025
424eeb8
Change type of 'version' parameter from String to Integer in the `Typ…
Apr 7, 2025
9e907b4
Change type of 'version' parameter from String to Integer in the Type…
TwitchBronBron Apr 7, 2025
bec0b15
Fixes transpilation bug with enums and nested namespaces
markwpearce Apr 8, 2025
a7ab881
Fixes transpilation bug with enums and nested namespaces (#1454)
TwitchBronBron Apr 8, 2025
37289f0
Merge branch 'master' into merge_master_2b6cc17a
markwpearce Apr 10, 2025
20a8398
Merge master@2b6cc17a into Release-v1 (#1458)
TwitchBronBron Apr 10, 2025
0ed303a
Do not validate typedef files for return type mismatch
markwpearce Apr 10, 2025
2bd2246
Do not validate typedef files for return type mismatch (#1459)
markwpearce Apr 10, 2025
73d416f
Do not provide semantic tokens for primitive types
markwpearce Apr 10, 2025
c8939f6
Do not provide semantic tokens for primitive types (#1460)
markwpearce Apr 10, 2025
75b7cb1
AstNodes have statementIndex, and Symbol table takes statement index …
markwpearce Apr 13, 2025
d923825
Import `performance` from `perf_hooks` to work on node <16
TwitchBronBron Apr 17, 2025
cb3036c
Import `performance` from `perf_hooks` to work on node <16 (#1462)
TwitchBronBron Apr 17, 2025
fa634f9
fix ScopeValidator crash
addison-adler Apr 17, 2025
f6c5463
Fix ScopeValidator crash (#1465)
TwitchBronBron Apr 21, 2025
ecc8078
Able to get correct types from if/else statements
markwpearce Apr 23, 2025
0033293
Merge branch 'release-1.0.0' into pocket_symbol_tables
markwpearce Apr 23, 2025
f2db31c
Add DialogBase to types
TwitchBronBron Apr 23, 2025
99ec33a
Add `DialogBase` to types (#1470)
TwitchBronBron Apr 23, 2025
965d707
refactored complement table setup code
markwpearce Apr 23, 2025
f914427
Refactored SymbolTable pocket table symbol lookup code
markwpearce Apr 23, 2025
0bae8b8
Fix erraneous diagnostic for component name on first validation
TwitchBronBron Apr 23, 2025
230bd4f
Clear resolutions by scoe name, in case scope object changes
markwpearce Apr 24, 2025
a4c9ba1
Use `Set` instead of array for faster scope lookups
TwitchBronBron Apr 24, 2025
1a3c973
Fix erroneous diagnostic for component name on first validation (#1477)
TwitchBronBron Apr 24, 2025
28a22bf
Merge branch 'master' of https://github.com/rokucommunity/brighterscr…
TwitchBronBron Apr 24, 2025
e216276
Dedupe the hover contents
TwitchBronBron Apr 24, 2025
a35ca68
Manually add missing contentNode fields
TwitchBronBron Apr 24, 2025
441cc6c
Add missing content node fields (#1481)
TwitchBronBron Apr 24, 2025
9ba28b7
Merge branch 'release-1.0.0' into fix/dedupe-hover
TwitchBronBron Apr 24, 2025
382146c
Dedupe hover results (#1480)
TwitchBronBron Apr 24, 2025
095466c
Increment version to 1.0.0-alpha.46
rokucommunity-bot[bot] Apr 24, 2025
d462d6d
Update CHANGELOG.md
TwitchBronBron Apr 24, 2025
21e7f93
Bump worker thread timeout to 40s (up from 20s)
TwitchBronBron Apr 24, 2025
9f25468
1.0.0-alpha.46 (#1482)
TwitchBronBron Apr 24, 2025
46929bd
Merge branch 'release-1.0.0' into pocket_symbol_tables
TwitchBronBron Apr 24, 2025
6f33584
Adding tests for callfunc unions
markwpearce May 2, 2025
d72fe69
Refined validation on unions of fucntions
markwpearce May 3, 2025
fe5dc44
Deals with callfunc with ame signature, but still incompatible
markwpearce May 3, 2025
38af3be
Fixed lint errors
markwpearce May 3, 2025
99e4ebf
Fix 2 errors when running build
markwpearce May 4, 2025
31e9324
Merge branch 'master' of https://github.com/rokucommunity/brighterscr…
TwitchBronBron May 8, 2025
07c7521
Add better diagnostic placement when they have no location. Prevent c…
TwitchBronBron May 8, 2025
4266fde
Add bsc1 cli binary name
TwitchBronBron May 8, 2025
8e14c6c
Fix lint issue
TwitchBronBron May 8, 2025
07268ef
Fix failing test
TwitchBronBron May 8, 2025
bb74432
bsc1 cli binary (#1492)
TwitchBronBron May 8, 2025
9dacfc4
Merge branch 'v1' into bugfix/diagnostic-missing-uri-crash
TwitchBronBron May 8, 2025
0e8414a
Better diagnostic null location handling (#1491)
TwitchBronBron May 8, 2025
3ce9354
Merge branch 'v1' into union_support_callfuncs
TwitchBronBron May 9, 2025
a194c39
Better Support for Union of Functions and CallFuncs (#1485)
TwitchBronBron May 9, 2025
3fb8c4f
Adding tests for callfunc unions
markwpearce May 2, 2025
bb3a3b0
Refined validation on unions of fucntions
markwpearce May 3, 2025
4f0f21c
Deals with callfunc with ame signature, but still incompatible
markwpearce May 3, 2025
d9f1c13
Fixed lint errors
markwpearce May 3, 2025
9b7fb10
Fix 2 errors when running build
markwpearce May 4, 2025
de6b9ad
Add better diagnostic placement when they have no location. Prevent c…
TwitchBronBron May 8, 2025
ef5626f
Fix lint issue
TwitchBronBron May 8, 2025
77f3004
Fix failing test
TwitchBronBron May 8, 2025
de063b2
Add job that always runs and is useable to branch protection checks
Christian-Holbrook Apr 30, 2025
ca69ef3
Increment version to 0.69.8
rokucommunity-bot[bot] May 5, 2025
7cb35f5
removed no-throw-literal lint rule
chrisdp May 8, 2025
2ce9182
fixed issues with conditional compilation pocket tables
markwpearce May 14, 2025
3437731
lint fixes
markwpearce May 14, 2025
d2c7e08
remove caching for AstNode.statementIndex
markwpearce May 14, 2025
21e318f
removed generated file
markwpearce May 14, 2025
dcac82f
Merge branch 'v1' into pocket_symbol_tables
markwpearce May 14, 2025
5567e22
Found failing test
markwpearce May 14, 2025
9c0aafc
fix lint
markwpearce May 14, 2025
6d205e1
Simplified the logic
markwpearce May 15, 2025
9600dc8
Changed name of field of PocketTables
markwpearce May 21, 2025
b24e9f8
Type Tracking within a Function (#1468)
TwitchBronBron May 22, 2025
e5199ab
Increment version to 1.0.0-alpha.47
rokucommunity-bot[bot] May 22, 2025
3ab664d
Update CHANGELOG.md
TwitchBronBron May 22, 2025
ce167b8
1.0.0-alpha.47 (#1497)
TwitchBronBron May 22, 2025
e9013a2
Remove caching for array default types
markwpearce May 22, 2025
76b8a13
looking into for-each loop var re-validation
markwpearce May 23, 2025
df328c9
Merge branch 'v1' into fix/foreach_variable_issue
markwpearce May 23, 2025
12c748f
Make sure the inner type of ArrayTypes are added to teh unresolved sy…
markwpearce May 23, 2025
13c8132
and do not need semantic tokens in type expressions
markwpearce May 27, 2025
84c971c
`Dynamic` and `Function` do not need semantic tokens in Type expressi…
markwpearce May 28, 2025
8961efa
Merge branch 'v1' into fix/foreach_variable_issue
TwitchBronBron Jun 3, 2025
98cb32a
Fix ForEach variable typing issues (#1498)
TwitchBronBron Jun 3, 2025
12770ea
Merge branch 'master' of https://github.com/rokucommunity/brighterscr…
TwitchBronBron Jul 15, 2025
a90c682
Fix issues with undefined/null trivia items (#1531)
TwitchBronBron Jul 16, 2025
ae89c77
Union Return type consistency (#1508)
markwpearce Jul 16, 2025
d6ed575
1.0.0-alpha.48 (#1532)
rokucommunity-bot[bot] Jul 16, 2025
3030d07
added translation for uri string
markwpearce Aug 28, 2025
60c4880
rescraped docs
markwpearce Aug 28, 2025
c27bf12
Fix `MaskGroup.maskUri` type (#1559)
markwpearce Aug 28, 2025
9b06be1
#1555 Remove zip and sideload (#1562)
Christian-Holbrook Sep 4, 2025
85fdc46
Remove unused util functions (#1565)
Christian-Holbrook Oct 16, 2025
1f58090
Fix validation exception when calling roFunction (#1588)
markwpearce Nov 4, 2025
52bfc41
Interface extending node includes callfuncs (#1585)
markwpearce Nov 5, 2025
cff33ee
Limit scope Validation (#1586)
markwpearce Nov 12, 2025
2f3df88
Merge branch 'master' into 'v1' (#1590)
TwitchBronBron Nov 18, 2025
e0f3bc9
ALlows assigning invalid to a typed array
markwpearce Nov 23, 2025
ac55e5f
Make Invalid compatible with typed arrays (#1596)
markwpearce Nov 23, 2025
7eb0a6c
Adds Inline interfaces (#1591)
markwpearce Dec 5, 2025
e7159d2
Adds TypeStatement for declaring new types (#1597)
markwpearce Dec 9, 2025
a65ebfc
1.0.0-alpha.49 (#1599)
rokucommunity-bot[bot] Dec 10, 2025
21ea232
Fixes issue with getting types in try catch blocks
markwpearce Dec 12, 2025
eaa0616
Fix issue with pocket table logic when redefining the type of a funct…
markwpearce Dec 12, 2025
d8dcd8d
Simplified pocket table lookups by statement index by making function…
markwpearce Dec 13, 2025
549ba37
Added one more test
markwpearce Dec 13, 2025
2ea4d21
Fixes getting types from pocket tables in Try/Catch (#1602)
markwpearce Dec 15, 2025
bb7e98e
Fix bug with normalizing `virtual:/` path scheme (#1607)
TwitchBronBron Jan 13, 2026
dbcb4f2
Fix bug with stagingDir fallback not working (#1606)
TwitchBronBron Jan 13, 2026
3a7dcf6
#1397 Align event names (#1557)
Christian-Holbrook Jan 13, 2026
9ad45b3
Re-ran Doc scraper (#1609)
markwpearce Jan 20, 2026
610607e
Intersection Type (#1603)
markwpearce Jan 22, 2026
b70f479
Adds ability to declare type on "For Each" loop item (#1614)
markwpearce Jan 28, 2026
acb32d2
1.0.0-alpha.50 (#1615)
rokucommunity-bot[bot] Jan 28, 2026
cb5542c
Made intersection type expample more correct and concise
markwpearce Feb 2, 2026
086b98c
Added doc page on assignments
markwpearce Feb 2, 2026
2f751ea
Documentation updates (#1616)
markwpearce Feb 2, 2026
12757dc
Able to Parse typed function types
markwpearce Feb 7, 2026
57dd685
Adds typed function type expression parsing and type statemnets wrpap…
markwpearce Feb 8, 2026
54c1aaa
Adding validation for typed function types
markwpearce Feb 9, 2026
d76ffeb
Added tests
markwpearce Feb 10, 2026
83258cc
Hover updates to support typestatement types and typed function types
markwpearce Feb 10, 2026
46c5865
Working on redoing parsing to accept only full function expressions w…
markwpearce Feb 10, 2026
a50cab0
Updated code to require verbose function signatures for function types
markwpearce Feb 11, 2026
83cc236
add tests for unions of function types
markwpearce Feb 11, 2026
8580a6a
Added docs
markwpearce Feb 11, 2026
4a55978
remove typestatement look up in dynamic isequal
markwpearce Feb 11, 2026
74986e2
Fix issue with bad parsing inside typed function type and verify comp…
markwpearce Feb 13, 2026
9e8e06b
Allow typecast statement on all variables (#1622)
markwpearce Feb 17, 2026
1556715
Fixes issue with forEach iterating over a union of iterables (#1629)
markwpearce Feb 18, 2026
f6ff8a6
Update docs/readme.md
markwpearce Feb 22, 2026
d0c9a16
Addes tests (and fixes issue) of function types inside function types
markwpearce Feb 22, 2026
f055a8d
Merge branch 'v1' into allow_typed_functions_in_type_expressions
markwpearce Feb 22, 2026
fd4d8c4
Allow typed functions in type expressions (#1620)
markwpearce Feb 22, 2026
fbd5861
MOved where tests are so they are in the addignmentTypeMismatch group
markwpearce Mar 19, 2026
424f222
Added test
markwpearce Mar 19, 2026
4ee9b96
removed commented out code
markwpearce Mar 19, 2026
4740d89
Fix for each validation error (#1646)
markwpearce Mar 19, 2026
9f9b734
Started fixing merge conflicts
markwpearce May 6, 2026
367909b
Resolved package.json
markwpearce May 6, 2026
2ef8a8e
Finish v1 ← master merge: resolve remaining conflicts
chrisdp May 6, 2026
4f463d3
Spec file fixups + two production fixes for clean tsc build
chrisdp May 6, 2026
fe2bac1
Fix two real bugs in code-action quick fixes
chrisdp May 6, 2026
481d27d
Knock more spec failures down — 80 → 31
chrisdp May 6, 2026
fe702e4
Fix file-rename edits + skip one master-only SymbolTable test
chrisdp May 6, 2026
ebb6982
Restore tests, add inline-interface BrightScript-mode diagnostic
chrisdp May 6, 2026
7f9b05f
Fix transpilation/validation of roku built-in type names
chrisdp May 6, 2026
b5674ba
Fix typed-array transpile + adjust const-cycle test expectations
chrisdp May 6, 2026
b1b7716
Port master's recursive const-value inlining + handle non-dotted AA keys
chrisdp May 6, 2026
3b53f28
Spec fix: AA-indexed-member validator handles non-dotted keys
chrisdp May 6, 2026
bc34b79
Project LSP plugin: skip cancelled-validation diagnostic emits
chrisdp May 6, 2026
e30c7b9
Project LSP plugin: re-apply skip-cancelled-validation emits
chrisdp May 6, 2026
8ee6d4f
LSP: load manifestFileContents and roll back isValidated on cancel
chrisdp May 6, 2026
5983e33
Parser: error-recover unclosed call args before block terminators
chrisdp May 6, 2026
2d6bcd7
Stop typecast m from bleeding across namespace blocks
chrisdp May 6, 2026
f599563
Re-enable four merge-introduced test skips
chrisdp May 6, 2026
f9dc5be
Lint cleanup + strip TypeStatement transpile output
chrisdp May 6, 2026
1dae699
Re-integrate sourcemap chaining and relativeSourceMaps option
chrisdp May 7, 2026
c11fb91
Restore expected-statement assertion on .brs continuation specs
chrisdp May 7, 2026
6d986a8
Use workspace typescript version - mac/linux style
markwpearce May 7, 2026
96968bb
Catch invalid callfunc lookups earlier
markwpearce May 7, 2026
cdefd4d
Fix issue of changed plugin event name beforeValidateProgram
markwpearce May 7, 2026
cfe793f
Silence internal errors that were leaking through plugin/error catchers
chrisdp May 7, 2026
13d49f2
Run before/validate/afterValidateFile atomically per file
chrisdp May 7, 2026
010dd4c
Added test that replicates revalidation issue
markwpearce May 7, 2026
36c2f90
Fixed typo in test
markwpearce May 7, 2026
7352974
removed .only
markwpearce May 7, 2026
a2ea211
Add common-file-change-propagation tests and Default-tag diagnostic l…
chrisdp May 7, 2026
6c1d88f
Remove temporary Default-tag diagnostic logging
chrisdp May 7, 2026
ce68f5c
Merge/master 0.72.0 (#1702)
markwpearce May 8, 2026
70dfd61
Reduce memory retention in caches and dispose paths
markwpearce May 11, 2026
53eb5af
Only create duplicates map and leading trivia array when needed
markwpearce May 12, 2026
39c1aae
removed cache limit and fixed tests
markwpearce May 12, 2026
9de11ed
Token leadingTrivia handling and reduce memory retention in long-live…
markwpearce May 12, 2026
80fa1a9
Initial merge conflict resolution
markwpearce May 19, 2026
589c011
Fixed CommentFlagProcecessor tests
markwpearce May 19, 2026
34eb1da
Fixes all CodeActionsProcessor tests
markwpearce May 19, 2026
701348d
Fixed remaining tests
markwpearce May 19, 2026
2523db6
Merge branch 'master' into merge/v0.72.1
markwpearce May 19, 2026
ec56f4e
Lint and doc fixes
markwpearce May 19, 2026
49d3ee6
revert package-lock
markwpearce May 19, 2026
0f4b95a
updated package-lock
markwpearce May 20, 2026
5bfe20b
Ran npm audit and fixed test
markwpearce May 20, 2026
8cac42d
ran: npm audit fix --force
markwpearce May 20, 2026
a723ae8
Merges latest v0.72.2 into v1 (#1717)
markwpearce May 20, 2026
e0d8b67
Increment version to 1.0.0-alpha.51
rokucommunity-bot[bot] May 20, 2026
74b7681
Update CHANGELOG.md
markwpearce May 20, 2026
3ab3aaf
1.0.0-alpha.51 (#1719)
markwpearce May 20, 2026
883a1db
Merge branch 'master' into v1
TwitchBronBron May 29, 2026
bef4a54
Merge master into v1 (#1726)
TwitchBronBron May 29, 2026
19da57b
Guard transpileComments against undefined trivia tokens (#1725)
TwitchBronBron May 29, 2026
0b5e2f9
Increment version to 1.0.0-alpha.52
rokucommunity-bot[bot] Jun 1, 2026
0e07dcc
Update CHANGELOG.md
markwpearce Jun 1, 2026
88a2f15
1.0.0-alpha.52 (#1728)
markwpearce Jun 1, 2026
591b100
Only compute full function name in validation if needed
markwpearce Jun 5, 2026
676b363
Make Initial Validation faster by assuming everything needs to be val…
markwpearce Jun 5, 2026
2659502
Fix issue with built-in roAssociativeArray not working with AAType
markwpearce Jun 6, 2026
e6b9097
Fix multiple invalidations of same file
markwpearce Jun 6, 2026
8b99a07
Remove additional util.getAllDottedPartsAsString call
markwpearce Jun 6, 2026
905828f
Reduce number of processTypeChain calls
markwpearce Jun 6, 2026
f469dea
Do not scope validate files that are marked in the diagnosticFilters
markwpearce Jun 8, 2026
285d344
Do not scope validate files that are marked in the diagnosticFilters …
markwpearce Jun 8, 2026
4fdda56
Merge branch 'v1' into more_validation_performance_improvements
markwpearce Jun 8, 2026
aee8999
fix: restore compatibility APIs needed by create-vsix build
Copilot Jun 8, 2026
0d91ee4
First Validation performance improvements (#1729)
markwpearce Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 49 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ on:
push:
branches:
- master
tags:
- v*
pull_request:

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.20.4"
architecture: 'x64' # fix for macos-latest
Expand All @@ -30,4 +32,47 @@ jobs:
with:
path-to-lcov: ./coverage/lcov.info
# this is stalling out for some reason, so disable it for now
#- run: npm run test-related-projects
#- run: npm run test-related-projects
npm-release:
#only run this task if a tag starting with 'v' was used to trigger this (i.e. a tagged release)
if: startsWith(github.ref, 'refs/tags/v')
needs: ci
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "14.18.1"
architecture: 'x64' # fix for macos-latest
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc
- run: npm ci
- run: npm run build
#create npm package
- run: npm pack

#create GitHub release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false #contains(github.ref, '-beta.') == true

#upload package to GitHub release
- name: Upload GitHub Release Assets
uses: alexellis/upload-assets@0.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./*.tgz"]'

#If there's a dash followed by an alpha character, this is a prerelease and should be tagged "next". Otherwise tag as "latest"
- run: if [[ "${{ github.ref }}" =~ -[a-zA-Z] ]]; then echo "DIST_TAG=next" >> $GITHUB_ENV; else echo "DIST_TAG=latest" >> $GITHUB_ENV; fi
#upload to npm
- run: npm publish --tag ${{env.DIST_TAG}}
4 changes: 2 additions & 2 deletions .github/workflows/create-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.20.4"
# Get a bot token so the bot's name shows up on all our actions
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ graph.svg
benchmarks/*.brs
isolate-*
v8*.log
*.cpuprofile
*.cpuprofile
.cache.json
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"js/ts.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
"js/ts.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
"files.trimTrailingWhitespace": true,
"js/ts.tsdk.path": "node_modules\\typescript\\lib"
}
"js/ts.tsdk.path": "node_modules/typescript/lib"
}
523 changes: 522 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ A superset of Roku's BrightScript language. Compiles to standard BrightScript.

## Overview

**WARNING: this is the `v1` branch with experimental features**

The BrighterScript language provides new features and syntax enhancements to Roku's BrightScript language. Because the language is a superset of BrightScript, the parser and associated tools (VSCode integration, cli, etc...) work with standard BrightScript (.brs) files. This means you will get benefits (as described in the following section) from using the BrighterScript compiler, whether your project contains BrighterScript (.bs) files or not. The BrighterScript language transpiles to standard BrightScript, so your code is fully compatible with all roku devices.

## Help!
Expand Down Expand Up @@ -154,24 +156,20 @@ If you need to configure `bsc`, you can do so in two ways:
1. Your project resides in a subdirectory of your workspace folder.

```bash
bsc --root-dir ./rokuSourceFiles
bsc --rootDir ./rokuSourceFiles
```
2. Run the compiler in watch mode

```bash
bsc --watch
```

3. Run the compiler in watch mode, and redeploy to the roku on every change
```bash
bsc --watch --deploy --host 192.168.1.10 --password secret_password
```
4. Use a bsconfig.json file not located at cwd
3. Use a bsconfig.json file not located at cwd
```bash
bsc --project ./some_folder/bsconfig.json
```

5. Run the compiler as a **linter** only (watch mode supported)
4. Run the compiler as a **linter** only (watch mode supported)
```bash
bsc --create-package false --copy-to-staging false
```
Expand All @@ -187,8 +185,7 @@ The presence of a `bsconfig.json` file in a directory indicates that the directo
"files": [
"**/*"
],
"stagingFolderPath": "dist",
"retainStagingFolder": true,
"outDir": "out",
//this flag tells BrighterScript that for every xml file, try to import a .bs file with the same name and location
"autoImportComponentScript": true,
"sourceMap": true
Expand Down
9 changes: 8 additions & 1 deletion benchmarks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface RunnerOptions {
quick: boolean;
profile: boolean;
tar: boolean;
config: string;
}
class Runner {
constructor(
Expand Down Expand Up @@ -144,8 +145,9 @@ class Runner {
cwd: cwd
});

execSync(`npx ts-node target-runner.ts "${version}" "${maxVersionLength}" "${target}" "${maxTargetLength}" "${alias}" "${this.options.project}" "${this.options.quick}" "${this.options.profile}"`, {
execSync(`npx ts-node target-runner.ts "${version}" "${maxVersionLength}" "${target}" "${maxTargetLength}" "${alias}" "${this.options.project}" "${this.options.quick}" "${this.options.profile}" "${(this.options.config ?? '{}').replaceAll('\"', '\\"')}"`, {
env: {
...process.env,
'NODE_OPTIONS': `--max-old-space-size=${MAX_OLD_SPACE}`
}
});
Expand Down Expand Up @@ -205,6 +207,11 @@ let options = yargs
description: 'use a npm-packed tarball for local files instead of using the files directly',
default: true
})
.option('config', {
type: 'string',
description: 'add additional BsConfig settings as JSON - eg. \'{"removeParameterTypes":true}\'',
default: '{}'
})
.strict()
.check(argv => {
const idx = argv.versions.indexOf('latest');
Expand Down
Loading