Ember Decorators Versions Save

Useful decorators for Ember applications.

v2.2.0

5 years ago

New Features

  • [feat] add @macro util for creating decorators from macros

Bugfixes

  • fix: in blueprints don't assume ember-data exists
  • [bugfix] Always collapse proto from constructor
  • [bugfix] Update afterInstall script for .eslintrc and tsconfig.json
  • [bugfix] Fixes issue where TS never finishes compiling

v2.2.1

5 years ago

Bugfixes

  • [bugfix] Install support packages in sequence

v2.3.0

5 years ago

New Features

  • Adds the @layout decorator

Bugfixes

  • Fixes @controller typings
  • Add typings for macro

v2.3.1

5 years ago

Bugfixes

  • Fixed the typings for @layout
  • Fixed an issue where default blueprints would attempt to run yarn in parallel

v2.4.0

5 years ago

New Features

Added decorators for observers and event listeners:

  • @on
  • @off
  • @observes
  • @unobserves

Bugfixes

  • Fixed typings for @attr so it can receive options hashes

v2.0.0-beta.1

6 years ago

v2.0.0 is a major refactor that pushes all of the individual packages from Ember Decorators out into individual packages. The core addon is still around, but it's now a shell addon that includes the others.

Highlights:

  • Typescript support!
  • Support for ES5 Getters in Ember 3.1
  • The Ember Data decorators have been fixed

Breaking Changes:

  • Imports should now be from the scoped packages instead of the main addon:

    // before
    import { computed } from 'ember-decorators/object';
    
    // after
    import { computed } from '@ember-decorators/object';  
    
  • @attribute and @className no longer place the value of class fields on the prototype of the class. If you want to set defaults, you'll need to use an initializer:

    // before
    @className foo = 'bar';
    
    // after
    @className foo = this.foo || 'bar';
    
  • Support for decorating plain functions using @computed has been removed. You must now decorate native getters and setters:

    // before
    @computed
    foo() {
      return 'bar';
    }
    
    // after
    @computed
    get foo() {
      return 'bar';
    }