ember-source 5.0.0-alpha.7 → 5.0.0-beta.3

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 (53) hide show
  1. package/build-metadata.json +3 -3
  2. package/dist/dependencies/@glimmer/destroyable.js +2 -2
  3. package/dist/dependencies/@glimmer/env.js +1 -1
  4. package/dist/dependencies/@glimmer/global-context.js +1 -1
  5. package/dist/dependencies/@glimmer/low-level.js +1 -1
  6. package/dist/dependencies/@glimmer/manager.js +5 -13
  7. package/dist/dependencies/@glimmer/node.js +1 -1
  8. package/dist/dependencies/@glimmer/opcode-compiler.js +38 -38
  9. package/dist/dependencies/@glimmer/program.js +9 -9
  10. package/dist/dependencies/@glimmer/reference.js +4 -4
  11. package/dist/dependencies/@glimmer/runtime.js +41 -41
  12. package/dist/dependencies/@glimmer/util.js +3 -3
  13. package/dist/dependencies/@glimmer/validator.js +1 -1
  14. package/dist/dependencies/@glimmer/vm.js +1 -1
  15. package/dist/dependencies/@glimmer/wire-format.js +1 -1
  16. package/dist/dependencies/router_js.js +3 -4
  17. package/dist/dependencies/rsvp.js +23 -25
  18. package/dist/ember-template-compiler.js +343 -398
  19. package/dist/ember-template-compiler.map +1 -1
  20. package/dist/ember-testing.js +4 -4
  21. package/dist/ember-testing.map +1 -1
  22. package/dist/ember.debug.js +423 -649
  23. package/dist/ember.debug.map +1 -1
  24. package/dist/header/license.js +1 -1
  25. package/dist/packages/@ember/-internals/browser-environment/index.js +1 -1
  26. package/dist/packages/@ember/-internals/container/index.js +6 -12
  27. package/dist/packages/@ember/-internals/environment/index.js +1 -1
  28. package/dist/packages/@ember/-internals/glimmer/index.js +115 -208
  29. package/dist/packages/@ember/-internals/metal/index.js +106 -226
  30. package/dist/packages/@ember/-internals/utils/index.js +1 -12
  31. package/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js +10 -9
  32. package/dist/packages/@ember/-internals/views/lib/views/core_view.js +1 -2
  33. package/dist/packages/@ember/-internals/views/lib/views/states.js +12 -7
  34. package/dist/packages/@ember/application/index.js +11 -11
  35. package/dist/packages/@ember/application/instance.js +3 -2
  36. package/dist/packages/@ember/application/lib/lazy_load.js +2 -4
  37. package/dist/packages/@ember/array/index.js +3 -6
  38. package/dist/packages/@ember/debug/lib/deprecate.js +3 -3
  39. package/dist/packages/@ember/engine/index.js +3 -2
  40. package/dist/packages/@ember/engine/instance.js +1 -2
  41. package/dist/packages/@ember/object/index.js +1 -1
  42. package/dist/packages/@ember/routing/hash-location.js +1 -2
  43. package/dist/packages/@ember/routing/history-location.js +3 -5
  44. package/dist/packages/@ember/routing/lib/utils.js +4 -1
  45. package/dist/packages/@ember/routing/route.js +20 -6
  46. package/dist/packages/ember/index.js +4 -3
  47. package/dist/packages/ember/version.js +1 -1
  48. package/docs/data.json +4 -4
  49. package/lib/browsers.js +49 -24
  50. package/package.json +7 -9
  51. package/types/preview/@ember/routing/history-location.d.ts +2 -2
  52. package/CHANGELOG.md +0 -3828
  53. package/dist/packages/@ember/-internals/runtime/.gitignore +0 -1
@@ -561,15 +561,4 @@ if (DEBUG) {
561
561
  };
562
562
  }
563
563
 
564
- /*
565
- This package will be eagerly parsed and should have no dependencies on external
566
- packages.
567
-
568
- It is intended to be used to share utility methods that will be needed
569
- by every Ember application (and is **not** a dumping ground of useful utilities).
570
-
571
- Utility methods that are needed in < 80% of cases should be placed
572
- elsewhere (so they can be lazily evaluated / parsed).
573
- */
574
-
575
- export { symbol, enumerableSymbol, isInternalSymbol, makeDictionary as dictionary, getDebugName$1 as getDebugName, uuid, GUID_KEY, generateGuid, guidFor, intern, checkHasSuper, ROOT, wrap, observerListenerMetaFor, setObservers, setListeners, lookupDescriptor, canInvoke, getName, setName, toString, isObject, isProxy, setProxy, Cache, setupMandatorySetter, teardownMandatorySetter, setWithMandatorySetter };
564
+ export { Cache, GUID_KEY, ROOT, canInvoke, checkHasSuper, makeDictionary as dictionary, enumerableSymbol, generateGuid, getDebugName$1 as getDebugName, getName, guidFor, intern, isInternalSymbol, isObject, isProxy, lookupDescriptor, observerListenerMetaFor, setListeners, setName, setObservers, setProxy, setWithMandatorySetter, setupMandatorySetter, symbol, teardownMandatorySetter, toString, uuid, wrap };
@@ -106,7 +106,6 @@ export default class EventDispatcher extends EmberObject {
106
106
  @param addedEvents {Object}
107
107
  */
108
108
  setup(addedEvents, _rootElement) {
109
- var _a;
110
109
  assert('EventDispatcher should never be setup in fastboot mode. Please report this as an Ember bug.', (() => {
111
110
  let owner = getOwner(this);
112
111
  assert('[BUG] Missing owner', owner);
@@ -114,12 +113,16 @@ export default class EventDispatcher extends EmberObject {
114
113
  let environment = owner.lookup('-environment:main');
115
114
  return environment.isInteractive;
116
115
  })());
117
- let events = this.finalEventNameMapping = Object.assign(Object.assign({}, get(this, 'events')), addedEvents);
116
+ let events = this.finalEventNameMapping = {
117
+ ...get(this, 'events'),
118
+ ...addedEvents
119
+ };
118
120
  this._reverseEventNameMapping = Object.keys(events).reduce((result, key) => {
119
121
  let eventName = events[key];
120
- return eventName ? Object.assign(Object.assign({}, result), {
122
+ return eventName ? {
123
+ ...result,
121
124
  [eventName]: key
122
- }) : result;
125
+ } : result;
123
126
  }, {});
124
127
  let lazyEvents = this.lazyEvents;
125
128
  if (_rootElement !== undefined && _rootElement !== null) {
@@ -147,7 +150,7 @@ export default class EventDispatcher extends EmberObject {
147
150
  // setup event listeners for the non-lazily setup events
148
151
  for (let event in events) {
149
152
  if (Object.prototype.hasOwnProperty.call(events, event)) {
150
- lazyEvents.set(event, (_a = events[event]) !== null && _a !== void 0 ? _a : null);
153
+ lazyEvents.set(event, events[event] ?? null);
151
154
  }
152
155
  }
153
156
  this._didSetup = true;
@@ -159,10 +162,9 @@ export default class EventDispatcher extends EmberObject {
159
162
  @param event the name of the event in the browser
160
163
  */
161
164
  setupHandlerForBrowserEvent(event) {
162
- var _a;
163
165
  assert('[BUG] Expected finalEventNameMapping to be set', this.finalEventNameMapping);
164
166
  assert('[BUG] Expected _santizedRootElement to be set', this._sanitizedRootElement);
165
- this.setupHandler(this._sanitizedRootElement, event, (_a = this.finalEventNameMapping[event]) !== null && _a !== void 0 ? _a : null);
167
+ this.setupHandler(this._sanitizedRootElement, event, this.finalEventNameMapping[event] ?? null);
166
168
  }
167
169
  /**
168
170
  Setup event listeners for the given Ember event name (camel case)
@@ -171,9 +173,8 @@ export default class EventDispatcher extends EmberObject {
171
173
  @param eventName
172
174
  */
173
175
  setupHandlerForEmberEvent(eventName) {
174
- var _a;
175
176
  assert('[BUG] Expected _sanitizedRootElement to be set', this._sanitizedRootElement);
176
- let event = (_a = this._reverseEventNameMapping) === null || _a === void 0 ? void 0 : _a[eventName];
177
+ let event = this._reverseEventNameMapping?.[eventName];
177
178
  if (event) {
178
179
  this.setupHandler(this._sanitizedRootElement, event, eventName);
179
180
  }
@@ -16,7 +16,6 @@ class CoreView extends FrameworkObject.extend(Evented, ActionHandler) {
16
16
  this.isView = true;
17
17
  }
18
18
  init(properties) {
19
- var _a;
20
19
  super.init(properties);
21
20
  // Handle methods from Evented
22
21
  // The native class inheritance will not work for mixins. To work around this,
@@ -26,7 +25,7 @@ class CoreView extends FrameworkObject.extend(Evented, ActionHandler) {
26
25
  this.trigger = this._trigger;
27
26
  this._superHas = this.has;
28
27
  this.has = this._has;
29
- (_a = this.parentView) !== null && _a !== void 0 ? _a : this.parentView = null;
28
+ this.parentView ??= null;
30
29
  this._state = 'preRender';
31
30
  this._currentState = this._states.preRender;
32
31
  }
@@ -16,8 +16,11 @@ const DEFAULT = Object.freeze({
16
16
  rerender() {},
17
17
  destroy() {}
18
18
  });
19
- const PRE_RENDER = Object.freeze(Object.assign({}, DEFAULT));
20
- const HAS_ELEMENT = Object.freeze(Object.assign(Object.assign({}, DEFAULT), {
19
+ const PRE_RENDER = Object.freeze({
20
+ ...DEFAULT
21
+ });
22
+ const HAS_ELEMENT = Object.freeze({
23
+ ...DEFAULT,
21
24
  rerender(view) {
22
25
  view.renderer.rerender();
23
26
  },
@@ -39,9 +42,10 @@ const HAS_ELEMENT = Object.freeze(Object.assign(Object.assign({}, DEFAULT), {
39
42
  return true; // continue event propagation
40
43
  }
41
44
  }
42
- }));
45
+ });
43
46
 
44
- const IN_DOM = Object.freeze(Object.assign(Object.assign({}, HAS_ELEMENT), {
47
+ const IN_DOM = Object.freeze({
48
+ ...HAS_ELEMENT,
45
49
  enter(view) {
46
50
  // Register the view for event handling. This hash is used by
47
51
  // Ember.EventDispatcher to dispatch incoming events.
@@ -64,15 +68,16 @@ const IN_DOM = Object.freeze(Object.assign(Object.assign({}, HAS_ELEMENT), {
64
68
  });
65
69
  }
66
70
  }
67
- }));
68
- const DESTROYING = Object.freeze(Object.assign(Object.assign({}, DEFAULT), {
71
+ });
72
+ const DESTROYING = Object.freeze({
73
+ ...DEFAULT,
69
74
  appendChild() {
70
75
  throw new Error("You can't call appendChild on a view being destroyed");
71
76
  },
72
77
  rerender() {
73
78
  throw new Error("You can't call rerender on a view being destroyed");
74
79
  }
75
- }));
80
+ });
76
81
  /*
77
82
  Describe how the specified actions should behave in the various
78
83
  states that a view can exist in. Possible states:
@@ -218,20 +218,19 @@ class Application extends Engine {
218
218
  return registry;
219
219
  }
220
220
  init(properties) {
221
- var _a, _b, _c, _d, _e, _f, _g, _h;
222
221
  super.init(properties);
223
- (_a = this.rootElement) !== null && _a !== void 0 ? _a : this.rootElement = 'body';
224
- (_b = this._document) !== null && _b !== void 0 ? _b : this._document = null;
225
- (_c = this.eventDispatcher) !== null && _c !== void 0 ? _c : this.eventDispatcher = null;
226
- (_d = this.customEvents) !== null && _d !== void 0 ? _d : this.customEvents = null;
227
- (_e = this.autoboot) !== null && _e !== void 0 ? _e : this.autoboot = true;
228
- (_f = this._document) !== null && _f !== void 0 ? _f : this._document = hasDOM ? window.document : null;
229
- (_g = this._globalsMode) !== null && _g !== void 0 ? _g : this._globalsMode = true;
222
+ this.rootElement ??= 'body';
223
+ this._document ??= null;
224
+ this.eventDispatcher ??= null;
225
+ this.customEvents ??= null;
226
+ this.autoboot ??= true;
227
+ this._document ??= hasDOM ? window.document : null;
228
+ this._globalsMode ??= true;
230
229
  if (DEBUG) {
231
230
  if (ENV.LOG_VERSION) {
232
231
  // we only need to see this once per Application#init
233
232
  ENV.LOG_VERSION = false;
234
- (_h = libraries.logVersions) === null || _h === void 0 ? void 0 : _h.call(libraries);
233
+ libraries.logVersions?.();
235
234
  }
236
235
  }
237
236
  // Start off the number of deferrals at 1. This will be decremented by
@@ -256,10 +255,11 @@ class Application extends Engine {
256
255
  buildInstance(options = {}) {
257
256
  assert('You cannot build new instances of this application since it has already been destroyed', !this.isDestroyed);
258
257
  assert('You cannot build new instances of this application since it is being destroyed', !this.isDestroying);
259
- return ApplicationInstance.create(Object.assign(Object.assign({}, options), {
258
+ return ApplicationInstance.create({
259
+ ...options,
260
260
  base: this,
261
261
  application: this
262
- }));
262
+ });
263
263
  }
264
264
  /**
265
265
  Start tracking an ApplicationInstance for this application.
@@ -308,13 +308,14 @@ class _BootOptions {
308
308
  }
309
309
  toEnvironment() {
310
310
  // Do we really want to assign all of this!?
311
- return Object.assign(Object.assign({}, environment), {
311
+ return {
312
+ ...environment,
312
313
  // For compatibility with existing code
313
314
  hasDOM: this.isBrowser,
314
315
  isInteractive: this.isInteractive,
315
316
  _renderMode: this._renderMode,
316
317
  options: this
317
- });
318
+ };
318
319
  }
319
320
  }
320
321
  export default ApplicationInstance;
@@ -30,9 +30,8 @@ export let _loaded = loaded;
30
30
  @private
31
31
  */
32
32
  export function onLoad(name, callback) {
33
- var _a;
34
33
  let object = loaded[name];
35
- let hooks = (_a = loadHooks[name]) !== null && _a !== void 0 ? _a : loadHooks[name] = [];
34
+ let hooks = loadHooks[name] ??= [];
36
35
  hooks.push(callback);
37
36
  if (object) {
38
37
  callback(object);
@@ -50,7 +49,6 @@ export function onLoad(name, callback) {
50
49
  @private
51
50
  */
52
51
  export function runLoadHooks(name, object) {
53
- var _a;
54
52
  loaded[name] = object;
55
53
  if (window && typeof CustomEvent === 'function') {
56
54
  let event = new CustomEvent(name, {
@@ -58,5 +56,5 @@ export function runLoadHooks(name, object) {
58
56
  });
59
57
  window.dispatchEvent(event);
60
58
  }
61
- (_a = loadHooks[name]) === null || _a === void 0 ? void 0 : _a.forEach(callback => callback(object));
59
+ loadHooks[name]?.forEach(callback => callback(object));
62
60
  }
@@ -71,7 +71,7 @@ function indexOf(array, val, startAt = 0, withNaNCheck) {
71
71
  }
72
72
  export function removeAt(array, index, len) {
73
73
  assert(`\`removeAt\` index provided is out of range`, index > -1 && index < array.length);
74
- replace(array, index, len !== null && len !== void 0 ? len : 1, EMPTY_ARRAY);
74
+ replace(array, index, len ?? 1, EMPTY_ARRAY);
75
75
  return array;
76
76
  }
77
77
  function insertAt(array, index, item) {
@@ -292,10 +292,7 @@ const EmberArray = Mixin.create(Enumerable, {
292
292
  invoke(methodName, ...args) {
293
293
  let ret = A();
294
294
  // SAFETY: This is not entirely safe and the code will not work with Ember proxies
295
- this.forEach(item => {
296
- var _a, _b;
297
- return ret.push((_b = (_a = item)[methodName]) === null || _b === void 0 ? void 0 : _b.call(_a, ...args));
298
- });
295
+ this.forEach(item => ret.push(item[methodName]?.(...args)));
299
296
  return ret;
300
297
  },
301
298
  toArray() {
@@ -471,7 +468,7 @@ if (ENV.EXTEND_PROTOTYPES.Array) {
471
468
  return arr;
472
469
  } else {
473
470
  // SAFETY: This will return an NativeArray but TS can't infer that.
474
- return NativeArray.apply(arr !== null && arr !== void 0 ? arr : []);
471
+ return NativeArray.apply(arr ?? []);
475
472
  }
476
473
  };
477
474
  }
@@ -55,13 +55,13 @@ if (DEBUG) {
55
55
  };
56
56
  let formatMessage = function formatMessage(_message, options) {
57
57
  let message = _message;
58
- if (options === null || options === void 0 ? void 0 : options.id) {
58
+ if (options?.id) {
59
59
  message = message + ` [deprecation id: ${options.id}]`;
60
60
  }
61
- if (options === null || options === void 0 ? void 0 : options.until) {
61
+ if (options?.until) {
62
62
  message = message + ` This will be removed in ${options.for} ${options.until}.`;
63
63
  }
64
- if (options === null || options === void 0 ? void 0 : options.url) {
64
+ if (options?.url) {
65
65
  message += ` See ${options.url} for more details.`;
66
66
  }
67
67
  return message;
@@ -86,9 +86,10 @@ class Engine extends Namespace.extend(RegistryProxyMixin) {
86
86
  */
87
87
  buildInstance(options = {}) {
88
88
  this.ensureInitializers();
89
- return EngineInstance.create(Object.assign(Object.assign({}, options), {
89
+ return EngineInstance.create({
90
+ ...options,
90
91
  base: this
91
- }));
92
+ });
92
93
  }
93
94
  /**
94
95
  Build and configure the registry for the current engine.
@@ -29,11 +29,10 @@ class EngineInstance extends EmberObject.extend(RegistryProxyMixin, ContainerPro
29
29
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
30
30
  static setupRegistry(_registry, _options) {}
31
31
  init(properties) {
32
- var _a;
33
32
  super.init(properties);
34
33
  // Ensure the guid gets setup for this instance
35
34
  guidFor(this);
36
- (_a = this.base) !== null && _a !== void 0 ? _a : this.base = this.application;
35
+ this.base ??= this.application;
37
36
  // Create a per-instance registry that will use the application's registry
38
37
  // as a fallback for resolving registrations.
39
38
  let registry = this.__registry__ = new Registry({
@@ -169,7 +169,7 @@ export function action(...args) {
169
169
  return decorator;
170
170
  }
171
171
  let [target, key, desc] = args;
172
- actionFn = desc === null || desc === void 0 ? void 0 : desc.value;
172
+ actionFn = desc?.value;
173
173
  assert('The @action decorator must be applied to methods when used in native classes', typeof actionFn === 'function');
174
174
  // SAFETY: TS types are weird with decorators. This should work.
175
175
  return setupAction(target, key, actionFn);
@@ -38,8 +38,7 @@ export default class HashLocation extends EmberObject {
38
38
  this.lastSetURL = null;
39
39
  }
40
40
  init() {
41
- var _a;
42
- this.location = (_a = this._location) !== null && _a !== void 0 ? _a : window.location;
41
+ this.location = this._location ?? window.location;
43
42
  this._hashchangeHandler = undefined;
44
43
  }
45
44
  /**
@@ -73,15 +73,14 @@ export default class HistoryLocation extends EmberObject {
73
73
  return getHash(this.location);
74
74
  }
75
75
  init() {
76
- var _a, _b;
77
76
  this._super(...arguments);
78
77
  let base = document.querySelector('base');
79
78
  let baseURL = '';
80
79
  if (base !== null && base.hasAttribute('href')) {
81
- baseURL = (_a = base.getAttribute('href')) !== null && _a !== void 0 ? _a : '';
80
+ baseURL = base.getAttribute('href') ?? '';
82
81
  }
83
82
  this.baseURL = baseURL;
84
- this.location = (_b = this.location) !== null && _b !== void 0 ? _b : window.location;
83
+ this.location = this.location ?? window.location;
85
84
  this._popstateHandler = undefined;
86
85
  }
87
86
  /**
@@ -90,8 +89,7 @@ export default class HistoryLocation extends EmberObject {
90
89
  @method initState
91
90
  */
92
91
  initState() {
93
- var _a;
94
- let history = (_a = this.history) !== null && _a !== void 0 ? _a : window.history;
92
+ let history = this.history ?? window.history;
95
93
  this.history = history;
96
94
  let {
97
95
  state
@@ -157,7 +157,10 @@ function accumulateQueryParamDescriptors(_desc, accum) {
157
157
  as: null,
158
158
  scope: 'model'
159
159
  };
160
- let val = Object.assign(Object.assign({}, partialVal), singleDesc);
160
+ let val = {
161
+ ...partialVal,
162
+ ...singleDesc
163
+ };
161
164
  accum[key] = val;
162
165
  }
163
166
  }
@@ -202,7 +202,9 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
202
202
  let transition = this._router._routerMicrolib.activeTransition;
203
203
  let state = transition ? transition[STATE_SYMBOL] : this._router._routerMicrolib.state;
204
204
  let fullName = route.fullRouteName;
205
- let params = Object.assign({}, state.params[fullName]);
205
+ let params = {
206
+ ...state.params[fullName]
207
+ };
206
208
  let queryParams = getQueryParamsFor(route, state);
207
209
  return Object.entries(queryParams).reduce((params, [key, value]) => {
208
210
  assert(`The route '${this.routeName}' has both a dynamic segment and query param with name '${key}'. Please rename one to avoid collisions.`, !params[key]);
@@ -406,7 +408,7 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
406
408
  setup(context, transition) {
407
409
  let controllerName = this.controllerName || this.routeName;
408
410
  let definedController = this.controllerFor(controllerName, true);
409
- let controller = definedController !== null && definedController !== void 0 ? definedController : this.generateController(controllerName);
411
+ let controller = definedController ?? this.generateController(controllerName);
410
412
  // SAFETY: Since `_qp` is protected we can't infer the type
411
413
  let queryParams = get(this, '_qp');
412
414
  // Assign the route's controller so that it can more easily be
@@ -745,7 +747,7 @@ class Route extends EmberObject.extend(ActionHandler, Evented) {
745
747
  return transition.resolvedModels[modelLookupName];
746
748
  }
747
749
  }
748
- return route === null || route === void 0 ? void 0 : route.currentModel;
750
+ return route?.currentModel;
749
751
  }
750
752
  /**
751
753
  `this[RENDER]` is used to render a template into a region of another template
@@ -963,6 +965,10 @@ function buildRenderOptions(route, nameOrOptions, options) {
963
965
  options = nameOrOptions;
964
966
  } else {
965
967
  assert('The name in the given arguments is undefined or empty string', !isEmpty(nameOrOptions));
968
+ // SAFETY: the check for `nameOrOptions` above should be validating this,
969
+ // and as of TS 5.1.0-dev.2023-0417 it is *not*. This cast can go away if
970
+ // TS validates it correctly *or* if we refactor this entire function to
971
+ // be less wildly dynamic in its argument handling.
966
972
  _name = nameOrOptions;
967
973
  }
968
974
  }
@@ -1033,7 +1039,9 @@ export function getFullQueryParams(router, state) {
1033
1039
  return state.fullQueryParams;
1034
1040
  }
1035
1041
  let haveAllRouteInfosResolved = state.routeInfos.every(routeInfo => routeInfo.route);
1036
- let fullQueryParamsState = Object.assign({}, state.queryParams);
1042
+ let fullQueryParamsState = {
1043
+ ...state.queryParams
1044
+ };
1037
1045
  router._deserializeQueryParams(state.routeInfos, fullQueryParamsState);
1038
1046
  // only cache query params state if all routeinfos have resolved; it's possible
1039
1047
  // for lazy routes to not have resolved when `getFullQueryParams` is called, so
@@ -1089,7 +1097,10 @@ function mergeEachQueryParams(controllerQP, routeQP) {
1089
1097
  if (!Object.prototype.hasOwnProperty.call(controllerQP, cqpName)) {
1090
1098
  continue;
1091
1099
  }
1092
- qps[cqpName] = Object.assign(Object.assign({}, controllerQP[cqpName]), routeQP[cqpName]);
1100
+ qps[cqpName] = {
1101
+ ...controllerQP[cqpName],
1102
+ ...routeQP[cqpName]
1103
+ };
1093
1104
  // allows us to skip this QP when we check route QPs.
1094
1105
  keysAlreadyMergedOrSkippable[cqpName] = true;
1095
1106
  }
@@ -1099,7 +1110,10 @@ function mergeEachQueryParams(controllerQP, routeQP) {
1099
1110
  if (!Object.prototype.hasOwnProperty.call(routeQP, rqpName) || keysAlreadyMergedOrSkippable[rqpName]) {
1100
1111
  continue;
1101
1112
  }
1102
- qps[rqpName] = Object.assign(Object.assign({}, routeQP[rqpName]), controllerQP[rqpName]);
1113
+ qps[rqpName] = {
1114
+ ...routeQP[rqpName],
1115
+ ...controllerQP[rqpName]
1116
+ };
1103
1117
  }
1104
1118
  return qps;
1105
1119
  }
@@ -138,9 +138,10 @@ const PartialEmber = {
138
138
  // ****@ember/array/proxy****
139
139
  ArrayProxy,
140
140
  // ****@ember/canary-features****
141
- FEATURES: Object.assign({
142
- isEnabled
143
- }, FEATURES),
141
+ FEATURES: {
142
+ isEnabled,
143
+ ...FEATURES
144
+ },
144
145
  // ****@ember/component****
145
146
  _Input: Input,
146
147
  Component,
@@ -1 +1 @@
1
- export default "5.0.0-alpha.7";
1
+ export default "5.0.0-beta.3";
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.0.0-alpha.7"
6
+ "version": "5.0.0-beta.3"
7
7
  },
8
8
  "files": {
9
9
  "node_modules/rsvp/lib/rsvp/promise/all.js": {
@@ -16548,7 +16548,7 @@
16548
16548
  },
16549
16549
  {
16550
16550
  "file": "packages/@ember/routing/route.ts",
16551
- "line": 2150,
16551
+ "line": 2154,
16552
16552
  "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```",
16553
16553
  "itemtype": "property",
16554
16554
  "name": "controller",
@@ -16561,7 +16561,7 @@
16561
16561
  },
16562
16562
  {
16563
16563
  "file": "packages/@ember/routing/route.ts",
16564
- "line": 2181,
16564
+ "line": 2185,
16565
16565
  "description": "This action is called when one or more query params have changed. Bubbles.",
16566
16566
  "itemtype": "method",
16567
16567
  "name": "queryParamsDidChange",
@@ -19022,7 +19022,7 @@
19022
19022
  },
19023
19023
  {
19024
19024
  "message": "replacing incorrect tag: returns with return",
19025
- "line": " packages/@ember/routing/route.ts:2181"
19025
+ "line": " packages/@ember/routing/route.ts:2185"
19026
19026
  },
19027
19027
  {
19028
19028
  "message": "Missing item type\nThe `change` and `input` actions need to be overridden in the `Input`\nsubclass. Unfortunately, some ember-source builds currently uses babel\nloose mode to transpile its classes. Having the `@action` decorator on the\nsuper class creates a getter on the prototype, and when the subclass\noverrides the method, the loose mode transpilation would emit something\nlike `Subclass.prototype['change'] = function change() { ... }`, which\nfails because `prototype['change']` is getter-only/readonly. The correct\nsolution is to use `Object.defineProperty(prototype, 'change', ...)` but\nthat requires disabling loose mode. For now, the workaround is to add the\ndecorator only on the subclass. This is more of a configuration issue on\nour own builds and doesn't really affect apps.",
package/lib/browsers.js CHANGED
@@ -1,33 +1,50 @@
1
1
  module.exports = [
2
- 'Chrome >= 92',
3
- 'Edge >= 93',
4
- 'Firefox >= 91',
2
+ 'Chrome >= 103',
3
+ 'Edge >= 110',
4
+ 'Firefox >= 102',
5
5
  'iOS >= 12',
6
6
  'Safari >= 12',
7
- 'ChromeAndroid >= 96',
8
- 'FirefoxAndroid >= 94',
7
+ 'ChromeAndroid >= 112',
8
+ 'FirefoxAndroid >= 110',
9
9
  ];
10
10
 
11
11
  /*
12
- As of the release of 4.0.0, the above query expands to:
12
+ As of the release of April 2023, the above query expands to:
13
13
 
14
- and_chr 96
15
- and_ff 94
16
- chrome 96
17
- chrome 95
18
- chrome 94
19
- chrome 93
20
- chrome 92
21
- chrome 91
22
- chrome 87
23
- edge 96
24
- edge 95
25
- firefox 95
26
- firefox 94
27
- firefox 93
28
- firefox 60
29
- firefox 52
30
- ios_saf 15.2
14
+ and_chr 112
15
+ and_ff 110
16
+ chrome 112
17
+ chrome 111
18
+ chrome 110
19
+ chrome 109
20
+ chrome 108
21
+ chrome 107
22
+ chrome 106
23
+ chrome 105
24
+ chrome 104
25
+ chrome 103
26
+ edge 112
27
+ edge 111
28
+ edge 110
29
+ firefox 112
30
+ firefox 111
31
+ firefox 110
32
+ firefox 109
33
+ firefox 108
34
+ firefox 107
35
+ firefox 106
36
+ firefox 105
37
+ firefox 104
38
+ firefox 103
39
+ firefox 102
40
+ ios_saf 16.4
41
+ ios_saf 16.3
42
+ ios_saf 16.2
43
+ ios_saf 16.0
44
+ ios_saf 15.6
45
+ ios_saf 15.5
46
+ ios_saf 15.4
47
+ ios_saf 15.2-15.3
31
48
  ios_saf 15.0-15.1
32
49
  ios_saf 14.5-14.8
33
50
  ios_saf 14.0-14.4
@@ -37,7 +54,15 @@ module.exports = [
37
54
  ios_saf 13.0-13.1
38
55
  ios_saf 12.2-12.5
39
56
  ios_saf 12.0-12.1
40
- safari 15.2
57
+ safari 16.4
58
+ safari 16.3
59
+ safari 16.2
60
+ safari 16.1
61
+ safari 16.0
62
+ safari 15.6
63
+ safari 15.5
64
+ safari 15.4
65
+ safari 15.2-15.3
41
66
  safari 15.1
42
67
  safari 15
43
68
  safari 14.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "5.0.0-alpha.7",
3
+ "version": "5.0.0-beta.3",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -83,6 +83,7 @@
83
83
  "silent-error": "^1.1.1"
84
84
  },
85
85
  "devDependencies": {
86
+ "@aws-sdk/client-s3": "^3.321.1",
86
87
  "@babel/preset-env": "^7.16.11",
87
88
  "@glimmer/compiler": "0.84.2",
88
89
  "@glimmer/component": "^1.1.2",
@@ -113,7 +114,7 @@
113
114
  "broccoli-babel-transpiler": "^7.8.1",
114
115
  "broccoli-persistent-filter": "^2.3.1",
115
116
  "broccoli-plugin": "^4.0.3",
116
- "broccoli-rollup": "^2.1.1",
117
+ "broccoli-rollup": "^3",
117
118
  "broccoli-source": "^3.0.1",
118
119
  "broccoli-string-replace": "^0.1.2",
119
120
  "broccoli-typescript-compiler": "^8.0.0",
@@ -125,7 +126,6 @@
125
126
  "ember-cli-browserstack": "^2.0.1",
126
127
  "ember-cli-dependency-checker": "^3.3.1",
127
128
  "ember-cli-yuidoc": "^0.9.1",
128
- "ember-publisher": "0.0.7",
129
129
  "eslint": "^8.29.0",
130
130
  "eslint-config-prettier": "^8.5.0",
131
131
  "eslint-import-resolver-node": "^0.3.7",
@@ -152,8 +152,6 @@
152
152
  "puppeteer": "^19.4.1",
153
153
  "qunit": "^2.19.4",
154
154
  "recast": "^0.21.5",
155
- "rollup-plugin-commonjs": "^10.1.0",
156
- "rollup-plugin-node-resolve": "^4.2.4",
157
155
  "route-recognizer": "^0.3.4",
158
156
  "router_js": "^8.0.3",
159
157
  "rsvp": "^4.8.5",
@@ -167,7 +165,7 @@
167
165
  "@glimmer/component": "^1.1.2"
168
166
  },
169
167
  "engines": {
170
- "node": ">= 14.*"
168
+ "node": ">= 16.*"
171
169
  },
172
170
  "ember-addon": {
173
171
  "after": "ember-cli-legacy-blueprints"
@@ -183,12 +181,12 @@
183
181
  }
184
182
  },
185
183
  "volta": {
186
- "node": "14.21.3",
184
+ "node": "16.20.0",
187
185
  "yarn": "1.22.19"
188
186
  },
189
- "_originalVersion": "5.0.0-alpha.7",
187
+ "_originalVersion": "5.0.0-beta.3",
190
188
  "_versionPreviouslyCalculated": true,
191
189
  "publishConfig": {
192
- "tag": "alpha"
190
+ "tag": "beta"
193
191
  }
194
192
  }