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

@prisma/codemods

Package Overview
Dependencies
Maintainers
9
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.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
248
increased by36.26%
Maintainers
9
Weekly downloads
 
Created
Source

Prisma Codemods

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=client      Useful when importing an already instantiated (i.e import client from './client')

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 && yarn watch

In a separate terminal you can then run

yarn cli --help

Testing

yarn test

FAQs

Package last updated on 26 Jan 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