Skip to content

Commit 4d849f2

Browse files
committed
Remove temporal polyfill because we're on Node.js 26
Resolves #539
1 parent d659b29 commit 4d849f2

3 files changed

Lines changed: 0 additions & 31 deletions

File tree

package-lock.json

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
},
3232
"dependencies": {
3333
"@discordjs/voice": "^0.19.2",
34-
"@js-temporal/polyfill": "^0.5.1",
3534
"@napi-rs/canvas": "1.0.0",
3635
"@resvg/resvg-js": "^2.6.2",
3736
"@sentry/node": "^10.51.0",

src/polyfills.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { Temporal as PolyfillTemporal } from "@js-temporal/polyfill";
2-
31
declare global {
42
// type polyfill for Math.sumPrecise (currently in stage 2):
53
// https://github.com/tc39/proposal-math-sum
@@ -15,15 +13,6 @@ declare global {
1513
}
1614
}
1715

18-
globalThis.Temporal = PolyfillTemporal as typeof Temporal;
19-
20-
// TODO: Remove this once temporal is available in Node.js, see: https://github.com/nodejs/node/issues/57127
21-
if (typeof Date.prototype.toTemporalInstant !== "function") {
22-
Date.prototype.toTemporalInstant = function () {
23-
return Temporal.Instant.fromEpochMilliseconds(this.getTime());
24-
};
25-
}
26-
2716
if (typeof Math.sumPrecise !== "function") {
2817
// intentionally very cheap implementation. But does the thing.
2918
Math.sumPrecise = (values: number[]) => values.reduce((a, b) => a + b, 0);

0 commit comments

Comments
 (0)