Skip to content

chore: update typescript-go submodule to 93ae10c46#505

Merged
fansenze merged 1 commit intomainfrom
chore/update-typescript-go-20260317
Mar 17, 2026
Merged

chore: update typescript-go submodule to 93ae10c46#505
fansenze merged 1 commit intomainfrom
chore/update-typescript-go-20260317

Conversation

@fansenze
Copy link
Copy Markdown
Contributor

@fansenze fansenze commented Mar 17, 2026

Summary

Update rstackjs/typescript-go submodule from 1d68dfd4d to 93ae10c46 (245 upstream commits). Bump Go requirement to 1.26.

Key upstream changes requiring adaptation:

  • FunctionFlags moved from checker to ast package
  • GetECMALineAndCharacterOfPosition renamed to GetECMALineAndUTF16CharacterOfPosition with UTF16Offset return type
  • vfs.WriteFile removed writeByteOrderMark parameter
  • LSP protocol types (ID, MessageKind, ResponseError) moved to jsonrpc package
  • LSPError replaced with ErrorCode enum type
  • Signature/TypePredicate/LiteralType private fields now have exported accessor methods
  • EncodeSourceFile simplified to single parameter
  • GetAssertedTypeNode removed, use node.Type() instead
  • project.NewLogger moved to project/logging sub-package
  • Default types now [], ES5 target no longer supported
  • @typescript/api restructured: root export removed, use ./sync subpath

CI updates:

  • Go version bumped from 1.25.0 to 1.26.0 in all workflows
  • golangci-lint bumped from v2.4.0 to v2.11.3 (Go 1.26 support)

