Workspace option inconsistency?
I don't know if I'm just missing something but my local computer (latest version of deno) and my github action can't seem to agree on if the config option for making a workspace is
workspace
or workspaces
.
when the option is workspaces
:
deno publish
: recognizes the folder as a workspace, attempts to publish all packages
npx jsr publish
: detects workspaces
, but ignores it ("The "workspaces" field was ignored. Use "workspace" instead."), attempts to find name, version and exports
when the option is workspace
:
deno publish
: doesn't even detect workspace
, just goes straight to checking name, version and exports
npx jsr publish
: recognizes the folder as a workspace, attempts to publish all packages5 Replies
i also tested
npx jsr publish
locally and it gave the same results as the github action
I did get it to work by putting both options with the same value but that isn't really a good solution...
it does work on deno canaryI wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like there might be a misunderstanding. Deno itself does not have a built-in concept of "workspaces" like some other tools do (for example, Yarn in the Node.js ecosystem). Therefore, the
deno publish
command should not be recognizing a "workspace" or "workspaces" field because this is not a standard Deno feature.
The inconsistency you're experiencing with npx jsr publish
suggests that you might be using a third-party tool or script that is not part of Deno's standard toolchain. The npx
command is typically associated with Node.js, not Deno, and it seems like you might be mixing up commands from different environments or package managers.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. If you're using a third-party tool or script, you may want to consult the documentation or support resources for that specific tool to resolve the inconsistency you're experiencing.I was playing around with workspaces today, and I also encountered inconsistencies. For example, deno_std repository uses "workspaces", but the JSONSchema file that VSCode uses for deno.json references "workspace". I just use both right now.
The workspace feature will be officially released with Deno 1.45.0 . It was heavily work in progress when we released 1.44.4
okay, I ended up just making the github action use deno for now rather than
npx
, thanks for the info