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/CHANGELOG.md +6 -0
- package/README.md +6 -0
- package/dist/calendars/index.js +1 -1
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-DGSugl3P.js → src-B3jme83H.js} +270 -266
- package/dist/index.js +1 -1
- package/dist/shim.js +1 -1
- package/dist/{src-OoYXO2Zf.js → src-Kt6fkCUU.js} +26 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as a, r as s, t as r } from "./src-
|
|
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-
|
|
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(
|
|
1659
|
-
return
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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(
|
|
2772
|
-
Rt.prototype.value =
|
|
2773
|
-
const
|
|
2774
|
-
|
|
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(
|
|
2835
|
-
const
|
|
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,
|
|
2841
|
-
|
|
2842
|
-
const
|
|
2843
|
-
Object.defineProperties(
|
|
2844
|
-
let
|
|
2845
|
-
const
|
|
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(
|
|
2854
|
-
const
|
|
2855
|
-
Instant:
|
|
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:
|
|
2865
|
+
Now: At
|
|
2864
2866
|
};
|
|
2865
|
-
defineStringTag(
|
|
2866
|
-
export { defineNonEnumerableProperty as a,
|
|
2867
|
+
defineStringTag(Wt, "Temporal"), makePropertiesNonEnumerable(Wt);
|
|
2868
|
+
export { defineNonEnumerableProperty as a, Mt as i, setSystemTimeZoneIdCacheTtl as n, jt as r, Wt as t };
|