rslint-api restructure:

  • Only export RemoteSourceFile, SyntaxKind, Node (website playground's actual needs)
  • RemoteSourceFile resolved from @typescript/api source via tsconfig include (no longer in public exports)
  • dts: { bundle: true } retained

Bug fix:

  • no-confusing-void-expression: fix ignoreVoidReturningFunctions for JSX attribute callbacks — getContextualType returns nil for arrow functions inside JSX attributes, now falls back to getTypeAtLocation on the parent JsxAttribute

New shim modules: jsonrpc, project/logging

Test updates:

  • Test fixture tsconfig: target es5es2015, added DOM lib for proper console typing
  • Added JSX edge case tests for no-confusing-void-expression
  • Snapshot updates for column offset changes

Related Links

  • rstackjs/typescript-go llts branch

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on a significant update to the typescript-go submodule, bringing in numerous upstream changes and bumping the required Go version to 1.26. This update necessitated widespread adaptations across the codebase to align with the new API signatures, module structures, and error handling mechanisms introduced in the latest typescript-go version. The changes ensure compatibility and leverage the latest features and fixes from the upstream project.

Highlights

  • TypeScript-Go Submodule Update: The rstackjs/typescript-go submodule has been updated to its latest version, incorporating 245 upstream commits, which required extensive adaptations across the codebase.
  • Go Version Bump: The project's Go requirement has been bumped from 1.25.0 to 1.26.0 to align with the updated submodule.
  • API Changes in typescript-go: Several core typescript-go APIs have been updated, including renaming GetECMALineAndCharacterOfPosition to GetECMALineAndUTF16CharacterOfPosition, simplifying EncodeSourceFile to a single parameter, and removing GetAssertedTypeNode.
  • Module Restructuring: LSP protocol types (ID, MessageKind, ResponseError) have been moved to a new jsonrpc package, and project.NewLogger is now located in the project/logging sub-package.
  • Type Accessor Changes: Private fields for Signature, TypePredicate, and LiteralType now utilize exported accessor methods for data retrieval.
  • LSP Error Handling Refinement: The custom LSPError type has been replaced with the ErrorCode enum type for more standardized and consistent error reporting within the Language Server Protocol implementation.
  • Test Fixture Updates: The tsconfig target for test fixtures has been upgraded from es5 to es2015, and the DOM library was added for improved console typing, along with setting types to an empty array.
Changelog
  • cmd/rslint/api.go
    • Updated diagnostic position calculation to use GetECMALineAndUTF16CharacterOfPosition and cast column values to int.
  • cmd/rslint/cmd.go
    • Updated diagnostic position calculation to use GetECMALineAndUTF16CharacterOfPosition and cast column values to int.
  • cmd/tsgo/main.go
    • Removed the id parameter from the encoder.EncodeSourceFile function call.
  • go.mod
    • Updated the Go version requirement to 1.26.
    • Adjusted replace and require directives for typescript-go modules, including adding jsonrpc.
  • go.sum
    • Updated module checksums to reflect changes in go.mod and new dependencies.
  • go.work
    • Updated the Go version and toolchain requirement to 1.26.
  • go.work.sum
    • Updated module checksums for the Go workspace.
  • internal/api/api.go
    • Removed the id parameter from the encoder.EncodeSourceFile function call.
  • internal/inspector/builder_signature.go
    • Updated access to Signature and TypePredicate fields to use new accessor methods instead of direct field access.
  • internal/inspector/builder_type.go
    • Updated access to LiteralType and IndexInfo fields to use new accessor methods instead of direct field access.
  • internal/inspector/flags.go
    • Renamed ast.NodeFlagsDeprecated to ast.NodeFlagsPossiblyContainsDeprecatedTag.
  • internal/lsp/server.go
    • Updated LSP message handling to use jsonrpc.ID and jsonrpc.MessageKind.
    • Replaced lsproto.LSPError with lsproto.ErrorCode.
    • Removed locale from the server struct.
  • internal/lsp/server_test.go
    • Updated the WriteFile method signature in mockFS to remove the writeByteOrderMark parameter.
  • internal/lsp/service.go
    • Updated diagnostic position calculation to use GetECMALineAndUTF16CharacterOfPosition.
    • Changed project.NewLogger to logging.NewLogger.
  • internal/plugins/typescript/rules/ban_tslint_comment/ban_tslint_comment.go
    • Updated line and character position calculation to use GetECMALineAndUTF16CharacterOfPosition and lineStarts.
  • internal/plugins/typescript/rules/non_nullable_type_assertion_style/non_nullable_type_assertion_style.go
    • Replaced ast.GetAssertedTypeNode(node) with node.Type().
  • internal/plugins/typescript/rules/require_await/require_await.go
    • Updated functionFlags type from checker.FunctionFlags to ast.FunctionFlags and adjusted related flag checks.
  • internal/rule/disable_manager.go
    • Updated line number calculation to use GetECMALineAndUTF16CharacterOfPosition.
  • internal/rule_tester/rule_tester.go
    • Updated diagnostic position calculation to use GetECMALineAndUTF16CharacterOfPosition and cast column values to int.
  • internal/utils/overlay_vfs.go
    • Updated the WriteFile method signature to remove the writeByteOrderMark parameter.
  • packages/rslint-test-tools/tests/typescript-eslint/fixtures/tsconfig.json
    • Updated compilerOptions.target from es5 to es2015.
    • Added DOM to lib.
    • Set types to an empty array.
  • packages/rslint-test-tools/tests/typescript-eslint/rules/snapshots/no-unnecessary-template-expression.test.ts.snap
    • Updated snapshot to reflect a change in the end column for a diagnostic range.
  • packages/rslint-test-tools/tests/typescript-eslint/rules/snapshots/prefer-string-starts-ends-with.test.ts.snap
    • Updated snapshots to reflect changes in end columns for diagnostic ranges.
  • packages/rslint-test-tools/tests/typescript-eslint/rules/no-confusing-void-expression.test.ts
    • Commented out a test case related to JSX event handler context.
  • shim/api/encoder/shim.go
    • Updated EncodeSourceFile signature.
    • Added DecodeNodes, DecodeSourceFile, EncodeNode, SourceFileHash functions.
    • Added new HeaderOffset constants.
  • shim/api/shim.go
    • Updated API shim to reflect numerous changes in the underlying typescript-go/internal/api package, including new types, methods, and removal of FileHandle and NewAPI.
  • shim/ast/shim.go
    • Added many new functions and constants.
    • Removed GetAssertedTypeNode.
    • Updated NodeFlagsDeprecated to NodeFlagsPossiblyContainsDeprecatedTag.
  • shim/bundled/shim.go
    • Added IsBundled function.
  • shim/checker/extra-shim.json
    • Removed getFunctionFlags from ExtraFunctions.
    • Added getIndexInfosOfType to ExtraMethods.Type.
    • Added freshType, regularType to LiteralType.
  • shim/checker/shim.go
    • Updated NewChecker signature.
    • Removed GetCombinedLocalAndExportSymbolFlags, SkipTypeChecking, FunctionFlags constants.
    • Adjusted extra_Checker fields.
  • shim/compiler/shim.go
    • Updated NewCachedFSCompilerHost and NewCompilerHost trace function signature to use diagnostics.Message.
  • shim/core/shim.go
    • Removed WithLocale and GetLocale.
    • Added CompareTextRanges, PositionToLineAndByteOffset, UTF16Len, UTF16Offset.
    • Updated ScriptTarget constants.
  • shim/jsonrpc/go.mod
    • Added new go.mod file for the jsonrpc shim.
  • shim/jsonrpc/shim.go
    • Added new shim file for the jsonrpc package, exposing its types and functions.
  • shim/ls/shim.go
    • Updated NewLanguageService signature.
    • Removed ExportInfoMap and related types.
    • Added new types like CodeAction, CodeFixContext, CrossProjectOrchestrator.
  • shim/lsp/lsproto/shim.go
    • Updated LSP protocol types.
    • Removed ID, MessageKind, ResponseError (now in jsonrpc).
    • Replaced custom error types with ErrorCode enum constants.
  • shim/project/logging/shim.go
    • Added new shim file for the project/logging package, exposing its types and functions.
  • shim/project/shim.go
    • Updated NewParseCacheKey signature.
    • Added ProjectTreeRequest, RefCountCache, ResourceRequest types.
    • Added new UpdateReason constants.
  • shim/scanner/shim.go
    • Renamed ComputePositionOfLineAndCharacter to ComputePositionOfLineAndByteOffset.
    • Introduced UTF16 character-based functions.
  • shim/tsoptions/shim.go
    • Added ParseExtendedConfig and ExtendedConfigCacheEntry types.
  • shim/tspath/shim.go
    • Added ChangeAnyExtension, GetNormalizedAbsolutePathWithoutRoot, GetPossibleOriginalInputExtensionForExtension, IsDynamicFileName, StartsWithDirectory, SupportedDeclarationExtensions, SupportedTSImplementationExtensions.
  • shim/vfs/osvfs/shim.go
    • Added GetGlobalTypingsCacheLocation function.
  • shim/vfs/shim.go
    • Added GetSubPatternFromSpec and Usage constants.
  • tools/gen_shims/main.go
    • Updated to include jsonrpc and project/logging in the shim generation process.
  • typescript-go
    • Updated the typescript-go submodule to commit 93ae10c465dce1c1ac5c0d205c4b19597fc969f6.
Activity
  • The author, fansenze, created this pull request.
  • Tests have been updated to reflect the changes.
  • Documentation updates were not required for this change.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@fansenze fansenze force-pushed the chore/update-typescript-go-20260317 branch from 90dbe79 to a892a5f Compare March 17, 2026 02:15
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the rstackjs/typescript-go submodule to a much newer version, which includes 245 upstream commits and bumps the required Go version to 1.26. The changes primarily consist of mechanical adaptations to significant upstream API changes in the submodule, such as moved packages, renamed functions, and modified function signatures. The pull request description provides an excellent summary of these breaking changes.

I have reviewed the adaptations made across the codebase, and they appear to be correct and consistent with the described upstream changes. The modifications to handle new types, updated function calls, and new package locations are all well-executed. The updates to dependency files (go.mod, go.sum, etc.) and test snapshots are also expected and appropriate for this kind of upgrade. I did not find any issues with the implementation.

@fansenze fansenze changed the title chore: update typescript-go submodule to latest llts chore: update typescript-go submodule to latest Mar 17, 2026
@fansenze fansenze force-pushed the chore/update-typescript-go-20260317 branch 3 times, most recently from c6a7758 to 3117b28 Compare March 17, 2026 07:40
Update rstackjs/typescript-go submodule from 1d68dfd4d to 93ae10c46
(245 upstream commits). Bump Go requirement to 1.26.

Key adaptations:
- FunctionFlags moved from checker to ast package
- Scanner API renamed (GetECMALineAndUTF16CharacterOfPosition)
- vfs.WriteFile removed writeByteOrderMark parameter
- LSP protocol types (ID, MessageKind, ResponseError) moved to jsonrpc
- Signature/TypePredicate/LiteralType use exported accessor methods
- EncodeSourceFile simplified to single parameter
- @typescript/api restructured to subpath exports (./sync)
- CI Go version bumped to 1.26, golangci-lint to v2.11.3
- Test fixture tsconfig updated for TS 7 (es2015 target, DOM lib)
- Fix no-confusing-void-expression for JSX attribute contextual type
@fansenze fansenze force-pushed the chore/update-typescript-go-20260317 branch from 3117b28 to d4de54d Compare March 17, 2026 07:58
@fansenze fansenze requested a review from hardfist March 17, 2026 08:28
@fansenze fansenze changed the title chore: update typescript-go submodule to latest chore: update typescript-go submodule to 93ae10c465dce1c1ac5c0d205c4b19597fc969f6 Mar 17, 2026
@fansenze fansenze changed the title chore: update typescript-go submodule to 93ae10c465dce1c1ac5c0d205c4b19597fc969f6 chore: update typescript-go submodule to 93ae10c46 Mar 17, 2026
@fansenze fansenze merged commit 1e5a9c6 into main Mar 17, 2026
19 checks passed
@fansenze fansenze deleted the chore/update-typescript-go-20260317 branch March 17, 2026 09:23
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.

2 participants