Skip to content

Explicitly define devDependencies in workspace packages #3243

@trivikr

Description

@trivikr

Is your feature request related to a problem? Please describe.

If you want to share scripts across monorepo, yarn modern requires repos to define global scripts. This issue was noticed while trying to bump yarn from classic to modern in #3235

For our specific use case, where clients are codegen, and non-clients are manually written, it's easier to define devDeps in individual packages and enforce the version numbers using yarn constraints.

Also, the devDependencies should be defined in workspace for package.json to be "complete", i.e. it's easy to move workspace to different repo.

Describe the solution you'd like

Explicitly define devDep with same version as that in global.
The global devDep can be removed, and yarn constraints can be added in future.

Describe alternatives you've considered

Defining shared scripts in package.json, and calling them from workspaces. This will require us to read and modify scripts written by generic clients.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-for-stalenessfeature-requestNew feature or enhancement. May require GitHub community feedback.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions