Skip to content

[RRFC] Parallel script execution when value is set to an array of text. #610

@EvanCarroll

Description

@EvanCarroll

Currently a script can not be set to array. Add this to your package.json,

  "scripts": {
    "foo": [
      "echo bar",
      "echo baz"
    ]
  },

Now if you try to run it,

npm run-script foo

You'll get

npm ERR! Missing script: "foo"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ecarroll/.npm/_logs/2022-07-02T19_32_38_351Z-debug-0.log

The obvious intent here is to run two scripts where neither one is concerned with the status of another. This RFC would define the behavior of script with a member set to an array to,

  1. Run both scripts without regard for return codes of other scripts defined,
  2. Run both scripts in parallel.

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