ember-source 5.9.0-alpha.2 → 5.9.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/docs/data.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "The Ember API",
4
4
  "description": "The Ember API: a framework for building ambitious web applications",
5
5
  "url": "https://emberjs.com/",
6
- "version": "5.9.0-alpha.2"
6
+ "version": "5.9.0-alpha.4"
7
7
  },
8
8
  "files": {
9
9
  "node_modules/rsvp/lib/rsvp/promise/all.js": {
@@ -2440,7 +2440,7 @@
2440
2440
  "namespaces": {},
2441
2441
  "tag": "module",
2442
2442
  "file": "packages/@ember/routing/route.ts",
2443
- "line": 81
2443
+ "line": 82
2444
2444
  },
2445
2445
  "@ember/routing/router-service": {
2446
2446
  "name": "@ember/routing/router-service",
@@ -4140,7 +4140,7 @@
4140
4140
  "module": "@ember/routing/route",
4141
4141
  "namespace": "",
4142
4142
  "file": "packages/@ember/routing/route.ts",
4143
- "line": 81,
4143
+ "line": 82,
4144
4144
  "description": "The `Route` class is used to define individual routes. Refer to\nthe [routing guide](https://guides.emberjs.com/release/routing/) for documentation.",
4145
4145
  "extends": "EmberObject",
4146
4146
  "uses": [
@@ -5499,6 +5499,32 @@
5499
5499
  {
5500
5500
  "file": "packages/@ember/-internals/environment/lib/env.ts",
5501
5501
  "line": 131,
5502
+ "description": "Whether to force all deprecations to be enabled. This is used internally by\nEmber to enable deprecations in tests. It is not intended to be set in\nprojects.",
5503
+ "itemtype": "property",
5504
+ "name": "_ALL_DEPRECATIONS_ENABLED",
5505
+ "type": "Boolean",
5506
+ "default": "false",
5507
+ "access": "private",
5508
+ "tagname": "",
5509
+ "class": "EmberENV",
5510
+ "module": "rsvp"
5511
+ },
5512
+ {
5513
+ "file": "packages/@ember/-internals/environment/lib/env.ts",
5514
+ "line": 144,
5515
+ "description": "Override the version of ember-source used to determine when deprecations \"break\".\nThis is used internally by Ember to test with deprecated features \"removed\".\nThis is never intended to be set by projects.",
5516
+ "itemtype": "property",
5517
+ "name": "_OVERRIDE_DEPRECATION_VERSION",
5518
+ "type": "string | null",
5519
+ "default": "null",
5520
+ "access": "private",
5521
+ "tagname": "",
5522
+ "class": "EmberENV",
5523
+ "module": "rsvp"
5524
+ },
5525
+ {
5526
+ "file": "packages/@ember/-internals/environment/lib/env.ts",
5527
+ "line": 156,
5502
5528
  "description": "Whether the app defaults to using async observers.\n\nThis is not intended to be set directly, as the implementation may change in\nthe future. Use `@ember/optional-features` instead.",
5503
5529
  "itemtype": "property",
5504
5530
  "name": "_DEFAULT_ASYNC_OBSERVERS",
@@ -5511,7 +5537,7 @@
5511
5537
  },
5512
5538
  {
5513
5539
  "file": "packages/@ember/-internals/environment/lib/env.ts",
5514
- "line": 145,
5540
+ "line": 170,
5515
5541
  "description": "Whether the app still has default record-loading behavior in the model\nhook from RFC https://rfcs.emberjs.com/id/0774-implicit-record-route-loading\nThis will also remove the default store property from the route.\n\nThis is not intended to be set directly, as the implementation may change in\nthe future. Use `@ember/optional-features` instead.",
5516
5542
  "itemtype": "property",
5517
5543
  "name": "_NO_IMPLICIT_ROUTE_MODEL",
@@ -5524,7 +5550,7 @@
5524
5550
  },
5525
5551
  {
5526
5552
  "file": "packages/@ember/-internals/environment/lib/env.ts",
5527
- "line": 161,
5553
+ "line": 186,
5528
5554
  "description": "Controls the maximum number of scheduled rerenders without \"settling\". In general,\napplications should not need to modify this environment variable, but please\nopen an issue so that we can determine if a better default value is needed.",
5529
5555
  "itemtype": "property",
5530
5556
  "name": "_RERENDER_LOOP_LIMIT",
@@ -15868,7 +15894,7 @@
15868
15894
  },
15869
15895
  {
15870
15896
  "file": "packages/@ember/routing/route.ts",
15871
- "line": 93,
15897
+ "line": 94,
15872
15898
  "description": "The `willTransition` action is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ContactFormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData')) {\n this.controller.displayNavigationConfirm();\n transition.abort();\n }\n }\n}\n```\n\nYou can also redirect elsewhere by calling\n`this.router.transitionTo('elsewhere')` from within `willTransition`.\nNote that `willTransition` will not be fired for the\nredirecting `transitionTo`, since `willTransition` doesn't\nfire when there is already a transition underway. If you want\nsubsequent `willTransition` actions to fire for the redirecting\ntransition, you must first explicitly call\n`transition.abort()`.\n\nTo allow the `willTransition` event to continue bubbling to the parent\nroute, use `return true;`. When the `willTransition` method has a\nreturn value of `true` then the parent route's `willTransition` method\nwill be fired, enabling \"bubbling\" behavior for the event.",
15873
15899
  "itemtype": "event",
15874
15900
  "name": "willTransition",
@@ -15887,7 +15913,7 @@
15887
15913
  },
15888
15914
  {
15889
15915
  "file": "packages/@ember/routing/route.ts",
15890
- "line": 138,
15916
+ "line": 139,
15891
15917
  "description": "The `didTransition` action is fired after a transition has\nsuccessfully been completed. This occurs after the normal model\nhooks (`beforeModel`, `model`, `afterModel`, `setupController`)\nhave resolved. The `didTransition` action has no arguments,\nhowever, it can be useful for tracking page views or resetting\nstate on the controller.\n\n```app/routes/login.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class LoginRoute extends Route {\n @action\n didTransition() {\n // your code there\n return true; // Bubble the didTransition event\n }\n}\n```",
15892
15918
  "itemtype": "event",
15893
15919
  "name": "didTransition",
@@ -15899,7 +15925,7 @@
15899
15925
  },
15900
15926
  {
15901
15927
  "file": "packages/@ember/routing/route.ts",
15902
- "line": 165,
15928
+ "line": 166,
15903
15929
  "description": "The `loading` action is fired on the route when a route's `model`\nhook returns a promise that is not already resolved. The current\n`Transition` object is the first parameter and the route that\ntriggered the loading event is the second parameter.\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n loading(transition, route) {\n let controller = this.controllerFor('foo');\n\n // The controller may not be instantiated when initially loading\n if (controller) {\n controller.currentlyLoading = true;\n\n transition.finally(function() {\n controller.currentlyLoading = false;\n });\n }\n }\n}\n```",
15904
15930
  "itemtype": "event",
15905
15931
  "name": "loading",
@@ -15923,7 +15949,7 @@
15923
15949
  },
15924
15950
  {
15925
15951
  "file": "packages/@ember/routing/route.ts",
15926
- "line": 200,
15952
+ "line": 201,
15927
15953
  "description": "When attempting to transition into a route, any of the hooks\nmay return a promise that rejects, at which point an `error`\naction will be fired on the partially-entered routes, allowing\nfor per-route error handling logic, or shared error handling\nlogic defined on a parent route.\n\nHere is an example of an error handler that will be invoked\nfor rejected promises from the various hooks on the route,\nas well as any unhandled errors from child routes:\n\n```app/routes/admin.js\nimport { reject } from 'rsvp';\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\nimport { service } from '@ember/service';\n\nexport default class AdminRoute extends Route {\n @service router;\n\n beforeModel() {\n return reject('bad things!');\n }\n\n @action\n error(error, transition) {\n // Assuming we got here due to the error in `beforeModel`,\n // we can expect that error === \"bad things!\",\n // but a promise model rejecting would also\n // call this hook, as would any errors encountered\n // in `afterModel`.\n\n // The `error` hook is also provided the failed\n // `transition`, which can be stored and later\n // `.retry()`d if desired.\n\n this.router.transitionTo('login');\n }\n}\n```\n\n`error` actions that bubble up all the way to `ApplicationRoute`\nwill fire a default error handler that logs the error. You can\nspecify your own global default error handler by overriding the\n`error` handler on `ApplicationRoute`:\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n error(error, transition) {\n this.controllerFor('banner').displayError(error.message);\n }\n}\n```",
15928
15954
  "itemtype": "event",
15929
15955
  "name": "error",
@@ -15947,31 +15973,31 @@
15947
15973
  },
15948
15974
  {
15949
15975
  "file": "packages/@ember/routing/route.ts",
15950
- "line": 273,
15976
+ "line": 274,
15951
15977
  "class": "Route",
15952
15978
  "module": "@ember/routing/route"
15953
15979
  },
15954
15980
  {
15955
15981
  "file": "packages/@ember/routing/route.ts",
15956
- "line": 275,
15982
+ "line": 276,
15957
15983
  "class": "Route",
15958
15984
  "module": "@ember/routing/route"
15959
15985
  },
15960
15986
  {
15961
15987
  "file": "packages/@ember/routing/route.ts",
15962
- "line": 278,
15988
+ "line": 279,
15963
15989
  "class": "Route",
15964
15990
  "module": "@ember/routing/route"
15965
15991
  },
15966
15992
  {
15967
15993
  "file": "packages/@ember/routing/route.ts",
15968
- "line": 280,
15994
+ "line": 281,
15969
15995
  "class": "Route",
15970
15996
  "module": "@ember/routing/route"
15971
15997
  },
15972
15998
  {
15973
15999
  "file": "packages/@ember/routing/route.ts",
15974
- "line": 308,
16000
+ "line": 309,
15975
16001
  "description": "A hook you can implement to convert the route's model into parameters\nfor the URL.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\n```\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n model({ post_id }) {\n // the server returns `{ id: 12 }`\n return fetch(`/posts/${post_id}`;\n }\n\n serialize(model) {\n // this will make the URL `/posts/12`\n return { post_id: model.id };\n }\n}\n```\n\nThe default `serialize` method will insert the model's `id` into the\nroute's dynamic segment (in this case, `:post_id`) if the segment contains '_id'.\nIf the route has multiple dynamic segments or does not contain '_id', `serialize`\nwill return `getProperties(model, params)`\n\nThis method is called when `transitionTo` is called with a context\nin order to populate the URL.",
15976
16002
  "itemtype": "method",
15977
16003
  "name": "serialize",
@@ -15999,7 +16025,7 @@
15999
16025
  },
16000
16026
  {
16001
16027
  "file": "packages/@ember/routing/route.ts",
16002
- "line": 376,
16028
+ "line": 377,
16003
16029
  "description": "Configuration hash for this route's queryParams. The possible\nconfiguration options and their defaults are as follows\n(assuming a query param whose controller property is `page`):\n\n```javascript\nqueryParams = {\n page: {\n // By default, controller query param properties don't\n // cause a full transition when they are changed, but\n // rather only cause the URL to update. Setting\n // `refreshModel` to true will cause an \"in-place\"\n // transition to occur, whereby the model hooks for\n // this route (and any child routes) will re-fire, allowing\n // you to reload models (e.g., from the server) using the\n // updated query param values.\n refreshModel: false,\n\n // By default, changes to controller query param properties\n // cause the URL to update via `pushState`, which means an\n // item will be added to the browser's history, allowing\n // you to use the back button to restore the app to the\n // previous state before the query param property was changed.\n // Setting `replace` to true will use `replaceState` (or its\n // hash location equivalent), which causes no browser history\n // item to be added. This options name and default value are\n // the same as the `link-to` helper's `replace` option.\n replace: false,\n\n // By default, the query param URL key is the same name as\n // the controller property name. Use `as` to specify a\n // different URL key.\n as: 'page'\n }\n};\n```",
16004
16030
  "itemtype": "property",
16005
16031
  "name": "queryParams",
@@ -16012,7 +16038,7 @@
16012
16038
  },
16013
16039
  {
16014
16040
  "file": "packages/@ember/routing/route.ts",
16015
- "line": 429,
16041
+ "line": 430,
16016
16042
  "description": "The name of the template to use by default when rendering this route's\ntemplate.\n\n```app/routes/posts/list.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsListRoute extends Route {\n templateName = 'posts/list';\n}\n```\n\n```app/routes/posts/index.js\nimport PostsListRoute from '../posts/list';\n\nexport default class PostsIndexRoute extends PostsListRoute {};\n```\n\n```app/routes/posts/archived.js\nimport PostsListRoute from '../posts/list';\n\nexport default class PostsArchivedRoute extends PostsListRoute {};\n```",
16017
16043
  "itemtype": "property",
16018
16044
  "name": "templateName",
@@ -16026,7 +16052,7 @@
16026
16052
  },
16027
16053
  {
16028
16054
  "file": "packages/@ember/routing/route.ts",
16029
- "line": 462,
16055
+ "line": 463,
16030
16056
  "description": "The name of the controller to associate with this route.\n\nBy default, Ember will lookup a route's controller that matches the name\nof the route (i.e. `posts.new`). However,\nif you would like to define a specific controller to use, you can do so\nusing this property.\n\nThis is useful in many ways, as the controller specified will be:\n\n* passed to the `setupController` method.\n* used as the controller for the template being rendered by the route.\n* returned from a call to `controllerFor` for the route.",
16031
16057
  "itemtype": "property",
16032
16058
  "name": "controllerName",
@@ -16040,7 +16066,7 @@
16040
16066
  },
16041
16067
  {
16042
16068
  "file": "packages/@ember/routing/route.ts",
16043
- "line": 485,
16069
+ "line": 486,
16044
16070
  "description": "The controller associated with this route.\n\nExample\n\n```app/routes/form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class FormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData') &&\n !confirm('Are you sure you want to abandon progress?')) {\n transition.abort();\n } else {\n // Bubble the `willTransition` action so that\n // parent routes can decide whether or not to abort.\n return true;\n }\n }\n}\n```",
16045
16071
  "itemtype": "property",
16046
16072
  "name": "controller",
@@ -16053,7 +16079,7 @@
16053
16079
  },
16054
16080
  {
16055
16081
  "file": "packages/@ember/routing/route.ts",
16056
- "line": 516,
16082
+ "line": 517,
16057
16083
  "description": "The name of the route, dot-delimited.\n\nFor example, a route found at `app/routes/posts/post.js` will have\na `routeName` of `posts.post`.",
16058
16084
  "itemtype": "property",
16059
16085
  "name": "routeName",
@@ -16066,7 +16092,7 @@
16066
16092
  },
16067
16093
  {
16068
16094
  "file": "packages/@ember/routing/route.ts",
16069
- "line": 530,
16095
+ "line": 531,
16070
16096
  "description": "The name of the route, dot-delimited, including the engine prefix\nif applicable.\n\nFor example, a route found at `addon/routes/posts/post.js` within an\nengine named `admin` will have a `fullRouteName` of `admin.posts.post`.",
16071
16097
  "itemtype": "property",
16072
16098
  "name": "fullRouteName",
@@ -16079,7 +16105,7 @@
16079
16105
  },
16080
16106
  {
16081
16107
  "file": "packages/@ember/routing/route.ts",
16082
- "line": 545,
16108
+ "line": 546,
16083
16109
  "description": "Sets the name for this route, including a fully resolved name for routes\ninside engines.",
16084
16110
  "access": "private",
16085
16111
  "tagname": "",
@@ -16097,7 +16123,7 @@
16097
16123
  },
16098
16124
  {
16099
16125
  "file": "packages/@ember/routing/route.ts",
16100
- "line": 560,
16126
+ "line": 561,
16101
16127
  "access": "private",
16102
16128
  "tagname": "",
16103
16129
  "itemtype": "method",
@@ -16107,7 +16133,7 @@
16107
16133
  },
16108
16134
  {
16109
16135
  "file": "packages/@ember/routing/route.ts",
16110
- "line": 594,
16136
+ "line": 595,
16111
16137
  "access": "private",
16112
16138
  "tagname": "",
16113
16139
  "itemtype": "property",
@@ -16117,7 +16143,7 @@
16117
16143
  },
16118
16144
  {
16119
16145
  "file": "packages/@ember/routing/route.ts",
16120
- "line": 603,
16146
+ "line": 604,
16121
16147
  "access": "private",
16122
16148
  "tagname": "",
16123
16149
  "itemtype": "method",
@@ -16127,7 +16153,7 @@
16127
16153
  },
16128
16154
  {
16129
16155
  "file": "packages/@ember/routing/route.ts",
16130
- "line": 611,
16156
+ "line": 612,
16131
16157
  "description": "Returns a hash containing the parameters of an ancestor route.\n\nYou may notice that `this.paramsFor` sometimes works when referring to a\nchild route, but this behavior should not be relied upon as only ancestor\nroutes are certain to be loaded in time.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('member', { path: ':name' }, function() {\n this.route('interest', { path: ':interest' });\n });\n});\n```\n\n```app/routes/member.js\nimport Route from '@ember/routing/route';\n\nexport default class MemberRoute extends Route {\n queryParams = {\n memberQp: { refreshModel: true }\n }\n}\n```\n\n```app/routes/member/interest.js\nimport Route from '@ember/routing/route';\n\nexport default class MemberInterestRoute extends Route {\n queryParams = {\n interestQp: { refreshModel: true }\n }\n\n model() {\n return this.paramsFor('member');\n }\n}\n```\n\nIf we visit `/turing/maths?memberQp=member&interestQp=interest` the model for\nthe `member.interest` route is a hash with:\n\n* `name`: `turing`\n* `memberQp`: `member`",
16132
16158
  "itemtype": "method",
16133
16159
  "name": "paramsFor",
@@ -16150,7 +16176,7 @@
16150
16176
  },
16151
16177
  {
16152
16178
  "file": "packages/@ember/routing/route.ts",
16153
- "line": 692,
16179
+ "line": 693,
16154
16180
  "description": "Serializes the query parameter key",
16155
16181
  "itemtype": "method",
16156
16182
  "name": "serializeQueryParamKey",
@@ -16168,7 +16194,7 @@
16168
16194
  },
16169
16195
  {
16170
16196
  "file": "packages/@ember/routing/route.ts",
16171
- "line": 703,
16197
+ "line": 704,
16172
16198
  "description": "Serializes value of the query parameter based on defaultValueType",
16173
16199
  "itemtype": "method",
16174
16200
  "name": "serializeQueryParam",
@@ -16196,7 +16222,7 @@
16196
16222
  },
16197
16223
  {
16198
16224
  "file": "packages/@ember/routing/route.ts",
16199
- "line": 719,
16225
+ "line": 720,
16200
16226
  "description": "Deserializes value of the query parameter based on defaultValueType",
16201
16227
  "itemtype": "method",
16202
16228
  "name": "deserializeQueryParam",
@@ -16224,7 +16250,7 @@
16224
16250
  },
16225
16251
  {
16226
16252
  "file": "packages/@ember/routing/route.ts",
16227
- "line": 735,
16253
+ "line": 736,
16228
16254
  "access": "private",
16229
16255
  "tagname": "",
16230
16256
  "itemtype": "property",
@@ -16234,7 +16260,7 @@
16234
16260
  },
16235
16261
  {
16236
16262
  "file": "packages/@ember/routing/route.ts",
16237
- "line": 751,
16263
+ "line": 752,
16238
16264
  "description": "A hook you can use to reset controller values either when the model\nchanges or the route is exiting.\n\n```app/routes/articles.js\nimport Route from '@ember/routing/route';\n\nexport default class ArticlesRoute extends Route {\n resetController(controller, isExiting, transition) {\n if (isExiting && transition.targetName !== 'error') {\n controller.set('page', 1);\n }\n }\n}\n```",
16239
16265
  "itemtype": "method",
16240
16266
  "name": "resetController",
@@ -16263,7 +16289,7 @@
16263
16289
  },
16264
16290
  {
16265
16291
  "file": "packages/@ember/routing/route.ts",
16266
- "line": 781,
16292
+ "line": 782,
16267
16293
  "access": "private",
16268
16294
  "tagname": "",
16269
16295
  "itemtype": "method",
@@ -16273,7 +16299,7 @@
16273
16299
  },
16274
16300
  {
16275
16301
  "file": "packages/@ember/routing/route.ts",
16276
- "line": 792,
16302
+ "line": 793,
16277
16303
  "access": "private",
16278
16304
  "tagname": "",
16279
16305
  "itemtype": "method",
@@ -16284,7 +16310,7 @@
16284
16310
  },
16285
16311
  {
16286
16312
  "file": "packages/@ember/routing/route.ts",
16287
- "line": 806,
16313
+ "line": 807,
16288
16314
  "access": "private",
16289
16315
  "tagname": "",
16290
16316
  "itemtype": "method",
@@ -16294,7 +16320,7 @@
16294
16320
  },
16295
16321
  {
16296
16322
  "file": "packages/@ember/routing/route.ts",
16297
- "line": 817,
16323
+ "line": 818,
16298
16324
  "description": "This event is triggered when the router enters the route. It is\nnot executed when the model for the route changes.\n\n```app/routes/application.js\nimport { on } from '@ember/object/evented';\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n collectAnalytics: on('activate', function(){\n collectAnalytics();\n })\n});\n```",
16299
16325
  "itemtype": "event",
16300
16326
  "name": "activate",
@@ -16306,7 +16332,7 @@
16306
16332
  },
16307
16333
  {
16308
16334
  "file": "packages/@ember/routing/route.ts",
16309
- "line": 837,
16335
+ "line": 838,
16310
16336
  "description": "This event is triggered when the router completely exits this\nroute. It is not executed when the model for the route changes.\n\n```app/routes/index.js\nimport { on } from '@ember/object/evented';\nimport Route from '@ember/routing/route';\n\nexport default Route.extend({\n trackPageLeaveAnalytics: on('deactivate', function(){\n trackPageLeaveAnalytics();\n })\n});\n```",
16311
16337
  "itemtype": "event",
16312
16338
  "name": "deactivate",
@@ -16318,7 +16344,7 @@
16318
16344
  },
16319
16345
  {
16320
16346
  "file": "packages/@ember/routing/route.ts",
16321
- "line": 857,
16347
+ "line": 858,
16322
16348
  "description": "This hook is executed when the router completely exits this route. It is\nnot executed when the model for the route changes.",
16323
16349
  "itemtype": "method",
16324
16350
  "name": "deactivate",
@@ -16337,7 +16363,7 @@
16337
16363
  },
16338
16364
  {
16339
16365
  "file": "packages/@ember/routing/route.ts",
16340
- "line": 868,
16366
+ "line": 869,
16341
16367
  "description": "This hook is executed when the router enters the route. It is not executed\nwhen the model for the route changes.",
16342
16368
  "itemtype": "method",
16343
16369
  "name": "activate",
@@ -16356,7 +16382,7 @@
16356
16382
  },
16357
16383
  {
16358
16384
  "file": "packages/@ember/routing/route.ts",
16359
- "line": 879,
16385
+ "line": 880,
16360
16386
  "description": "Perform a synchronous transition into another route without attempting\nto resolve promises, update the URL, or abort any currently active\nasynchronous transitions (i.e. regular transitions caused by\n`transitionTo` or URL changes).\n\nThis method is handy for performing intermediate transitions on the\nway to a final destination route, and is called internally by the\ndefault implementations of the `error` and `loading` handlers.",
16361
16387
  "itemtype": "method",
16362
16388
  "name": "intermediateTransitionTo",
@@ -16380,7 +16406,7 @@
16380
16406
  },
16381
16407
  {
16382
16408
  "file": "packages/@ember/routing/route.ts",
16383
- "line": 901,
16409
+ "line": 902,
16384
16410
  "description": "Refresh the model on this route and any child routes, firing the\n`beforeModel`, `model`, and `afterModel` hooks in a similar fashion\nto how routes are entered when transitioning in from other route.\nThe current route params (e.g. `article_id`) will be passed in\nto the respective model hooks, and if a different model is returned,\n`setupController` and associated route hooks will re-fire as well.\n\nAn example usage of this method is re-querying the server for the\nlatest information using the same parameters as when the route\nwas first entered.\n\nNote that this will cause `model` hooks to fire even on routes\nthat were provided a model object when the route was initially\nentered.",
16385
16411
  "itemtype": "method",
16386
16412
  "name": "refresh",
@@ -16396,7 +16422,7 @@
16396
16422
  },
16397
16423
  {
16398
16424
  "file": "packages/@ember/routing/route.ts",
16399
- "line": 927,
16425
+ "line": 928,
16400
16426
  "description": "This hook is the entry point for router.js",
16401
16427
  "access": "private",
16402
16428
  "tagname": "",
@@ -16407,7 +16433,7 @@
16407
16433
  },
16408
16434
  {
16409
16435
  "file": "packages/@ember/routing/route.ts",
16410
- "line": 1002,
16436
+ "line": 1003,
16411
16437
  "description": "This hook is the first of the route entry validation hooks\ncalled when an attempt is made to transition into a route\nor one of its children. It is called before `model` and\n`afterModel`, and is appropriate for cases when:\n\n1) A decision can be made to redirect elsewhere without\n needing to resolve the model first.\n2) Any async operations need to occur first before the\n model is attempted to be resolved.\n\nThis hook is provided the current `transition` attempt\nas a parameter, which can be used to `.abort()` the transition,\nsave it for a later `.retry()`, or retrieve values set\non it from a previous hook. You can also just call\n`router.transitionTo` to another route to implicitly\nabort the `transition`.\n\nYou can return a promise from this hook to pause the\ntransition until the promise resolves (or rejects). This could\nbe useful, for instance, for retrieving async code from\nthe server that is required to enter a route.",
16412
16438
  "itemtype": "method",
16413
16439
  "name": "beforeModel",
@@ -16430,7 +16456,7 @@
16430
16456
  },
16431
16457
  {
16432
16458
  "file": "packages/@ember/routing/route.ts",
16433
- "line": 1037,
16459
+ "line": 1038,
16434
16460
  "description": "This hook is called after this route's model has resolved.\nIt follows identical async/promise semantics to `beforeModel`\nbut is provided the route's resolved model in addition to\nthe `transition`, and is therefore suited to performing\nlogic that can only take place after the model has already\nresolved.\n\n```app/routes/posts.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class PostsRoute extends Route {\n @service router;\n\n afterModel(posts, transition) {\n if (posts.get('length') === 1) {\n this.router.transitionTo('post.show', posts.get('firstObject'));\n }\n }\n}\n```\n\nRefer to documentation for `beforeModel` for a description\nof transition-pausing semantics when a promise is returned\nfrom this hook.",
16435
16461
  "itemtype": "method",
16436
16462
  "name": "afterModel",
@@ -16458,7 +16484,7 @@
16458
16484
  },
16459
16485
  {
16460
16486
  "file": "packages/@ember/routing/route.ts",
16461
- "line": 1081,
16487
+ "line": 1082,
16462
16488
  "description": "A hook you can implement to optionally redirect to another route.\n\nCalling `this.router.transitionTo` from inside of the `redirect` hook will\nabort the current transition (into the route that has implemented `redirect`).\n\n`redirect` and `afterModel` behave very similarly and are\ncalled almost at the same time, but they have an important\ndistinction when calling `this.router.transitionTo` to a child route\nof the current route. From `afterModel`, this new transition\ninvalidates the current transition, causing `beforeModel`,\n`model`, and `afterModel` hooks to be called again. But the\nsame transition started from `redirect` does _not_ invalidate\nthe current transition. In other words, by the time the `redirect`\nhook has been called, both the resolved model and the attempted\nentry into this route are considered fully validated.",
16463
16489
  "itemtype": "method",
16464
16490
  "name": "redirect",
@@ -16482,7 +16508,7 @@
16482
16508
  },
16483
16509
  {
16484
16510
  "file": "packages/@ember/routing/route.ts",
16485
- "line": 1106,
16511
+ "line": 1107,
16486
16512
  "description": "Called when the context is changed by router.js.",
16487
16513
  "access": "private",
16488
16514
  "tagname": "",
@@ -16493,7 +16519,7 @@
16493
16519
  },
16494
16520
  {
16495
16521
  "file": "packages/@ember/routing/route.ts",
16496
- "line": 1116,
16522
+ "line": 1117,
16497
16523
  "description": "A hook you can implement to convert the URL into the model for\nthis route.\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nNote that for routes with dynamic segments, this hook is not always\nexecuted. If the route is entered through a transition (e.g. when\nusing the `link-to` Handlebars helper or the `transitionTo` method\nof routes), and a model context is already provided this hook\nis not called.\n\nA model context does not include a primitive string or number,\nwhich does cause the model hook to be called.\n\nRoutes without dynamic segments will always execute the model hook.\n\n```javascript\n// no dynamic segment, model hook always called\nthis.router.transitionTo('posts');\n\n// model passed in, so model hook not called\nthePost = store.findRecord('post', 1);\nthis.router.transitionTo('post', thePost);\n\n// integer passed in, model hook is called\nthis.router.transitionTo('post', 1);\n\n// model id passed in, model hook is called\n// useful for forcing the hook to execute\nthePost = store.findRecord('post', 1);\nthis.router.transitionTo('post', thePost.id);\n```\n\nThis hook follows the asynchronous/promise semantics\ndescribed in the documentation for `beforeModel`. In particular,\nif a promise returned from `model` fails, the error will be\nhandled by the `error` hook on `Route`.\n\nNote that the legacy behavior of automatically defining a model\nhook when a dynamic segment ending in `_id` is present is\n[deprecated](https://deprecations.emberjs.com/v5.x#toc_deprecate-implicit-route-model).\nYou should explicitly define a model hook whenever any segments are\npresent.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class PostRoute extends Route {\n @service store;\n\n model(params) {\n return this.store.findRecord('post', params.post_id);\n }\n}\n```",
16498
16524
  "itemtype": "method",
16499
16525
  "name": "model",
@@ -16521,7 +16547,7 @@
16521
16547
  },
16522
16548
  {
16523
16549
  "file": "packages/@ember/routing/route.ts",
16524
- "line": 1234,
16550
+ "line": 1235,
16525
16551
  "access": "private",
16526
16552
  "tagname": "",
16527
16553
  "itemtype": "method",
@@ -16547,7 +16573,7 @@
16547
16573
  },
16548
16574
  {
16549
16575
  "file": "packages/@ember/routing/route.ts",
16550
- "line": 1247,
16576
+ "line": 1248,
16551
16577
  "itemtype": "method",
16552
16578
  "name": "findModel",
16553
16579
  "params": [
@@ -16569,7 +16595,7 @@
16569
16595
  },
16570
16596
  {
16571
16597
  "file": "packages/@ember/routing/route.ts",
16572
- "line": 1278,
16598
+ "line": 1272,
16573
16599
  "description": "A hook you can use to setup the controller for the current route.\n\nThis method is called with the controller for the current route and the\nmodel supplied by the `model` hook.\n\nBy default, the `setupController` hook sets the `model` property of\nthe controller to the specified `model` when it is not `undefined`.\n\nIf you implement the `setupController` hook in your Route, it will\nprevent this default behavior. If you want to preserve that behavior\nwhen implementing your `setupController` function, make sure to call\n`super`:\n\n```app/routes/photos.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class PhotosRoute extends Route {\n @service store;\n\n model() {\n return this.store.findAll('photo');\n }\n\n setupController(controller, model) {\n super.setupController(controller, model);\n\n this.controllerFor('application').set('showingPhotos', true);\n }\n}\n```\n\nThe provided controller will be one resolved based on the name\nof this route.\n\nIf no explicit controller is defined, Ember will automatically create one.\n\nAs an example, consider the router:\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' });\n});\n\nexport default Router;\n```\n\nIf you have defined a file for the post controller,\nthe framework will use it.\nIf it is not defined, a basic `Controller` instance would be used.",
16574
16600
  "example": [
16575
16601
  " Behavior of a basic Controller\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n setupController(controller, model) {\n controller.set('model', model);\n }\n});\n```"
@@ -16602,7 +16628,7 @@
16602
16628
  },
16603
16629
  {
16604
16630
  "file": "packages/@ember/routing/route.ts",
16605
- "line": 1357,
16631
+ "line": 1351,
16606
16632
  "description": "Returns the controller of the current route, or a parent (or any ancestor)\nroute in a route hierarchy.\n\nThe controller instance must already have been created, either through entering the\nassociated route or using `generateController`.\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class PostRoute extends Route {\n setupController(controller, post) {\n super.setupController(controller, post);\n\n this.controllerFor('posts').set('currentPost', post);\n }\n}\n```",
16607
16633
  "itemtype": "method",
16608
16634
  "name": "controllerFor",
@@ -16625,7 +16651,7 @@
16625
16651
  },
16626
16652
  {
16627
16653
  "file": "packages/@ember/routing/route.ts",
16628
- "line": 1411,
16654
+ "line": 1405,
16629
16655
  "description": "Generates a controller for a route.\n\nExample\n\n```app/routes/post.js\nimport Route from '@ember/routing/route';\n\nexport default class Post extends Route {\n setupController(controller, post) {\n super.setupController(controller, post);\n\n this.generateController('posts');\n }\n}\n```",
16630
16656
  "itemtype": "method",
16631
16657
  "name": "generateController",
@@ -16643,7 +16669,7 @@
16643
16669
  },
16644
16670
  {
16645
16671
  "file": "packages/@ember/routing/route.ts",
16646
- "line": 1439,
16672
+ "line": 1433,
16647
16673
  "description": "Returns the resolved model of a parent (or any ancestor) route\nin a route hierarchy. During a transition, all routes\nmust resolve a model object, and if a route\nneeds access to a parent route's model in order to\nresolve a model (or just reuse the model from a parent),\nit can call `this.modelFor(theNameOfParentRoute)` to\nretrieve it. If the ancestor route's model was a promise,\nits resolved result is returned.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('post', { path: '/posts/:post_id' }, function() {\n this.route('comments');\n });\n});\n\nexport default Router;\n```\n\n```app/routes/post/comments.js\nimport Route from '@ember/routing/route';\n\nexport default class PostCommentsRoute extends Route {\n model() {\n let post = this.modelFor('post');\n\n return post.comments;\n }\n}\n```",
16648
16674
  "itemtype": "method",
16649
16675
  "name": "modelFor",
@@ -16666,7 +16692,7 @@
16666
16692
  },
16667
16693
  {
16668
16694
  "file": "packages/@ember/routing/route.ts",
16669
- "line": 1513,
16695
+ "line": 1507,
16670
16696
  "description": "`this[RENDER]` is used to set up the rendering option for the outlet state.",
16671
16697
  "itemtype": "method",
16672
16698
  "name": "this[RENDER]",
@@ -16677,7 +16703,7 @@
16677
16703
  },
16678
16704
  {
16679
16705
  "file": "packages/@ember/routing/route.ts",
16680
- "line": 1527,
16706
+ "line": 1521,
16681
16707
  "access": "private",
16682
16708
  "tagname": "",
16683
16709
  "itemtype": "method",
@@ -16687,7 +16713,7 @@
16687
16713
  },
16688
16714
  {
16689
16715
  "file": "packages/@ember/routing/route.ts",
16690
- "line": 1539,
16716
+ "line": 1533,
16691
16717
  "description": "Allows you to produce custom metadata for the route.\nThe return value of this method will be attached to\nits corresponding RouteInfoWithAttributes object.\n\nExample\n\n```app/routes/posts/index.js\nimport Route from '@ember/routing/route';\n\nexport default class PostsIndexRoute extends Route {\n buildRouteInfoMetadata() {\n return { title: 'Posts Page' }\n }\n}\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { service } from '@ember/service';\n\nexport default class ApplicationRoute extends Route {\n @service router\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeDidChange', transition => {\n document.title = transition.to.metadata.title;\n // would update document's title to \"Posts Page\"\n });\n }\n}\n```",
16692
16718
  "itemtype": "method",
16693
16719
  "name": "buildRouteInfoMetadata",
@@ -16702,13 +16728,13 @@
16702
16728
  },
16703
16729
  {
16704
16730
  "file": "packages/@ember/routing/route.ts",
16705
- "line": 1590,
16731
+ "line": 1584,
16706
16732
  "class": "Route",
16707
16733
  "module": "@ember/routing/route"
16708
16734
  },
16709
16735
  {
16710
16736
  "file": "packages/@ember/routing/route.ts",
16711
- "line": 1639,
16737
+ "line": 1633,
16712
16738
  "access": "private",
16713
16739
  "tagname": "",
16714
16740
  "itemtype": "property",
@@ -16718,7 +16744,7 @@
16718
16744
  },
16719
16745
  {
16720
16746
  "file": "packages/@ember/routing/route.ts",
16721
- "line": 1778,
16747
+ "line": 1772,
16722
16748
  "description": "Sends an action to the router, which will delegate it to the currently\nactive route hierarchy per the bubbling rules explained under `actions`.\n\nExample\n\n```app/router.js\n// ...\n\nRouter.map(function() {\n this.route('index');\n});\n\nexport default Router;\n```\n\n```app/routes/application.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class ApplicationRoute extends Route {\n @action\n track(arg) {\n console.log(arg, 'was clicked');\n }\n}\n```\n\n```app/routes/index.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class IndexRoute extends Route {\n @action\n trackIfDebug(arg) {\n if (debug) {\n this.send('track', arg);\n }\n }\n}\n```",
16723
16749
  "itemtype": "method",
16724
16750
  "name": "send",
@@ -16742,7 +16768,7 @@
16742
16768
  },
16743
16769
  {
16744
16770
  "file": "packages/@ember/routing/route.ts",
16745
- "line": 2058,
16771
+ "line": 2052,
16746
16772
  "description": "The controller associated with this route.\n\nExample\n\n```app/routes/form.js\nimport Route from '@ember/routing/route';\nimport { action } from '@ember/object';\n\nexport default class FormRoute extends Route {\n @action\n willTransition(transition) {\n if (this.controller.get('userHasEnteredData') &&\n !confirm('Are you sure you want to abandon progress?')) {\n transition.abort();\n } else {\n // Bubble the `willTransition` action so that\n // parent routes can decide whether or not to abort.\n return true;\n }\n }\n}\n```",
16747
16773
  "itemtype": "property",
16748
16774
  "name": "controller",
@@ -16755,7 +16781,7 @@
16755
16781
  },
16756
16782
  {
16757
16783
  "file": "packages/@ember/routing/route.ts",
16758
- "line": 2089,
16784
+ "line": 2083,
16759
16785
  "description": "This action is called when one or more query params have changed. Bubbles.",
16760
16786
  "itemtype": "method",
16761
16787
  "name": "queryParamsDidChange",
@@ -19238,7 +19264,7 @@
19238
19264
  },
19239
19265
  {
19240
19266
  "message": "replacing incorrect tag: returns with return",
19241
- "line": " packages/@ember/routing/route.ts:2089"
19267
+ "line": " packages/@ember/routing/route.ts:2083"
19242
19268
  },
19243
19269
  {
19244
19270
  "message": "unknown tag: internal",
@@ -19826,23 +19852,23 @@
19826
19852
  },
19827
19853
  {
19828
19854
  "message": "Missing item type",
19829
- "line": " packages/@ember/routing/route.ts:273"
19855
+ "line": " packages/@ember/routing/route.ts:274"
19830
19856
  },
19831
19857
  {
19832
19858
  "message": "Missing item type",
19833
- "line": " packages/@ember/routing/route.ts:275"
19859
+ "line": " packages/@ember/routing/route.ts:276"
19834
19860
  },
19835
19861
  {
19836
19862
  "message": "Missing item type",
19837
- "line": " packages/@ember/routing/route.ts:278"
19863
+ "line": " packages/@ember/routing/route.ts:279"
19838
19864
  },
19839
19865
  {
19840
19866
  "message": "Missing item type",
19841
- "line": " packages/@ember/routing/route.ts:280"
19867
+ "line": " packages/@ember/routing/route.ts:281"
19842
19868
  },
19843
19869
  {
19844
19870
  "message": "Missing item type",
19845
- "line": " packages/@ember/routing/route.ts:1590"
19871
+ "line": " packages/@ember/routing/route.ts:1584"
19846
19872
  },
19847
19873
  {
19848
19874
  "message": "Missing item type\nFinds the name of the substate route if it exists for the given route. A\nsubstate route is of the form `route_state`, such as `foo_loading`.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "5.9.0-alpha.2",
3
+ "version": "5.9.0-alpha.4",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -99,7 +99,7 @@
99
99
  "ember-router-generator": "^2.0.0",
100
100
  "inflection": "^2.0.1",
101
101
  "route-recognizer": "^0.3.4",
102
- "router_js": "^8.0.4",
102
+ "router_js": "^8.0.5",
103
103
  "semver": "^7.5.2",
104
104
  "silent-error": "^1.1.1",
105
105
  "simple-html-tokenizer": "^0.5.11"
@@ -204,7 +204,7 @@
204
204
  "node": "16.20.0",
205
205
  "pnpm": "8.10.0"
206
206
  },
207
- "_originalVersion": "5.9.0-alpha.2",
207
+ "_originalVersion": "5.9.0-alpha.4",
208
208
  "_versionPreviouslyCalculated": true,
209
209
  "publishConfig": {
210
210
  "tag": "alpha"
@@ -0,0 +1,21 @@
1
+ declare module '@ember/-internals/deprecations' {
2
+ import type { DeprecationOptions } from '@ember/debug/lib/deprecate';
3
+ export function emberVersionGte(until: string, emberVersion?: number): boolean;
4
+ export function isRemoved(options: DeprecationOptions): boolean;
5
+ interface DeprecationObject {
6
+ options: DeprecationOptions;
7
+ test: boolean;
8
+ isEnabled: boolean;
9
+ isRemoved: boolean;
10
+ }
11
+ export const DEPRECATIONS: {
12
+ DEPRECATE_IMPLICIT_ROUTE_MODEL: {
13
+ options: DeprecationOptions;
14
+ test: boolean;
15
+ isEnabled: boolean;
16
+ isRemoved: boolean;
17
+ };
18
+ };
19
+ export function deprecateUntil(message: string, deprecation: DeprecationObject): void;
20
+ export {};
21
+ }