Skip to content

Detect yarn classic/berry #162

@Andarist

Description

@Andarist

It could be useful if packages like preferred-pm could distinguish between those 2 as the difference between them is quite massive.

It seems that there is quite an easy way to do that. The only thing that needs to be checked is the __metadata: field in the lock file. Berry is checking it like this:
https://github.com/yarnpkg/berry/blob/83311e1d4dec7fb6c0ead21f37efa9b687be58b9/packages/yarnpkg-core/sources/scriptUtils.ts#L86-L95

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions