Ember Decorators Versions Save

Useful decorators for Ember applications.

v6.1.0

4 years ago
  • Adds the @classNameBindings and @attributeBindings class decorators, which make 1-1 conversions for components that use these APIs much easier

v6.0.0

5 years ago

Breaking Changes

  • Removed Packages

    • @ember-decorators/babel-transforms
    • @ember-decorators/controller
    • @ember-decorators/data
    • @ember-decorators/service
  • Removed APIs from @ember-decorators/object

    • @computed
    • @wrapComputed
    • @action
    • All computed macros

The functionality provided by these APIs is now built into Ember directly! You will be able to use them by importing them from ember, e.g.

import { action, computed } from '@ember/object';

You can include these in your app today using the polyfill.

v5.0.0

5 years ago

Breaking Changes

  1. @readOnly and @volatile have been removed in favor of @(computed().readOnly()) and @(computed().volatile()) style declarations. All classic modifiers are available, enabled, and chainable in this way.
  2. @reads and @overridableReads have been removed and changed back to @readOnly and @reads respectively, and @oneWay has been added back.
  3. @service and @controller have both been renamed to inject to match the exports in Ember proper.
  4. The shouldThrowOnComputedOverride configuration option has been removed, since it is not an option in Ember proper.
  5. Removed the macro function in favor of compatibility with classic classes

New Features

  1. @computed can now receive a ComputedPropertyDescriptor as its last argument (e.g. a function or { get, set } object.
  2. All computed property decorators can now be used in classic classes as well. This makes the decorators a drop-in replacement for @ember/object#computed.
  3. @action now binds action methods as well as copying their reference.

v4.0.0

5 years ago

Breaking Changes

  • Drops support for Typescript 2.7 (now only 2.8+)

v3.1.0

5 years ago

New Features

  • Support for the stage 2 decorators transforms has been added

v3.0.0

5 years ago

Breaking Changes

  • The @readOnly computed macro has been renamed to @reads, and the @reads and @oneWay macros have been renamed to @overridableReads
  • Computed properties are now overridable (clobberable) by default. You can disable this by setting the throwOnComputedOverride option in the build config.

v2.5.2

5 years ago

v2.5.0

5 years ago

New Features

  • Undeprecated @readOnly and added @volatile
  • @readOnly and @volatile can be applied in any order
  • Added ability to configure if computeds should throw an error on override (clobber)

Bugfixes

  • Fixes blueprints

v2.0.0

5 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';
}

v2.1.0

5 years ago

New Features

  • Adds blueprints for native class based generators
  • [feat] Adds babel-eslint on initial install

Bugfixes

  • [bugfix] Do not use inherited descriptors
  • [bugfix] Moves blueprints and tests to correct directory