{"id":13533549,"url":"https://github.com/caseywatts/ember-cli-mirage-faker-codemod","last_synced_at":"2025-04-01T21:32:27.935Z","repository":{"id":145069790,"uuid":"145460959","full_name":"caseywatts/ember-cli-mirage-faker-codemod","owner":"caseywatts","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-23T22:42:08.000Z","size":113,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-02T20:33:16.713Z","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/caseywatts.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-20T19:22:17.000Z","updated_at":"2020-08-21T06:22:56.000Z","dependencies_parsed_at":"2024-01-27T09:39:40.045Z","dependency_job_id":"6ec4081e-e6b7-41e7-b365-60c4709a765e","html_url":"https://github.com/caseywatts/ember-cli-mirage-faker-codemod","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/caseywatts%2Fember-cli-mirage-faker-codemod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywatts%2Fember-cli-mirage-faker-codemod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywatts%2Fember-cli-mirage-faker-codemod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywatts%2Fember-cli-mirage-faker-codemod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caseywatts","download_url":"https://codeload.github.com/caseywatts/ember-cli-mirage-faker-codemod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713451,"owners_count":20821891,"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-08-01T07:01:20.872Z","updated_at":"2025-04-01T21:32:27.574Z","avatar_url":"https://github.com/caseywatts.png","language":"JavaScript","funding_links":[],"categories":["Frameworks","Packages"],"sub_categories":["Ember.js","Codemods"],"readme":"This codemod is to help transition from importing `faker` through `ember-cli-mirage`, to instead import it directly from `faker`.\r\n\r\nFor more background on the situation, see [this github issue](https://github.com/samselikoff/ember-cli-mirage/issues/1037#issuecomment-411452618).\r\n\r\n\r\n## How To Remove The Faker Dependency\r\n\r\n### Install faker and ember-auto-import\r\n```\r\nyarn add faker\r\ngit add . \u0026\u0026 git commit -m \"adding faker package\"\r\nember install ember-auto-import\r\ngit add . \u0026\u0026 git commit -m \"installing ember-auto-import package\"\r\n```\r\n\r\nadd to your `ember-cli-build.js`:\r\n```\r\n    autoImport: {\r\n      alias: {\r\n        'faker': 'build/build/faker'\r\n      }\r\n    }\r\n```\r\n\r\n```\r\ngit add . \u0026\u0026 git commit -m \"telling ember-cli-build where to find faker\"\r\n```\r\n\r\n### Run the codemod\r\nThis example will run the codemod on all files in the `./tests` folder. Then you can selectively check in as many changes as you'd like to keep (try `git add -p`!).\r\n\r\n```\r\nnpm install -g jscodeshift\r\njscodeshift -t https://raw.githubusercontent.com/caseywatts/ember-cli-mirage-faker-codemod/master/transform.js ./tests\r\n```\r\n\r\n- If you find additional edge cases, please clone this repo and contribute :D\r\n- Don't be afraid of codemods, check out Casey's [tutorial](https://caseywatts.com/2018/08/23/codemods.html)\r\n\r\n## How do codemods even?\r\n\r\nIf this is your first codemod (it's mine!), [I wrote a lot about how I got up and running with codemods - check it out!](https://caseywatts.com/2018/08/23/codemods.html)\r\n\r\n\r\n## Development\r\n\r\n```\r\ngit clone https://github.com/caseywatts/ember-cli-mirage-faker-codemod`\r\ncd ember-cli-mirage-faker-codemod`\r\nnpm install\r\nnpm test\r\nnpm run codemod path/to/directories/or/files/you/want\r\n```\r\n\r\nMake sure to add test cases to the `__testfixtures__` (see the [tutorial](https://caseywatts.com/2018/08/23/codemods.html) for details).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseywatts%2Fember-cli-mirage-faker-codemod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaseywatts%2Fember-cli-mirage-faker-codemod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseywatts%2Fember-cli-mirage-faker-codemod/lists"}