temporal-fmt 0.7.95 → 0.7.96
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 +13 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -236,6 +236,19 @@ through `Intl.DateTimeFormat` directly; on the polyfill, it falls back to
|
|
|
236
236
|
`parse.test.js` configures Temporal via `setTemporal()` rather than mutating
|
|
237
237
|
`globalThis.Temporal` directly.
|
|
238
238
|
|
|
239
|
+
Run `npm run test:all`, not just `npm test`. `npm test` only runs the
|
|
240
|
+
`node:test` suite in `test/*.test.js` — hand-picked, fuzz, adversarial, and
|
|
241
|
+
perf cases that exercise the public API end to end. It doesn't touch
|
|
242
|
+
`vitest/`, which unit-tests internals like `enumerateValidSplits()`
|
|
243
|
+
directly. That function resolves ambiguous glued numeric runs (does `"112"`
|
|
244
|
+
against `['M', 'd']` mean month 1/day 12, or month 11/day 2?), and a bug
|
|
245
|
+
in its edge cases — an empty token list, a range-boundary off-by-one — can
|
|
246
|
+
easily dodge every `parse()` example in the main suite without ever being
|
|
247
|
+
the specific input one of them happens to use. `test:all` also runs the
|
|
248
|
+
type tests (`test:types`), so it's the only single command that actually
|
|
249
|
+
covers everything. CI runs `test:all` for this reason; running plain `npm
|
|
250
|
+
test` locally will pass even with a broken `vitest/` suite.
|
|
251
|
+
|
|
239
252
|
## License
|
|
240
253
|
|
|
241
254
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "temporal-fmt",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.96",
|
|
4
4
|
"description": "Format Temporal.PlainDate/PlainDateTime/PlainTime/ZonedDateTime objects using date-fns-style token strings.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"build": "tsup && tsc --declaration --emitDeclarationOnly",
|
|
22
22
|
"dev": "tsup --watch",
|
|
23
23
|
"test": "node --test test/*.test.js",
|
|
24
|
+
"test:unit": "vitest run",
|
|
25
|
+
"test:unit:watch": "vitest",
|
|
26
|
+
"test:types": "vitest run --typecheck",
|
|
27
|
+
"test:all": "npm run build && npm test && npm run test:unit && npm run test:types",
|
|
24
28
|
"prepublishOnly": "npm run build && npm test"
|
|
25
29
|
},
|
|
26
30
|
"keywords": [
|
|
@@ -45,9 +49,10 @@
|
|
|
45
49
|
"homepage": "https://github.com/DirazCoder/temporal-fmt#readme",
|
|
46
50
|
"devDependencies": {
|
|
47
51
|
"@typescript/native-preview": "^7.0.0-dev.20260707.2",
|
|
48
|
-
"temporal-polyfill": "^1.0.
|
|
52
|
+
"temporal-polyfill": "^1.0.4",
|
|
49
53
|
"tsup": "^8.5.1",
|
|
50
|
-
"typescript": "^7.0.2"
|
|
54
|
+
"typescript": "^7.0.2",
|
|
55
|
+
"vitest": "^4.1.10"
|
|
51
56
|
},
|
|
52
57
|
"overrides": {
|
|
53
58
|
"esbuild": "0.28.1"
|