refactor(ranview): rename ranvi to ranview — npm rejects the shorter name - #409
Merged
Merged
Conversation
…name
403 Forbidden — Package name too similar to existing package vanli
npm's similarity check, not a name collision: `ranvi` itself is unregistered.
The heuristic compares normalised names, and five characters against `vanli`
is inside its threshold. `ranview` is seven and much further away, and it
keeps the unscoped family the other three packages use — `@chaxus/ranvi`
would have published on the first try but left one package addressed
differently from ranui, ranuts and ranpress.
Mechanical across 25 files: the package directory, its manifest and README,
ranui's dependency and re-export shim, the three deep imports, the error
strings that name the package they come from, the cross-package doc links,
and `packages/manifest.json`.
One thing worth recording. `packages/im` failed with
Cannot find package 'ranvi' imported from packages/ranui/dist/ssr-*.js
which is not a source problem — `dist` is gitignored and that bundle was built
before the rename. It is a useful reminder that the ES build externalises this
dependency *by name*, so renaming it requires rebuilding ranui; the IIFE
bundles, which inline it, would not have noticed.
Verified after rebuilding: 3,145 tests, tsc across 8 packages, design rules
across 3, prettier, and the dead-link check. `npm pack --dry-run` produces a
71.7 kB tarball, 34 files, declaration files and sourcemaps included.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019pjSL6jGCw2wmBLhCAW35d
Deploying ran with
|
| Latest commit: |
7f222ad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://adb6f7f3.ran-4ty.pages.dev |
| Branch Preview URL: | https://refactor-rename-ranvi-to-ran.ran-4ty.pages.dev |
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.
This is npm's similarity heuristic, not a name collision —
ranviitself is unregistered. The check compares normalised names, and five characters againstvanlifalls inside its threshold.ranviewis seven characters and much further away, and it keeps the unscoped family the other three packages use.@chaxus/ranviwould have published on the first attempt — scoped names bypass the check entirely — but it would leave one package addressed differently fromranui,ranutsandranpress.Scope
Mechanical, 25 files: the package directory, its manifest and README, ranui's dependency and re-export shim, the three deep imports, the error strings that name the package they come from, the cross-package doc links, and
packages/manifest.json.One thing worth recording
packages/imfailed with:Not a source problem —
distis gitignored and that bundle was built before the rename. But it is a useful reminder that the ES build externalises this dependency by name, so renaming it requires rebuilding ranui. The IIFE bundles, which inline it, would not have noticed — the two build shapes fail differently, and only one of them tells you.Verification
After rebuilding: 3,145 tests,
tscacross 8 packages,verify:designacross 3, prettier, and the dead-link check.npm pack --dry-run: 71.7 kB tarball, 268.2 kB unpacked, 34 files — declaration files and sourcemaps included.🤖 Generated with Claude Code
https://claude.ai/code/session_019pjSL6jGCw2wmBLhCAW35d