Provides Mikro ORM property types for the TC39 Temporal API objects including Duration, PlainDate, PlainDateTime, PlainTime, ZonedDateTime, Instant, PlainMonthDay, and PlainYearMonth. Current version 2.0.2 requires @mikro-orm/core >= 7.0.1. Supports Postgres, MySQL, MariaDB. This library integrates Temporal types into Mikro ORM's schema and query system, mapping them to appropriate database column types (e.g., INTERVAL for durations in Postgres, VARCHAR for others). It is the only known Mikro ORM extension for Temporal objects, filling a gap for modern date/time handling without legacy Date issues.
npm install mikro-orm-temporalNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Mikro ORM entity with temporal fields using OffsetDateTimeType, PlainDateType, and DurationType.
Upgrade @mikro-orm/core to version 7.0.1 or higher.
Ensure your queries and migrations handle the difference; for MySQL, parsed ISO strings on read.
Use polyfill like @js-temporal/polyfill if needed; monitor ECMAScript Temporal proposal status.
Use import { TypeName } from 'mikro-orm-temporal' instead of default import.Install the package: npm install mikro-orm-temporal. Ensure tsconfig.json includes node_modules in typeRoots or have 'skipLibCheck': false.
Upgrade @mikro-orm/core to >= 7.0.1 and use import { p } from '@mikro-orm/core'.Ensure you are using the correct import and that the Type class matches the expected signature. If still failing, check Mikro ORM version compatibility.