@vtex/shoreline-codemod

0.5.0 • Public • Published

Shoreline Codemod

This repository contains a collection of codemod scripts to use with JSCodeshift that help update to Shoreline's API.

Usage

npx shoreline-codemod <transform> <path> [...options]

  • transform - name of transform, see available transforms below.
  • path - files or directory to transform
  • use the --dry option for a dry-run and use --print to print the output for comparison

This will start an interactive wizard, and then run the specified transform.

Developing

To add a new codemod script add the new function to a js file in ./src and add a test with test cases in the /__tests__ folder. You can use AST explorer to help during the development process and consult JSCodeshift's documentation for help.

To run the tests for your transform run jest in this package's scope:

pnpm jest

Since the rest of the monorepo uses vitest for testing, the tests in this package won't be run on CI/CD actions along with the other tests.

/@vtex/shoreline-codemod/

    Package Sidebar

    Install

    npm i @vtex/shoreline-codemod

    Weekly Downloads

    2

    Version

    0.5.0

    License

    MIT

    Unpacked Size

    47.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • jardelymaris
    • denissilvavtex
    • eduardocesb
    • enzomerca
    • vinhags
    • zaedyvtex
    • filafb
    • bastotec
    • arthurtriis1vtex
    • geraldo.fernandes
    • georgebrindeiro
    • filipewl
    • emersonvtex
    • rodrigo.albuquerque
    • viniciuslouzadavtex
    • npedrosovtex
    • myllena.alves
    • mendescamara
    • mauro.takeda
    • lpolon
    • gianvittorio
    • eduardoformiga
    • vcnovaes
    • dpzvtex
    • vtexlab-user
    • wender
    • natamelo
    • mairatma
    • mayzabel
    • augusto.lazaro
    • rafarubim
    • gustavorosolem
    • arthurepc
    • jeymisson
    • victorhmp
    • lurian
    • arturpimentel
    • anitavincent
    • brunojdo
    • lucasecdb
    • matheusps
    • emersonlaurentino
    • viniagostini
    • lucasaarcoverde
    • lariciamota
    • icazevedo
    • fabits
    • mateuspontes
    • gmantiqueira
    • vitorlgomes
    • rodolfoams
    • policarpo
    • marcelovicentegc
    • maianabt
    • jeffersontuc
    • hiagolcm
    • william.silva