Skip to content

fix: validate native TypeScript with TypeScript 6#962

Closed
longlho wants to merge 1 commit into
aspect-build:mainfrom
longlho:codex/ts6-validator-repo-attrs
Closed

fix: validate native TypeScript with TypeScript 6#962
longlho wants to merge 1 commit into
aspect-build:mainfrom
longlho:codex/ts6-validator-repo-attrs

Conversation

@longlho

@longlho longlho commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

Native TypeScript builds now run ts_project option validation through a companion repository containing an exact classic TypeScript 6 release. The native compiler repository keeps its public :validator label and delegates to that companion. validator_ts_version and validator_ts_integrity let consumers pin the validator without adding a second package to the compiler repository's node_modules tree.

Test plan

  • bazel test --lockfile_mode=error --distdir=/private/tmp //ts/...
  • bazel test --lockfile_mode=error --distdir=/private/tmp //:validator_version_test from e2e/external_dep
  • bazel build --lockfile_mode=error --distdir=/private/tmp @npm_typescript-7_validator//:validator from e2e/external_dep
  • Full Bazel 7/8/9 workspace matrix in CI

@longlho
longlho force-pushed the codex/ts6-validator-repo-attrs branch 3 times, most recently from 3ba9c66 to fc9675e Compare July 14, 2026 18:24
@longlho
longlho force-pushed the codex/ts6-validator-repo-attrs branch from fc9675e to 24c8273 Compare July 14, 2026 19:30
@longlho
longlho marked this pull request as ready for review July 14, 2026 19:53
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

longlho added a commit to formatjs/formatjs that referenced this pull request Jul 14, 2026
## Summary

- use the official TypeScript 7.0.2 compiler through `rules_ts`
- patch the root `typescript` import to delegate the classic Node API to
`@typescript/typescript6`, while keeping native TypeScript 7 for `tsc`
- patch Vue's declaration import and supply the type-only peers required
by `ts-jest`
- patch `rules_ts` so its option validator can use the TypeScript 6
compatibility runtime; the upstream fix is aspect-build/rules_ts#962
- keep all Bazel dependencies on root `//:node_modules` labels and
regenerate the lock metadata

## Test plan

- `bazel build //packages/cli-lib:pkg //packages/ts-transformer:pkg`
- focused `cli-lib` and `ts-transformer` unit, typecheck, package
export, package JSON, and internal-import tests
- `bazel run @npm_typescript//:tsc -- --version`
- `bazel run -c opt //:gazelle`
- `pnpm install --lockfile-only --offline --frozen-lockfile
--trust-lockfile --ignore-scripts`
- `bazel mod deps --lockfile_mode=error`
- focused oxfmt, buildifier, oxlint, ast-grep, and codescythe checks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Long Ho <holevietlong@gmail.com>
thesayyn pushed a commit that referenced this pull request Jul 18, 2026
Close #962 which had an
alternative approach.
Ref #950 or
#967 which do all
validation (not only >=7.x) this way in rules_ts 4.x

### Changes are visible to end-users: yes

- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes

`ts_project` attribute vs tsconfig validation for ts v7+ is now done
using `tsc --showConfig`. This may catch additional validation errors
not previously found such as when tsconfigs extend from npm packages.

### Test plan

- Covered by existing test cases
- New test cases added
@jbedard

jbedard commented Jul 18, 2026

Copy link
Copy Markdown
Member

I hope this was accomplished with #969 - please let me know if anything is missing

@jbedard jbedard closed this Jul 18, 2026
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