ember-source 5.4.0-alpha.2 → 5.4.0-alpha.4

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.
@@ -5,5 +5,5 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 5.4.0-alpha.2
8
+ * @version 5.4.0-alpha.4
9
9
  */
@@ -197,7 +197,7 @@ class ApplicationInstance extends EngineInstance {
197
197
  }
198
198
  };
199
199
  let handleTransitionReject = error => {
200
- if (error.error) {
200
+ if (error.error && error.error instanceof Error) {
201
201
  throw error.error;
202
202
  } else if (error.name === 'TransitionAborted' && router._routerMicrolib.activeTransition) {
203
203
  return router._routerMicrolib.activeTransition.then(handleTransitionResolve, handleTransitionReject);
@@ -43,13 +43,13 @@
43
43
  <ProfileCard @name={{this.person.name}} />
44
44
  `);
45
45
 
46
- assert.dom(this.element).hasText('John');
46
+ assert.dom().hasText('John');
47
47
 
48
48
  this.person.name = 'Jane';
49
49
 
50
50
  await renderSettled(); // Wait until rendering has completed.
51
51
 
52
- assert.dom(this.element).hasText('Jane');
52
+ assert.dom().hasText('Jane');
53
53
  });
54
54
  });
55
55
  ```
@@ -1,5 +1,5 @@
1
1
  /**
2
- @module ember/routing
2
+ @module @ember/routing
3
3
  */
4
4
  /**
5
5
  Finds a controller instance.
@@ -3,7 +3,7 @@ import Controller from '@ember/controller';
3
3
  import { assert, info } from '@ember/debug';
4
4
  import { DEBUG } from '@glimmer/env';
5
5
  /**
6
- @module ember/routing
6
+ @module @ember/routing
7
7
  */
8
8
  /**
9
9
  Generates a controller factory
@@ -474,11 +474,11 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
474
474
  afterModel(_resolvedModel, _transition) {}
475
475
  /**
476
476
  A hook you can implement to optionally redirect to another route.
477
- Calling `this.transitionTo` from inside of the `redirect` hook will
477
+ Calling `this.router.transitionTo` from inside of the `redirect` hook will
478
478
  abort the current transition (into the route that has implemented `redirect`).
479
479
  `redirect` and `afterModel` behave very similarly and are
480
480
  called almost at the same time, but they have an important
481
- distinction when calling `this.transitionTo` to a child route
481
+ distinction when calling `this.router.transitionTo` to a child route
482
482
  of the current route. From `afterModel`, this new transition
483
483
  invalidates the current transition, causing `beforeModel`,
484
484
  `model`, and `afterModel` hooks to be called again. But the
@@ -521,16 +521,16 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
521
521
  Routes without dynamic segments will always execute the model hook.
522
522
  ```javascript
523
523
  // no dynamic segment, model hook always called
524
- this.transitionTo('posts');
524
+ this.router.transitionTo('posts');
525
525
  // model passed in, so model hook not called
526
526
  thePost = store.findRecord('post', 1);
527
- this.transitionTo('post', thePost);
527
+ this.router.transitionTo('post', thePost);
528
528
  // integer passed in, model hook is called
529
- this.transitionTo('post', 1);
529
+ this.router.transitionTo('post', 1);
530
530
  // model id passed in, model hook is called
531
531
  // useful for forcing the hook to execute
532
532
  thePost = store.findRecord('post', 1);
533
- this.transitionTo('post', thePost.id);
533
+ this.router.transitionTo('post', thePost.id);
534
534
  ```
535
535
  This hook follows the asynchronous/promise semantics
536
536
  described in the documentation for `beforeModel`. In particular,
@@ -613,9 +613,11 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
613
613
  id: 'deprecate-implicit-route-model',
614
614
  for: 'ember-source',
615
615
  since: {
616
- available: '5.3.0'
616
+ available: '5.3.0',
617
+ enabled: '5.3.0'
617
618
  },
618
- until: '6.0.0'
619
+ until: '6.0.0',
620
+ url: 'https://deprecations.emberjs.com/v5.x/#toc_deprecate-implicit-route-model'
619
621
  });
620
622
  const store = 'store' in this ? this.store : get(this, '_store');
621
623
  assert('Expected route to have a store with a find method', isStoreLike(store));
@@ -1 +1 @@
1
- export default "5.4.0-alpha.2";
1
+ export default "5.4.0-alpha.4";
@@ -1,17 +1,7 @@
1
1
  import { RSVP } from '@ember/-internals/runtime';
2
2
  import { _backburner } from '@ember/runloop';
3
- import { isTesting } from '@ember/debug';
4
- import { asyncStart, asyncEnd } from '../test/adapter';
5
3
  RSVP.configure('async', function (callback, promise) {
6
4
  // if schedule will cause autorun, we need to inform adapter
7
- if (isTesting() && !_backburner.currentInstance) {
8
- asyncStart();
9
- _backburner.schedule('actions', () => {
10
- asyncEnd();
11
- callback(promise);
12
- });
13
- } else {
14
- _backburner.schedule('actions', () => callback(promise));
15
- }
5
+ _backburner.schedule('actions', () => callback(promise));
16
6
  });
17
7
  export default RSVP;