Skip to content

Merge master into v1 - #1939

Open
chrisdp wants to merge 22 commits into
v1from
claude/serene-carson-gf7l7m
Open

chrisdp wants to merge 22 commits into
v1from
claude/serene-carson-gf7l7m

Conversation

@chrisdp

@chrisdp chrisdp commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Brings v1 up to date with master through 0.73.8 (0.73.5 – 0.73.8).

Ported from master

Kept from v1

  • CHANGELOG.md, the version, and the package.json overrides, including v1's narrowly scoped uuid overrides (same reasoning as Merge master into v1 #1814).
  • benchmarks/package.json: v8-profiler-next stays removed on v1, because it no longer builds on current Node. That also makes master's benchmark node-gyp/tar overrides unnecessary: neither package is in v1's benchmarks dependency tree.
  • Master's Add ... (DotDotDot) token to the lexer #1896 parser tests assert that ... is rejected, but v1 supports spread (Add spread operator support #1839), so v1's parser tests win.

Worth a reviewer's attention

  • Type-system change for Allow a namespaced const to reference an outer symbol with the same name #1905. Porting the resolver alone wasn't enough on v1. namespace promises: const chain = chain with a global chain() still transpiled to promises_chain, because v1's type system resolved the initializer to the const itself. util.getSelfNamedConstOfInitializer now detects a reference to the same name inside the initializer of a namespaced const. VariableExpression.getType then resolves that reference from the file-level table, and VariableExpression.transpile no longer namespace-qualifies it. This matches master's rule: skip the namespaced match and use the global name.
  • Pre-existing v1 bug fixed: wrong symbol in transpiled output. With a global foo() and namespace ns: const foo = 1, a print foo inside ns transpiled on v1 to print foo. On a device that is the global function, not the namespace const; master emits print 1. The cause was util.isVariableShadowingSomething, which treated the namespace const as shadowed whenever any file-level symbol shared its name. It now stops once the name resolves to the namespace's own member. Its only caller is the const/enum inliner. Two regression tests were added for this.
  • bsc --init template for v1. Master's template writes options that v1 deprecates (stagingDir, deploy, copyToStaging, createPackage, top-level compiler options) and some it doesn't have (host, password, username, outFile, retainStagingDir). The v1 template keeps master's recommended defaults: "outDir": "dist", plus minFirmwareVersion, autoImportComponentScript, sourceMap and relativeSourceMaps under compilerOptions. It keeps master's descriptions for every option that still exists on v1. The test now also checks that the generated config produces no deprecation diagnostics.
  • Adapted ported tests. Master's new const tests called testTranspile without await, which lint rejects on v1 because testTranspile is async there. Adding await is what exposed the type-system gap above. The six Allow a namespaced const to reference an outer symbol with the same name #1905 circular-reference tests use expectDiagnosticsIncludes, because v1 also reports cycles during type resolution, with duplicate and partial chains and a "Cannot find name" in one case. I compared those diagnostics on a clean v1 build and they are identical, so this is existing v1 behaviour, not something the port changed. circularReferenceDetected calls drop v0's scope-name argument, and two Fix crash stripping sourceMappingURL comment from non-transpiled files #1821 tests needed setFile<BrsFile>/setFile<XmlFile> for v1's types.

Verification: npm run test:nocover: 5407 passing, 0 failing. npx tsc --noEmit, npm run lint and npm run audit are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_011mEYuXEbLYduJAVzNw1Ldi

chrisdp and others added 22 commits September 15, 2026 09:31
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: rokucommunity-bot <93661887+rokucommunity-bot@users.noreply.github.com>
Co-authored-by: princecherry9905 <kprince91800@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Bronley Plumb <bronley@gmail.com>
…ame (#1905)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: rokucommunity-bot <93661887+rokucommunity-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…asses/blocks

Transpile code appended child output with `result.push(...items)`, which passes
every item as a separate function argument. Once a single node's output passed
~120k items (e.g. a large Rooibos suite class), V8 threw a RangeError.

Add `util.pushAll()` and use it at every transpile site that can receive an
unbounded child result: Body, Block, IfStatement else branches, For/ForEach/While
bodies, FunctionExpression bodies, and ClassStatement (methods, builder, class
function). Add regression tests that reproduced the crash before the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011mEYuXEbLYduJAVzNw1Ldi
Fixes GHSA-q3jh-wrc6-jgq8 and GHSA-8r9p-f939-6h3c (high), which fail
`npm run audit`. follow-redirects is a dev-only transitive dependency
(phin > centra), so this is a lockfile-only change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011mEYuXEbLYduJAVzNw1Ldi
Brings v1 up to date with master through 0.73.8.

Ported with v1-specific changes:
- Allow a namespaced const to reference an outer symbol with the same name
  (#1905, #1904): ported into Scope.getConstFileLink (both lookup paths),
  ScopeValidator and BrsFileTranspileProcessor (v1's replacement for the
  deleted BrsFilePreTranspileProcessor). v1's type system also resolves a
  self-named const initializer to the outer symbol, and VariableExpression no
  longer namespace-qualifies it.
- Fix isVariableShadowingSomething treating a namespaced const as shadowed
  when a global symbol shares its name (pre-existing v1 bug that made the
  #1905 tests fail and transpiled such references to the global symbol).
- `bsc --init` (#1892): template rewritten for v1's bsconfig (outDir,
  compilerOptions, no deprecated deploy/staging options).
- Fix "Maximum call stack size exceeded" for very large output (#1937): also
  converted v1-only spread sites (conditional compile, select case, class
  builder and class #if members), with regression tests.
- Bump follow-redirects to 1.16.1 for the audit.

Kept v1's own CHANGELOG, version, package overrides, benchmarks package
(v8-profiler-next stays removed), and parser `...` tests (v1 supports spread).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011mEYuXEbLYduJAVzNw1Ldi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants