Closed kt3k closed 3 months ago
BTW this doesn't make all default identifiers "module". In the cases like the below, the usage becomes import Foobar from ...
(keeping the existing behavior):
export default function Foobar() {}
This only happens when the symbol name is not available.
Currently we try to show the symbol name using the expression:
If I invert the last condition to
!c.is_ascii_alphanumeric()
, then it returns something likeats
for the filea.ts
(look like trying to guess the name from the last path component) for multi source scenario, but still returns empty string for single file scenario.I'd suggest we always use
module
identifier for this, which seems less surprising than what the current algorithm tries to do.The case reported in https://github.com/jsr-io/jsr/issues/459 now becomes like:
closes https://github.com/jsr-io/jsr/issues/459