jsr-io / jsr-npm

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

In `jsr publish`, only apply compat fixes (`--unstable-sloppy-imports`, etc) when project has `package.json` #58

Closed lucacasonato closed 4 months ago

lucacasonato commented 4 months ago

Right now the default behaviour of jsr publish and deno publish in projects without package.json is different. For these (deno) projects, the behaviour should be identical.

We should not enable any of these options unless a package.json is found in the repository: https://github.com/jsr-io/jsr-npm/blob/25124b8cc59202dabe6c41a8541b0bc03b25bca2/src/commands.ts#L159-L162

Because of this discrepancy, users have run into issues: https://discord.com/channels/684898665143206084/1216305070258524181