temporal-polyfill-lite 0.4.3 → 1.0.1
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 +45 -24
- package/README.md +2 -2
- package/dist/calendars/global.js +1 -1
- package/dist/calendars/index.js +1 -2
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-BU-7y4gA.js → src-BZzXXJ4p.js} +250 -266
- package/dist/global.js +1 -1
- package/dist/index.js +1 -2
- package/dist/shim.js +1 -1
- package/dist/{src-sQY-gZ2P.js → src-BWXhKwwe.js} +60 -73
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ 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
|
+
## 1.0.1 (2026-11-09)
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Improve performance of `Temporal.ZonedDateTime.prototype.getTimeZoneTransition` when the `ZonedDateTime` represents a recent date ([#48](https://github.com/fabon-f/temporal-polyfill-lite/pull/48))
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Reject the `Canada/East-Saskatchewan` time zone ID, which was removed from the IANA Time Zone Database, during `Temporal.ZonedDateTime` construction ([#49](https://github.com/fabon-f/temporal-polyfill-lite/pull/49))
|
|
17
|
+
|
|
18
|
+
## 1.0.0 (2026-10-21)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **BREAKING**: Stop overwriting native Temporal implementations in `temporal-polyfill-lite/global` and `temporal-polyfill-lite/calendars-full/global` entry points ([#47](https://github.com/fabon-f/temporal-polyfill-lite/pull/47)).
|
|
23
|
+
- Implement a workaround for Temporal specification issues in rare edge cases by throwing `RangeError` instead of returning dubious results ([#46](https://github.com/fabon-f/temporal-polyfill-lite/pull/46)).
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Fix a bug in `Temporal.ZonedDateTime.prototype.getTimeZoneTransition` with future DST transitions ([#44](https://github.com/fabon-f/temporal-polyfill-lite/pull/44)).
|
|
28
|
+
|
|
8
29
|
## 0.4.3 (2026-09-02)
|
|
9
30
|
|
|
10
31
|
### Fixed
|
|
@@ -15,113 +36,113 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
15
36
|
|
|
16
37
|
### Changed
|
|
17
38
|
|
|
18
|
-
- Keep
|
|
39
|
+
- Keep original input in the error message for duration parsing; previously, the input string was accidentally converted to lowercase ([#39](https://github.com/fabon-f/temporal-polyfill-lite/pull/39)).
|
|
19
40
|
|
|
20
41
|
### Fixed
|
|
21
42
|
|
|
22
|
-
- Make `Intl.DurationFormat` spec-compliant ([#41](https://github.com/fabon-f/temporal-polyfill-lite/pull/41))
|
|
43
|
+
- Make `Intl.DurationFormat` spec-compliant ([#41](https://github.com/fabon-f/temporal-polyfill-lite/pull/41)).
|
|
23
44
|
|
|
24
45
|
## 0.4.1 (2026-06-21)
|
|
25
46
|
|
|
26
47
|
### Changed
|
|
27
48
|
|
|
28
|
-
-
|
|
49
|
+
- Slightly reduce bundle size.
|
|
29
50
|
|
|
30
51
|
## 0.4.0 (2026-05-25)
|
|
31
52
|
|
|
32
53
|
### Changed
|
|
33
54
|
|
|
34
|
-
- **BREAKING**: Reflect normative changes approved in the TC39 meeting
|
|
35
|
-
- Improve error messages ([#36](https://github.com/fabon-f/temporal-polyfill-lite/pull/36))
|
|
55
|
+
- **BREAKING**: Reflect normative changes approved in the May 2026 TC39 meeting ([#34](https://github.com/fabon-f/temporal-polyfill-lite/pull/34), [#35](https://github.com/fabon-f/temporal-polyfill-lite/pull/35)).
|
|
56
|
+
- Improve error messages ([#36](https://github.com/fabon-f/temporal-polyfill-lite/pull/36)).
|
|
36
57
|
|
|
37
58
|
### Fixed
|
|
38
59
|
|
|
39
|
-
- Remove extra observable `[[GetOwnProperty]]` calls in `Intl.DateTimeFormat` constructor ([#33](https://github.com/fabon-f/temporal-polyfill-lite/pull/33))
|
|
60
|
+
- Remove extra observable `[[GetOwnProperty]]` calls in the `Intl.DateTimeFormat` constructor ([#33](https://github.com/fabon-f/temporal-polyfill-lite/pull/33)).
|
|
40
61
|
|
|
41
62
|
## 0.3.6 (2026-05-07)
|
|
42
63
|
|
|
43
64
|
### Fixed
|
|
44
65
|
|
|
45
|
-
- Stop
|
|
66
|
+
- Stop implementing `formatRange` and `formatRangeToParts` on `Intl.DateTimeFormat` in legacy browsers that lack native support for them, ensuring feature detection works correctly ([#32](https://github.com/fabon-f/temporal-polyfill-lite/pull/32)).
|
|
46
67
|
|
|
47
68
|
## 0.3.5 (2026-04-20)
|
|
48
69
|
|
|
49
70
|
### Fixed
|
|
50
71
|
|
|
51
|
-
- Fix
|
|
52
|
-
- Fix types
|
|
72
|
+
- Fix incorrect order of observable operations for options object in the `Intl.DateTimeFormat` constructor ([#28](https://github.com/fabon-f/temporal-polyfill-lite/pull/28)).
|
|
73
|
+
- Fix types for `Intl` when the polyfill is used as a ponyfill ([#29](https://github.com/fabon-f/temporal-polyfill-lite/pull/29)).
|
|
53
74
|
|
|
54
75
|
## 0.3.4 (2026-04-14)
|
|
55
76
|
|
|
56
77
|
### Fixed
|
|
57
78
|
|
|
58
|
-
- Fix discrepancy
|
|
79
|
+
- Fix discrepancy in date-time formatting between timestamps and Temporal objects in `Intl.DateTimeFormat` ([#27](https://github.com/fabon-f/temporal-polyfill-lite/pull/27)).
|
|
59
80
|
|
|
60
81
|
## 0.3.3 (2026-03-21)
|
|
61
82
|
|
|
62
83
|
### Added
|
|
63
84
|
|
|
64
|
-
- Introduce opt-in cache for system time zone ID ([#22](https://github.com/fabon-f/temporal-polyfill-lite/pull/22))
|
|
85
|
+
- Introduce opt-in cache for system time zone ID ([#22](https://github.com/fabon-f/temporal-polyfill-lite/pull/22)).
|
|
65
86
|
|
|
66
87
|
### Fixed
|
|
67
88
|
|
|
68
|
-
- Fix bugs related to extreme dates in `persian` calendar ([#23](https://github.com/fabon-f/temporal-polyfill-lite/pull/23))
|
|
89
|
+
- Fix bugs related to extreme dates in the `persian` calendar ([#23](https://github.com/fabon-f/temporal-polyfill-lite/pull/23)).
|
|
69
90
|
|
|
70
91
|
## 0.3.2 (2026-03-12)
|
|
71
92
|
|
|
72
93
|
### Changed
|
|
73
94
|
|
|
74
|
-
- Implement out-of-bounds
|
|
95
|
+
- Implement out-of-bounds checks in `Temporal.PlainMonthDay` construction for non-ISO calendars ([#21](https://github.com/fabon-f/temporal-polyfill-lite/pull/21)).
|
|
75
96
|
|
|
76
97
|
### Fixed
|
|
77
98
|
|
|
78
|
-
- Fix a bug caused by extreme `year` field during `Temporal.PlainMonthDay` construction ([#20](https://github.com/fabon-f/temporal-polyfill-lite/pull/20))
|
|
99
|
+
- Fix a bug caused by extreme `year` field values during `Temporal.PlainMonthDay` construction ([#20](https://github.com/fabon-f/temporal-polyfill-lite/pull/20)).
|
|
79
100
|
|
|
80
101
|
## 0.3.1 (2026-03-07)
|
|
81
102
|
|
|
82
103
|
### Fixed
|
|
83
104
|
|
|
84
|
-
- Fix incorrect `sideEffects` package
|
|
105
|
+
- Fix incorrect `sideEffects` package setting that caused bundling issues ([#19](https://github.com/fabon-f/temporal-polyfill-lite/pull/19)).
|
|
85
106
|
|
|
86
107
|
## 0.3.0 (2026-03-07)
|
|
87
108
|
|
|
88
109
|
### Added
|
|
89
110
|
|
|
90
|
-
- Add support for non-ISO calendars ([#6](https://github.com/fabon-f/temporal-polyfill-lite/issues/6))
|
|
111
|
+
- Add support for non-ISO calendars ([#6](https://github.com/fabon-f/temporal-polyfill-lite/issues/6)).
|
|
91
112
|
|
|
92
113
|
### Changed
|
|
93
114
|
|
|
94
|
-
- **BREAKING**: Make
|
|
115
|
+
- **BREAKING**: Make type definitions compatible with TypeScript 6.0; stop exporting types to the global namespace when importing `temporal-polyfill-lite/global` ([#17](https://github.com/fabon-f/temporal-polyfill-lite/pull/17)).
|
|
95
116
|
|
|
96
117
|
## 0.2.3 (2026-03-04)
|
|
97
118
|
|
|
98
119
|
### Fixed
|
|
99
120
|
|
|
100
|
-
- Fix incorrect rounding of durations in edge cases ([#14](https://github.com/fabon-f/temporal-polyfill-lite/pull/14))
|
|
121
|
+
- Fix incorrect rounding of durations in edge cases ([#14](https://github.com/fabon-f/temporal-polyfill-lite/pull/14)).
|
|
101
122
|
|
|
102
123
|
## 0.2.2 (2026-02-09)
|
|
103
124
|
|
|
104
125
|
### Fixed
|
|
105
126
|
|
|
106
|
-
- Fix
|
|
127
|
+
- Fix a bug caused by improper minification that caused `new Intl.DateTimeFormat()` to throw a `TypeError` ([#5](https://github.com/fabon-f/temporal-polyfill-lite/pull/5)).
|
|
107
128
|
|
|
108
129
|
## 0.2.1 (2026-02-06)
|
|
109
130
|
|
|
110
131
|
### Changed
|
|
111
132
|
|
|
112
|
-
- Improve performance for `ZonedDateTime` ([#3](https://github.com/fabon-f/temporal-polyfill-lite/pull/3), [e9b5cbf](https://github.com/fabon-f/temporal-polyfill-lite/commit/e9b5cbf3e06cd1db24c086ec5b41f7c5faf5861e))
|
|
113
|
-
- Improve error messages ([94990ad](https://github.com/fabon-f/temporal-polyfill-lite/commit/94990adca9052a785db16f74716cccf653f51a83))
|
|
133
|
+
- Improve performance for `ZonedDateTime` ([#3](https://github.com/fabon-f/temporal-polyfill-lite/pull/3), [e9b5cbf](https://github.com/fabon-f/temporal-polyfill-lite/commit/e9b5cbf3e06cd1db24c086ec5b41f7c5faf5861e)).
|
|
134
|
+
- Improve error messages ([94990ad](https://github.com/fabon-f/temporal-polyfill-lite/commit/94990adca9052a785db16f74716cccf653f51a83)).
|
|
114
135
|
|
|
115
136
|
### Fixed
|
|
116
137
|
|
|
117
|
-
- Stop
|
|
138
|
+
- Stop displaying fractional seconds for date classes in `Intl.DateTimeFormat` ([#2](https://github.com/fabon-f/temporal-polyfill-lite/pull/2)).
|
|
118
139
|
|
|
119
140
|
## 0.2.0 (2026-01-30)
|
|
120
141
|
|
|
121
142
|
### Changed
|
|
122
143
|
|
|
123
|
-
- **BREAKING**: Reflect a normative change
|
|
124
|
-
- Stop mangling
|
|
144
|
+
- **BREAKING**: Reflect a normative change that disallows adding weeks, days, and time units to `PlainYearMonth` ([#1](https://github.com/fabon-f/temporal-polyfill-lite/pull/1)).
|
|
145
|
+
- Stop mangling function names in the production build for better stack traces ([14a367e](https://github.com/fabon-f/temporal-polyfill-lite/commit/14a367e7392b06324bf1844316be4a0b43e6a531)).
|
|
125
146
|
|
|
126
147
|
## 0.1.0 (2026-01-25)
|
|
127
148
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Lightweight Temporal polyfill.
|
|
6
6
|
|
|
7
7
|
- **Small**: The bundle size is nearly 10% smaller than [temporal-polyfill](https://www.npmjs.com/package/temporal-polyfill), 60% smaller than [@js-temporal/polyfill](https://www.npmjs.com/package/@js-temporal/polyfill) if you need only Gregorian calendar (see [comparison](https://github.com/fabon-f/temporal-polyfill-comparison) for details).
|
|
8
|
-
- **Spec-compliant**: It supports the latest spec
|
|
8
|
+
- **Spec-compliant**: It supports the latest spec.
|
|
9
9
|
|
|
10
10
|
# Usage
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ For users who need only Gregorian calendar (`iso8601` and `gregory`), you can us
|
|
|
19
19
|
// as a ponyfill (without patching global variables)
|
|
20
20
|
import { Intl, Temporal } from "temporal-polyfill-lite";
|
|
21
21
|
|
|
22
|
-
// load the polyfill to global
|
|
22
|
+
// load the polyfill to global if native implementation does not exist
|
|
23
23
|
import "temporal-polyfill-lite/global";
|
|
24
24
|
// load types to global if you need (optional)
|
|
25
25
|
import "temporal-polyfill-lite/types/global";
|
package/dist/calendars/global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { install as s } from "./shim.js";
|
|
2
|
-
s(!
|
|
2
|
+
s(!1);
|
package/dist/calendars/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { s as Intl, r as Temporal, a as toTemporalInstant };
|
|
1
|
+
export { r as Intl, t as Temporal, i as toTemporalInstant } from "./src-BZzXXJ4p.js";
|
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-BZzXXJ4p.js";
|
|
8
8
|
export { install, setSystemTimeZoneIdCacheTtl };
|