Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-07-29 | 1.8 kB | |
v3.1.0 source code.tar.gz | 2025-07-29 | 17.6 MB | |
v3.1.0 source code.zip | 2025-07-29 | 18.5 MB | |
Totals: 3 Items | 36.2 MB | 0 |
- Fix by @LazyShpee for
initAsyncHooks
withoutremultApi
- Added support for
express 5
- Added support for
nuxt 4
- removed remult dependencies:
reflect-metadata
uuid
@paralleldrive/cuid2
- Minimum node version is now
18
(with--experimental-global-webcrypto
flag) or20
(without flag) - We are introducing
@Fields.id()
field (usingcrypto.randomUUID()
under the hood) @Fields.uuid()
is now deprecated, use@Fields.id()
instead (uuid is the default id factory)- [BREAKING] Removed
@Fields.cuid()
- use@Fields.id()
instead and change theidFactory
to your preferred id algorithm.
How to migrate from @Fields.cuid()
to @Fields.id()
You have 2 options:
A/ Update globally @Fields.id()
to use cuid
algorithm
First, install the @paralleldrive/cuid2
package:
:::bash
npm install @paralleldrive/cuid2
Then, globally, in a shared code file:
:::ts
import { createId } from '@paralleldrive/cuid2'
import { Fields } from 'remult'
Fields.defaultIdFactory = () => createId()
Finally, replace @Fields.cuid()
with @Fields.id()
B/ Create your own cuid
Field
First, install the @paralleldrive/cuid2
package:
:::bash
npm install @paralleldrive/cuid2
Then, create your own cuid
Field:
:::ts
import { createId } from '@paralleldrive/cuid2'
import { Fields } from 'remult'
export function MyFields_cuid<entityType = any>(
...options: FieldOptions<entityType, string>[]
) {
return Fields.id<entityType>({ idFactory: createId }, ...options)
}
Finally, replace @Fields.cuid()
with MyFields_cuid()
Full Changelog: https://github.com/remult/remult/compare/v3.0.6...v3.1.0