-
Notifications
You must be signed in to change notification settings - Fork 630
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
suggestion: restructure std/console
, std/cli
, std/fmt
and std/text
#4326
Comments
std/console
, std/cli
, std/fmt
and std/text
std/console
, std/cli
, std/fmt
and std/text
I agree with 1-3, am unsure about 4, and disagree with 5, as |
I talked with Yoshiya, and we're in favour of merging |
I'm in favour of moving |
I've updated item 4 with a new suggestion to deprecate |
The new suggestions make a lot of sense to me. However, the I suggest deprecating |
|
Alternatively, we can have |
I don't think it's good idea to use |
Not sure about this, but it feels a bit confusing to me. The APIs in
I'm not sure about this. We need more feedback from the community and core team.
Doesn't sound a good idea to me as it's highly likely that we deprecate |
True. I was misled by the names. It might make more sense to move
We could move it so that it's easier to deprecate everything together in the future because I'm still inclined to pursue the deprecation of |
I want to focus on |
I use the words terminal and console interchangeably (perhaps, I shouldn't). Even still, that's more to my point of moving it to |
I agree with moving and renaming to Months ago I was looking for a function to add colors to the terminal. I looked first in |
I don't see strong enough motivation for moving it. |
Moving
Having it be |
I wonder if |
It's widely accepted in the Deno ecosystem ( https://github.com/search?q=fmt%2Fcolors.ts+language%3ATypeScript&type=code&l=TypeScript ) and that argument ('fmt/colors is confusing') is quite new. Also this issue doesn't seem getting enough attention from the community. |
That's probably because I understand that breaking changes like that always bring some nuisance, but in this case I think it makes so much sense users will understand and not be so bothered. Maybe they even like it because they'll be able to import everything from |
Sounds a fair point. |
On second thought, using "ansi" in the filename may have two negative effects:
|
Agreed. "Styles" is more specific and descriptive of what it does. |
Closing this issue so that we can discuss each remaining point in separate, more specific issues. |
You guys probably have a vision for the future of those modules, but as they currently stand, I would like to propose these changes:
std/console
intostd/cli
and deprecatestd/console
fmt/colors
tostd/cli
, and possibly rename fromcolors.ts
toansi.ts
styles.ts
as it also does bold and italic (I'm assuming the majority of people looking for ANSI color codes are targetting the terminal)fmt/printf/printf
tostd/cli
(fmt/printf/sprintf
would stay infmt
)text/case
tostd/fmt
(see new idea below)Rename. This would narrow down the module too much. Golang's String module has many functions that could be added to std/text in the future.std/text
tostd/text_search
. Not sure about this oneNew idea for item 4: deprecate
std/fmt
entirely:std/fmt/bytes.ts
tostd/bytes
bytes.ts
formats for example 1337 → 1.34 kB, so it handles Number, not Uint8Array or ArrayBuffer. It might make more sense to have such a function in an std/number, but there's no std/number.std/fmt/colors.ts
tostd/cli
(item 2)std/fmt/duration.ts
tostd/datetime
std/fmt/duration.ts
andstd/datetime
might be deprecated once Temporal is stabilizedstd/fmt/printf.ts
tostd/text
(impacts item 3)The text was updated successfully, but these errors were encountered: