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

Forward additional flags to package manager add command #111

Open brc-dd opened 1 month ago

brc-dd commented 1 month ago

Currently in monorepo setups, if you do pnpm dlx jsr add @std/cache, it shows some errors like these:

 ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.

If I pass -w, it gives this error instead:

TypeError [ERR_PARSE_ARGS_UNKNOWN_OPTION]: Unknown option '-w'. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- "-w"'

Reproduction: