Conversation
KSXGitHub
commented
Apr 1, 2025
zkochan
reviewed
Apr 1, 2025
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
zkochan
reviewed
Apr 4, 2025
1 task
This comment was marked as resolved.
This comment was marked as resolved.
btea
reviewed
Apr 5, 2025
This comment was marked as resolved.
This comment was marked as resolved.
zkochan
approved these changes
Apr 20, 2025
Member
|
🚢 10.9 |
Member
|
I'm not sure if this is a problem with the parsing result. When I execute |
Contributor
Author
|
@btea The JSR npm compatibility layer seems to generate its own package.json{
"name": "@jsr/sxzz__tsdown",
"version": "0.9.1",
"homepage": "https://jsr.io/@sxzz/tsdown",
"type": "module",
"dependencies": {
"ansis": "^3.17.0",
"chokidar": "^4.0.3",
"consola": "^3.4.2",
"debug": "^4.4.0",
"find-up-simple": "^1.0.1",
"pkg-types": "^2.1.0",
"publint": "^0.3.12",
"rolldown": "^1.0.0-beta.7",
"rolldown-plugin-dts": "^0.8.0",
"tinyexec": "^1.0.1",
"tinyglobby": "^0.2.12",
"unconfig": "^7.3.1",
"unplugin-unused": "^0.4.4",
"vite": "^6.3.2"
},
"exports": {
".": {
"types": "./_dist/src/index.d.ts",
"default": "./src/index.js"
}
},
"_jsr_revision": 11
}The links to the tarballs is in https://npm.jsr.io/@jsr/sxzz__tsdown |
Contributor
Author
|
@btea |
Member
|
Looks a bit weird, I haven't used jsr before, so is this normal? |
Contributor
Author
We can't do anything about it because we don't control the jsr registry. |
Member
|
Got it. |
zkochan
added a commit
that referenced
this pull request
Apr 29, 2026
This is consistent with #9358, but implements support for the GitHub Packages npm registry and, more broadly, for vlt-style https://docs.vlt.sh/cli/registries for any registry. This PR adds a built-in gh: specifier that resolves against the GitHub Packages npm registry, plus a namedRegistries config key so a project can map its own aliases to arbitrary registries. A project can mix public npm packages and private GitHub Packages (or self-hosted) ones without applying a scope-wide registry override to every @scope/* package. - pnpm add gh:@acme/private writes "@acme/private": "gh:^1.0.0" and resolves from https://npm.pkg.github.com/. - pnpm add gh:@acme/private@^1.0.0 (with or without an alias) is also supported. Aliased form writes "my-alias": "gh:@acme/private@^1.0.0". - Auth comes from the existing per-URL .npmrc mechanism, e.g. //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}. No new auth surface. - @github is intentionally not defaulted to https://npm.pkg.github.com/ - hardcoding that would hijack installs of the public @github/* packages on npmjs.org (e.g. @github/relative-time-element) for users without a scope-wide override. Use gh: to install from GitHub Packages, or configure @github:registry=... yourself if that's really what you want. - Additional named registries (a self-hosted proxy, GitHub Enterprise Server, etc.) can be configured in pnpm-workspace.yaml: ```yml namedRegistries: gh: https://npm.pkg.github.example.com/ # optional: overrides the built-in `gh` alias for GHES work: https://npm.work.example.com/ ``` - Then work:@corp/lib@^2.0.0 resolves against https://npm.work.example.com/, and the built-in gh alias can be redirected to a GHES host. - Env-var substitution (${VAR}) is supported in namedRegistries values, mirroring the .npmrc convention. - Reserved alias names (npm, jsr, github, workspace, catalog, file, git, http, https, link, patch, and related git host shorthands) cannot be redefined as user-named registries - the resolver throws ERR_PNPM_RESERVED_NAMED_REGISTRY_ALIAS at startup rather than silently shadowing another protocol. Malformed URLs throw ERR_PNPM_INVALID_NAMED_REGISTRY_URL at startup too, instead of failing as a confusing 404 during resolution. - On publish, createExportableManifest strips any named-registry prefix (both the built-in gh: and any user-configured alias) so npm and yarn consumers can still resolve the dependency via their own scope-registry configuration - mirroring the user-facing requirement when installing such a dep without the prefix. The prefix is gh: rather than github: because github: is reserved by npm-package-arg / hosted-git-info as a git host shorthand (e.g. github:owner/repo) - reusing it would be a deviation from the specs used by the npm CLI. gh: is shorter, matches vlt's convention, and cannot collide with any existing npm scheme. Unlike jsr:, gh: (and any other named-registry alias) does not rewrite the package name - gh:@acme/foo resolves @acme/foo from the GitHub Packages registry as-is. This also means npm/yarn consumers see the original name after the prefix is stripped on publish. --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Resolves #8941