Socket
Socket
Sign inDemoInstall

@prisma/codemods

Package Overview
Dependencies
10
Maintainers
9
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @prisma/codemods

A collection of codemods for prisma


Version published
Weekly downloads
118
decreased by-21.33%
Maintainers
9
Install size
126 MB
Created
Weekly downloads
 

Readme

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

Last updated on 26 Jan 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc