-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Plan for v8 #589
Comments
Is this the place to discuss these plans? If so: personally I am glad that It also isn't clear whether the above addresses #636. What I (and I think others) would like is a decoupling of:
|
My idea about new verbose mode for $:
I also was planning to drop fs-extra by default. |
IMHO the default behaviour should be similar to a Bash script:
If you make stdout not printed by default it will be confusing in a case like:
which well then of course behave differently from
What's the rationale? |
JS equivalent of echo is console.log. The problem with outputting $ by default is what we cannot distinguishes how it used: await $`some-command` versus const output = await $`some-command` So the idea is to not output anything(defaul behavior), allow to override with Or you can simple redirect stdout: await $`some-command`.pipe(process.stdout) |
Personally, I think of ZX as a replacement for Bash, so it's more important that it works, by default, similarly. Most of my scripts have the expectation of being a little bit noisy - running commands, and having the output go to the console, so the user can see what is happening while it is running. Making it so that doesn't happen is the Bash equivalent of writing I don't dispute that there are situations where it's preferable not to pass stdout to the command line, but I think the default should be around the other way. And of course, changing the default will change the behaviour of every existing script. Perhaps you'd consider additional per-command flags in any case, which would also protect scripts against future changes to this default: await $.noisy`some-command`
const output=$.quiet`some-command` |
What is different between $.noisy and |
I don't know, because I haven't tried the |
Suggest to release the v8 document ASAP. I take hours to find out why the default value changed for $.verbose. |
i see v8 is out already so this can't really happen until 9.x i suppose - but it would still be good to reduce the size of zx a bit we could do that a few ways:
but since we expose these in the public interface, it'd be a breaking change for any of them |
We do a bundling for zx. So now zx kina small. |
You do indeed do bundling. it is 3MB+, it can be smaller 800KB+ of that is the bundle, which we could certainly reduce (the rest is mostly 2 of the suggestions above will also improve performance, so this is not only about footprint |
It's a backend tool. Bundle size seems pretty irrelevant. It would be
pretty annoying to lose functionality or even to make breaking changes in
support of that goal.
In any case, the bundle size issue doesn't have anything to do with this
issue.
|
picocolors is faster than chalk and is much smaller. this one would change the public API slightly in that we wouldn't support RGB colours anymore (only the standard term/ansi colours) globbing can be achieved with fdir and picomatch, which will be much faster and achieve the same public interface (ability to pass globs). i agree it would be pretty annoying to lose functionality, or make breaking changes. luckily, we don't have to. the only lost functionality would really be the RGB function in chalk this stuff does matter even if not for you specifically. its part of a much wider effort to improve perf across the ecosystem, im only here trying to help. |
Here is a plan of what I'm planning to do for the next v8 release. Feel free to join, by picking one on the objectives.
v8
$.verbose = false
by default ∅stderr
should be echoed by default.stdout
should not be printed by default.const $$ = $({...})
syntax.Split $ into a separate package with minimum dependencies. (probably)zx/core
.ps-tree
dependency.(probably) Deprecatewithin()
.process.cwd()
callsProcessOutput::valueOf(): string
$.sync
API.Add some CI tests for deno.Future
Better support for multiline commands.$.log
refactoring (probably)Removefs-extra
dependency (probably)exit()
pool()
progressBar()
retry()
--install
Note: Before submitting PR, discuss implementation and API.
Note: * - complex task.
The text was updated successfully, but these errors were encountered: