Skip to content

Commit

Permalink
We don't need deprecation-workflow (the package). See: ember-cli/embe…
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 9, 2024
1 parent a7f56c3 commit 74c09ff
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 31 deletions.
38 changes: 14 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tests/test-app/app/app.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import Application from '@ember/application';
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';

import loadInitializers from 'ember-load-initializers';
import Resolver from 'ember-resolver';
import config from 'test-app/config/environment';

if (macroCondition(isDevelopingApp())) {
importSync('test-app/deprecation-workflow');
}

export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Expand Down
23 changes: 23 additions & 0 deletions tests/test-app/app/deprecation-workflow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { registerDeprecationHandler } from '@ember/debug';

import config from 'test-app/config/environment';

const SHOULD_THROW = config.environment !== 'production';
const SILENCED_DEPRECATIONS: string[] = [
// Add ids of deprecations you temporarily want to silence here.
];

registerDeprecationHandler((message, options, next) => {
if (!options) {
console.error('Missing options');
throw new Error(message);
}

if (SILENCED_DEPRECATIONS.includes(options.id)) {
return;
} else if (SHOULD_THROW) {
throw new Error(message);
}

next(message, options);
});
6 changes: 0 additions & 6 deletions tests/test-app/config/deprecation-workflow.js

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0",
"ember-cli-dependency-checker": "^3.3.2",
"ember-cli-deprecation-workflow": "^2.2.0",
"ember-cli-htmlbars": "^6.3.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-load-initializers": "^2.1.2",
Expand Down Expand Up @@ -99,6 +98,7 @@
},
"dependencies": {
"@ember/test-waiters": "^3.1.0",
"@embroider/macros": "^1.13.4",
"@nullvoxpopuli/eslint-configs": "^3.2.2",
"ember-concurrency": "^3.1.1",
"ember-resources": "^6.4.2",
Expand Down

0 comments on commit 74c09ff

Please sign in to comment.