Skip to content

New check idea: DUPLICATE_PACKAGE_NAME #235

@kachkaev

Description

@kachkaev

I was creating a new package in a monorepo by copying an existing one. I forgot to change the name and ended up with two workspaces having identical names. pnpm install did not complain, manypkg did not either. It’d be great to see an error (DUPLICATE_PACKAGE_NAME?) in this case.

Here is an MWE for @manypkg/[email protected]:
https://github.com/kachkaev/manypkg-issue-235

packages/a/package.json → "name": "a"
packages/b/package.json → "name": "b"
packages/c/package.json → "name": "a" ❗ should be "c"
pnpm manypkg check

## Recieved
☔️ success workspaces valid!

## Expected
☔️ error Workspaces at "packages/a" and "package/c" have the same name "a"

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