Comments (4)
There are other causes of heavy weight : rxjs. Imho, concurrently would benefit a great performance improvement if it just distribute a tree shaken optimized with no npm dependency cli bundle.
I don't see a major interest in distributing the library, but if you need to, it could be done in another package "core" which can hold the references to the heavy dependencies.
from concurrently.
I've researched for alternative libraries, but I haven't found any perfect replacements.
- Luxon is DateFormat compatible, but doesn't include Typescript types (installed from @types). Is a pretty large library, but installs quickly in my tests. Requires to wrap the Date object in their own type.
- date-format is small, is DateFormat compatible, but they have no Typescript support (would require a manual d.ts declarations file). Easy to use.
- date-and-time is small, supports Typescript, but is not DateFormat compatible (they use
YYYY
overyyyy
for example). Easy to use - Days.js is very small, support Typescript, and is DateFormat compatible. But they formatting function requires some plugin use, and I don't know how you'd get the library to work in both Node and Browser mode, since it requires different plugin loading behaviors.
I could probably fix up a PR for switching to another formatting library that is smaller, if it would be interesting. But I'd like some input on what concessions would be acceptable (if any).
from concurrently.
Interesting find. TIL about --timing
flag.
I see this problem (or similar?) has actually been reported to date-fns before:
date-fns/date-fns#3067
date-fns/date-fns#2479
...but no satisfying solution yet (I think?).
My preference among the options you listed would be date-format
, given it's rather popular, small in size and API surface (therefore easy to type ourselves). There might be more things to consider before committing to it though (bugs/security/maintenance quality).
@paescuj do you have opinions?
from concurrently.
Alternative (and a bit hacky) but could open to removing the dependency all together is abusing Intl.DateTimeFormat:
const date = new Date("2024-01-02T00:04:05.006Z");
console.log(
new Intl.DateTimeFormat('bo', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
minute: '2-digit',
hour: '2-digit',
second: '2-digit',
fractionalSecondDigits: 3,
timeZone: 'UTC',
hourCycle: "h23"
}).format(date),
);
// Expected output: "2024-01-02 00:04:05.006"
Works on node 14.20 and above (tested using runkit).
The main cons with this option is it's:
- A breaking change to
--timestamp-format
- Intl.DateTimeFormat is very limiting compared to date-fns (so you'll get some heat)
- Not really a good way to enable/disable Intl.DateTimeFormat options via the command line if someone wanted to customize the date
Low probability this idea would be taken seriously but in case someone else stumbles on this issue wondering if Intl.DateTimeFormat can be swapped in, here ya go!
from concurrently.
Related Issues (20)
- CLI options not clear in README HOT 1
- Installing package from npm cnpm yarn takes a long time HOT 2
- Logs of the commands running are not readable HOT 2
- Cancel a series of tasks with SIGINT HOT 5
- Feature Suggestion with wildcards HOT 1
- Error TS2349 using concurrently in full ESM module HOT 1
- Programmatically restarting Command using `kill/start` API produce wrong termination HOT 5
- Allow commands IPC HOT 4
- Feature request: Add or document API option to disable color output
- Prefix ([0] [1]) randomly missing HOT 1
- How to distinguish which process the output stream line comes from HOT 1
- No commands recognized when using via API HOT 1
- concurrently exitcode=0 when it receives SIGINT itself (e.g. on ^C) HOT 2
- Please change the name of the project HOT 1
- Teardown command? HOT 2
- ERR_UNHANDLED_REJECTION with `killOthers` HOT 2
- Shortcut for `node --run <script name>`
- Parallel-serial-parallel flow orchestration? HOT 1
- Deprecation warning with Node 22 HOT 1
- API (concurrently) not printing to stdout unless raw=true HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concurrently.