Skip to content

JSR ignores local files entries in import map #1203

@xubaiwang

Description

@xubaiwang

JSR ignores local file entries in import map, making it impossible to publish WASM module with overridden import.

The minimal example can be found in Deno docs - Overriding import specifiers.

;; toolkit.wat
(module
  (import "env" "get_time_in_seconds" (func $get_time (result i32)))

  (func (export "getValue") (result i32)
    call $get_time
  )
)
// deno.json
{
  "imports": {
    "env": "./env.ts"
  }
}

When such module is published, JSR fails with following error message: https://jsr.io/status/93bb4d40-f43b-4030-be65-45344621a8da

graphError
failed to build module graph: Relative import path "env" not prefixed with / or ./ or ../ at file:///build/release.wasm:1:51

Related issue: denoland/deno#30879

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions