ember-source 4.2.0-alpha.6 → 4.3.0-alpha.2

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 (48) hide show
  1. package/CHANGELOG.md +4 -0
  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/ember-template-compiler.js +81 -82
  12. package/dist/ember-template-compiler.map +1 -1
  13. package/dist/ember-testing.js +15 -14
  14. package/dist/ember-testing.map +1 -1
  15. package/dist/ember.debug.js +498 -476
  16. package/dist/ember.debug.map +1 -1
  17. package/dist/header/license.js +1 -1
  18. package/dist/header/loader.js +0 -1
  19. package/dist/packages/@ember/-internals/bootstrap/index.js +0 -2
  20. package/dist/packages/@ember/-internals/container/index.js +1 -0
  21. package/dist/packages/@ember/-internals/glimmer/index.js +23 -23
  22. package/dist/packages/@ember/-internals/meta/lib/meta.js +59 -2
  23. package/dist/packages/@ember/-internals/metal/index.js +51 -76
  24. package/dist/packages/@ember/-internals/routing/lib/ext/controller.js +14 -4
  25. package/dist/packages/@ember/-internals/routing/lib/location/api.js +1 -0
  26. package/dist/packages/@ember/-internals/routing/lib/services/router.js +2 -47
  27. package/dist/packages/@ember/-internals/routing/lib/system/route.js +41 -29
  28. package/dist/packages/@ember/-internals/routing/lib/system/router.js +8 -4
  29. package/dist/packages/@ember/-internals/routing/lib/utils.js +21 -10
  30. package/dist/packages/@ember/-internals/utils/index.js +1 -1
  31. package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +2 -4
  32. package/dist/packages/@ember/application/lib/application.js +0 -2
  33. package/dist/packages/@ember/debug/index.js +1 -1
  34. package/dist/packages/@ember/debug/lib/deprecate.js +12 -10
  35. package/dist/packages/@ember/polyfills/lib/assign.js +1 -0
  36. package/dist/packages/@ember/runloop/index.js +9 -9
  37. package/dist/packages/@ember/string/index.js +1 -0
  38. package/dist/packages/ember/index.js +1 -2
  39. package/dist/packages/ember/version.js +1 -1
  40. package/docs/data.json +2367 -1650
  41. package/package.json +21 -21
  42. package/blueprints/component-addon/native-files/__root__/__path__/__name__.js +0 -1
  43. package/blueprints/component-class-addon/native-files/__root__/__path__/__name__.js +0 -1
  44. package/blueprints/controller/native-files/__root__/__path__/__name__.js +0 -4
  45. package/blueprints/edition-detector.js +0 -13
  46. package/blueprints/route/native-files/__root__/__path__/__name__.js +0 -11
  47. package/blueprints/route/native-files/__root__/__templatepath__/__templatename__.hbs +0 -2
  48. package/blueprints/service/native-files/__root__/__path__/__name__.js +0 -4
