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

Replace date-fns by date-and-time-formatter #443

Closed
wants to merge 1 commit into from

Conversation

paescuj
Copy link
Collaborator

@paescuj paescuj commented Sep 23, 2023

Fixes #436

Backwards-compatible because date-fns follows Unicode LDML too (well, more or less https://blog.date-fns.org/v2-unicode-tokens/)

@paescuj paescuj changed the title Replace date-fns by date-and-time-formatter Replace date-fns by date-and-time-formatter Sep 23, 2023
@coveralls
Copy link

coveralls commented Sep 23, 2023

Coverage Status

coverage: 99.197%. remained the same when pulling 28f51ae on replace-date-fns-by-date-and-time-formatter into a61ef39 on main.

@paescuj paescuj force-pushed the replace-date-fns-by-date-and-time-formatter branch from 7fd13e6 to 28f51ae Compare September 23, 2023 22:06
@@ -151,7 +151,7 @@ const args = yargs(argsBeforeSep)
},
'timestamp-format': {
alias: 't',
describe: 'Specify the timestamp in moment/date-fns format.',
describe: 'Specify the timestamp in Unicode LDML format.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is technically correct, I wonder how many people won't know how to find usage examples for LDML.

For instance, for me, Google returns one result for "unicode ldml" in the first page that is more "straight to the point" IMO:
https://stackoverflow.com/q/39904392/2083599

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Should we explicitly link https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns in this description?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, but i'm worried it might not be formatted well by yargs.

Something like #445 (or better) is looking promising now...

@paescuj paescuj added this to the v9 milestone Oct 19, 2023
@@ -43,7 +43,7 @@ export type ConcurrentlyOptions = BaseConcurrentlyOptions & {

/**
* Date format used when logging date/time.
* @see https://date-fns.org/v2.0.1/docs/format
* @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* @see https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns

@@ -61,7 +61,7 @@ export const success = 'all' as SuccessCondition;

/**
* Date format used when logging date/time.
* @see https://date-fns.org/v2.0.1/docs/format
* @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* @see https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns

@@ -346,7 +348,7 @@ For more details, visit https://github.com/open-cli-tools/concurrently
Anything else means all processes should exit successfully.
- `restartTries`: how many attempts to restart a process that dies will be made. Default: `0`.
- `restartDelay`: how many milliseconds to wait between process restarts. Default: `0`.
- `timestampFormat`: a [date-fns format](https://date-fns.org/v2.0.1/docs/format)
- `timestampFormat`: a [Unicode LDML format](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `timestampFormat`: a [Unicode LDML format](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
- `timestampFormat`: a [Unicode LDML date format](https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns)

@liquidg3
Copy link

date-fns pushed a breaking change and we're having issues in our projects.

It would be helpful to either upgrade to date-fns to the latest or to replace it entirely (based on this PR). We've set resolutions in our package.json (we use yarn) for now, but I always forget to remove them and it's gonna bite future us right before something important, you know, like when most these things tend to rear their heads.

Thanks everyone!!

@gustavohenke
Copy link
Member

Hey! This is now fixed 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 this pull request may close these issues.

Installing package from npm takes a long time
4 participants