jsr-io / jsr-npm

A cli tool to make installing packages form jsr.io in node easy
https://npmjs.com/package/jsr
MIT License
102 stars 13 forks source link

Not able to use `jsr.json` with `deno.json` #103

Closed yuhr closed 2 months ago

yuhr commented 2 months ago

Basically I prefer loosely coupled way, so I want to write package manifest in jsr.json even in a Deno project. But when I run deno publish --dry-run or pnpm dlx jsr publish --dry-run, I'm getting an error:

error: Missing 'name', 'version' and 'exports' field in '<my-project-directory>/deno.json'.

The documentation says “Deno users can also include the required JSR properties in their deno.json to avoid having to create another file” (emphasize mine) and “When using Deno, all properties of the jsr.json configuration file can instead be placed in the deno.json (emphasize mine), thus (and even if not said so) it should still definitely be possible to use the another file.

So I think the CLI must prioritize jsr.json than deno.json if both present.

yuhr commented 2 months ago

This package seems to invoke the Deno runtime internally, so this issue should be transferred to denoland/deno.

yuhr commented 2 months ago

Already tracked by https://github.com/denoland/deno/issues/22651.