Comments (6)
with custom macros, that raise a deprecation, when accessed. This allows users to discover and migrate all the callsites accidentally relying on these implicit injections bit by bit
I think we already did this for users in ember-source >= 3.26
from ember-useragent.
hi! Ping on this.
specifically, ember v4.0 will not work with this pattern.
from ember-useragent.
It is unquestionable, that these implicit injections will have to be removed eventually due to emberjs/ember.js#19680. Thus I recommend that anyone wanting to or currently using this addon, overrides https://github.com/willviles/ember-useragent/blob/master/app/initializers/user-agent.js in their own app with a no-op, like:
// app/initializers/user-agent.js
export function initialize() {}
This way the implicit injections are already disabled and you can't accidentally make use of them. Please note, that if you're making this change in an app that already uses ember-useragent
, you should regression test it to ensure, you haven't already used these implicit injections accidentally.
from ember-useragent.
As a way forward for ember-useragent
itself, I would recommend to replace the application.inject(...)
usages with custom macros, that raise a deprecation, when accessed. This allows users to discover and migrate all the callsites accidentally relying on these implicit injections bit by bit.
Optionally configuration could be included, to completely disable the injection, which should be recommended to be enabled by all new users. This way the breaking release can be delayed indefinitely, all the while being ready for Ember 4.0.
from ember-useragent.
@snewcomer perfect, thanks! I wasn't sure any more and didn't re-read.
from ember-useragent.
Released in 0.11.0
. Thanks for all contributions!
from ember-useragent.
Related Issues (20)
- property 'browser.supportsWebRtc' HOT 1
- Headless Chrome for Acceptance Tests HOT 1
- Error running ember-useragent with fastboot
- isLinux in Firefox 59.0 false for Ubuntu HOT 5
- Tests for Fastboot
- Build error updating to 0.7.0 HOT 6
- Crash on Windows HOT 4
- Updating from 0.6.1 to 0.7.1 causes the build to fail HOT 8
- Template helper proposal HOT 1
- Could not find module `ua-parser-js` HOT 9
- Use ember-auto-import HOT 6
- Deprecation: computed-property.override in _parser computed property HOT 4
- iPadOS HOT 2
- Pre-render for Fastboot and User Agent HOT 1
- Update ua-parser dep to 0.7.30 to fix error TypeError: arr[i].toUpperCase is not a function HOT 2
- Any plans on 1.0 release?
- Ember 4 compatibility HOT 2
- Not possible to install on Windows HOT 3
- Fix memory leak HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-useragent.