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

Feature request: Allow inputs outside of package dir #1064

@TxHawks

Description

@TxHawks

Describe the feature you'd like to request

I'd like to be able to bust the cache of specific tasks based on changes files (as described in #706). For instance, I'd like to be have an .eslintrc.js at the root of the repository which packages can extend, and that changes to that file will bust the cache of the lint task in all packages.

Currently, there are two options for a repository-wide config to bust the cache:

  1. Extract it a workspace package and add that package as a dev dependency;
  2. Include the file in the globalDependencies array.

Both these options are lacking, because they do not allow for granularity busting the cache per package, and will always bust the cache for all tasks.

Describe the solution you'd like

To be able to specify files outside the package directory in the inputs array:

{
  "pipeline": {
    "lint: {
      "outputs": [],
      "inputs": [
        "src/**",
        ".eslintrc.js",
        // Asuming `../../` is the repository root
        "../../.eslintrc.js"
      ]
  }
}

Describe alternatives you've considered

I guess this could also be it's out field separate from inputs, maybe like a per-task globalDependencies.

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