Skip to content

Publish as @redrob-labs/sdk, the scope the organisation actually owns - #56

Merged
its-janghoon merged 1 commit into
developfrom
feature/publish-under-redrob-labs-scope
Sep 22, 2026
Merged

its-janghoon merged 1 commit into
developfrom
feature/publish-under-redrob-labs-scope

Conversation

@its-janghoon

Copy link
Copy Markdown
Contributor

The publish authenticated and reached Publishing to https://registry.npmjs.org/, then:

npm error 404 Not Found - PUT https://registry.npmjs.org/@redrob-code%2fsdk - Scope not found

@redrob-code is not an npm organisation. @redrob-labs is — confirmed, registry.npmjs.org/-/org/redrob-labs/user returns 200 where redrob-code returns 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 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 is 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, and bun install then failed:

error: Workspace dependency "@redrob-code/sdk" not found

The root package.json, the separate github/ workspace and both lockfiles sit outside it. The rename is now driven off git ls-files, so it covers every tracked file whatever its extension and touches nothing ignored.

Verified end to end

bun install       relinks: + @redrob-labs/sdk@workspace:packages/sdk/js
typecheck         0 errors across the monorepo
packages/core     974 pass / 0 fail
packages/redrob   3380 pass / 0 fail
httpapi gate      pass=210 fail=0 skip=0 missing=0
dry run           would publish @redrob-labs/sdk@0.4.1 → redrob-labs-sdk-0.4.1.tgz
                  package.json restored to 0.0.0

…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`.
@its-janghoon
its-janghoon merged commit 0854fa7 into develop Sep 22, 2026
15 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