Skip to content

Commit

Permalink
[BUGFIX release] Deprecate Ember.TrackedArray.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Aug 6, 2015
1 parent 17b7cc7 commit 281b8ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/ember-runtime/lib/system/tracked_array.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Ember from 'ember-metal/core';
import { get } from 'ember-metal/property_get';

var RETAIN = 'r';
Expand All @@ -18,6 +19,12 @@ export default TrackedArray;
@private
*/
function TrackedArray(items) {
Ember.deprecate(
'Ember.TrackedArray will be removed in 2.0.0.',
false,
{ id: 'ember-metal.tracked-array', until: '2.0.0' }
);

if (arguments.length < 1) { items = []; }

var length = get(items, 'length');
Expand Down
6 changes: 5 additions & 1 deletion packages/ember-runtime/tests/system/tracked_array_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ var RETAIN = TrackedArray.RETAIN;
var INSERT = TrackedArray.INSERT;
var DELETE = TrackedArray.DELETE;

QUnit.module('Ember.TrackedArray');
QUnit.module('Ember.TrackedArray', {
setup: function() {
expectDeprecation('Ember.TrackedArray will be removed in 2.0.0.');
}
});

QUnit.test('operations for a tracked array of length n are initially retain:n', function() {
trackedArray = new TrackedArray([1, 2, 3, 4]);
Expand Down

0 comments on commit 281b8ca

Please sign in to comment.