temporal-polyfill-lite 0.4.0 → 0.4.2
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/CHANGELOG.md +16 -0
- package/README.md +13 -4
- package/dist/calendars/index.js +1 -1
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-BuTL4TvD.js → src-Bu0ZLzZY.js} +976 -995
- package/dist/index.js +1 -1
- package/dist/shim.js +1 -1
- package/dist/{src-Dt_z3lNV.js → src-C0TzYU7p.js} +849 -862
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.4.2 (2026-06-29)
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Keep the original input in the error message for duration parsing. The input string was accidentally converted to lower case in the message before. ([#39](https://github.com/fabon-f/temporal-polyfill-lite/pull/39))
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Make `Intl.DurationFormat` spec-compliant ([#41](https://github.com/fabon-f/temporal-polyfill-lite/pull/41))
|
|
17
|
+
|
|
18
|
+
## 0.4.1 (2026-06-21)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Reduce bundle size a bit
|
|
23
|
+
|
|
8
24
|
## 0.4.0 (2026-05-25)
|
|
9
25
|
|
|
10
26
|
### Changed
|
package/README.md
CHANGED
|
@@ -40,11 +40,19 @@ import "temporal-polyfill-lite/calendars-full/global";
|
|
|
40
40
|
import { install } from "temporal-polyfill-lite/calendars-full/shim";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
`Temporal.Now.timeZoneId` is very slow in the polyfill because there is no efficient way to get the system time zone (except native `Temporal.Now.timeZoneId`). `temporal-polyfill-lite` has an opt-in cache mechanism for this.
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { setSystemTimeZoneIdCacheTtl } from "temporal-polyfill-lite/shim";
|
|
47
|
+
// or use "temporal-polyfill-lite/calendars-full/shim" entrypoint if you use the "full" bundle
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
setSystemTimeZoneIdCacheTtl(1000);
|
|
50
|
+
// The result of `Temporal.Now.timeZoneId()` will be cached for a second
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Browser support
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
The polyfill works in browsers after September 2020 by default (e.g. Safari 14). See [`docs/legacy.md`](docs/legacy.md) if you want broader support.
|
|
48
56
|
|
|
49
57
|
## TypeScript configuration
|
|
50
58
|
|
|
@@ -58,4 +66,5 @@ It supports the latest spec with few intentional deviations (see `tests/expected
|
|
|
58
66
|
|
|
59
67
|
## Docs
|
|
60
68
|
|
|
61
|
-
- `docs/
|
|
69
|
+
- [`docs/legacy.md`](docs/legacy.md): information about support for legacy browsers
|
|
70
|
+
- [`docs/restrictions.md`](docs/restrictions.md): caveats and restrictions of this polyfill
|
package/dist/calendars/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as a, r as s, t as r } from "./src-
|
|
1
|
+
import { i as a, r as s, t as r } from "./src-Bu0ZLzZY.js";
|
|
2
2
|
export { s as Intl, r as Temporal, a as toTemporalInstant };
|
package/dist/calendars/shim.js
CHANGED
|
@@ -4,5 +4,5 @@ function install(s) {
|
|
|
4
4
|
function setSystemTimeZoneIdCacheTtl(t) {
|
|
5
5
|
s(t);
|
|
6
6
|
}
|
|
7
|
-
import { a as t, i as a, n as s, r as e, t as l } from "./src-
|
|
7
|
+
import { a as t, i as a, n as s, r as e, t as l } from "./src-Bu0ZLzZY.js";
|
|
8
8
|
export { install, setSystemTimeZoneIdCacheTtl };
|