Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
prisma-case-format
Advanced tools
As of prisma@2.19.0
, prisma introspect
will name its model 1:1 with your database's conventions. That's great, but if your db is purely snake_case
, or worse if your tables lack any common convention, it can make the autogenerated client code less pleasant to consume. prisma-case-format
will format your table and field names for every model as to enforce a more conventional experience.
❯ prisma-case-format --help
Usage: prisma-case-format [options]
Give your schema.prisma sane naming conventions
Options:
--file <file> schema.prisma file location (default: "schema.prisma")
--table-case <tableCase> case convention for table names. allowable values: "pascal", "camel", "snake" (default: "pascal")
--field-case <fieldCase> case convention for field names. allowable values: "pascal", "camel", "snake" (default: "camel")
-D, --dry-run print changes to console, rather than back to file (default: false)
-h, --help display help for command
// schema.prisma before
...
model house_rating {
id Int @id @default(autoincrement())
house_id String
house house @relation(fields: [house_id], references: [id])
...
}
...
model house {
id String @id @default(uuid())
house_ratings house_rating[]
...
}
...
❯ prisma-case-format
✨ Done.
// schema.prisma after
...
model HouseRatings {
id Int @id @default(autoincrement())
houseId String @map("house_id")
house House @relation(fields: [houseId], references: [id])
...
@@map("house_ratings")
}
...
model House {
id String @id @default(uuid())
houseRatings HouseRating[]
...
@@map("house")
}
...
This project is not affiliated with the official Prisma team.
FAQs
Give your introspected schema.prisma sane casing conventions
The npm package prisma-case-format receives a total of 18,815 weekly downloads. As such, prisma-case-format popularity was classified as popular.
We found that prisma-case-format demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.