Skip to content

Conversation

nevadaperry
Copy link
Contributor

@nevadaperry nevadaperry commented Jun 18, 2025

In our main repo, we have a ts_library target that includes .js, .js.map, and .d.ts files generated from X12 fixtures. When we updated from using rules_javascript of August 2022 to March 2025, those .d.ts files stopped getting included in our node_modules_package target that locally installs VSCode type hints. (Other ts_library and js_import_ts targets were fine).

This restores desired behavior of including type declarations from generated sources in node_modules_package output.

I don't understand this well. Claude Code stumbled upon it as a fix for
the regression we had after jumping from rules_js of August 2022 to
March 2025 in our main repo. The issue is we have a ts_library
containing .js, .js.map, and .d.ts files generated from X12 fixtures.
Updating our pin on rules_js caused those .d.ts files to stop getting
included in our node_modules_package target for VSCode type hints.
(Other ts_library and js_import_ts targets were fine).
@nevadaperry nevadaperry force-pushed the Nevada/include-ts-declarations-in-ts-library-jsinfo branch from 680691f to 7664a3c Compare June 23, 2025 15:29
This avoids breaking several rules that expect JsInfo not to include
type declarations. Seems like "transitive files" are just the files
going in the package.
@nevadaperry nevadaperry force-pushed the Nevada/include-ts-declarations-in-ts-library-jsinfo branch from 7664a3c to 125f77a Compare June 23, 2025 15:34
@nevadaperry nevadaperry changed the title Include TS declarations in ts_library JsInfo Include TS declarations from generated sources in node_modules_package Jun 23, 2025
@nevadaperry nevadaperry requested a review from nathanmoon June 23, 2025 15:59
@nevadaperry nevadaperry merged commit 152b979 into main Jun 24, 2025
2 checks passed
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