chore(release): 0.4.0 — publish the no-dash label rule - #11
Merged
Conversation
The rule changed here and never shipped. `lib/index.mjs` has refused a dash in a label since the look-alike squatting decision (`.crypto` against `.cryp-to`, in a namespace one level deep with no dispute process), and the version was never bumped — so npm still serves the dash-permitting regex from before it. The gap is not cosmetic. The registry enforces the no-dash rule, so a client using this package accepts `lazy-loaded` locally and then has it refused by the server it is a client of. The package's whole job is to be that rule. 0.4.0 rather than a patch: refusing input that used to be accepted is breaking for anyone who took the old answer at face value. Verified against the consumer that noticed: moshcode's apps/pwa/test/moshpit-name-drift.test.mjs fails 3 subtests against the published copy and passes all 8 against this one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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 problem
lib/index.mjshas refused a dash in a label since the look-alike squatting decision —.cryptoagainst.cryp-to, in a namespace that is one level deep, first come first served, with no dispute process to appeal into. The version was never bumped, so that fix never shipped. npm still serves the dash-permitting regex from before it:This isn't cosmetic. The registry enforces the no-dash rule, so a client using this package accepts
lazy-loadedlocally and then has it refused by the server it's a client of. Being that rule is the package's entire job.What's in here
Only the version number. No code change —
mainwas already right.0.4.0rather than a patch: refusing input that used to be accepted is breaking for anyone who took the old answer at face value.Verified against the consumer that noticed
moshcode vendors these rules as
apps/pwa/src/lib/moshpit-name.mjsand has a drift test comparing the two. Installed both ways:0.2.x/0.3.0— 3 subtests fail (every hostname parses the same way,labels normalise the same way)Those 3 have been failing in moshcode for a while; this is what fixes them. After publish, moshcode's
apps/pwadevDependency needs moving off^0.2.0(which cannot resolve0.4.0on a 0.x range) — I'll follow up with that.Local suite: 35/35 pass.
🤖 Generated with Claude Code