@@ -144,10 +144,15 @@ ControllerMixin.reopen({
144
144
  @public
145
145
  */
146
146
  transitionToRoute(...args) {
147
+ var _a;
148
+
147
149
  deprecateTransitionMethods('controller', 'transitionToRoute'); // target may be either another controller or a router
148
150
 
149
- let target = get(this, 'target');
150
- let method = target.transitionToRoute || target.transitionTo;
151
+ let target = get(this, 'target'); // SAFETY: We can't actually assert that this is a full Controller or Router since some tests
152
+ // mock out an object that only has the single method. Since this is deprecated, I think it's
153
+ // ok to be a little less than proper here.
154
+
155
+ let method = (_a = target.transitionToRoute) !== null && _a !== void 0 ? _a : target.transitionTo;
151
156
  return method.apply(target, prefixRouteNameArg(this, args));
152
157
  },
153
158
 
@@ -201,10 +206,15 @@ ControllerMixin.reopen({
201
206
  @public
202
207
  */
203
208
  replaceRoute(...args) {
209
+ var _a;
210
+
204
211
  deprecateTransitionMethods('controller', 'replaceRoute'); // target may be either another controller or a router
205
212
 
206
- let target = get(this, 'target');
207
- let method = target.replaceRoute || target.replaceWith;
213
+ let target = get(this, 'target'); // SAFETY: We can't actually assert that this is a full Controller or Router since some tests
214
+ // mock out an object that only has the single method. Since this is deprecated, I think it's
215
+ // ok to be a little less than proper here.
216
+
217
+ let method = (_a = target.replaceRoute) !== null && _a !== void 0 ? _a : target.replaceWith;
208
218
  return method.apply(target, prefixRouteNameArg(this, args));
209
219
  }
210
220
 
@@ -93,6 +93,7 @@ export default {
93
93
  url: 'https://emberjs.com/deprecations/v4.x#toc_deprecate-auto-location',
94
94
  for: 'ember-source',
95
95
  since: {
96
+ available: '4.1.0',
96
97
  enabled: '4.1.0'
97
98
  }
98
99
  });
@@ -65,46 +65,6 @@ export default class RouterService extends Service {
65
65
  super.willDestroy(...arguments);
66
66
  this[ROUTER] = null;
67
67
  }
68
- /**
69
- Transition the application into another route. The route may
70
- be either a single route or route path:
71
- See [transitionTo](/ember/release/classes/Route/methods/transitionTo?anchor=transitionTo) for more info.
72
- Calling `transitionTo` from the Router service will cause default query parameter values to be included in the URL.
73
- This behavior is different from calling `transitionTo` on a route or `transitionToRoute` on a controller.
74
- See the [Router Service RFC](https://github.com/emberjs/rfcs/blob/master/text/0095-router-service.md#query-parameter-semantics) for more info.
75
- In the following example we use the Router service to navigate to a route with a
76
- specific model from a Component in the first action, and in the second we trigger
77
- a query-params only transition.
78
- ```app/components/example.js
79
- import Component from '@glimmer/component';
80
- import { action } from '@ember/object';
81
- import { service } from '@ember/service';
82
- export default class extends Component {
83
- @service router;
84
- @action
85
- goToComments(post) {
86
- this.router.transitionTo('comments', post);
87
- }
88
- @action
89
- fetchMoreComments(latestComment) {
90
- this.router.transitionTo({
91
- queryParams: { commentsAfter: latestComment }
92
- });
93
- }
94
- }
95
- ```
96
- @method transitionTo
97
- @param {String} [routeNameOrUrl] the name of the route or a URL
98
- @param {...Object} [models] the model(s) or identifier(s) to be used while
99
- transitioning to the route.
100
- @param {Object} [options] optional hash with a queryParams property
101
- containing a mapping of query parameters. May be supplied as the only
102
- parameter to trigger a query-parameter-only transition.
103
- @return {Transition} the transition object associated with this
104
- attempted transition
105
- @public
106
- */
107
-
108
68
 
109
69
  transitionTo(...args) {
110
70
  if (resemblesURL(args[0])) {
@@ -157,9 +117,7 @@ export default class RouterService extends Service {
157
117
  */
158
118
 
159
119
 
160
- replaceWith()
161
- /* routeNameOrUrl, ...models, options */
162
- {
120
+ replaceWith() {
163
121
  return this.transitionTo(...arguments).method('replace');
164
122
  }
165
123
  /**
@@ -304,10 +262,7 @@ export default class RouterService extends Service {
304
262
  // does not correctly account for `undefined` values for `routeName`.
305
263
  // Spoilers: under the hood this currently uses router.js APIs which
306
264
  // *do not* account for this being `undefined`.
307
- routeName, models, // UNSAFE: downstream consumers treat this as `QueryParam`, which the
308
- // type system here *correctly* reports as incorrect, because it may be
309
- // just an empty object.
310
- queryParams, true
265
+ routeName, models, queryParams, true
311
266
  /* fromRouterService */
312
267
  );
313
268
 
@@ -106,9 +106,10 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
106
106
  if (!names.length) {
107
107
  routeInfo = dynamicParent;
108
108
  names = routeInfo && routeInfo['_names'] || [];
109
- }
109
+ } // SAFETY: Since `_qp` is protected we can't infer the type
110
+
110
111
 
111
- let qps = get(this, '_qp.qps');
112
+ let qps = get(this, '_qp').qps;
112
113
  let namePaths = new Array(names.length);
113
114
 
114
115
  for (let a = 0; a < names.length; ++a) {
@@ -301,8 +302,9 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
301
302
 
302
303
 
303
304
  _internalReset(isExiting, transition) {
304
- let controller = this.controller;
305
- controller['_qpDelegate'] = get(this, '_qp.states.inactive');
305
+ let controller = this.controller; // SAFETY: Since `_qp` is protected we can't infer the type
306
+
307
+ controller['_qpDelegate'] = get(this, '_qp').states.inactive;
306
308
  this.resetController(controller, isExiting, transition);
307
309
  }
308
310
  /**
@@ -774,18 +776,18 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
774
776
  controller = definedController;
775
777
  } else {
776
778
  controller = this.generateController(controllerName);
777
- } // Assign the route's controller so that it can more easily be
778
- // referenced in action handlers. Side effects. Side effects everywhere.
779
+ } // SAFETY: Since `_qp` is protected we can't infer the type
780
+
779
781
 
782
+ let queryParams = get(this, '_qp'); // Assign the route's controller so that it can more easily be
783
+ // referenced in action handlers. Side effects. Side effects everywhere.
780
784
 
781
785
  if (!this.controller) {
782
- let qp = get(this, '_qp');
783
- let propNames = qp !== undefined ? get(qp, 'propertyNames') : [];
786
+ let propNames = queryParams.propertyNames;
784
787
  addQueryParamsObservers(controller, propNames);
785
788
  this.controller = controller;
786
789
  }
787
790
 
788
- let queryParams = get(this, '_qp');
789
791
  let states = queryParams.states;
790
792
  controller._qpDelegate = states.allowOverrides;
791
793
 
@@ -994,8 +996,9 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
994
996
 
995
997
 
996
998
  model(params, transition) {
997
- let name, sawParams, value;
998
- let queryParams = get(this, '_qp.map');
999
+ let name, sawParams, value; // SAFETY: Since `_qp` is protected we can't infer the type
1000
+
1001
+ let queryParams = get(this, '_qp').map;
999
1002
 
1000
1003
  for (let prop in params) {
1001
1004
  if (prop === 'queryParams' || queryParams && prop in queryParams) {
@@ -1105,7 +1108,6 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
1105
1108
 
1106
1109
 
1107
1110
  setupController(controller, context, _transition) {
1108
- // eslint-disable-line no-unused-vars
1109
1111
  if (controller && context !== undefined) {
1110
1112
  set(controller, 'model', context);
1111
1113
  }
@@ -1398,7 +1400,7 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
1398
1400
 
1399
1401
  let desc = combinedQueryParameterConfiguration[propName];
1400
1402
  let scope = desc.scope || 'model';
1401
- let parts;
1403
+ let parts = undefined;
1402
1404
 
1403
1405
  if (scope === 'controller') {
1404
1406
  parts = [];
@@ -1594,13 +1596,12 @@ function buildRenderOptions(route, nameOrOptions, options) {
1594
1596
  }
1595
1597
 
1596
1598
  export function getFullQueryParams(router, state) {
1597
- if (state['fullQueryParams']) {
1598
- return state['fullQueryParams'];
1599
+ if (state.fullQueryParams) {
1600
+ return state.fullQueryParams;
1599
1601
  }
1600
1602
 
1601
- let fullQueryParamsState = {};
1602
1603
  let haveAllRouteInfosResolved = state.routeInfos.every(routeInfo => routeInfo.route);
1603
- Object.assign(fullQueryParamsState, state.queryParams);
1604
+ let fullQueryParamsState = Object.assign({}, state.queryParams);
1604
1605
 
1605
1606
  router._deserializeQueryParams(state.routeInfos, fullQueryParamsState); // only cache query params state if all routeinfos have resolved; it's possible
1606
1607
  // for lazy routes to not have resolved when `getFullQueryParams` is called, so
@@ -1608,24 +1609,25 @@ export function getFullQueryParams(router, state) {
1608
1609
 
1609
1610
 
1610
1611
  if (haveAllRouteInfosResolved) {
1611
- state['fullQueryParams'] = fullQueryParamsState;
1612
+ state.fullQueryParams = fullQueryParamsState;
1612
1613
  }
1613
1614
 
1614
1615
  return fullQueryParamsState;
1615
1616
  }
1616
1617
 
1617
1618
  function getQueryParamsFor(route, state) {
1618
- state['queryParamsFor'] = state['queryParamsFor'] || {};
1619
+ state.queryParamsFor = state.queryParamsFor || {};
1619
1620
  let name = route.fullRouteName;
1620
1621
 
1621
- if (state['queryParamsFor'][name]) {
1622
- return state['queryParamsFor'][name];
1622
+ if (state.queryParamsFor[name]) {
1623
+ return state.queryParamsFor[name];
1623
1624
  }
1624
1625
 
1625
1626
  let fullQueryParams = getFullQueryParams(route._router, state);
1626
- let params = state['queryParamsFor'][name] = {}; // Copy over all the query params for this route/controller into params hash.
1627
+ let params = state.queryParamsFor[name] = {}; // Copy over all the query params for this route/controller into params hash.
1628
+ // SAFETY: Since `_qp` is protected we can't infer the type
1627
1629
 
1628
- let qps = get(route, '_qp.qps');
1630
+ let qps = get(route, '_qp').qps;
1629
1631
 
1630
1632
  for (let i = 0; i < qps.length; ++i) {
1631
1633
  // Put deserialized qp on params hash.
@@ -1824,15 +1826,22 @@ Route.reopen({
1824
1826
  @private
1825
1827
  */
1826
1828
  queryParamsDidChange(changed, _totalPresent, removed) {
1829
+ // SAFETY: Since `_qp` is protected we can't infer the type
1827
1830
  let qpMap = get(this, '_qp').map;
1828
1831
  let totalChanged = Object.keys(changed).concat(Object.keys(removed));
1829
1832
 
1830
1833
  for (let i = 0; i < totalChanged.length; ++i) {
1831
1834
  let qp = qpMap[totalChanged[i]];
1832
1835
 
1833
- if (qp && get(this._optionsForQueryParam(qp), 'refreshModel') && this._router.currentState) {
1834
- this.refresh();
1835
- break;
1836
+ if (qp) {
1837
+ let options = this._optionsForQueryParam(qp);
1838
+
1839
+ assert('options exists', options && typeof options === 'object');
1840
+
1841
+ if (get(options, 'refreshModel') && this._router.currentState) {
1842
+ this.refresh();
1843
+ break;
1844
+ }
1836
1845
  }
1837
1846
  }
1838
1847
 
@@ -1867,7 +1876,8 @@ Route.reopen({
1867
1876
  // param URL key corresponds to a QP property on
1868
1877
  // this controller.
1869
1878
 
1870
- let value, svalue;
1879
+ let value;
1880
+ let svalue;
1871
1881
 
1872
1882
  if (changes.has(qp.urlKey)) {
1873
1883
  // Value updated in/before setupController
@@ -1885,9 +1895,10 @@ Route.reopen({
1885
1895
  svalue = qp.serializedDefaultValue;
1886
1896
  value = copyDefaultValue(qp.defaultValue);
1887
1897
  }
1888
- }
1898
+ } // SAFETY: Since `_qp` is protected we can't infer the type
1899
+
1889
1900
 
1890
- controller._qpDelegate = get(route, '_qp.states.inactive');
1901
+ controller._qpDelegate = get(route, '_qp').states.inactive;
1891
1902
  let thisQueryParamChanged = svalue !== qp.serializedValue;
1892
1903
 
1893
1904
  if (thisQueryParamChanged) {
@@ -1932,6 +1943,7 @@ Route.reopen({
1932
1943
  }
1933
1944
 
1934
1945
  qpMeta.qps.forEach(qp => {
1946
+ // SAFETY: Since `_qp` is protected we can't infer the type
1935
1947
  let routeQpMeta = get(qp.route, '_qp');
1936
1948
  let finalizedController = qp.route.controller;
1937
1949
  finalizedController['_qpDelegate'] = get(routeQpMeta, 'states.active');
@@ -80,7 +80,8 @@ class EmberRouter extends EmberObject.extend(Evented) {
80
80
  this.currentRouteName = null;
81
81
  this.currentPath = null;
82
82
  this.currentRoute = null;
83
- this._qpCache = Object.create(null);
83
+ this._qpCache = Object.create(null); // Set of QueryParam['urlKey']
84
+
84
85
  this._qpUpdates = new Set();
85
86
  this._queuedQPChanges = {};
86
87
  this._toplevelView = null;
@@ -580,8 +581,8 @@ class EmberRouter extends EmberObject.extend(Evented) {
580
581
  let infos = this._routerMicrolib.currentRouteInfos;
581
582
 
582
583
  if (this.namespace.LOG_TRANSITIONS) {
583
- // eslint-disable-next-line no-console
584
- assert('expected infos to be set', infos);
584
+ assert('expected infos to be set', infos); // eslint-disable-next-line no-console
585
+
585
586
  console.log(`Intermediate-transitioned into '${EmberRouter._routePath(infos)}'`);
586
587
  }
587
588
  }
@@ -686,7 +687,8 @@ class EmberRouter extends EmberObject.extend(Evented) {
686
687
  _activeQPChanged(queryParameterName, newValue) {
687
688
  this._queuedQPChanges[queryParameterName] = newValue;
688
689
  once(this, this._fireQueryParamTransition);
689
- }
690
+ } // The queryParameterName is QueryParam['urlKey']
691
+
690
692
 
691
693
  _updatingQPChanged(queryParameterName) {
692
694
  this._qpUpdates.add(queryParameterName);
@@ -729,6 +731,7 @@ class EmberRouter extends EmberObject.extend(Evented) {
729
731
  url: 'https://emberjs.com/deprecations/v4.x#toc_deprecate-auto-location',
730
732
  for: 'ember-source',
731
733
  since: {
734
+ available: '4.1.0',
732
735
  enabled: '4.1.0'
733
736
  }
734
737
  });
@@ -761,6 +764,7 @@ class EmberRouter extends EmberObject.extend(Evented) {
761
764
  url: 'https://emberjs.com/deprecations/v4.x#toc_deprecate-auto-location',
762
765
  for: 'ember-source',
763
766
  since: {
767
+ available: '4.1.0',
764
768
  enabled: '4.1.0'
765
769
  }
766
770
  });
@@ -6,16 +6,14 @@ import { STATE_SYMBOL } from 'router_js';
6
6
  const ALL_PERIODS_REGEX = /\./g;
7
7
  export function extractRouteArgs(args) {
8
8
  args = args.slice();
9
- let possibleQueryParams = args[args.length - 1];
9
+ let possibleQueryParams = args.pop();
10
10
  let queryParams;
11
11
 
12
- if (possibleQueryParams && Object.prototype.hasOwnProperty.call(possibleQueryParams, 'queryParams')) {
13
- // SAFETY: this cast is safe because we have just checked whether
14
- // `possibleQueryParams` -- defined as the last item in args -- both exists
15
- // and has the property `queryParams`. If either of these invariants change,
16
- // ***this is unsafe and should be changed***.
17
- queryParams = args.pop().queryParams;
12
+ if (hasQueryParams(possibleQueryParams)) {
13
+ queryParams = possibleQueryParams.queryParams;
18
14
  } else {
15
+ // Not query params so return to the array
16
+ args.push(possibleQueryParams);
19
17
  queryParams = {};
20
18
  } // UNSAFE: these are simply assumed as the existing behavior of the system.
21
19
  // However, this could break if upstream refactors change it, and the types
@@ -185,12 +183,12 @@ function accumulateQueryParamDescriptors(_desc, accum) {
185
183
  };
186
184
  }
187
185
 
188
- tmp = accum[key] || {
186
+ let val = accum[key] || {
189
187
  as: null,
190
188
  scope: 'model'
191
189
  };
192
- Object.assign(tmp, singleDesc);
193
- accum[key] = tmp;
190
+ Object.assign(val, singleDesc);
191
+ accum[key] = val;
194
192
  }
195
193
  }
196
194
  /*
@@ -253,9 +251,22 @@ export function deprecateTransitionMethods(frameworkClass, methodName) {
253
251
  id: 'routing.transition-methods',
254
252
  for: 'ember-source',
255
253
  since: {
254
+ available: '3.26.0',
256
255
  enabled: '3.26.0'
257
256
  },
258
257
  until: '5.0.0',
259
258
  url: 'https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods'
260
259
  });
260
+ }
261
+
262
+ function hasQueryParams(value) {
263
+ if (value && typeof value === 'object') {
264
+ let qps = value.queryParams;
265
+
266
+ if (qps && typeof qps === 'object') {
267
+ return Object.keys(qps).every(k => typeof k === 'string');
268
+ }
269
+ }
270
+
271
+ return false;
261
272
  }
@@ -786,7 +786,7 @@ if (DEBUG) {
786
786
 
787
787
  if (setters !== undefined && setters[keyName] !== undefined) {
788
788
  Object.defineProperty(obj, keyName, setters[keyName]);
789
- setters[keyName] = undefined;
789
+ delete setters[keyName];
790
790
  }
791
791
  };
792
792
 
@@ -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 !== '') {
@@ -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);
@@ -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);
@@ -28,6 +28,7 @@ export function assign(target, ...rest) {
28
28
  url: 'https://deprecations.emberjs.com/v4.x/#toc_ember-polyfills-deprecate-assign',
29
29
  for: 'ember-source',
30
30
  since: {
31
+ available: '4.0.0',
31
32
  enabled: '4.0.0'
32
33
  }
33
34
  });
@@ -308,9 +308,9 @@ export function end() {
308
308
  @public
309
309
  */
310
310
 
311
- export function schedule()
312
- /* queue, target, method */
313
- {
311
+ export function
312
+ /* queue, target, method */
313
+ schedule() {
314
314
  return _backburner.schedule(...arguments);
315
315
  } // Used by global test teardown
316
316
 
@@ -352,9 +352,9 @@ export function _cancelTimers() {
352
352
  @public
353
353
  */
354
354
 
355
- export function later()
356
- /*target, method*/
357
- {
355
+ export function
356
+ /*target, method*/
357
+ later() {
358
358
  return _backburner.later(...arguments);
359
359
  }
360
360
  /**
@@ -450,9 +450,9 @@ export function once(...args) {
450
450
  @public
451
451
  */
452
452
 
453
- export function scheduleOnce()
454
- /* queue, target, method*/
455
- {
453
+ export function
454
+ /* queue, target, method*/
455
+ scheduleOnce() {
456
456
  return _backburner.scheduleOnce(...arguments);
457
457
  }
458
458
  /**
@@ -212,6 +212,7 @@ function deprecateImportFromString(name, message = `Importing ${name} from '@emb
212
212
  id: 'ember-string.htmlsafe-ishtmlsafe',
213
213
  for: 'ember-source',
214
214
  since: {
215
+ available: '3.25',
215
216
  enabled: '3.25'
216
217
  },
217
218
  until: '4.0.0',
@@ -16,8 +16,7 @@ import Service, { service } from '@ember/service';
16
16
  import { action, computed } from '@ember/object';
17
17
  import { dependentKeyCompat } from '@ember/object/compat';
18
18
  import { Object as EmberObject, RegistryProxyMixin, ContainerProxyMixin, compare, isEqual, Array as EmberArray, MutableEnumerable, MutableArray, Evented, PromiseProxyMixin, Observable, typeOf, isArray, _ProxyMixin, RSVP, Comparable, Namespace, Enumerable, ArrayProxy, ObjectProxy, ActionHandler, CoreObject, NativeArray, A } from '@ember/-internals/runtime';
19
- import { Component, componentCapabilities, modifierCapabilities, setComponentManager, escapeExpression, getTemplates, Helper, helper, htmlSafe, isHTMLSafe, setTemplates, template, Input, isSerializationFirstNode } from '@ember/-internals/glimmer'; // eslint-disable-next-line import/no-unresolved
20
-
19
+ import { Component, componentCapabilities, modifierCapabilities, setComponentManager, escapeExpression, getTemplates, Helper, helper, htmlSafe, isHTMLSafe, setTemplates, template, Input, isSerializationFirstNode } from '@ember/-internals/glimmer';
21
20
  import VERSION from './version';
22
21
  import * as views from '@ember/-internals/views';
23
22
  import * as routing from '@ember/-internals/routing';
@@ -1 +1 @@
1
- export default "4.2.0-alpha.6";
1
+ export default "4.3.0-alpha.2";