temporal-polyfill-lite 0.2.2 → 0.2.3
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 +6 -0
- package/README.md +4 -1
- package/dist/calendars/global.js +2 -0
- package/dist/calendars/index.js +2 -0
- package/dist/calendars/shim.d.ts +5 -0
- package/dist/calendars/shim.js +8 -0
- package/dist/calendars/src-BYgX6wUQ.js +4924 -0
- package/dist/index.js +2 -2
- package/dist/shim.js +4 -4
- package/dist/{Temporal-BUBnYRDZ.js → src-CvhHR31X.js} +1189 -1248
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.2.3 (2026-03-04)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Fix incorrect rounding of durations in edge cases ([#14](https://github.com/fabon-f/temporal-polyfill-lite/pull/14))
|
|
13
|
+
|
|
8
14
|
## 0.2.2 (2026-02-09)
|
|
9
15
|
|
|
10
16
|
### Fixed
|
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
Lightweight Temporal polyfill supporting all time zones and basic (`iso8601` and `gregory`) calendars.
|
|
6
6
|
|
|
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 basic calendars (see [comparison](https://github.com/fabon-f/temporal-polyfill-comparison) for details).
|
|
8
|
+
- **Spec-compliant**: It supports the latest spec, while other polyfills are based on the outdated spec (at least as of February 2026).
|
|
9
|
+
|
|
7
10
|
# Usage
|
|
8
11
|
|
|
9
12
|
```sh
|
|
@@ -33,4 +36,4 @@ This polyfill doesn't internally rely on `bigint`, thus you can support older br
|
|
|
33
36
|
|
|
34
37
|
## Spec compliance
|
|
35
38
|
|
|
36
|
-
It supports the latest spec
|
|
39
|
+
It supports the latest spec with few intentional deviations (see `/expectedFailures` directory for details).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function install(s) {
|
|
2
|
+
(s || "object" != typeof globalThis.Temporal) &&
|
|
3
|
+
(a(globalThis, "Temporal", o),
|
|
4
|
+
a(globalThis, "Intl", l),
|
|
5
|
+
a(Date.prototype, "toTemporalInstant", t));
|
|
6
|
+
}
|
|
7
|
+
import { i as a, n as l, r as t, t as o } from "./src-BYgX6wUQ.js";
|
|
8
|
+
export { install };
|