From 3eff44c68652e73b1e6041ed04089a935cfd6df3 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 17 Dec 2025 23:14:14 -0500 Subject: [PATCH 1/3] Docs updates for 4.x --- README.md | 39 +++++---------------------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index f7e4773..956411e 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,11 @@ addressing a single deprecation at a time, and prevents backsliding ### Compatibility +4.x + +- Ember.js 3.28 until at least 6.10 +- ember-auto-import, or embroider with webpack and vite + 3.x - Ember.js 3.28 until at least 5.4 @@ -130,40 +135,6 @@ window.deprecationWorkflow.config = { }; ``` -### Template Deprecations - -By default, the console based deprecations that occur during template -compilation are suppressed in favor of browser deprecations ran during the test -suite. If you would prefer to still have the deprecations in the console, add -the following to your `app/environment.js`: - -```javascript -module.exports = function (env) { - var ENV = {}; - - // normal things here - - ENV.logTemplateLintToConsole = true; -}; -``` - -### Configuration - -In some cases, it may be necessary to indicate a different `config` directory -from the default one (`/config`). For example, you may want the flushed -deprecations file to be referenced in a config directory like `my-config`. - -Adjust the `configPath` in your `package.json` file. The `/` will automatically -be prefixed. - -```javascript -{ - 'ember-addon': { - configPath: 'my-config' - } -} -``` - ## Contributing Details on contributing to the addon itself (not required for normal usage). From 84c0803ef41b6774289fbb31e50b830651163910 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Thu, 18 Dec 2025 10:57:29 -0500 Subject: [PATCH 2/3] Add note about production --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 956411e..9395e6d 100644 --- a/README.md +++ b/README.md @@ -114,13 +114,19 @@ By default, production ember-cli builds already remove deprecation warnings. Any deprecations configured to `throw` or `log` will only do so in non-production builds. -### Enable / Disable through configuration +### Enable / Disable -If your app has disabled test files in development environment you can force enabling this addon through configuration in `ember-cli-build.js` instead: -```javascript -'ember-cli-deprecation-workflow': { - enabled: true, -}, +inclusion of `ember-cli-deprecation-workflow` is controlled by imports, so if there is an environment that you wish to disable `ember-cli-deprecation-workflow` in, that can be controlled via `@embroider/macros` conditions + +```js +// app.js +import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros'; + +// Will only import your deprecation-workflow file while isDevelopingApp is true +// and will be stripped from your build if isDevelopingApp is false +if (macroCondition(isDevelopingApp())) { + importSync('./deprecation-workflow.js'), +} ``` ### Catch-all From ba98f36751d3e7b57e0375786b7c969612b63426 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 2 Jan 2026 15:22:39 -0500 Subject: [PATCH 3/3] Includes macros in first example --- README.md | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 9395e6d..7333e44 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,17 @@ addressing a single deprecation at a time, and prevents backsliding 3. In your `app/app.js`, do: ```js - import './deprecation-workflow'; + import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros'; + + // Will only import your deprecation-workflow file while isDevelopingApp is true + // and will be stripped from your build if isDevelopingApp is false + // + // If you want to always include deprecation-workflow, + // use: + // import './deprecation-workflow.js'; + if (macroCondition(isDevelopingApp())) { + importSync('./deprecation-workflow.js'), + } ``` 4. Run your test suite\* with `ember test --server`. @@ -108,27 +118,6 @@ nice Json like JS object with all the deprecations in your app. The pass a string that must match the console message exactly or a `RegExp` for `ember-cli-deprecation-workflow` filter the log by. -### Production builds - -By default, production ember-cli builds already remove deprecation warnings. Any -deprecations configured to `throw` or `log` will only do so in non-production -builds. - -### Enable / Disable - -inclusion of `ember-cli-deprecation-workflow` is controlled by imports, so if there is an environment that you wish to disable `ember-cli-deprecation-workflow` in, that can be controlled via `@embroider/macros` conditions - -```js -// app.js -import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros'; - -// Will only import your deprecation-workflow file while isDevelopingApp is true -// and will be stripped from your build if isDevelopingApp is false -if (macroCondition(isDevelopingApp())) { - importSync('./deprecation-workflow.js'), -} -``` - ### Catch-all To force all deprecations to throw (can be useful in larger teams to prevent