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

Log file creation fails for npm scripts names containing : & Turbo panics with # #660

@b12k

Description

@b12k

What version of Turborepo are you using?

1.1.2

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Windows

Describe the Bug

./package.json

{
  "scripts": {
    "build:docker": "turbo run build:docker --parallel"
  }
}

./turbo.json

{
  "pipeline": {
    "build:docker": {
      "outputs": []
    }
  }
}

./apps/my-app/api/package.json

{
  "scripts": {
    "build:docker": "cd ../../../ && docker build . -f infrastructure/docker/Dockerfile -t my-app-api:latest"
  }
}

folder structure

monorepo/
  package.json
  infrastructure/
    docker/
      Dockerfile
  apps/
    my-app/
      api/
        package.json

When re-running yarn build:docker getting cache miss.

Renaming npm scripts from build:docker to build-docker solved an issue.

изображение

Thread in Discussions

Expected Behavior

Turbo should support any npm script naming convention.

Consider replacing "non friendly" characters in npm script name with a defined placeholder char:
(underscore or dual-underscore for example)

  • build:docker => build__docker
  • build#docker => build__docker

Or use npm script name hash for log files name.

BTW # in script name makes Turbo panic

Terminal screenshot

изображение

To Reproduce

  • Name your package.json scripts using : or # characters.
  • Expect
    • for :: miss formed log file
    • for #: panic

Metadata

Metadata

Assignees

Labels

kind: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions