Skip to content

User account works in org page #2057

@bluwy

Description

@bluwy

Describe the bug

If my npm username is bluwy, currently npmx supports https://npmx.dev/org/bluwy, which is a bit confusing as I'm not an org. https://npmx.dev/~bluwy works of course, but it's missing some packages I maintain like publint and vitefu.

With npmjs, if you navigate to https://www.npmjs.com/org/bluwy, it'll redirect you to https://www.npmjs.com/~bluwy. The packages shown is the same as https://npmx.dev/org/bluwy.

So from what I can tell, the data at https://npmx.dev/org/bluwy is correct and should also be shown at https://npmx.dev/~bluwy, in which case, maybe https://npmx.dev/org/bluwy should not be supported? (redirect to /~bluwy like npmjs)

Additional context

Related, https://npmx.dev/search?q=bluwy is suggesting me as an org rather than a user, which seems intentional:

const newSuggestions: SearchSuggestion[] = []
if (isOrg) {
newSuggestions.push({ type: 'org', name: lowerName, exists: true })
}
if (isUser && !isOrg) {
newSuggestions.push({ type: 'user', name: lowerName, exists: true })
}
suggestions.value = newSuggestions

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions