-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecated injections in Ember 4.x #900
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,6 @@ | ||||||||||||
/* globals najax */ | ||||||||||||
import Ember from 'ember'; | ||||||||||||
import { gte } from 'ember-compatibility-helpers'; | ||||||||||||
|
||||||||||||
const { get } = Ember; | ||||||||||||
|
||||||||||||
|
@@ -30,7 +31,10 @@ export default { | |||||||||||
|
||||||||||||
initialize: function(application) { | ||||||||||||
application.register('ajax:node', nodeAjax, { instantiate: false }); | ||||||||||||
application.inject('adapter', '_ajaxRequest', 'ajax:node'); | ||||||||||||
application.inject('adapter', 'fastboot', 'service:fastboot'); | ||||||||||||
|
||||||||||||
if (!gte('4.0.0')) { | ||||||||||||
application.inject('adapter', '_ajaxRequest', 'ajax:node'); | ||||||||||||
application.inject('adapter', 'fastboot', 'service:fastboot'); | ||||||||||||
} | ||||||||||||
Comment on lines
+35
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this check is needed, and these lines can just be removed. This would have to be released as a breaking change though. That way apps using versions of Ember prior to 4.x would be able to use this without the implicit injections, to make the transition to 4.x easier. That's what we're running into where I work - we want to get rid of the deprecations on 3.28 before moving to 4.x. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's also an odd behavior to have a version that both does and doesn't inject based on the Ember version. I agree that removing them and cutting a new major is the way to go
Comment on lines
+34
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
} | ||||||||||||
}; |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -39,6 +39,7 @@ | |||
"ember-cli-lodash-subset": "^2.0.1", | ||||
"ember-cli-preprocess-registry": "^3.3.0", | ||||
"ember-cli-version-checker": "^5.1.2", | ||||
"ember-compatibility-helpers": "^1.2.6", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
"fastboot": "3.3.2", | ||||
"fastboot-express-middleware": "3.3.2", | ||||
"fastboot-transform": "^0.1.3", | ||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8330,6 +8330,17 @@ ember-compatibility-helpers@^1.2.1: | |||||||||||||||||||||
fs-extra "^9.1.0" | ||||||||||||||||||||||
semver "^5.4.1" | ||||||||||||||||||||||
|
||||||||||||||||||||||
ember-compatibility-helpers@^1.2.6: | ||||||||||||||||||||||
version "1.2.6" | ||||||||||||||||||||||
resolved "https://registry.yarnpkg.com/ember-compatibility-helpers/-/ember-compatibility-helpers-1.2.6.tgz#603579ab2fb14be567ef944da3fc2d355f779cd8" | ||||||||||||||||||||||
integrity sha512-2UBUa5SAuPg8/kRVaiOfTwlXdeVweal1zdNPibwItrhR0IvPrXpaqwJDlEZnWKEoB+h33V0JIfiWleSG6hGkkA== | ||||||||||||||||||||||
dependencies: | ||||||||||||||||||||||
babel-plugin-debug-macros "^0.2.0" | ||||||||||||||||||||||
ember-cli-version-checker "^5.1.1" | ||||||||||||||||||||||
find-up "^5.0.0" | ||||||||||||||||||||||
fs-extra "^9.1.0" | ||||||||||||||||||||||
semver "^5.4.1" | ||||||||||||||||||||||
|
||||||||||||||||||||||
Comment on lines
+8333
to
+8343
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
ember-data@~3.19.0: | ||||||||||||||||||||||
version "3.19.0" | ||||||||||||||||||||||
resolved "https://registry.yarnpkg.com/ember-data/-/ember-data-3.19.0.tgz#f0c75f0143c0f9d9801c486c9c592240b80b5d75" | ||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.