Skip to content

docs: clarify that catalogs are npm-only#3369

Merged
bartlomieju merged 2 commits into
mainfrom
catalog-npm-only-docs
Jun 29, 2026
Merged

docs: clarify that catalogs are npm-only#3369
bartlomieju merged 2 commits into
mainfrom
catalog-npm-only-docs

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

The catalog/catalogs workspace feature only manages npm dependencies, but
the docs never said so explicitly. A catalog entry is a bare package name mapped
to a version requirement, and a catalog: reference always resolves to an
npm: specifier, so there is no way to point a catalog entry at a jsr:
package. Because catalog entries are treated as npm packages, deno update and
deno outdated resolve them against the npm registry.

This came up in denoland/deno#35075, where a user put jsr: packages in a root
catalog and then saw confusing "npm registry, not found" warnings from
deno update. The behavior is working as intended (catalog has been npm-only
since it landed in Deno 2.8); it just was not documented.

Changes:

  • Add an info admonition and a restriction bullet stating catalogs are npm-only
    and that jsr: dependencies should be managed through imports instead.
  • Note that a catalog: reference can now also appear in a member's deno.json
    imports, not just package.json dependencies (added in Deno 2.9), which the
    previous wording ("only read from package.json files") no longer reflected.

The `catalog`/`catalogs` workspace feature only manages npm dependencies: a
catalog entry is a bare name mapped to a version requirement, and a `catalog:`
reference always resolves to an `npm:` specifier. There is no way to put a
`jsr:` package in a catalog, and `deno update`/`deno outdated` resolve catalog
entries against the npm registry. This was implied but never stated, and users
hit confusing "npm registry not found" warnings after putting `jsr:` packages
in a catalog.

Also note that a `catalog:` reference can now appear in a member's `deno.json`
`imports`, not just `package.json` dependencies (added in Deno 2.9).
@bartlomieju
bartlomieju merged commit 58575a1 into main Jun 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant