Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EvanCarroll opened this issue Jul 2, 2022 · 1 comment

Comments

@EvanCarroll
Copy link

EvanCarroll commented Jul 2, 2022

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.
@EvanCarroll EvanCarroll changed the title [RRFC] Parallel script execution [RRFC] Parallel script execution when value is set to an array of text. Jul 2, 2022
@darcyclarke darcyclarke added the Agenda will be discussed at the Open RFC call label Aug 3, 2022
@darcyclarke darcyclarke removed the Agenda will be discussed at the Open RFC call label Aug 10, 2022
@ljharb
Copy link
Contributor

ljharb commented Oct 3, 2022

seems related to #190

kurone-kito added a commit to kurone-kito/lints-config that referenced this issue Nov 12, 2023
Q: Why not migrate to npm v10?
A: In the past, during the npm v7 days, I experienced various problems in
hoisting up. I tried this during the Yarn v4 transition, but I still have
this on hold due to difficulties with parallel execution of npm-scripts in
the workspace.

see: npm/rfcs#610
kurone-kito added a commit to kurone-kito/lints-config that referenced this issue Nov 12, 2023
Q: Why not migrate to npm v10?
A: In the past, during the npm v7 days, I experienced various problems in
hoisting up. I tried this during the Yarn v4 transition, but I still have
this on hold due to difficulties with parallel execution of npm-scripts in
the workspace.

see: npm/rfcs#610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants