NewsCrawler.org

No, npm, "estee" is not a typo of "testem"

A developer tried to publish v0.0.1 of "estee", the nickname for Storyteller's command line tool "@storyteller-platform/align", which performs book forced alignment[1], in order to set up Trusted Publishing with the project's GitLab repository. The long namespace[2] exists because "@storyteller/" was already taken on npm. npm rejected the name as too similar to the existing packages "testem" and "espree". From this the author concludes that npm bans any package whose Levenshtein distance[3] to an existing popular package is 2 or less: the distance counts single-character insertions, replacements and deletions, and "estee" reaches "testem" in two edits.

The author argues a fixed threshold cannot work for short names: with 29 allowed characters (a-z plus ".", "-", "_") there are 29⁴, or 707,281, possible four-character names, yet under this rule only an upper bound of 29², or 841, names would remain — 1.2% of the space, by the author's count. The backup name "hoid" was flagged as too similar to ten packages: "hoek", "hono", "uid", "ulid", "cuid", "uuid", "joi", "gopd", "poi" and "zod", none of which look like plausible typos of it. By the same rule, "preact" would have been banned because "react" already existed, and "estree" because "espree" already existed.

Earlier, npm had blocked "@storyteller-platform/audiobook" over the word "audiobook" — apparently because people were publishing copyrighted audiobooks on npm — and support lifted that block after a single email. This time, support said the automated typosquat[4] block cannot be bypassed and pointed to a blog post that actually describes a different rule, about names differing only in punctuation. The author will rename the tool "estie" but regrets that 1-, 2-, 3- and 4-character npm package names are probably no longer possible.

Read the original smoores.devDiscussion

Discussion

Commenters largely sympathize: one describes the same rejection of a five-letter name and argues the rule encourages name squatting, since a name can only be proven publishable by actually publishing. One commenter corrects the arithmetic, noting that 841 out of 707,281 is about 0.12%, not 1.2%. Others joke, and one argues "estie" is the better name anyway.

Sources

Published: First seen: Читать по-русски

Open as a page