temporal-polyfill-lite 0.2.1 → 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 CHANGED
@@ -5,6 +5,18 @@ 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
+
14
+ ## 0.2.2 (2026-02-09)
15
+
16
+ ### Fixed
17
+
18
+ - Fix the bug caused by improper minification which makes `new Intl.DateTimeFormat()` throw `TypeError` ([#5](https://github.com/fabon-f/temporal-polyfill-lite/pull/5))
19
+
8
20
  ## 0.2.1 (2026-02-06)
9
21
 
10
22
  ### Changed
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 (January 2026) with few intentional deviations (see `/expectedFailures` directory for details).
39
+ It supports the latest spec with few intentional deviations (see `/expectedFailures` directory for details).
@@ -0,0 +1,2 @@
1
+ import { install as s } from "./shim.js";
2
+ s(!0);
@@ -0,0 +1,2 @@
1
+ import { n as a, r as s, t as r } from "./src-BYgX6wUQ.js";
2
+ export { a as Intl, r as Temporal, s as toTemporalInstant };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Install Temporal polyfill.
3
+ * @param overwrite Whether to overwrite an existing Temporal implementation
4
+ */
5
+ export declare function install(overwrite: boolean): void;
@@ -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 };