Files
scriptc/tests/diagnostics
Malte Ubl cc417cdc74 Keep declaration files out of the module order
A specifier that resolves ONLY to a declaration file has no runtime module
to link: Node throws ERR_MODULE_NOT_FOUND at it. Preflight already refused
the import form (SC1010), but the re-export arm and both require arms took
the declaration file as a module-order edge. Once a declaration file is a
program module, its own imports are lowered as code — which is how a
package's own `.d.mts` files emit SC2013 for every specifier inside them
(the pi/typebox shape: 133 errors, all at import statements inside
`node_modules/typebox/build/**/*.d.mts`).

Refuse the re-export form with the same SC1010 the import form uses, and
skip declaration files as edges in both require arms. `splitFiles` gains
the matching invariant: a declaration file is never lowered as a runtime
module even if one reaches the order by another path.

Test: tests/diagnostics/declaration-only-module (SC1010 snapshot) and the
recorded preflight/order baselines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 534ec68eb13f15812376aa5126f013da693a48d6)
2026-10-29 17:57:17 -07:00
..
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-10-19 07:55:06 -05:00
2026-10-20 17:56:44 -05:00
2026-10-17 22:45:32 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 12:55:55 -05:00
2026-10-20 12:55:55 -05:00
2026-10-20 12:55:55 -05:00
2026-10-19 07:55:06 -05:00
2026-10-20 17:56:44 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-10-23 00:54:10 -05:00
2026-10-22 16:00:41 -07:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-18 03:37:40 -05:00
2026-07-22 18:08:04 -05:00
2026-07-22 18:08:04 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-22 03:33:29 -05:00