{"id":13805562,"url":"https://github.com/ember-cli/ember-cli-deprecation-workflow","last_synced_at":"2025-06-24T11:06:56.369Z","repository":{"id":35284339,"uuid":"39545223","full_name":"ember-cli/ember-cli-deprecation-workflow","owner":"ember-cli","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-21T11:44:06.000Z","size":1689,"stargazers_count":165,"open_issues_count":25,"forks_count":44,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-14T05:22:15.878Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-cli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2015-07-23T04:13:31.000Z","updated_at":"2025-03-21T11:43:31.000Z","dependencies_parsed_at":"2023-01-15T17:45:52.127Z","dependency_job_id":"c8bc07a7-3d23-49bc-b197-8a02fa5dc8ec","html_url":"https://github.com/ember-cli/ember-cli-deprecation-workflow","commit_stats":{"total_commits":178,"total_committers":34,"mean_commits":5.235294117647059,"dds":0.797752808988764,"last_synced_commit":"aa03333c222ccaa2d6fe879ea38b8f19a9626cb6"},"previous_names":["ember-cli/ember-cli-deprecation-workflow","mixonic/ember-cli-deprecation-workflow"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/ember-cli/ember-cli-deprecation-workflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-deprecation-workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-deprecation-workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-deprecation-workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-deprecation-workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-cli","download_url":"https://codeload.github.com/ember-cli/ember-cli-deprecation-workflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-deprecation-workflow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260577460,"owners_count":23030738,"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-04T01:01:02.361Z","updated_at":"2025-06-24T11:06:56.346Z","avatar_url":"https://github.com/ember-cli.png","language":"JavaScript","readme":"# ember-cli-deprecation-workflow\n\nAn addon geared towards making Ember upgrades easier by allowing you to work\nthrough deprecations without massive console noise.\n\n## History\n\nUpgrading Ember versions can be very daunting. One of the largest factors is the\nmassive `console.log` noise that the deprecations introduced in those versions\n(to help us know what we need to do to stay up to date) is so overwhelming that\nwe quite literally have no idea what to do.\n\nThe \"deprecation spew\" issue became very obvious as we progressed into the later\n1.13 beta releases. At that point, [@mixonic](https://twitter.com/mixonic) and\n[@rwjblue](https://twitter.com/rwjblue) came up with a wild scheme.\n\nThe scheme was to build tooling which made dealing with deprecations an\nincremental process. ember-cli-deprecation-workflow allows you to focus on\naddressing a single deprecation at a time, and prevents backsliding\n(re-introduction of a deprecated API use) in a codebase.\n\n## Usage\n\n### Compatibility\n\n3.x\n\n- Ember.js 3.28 until at least 5.4\n- Ember CLI 4.12 or above\n- Node.js 16 or above\n\n2.x\n\n- Ember.js 2.12 until at least 4.12\n- Ember CLI 3.16 or above\n- Node.js 12 and 14 or above\n\n1.x\n\n- Ember.js 1.13 until at least 3.4\n- Ember CLI 3.4 as well as many versions before and after\n- Node.js 6, 8, and 10 until at least 14\n\n### Getting started\n\n1. Install the ember-cli-deprecation-workflow addon (`ember install ember-cli-deprecation-workflow`).\n2. Create an `app/deprecation-workflow.js` file with the following content:\n    \n    ```js\n    import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';\n\n    setupDeprecationWorkflow();\n    ```\n\n3. In your `app/app.js`, do: \n\n    ```js\n    import './deprecation-workflow';\n    ```\n\n4. Run your test suite\\* with `ember test --server`.\n5. Navigate to your tests (default: http://localhost:7357/)\n6. Run `deprecationWorkflow.flushDeprecations()` in your browsers console. Or `flushDeprecations({ handler: 'log' })` if you want a different [handler](#handlers) than the default of `silence`.\n7. Copy the string output and overwrite the content of `app/deprecation-workflow.js`.\n\n    In Chrome, use right click → \"Copy string contents\" to avoid escape characters.\n\nOnce this initial setup is completed the \"deprecation spew\" should be largely\n\"fixed\". Only unhandled deprecations will be displayed in your console.\n\n\\*Note: Unless your test coverage is amazing (\u003e90%), it's likely that running\nthe test suite alone will not reveal _every_ deprecation. It may be prudent to\nrun through the app's workflows live and flush deprecations a second time,\nmerging the resulting output list with that generated from your test suite.\n\nNow that the spew has settled down, you can process one deprecation at a time while ensuring that no new deprecations are introduced.\n\n### Workflow\n\nWhat does that individual deprecation workflow look like?\n\n1. Change one entry in `app/deprecation-workflow.js` from `silence` to `throw`.\n2. Run your tests or use your application.\n3. Errors will be thrown for just that one deprecation, and you can track down the fixes needed in relative isolation of the rest of the deprecations.\n4. Once the deprecation has been dealt with, remove its entry from `app/deprecation-workflow.js`.\n5. Lather and repeat.\n\n### Handlers\n\nThere are 3 defined handlers that have different behaviors\n\n| Handler   | Behavior                                                                                                         |\n| --------- | ---------------------------------------------------------------------------------------------------------------- |\n| `silence` | Keeps this deprecation from spewing all over the console                                                         |\n| `log`     | Normal deprecation behavior runs for this deprecation and messages are logged to the console                     |\n| `throw`   | The error is thrown instead of allowing the deprecated behavior to run. **_WARNING: APPLICATION MAY GO :boom:_** |\n\n### Matchers\n\nthe output from running `deprecationWorkflow.flushDeprecations()` gives you a\nnice Json like JS object with all the deprecations in your app. The\n`matchMessage` property determines what to filter out of the console. You can\npass a string that must match the console message exactly or a `RegExp` for\n`ember-cli-deprecation-workflow` filter the log by.\n\n### Production builds\n\nBy default, production ember-cli builds already remove deprecation warnings. Any\ndeprecations configured to `throw` or `log` will only do so in non-production\nbuilds.\n\n### Enable / Disable through configuration\n\nIf your app has disabled test files in development environment you can force enabling this addon through configuration in `ember-cli-build.js` instead:\n```javascript\n'ember-cli-deprecation-workflow': {\n  enabled: true,\n},\n```\n\n### Catch-all\n\nTo force all deprecations to throw (can be useful in larger teams to prevent\naccidental introduction of deprecations), update your\n`app/deprecation-workflow.js`:\n\n```javascript\nwindow.deprecationWorkflow.config = {\n  throwOnUnhandled: true,\n};\n```\n\n### Template Deprecations\n\nBy default, the console based deprecations that occur during template\ncompilation are suppressed in favor of browser deprecations ran during the test\nsuite. If you would prefer to still have the deprecations in the console, add\nthe following to your `app/environment.js`:\n\n```javascript\nmodule.exports = function (env) {\n  var ENV = {};\n\n  // normal things here\n\n  ENV.logTemplateLintToConsole = true;\n};\n```\n\n### Configuration\n\nIn some cases, it may be necessary to indicate a different `config` directory\nfrom the default one (`/config`). For example, you may want the flushed\ndeprecations file to be referenced in a config directory like `my-config`.\n\nAdjust the `configPath` in your `package.json` file. The `/` will automatically\nbe prefixed.\n\n```javascript\n{\n  'ember-addon': {\n    configPath: 'my-config'\n  }\n}\n```\n\n## Contributing\n\nDetails on contributing to the addon itself (not required for normal usage).\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","funding_links":[],"categories":["Packages"],"sub_categories":["Command-line utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fember-cli-deprecation-workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-cli%2Fember-cli-deprecation-workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fember-cli-deprecation-workflow/lists"}