Releases: premieroctet/next-crud
Releases · premieroctet/next-crud
v4.0.1
v4.0.0
New feature
- Add App Router support #53
Breaking changes
onRequest
,onSuccess
and middlewares no longer accepts the response parameter.onRequest
can now return a Response. If thats the case, the CRUD handlers will be skipped.onRequest
,onSuccess
and middleware's request parameter will now contain an object withbody
,url
,method
andheaders
(https://github.com/premieroctet/next-crud/blob/v4.0.0/src/types.ts#L204)
v3.0.0
v2.3.2
v2.3.1
- add default expose strategy option (#37) (2ebddee)
- Fix PrismaAdapter for prisma 4 (#39) (#40) (16257be)
Breaking change
The NextCrud
function is now asynchronous, which requires to change the way you are creating the handler.
Old version:
const handler = NextCrud({
adapter: new PrismaAdapter({
prismaClient: myPrismaClientInstance,
}),
})
export default handler
New version:
const handler = async (req, res) => {
const nextCrudHandler = await NextCrud({
adapter: new PrismaAdapter({
prismaClient: myPrismaClientInstance,
}),
})
return nextCrudHandler(req, res)
}
export default handler
v2.2.0
v2.1.4
v2.1.3
v2.0.0
Breaking Changes
NextCrud
You can now move your NextCrud
function(s) to a single file, for example under pages/api/[...nextcrud].ts
. Check the documentation for more info.
Prisma adapter
You will need to pass the prisma client instance as a parameter of the instance.
The resourceName
property has been removed.
More info on the on the documentation
New feature
We now support Swagger. For Prisma user, you have nothing to do. For non Prisma users, you will need to implement the getModelsJsonSchema
. More info on the documentation