temporal-polyfill-lite 0.3.5 → 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/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as a, r as s, t as r } from "./src-OoYXO2Zf.js";
1
+ import { i as a, r as s, t as r } from "./src-Kt6fkCUU.js";
2
2
  export { s as Intl, r as Temporal, a as toTemporalInstant };
package/dist/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-OoYXO2Zf.js";
7
+ import { a as t, i as a, n as s, r as e, t as l } from "./src-Kt6fkCUU.js";
8
8
  export { install, setSystemTimeZoneIdCacheTtl };
@@ -1655,8 +1655,8 @@ function handleDateTimeValue(e, t) {
1655
1655
  function DateTimeFormat(e, t) {
1656
1656
  return new Pt(e, t);
1657
1657
  }
1658
- function createTemporalInstant(e, t = Object.create(Zt.prototype)) {
1659
- return bt.set(t, { Y: e }), t;
1658
+ function createTemporalInstant(e, t = Object.create(Nt.prototype)) {
1659
+ return Zt.set(t, { Y: e }), t;
1660
1660
  }
1661
1661
  function toTemporalInstant$1(e) {
1662
1662
  if (isObject(e)) {
@@ -1695,23 +1695,23 @@ function validateEpochNanoseconds(e) {
1695
1695
  return ((e) => compareEpochNanoseconds(we, e) * compareEpochNanoseconds(ve, e) <= 0)(e) || throwRangeError(me), e;
1696
1696
  }
1697
1697
  function getInternalSlotForInstant(e) {
1698
- return bt.get(e);
1698
+ return Zt.get(e);
1699
1699
  }
1700
1700
  function getInternalSlotOrThrowForInstant(e) {
1701
1701
  const t = getInternalSlotForInstant(e);
1702
1702
  return t || throwTypeError(pe), t;
1703
1703
  }
1704
1704
  function isInstant(e) {
1705
- return bt.has(e);
1705
+ return Zt.has(e);
1706
1706
  }
1707
1707
  function clampEpochNanoseconds(e) {
1708
1708
  return compareEpochNanoseconds(e, ve) > 0 ? ve : compareEpochNanoseconds(e, we) < 0 ? we : e;
1709
1709
  }
1710
1710
  function systemTimeZoneIdentifier() {
1711
- return $t && Ct + $t > Date.now() && jt ? jt : (Ct = Date.now(), jt = new Ft().resolvedOptions().timeZone);
1711
+ return Ct && Yt + Ct > Date.now() && $t ? $t : (Yt = Date.now(), $t = new Ft().resolvedOptions().timeZone);
1712
1712
  }
1713
1713
  function setSystemTimeZoneIdCacheTtl(e) {
1714
- $t = e, e || (jt = void 0, Ct = -Infinity);
1714
+ Ct = e, e || ($t = void 0, Yt = -Infinity);
1715
1715
  }
1716
1716
  function systemUtcEpochNanoseconds() {
1717
1717
  return createEpochNanosecondsFromEpochMilliseconds(Date.now());
@@ -2768,10 +2768,12 @@ var Et = class {
2768
2768
  return getInternalSlotOrThrowForDateTimeFormat(this).be.resolvedOptions();
2769
2769
  }
2770
2770
  };
2771
- const Rt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
2772
- Rt.prototype.value = Pt.prototype, Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
2773
- const bt = /* @__PURE__ */ new WeakMap();
2774
- var Zt = class {
2771
+ const Rt = Object.getOwnPropertyDescriptors(Ft), bt = Pt.prototype;
2772
+ Rt.prototype.value = bt;
2773
+ for (const e of ["formatRange", "formatRangeToParts"]) Ft.prototype[e] || delete bt[e];
2774
+ Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
2775
+ const Zt = /* @__PURE__ */ new WeakMap();
2776
+ var Nt = class {
2775
2777
  constructor(e) {
2776
2778
  createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
2777
2779
  }
@@ -2831,18 +2833,18 @@ var Zt = class {
2831
2833
  return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).Y, toTemporalTimeZoneIdentifier(e), "iso8601");
2832
2834
  }
2833
2835
  };
2834
- defineStringTag(Zt.prototype, "Temporal.Instant"), renameFunction(Zt, "Instant");
2835
- const Nt = class {
2836
+ defineStringTag(Nt.prototype, "Temporal.Instant"), renameFunction(Nt, "Instant");
2837
+ const Mt = class {
2836
2838
  toTemporalInstant() {
2837
2839
  const e = Date.prototype.valueOf.call(this);
2838
2840
  return isNaN(e) && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
2839
2841
  }
2840
- }.prototype.toTemporalInstant, Mt = Object.getOwnPropertyDescriptors(globalThis.Intl);
2841
- Mt.DateTimeFormat.value = DateTimeFormat;
2842
- const Ut = {};
2843
- Object.defineProperties(Ut, Mt);
2844
- let jt, $t = 0, Ct = -Infinity;
2845
- const Yt = {
2842
+ }.prototype.toTemporalInstant, Ut = Object.getOwnPropertyDescriptors(globalThis.Intl);
2843
+ Ut.DateTimeFormat.value = DateTimeFormat;
2844
+ const jt = {};
2845
+ Object.defineProperties(jt, Ut);
2846
+ let $t, Ct = 0, Yt = -Infinity;
2847
+ const At = {
2846
2848
  timeZoneId: () => systemTimeZoneIdentifier(),
2847
2849
  instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
2848
2850
  plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
@@ -2850,9 +2852,9 @@ const Yt = {
2850
2852
  plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
2851
2853
  plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
2852
2854
  };
2853
- defineStringTag(Yt, "Temporal.Now"), makePropertiesNonEnumerable(Yt);
2854
- const At = {
2855
- Instant: Zt,
2855
+ defineStringTag(At, "Temporal.Now"), makePropertiesNonEnumerable(At);
2856
+ const Wt = {
2857
+ Instant: Nt,
2856
2858
  PlainDateTime: Ne,
2857
2859
  PlainDate: ut,
2858
2860
  PlainTime: Ue,
@@ -2860,7 +2862,7 @@ const At = {
2860
2862
  PlainMonthDay: st,
2861
2863
  Duration: It,
2862
2864
  ZonedDateTime: Pe,
2863
- Now: Yt
2865
+ Now: At
2864
2866
  };
2865
- defineStringTag(At, "Temporal"), makePropertiesNonEnumerable(At);
2866
- export { defineNonEnumerableProperty as a, Nt as i, setSystemTimeZoneIdCacheTtl as n, Ut as r, At as t };
2867
+ defineStringTag(Wt, "Temporal"), makePropertiesNonEnumerable(Wt);
2868
+ export { defineNonEnumerableProperty as a, Mt as i, setSystemTimeZoneIdCacheTtl as n, jt as r, Wt as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "temporal-polyfill-lite",
4
- "version": "0.3.5",
4
+ "version": "0.3.6",
5
5
  "description": "Lightweight Temporal polyfill",
6
6
  "keywords": [
7
7
  "Temporal"