build: take @quantus/crypto from the Gitea registry, not a symlink

Replaces the `link:../wasm/packages/quantus-crypto/build` resolution with an
npmScopes entry routing @quantus to https://git.lair.cafe/api/packages/quantus/npm/.

Routing the whole scope is safe here because we own every name in it. The forked
@polkadot packages cannot be handled the same way — most of that scope is
unforked and lives on npm — which is why downstream repos pin those to tarball
URLs instead.

The symlink approach had run out of road. node resolves a portal or link to its
realpath, so a consumer's transitive dependencies then resolve inside the *linked
package's* tree, where workspace entries point at source directories with no
exports map. That cost one workaround here and four in quantus/ui.

Reads from the registry are anonymous; publishing uses
`pass gitea/package-publisher-token`. Note that a version cannot be overwritten
in place — npm refuses — so republishing is delete-then-publish, which that token
can also do.

Refs quantus/extension#2

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
This commit is contained in:
rob thijssen
2026-09-15 11:08:27 +03:00
parent 74e1e0cc6a
commit b39241c840
3 changed files with 24 additions and 5 deletions

View File

@@ -13,3 +13,12 @@ logFilters:
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.9.1.cjs
# @quantus packages come from the Gitea registry. Safe as a whole-scope route
# because we own every name in it — unlike @polkadot, where routing the scope
# would send yarn looking for dozens of unforked packages that are not there.
#
# Reads are anonymous; publishing needs `pass gitea/package-publisher-token`.
npmScopes:
quantus:
npmRegistryServer: "https://git.lair.cafe/api/packages/quantus/npm/"

View File

@@ -41,7 +41,6 @@
"@types/node": "^22.7.5"
},
"resolutions": {
"@quantus/crypto": "link:../wasm/packages/quantus-crypto/build",
"typescript": "^5.5.4"
}
}

View File

@@ -1839,11 +1839,15 @@ __metadata:
languageName: unknown
linkType: soft
"@quantus/crypto@link:../wasm/packages/quantus-crypto/build::locator=root-workspace-0b6124%40workspace%3A.":
version: 0.0.0-use.local
resolution: "@quantus/crypto@link:../wasm/packages/quantus-crypto/build::locator=root-workspace-0b6124%40workspace%3A."
"@quantus/crypto@npm:^0.1.0":
version: 0.1.0
resolution: "@quantus/crypto@npm:0.1.0::__archiveUrl=https%3A%2F%2Fgit.lair.cafe%2Fapi%2Fpackages%2Fquantus%2Fnpm%2F%2540quantus%252Fcrypto%2F-%2F0.1.0%2Fcrypto-0.1.0.tgz"
dependencies:
fflate: "npm:^0.8.2"
tslib: "npm:^2.7.0"
checksum: 10/c6e531e0350d74d863cfa8acfbed0eeacaa2814c2f2628976b73b59a2ff4b6a382dd0d734e34c1c2442ba7e575f0ae12dd153b44fdbfec51b61f212c1ef41fbd
languageName: node
linkType: soft
linkType: hard
"@react-native-community/cli-clean@npm:12.3.0":
version: 12.3.0
@@ -6060,6 +6064,13 @@ __metadata:
languageName: node
linkType: hard
"fflate@npm:^0.8.2":
version: 0.8.3
resolution: "fflate@npm:0.8.3"
checksum: 10/6ebf528dc9c56e78e715eac615b009b25dc33e15c1920b11ebba44e6d76181c647756a81a23e19247907496b93aa99928514c53090579a65109e026ac2824aa7
languageName: node
linkType: hard
"figures@npm:^3.0.0":
version: 3.2.0
resolution: "figures@npm:3.2.0"