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.
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/runtime.js +3 -2
- package/dist/ember-template-compiler.js +25 -5
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +16 -38
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +742 -1494
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/application/instance.js +1 -1
- package/dist/packages/@ember/renderer/index.js +2 -2
- package/dist/packages/@ember/routing/lib/controller_for.js +1 -1
- package/dist/packages/@ember/routing/lib/generate_controller.js +1 -1
- package/dist/packages/@ember/routing/route.js +10 -8
- package/dist/packages/ember/version.js +1 -1
- package/dist/packages/ember-testing/lib/ext/rsvp.js +1 -11
- package/docs/data.json +77 -91
- package/package.json +18 -14
- package/types/stable/@ember/-internals/glimmer/lib/resolver.d.ts +1 -1
- package/types/stable/@ember/application/index.d.ts +1 -1
- package/types/stable/@ember/renderer/index.d.ts +2 -2
- package/types/stable/@ember/routing/lib/controller_for.d.ts +1 -1
- package/types/stable/@ember/routing/lib/generate_controller.d.ts +1 -1
- package/types/stable/@ember/routing/route.d.ts +16 -10
- package/types/stable/@ember/routing/router.d.ts +1 -1
- package/types/stable/@ember/test/index.d.ts +5 -5
- package/types/stable/ember/index.d.ts +4 -4
- package/types/stable/ember-template-compiler/lib/plugins/index.d.ts +2 -2
package/dist/header/license.js
CHANGED
|
@@ -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(
|
|
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(
|
|
52
|
+
assert.dom().hasText('Jane');
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
```
|
|
@@ -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.
|
|
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
|
-
|
|
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;
|