Conversation
| Unlike npm, JSR does not have a special field in the `jsr.json` / `deno.json` to | ||
| specify bin entrypoints. Instead, include the bin entrypoints in the `exports` |
There was a problem hiding this comment.
That might make it difficult to publish existing packages to JSR, unless https://github.com/nodejs/modules/issues/274
There was a problem hiding this comment.
Why do you say so? Your bin entrypoint does not have to be in the root entrypoint.
There was a problem hiding this comment.
I'm not exactly thrilled about having to resort to hacks, or rethink my package.json to match JSR.
There was a problem hiding this comment.
I'd be fine with this if JSR transpiled import.meta.main to something Node can understand.
There was a problem hiding this comment.
it's should be resolved in newest node.js version !
| `bin` field is added to the `package.json` in the generated npm compatible | ||
| tarball. JSR will put all files specified in the `exports` in this field that | ||
| contain a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)#Examples). JSR |
There was a problem hiding this comment.
Docs should specify what shebang should universal code use. I believe it should be a Node shebang, since Deno will ignore it.
|
@wojpawlik @lucacasonato , do you need some help to push it forward ? |
|
Really sad progress here. Sadly then, I need to switch again to npm for my current package. |
@lucacasonato can this be accelerated if somebody contributes tests via a second PR that targets this branch? |
Fixes #157
Still need to add tests.