{"id":16611975,"url":"https://github.com/valerybugakov/codemods","last_synced_at":"2025-04-05T00:16:47.225Z","repository":{"id":49721449,"uuid":"218590836","full_name":"valerybugakov/codemods","owner":"valerybugakov","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-04T23:47:27.000Z","size":202,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-10T08:32:29.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valerybugakov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-30T18:02:22.000Z","updated_at":"2023-03-04T04:38:19.000Z","dependencies_parsed_at":"2023-02-03T00:30:36.987Z","dependency_job_id":null,"html_url":"https://github.com/valerybugakov/codemods","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerybugakov%2Fcodemods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerybugakov%2Fcodemods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerybugakov%2Fcodemods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valerybugakov%2Fcodemods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valerybugakov","download_url":"https://codeload.github.com/valerybugakov/codemods/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266567,"owners_count":20910837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T01:40:25.233Z","updated_at":"2025-04-05T00:16:47.201Z","avatar_url":"https://github.com/valerybugakov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JS codemods\n\nPreview code AST of the target code using [AST explorer](https://astexplorer.net/).\nTo interactively test and update codemods might be helpful to use [ndb](https://github.com/GoogleChromeLabs/ndb).\n\n```sh\nndb npx jscodeshift -t ./transforms/something.js --extensions=ts --parser=tsx ./src/**/*container.ts\n```\n\n## Usage\n\n1. `yarn`\n2. `npx jscodeshift -t ./transforms/[transform].js [files]`\n3. Review changes via `git diff`. Keep what you want, throw it out if you don't. Magic!\n\n## Option flags\n\nWhen executing codemods, you can configure options like so:\n\n`npx jscodeshift -t node_modules/5to6-codemod/transforms/[transform].js [files] --key=value`\n\n### Recast options\n\nTransforms will automatically distinguish and pass through Recast config keys via [jscodeshift](https://github.com/facebook/jscodeshift#passing-options-to-recast). Official documentation for Recast's configuration can be found [here](https://github.com/benjamn/recast/blob/4899a70d4b9aeec9c599065be3338464b7047767/lib/options.js#L1). The following Recast keys are supported:\n\n- `esprima`\n- `inputSourceMap`\n- `lineTerminator`\n- `quote`\n- `range`\n- `reuseWhitespace`\n- `sourceFileName`\n- `sourceMapName`\n- `sourceRoot`\n- `tabWidth`\n- `tolerant`\n- `trailingComma`\n- `useTabs`\n- `wrapColumn`\n\n## Known issues\n\nSome TS features might not work because latest release of jscodeshift is not yet published to NPM.\nhttps://github.com/facebook/jscodeshift/issues/330\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalerybugakov%2Fcodemods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalerybugakov%2Fcodemods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalerybugakov%2Fcodemods/lists"}