{"id":15537334,"url":"https://github.com/nullvoxpopuli/ember-addon-migrator","last_synced_at":"2025-04-15T11:17:30.600Z","repository":{"id":43292982,"uuid":"458562999","full_name":"NullVoxPopuli/ember-addon-migrator","owner":"NullVoxPopuli","description":"ember addon v1 to v2 migrator","archived":false,"fork":false,"pushed_at":"2024-10-21T13:36:16.000Z","size":1086,"stargazers_count":19,"open_issues_count":12,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T11:16:58.549Z","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/NullVoxPopuli.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-12T15:38:11.000Z","updated_at":"2024-10-21T13:36:20.000Z","dependencies_parsed_at":"2024-11-08T21:05:06.935Z","dependency_job_id":"269bd1e6-da08-4305-ba33-42631fe01276","html_url":"https://github.com/NullVoxPopuli/ember-addon-migrator","commit_stats":{"total_commits":158,"total_committers":7,"mean_commits":"22.571428571428573","dds":"0.25316455696202533","last_synced_commit":"32cee4d0375d9d8e4d03016e46f221b12d68eac2"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-addon-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-addon-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-addon-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-addon-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NullVoxPopuli","download_url":"https://codeload.github.com/NullVoxPopuli/ember-addon-migrator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249058387,"owners_count":21205911,"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-02T11:56:12.488Z","updated_at":"2025-04-15T11:17:30.572Z","avatar_url":"https://github.com/NullVoxPopuli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WARNING: this is out of date, and needs updates.\n\nI no longer convert v1 addons to v2 addons, so I stopped updating it, but I'll take PRs to fix anything that folks find.\n\n# ember-addon-migrator\n\nMigrate your V1 addons to V2 addons\n\n```bash\n# in the root of your addon\nnpx ember-addon-migrator\n```\n\nThis command will move all your addon files into two new locations:\n```\n{your-addon-name}/\n  - plain / normal npm package built with rollup\n  - src/\n    - your files that were previously in addon/\n\ntest-app/\n  - brand new ember app setup with the same ember-try config\n    as your addon was configured with\n  - tests/\n    - your files that were previously in tests/\n```\n\n_Additional tweaking may be required after the migrator runs_.\n\nBe sure to check out `npx ember-addon-migrator --help` for a full list of commands and options.\n(Noting that to see options' help, you'll need to specify the command, e.g.: `npx ember-addon-migrator extract-tests --help`)\n\n## Other Commands \n\n### `npx ember-addon-migrator extract-tests`\n\nThis command takes a v1 addon (default to the current directory), \nand pulls the tests out of it and places them in a new test app.\n\nThis is a good thing to do for repos, or projects that are generally low maintenance, \nor if the project maintainers don't have all the details on v2 addon migration.\nAdditionally! this style of workflow is much easier to review, and is the best way to transfer\nknowledge about v2 addon conversion!\n\nExample workflow:\n\n- PR: Convert project to monorepo with single workspace.\n  - move all files (except `.git`, `.github`) to a \"sub-folder\"\n  - create a root package.json / workspaces file (depending on your package-manager)\n  - add the sub-folder to the list of workspaces\n- Optional PR: convert the project to [pnpm](https://pnpm.io/).\n  npm and yarn(@v1) have a long history in the JS Ecosystem, but they are fundamentally bad at what they were designed to do, and will cause problems in monorepos -- especially as they relate to peerDependencies.\n- PR: Extract the tests from the addon to a separate test-app.\n- PR: Do an in-place conversion of the v1 addon in \"sub-folder\" to a v2 addon. \n  The default command for `ember-addon-migrator` will do this for you via `--exclude-tests` or `--in-place` (these flags are aliases of each-other)\n  \n#### Troubleshooting\n\nFor troubleshooting, please refer to the [guide](./TROUBLESHOOTING.md). \n\n\nSee `npx ember-addon-migrator extract-tests --help` for parameters' information.\n\n#### `--in-place`\n\nWhen using `--in-place` (default `true`), the v1 addon will be moved to a sub folder and the test app created along side that sub folder.\nFor example:\n```bash \n/packages/ember-stargate/{addon,addon-test-support} (v1 addon)\n =\u003e extract-tests --in-place # same as omitting `--in-place` \n /packages/ember-stargate/package (v1 addon moved to sub directory)\n /packages/ember-stargate/test-app (new app for tests, tests copied over)\n\n\n/packages/ember-stargate/{addon,addon-test-support} (v1 addon)\n =\u003e extract-tests --in-place=false \n /packages/ember-stargate (v1 addon stays put)\n /packages/test-app (new app for tests, tests copied over)\n```\n\n#### `--reuse-existing-versions`\n\nWhen the test-app is generated, instead of using the (latest) dependency versions of the app blueprint it will try to use the same versions previously used in the addon.\n\n#### `--ignore-new-dependencies`\n\nWhen the test-app is generated, any dependencies that are part of the default app blueprint which were not used before will be ignored. WARNING: there is a considerable risk that this leaves your dependencies in a broken state, use it only with great caution!\n\n### `npx ember-addon-migrator reset`\n\nResets the git workspace by running:\n```bash \ngit clean -f -d \ngit checkout .\nrm -rf node_modules\n```\n\nThis can be useful for development of the addon-migrator when trying on real projects and wanting to quickly undo work.\n\n## Compatibility\n\n - Node 16+\n\n## Contributing\n\n - clone the repo\n - `cd ember-addon-migrator`\n - `pnpm`\n - cd to your v1 addon for testing\n - run `node ../path/to/ember-addon-migrator/bin.js`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullvoxpopuli%2Fember-addon-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullvoxpopuli%2Fember-addon-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullvoxpopuli%2Fember-addon-migrator/lists"}