Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prisma/codemods

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma/codemods

A collection of codemods for Prisma

  • 0.7.1-next.1
  • next
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-84.94%
Maintainers
5
Weekly downloads
 
Created
Source

npm

npm

A Collection of Codemods for Prisma

Usage

Usage

  $ npx @prisma/codemods <transform> <path> <...options>
  transform    One of the choices from https://github.com/prisma/codemods#transforms
  path         Directory of your app. i.e ./my-awesome-project
 Options
  -(-f)orce                   Bypass Git safety checks and forcibly run codemods
  -(-s)chemaPath              Specify a path to your ./prisma/schema.prisma
  -(-d)ry                     Dry run (no changes are made to files)
  -(-p)rint                   Print transformed files to your terminal
  --instanceNames=myClient    Useful when importing an already instantiated client (i.e import myClient from './myClient')

Transforms

<transform>DescriptionExample
namespaceCodemod for @prisma/client namespace changenpx @prisma/codemods namespace ./my-project
findUniqueConverts prisma.x.findOne to prisma.x.findUniquenpx @prisma/codemods findUnique ./my-project
to$to$: Converts deprecated prisma.x methods to prisma.$xnpx @prisma/codemods to$ ./my-project
update-2.12Includes namespace/findUnique/to$npx @prisma/codemods update-2.12 ./my-project

Development

git clone https://github.com/prisma/codemods.git
cd codemods
yarn cli --help

Testing

If you make changes be sure to use yarn watch or yarn build before running your tests

yarn test

FAQs

Package last updated on 08 Sep 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc