Publish as @redrob-labs/sdk, the scope the organisation actually owns - #56
Merged
Merged
Conversation
…ctually owns The first real publish authenticated, reached "Publishing to registry.npmjs.org" and failed with `404 Not Found - PUT ... @redrob-code%2fsdk - Scope not found`. `@redrob-code` is not an npm organisation; `@redrob-labs` is, and it is the one this repository belongs to. An npm package's name IS its registry identity, so there is no way to publish under a scope while calling it something else -- the name has to change, and a workspace link resolves by name, so every importer changes with it. Only this package is constrained. The eighteen sibling workspace packages keep `@redrob-code/*`: they are private and never face the registry, so their scope is unconstrained and renaming them would be churn for no gain. `@redrob-code/sdk-next` in particular is a DIFFERENT package and deliberately untouched, which is why the replacement carries a negative lookahead rather than matching a prefix. Scoped to `git ls-files` rather than a directory. A first pass covered `packages/` only and `bun install` then failed with `Workspace dependency "@redrob-code/sdk" not found`, because the root `package.json`, the separate `github/` workspace and both lockfiles sit outside it. Verified end to end: install relinks the workspace, the monorepo typechecks at 0, core is 974/974, redrob is 3380/3380, the HttpApi exerciser is 210/210, and a dry run packs `redrob-labs-sdk-0.4.1.tgz` and restores `package.json` to `0.0.0`.
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.
The publish authenticated and reached
Publishing to https://registry.npmjs.org/, then:@redrob-codeis not an npm organisation.@redrob-labsis — confirmed,registry.npmjs.org/-/org/redrob-labs/userreturns 200 whereredrob-codereturns 404.An npm package's name is its registry identity, so there is no publishing under one scope while calling it another. The name changes, and because a workspace link resolves by name, every importer changes with it: 121 files.
Only this package is constrained
The eighteen sibling workspace packages keep
@redrob-code/*. They areprivateand never face the registry, so their scope is unconstrained and renaming them would be churn for no gain.@redrob-code/sdk-nextis a different package and deliberately untouched — which is why the replacement carries a negative lookahead rather than matching a prefix.A first pass was too narrow
It covered
packages/only, andbun installthen failed:The root
package.json, the separategithub/workspace and both lockfiles sit outside it. The rename is now driven offgit ls-files, so it covers every tracked file whatever its extension and touches nothing ignored.Verified end to end