I tried bunx jsr add .... The first time will be successful, but after that it will fail.
Reproduction procedure:
bun init
bunx jsr add @std/path
bunx jsr add @std/assert
Log for last command (bunx jsr add @std/assert):
Setting up bunfig.toml...ok
Installing @std/assert...
$ bun add @std/assert@npm:@jsr/std__assert
4 | "@jsr" = "https://npm.jsr.io/"
^
error: Cannot redefine key
at /home/nakasyou1103/jsr-hello/bunfig.toml:4:31
SyntaxError: An error occurred while parsing code
I think reason is that it doesn't check if it've already written it when it writes [install.scopes] with jsr add.
I think you need a toml parser to fix it perfectly.
I tried
bunx jsr add ...
. The first time will be successful, but after that it will fail.Reproduction procedure:
Log for last command (
bunx jsr add @std/assert
):I think reason is that it doesn't check if it've already written it when it writes
[install.scopes]
withjsr add
. I think you need a toml parser to fix it perfectly.Reference code: https://github.com/jsr-io/jsr-npm/blob/main/src/commands.ts