temporal-fmt 0.8.92 → 0.8.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ npm install temporal-fmt
|
|
|
24
24
|
|
|
25
25
|
[View on npm](https://www.npmjs.com/package/temporal-fmt)
|
|
26
26
|
|
|
27
|
+
This library is genuinely large — locales, recurrence, business calendars, timezone disambiguation, an analyzer, config layers, custom token extensibility, a CLI. A substantial amount of configuration and customization is packed in here. But none of that is required reading. The reason this library exists in the first place is formatting and parsing dates with token strings, and that part stays simple: `format(temporal, formatStr)` and `parse(formatStr, input)`, the same shape as date-fns or Day.js. Read [Providing `Temporal`](#providing-temporal) and [Formatting](#formatting)/[Parsing](#parsing), and you're covered for the common case — everything past that is there for when you actually need it, not before.
|
|
28
|
+
|
|
27
29
|
## Contents
|
|
28
30
|
|
|
29
31
|
- [Providing `Temporal`](#providing-temporal)
|
|
@@ -51,6 +53,7 @@ npm install temporal-fmt
|
|
|
51
53
|
- [Migrating from Day.js or date-fns](#migrating-from-dayjs-or-date-fns)
|
|
52
54
|
- [Known limitations](#known-limitations)
|
|
53
55
|
- [Related tools](#related-tools)
|
|
56
|
+
- [Testing](#testing)
|
|
54
57
|
- [Contributing](#contributing)
|
|
55
58
|
- [License](#license)
|
|
56
59
|
|
|
@@ -922,6 +925,10 @@ Neither of these ships as part of this repository — separate packages, install
|
|
|
922
925
|
- [`eslint-plugin-temporal-fmt`](https://www.npmjs.com/package/eslint-plugin-temporal-fmt) — lints format strings for common mistakes (e.g. `hh` without `a`). This is what backs the `analyzeFormat(formatStr).warnings` check mentioned in [Introspection and the analyzer](#introspection-and-the-analyzer) — same underlying metadata, surfaced as a lint diagnostic instead of a runtime call.
|
|
923
926
|
- [`temporal-fmt-codemod`](https://www.npmjs.com/package/temporal-fmt-codemod) — one-time migration tool that rewrites Day.js/date-fns calls to `temporal-fmt`. The CLI's `translate` subcommand (see [CLI](#cli)) imports this package at runtime, so `translate` needs it installed to work.
|
|
924
927
|
|
|
928
|
+
## Testing
|
|
929
|
+
|
|
930
|
+
This library is heavily tested. The `node:test` suite (`test/*.test.js`) runs 800+ cases covering hand-picked scenarios, fuzzing, and adversarial input, alongside a separate `vitest/` suite unit-testing internals directly. On top of that there's a dedicated conformance suite, smoke tests that check the package actually resolves correctly under CJS/ESM/bundler/nodenext, and type tests. If it's mentioned in this README, it's backed by a test — not just a docstring.
|
|
931
|
+
|
|
925
932
|
## Contributing
|
|
926
933
|
|
|
927
934
|
```sh
|
package/package.json
CHANGED