JSCodeshiftTransformer (autotransform.transformer.jscodeshift)
The implementation for the JSCodeshiftTransformer. See https://github.com/facebook/jscodeshift
- class autotransform.transformer.jscodeshift.JSCodeshiftTransformer(*, js_transform: str, args: ~typing.List[str] = <factory>, timeout: int = 600)
Bases:
SingleTransformerA Transformer that makes changes using JSCodeshift.
- js_transform
The JSCodeshift transform to execute.
- Type:
str
- args
The arguments to supply to the transformation. Defaults to [].
- Type:
optional, List[str]
- timeout
The timeout for an individual run.
- Type:
optional, int
- name
The name of the component.
- Type:
ClassVar[TransformerName]
- args: List[str]
- js_transform: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: ClassVar[TransformerName] = 'jscodeshift'
- timeout: int