ember-source 4.3.0-alpha.1 → 4.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/blueprints/component-addon/index.js +2 -3
  3. package/blueprints/component-class-addon/index.js +2 -3
  4. package/blueprints/controller/files/__root__/__path__/__name__.js +2 -2
  5. package/blueprints/controller/index.js +2 -4
  6. package/blueprints/route/files/__root__/__path__/__name__.js +3 -3
  7. package/blueprints/route/index.js +2 -3
  8. package/blueprints/service/files/__root__/__path__/__name__.js +2 -2
  9. package/blueprints/service/index.js +2 -4
  10. package/build-metadata.json +3 -3
  11. package/dist/dependencies/router_js.js +66 -31
  12. package/dist/ember-template-compiler.js +1250 -861
  13. package/dist/ember-template-compiler.map +1 -1
  14. package/dist/ember-testing.js +88 -56
  15. package/dist/ember-testing.map +1 -1
  16. package/dist/ember.debug.js +3712 -3159
  17. package/dist/ember.debug.map +1 -1
  18. package/dist/header/license.js +1 -1
  19. package/dist/header/loader.js +0 -1
  20. package/dist/packages/@ember/-internals/bootstrap/index.js +0 -2
  21. package/dist/packages/@ember/-internals/container/index.js +16 -11
  22. package/dist/packages/@ember/-internals/extension-support/lib/container_debug_adapter.js +3 -3
  23. package/dist/packages/@ember/-internals/extension-support/lib/data_adapter.js +52 -52
  24. package/dist/packages/@ember/-internals/glimmer/index.js +161 -125
  25. package/dist/packages/@ember/-internals/meta/lib/meta.js +67 -11
  26. package/dist/packages/@ember/-internals/metal/index.js +95 -121
  27. package/dist/packages/@ember/-internals/routing/lib/ext/controller.js +24 -12
  28. package/dist/packages/@ember/-internals/routing/lib/location/api.js +1 -0
  29. package/dist/packages/@ember/-internals/routing/lib/location/auto_location.js +3 -1
  30. package/dist/packages/@ember/-internals/routing/lib/services/router.js +117 -197
  31. package/dist/packages/@ember/-internals/routing/lib/services/routing.js +3 -1
  32. package/dist/packages/@ember/-internals/routing/lib/system/route-info.js +2 -2
  33. package/dist/packages/@ember/-internals/routing/lib/system/route.js +147 -402
  34. package/dist/packages/@ember/-internals/routing/lib/system/router.js +82 -40
  35. package/dist/packages/@ember/-internals/routing/lib/utils.js +48 -25
  36. package/dist/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +1 -1
  37. package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +1 -0
  38. package/dist/packages/@ember/-internals/runtime/lib/mixins/comparable.js +4 -4
  39. package/dist/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +29 -29
  40. package/dist/packages/@ember/-internals/runtime/lib/mixins/promise_proxy.js +16 -16
  41. package/dist/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +48 -48
  42. package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +8 -8
  43. package/dist/packages/@ember/-internals/runtime/lib/system/namespace.js +1 -2
  44. package/dist/packages/@ember/-internals/runtime/lib/type-of.js +1 -1
  45. package/dist/packages/@ember/-internals/utils/index.js +11 -9
  46. package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +2 -4
  47. package/dist/packages/@ember/-internals/views/lib/system/utils.js +2 -0
  48. package/dist/packages/@ember/application/lib/application.js +0 -2
  49. package/dist/packages/@ember/array/index.js +1 -1
  50. package/dist/packages/@ember/canary-features/index.js +2 -2
  51. package/dist/packages/@ember/controller/index.js +3 -54
  52. package/dist/packages/@ember/debug/index.js +1 -1
  53. package/dist/packages/@ember/debug/lib/deprecate.js +12 -10
  54. package/dist/packages/@ember/instrumentation/index.js +9 -13
  55. package/dist/packages/@ember/object/compat.js +16 -7
  56. package/dist/packages/@ember/polyfills/lib/assign.js +1 -0
  57. package/dist/packages/@ember/routing/router-service.js +1 -0
  58. package/dist/packages/@ember/runloop/index.js +9 -9
  59. package/dist/packages/@ember/service/index.js +6 -73
  60. package/dist/packages/@ember/string/index.js +1 -0
  61. package/dist/packages/ember/index.js +1 -2
  62. package/dist/packages/ember/version.js +1 -1
  63. package/docs/data.json +2588 -1839
  64. package/package.json +27 -27
  65. package/blueprints/component-addon/native-files/__root__/__path__/__name__.js +0 -1
  66. package/blueprints/component-class-addon/native-files/__root__/__path__/__name__.js +0 -1
  67. package/blueprints/controller/native-files/__root__/__path__/__name__.js +0 -4
  68. package/blueprints/edition-detector.js +0 -13
  69. package/blueprints/route/native-files/__root__/__path__/__name__.js +0 -11
  70. package/blueprints/route/native-files/__root__/__templatepath__/__templatename__.hbs +0 -2
  71. package/blueprints/service/native-files/__root__/__path__/__name__.js +0 -4
