这是indexloc提供的服务,不要输入任何密码
Skip to content

Don't bust cache on new workspace packages #1304

@TxHawks

Description

@TxHawks

Describe the feature you'd like to request

With pnpm (and possibly other package managers too), every time a new workspace package is added, the lock file changes and the cache is busted for all tasks on all packages.

Many design systems manage every component as an individual package, both for versioning and for a better, more granular cache. In such repositories, adding a workspace package is a very common event, that needlessly makes the cache a lot less useful and defeats the purpose of a granular cache.

This is also not needed for correctness, since the cache of relevant tasks in dependent packages will be busted automatically either through changes/additions to package.json or the dependsOn field in turbo.json.

Describe the solution you'd like

If the only changes detected in the lock file are related to workspace packages, the cache should not be invalidated.

Describe alternatives you've considered

I can't think of any alternative other than keeping things as they currently are with a very inefficient cache in such scenarios

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