0.5.12 • Published 1 month ago

@fluentui-react-native/codemods v0.5.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@fluentui-react-native/transforms

This package supplies transforms that help with refactoring FURN code. The transforms are passed into jscodeshift to transform code.

Usage

  1. Install jscodeshift using the instructions here
  2. Run the transforms using the following command:
npx -p @fluentui-react-native/codemods transform -t <transform_name> --path <path_to_files_to_transform>

For example

npx -p @fluentui-react-native/codemods transform -t button-v0-to-v1 --path .\apps\fluent-tester\src\TestComponents\Button\deprecated\ButtonFocusTest.tsx

Tests

Test files are named in the format <transform>-test.ts. The "defineTest" from jscodeshift is used to run the test. Each test has an input and output file under the __testfixtures__ folder. The input is an example of code before the transform is run, and the output is what the code should look like after running the transform. Using this, we can ensure that the codemod works the way we intend to.

One caveat is that the codemod doesn't quite respect Prettier settings and doesn't seem to correctly format the output. So the output files are ignored by Prettier.

0.5.12

1 month ago

0.5.11

2 months ago

0.5.10

3 months ago

0.5.9

5 months ago

0.5.8

5 months ago

0.5.7

5 months ago

0.5.6

5 months ago

0.5.5

5 months ago

0.5.4

6 months ago

0.5.3

7 months ago

0.5.2

7 months ago

0.5.1

7 months ago

0.5.0

11 months ago

0.4.0

12 months ago

0.3.9

1 year ago

0.3.11

12 months ago

0.3.10

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.2

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.2.10

1 year ago

0.3.0

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.3

2 years ago

0.3.1

1 year ago

0.2.5

1 year ago

0.2.4

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.2.2

2 years ago

0.1.0

2 years ago