@@ -98,7 +98,7 @@ export default Mixin.create({
98
98
  /**
99
99
  If the proxied promise is rejected this will contain the reason
100
100
  provided.
101
- @property reason
101
+ @property reason
102
102
  @default null
103
103
  @public
104
104
  */
@@ -106,7 +106,7 @@ export default Mixin.create({
106
106
 
107
107
  /**
108
108
  Once the proxied promise has settled this will become `false`.
109
- @property isPending
109
+ @property isPending
110
110
  @default true
111
111
  @public
112
112
  */
@@ -116,7 +116,7 @@ export default Mixin.create({
116
116
 
117
117
  /**
118
118
  Once the proxied promise has settled this will become `true`.
119
- @property isSettled
119
+ @property isSettled
120
120
  @default false
121
121
  @public
122
122
  */
@@ -126,7 +126,7 @@ export default Mixin.create({
126
126
 
127
127
  /**
128
128
  Will become `true` if the proxied promise is rejected.
129
- @property isRejected
129
+ @property isRejected
130
130
  @default false
131
131
  @public
132
132
  */
@@ -134,7 +134,7 @@ export default Mixin.create({
134
134
 
135
135
  /**
136
136
  Will become `true` if the proxied promise is fulfilled.
137
- @property isFulfilled
137
+ @property isFulfilled
138
138
  @default false
139
139
  @public
140
140
  */
@@ -142,17 +142,17 @@ export default Mixin.create({
142
142
 
143
143
  /**
144
144
  The promise whose fulfillment value is being proxied by this object.
145
- This property must be specified upon creation, and should not be
145
+ This property must be specified upon creation, and should not be
146
146
  changed once created.
147
- Example:
148
- ```javascript
147
+ Example:
148
+ ```javascript
149
149
  import ObjectProxy from '@ember/object/proxy';
150
150
  import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
151
- ObjectProxy.extend(PromiseProxyMixin).create({
151
+ ObjectProxy.extend(PromiseProxyMixin).create({
152
152
  promise: <thenable>
153
153
  });
154
154
  ```
155
- @property promise
155
+ @property promise
156
156
  @public
157
157
  */
158
158
  promise: computed({
@@ -168,8 +168,8 @@ export default Mixin.create({
168
168
 
169
169
  /**
170
170
  An alias to the proxied promise's `then`.
171
- See RSVP.Promise.then.
172
- @method then
171
+ See RSVP.Promise.then.
172
+ @method then
173
173
  @param {Function} callback
174
174
  @return {RSVP.Promise}
175
175
  @public
@@ -178,8 +178,8 @@ export default Mixin.create({
178
178
 
179
179
  /**
180
180
  An alias to the proxied promise's `catch`.
181
- See RSVP.Promise.catch.
182
- @method catch
181
+ See RSVP.Promise.catch.
182
+ @method catch
183
183
  @param {Function} callback
184
184
  @return {RSVP.Promise}
185
185
  @since 1.3.0
@@ -189,8 +189,8 @@ export default Mixin.create({
189
189
 
190
190
  /**
191
191
  An alias to the proxied promise's `finally`.
192
- See RSVP.Promise.finally.
193
- @method finally
192
+ See RSVP.Promise.finally.
193
+ @method finally
194
194
  @param {Function} callback
195
195
  @return {RSVP.Promise}
196
196
  @since 1.3.0
@@ -16,7 +16,7 @@ export default Mixin.create({
16
16
 
17
17
  /**
18
18
  Given a fullName return the corresponding factory.
19
- @public
19
+ @public
20
20
  @method resolveRegistration
21
21
  @param {String} fullName
22
22
  @return {Function} fullName's factory
@@ -30,48 +30,48 @@ export default Mixin.create({
30
30
  Registers a factory that can be used for dependency injection (with
31
31
  `inject`) or for service lookup. Each factory is registered with
32
32
  a full name including two parts: `type:name`.
33
- A simple example:
34
- ```javascript
33
+ A simple example:
34
+ ```javascript
35
35
  import Application from '@ember/application';
36
36
  import EmberObject from '@ember/object';
37
- let App = Application.create();
38
- App.Orange = EmberObject.extend();
37
+ let App = Application.create();
38
+ App.Orange = EmberObject.extend();
39
39
  App.register('fruit:favorite', App.Orange);
40
40
  ```
41
- Ember will resolve factories from the `App` namespace automatically.
41
+ Ember will resolve factories from the `App` namespace automatically.
42
42
  For example `App.CarsController` will be discovered and returned if
43
43
  an application requests `controller:cars`.
44
- An example of registering a controller with a non-standard name:
45
- ```javascript
44
+ An example of registering a controller with a non-standard name:
45
+ ```javascript
46
46
  import Application from '@ember/application';
47
47
  import Controller from '@ember/controller';
48
- let App = Application.create();
48
+ let App = Application.create();
49
49
  let Session = Controller.extend();
50
- App.register('controller:session', Session);
51
- // The Session controller can now be treated like a normal controller,
50
+ App.register('controller:session', Session);
51
+ // The Session controller can now be treated like a normal controller,
52
52
  // despite its non-standard name.
53
53
  App.ApplicationController = Controller.extend({
54
54
  needs: ['session']
55
55
  });
56
56
  ```
57
- Registered factories are **instantiated** by having `create`
57
+ Registered factories are **instantiated** by having `create`
58
58
  called on them. Additionally they are **singletons**, each time
59
59
  they are looked up they return the same instance.
60
- Some examples modifying that default behavior:
61
- ```javascript
60
+ Some examples modifying that default behavior:
61
+ ```javascript
62
62
  import Application from '@ember/application';
63
63
  import EmberObject from '@ember/object';
64
- let App = Application.create();
65
- App.Person = EmberObject.extend();
64
+ let App = Application.create();
65
+ App.Person = EmberObject.extend();
66
66
  App.Orange = EmberObject.extend();
67
67
  App.Email = EmberObject.extend();
68
68
  App.session = EmberObject.create();
69
- App.register('model:user', App.Person, { singleton: false });
69
+ App.register('model:user', App.Person, { singleton: false });
70
70
  App.register('fruit:favorite', App.Orange);
71
71
  App.register('communication:main', App.Email, { singleton: false });
72
72
  App.register('session', App.session, { instantiate: false });
73
73
  ```
74
- @method register
74
+ @method register
75
75
  @param fullName {String} type:name (e.g., 'model:user')
76
76
  @param factory {any} (e.g., App.Person)
77
77
  @param options {Object} (optional) disable instantiation or singleton usage
@@ -81,17 +81,17 @@ export default Mixin.create({
81
81
 
82
82
  /**
83
83
  Unregister a factory.
84
- ```javascript
84
+ ```javascript
85
85
  import Application from '@ember/application';
86
86
  import EmberObject from '@ember/object';
87
- let App = Application.create();
87
+ let App = Application.create();
88
88
  let User = EmberObject.extend();
89
89
  App.register('model:user', User);
90
- App.resolveRegistration('model:user').create() instanceof User //=> true
91
- App.unregister('model:user')
90
+ App.resolveRegistration('model:user').create() instanceof User //=> true
91
+ App.unregister('model:user')
92
92
  App.resolveRegistration('model:user') === undefined //=> true
93
93
  ```
94
- @public
94
+ @public
95
95
  @method unregister
96
96
  @param {String} fullName
97
97
  */
@@ -99,7 +99,7 @@ export default Mixin.create({
99
99
 
100
100
  /**
101
101
  Check if a factory is registered.
102
- @public
102
+ @public
103
103
  @method hasRegistration
104
104
  @param {String} fullName
105
105
  @return {Boolean}
@@ -108,7 +108,7 @@ export default Mixin.create({
108
108
 
109
109
  /**
110
110
  Return a specific registered option for a particular factory.
111
- @public
111
+ @public
112
112
  @method registeredOption
113
113
  @param {String} fullName
114
114
  @param {String} optionName
@@ -118,7 +118,7 @@ export default Mixin.create({
118
118
 
119
119
  /**
120
120
  Register options for a particular factory.
121
- @public
121
+ @public
122
122
  @method registerOptions
123
123
  @param {String} fullName
124
124
  @param {Object} options
@@ -127,7 +127,7 @@ export default Mixin.create({
127
127
 
128
128
  /**
129
129
  Return registered options for a particular factory.
130
- @public
130
+ @public
131
131
  @method registeredOptions
132
132
  @param {String} fullName
133
133
  @return {Object} options
@@ -136,22 +136,22 @@ export default Mixin.create({
136
136
 
137
137
  /**
138
138
  Allow registering options for all factories of a type.
139
- ```javascript
139
+ ```javascript
140
140
  import Application from '@ember/application';
141
- let App = Application.create();
141
+ let App = Application.create();
142
142
  let appInstance = App.buildInstance();
143
- // if all of type `connection` must not be singletons
143
+ // if all of type `connection` must not be singletons
144
144
  appInstance.registerOptionsForType('connection', { singleton: false });
145
- appInstance.register('connection:twitter', TwitterConnection);
145
+ appInstance.register('connection:twitter', TwitterConnection);
146
146
  appInstance.register('connection:facebook', FacebookConnection);
147
- let twitter = appInstance.lookup('connection:twitter');
147
+ let twitter = appInstance.lookup('connection:twitter');
148
148
  let twitter2 = appInstance.lookup('connection:twitter');
149
- twitter === twitter2; // => false
150
- let facebook = appInstance.lookup('connection:facebook');
149
+ twitter === twitter2; // => false
150
+ let facebook = appInstance.lookup('connection:facebook');
151
151
  let facebook2 = appInstance.lookup('connection:facebook');
152
- facebook === facebook2; // => false
152
+ facebook === facebook2; // => false
153
153
  ```
154
- @public
154
+ @public
155
155
  @method registerOptionsForType
156
156
  @param {String} type
157
157
  @param {Object} options
@@ -160,7 +160,7 @@ export default Mixin.create({
160
160
 
161
161
  /**
162
162
  Return the registered options for all factories of a type.
163
- @public
163
+ @public
164
164
  @method registeredOptionsForType
165
165
  @param {String} type
166
166
  @return {Object} options
@@ -170,37 +170,37 @@ export default Mixin.create({
170
170
  /**
171
171
  Define a dependency injection onto a specific factory or all factories
172
172
  of a type.
173
- When Ember instantiates a controller, view, or other framework component
173
+ When Ember instantiates a controller, view, or other framework component
174
174
  it can attach a dependency to that component. This is often used to
175
175
  provide services to a set of framework components.
176
- An example of providing a session object to all controllers:
177
- ```javascript
176
+ An example of providing a session object to all controllers:
177
+ ```javascript
178
178
  import { alias } from '@ember/object/computed';
179
179
  import Application from '@ember/application';
180
180
  import Controller from '@ember/controller';
181
181
  import EmberObject from '@ember/object';
182
- let App = Application.create();
182
+ let App = Application.create();
183
183
  let Session = EmberObject.extend({ isAuthenticated: false });
184
- // A factory must be registered before it can be injected
184
+ // A factory must be registered before it can be injected
185
185
  App.register('session:main', Session);
186
- // Inject 'session:main' onto all factories of the type 'controller'
186
+ // Inject 'session:main' onto all factories of the type 'controller'
187
187
  // with the name 'session'
188
188
  App.inject('controller', 'session', 'session:main');
189
- App.IndexController = Controller.extend({
189
+ App.IndexController = Controller.extend({
190
190
  isLoggedIn: alias('session.isAuthenticated')
191
191
  });
192
192
  ```
193
- Injections can also be performed on specific factories.
194
- ```javascript
193
+ Injections can also be performed on specific factories.
194
+ ```javascript
195
195
  App.inject(<full_name or type>, <property name>, <full_name>)
196
196
  App.inject('route', 'source', 'source:main')
197
197
  App.inject('route:application', 'email', 'model:email')
198
198
  ```
199
- It is important to note that injections can only be performed on
199
+ It is important to note that injections can only be performed on
200
200
  classes that are instantiated by Ember itself. Instantiating a class
201
201
  directly (via `create` or `new`) bypasses the dependency injection
202
202
  system.
203
- @public
203
+ @public
204
204
  @method inject
205
205
  @param factoryNameOrType {String}
206
206
  @param property {String}
@@ -41,9 +41,9 @@ const TargetActionSupport = Mixin.create({
41
41
  /**
42
42
  Send an `action` with an `actionContext` to a `target`. The action, actionContext
43
43
  and target will be retrieved from properties of the object. For example:
44
- ```javascript
44
+ ```javascript
45
45
  import { alias } from '@ember/object/computed';
46
- App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
46
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
47
47
  target: alias('controller'),
48
48
  action: 'save',
49
49
  actionContext: alias('context'),
@@ -53,9 +53,9 @@ const TargetActionSupport = Mixin.create({
53
53
  }
54
54
  });
55
55
  ```
56
- The `target`, `action`, and `actionContext` can be provided as properties of
56
+ The `target`, `action`, and `actionContext` can be provided as properties of
57
57
  an optional object argument to `triggerAction` as well.
58
- ```javascript
58
+ ```javascript
59
59
  App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
60
60
  click() {
61
61
  this.triggerAction({
@@ -67,12 +67,12 @@ const TargetActionSupport = Mixin.create({
67
67
  }
68
68
  });
69
69
  ```
70
- The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.
70
+ The `actionContext` defaults to the object you are mixing `TargetActionSupport` into.
71
71
  But `target` and `action` must be specified either as properties or with the argument
72
72
  to `triggerAction`, or a combination:
73
- ```javascript
73
+ ```javascript
74
74
  import { alias } from '@ember/object/computed';
75
- App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
75
+ App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, {
76
76
  target: alias('controller'),
77
77
  click() {
78
78
  this.triggerAction({
@@ -82,7 +82,7 @@ const TargetActionSupport = Mixin.create({
82
82
  }
83
83
  });
84
84
  ```
85
- @method triggerAction
85
+ @method triggerAction
86
86
  @param opts {Object} (optional, with the optional keys action, target and/or actionContext)
87
87
  @return {Boolean} true if the action was sent successfully and did not return false
88
88
  @private
@@ -1,5 +1,5 @@
1
1
  /**
2
- @module ember
2
+ @module @ember/application
3
3
  */
4
4
  import { NAMESPACES, NAMESPACES_BY_ID, addNamespace, findNamespace, findNamespaces, get, processNamespace, processAllNamespaces, removeNamespace } from '@ember/-internals/metal'; // Preloaded into namespaces
5
5
 
@@ -19,7 +19,6 @@ import EmberObject from './object';
19
19
  ```
20
20
 
21
21
  @class Namespace
22
- @namespace Ember
23
22
  @extends EmberObject
24
23
  @public
25
24
  */
@@ -77,7 +77,7 @@ const {
77
77
 
78
78
  @method typeOf
79
79
  @for @ember/utils
80
- @param {Object} item the item to check
80
+ @param item the item to check
81
81
  @return {String} the type
82
82
  @public
83
83
  @static
@@ -140,7 +140,7 @@ const GUID_KEY = intern(`__ember${Date.now()}`);
140
140
  */
141
141
 
142
142
  function generateGuid(obj, prefix = GUID_PREFIX) {
143
- let guid = prefix + uuid();
143
+ let guid = prefix + uuid().toString();
144
144
 
145
145
  if (isObject(obj)) {
146
146
  OBJECT_GUIDS.set(obj, guid);
@@ -170,7 +170,7 @@ function guidFor(value) {
170
170
  guid = OBJECT_GUIDS.get(value);
171
171
 
172
172
  if (guid === undefined) {
173
- guid = GUID_PREFIX + uuid();
173
+ guid = `${GUID_PREFIX}${uuid()}`;
174
174
  OBJECT_GUIDS.set(value, guid);
175
175
  }
176
176
  } else {
@@ -180,13 +180,13 @@ function guidFor(value) {
180
180
  let type = typeof value;
181
181
 
182
182
  if (type === 'string') {
183
- guid = 'st' + uuid();
183
+ guid = `st${uuid()}`;
184
184
  } else if (type === 'number') {
185
- guid = 'nu' + uuid();
185
+ guid = `nu${uuid()}`;
186
186
  } else if (type === 'symbol') {
187
- guid = 'sy' + uuid();
187
+ guid = `sy${uuid()}`;
188
188
  } else {
189
- guid = '(' + value + ')';
189
+ guid = `(${value})`;
190
190
  }
191
191
 
192
192
  NON_OBJECT_GUIDS.set(value, guid);
@@ -207,7 +207,7 @@ function enumerableSymbol(debugName) {
207
207
  // TODO: Investigate using platform symbols, but we do not
208
208
  // want to require non-enumerability for this API, which
209
209
  // would introduce a large cost.
210
- let id = GUID_KEY + Math.floor(Math.random() * Date.now());
210
+ let id = GUID_KEY + Math.floor(Math.random() * Date.now()).toString();
211
211
  let symbol = intern(`__${debugName}${id}__`);
212
212
 
213
213
  if (DEBUG) {
@@ -507,7 +507,9 @@ function inspectObject(obj, depth, seen) {
507
507
  }
508
508
 
509
509
  let key = keys[i];
510
- s += inspectKey(key) + ': ' + inspectValue(obj[key], depth, seen);
510
+ assert('has key', key); // Looping over array
511
+
512
+ s += `${inspectKey(key)}: ${inspectValue(obj[key], depth, seen)}`;
511
513
  }
512
514
 
513
515
  s += ' }';
@@ -786,7 +788,7 @@ if (DEBUG) {
786
788
 
787
789
  if (setters !== undefined && setters[keyName] !== undefined) {
788
790
  Object.defineProperty(obj, keyName, setters[keyName]);
789
- setters[keyName] = undefined;
791
+ delete setters[keyName];
790
792
  }
791
793
  };
792
794
 
@@ -326,11 +326,9 @@ let mixin = {
326
326
  @private
327
327
  */
328
328
  init() {
329
- this._super(...arguments); // tslint:disable-next-line:max-line-length
330
-
331
-
332
- assert(`You cannot use a computed property for the component's \`elementId\` (${this}).`, descriptorForProperty(this, 'elementId') === undefined); // tslint:disable-next-line:max-line-length
329
+ this._super(...arguments);
333
330
 
331
+ assert(`You cannot use a computed property for the component's \`elementId\` (${this}).`, descriptorForProperty(this, 'elementId') === undefined);
334
332
  assert(`You cannot use a computed property for the component's \`tagName\` (${this}).`, descriptorForProperty(this, 'tagName') === undefined);
335
333
 
336
334
  if (!this.elementId && this.tagName !== '') {
@@ -27,6 +27,7 @@ export function getRootViews(owner) {
27
27
  let rootViews = [];
28
28
  Object.keys(registry).forEach(id => {
29
29
  let view = registry[id];
30
+ assert('expected view', view);
30
31
 
31
32
  if (view.parentView === null) {
32
33
  rootViews.push(view);
@@ -86,6 +87,7 @@ const CHILD_VIEW_IDS = new WeakMap();
86
87
 
87
88
  export function getChildViews(view) {
88
89
  let owner = getOwner(view);
90
+ assert('View is unexpectedly missing an owner', owner);
89
91
  let registry = owner.lookup('-view-registry:main');
90
92
  return collectChildViews(view, registry);
91
93
  }
@@ -310,7 +310,6 @@ const Application = Engine.extend({
310
310
  _applicationInstances: null,
311
311
 
312
312
  init() {
313
- // eslint-disable-line no-unused-vars
314
313
  this._super(...arguments);
315
314
 
316
315
  if (DEBUG) {
@@ -929,7 +928,6 @@ Application.reopenClass({
929
928
  @private
930
929
  */
931
930
  buildRegistry() {
932
- // eslint-disable-line no-unused-vars
933
931
  let registry = this._super(...arguments);
934
932
 
935
933
  commonSetupRegistry(registry);
@@ -1,2 +1,2 @@
1
- export { Array as default, isArray, A } from '@ember/-internals/runtime';
1
+ export { Array as default, NativeArray, isArray, A } from '@ember/-internals/runtime';
2
2
  export { makeArray } from '@ember/-internals/utils';
@@ -11,8 +11,8 @@ import { ENV } from '@ember/-internals/environment';
11
11
  */
12
12
 
13
13
  export const DEFAULT_FEATURES = {
14
- EMBER_LIBRARIES_ISREGISTERED: null,
15
- EMBER_IMPROVED_INSTRUMENTATION: null,
14
+ EMBER_LIBRARIES_ISREGISTERED: false,
15
+ EMBER_IMPROVED_INSTRUMENTATION: false,
16
16
  EMBER_NAMED_BLOCKS: true,
17
17
  EMBER_GLIMMER_HELPER_MANAGER: true,
18
18
  EMBER_GLIMMER_INVOKE_HELPER: true,
@@ -1,61 +1,10 @@
1
1
  import { FrameworkObject } from '@ember/-internals/runtime';
2
2
  import { inject as metalInject } from '@ember/-internals/metal';
3
3
  import ControllerMixin from './lib/controller_mixin';
4
- /**
5
- @module @ember/controller
6
- */
7
4
 
8
- /**
9
- @class Controller
10
- @extends EmberObject
11
- @uses Ember.ControllerMixin
12
- @public
13
- */
5
+ class Controller extends FrameworkObject.extend(ControllerMixin) {}
14
6
 
15
- const Controller = FrameworkObject.extend(ControllerMixin);
16
- /**
17
- Creates a property that lazily looks up another controller in the container.
18
- Can only be used when defining another controller.
19
-
20
- Example:
21
-
22
- ```app/controllers/post.js
23
- import Controller, {
24
- inject as controller
25
- } from '@ember/controller';
26
-
27
- export default class PostController extends Controller {
28
- @controller posts;
29
- }
30
- ```
31
-
32
- Classic Class Example:
33
-
34
- ```app/controllers/post.js
35
- import Controller, {
36
- inject as controller
37
- } from '@ember/controller';
38
-
39
- export default Controller.extend({
40
- posts: controller()
41
- });
42
- ```
43
-
44
- This example will create a `posts` property on the `post` controller that
45
- looks up the `posts` controller in the container, making it easy to reference
46
- other controllers.
47
-
48
- @method inject
49
- @static
50
- @for @ember/controller
51
- @since 1.10.0
52
- @param {String} name (optional) name of the controller to inject, defaults to
53
- the property's name
54
- @return {ComputedDecorator} injection decorator instance
55
- @public
56
- */
57
-
58
- export function inject() {
59
- return metalInject('controller', ...arguments);
7
+ export function inject(...args) {
8
+ return metalInject('controller', ...args);
60
9
  }
61
10
  export default Controller;
@@ -150,7 +150,7 @@ if (DEBUG) {
150
150
  } else {
151
151
  console.log(`DEBUG: ${message}`);
152
152
  }
153
- /* eslint-ensable no-console */
153
+ /* eslint-enable no-console */
154
154
 
155
155
  });
156
156
  /**
@@ -98,17 +98,19 @@ if (DEBUG) {
98
98
  let error = captureErrorForStack();
99
99
  let stack;
100
100
 
101
- if (error.stack) {
102
- if (error['arguments']) {
103
- // Chrome
104
- stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^)]+)\)/gm, '{anonymous}($1)').split('\n');
105
- stack.shift();
106
- } else {
107
- // Firefox
108
- stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
101
+ if (error instanceof Error) {
102
+ if (error.stack) {
103
+ if (error['arguments']) {
104
+ // Chrome
105
+ stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^)]+)\)/gm, '{anonymous}($1)').split('\n');
106
+ stack.shift();
107
+ } else {
108
+ // Firefox
109
+ stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
110
+ }
111
+
112
+ stackStr = `\n ${stack.slice(2).join('\n ')}`;
109
113
  }
110
-
111
- stackStr = `\n ${stack.slice(2).join('\n ')}`;
112
114
  }
113
115
 
114
116
  let updatedMessage = formatMessage(message, options);