{"id":13799440,"url":"https://github.com/avajs/ava-codemods","last_synced_at":"2025-05-13T08:31:13.745Z","repository":{"id":57187692,"uuid":"55269267","full_name":"avajs/ava-codemods","owner":"avajs","description":"Codemods for AVA","archived":true,"fork":false,"pushed_at":"2018-12-26T15:21:09.000Z","size":418,"stargazers_count":68,"open_issues_count":1,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-06T07:26:49.783Z","etag":null,"topics":["ava","codemod","jscodeshift","migration","nodejs","tape"],"latest_commit_sha":null,"homepage":"https://ava.li","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avajs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-02T00:02:09.000Z","updated_at":"2024-08-12T10:51:43.000Z","dependencies_parsed_at":"2022-08-28T13:00:23.318Z","dependency_job_id":null,"html_url":"https://github.com/avajs/ava-codemods","commit_stats":null,"previous_names":["jamestalmage/ava-codemods"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avajs%2Fava-codemods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avajs%2Fava-codemods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avajs%2Fava-codemods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avajs%2Fava-codemods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avajs","download_url":"https://codeload.github.com/avajs/ava-codemods/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253451476,"owners_count":21910711,"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":["ava","codemod","jscodeshift","migration","nodejs","tape"],"created_at":"2024-08-04T00:01:02.768Z","updated_at":"2025-05-13T08:31:13.712Z","avatar_url":"https://github.com/avajs.png","language":"JavaScript","readme":"# ava-codemods [![Build Status](https://travis-ci.org/avajs/ava-codemods.svg?branch=master)](https://travis-ci.org/avajs/ava-codemods)\n\nTranslations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/related/ava-codemods/readme.md)\n\n\u003e Codemods for [AVA](https://ava.li) that simplifies upgrading to newer versions and migrating to AVA\n\n\u003cimg src=\"screenshot.gif\" width=\"440\" align=\"right\"\u003e\n\nCodemods are small programs that help you automate changes to your codebase. Think of them as search and replace on steroids.\n\nThis module contains a set of codemods that enable you to upgrade your code between various AVA releases and migrate from existing test runners to AVA. It is maintained by the AVA team, and will be updated anytime we introduce breaking API changes.\n\n\n## Install\n\n```\n$ npm install --global ava-codemods\n```\n\nThis installs two binaries `ava-codemods` and `tape-to-ava`.\n\n\n## Migrating to AVA\n\nCurrently we support migrating from [tape](https://github.com/substack/tape) to AVA.\n\n```\n$ tape-to-ava --help\n\n\tUsage\n\t  $ tape-to-ava \u003cpath\u003e [options]\n\n\tpath\tFiles or directory to transform. Can be a glob like src/**.test.js\n\n\tOptions\n\t  --force, -f\tBypass Git safety checks and forcibly run codemods\n\t  --dry, -d\t\tDry run (no changes are made to files)\n\t  --parser\t\tThe parser to use for parsing your source files (babel | babylon | flow)  [babel]\n```\n\nTo transform all test files in a directory run `tape-to-ava mySrcFolder` in your terminal. Only files requiring or importing tape will be transformed. Notice the console output for errors, manual intervention might be required.\n\nAs we cannot statically determine if your sequential tape tests are able to run in parallel, all tests are transformed into `test.serial`. To speed up the AVA test execution you can remove `.serial` where applicable.\n\n\n## Upgrade AVA version\n\n```\n$ ava-codemods --help\n\n  Usage\n    $ ava-codemods [\u003cfile|glob\u003e ...]\n\n  Options\n    --force, -f    Bypass safety checks and forcibly run codemods\n\n  Available upgrades\n    - 0.16.x → 0.17.x\n    - 0.13.x → 0.14.x\n```\n\nSimply run `ava-codemods` in your terminal and answer a few questions. You can pass a filename directly to the CLI. If you do not, you will be prompted for one.\n\nEnsure you have a backup of your tests or commit the latest changes before running this.\n\n\n### Supported codemods\n\n#### Upgrading to 0.17.x\n\n- Renaming `t.error()` to `t.ifError()`\n\n#### Upgrading to 0.14.x\n\n- Renaming `t.ok()` to `t.truthy()`\n- Renaming `t.notOk()` to `t.falsy()`\n- Renaming `t.same()` to `t.deepEqual()`\n- Renaming `t.notSame()` to `t.notDeepEqual()`\n\n\n## License\n\nMIT © [James Talmage](https://github.com/jamestalmage)\n","funding_links":[],"categories":["Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favajs%2Fava-codemods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favajs%2Fava-codemods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favajs%2Fava-codemods/lists"}