temporal-polyfill-lite 0.3.4 → 0.3.6

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,19 @@ 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.3.6 (2026-05-07)
9
+
10
+ ### Fixed
11
+
12
+ - Stop implement `formatRange` and `formatRangeToParts` methods to `Intl.DateTimeFormat` on legacy browsers without support for these methods, which makes feature detection of range formatting methods work correctly ([#32](https://github.com/fabon-f/temporal-polyfill-lite/pull/32))
13
+
14
+ ## 0.3.5 (2026-04-20)
15
+
16
+ ### Fixed
17
+
18
+ - Fix wrong order of observable operations for options object in `Intl.DateTimeFormat` constructor ([#28](https://github.com/fabon-f/temporal-polyfill-lite/pull/28))
19
+ - Fix types of `Intl` when the polyfill is used as a ponyfill ([#29](https://github.com/fabon-f/temporal-polyfill-lite/pull/29))
20
+
8
21
  ## 0.3.4 (2026-04-14)
9
22
 
10
23
  ### Fixed
package/README.md CHANGED
@@ -46,6 +46,12 @@ The polyfill works in browsers after September 2020 by default (e.g. Safari 14).
46
46
 
47
47
  This polyfill doesn't internally rely on `bigint`, thus you can support older browsers by transpiling and injecting polyfills (e.g. it relies on `globalThis` which is baseline since January 2020). However, if you use APIs accepting or returning `bigint`, `bigint` support is required.
48
48
 
49
+ ## TypeScript configuration
50
+
51
+ This polyfill provides type definitions out of the box (You don't need `@types/*`).
52
+
53
+ This package is ESM-only, so you have to set [`module`](https://www.typescriptlang.org/tsconfig/#module) and [`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution) correctly. It also uses the [`exports` field](https://nodejs.org/api/packages.html#exports) in `package.json`, so you should not set the [`resolvePackageJsonExports`](https://www.typescriptlang.org/tsconfig/#resolvePackageJsonExports) option to `false` in your `tsconfig.json`. Otherwise the type resolution will fail.
54
+
49
55
  ## Spec compliance
50
56
 
51
57
  It supports the latest spec with few intentional deviations (see `tests/expectedFailures` directory for details).
@@ -591,19 +591,19 @@ export namespace Intl {
591
591
  }
592
592
  }
593
593
 
594
- export const Intl: {
594
+ export const Intl: typeof globalThis.Intl & {
595
595
  DateTimeFormat: {
596
596
  new (
597
- locales?: string | string[],
597
+ locales?: globalThis.Intl.LocalesArgument,
598
598
  options?: globalThis.Intl.DateTimeFormatOptions,
599
599
  ): Intl.DateTimeFormat;
600
600
  (
601
- locales?: string | string[],
601
+ locales?: globalThis.Intl.LocalesArgument,
602
602
  options?: globalThis.Intl.DateTimeFormatOptions,
603
603
  ): Intl.DateTimeFormat;
604
604
 
605
605
  supportedLocalesOf(
606
- locales: string | string[],
606
+ locales: globalThis.Intl.LocalesArgument,
607
607
  options?: globalThis.Intl.DateTimeFormatOptions,
608
608
  ): string[];
609
609
  };
@@ -1,2 +1,2 @@
1
- import { i as a, r as s, t as r } from "./src-BRD2b69b.js";
1
+ import { i as a, r as s, t as r } from "./src-B3jme83H.js";
2
2
  export { s as Intl, r as Temporal, a as toTemporalInstant };
@@ -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-BRD2b69b.js";
7
+ import { a as t, i as a, n as s, r as e, t as l } from "./src-B3jme83H.js";
8
8
  export { install, setSystemTimeZoneIdCacheTtl };