You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/v3.5.0/configuring-ember/handling-deprecations.md
+18-21Lines changed: 18 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -9,45 +9,42 @@ Fortunately, Ember provides a way for projects to deal with deprecations in an o
9
9
10
10
## Filtering Deprecations
11
11
12
-
When your project has a lot of deprecations, you can start by filtering out deprecations that do not have to be addressed right away. You
13
-
can use the [deprecation handlers](https://emberjs.com/api/ember/2.15/classes/Ember.Debug/methods/registerDeprecationHandler?anchor=registerDeprecationHandler) API to check for what
14
-
release a deprecated feature will be removed. An example handler is shown below that filters out all deprecations that are not going away
15
-
in release 2.0.0.
16
-
12
+
When your project has a lot of deprecations, you can start by filtering out deprecations that do not have to be addressed right away.
13
+
You can use the [deprecation handlers](https://www.emberjs.com/api/ember/release/functions/@ember%2Fdebug/registerDeprecationHandler) API to check for what release a deprecated feature will be removed.
14
+
An example handler is shown below that filters out all deprecations that are not going away in release 2.0.0.
if (options &&options.until&&options.until!=='2.0.0') {
23
+
return;
24
+
} else {
25
+
next(message, options);
26
+
}
27
+
});
31
28
}
32
29
33
30
exportdefault { initialize };
34
31
```
35
32
36
-
The deprecation handler API was released in Ember 2.1. If you would like to leverage this API in a prior release of Ember you can install
37
-
the [ember-debug-handlers-polyfill](http://emberobserver.com/addons/ember-debug-handlers-polyfill) addon into your project.
33
+
The deprecation handler API was released in Ember 2.1.
34
+
If you would like to leverage this API in a prior release of Ember you can install the [ember-debug-handlers-polyfill](http://emberobserver.com/addons/ember-debug-handlers-polyfill) addon into your project.
38
35
39
36
## Deprecation Workflow
40
37
41
-
Once you've removed deprecations that you may not need to immediately address, you may still be left with many deprecations. Also, your remaining
42
-
deprecations may only occur in very specific scenarios that are not obvious. How then should you go about finding and fixing these? This
43
-
is where the [ember-cli-deprecation-workflow](http://emberobserver.com/addons/ember-cli-deprecation-workflow) addon can be extremely helpful.
38
+
Once you've removed deprecations that you may not need to immediately address, you may still be left with many deprecations.
39
+
Also, your remaining deprecations may only occur in very specific scenarios that are not obvious.
40
+
How then should you go about finding and fixing these?
41
+
This is where the [ember-cli-deprecation-workflow](http://emberobserver.com/addons/ember-cli-deprecation-workflow) addon can be extremely helpful.
44
42
45
43
Once installed, the addon works in 3 steps:
46
44
47
45
### 1. Gather deprecations into one source
48
46
49
-
The ember-cli-deprecation-workflow addon provides a command that will collect deprecations from your console and generate JavaScript code listing
50
-
its findings.
47
+
The `ember-cli-deprecation-workflow` addon provides a command that will collect deprecations from your console and generate JavaScript code listing its findings.
51
48
52
49
To collect deprecations, first run your in-browser test suite by starting your development server and navigating to [`http://localhost:4200/tests`](http://localhost:4200/tests). If your test suite isn't fully covering your app's functionality, you may also
53
50
manually exercise functionality within your app where needed. Once you've exercised the app to your satisfaction, run the following command within
Copy file name to clipboardExpand all lines: guides/v3.6.0/configuring-ember/handling-deprecations.md
+18-21Lines changed: 18 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -9,45 +9,42 @@ Fortunately, Ember provides a way for projects to deal with deprecations in an o
9
9
10
10
## Filtering Deprecations
11
11
12
-
When your project has a lot of deprecations, you can start by filtering out deprecations that do not have to be addressed right away. You
13
-
can use the [deprecation handlers](https://emberjs.com/api/ember/2.15/classes/Ember.Debug/methods/registerDeprecationHandler?anchor=registerDeprecationHandler) API to check for what
14
-
release a deprecated feature will be removed. An example handler is shown below that filters out all deprecations that are not going away
15
-
in release 2.0.0.
16
-
12
+
When your project has a lot of deprecations, you can start by filtering out deprecations that do not have to be addressed right away.
13
+
You can use the [deprecation handlers](https://www.emberjs.com/api/ember/release/functions/@ember%2Fdebug/registerDeprecationHandler) API to check for what release a deprecated feature will be removed.
14
+
An example handler is shown below that filters out all deprecations that are not going away in release 2.0.0.
if (options &&options.until&&options.until!=='2.0.0') {
23
+
return;
24
+
} else {
25
+
next(message, options);
26
+
}
27
+
});
31
28
}
32
29
33
30
exportdefault { initialize };
34
31
```
35
32
36
-
The deprecation handler API was released in Ember 2.1. If you would like to leverage this API in a prior release of Ember you can install
37
-
the [ember-debug-handlers-polyfill](http://emberobserver.com/addons/ember-debug-handlers-polyfill) addon into your project.
33
+
The deprecation handler API was released in Ember 2.1.
34
+
If you would like to leverage this API in a prior release of Ember you can install the [ember-debug-handlers-polyfill](http://emberobserver.com/addons/ember-debug-handlers-polyfill) addon into your project.
38
35
39
36
## Deprecation Workflow
40
37
41
-
Once you've removed deprecations that you may not need to immediately address, you may still be left with many deprecations. Also, your remaining
42
-
deprecations may only occur in very specific scenarios that are not obvious. How then should you go about finding and fixing these? This
43
-
is where the [ember-cli-deprecation-workflow](http://emberobserver.com/addons/ember-cli-deprecation-workflow) addon can be extremely helpful.
38
+
Once you've removed deprecations that you may not need to immediately address, you may still be left with many deprecations.
39
+
Also, your remaining deprecations may only occur in very specific scenarios that are not obvious.
40
+
How then should you go about finding and fixing these?
41
+
This is where the [ember-cli-deprecation-workflow](http://emberobserver.com/addons/ember-cli-deprecation-workflow) addon can be extremely helpful.
44
42
45
43
Once installed, the addon works in 3 steps:
46
44
47
45
### 1. Gather deprecations into one source
48
46
49
-
The ember-cli-deprecation-workflow addon provides a command that will collect deprecations from your console and generate JavaScript code listing
50
-
its findings.
47
+
The `ember-cli-deprecation-workflow` addon provides a command that will collect deprecations from your console and generate JavaScript code listing its findings.
51
48
52
49
To collect deprecations, first run your in-browser test suite by starting your development server and navigating to [`http://localhost:4200/tests`](http://localhost:4200/tests). If your test suite isn't fully covering your app's functionality, you may also
53
50
manually exercise functionality within your app where needed. Once you've exercised the app to your satisfaction, run the following command within
0 commit comments