deno icon indicating copy to clipboard operation
deno copied to clipboard

`workspace:` specifier not supported for `package.json` dependency

Open jonasb opened this issue 1 year ago • 7 comments

I'm using Deno in a monorepo where I use pnpm as the package manager (through rush).

To refer to other packages in the same monorepo, I use the version specifier "workspace:*", which is not supported by Deno's package.json functionality.

My package.json file looks like this:

{
  "devDependencies": {
    "@dossierhq/core": "workspace:*"
  }
}

I get this warning when deno task test:

Warning Ignoring dependency '@dossierhq/core' in package.json because its version requirement failed to parse: Not implemented scheme: @dossierhq/core

It would be great if Deno could support "workspace:*" in package.json so I don't need to use import maps to support monorepo setups.

jonasb avatar Mar 14 '23 15:03 jonasb

Oh, that error message is wrong. I opened https://github.com/denoland/deno/pull/18209

dsherret avatar Mar 15 '23 16:03 dsherret

We also need this for running tests in a pnpm monorepo (https://github.com/triggerdotdev/trigger.dev)

ericallam avatar Dec 05 '23 11:12 ericallam

I want to have this feature. I'm a library maintainer. I want to support both deno, node and bun. So I need to run build and node --test ./node/*.test.ts & deno test ./deno/*.test.ts & bun test ./bun/*.test.ts in one time

himself65 avatar Apr 09 '24 22:04 himself65

Our use case is a little bit different, but also monorepo-related:

We have internal automation tools written in TypeScript, and we'd like it to skip the compilation step and run them directly with Deno instead of Node. That would help us a lot to simplify our internal automations.

castarco avatar Apr 16 '24 07:04 castarco

Im running all my code this way and ts-node is a disaster plz halp 🥺

ssadler avatar Apr 23 '24 02:04 ssadler

Hit the "Not implemented scheme 'workspace'" as well, using pnpm for workspaces but wanted to run one of the packages (a simple REST server) with deno

birkskyum avatar May 07 '24 00:05 birkskyum

Support for npm workspace is something @dsherret is gonna look into in a few weeks, once we finalize Deno workspace support (to avoid code conflicts).

bartlomieju avatar May 07 '24 01:05 bartlomieju