You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests compare TSRX error codes as literal strings, which change in the next @tsrx/core #1337
Switch the tests to the DIAGNOSTIC_CODES constants: can be done now. The constants exist in today's @tsrx/core and keep their names in the next release, so the tests pass before and after the upgrade.
@tsrx/core is giving every error a standard code (tsrx-org/tsrx#843): TypeScript's own code for a mistake TypeScript also reports, such as TS1029, and a TSRX code for TSRX's own errors, such as TSRX1001. Today's string codes, like tsrx-jsx-spread-child, become TSRX codes. The constant names in DIAGNOSTIC_CODES stay the same; only their values change.
Four places in Octane's tests compare the codes as literal strings, and those will fail after the upgrade:
// Today: fails once the code becomes a TSRX codeconstSPREAD_CHILD='tsrx-jsx-spread-child';
// Instead: passes with today's @tsrx/core and the nextimport{DIAGNOSTIC_CODES}from'@tsrx/core';constSPREAD_CHILD=DIAGNOSTIC_CODES.JSX_SPREAD_CHILD;
Errors that have no code today, such as the return/break/continue template errors and TypeScript-style mistakes, get one in that release.
On Node, Octane parses with @tsrx/oxc first, whose errors carry no code today. @tsrx/oxc has its own issue to report the same codes as @tsrx/core (tsrx-org/oxc#117); until it does, a test that checks a code on Node sees @tsrx/oxc's error.
The codes are final (tsrx-org/tsrx#888, merged); the table in #1357 gives each constant's new value. That issue also covers what else changes for Octane on the upgrade.
Activity
leonidaz commentedon Sep 27, 2026
The codes are final (tsrx-org/tsrx#888, merged); the table in #1357 gives each constant's new value. That issue also covers what else changes for Octane on the upgrade.