Skip to content

Commit

Permalink
Replace date-fns for hand-rolled date formatting
Browse files Browse the repository at this point in the history
Closes #443
Fixes #436
  • Loading branch information
gustavohenke committed Sep 8, 2024
1 parent fe7b69c commit 710ee55
Show file tree
Hide file tree
Showing 12 changed files with 946 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Check out documentation and other usage examples in the [`docs` directory](./doc
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 format](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
to use when prefixing with `time`. Default: `yyyy-MM-dd HH:mm:ss.ZZZ`
- `additionalArguments`: list of additional arguments passed that will get replaced in each command. If not defined, no argument replacing will happen.

Expand Down
4 changes: 3 additions & 1 deletion bin/concurrently.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ const args = yargs(hideBin(process.argv))
},
'timestamp-format': {
alias: 't',
describe: 'Specify the timestamp in moment/date-fns format.',
describe:
'Specify the timestamp in Unicode format:\n' +
'https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table',
default: defaults.timestampFormat,
type: 'string',
},
Expand Down
21 changes: 21 additions & 0 deletions declarations/intl.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// TODO: Delete this file once Typescript has added these.
declare namespace Intl {
interface DateTimeFormatPartTypesRegistry {
yearName: any;
relatedYear: any;
}

/**
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo
*/
interface WeekInfo {
firstDay: number;
weekend: readonly number[];
minimalDays: number;
}

interface Locale {
readonly weekInfo: WeekInfo;
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"license": "MIT",
"dependencies": {
"chalk": "^4.1.2",
"date-fns": "^2.30.0",
"lodash": "^4.17.21",
"rxjs": "^7.8.1",
"shell-quote": "^1.8.1",
Expand Down
21 changes: 0 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 710ee55

Please sign in to comment.