Repository navigation
Merge master into v1 - #1939
Open
chrisdp wants to merge 22 commits into
Open
Merge master into v1#1939chrisdp wants to merge 22 commits into
chrisdp wants to merge 22 commits into
Conversation
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: 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: 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
…asses and blocks (#1937)
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings v1 up to date with master through 0.73.8 (0.73.5 – 0.73.8).
Ported from master
util.pushAll: the conditional compile#else/#else ifbodies,select case(case bodies and the final assembly), the class builder's member assignments, and#ifmember handling inside classes. Each of these has a new regression test inStatement.spec.ts, and all four new tests (counting the namespaced-class test inherited from master) crashed on v1 before the change.Scope.getConstFileLink(both the cached and the map lookup paths),ScopeValidator, andBrsFileTranspileProcessor, which replaced master'sBrsFilePreTranspileProcessoron v1. The deleted file's new tests moved toBrsFileTranspileProcessor.spec.ts.bsc --init(Addbsc --initto create a new bsconfig.json #1892), with a template rewritten for v1's bsconfig (see below)....(DotDotDot) lexer tests (Add...(DotDotDot) token to the lexer #1896). v1 already had the token.follow-redirectsbumped to 1.16.1 sonpm run auditpasses.Kept from v1
CHANGELOG.md, the version, and thepackage.jsonoverrides, including v1's narrowly scopeduuidoverrides (same reasoning as Merge master into v1 #1814).benchmarks/package.json:v8-profiler-nextstays removed on v1, because it no longer builds on current Node. That also makes master's benchmarknode-gyp/taroverrides unnecessary: neither package is in v1's benchmarks dependency tree....(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
namespace promises: const chain = chainwith a globalchain()still transpiled topromises_chain, because v1's type system resolved the initializer to the const itself.util.getSelfNamedConstOfInitializernow detects a reference to the same name inside the initializer of a namespaced const.VariableExpression.getTypethen resolves that reference from the file-level table, andVariableExpression.transpileno longer namespace-qualifies it. This matches master's rule: skip the namespaced match and use the global name.foo()andnamespace ns: const foo = 1, aprint fooinsidenstranspiled on v1 toprint foo. On a device that is the global function, not the namespace const; master emitsprint 1. The cause wasutil.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 --inittemplate 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", plusminFirmwareVersion,autoImportComponentScript,sourceMapandrelativeSourceMapsundercompilerOptions. 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.testTranspilewithoutawait, which lint rejects on v1 becausetestTranspileis async there. Addingawaitis 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 useexpectDiagnosticsIncludes, 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.circularReferenceDetectedcalls drop v0's scope-name argument, and two Fix crash stripping sourceMappingURL comment from non-transpiled files #1821 tests neededsetFile<BrsFile>/setFile<XmlFile>for v1's types.Verification:
npm run test:nocover: 5407 passing, 0 failing.npx tsc --noEmit,npm run lintandnpm run auditare clean.🤖 Generated with Claude Code
https://claude.ai/code/session_011mEYuXEbLYduJAVzNw1Ldi