Skip to content

Introduce an option to not use any cache #986

Closed
@victornoel

Description

@victornoel

Do you want to request a feature or report a bug?
feature

What is the current behavior?
When calling yarn, packages are first downloaded to the global cache before being put in node_modules

What is the expected behavior?
With an option, e.g., --no-cache, calling yarn --no-cache will skip the use of a global cache and directly work at the node_modules level.

Why?
In a CI runner, where only the package used by the project being tested/integrated are of interest, it would make sense to simply populate the node_modules directory instead of the yarn global cache and then copy the dependencies to node_modules.
Coupled with CI caching, one would just need to cache the node_modules directory and call yarn --no-cache --pure-lockfile to get the correct node_modules in a minimum of time.
Currently, the only solution is either to cache the global yarn cache and rebuild node_modules on every build, or to cache both but then we cache twice every dependency!

Please mention your node.js, yarn and operating system version.
yarn v0.15.1, node v6.7.0 and linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions