Comments (6)
@NullVoxPopuli - Ya, I reached out to @wycats to double check the spec with me also. Hopefully will have a more definite confirmation in a couple days...
from ember-decorators.
Apparently transform-decorators-legacy
works a bit differently and does not replace the original property, but instead calls defineProperty
on top. At least that's what I reckon at a quick glance.
The obvious quick fix is jumping through the codebase and replacing all offending code:
@alias('session.data.authenticated.id') id,
@alias('user.name') name
// becomes
@alias('session.data.authenticated.id') id: null,
@alias('user.name') name: null
from ember-decorators.
I am going to close this for now. The version of decorators that we are currently using (with babel-plugin-transform-decorators-legacy) is from the original proposal. The babel crew are actively working on updating for the current spec and hopefully we can migrate to that soon enough. When we do, we will re-evaluate these sorts of issues...
from ember-decorators.
Here is my babel config in ember-cli-build:
babel: {
// ember < 2.13 / babel < 6
// optional: ['es7.decorators'],
// ember >= 2.13 / babel >= 6
plugins: [
'transform-decorators-legacy',
'transform-decorators',
'transform-object-rest-spread'
]
},
from ember-decorators.
@buschtoens - Thank you chiming in here! That definitely seems like a reasonable solution for folks blocked by this. I'll need to read through the spec a bit more to see if the behavior babel@6 + transform-decorators-legacy is exhibiting is correct or a bug...
from ember-decorators.
oh man. that would be a hefty change for me. I use the decorators everywhere.
Thankfully, I'm not blocked, as this 2.13.1 upgrade is branched.
I know I can regex-replace all of them -- but lemme know if the non-object notation is gonna be the final one (the current notation ( @alias('property') aliasedProperty
) )
from ember-decorators.
Related Issues (20)
- v5.2 MS Edge 18: Object doesn't support property or method 'apply' HOT 19
- @service router is undefined HOT 8
- Mixin pattern for polymorphic relationships doesn't seem to work with native classes HOT 1
- @service decorator fails on older browsers like IE11, Chrome 41 (Googlebot) HOT 8
- Polyfills for Symbol, Array.find are required to run on older browsers like IE11
- `@sort` deprecation message missing replacement code HOT 3
- TypeError: Ember._setComputedDecorator is not a function HOT 7
- ember-data decorators HOT 2
- ember-typescript-cli v2 HOT 6
- Question: why is @ember-decorators/babel-transforms still referenced in v6? HOT 2
- attribute component decorator receiving array instead of string HOT 2
- `@service` decorator doesn't work with ember 3.10.0 HOT 9
- `@layout` decorator doesn't work in ember addon HOT 5
- 5.1.4 / 5.2.0 not compatible with iOS 9.3.5 HOT 3
- Recommend usage of `ember-cli-dependency-lint`
- Detect when incompatible versions of `ember-decorators` are clobbering one another
- Add @classNameBindings and @attributeBindings class decorators HOT 2
- 6.1.0: @classNameBindings and @attributeBindings
- Build error: Generic type 'AttrOptions<T>' requires 1 type argument(s).
- Dependency Dashboard
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-decorators.