DenoDDeno
Powered by
Hong MinheeH
Deno•3mo ago•
1 reply
Hong Minhee

How to prevent specific workspace members from being published to JSR?

📰JSR✅Solved
Hi everyone!

I'm currently working on a Deno monorepo using the workspaces feature. I have a question regarding publishing to JSR.

In my monorepo, I have several packages. Some of them are meant to be internal-only and should never be published to JSR. However, other packages in the workspace are public and need to be published.

Here's the catch:

1. I cannot simply remove the
name
name
field from the internal packages' deno.json because I need them to be referencable by other packages for testing and development within the workspace.
2. In the npm ecosystem, I would use
"private": true
"private": true
in package.json to prevent accidental publishing.

Is there an equivalent field or a recommended way in Deno/JSR to mark a workspace member as “private” so that
deno publish
deno publish
(especially when run from the root) ignores it?

If such a feature doesn't exist yet, what is the best practice to manage this? Should I manually manage the publish command for each package in CI, or is there a way to exclude specific members in the root deno.json?

Thanks in advance!
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

`deno install` installs workspace members' npm dependencies, but not jsr dependencies?
hosiHhosi / help
17mo ago
How to import relative JSR module from import map
cdaringeCcdaringe / help
16mo ago
Importing from Deno Workspace to NPM workspace
Amin NAIRIAAmin NAIRI / help
16mo ago
Copying from a repository from jsr
ashAash / help
17mo ago