aspect-build / rules_ts

Bazel rules for the `tsc` compiler from http://typescriptlang.org
https://docs.aspect.build/rules/aspect_rules_ts
Apache License 2.0
94 stars 53 forks source link

[FR]: Use typescript from npm_translate_lock #624

Open Silic0nS0ldier opened 1 month ago

Silic0nS0ldier commented 1 month ago

What is the current behavior?

As of #308 the TypeScript version and integrity can be automatically extracted, however this misses out on functionality present in npm_translate_lock such as applying patches.

A recent TypeScript release included a bug https://github.com/microsoft/TypeScript/pull/57849 (5.4.x, broken in 5.4.2 and fixed in 5.4.5) which was fixed with a trivial patch, however it could not be applied to Rules TS's @npm_typescript repo.

Describe the feature

Instead of pulling in TypeScript with bespoke logic

https://github.com/aspect-build/rules_ts/blob/87e372303bdc35811014b3bad08bb0e761ad1fcc/ts/private/npm_repositories.bzl#L66

support using TypeScript from npm_translate_lock's node_modules directly. This way functionality like patching comes free.

Silic0nS0ldier commented 1 month ago

BTW looks like an issue workflow failed to run for this.

https://github.com/aspect-build/rules_ts/actions/runs/9394496432/job/25872315491#step:3:11