relayjs/relay-codemod

Name: relay-codemod

Owner: relayjs

Description: A set of utility scripts, written using jscodeshift, that can be used by community members and Facebook alike to upgrade Relay APIs in an automated fashion.

Created: 2016-01-05 20:48:24.0

Updated: 2017-11-14 05:50:23.0

Pushed: 2017-06-20 16:42:35.0

Homepage: null

Size: 14

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

relay-codemod Build Status

This repository contains a collection of codemod scripts based for use with JSCodeshift that help update Relay APIs.

Setup & run
Included scripts
upgrade-store-api-0.8
deshift -t relay-codemod/transforms/upgrade-store-api-0.8.js <file>

Updates method calls on Relay.Store that were removed in Relay 0.8.0:

upgrade-requires-1.0
deshift -t relay-codemod/transforms/upgrade-requires-1.0.js <file>

Replaces requires to /classic for upgrading to 1.0.0:

migrate-to-modern-1.0
deshift -t relay-codemod/transforms/migrate-to-modern-1.0.js <file>

Attempts (in a crude way) to migrate classic APIs to modern ones.

Caveats for initial version:

Recast options

Options to recast's printer can be provided through the printOptions command line argument


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.