Skip to content

fix(bazel): verify TypeScript version from MODULE.bazel instead of lockfile#3856

Merged
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:pr-takeover-3845
Jul 21, 2026
Merged

fix(bazel): verify TypeScript version from MODULE.bazel instead of lockfile#3856
alan-agius4 merged 2 commits into
angular:mainfrom
alan-agius4:pr-takeover-3845

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

In recent versions of aspect_rules_ts, the module extension is implemented in a way that doesn't record the version metadata in MODULE.bazel.lock under the expected path or format, causing validate_ts_version_match to fail to extract the version, resolving it to unknown and resulting in validation failures.

To resolve this issue, the verify-typescript.mjs validation script is refactored to read and extract ts_version directly from MODULE.bazel instead. The macro definition in defs.bzl and the invocation in BUILD.bazel are updated to pass MODULE.bazel instead of MODULE.bazel.lock.

See associated pull request for more information.

Closes angular#3845 as a pr takeover
@angular-robot angular-robot Bot added the area: build & ci Related the build and CI infrastructure of the project label Jul 20, 2026
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 20, 2026
gemini-code-assist[bot]

This comment was marked as outdated.

@alan-agius4

This comment was marked as outdated.

gemini-code-assist[bot]

This comment was marked as outdated.

@alan-agius4

Copy link
Copy Markdown
Contributor Author

/gemini review

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

Copy link
Copy Markdown

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 TypeScript version validation logic to check the version directly from MODULE.bazel instead of parsing MODULE.bazel.lock. It also updates several Bazel dependencies across the workspace. A review comment suggests improving the regular expression used to extract the TypeScript version from MODULE.bazel by adding a word boundary after ts_version to prevent false positive matches.

Comment thread bazel/validation/verify-typescript.mjs Outdated
…ckfile

In recent versions of `aspect_rules_ts`, the module extension is implemented in a way that doesn't record the version metadata in `MODULE.bazel.lock` under the expected path or format, causing `validate_ts_version_match` to fail to extract the version, resolving it to `unknown` and resulting in validation failures.

To resolve this issue, the `verify-typescript.mjs` validation script is refactored to read and extract `ts_version` directly from `MODULE.bazel` instead. The macro definition in `defs.bzl` and the invocation in `BUILD.bazel` are updated to pass `MODULE.bazel` instead of `MODULE.bazel.lock`.

@josephperrott josephperrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@alan-agius4
alan-agius4 merged commit 9d539d3 into angular:main Jul 21, 2026
17 checks passed
@alan-agius4

Copy link
Copy Markdown
Contributor Author

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4
alan-agius4 deleted the pr-takeover-3845 branch July 21, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants