As of Node.js 26.0.0, Temporal is natively supported with no flags, and so I proceeded to remove the polyfill from my server, only to find this error:
TypeError: The published must be of type Temporal.Instant.
at new Object$1 (file://.../node_modules/.pnpm/@fedify+vocab@2.2.1/node_modules/@fedify/vocab/dist/mod.js:235:14)
at new Article (file://.../node_modules/.pnpm/@fedify+vocab@2.2.1/node_modules/@fedify/vocab/dist/mod.js:19395:3)
...
at async file://.../node_modules/.pnpm/@fedify+fedify@2.2.1/node_modules/@fedify/fedify/dist/middleware-huKeo4t5.js:1210:18
at async handleCollection (file://.../node_modules/.pnpm/@fedify+fedify@2.2.1/node_modules/@fedify/fedify/dist/middleware-huKeo4t5.js:1201:26)
(stack trace slightly redacted, but the important bits are there)
Re-introducing the polyfill fixes the issue, so it seems like an issue of only detecting the polyfill Instant class instead and not the native one.
As an extra problem, using the native Temporal without importing the polyfill (even if, as I'm doing, you monkey-patch the global Temporal with the polyfill) makes it Typescript complains about the types being wrong, because it expects a polyfilled Instant but it's getting the native one.
As of Node.js 26.0.0,
Temporalis natively supported with no flags, and so I proceeded to remove the polyfill from my server, only to find this error:(stack trace slightly redacted, but the important bits are there)
Re-introducing the polyfill fixes the issue, so it seems like an issue of only detecting the polyfill
Instantclass instead and not the native one.As an extra problem, using the native
Temporalwithout importing the polyfill (even if, as I'm doing, you monkey-patch the globalTemporalwith the polyfill) makes it Typescript complains about the types being wrong, because it expects a polyfilledInstantbut it's getting the native one.