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

API (concurrently) not printing to stdout unless raw=true #478

Closed
rr326 opened this issue May 23, 2024 · 7 comments · Fixed by #456
Closed

API (concurrently) not printing to stdout unless raw=true #478

rr326 opened this issue May 23, 2024 · 7 comments · Fixed by #456

Comments

@rr326
Copy link

rr326 commented May 23, 2024

Using the concurrently() API, it is not printing to stdout, unless raw:true.

test.js

import { concurrently } from "concurrently"

const build = {
    command: "ls -al",
    name: "TSC",
},
servDev = {
    command: "ls -al ",  
    name: "SERVER",
},
cmds =  [build, servDev]


const {result} = concurrently(cmds, {raw:false})

node test.js
No output.

Set raw:true ==> expected output

# macos

node --version
v21.7.2

npx concurrently -v
8.2.2
@gustavohenke
Copy link
Member

I think you might've hit the same issue as #399.

- import { concurrently } from "concurrently"
+ import concurrently from "concurrently"

should fix it.

@rr326
Copy link
Author

rr326 commented May 26, 2024

@gustavohenke Thank you! That makes sense.

@rr326 rr326 closed this as completed May 26, 2024
@CodeSmith32
Copy link

CodeSmith32 commented Jun 9, 2024

@rr326,
Just fyi, this is really confusing, esp. since VSCode / TypeScript likes to import the named version automatically by default.

I'm so glad I stumbled across this closed issue; otherwise I would've given up.

Is this really not something that could be fixed or at least clarified? Is there ever even a reason to import the named version / does any project actually rely on it?

@rr326
Copy link
Author

rr326 commented Jun 9, 2024

@gustavohenke Is there a way to throw a warning (console.log) if it is imported and used improperly? Or even just if it is imported this way? That might strike the right balance between not breaking anything, and preventing people from making this very hard to spot mistake.

As someone who uses tons of open source projects of which I just skim the docs, I really value when they print a warning saying, "Hmmm... are you really intending to use this in this really dumb way?"

@gustavohenke
Copy link
Member

Hey folks, your concerns should be fixed on the main branch by #456, it's just that there are a few other major/breaking changes coming along too.

@gustavohenke gustavohenke linked a pull request Jun 14, 2024 that will close this issue
@rr326
Copy link
Author

rr326 commented Jun 14, 2024

@gustavohenke That's awesome. Thank you Gustavo.

@gustavohenke
Copy link
Member

Hey! This is now done in v9.0.0.
https://github.com/open-cli-tools/concurrently/releases/tag/v9.0.0

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

Successfully merging a pull request may close this issue.

3 participants