test(compile): cover more sloppy import patterns (#34569)
While investigating #22585 ("deno compile doesn't handle
--unstable-sloppy-imports") I found that the underlying bug is already
fixed. Support for sloppy imports in compiled executables landed in
#27944, and the full reproduction from the issue (the helix-gpt repo)
now compiles and runs past module resolution. The simpler repros from
the issue thread also work, both with the --sloppy-imports CLI flag and
with the feature enabled via deno.json.
The existing spec test under tests/specs/compile/sloppy_imports only
exercised a single extensionless static import, so the other resolution
modes that the issue's reproductions actually relied on were not guarded
against regressions.
This expands that test to also cover a .js specifier resolving to a .ts
file, a directory import resolving to its index module, and an
extensionless dynamic import. No runtime code changes, test-only.
With this in place #22585 can be closed as already fixed. B
Bartek Iwańczuk committed
65a18eaa099943e8b7dab702089eb86c886cc83c
Parent: de5c878
Committed by GitHub <noreply@github.com>
on 5/30/2026, 10:35:53 AM