deno icon indicating copy to clipboard operation
deno copied to clipboard

`deno publish --dry-run` do not check specifier `jsr:` version constraint

Open hugoalh opened this issue 1 year ago • 1 comments

Happened on Deno v1.41.2, not tested on other versions.

For example, at the script:

import { escape } from "https://deno.land/[email protected]/regexp/escape.ts";

And at the config (look at the missing version constraint at the right side):

{
  "imports": {
    "https://deno.land/[email protected]/regexp/escape.ts": "jsr:@std/regexp/escape"
  }
}

Then run deno publish --dry-run, and it is success.

However, run deno publish and it is fail:

error: Failed to publish @XXXX/XXXX@XXXX

Caused by:
    Failed to publish @XXXX/XXXX at XXXX: specifier 'jsr:@std/regexp/escape' is missing a version constraint

deno publish --dry-run should also check specifier jsr: version constraint.

hugoalh avatar Mar 10 '24 09:03 hugoalh

Just ran into this myself as well.

NfNitLoop avatar May 11 '24 04:05 NfNitLoop