ember-source 4.1.0-alpha.2 → 4.1.0-alpha.6

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 (42) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/blueprints/initializer/files/__root__/initializers/__name__.js +0 -1
  3. package/blueprints/instance-initializer/files/__root__/instance-initializers/__name__.js +0 -1
  4. package/build-metadata.json +3 -3
  5. package/dist/ember-template-compiler.js +25 -274
  6. package/dist/ember-template-compiler.map +1 -1
  7. package/dist/ember-testing.js +4 -1
  8. package/dist/ember-testing.map +1 -1
  9. package/dist/ember.debug.js +227 -1338
  10. package/dist/ember.debug.map +1 -1
  11. package/dist/header/license.js +1 -1
  12. package/dist/header/loader.js +1 -0
  13. package/dist/packages/@ember/-internals/container/index.js +17 -183
  14. package/dist/packages/@ember/-internals/environment/index.js +0 -12
  15. package/dist/packages/@ember/-internals/extension-support/lib/container_debug_adapter.js +7 -0
  16. package/dist/packages/@ember/-internals/glimmer/index.js +34 -71
  17. package/dist/packages/@ember/-internals/metal/index.js +65 -2
  18. package/dist/packages/@ember/-internals/routing/lib/ext/controller.js +1 -0
  19. package/dist/packages/@ember/-internals/routing/lib/services/router.js +16 -8
  20. package/dist/packages/@ember/-internals/routing/lib/system/route.js +2 -1
  21. package/dist/packages/@ember/-internals/routing/lib/system/router.js +10 -45
  22. package/dist/packages/@ember/-internals/runtime/lib/system/core_object.js +4 -90
  23. package/dist/packages/@ember/-internals/views/index.js +0 -1
  24. package/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js +22 -72
  25. package/dist/packages/@ember/application/instance.js +1 -22
  26. package/dist/packages/@ember/application/lib/application.js +7 -24
  27. package/dist/packages/@ember/canary-features/index.js +4 -2
  28. package/dist/packages/@ember/deprecated-features/index.js +0 -3
  29. package/dist/packages/@ember/engine/index.js +1 -5
  30. package/dist/packages/@ember/engine/instance.js +0 -4
  31. package/dist/packages/@ember/object/lib/computed/computed_macros.js +0 -373
  32. package/dist/packages/@ember/object/lib/computed/reduce_computed_macros.js +0 -351
  33. package/dist/packages/@ember/service/index.js +19 -5
  34. package/dist/packages/@glimmer/tracking/index.js +1 -1
  35. package/dist/packages/ember/index.js +2 -3
  36. package/dist/packages/ember/version.js +1 -1
  37. package/dist/packages/ember-testing/lib/adapters/qunit.js +1 -0
  38. package/docs/data.json +326 -368
  39. package/lib/index.js +11 -48
  40. package/package.json +33 -33
  41. package/dist/packages/@ember/-internals/views/lib/system/jquery.js +0 -26
  42. package/dist/packages/jquery/index.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Ember Changelog
2
2
 
3
+ ### v4.0.0-beta.7 (November 1, 2021)
4
+
5
+ - [#19677](https://github.com/emberjs/ember.js/pull/19677) [CLEANUP] Remove jQuery from build
6
+
7
+ ### v4.0.0-beta.6 (October 26, 2021)
8
+
9
+ - [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2)
10
+
11
+ ### v4.0.0-beta.5 (October 11, 2021)
12
+
13
+ - [#19761](https://github.com/emberjs/ember.js/pull/19761) [BREAKING] Require ember-auto-import >= 2 or higher to enable ember-source to become a v2 addon in the 4.x cycle
14
+
15
+ ### v4.0.0-beta.4 (September 13, 2021)
16
+
17
+ - [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized
18
+
19
+ ### v4.0.0-beta.3 (August 30, 2021)
20
+
21
+ - [#19708](https://github.com/emberjs/ember.js/pull/19708) [CLEANUP] Remove class-binding-and-class-name-bindings-in-templates
22
+
23
+ ### v4.0.0-beta.2 (August 23, 2021)
24
+
25
+ - [#19680](https://github.com/emberjs/ember.js/pull/19680) [DEPRECATION] Deprecate owner.inject per [RFC #680](https://github.com/emberjs/rfcs/blob/sn/owner-inject-deprecation/text/0680-implicit-injection-deprecation.md#1-deprecate-implicit-injection-on-target-object) and cleanup related deprecations that are `until: 4.0.0`.
26
+ - [#19706](https://github.com/emberjs/ember.js/pull/19706) [BUGFIX] Explicitly drop Node 10 support to match support policy.
27
+ - [#19650](https://github.com/emberjs/ember.js/pull/19650) [CLEANUP] Remove deprecated mouse events
28
+ - [#19675](https://github.com/emberjs/ember.js/pull/19675) [CLEANUP] Remove jQuery usage from ember-testing
29
+ - [#19704](https://github.com/emberjs/ember.js/pull/19704) [CLEANUP] Remove template-compiler.registerPlugin
30
+ - [#19707](https://github.com/emberjs/ember.js/pull/19707) [CLEANUP] Remove Application Controller Router Properties
31
+
3
32
  ### v4.0.0-beta.1 (August 17, 2021)
4
33
 
5
34
  - [#19649](https://github.com/emberjs/ember.js/pull/19649) / [#19692](https://github.com/emberjs/ember.js/pull/19692) [DEPRECATION] Add deprecation warning to Ember.assign implementing [RFC #750](https://github.com/emberjs/rfcs/blob/master/text/0750-deprecate-ember-assign.md).
@@ -44,6 +73,26 @@
44
73
  - [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
45
74
  - [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
46
75
 
76
+ ## v3.28.5 (November 3, 2021)
77
+
78
+ - [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
79
+
80
+ ## v3.28.3 (October 22, 2021)
81
+
82
+ - [#19799](https://github.com/emberjs/ember.js/pull/19799) / [glimmerjs/glimmer-vm#1354](https://github.com/glimmerjs/glimmer-vm/pull/1354) Fixes for errors while precompiling inline templates (introduced in 3.28.2)
83
+
84
+ ## v3.28.2 (October 21, 2021)
85
+
86
+ - [glimmerjs/glimmer-vm#1351](https://github.com/glimmerjs/glimmer-vm/pull/1351) Support lexical scope in loose mode
87
+
88
+ ### v3.24.6 (October 18, 2021)
89
+
90
+ - [glimmerjs/glimmer-vm#1347](https://github.com/glimmerjs/glimmer-vm/pull/1347) Avoid using a nested WeakMap for manager instances for a given owner (makes memory leak debugging easier)
91
+
92
+ ## v3.28.1 (August 30, 2021)
93
+
94
+ - [#19733](https://github.com/emberjs/ember.js/pull/19733) [BUGFIX] Ensure that using `routerService.urlFor(...)` and `routerService.recognize(...)` does not error if the router is not fully initialized
95
+
47
96
  ### v3.28.0 (August 9, 2021)
48
97
 
49
98
  - [#19697](https://github.com/emberjs/ember.js/pull/19697) [BUGFIX] Ensure `deserializeQueryParam` is called for lazy routes
@@ -116,6 +165,10 @@
116
165
 
117
166
  - [#19477](https://github.com/emberjs/ember.js/pull/19477) Allow `<LinkToExternal />` to override internal assertion
118
167
 
168
+ ### v3.26.2 (October 4, 2021)
169
+
170
+ - [#19683](https://github.com/emberjs/ember.js/pull/19683) [BUGFIX] Use `super.willDestroy` in native classes (instead of `this._super`)
171
+
119
172
  ### v3.26.1 (March 24, 2021)
120
173
 
121
174
  - [#19473](https://github.com/emberjs/ember.js/pull/19473) Update Glimmer VM to latest.
@@ -1,5 +1,4 @@
1
1
  export function initialize(/* application */) {
2
- // application.inject('route', 'foo', 'service:foo');
3
2
  }
4
3
 
5
4
  export default {
@@ -1,5 +1,4 @@
1
1
  export function initialize(/* appInstance */) {
2
- // appInstance.inject('route', 'foo', 'service:foo');
3
2
  }
4
3
 
5
4
  export default {
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.1.0-alpha.2",
2
+ "version": "4.1.0-alpha.6",
3
3
  "buildType": "tag",
4
- "SHA": "4a8436f2de91343b9be0787e8acd59eee07ec5a2",
5
- "assetPath": "/tag/shas/4a8436f2de91343b9be0787e8acd59eee07ec5a2.tgz"
4
+ "SHA": "816b96d96488daef0eb5fd69b354928d81bc119b",
5
+ "assetPath": "/tag/shas/816b96d96488daef0eb5fd69b354928d81bc119b.tgz"
6
6
  }
@@ -6,11 +6,12 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 4.1.0-alpha.2
9
+ * @version 4.1.0-alpha.6
10
10
  */
11
11
 
12
12
  /* eslint-disable no-var */
13
13
  /* globals global globalThis self */
14
+ /* eslint-disable-next-line no-unused-vars */
14
15
  var define, require;
15
16
 
16
17
  (function () {
@@ -295,18 +296,6 @@ define("@ember/-internals/environment/index", ["exports"], function (_exports) {
295
296
  /* DEBUG */
296
297
  ,
297
298
 
298
- /**
299
- Whether the app is using jQuery. See RFC #294.
300
- This is not intended to be set directly, as the implementation may change in
301
- the future. Use `@ember/optional-features` instead.
302
- @property _JQUERY_INTEGRATION
303
- @for EmberENV
304
- @type Boolean
305
- @default true
306
- @private
307
- */
308
- _JQUERY_INTEGRATION: true,
309
-
310
299
  /**
311
300
  Whether the app defaults to using async observers.
312
301
  This is not intended to be set directly, as the implementation may change in
@@ -1313,7 +1302,7 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
1313
1302
  value: true
1314
1303
  });
1315
1304
  _exports.isEnabled = isEnabled;
1316
- _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_STRICT_MODE = _exports.EMBER_MODERNIZED_BUILT_IN_COMPONENTS = _exports.EMBER_GLIMMER_INVOKE_HELPER = _exports.EMBER_GLIMMER_HELPER_MANAGER = _exports.EMBER_NAMED_BLOCKS = _exports.EMBER_IMPROVED_INSTRUMENTATION = _exports.EMBER_LIBRARIES_ISREGISTERED = _exports.FEATURES = _exports.DEFAULT_FEATURES = void 0;
1305
+ _exports.EMBER_CACHED = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_STRICT_MODE = _exports.EMBER_MODERNIZED_BUILT_IN_COMPONENTS = _exports.EMBER_GLIMMER_INVOKE_HELPER = _exports.EMBER_GLIMMER_HELPER_MANAGER = _exports.EMBER_NAMED_BLOCKS = _exports.EMBER_IMPROVED_INSTRUMENTATION = _exports.EMBER_LIBRARIES_ISREGISTERED = _exports.FEATURES = _exports.DEFAULT_FEATURES = void 0;
1317
1306
 
1318
1307
  /**
1319
1308
  Set `EmberENV.FEATURES` in your application's `config/environment.js` file
@@ -1334,7 +1323,8 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
1334
1323
  EMBER_MODERNIZED_BUILT_IN_COMPONENTS: true,
1335
1324
  EMBER_STRICT_MODE: true,
1336
1325
  EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: true,
1337
- EMBER_ROUTING_ROUTER_SERVICE_REFRESH: null
1326
+ EMBER_ROUTING_ROUTER_SERVICE_REFRESH: null,
1327
+ EMBER_CACHED: null
1338
1328
  };
1339
1329
  /**
1340
1330
  The hash of enabled Canary features. Add to this, any canary features
@@ -1404,6 +1394,8 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
1404
1394
  _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = EMBER_DYNAMIC_HELPERS_AND_MODIFIERS;
1405
1395
  var EMBER_ROUTING_ROUTER_SERVICE_REFRESH = featureValue(FEATURES.EMBER_ROUTING_ROUTER_SERVICE_REFRESH);
1406
1396
  _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = EMBER_ROUTING_ROUTER_SERVICE_REFRESH;
1397
+ var EMBER_CACHED = featureValue(FEATURES.EMBER_CACHED);
1398
+ _exports.EMBER_CACHED = EMBER_CACHED;
1407
1399
  });
1408
1400
  define("@ember/debug/container-debug-adapter", ["exports", "@ember/-internals/extension-support"], function (_exports, _extensionSupport) {
1409
1401
  "use strict";
@@ -2148,19 +2140,13 @@ define("@ember/deprecated-features/index", ["exports"], function (_exports) {
2148
2140
  Object.defineProperty(_exports, "__esModule", {
2149
2141
  value: true
2150
2142
  });
2151
- _exports.ASSIGN = _exports.MOUSE_ENTER_LEAVE_MOVE_EVENTS = _exports.APP_CTRL_ROUTER_PROPS = _exports.JQUERY_INTEGRATION = _exports.ROUTER_EVENTS = void 0;
2143
+ _exports.ASSIGN = _exports.ROUTER_EVENTS = void 0;
2152
2144
 
2153
2145
  /* eslint-disable no-implicit-coercion */
2154
2146
  // These versions should be the version that the deprecation was _introduced_,
2155
2147
  // not the version that the feature will be removed.
2156
2148
  var ROUTER_EVENTS = !!'4.0.0';
2157
2149
  _exports.ROUTER_EVENTS = ROUTER_EVENTS;
2158
- var JQUERY_INTEGRATION = !!'3.9.0';
2159
- _exports.JQUERY_INTEGRATION = JQUERY_INTEGRATION;
2160
- var APP_CTRL_ROUTER_PROPS = !!'3.10.0-beta.1';
2161
- _exports.APP_CTRL_ROUTER_PROPS = APP_CTRL_ROUTER_PROPS;
2162
- var MOUSE_ENTER_LEAVE_MOVE_EVENTS = !!'3.13.0-beta.1';
2163
- _exports.MOUSE_ENTER_LEAVE_MOVE_EVENTS = MOUSE_ENTER_LEAVE_MOVE_EVENTS;
2164
2150
  var ASSIGN = !!'4.0.0-beta.1';
2165
2151
  _exports.ASSIGN = ASSIGN;
2166
2152
  });
@@ -5464,18 +5450,16 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
5464
5450
  isStrictMode: (_b = options.strictMode) !== null && _b !== void 0 ? _b : false
5465
5451
  };
5466
5452
 
5467
- if (!options.strictMode) {
5453
+ if (usedLocals.length === 0) {
5468
5454
  delete templateJSONObject.scope;
5469
5455
  } // JSON is javascript
5470
5456
 
5471
5457
 
5472
5458
  var stringified = JSON.stringify(templateJSONObject);
5473
5459
 
5474
- if (options.strictMode && usedLocals.length > 0) {
5460
+ if (usedLocals.length > 0) {
5475
5461
  var scopeFn = "()=>[" + usedLocals.join(',') + "]";
5476
5462
  stringified = stringified.replace("\"" + SCOPE_PLACEHOLDER + "\"", scopeFn);
5477
- } else {
5478
- stringified = stringified.replace("\"" + SCOPE_PLACEHOLDER + "\"", 'null');
5479
5463
  }
5480
5464
 
5481
5465
  return stringified;
@@ -12921,7 +12905,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
12921
12905
  strictMode: false,
12922
12906
  locals: []
12923
12907
  }, options);
12924
- var top = SymbolTable.top(normalizeOptions.strictMode ? normalizeOptions.locals : [], (_a = // eslint-disable-next-line @typescript-eslint/unbound-method
12908
+ var top = SymbolTable.top(normalizeOptions.locals, (_a = // eslint-disable-next-line @typescript-eslint/unbound-method
12925
12909
  options.customizeComponentName) !== null && _a !== void 0 ? _a : name => name);
12926
12910
  var block = new BlockContext(source, normalizeOptions, top);
12927
12911
  var normalizer = new StatementNormalizer(block);
@@ -17633,18 +17617,6 @@ define("ember-template-compiler/index", ["exports", "@ember/-internals/environme
17633
17617
  return _compileOptions.transformsFor;
17634
17618
  }
17635
17619
  });
17636
- Object.defineProperty(_exports, "registerPlugin", {
17637
- enumerable: true,
17638
- get: function () {
17639
- return _compileOptions.registerPlugin;
17640
- }
17641
- });
17642
- Object.defineProperty(_exports, "unregisterPlugin", {
17643
- enumerable: true,
17644
- get: function () {
17645
- return _compileOptions.unregisterPlugin;
17646
- }
17647
- });
17648
17620
  Object.defineProperty(_exports, "RESOLUTION_MODE_TRANSFORMS", {
17649
17621
  enumerable: true,
17650
17622
  get: function () {
@@ -18031,7 +18003,7 @@ define("ember-template-compiler/lib/plugins/assert-splattribute-expression", ["e
18031
18003
  return '`...attributes` can only be used in the element position e.g. `<div ...attributes />`. It cannot be used as a path.';
18032
18004
  }
18033
18005
  });
18034
- define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-compiler/lib/plugins/assert-against-attrs", "ember-template-compiler/lib/plugins/assert-against-dynamic-helpers-modifiers", "ember-template-compiler/lib/plugins/assert-against-named-blocks", "ember-template-compiler/lib/plugins/assert-against-named-outlets", "ember-template-compiler/lib/plugins/assert-input-helper-without-block", "ember-template-compiler/lib/plugins/assert-reserved-named-arguments", "ember-template-compiler/lib/plugins/assert-splattribute-expression", "ember-template-compiler/lib/plugins/transform-action-syntax", "ember-template-compiler/lib/plugins/transform-each-in-into-each", "ember-template-compiler/lib/plugins/transform-each-track-array", "ember-template-compiler/lib/plugins/transform-in-element", "ember-template-compiler/lib/plugins/transform-link-to", "ember-template-compiler/lib/plugins/transform-old-class-binding-syntax", "ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", "ember-template-compiler/lib/plugins/transform-resolutions", "ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet"], function (_exports, _assertAgainstAttrs, _assertAgainstDynamicHelpersModifiers, _assertAgainstNamedBlocks, _assertAgainstNamedOutlets, _assertInputHelperWithoutBlock, _assertReservedNamedArguments, _assertSplattributeExpression, _transformActionSyntax, _transformEachInIntoEach, _transformEachTrackArray, _transformInElement, _transformLinkTo, _transformOldClassBindingSyntax, _transformQuotedBindingsIntoJustBindings, _transformResolutions, _transformWrapMountAndOutlet) {
18006
+ define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-compiler/lib/plugins/assert-against-attrs", "ember-template-compiler/lib/plugins/assert-against-dynamic-helpers-modifiers", "ember-template-compiler/lib/plugins/assert-against-named-blocks", "ember-template-compiler/lib/plugins/assert-against-named-outlets", "ember-template-compiler/lib/plugins/assert-input-helper-without-block", "ember-template-compiler/lib/plugins/assert-reserved-named-arguments", "ember-template-compiler/lib/plugins/assert-splattribute-expression", "ember-template-compiler/lib/plugins/transform-action-syntax", "ember-template-compiler/lib/plugins/transform-each-in-into-each", "ember-template-compiler/lib/plugins/transform-each-track-array", "ember-template-compiler/lib/plugins/transform-in-element", "ember-template-compiler/lib/plugins/transform-link-to", "ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", "ember-template-compiler/lib/plugins/transform-resolutions", "ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet"], function (_exports, _assertAgainstAttrs, _assertAgainstDynamicHelpersModifiers, _assertAgainstNamedBlocks, _assertAgainstNamedOutlets, _assertInputHelperWithoutBlock, _assertReservedNamedArguments, _assertSplattributeExpression, _transformActionSyntax, _transformEachInIntoEach, _transformEachTrackArray, _transformInElement, _transformLinkTo, _transformQuotedBindingsIntoJustBindings, _transformResolutions, _transformWrapMountAndOutlet) {
18035
18007
  "use strict";
18036
18008
 
18037
18009
  Object.defineProperty(_exports, "__esModule", {
@@ -18039,7 +18011,7 @@ define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-
18039
18011
  });
18040
18012
  _exports.STRICT_MODE_TRANSFORMS = _exports.RESOLUTION_MODE_TRANSFORMS = void 0;
18041
18013
  // order of plugins is important
18042
- var RESOLUTION_MODE_TRANSFORMS = Object.freeze([_transformOldClassBindingSyntax.default, _transformQuotedBindingsIntoJustBindings.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _assertAgainstAttrs.default, _transformEachInIntoEach.default, _transformLinkTo.default, _assertInputHelperWithoutBlock.default, _transformInElement.default, _assertSplattributeExpression.default, _transformEachTrackArray.default, _assertAgainstNamedOutlets.default, _transformWrapMountAndOutlet.default, !true
18014
+ var RESOLUTION_MODE_TRANSFORMS = Object.freeze([_transformQuotedBindingsIntoJustBindings.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _assertAgainstAttrs.default, _transformEachInIntoEach.default, _transformLinkTo.default, _assertInputHelperWithoutBlock.default, _transformInElement.default, _assertSplattributeExpression.default, _transformEachTrackArray.default, _assertAgainstNamedOutlets.default, _transformWrapMountAndOutlet.default, !true
18043
18015
  /* EMBER_NAMED_BLOCKS */
18044
18016
  ? _assertAgainstNamedBlocks.default : null, true
18045
18017
  /* EMBER_DYNAMIC_HELPERS_AND_MODIFIERS */
@@ -18450,149 +18422,6 @@ define("ember-template-compiler/lib/plugins/transform-link-to", ["exports", "@em
18450
18422
  };
18451
18423
  }
18452
18424
  });
18453
- define("ember-template-compiler/lib/plugins/transform-old-class-binding-syntax", ["exports", "@ember/debug", "ember-template-compiler/lib/system/calculate-location-display"], function (_exports, _debug, _calculateLocationDisplay) {
18454
- "use strict";
18455
-
18456
- Object.defineProperty(_exports, "__esModule", {
18457
- value: true
18458
- });
18459
- _exports.default = transformOldClassBindingSyntax;
18460
-
18461
- function transformOldClassBindingSyntax(env) {
18462
- var _a;
18463
-
18464
- var b = env.syntax.builders;
18465
- var moduleName = (_a = env.meta) === null || _a === void 0 ? void 0 : _a.moduleName;
18466
- return {
18467
- name: 'transform-old-class-binding-syntax',
18468
- visitor: {
18469
- MustacheStatement(node) {
18470
- process(b, node, moduleName);
18471
- },
18472
-
18473
- BlockStatement(node) {
18474
- process(b, node, moduleName);
18475
- }
18476
-
18477
- }
18478
- };
18479
- }
18480
-
18481
- function process(b, node, moduleName) {
18482
- var allOfTheMicrosyntaxes = [];
18483
- var allOfTheMicrosyntaxIndexes = [];
18484
- var classPair;
18485
- each(node.hash.pairs, (pair, index) => {
18486
- var {
18487
- key
18488
- } = pair;
18489
-
18490
- if (key === 'classBinding' || key === 'classNameBindings') {
18491
- (true && !(false) && (0, _debug.deprecate)("Passing the `" + key + "` property as an argument within templates has been deprecated. Instead, you can pass the class argument and use concatenation to produce the class value dynamically. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), false, {
18492
- id: 'class-binding-and-class-name-bindings-in-templates',
18493
- url: 'https://deprecations.emberjs.com/v3.x/#toc_class-binding-and-class-name-bindings-in-templates',
18494
- until: '4.0.0',
18495
- for: 'ember-source',
18496
- since: {
18497
- enabled: '3.26.0'
18498
- }
18499
- }));
18500
- allOfTheMicrosyntaxIndexes.push(index);
18501
- allOfTheMicrosyntaxes.push(pair);
18502
- } else if (key === 'class') {
18503
- classPair = pair;
18504
- }
18505
- });
18506
-
18507
- if (allOfTheMicrosyntaxes.length === 0) {
18508
- return;
18509
- }
18510
-
18511
- var classValue = [];
18512
-
18513
- if (classPair) {
18514
- classValue.push(classPair.value);
18515
- classValue.push(b.string(' '));
18516
- } else {
18517
- classPair = b.pair('class', null);
18518
- node.hash.pairs.push(classPair);
18519
- }
18520
-
18521
- each(allOfTheMicrosyntaxIndexes, index => {
18522
- node.hash.pairs.splice(index, 1);
18523
- });
18524
- each(allOfTheMicrosyntaxes, ({
18525
- value
18526
- }) => {
18527
- var sexprs = []; // TODO: add helpful deprecation when both `classNames` and `classNameBindings` can
18528
- // be removed.
18529
-
18530
- if (value.type === 'StringLiteral') {
18531
- var microsyntax = parseMicrosyntax(value.original);
18532
- buildSexprs(microsyntax, sexprs, b);
18533
- classValue.push(...sexprs);
18534
- }
18535
- });
18536
- var hash = b.hash();
18537
- classPair.value = b.sexpr(b.path('concat'), classValue, hash);
18538
- }
18539
-
18540
- function buildSexprs(microsyntax, sexprs, b) {
18541
- for (var i = 0; i < microsyntax.length; i++) {
18542
- var [propName, activeClass, inactiveClass] = microsyntax[i];
18543
- var sexpr = void 0; // :my-class-name microsyntax for static values
18544
-
18545
- if (propName === '') {
18546
- sexpr = b.string(activeClass);
18547
- } else {
18548
- var params = [b.path(propName)];
18549
-
18550
- if (activeClass || activeClass === '') {
18551
- params.push(b.string(activeClass));
18552
- } else {
18553
- var sexprParams = [b.string(propName), b.path(propName)];
18554
- var hash = b.hash();
18555
-
18556
- if (activeClass !== undefined) {
18557
- hash.pairs.push(b.pair('activeClass', b.string(activeClass)));
18558
- }
18559
-
18560
- if (inactiveClass !== undefined) {
18561
- hash.pairs.push(b.pair('inactiveClass', b.string(inactiveClass)));
18562
- }
18563
-
18564
- params.push(b.sexpr(b.path('-normalize-class'), sexprParams, hash));
18565
- }
18566
-
18567
- if (inactiveClass || inactiveClass === '') {
18568
- params.push(b.string(inactiveClass));
18569
- }
18570
-
18571
- sexpr = b.sexpr(b.path('if'), params);
18572
- }
18573
-
18574
- sexprs.push(sexpr);
18575
- sexprs.push(b.string(' '));
18576
- }
18577
- }
18578
-
18579
- function each(list, callback) {
18580
- for (var i = 0; i < list.length; i++) {
18581
- callback(list[i], i);
18582
- }
18583
- }
18584
-
18585
- function parseMicrosyntax(string) {
18586
- var segments = string.split(' ');
18587
- var ret = [];
18588
-
18589
- for (var i = 0; i < segments.length; i++) {
18590
- ret[i] = segments[i].split(':');
18591
- }
18592
-
18593
- return ret;
18594
- }
18595
- });
18596
18425
  define("ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", ["exports"], function (_exports) {
18597
18426
  "use strict";
18598
18427
 
@@ -19027,8 +18856,6 @@ define("ember-template-compiler/lib/system/compile-options", ["exports", "@ember
19027
18856
  _exports.buildCompileOptions = buildCompileOptions;
19028
18857
  _exports.transformsFor = transformsFor;
19029
18858
  _exports.default = compileOptions;
19030
- _exports.registerPlugin = registerPlugin;
19031
- _exports.unregisterPlugin = unregisterPlugin;
19032
18859
  var USER_PLUGINS = [];
19033
18860
 
19034
18861
  function malformedComponentLookup(string) {
@@ -19058,7 +18885,16 @@ define("ember-template-compiler/lib/system/compile-options", ["exports", "@ember
19058
18885
  ) {
19059
18886
  options.strictMode = false;
19060
18887
  options.locals = undefined;
19061
- } // move `moduleName` into `meta` property
18888
+ }
18889
+
18890
+ if ('locals' in options && !options.locals) {
18891
+ // Glimmer's precompile options declare `locals` like:
18892
+ // locals?: string[]
18893
+ // but many in-use versions of babel-plugin-htmlbars-inline-precompile will
18894
+ // set locals to `null`. This used to work but only because glimmer was
18895
+ // ignoring locals for non-strict templates, and now it supports that case.
18896
+ delete options.locals;
18897
+ } // move `moduleName` into `meta` property
19062
18898
 
19063
18899
 
19064
18900
  if (options.moduleName) {
@@ -19088,100 +18924,15 @@ define("ember-template-compiler/lib/system/compile-options", ["exports", "@ember
19088
18924
  } else {
19089
18925
  var potententialPugins = [...USER_PLUGINS, ...builtInPlugins];
19090
18926
  (true && !(options.plugins) && (0, _debug.assert)('expected plugins', options.plugins));
19091
- var providedPlugins = options.plugins.ast.map(plugin => wrapLegacyPluginIfNeeded(plugin));
19092
18927
  var pluginsToAdd = potententialPugins.filter(plugin => {
19093
18928
  (true && !(options.plugins) && (0, _debug.assert)('expected plugins', options.plugins));
19094
18929
  return options.plugins.ast.indexOf(plugin) === -1;
19095
18930
  });
19096
- options.plugins.ast = providedPlugins.concat(pluginsToAdd);
18931
+ options.plugins.ast = options.plugins.ast.concat(pluginsToAdd);
19097
18932
  }
19098
18933
 
19099
18934
  return options;
19100
18935
  }
19101
-
19102
- function isLegacyPluginClass(plugin) {
19103
- return plugin.prototype && typeof plugin.prototype.transform === 'function';
19104
- }
19105
-
19106
- function wrapLegacyPluginIfNeeded(plugin) {
19107
- if (isLegacyPluginClass(plugin)) {
19108
- var Plugin = plugin;
19109
- (true && !(false) && (0, _debug.deprecate)("Using class based template compilation plugins is deprecated, please update to the functional style: " + Plugin.name, false, {
19110
- id: 'template-compiler.registerPlugin',
19111
- until: '4.0.0',
19112
- for: 'ember-source',
19113
- since: {
19114
- enabled: '3.27.0'
19115
- }
19116
- }));
19117
-
19118
- var pluginFunc = env => {
19119
- var pluginInstantiated = false;
19120
- return {
19121
- name: plugin.name,
19122
- visitor: {
19123
- Program(node) {
19124
- if (!pluginInstantiated) {
19125
- pluginInstantiated = true;
19126
- var instance = new Plugin(env);
19127
- instance.syntax = env.syntax;
19128
- return instance.transform(node);
19129
- }
19130
- }
19131
-
19132
- }
19133
- };
19134
- };
19135
-
19136
- pluginFunc.__raw = Plugin;
19137
- return pluginFunc;
19138
- } else {
19139
- return plugin;
19140
- }
19141
- }
19142
-
19143
- function registerPlugin(type, _plugin) {
19144
- (true && !(false) && (0, _debug.deprecate)('registerPlugin is deprecated, please pass plugins directly via `compile` and/or `precompile`.', false, {
19145
- id: 'template-compiler.registerPlugin',
19146
- until: '4.0.0',
19147
- for: 'ember-source',
19148
- since: {
19149
- enabled: '3.27.0'
19150
- }
19151
- }));
19152
-
19153
- if (type !== 'ast') {
19154
- throw new Error("Attempting to register " + _plugin + " as \"" + type + "\" which is not a valid Glimmer plugin type.");
19155
- }
19156
-
19157
- for (var i = 0; i < USER_PLUGINS.length; i++) {
19158
- var PLUGIN = USER_PLUGINS[i];
19159
-
19160
- if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
19161
- return;
19162
- }
19163
- }
19164
-
19165
- var plugin = wrapLegacyPluginIfNeeded(_plugin);
19166
- USER_PLUGINS = [plugin, ...USER_PLUGINS];
19167
- }
19168
-
19169
- function unregisterPlugin(type, PluginClass) {
19170
- (true && !(false) && (0, _debug.deprecate)('unregisterPlugin is deprecated, please pass plugins directly via `compile` and/or `precompile`.', false, {
19171
- id: 'template-compiler.registerPlugin',
19172
- until: '4.0.0',
19173
- for: 'ember-source',
19174
- since: {
19175
- enabled: '3.27.0'
19176
- }
19177
- }));
19178
-
19179
- if (type !== 'ast') {
19180
- throw new Error("Attempting to unregister " + PluginClass + " as \"" + type + "\" which is not a valid Glimmer plugin type.");
19181
- }
19182
-
19183
- USER_PLUGINS = USER_PLUGINS.filter(plugin => plugin !== PluginClass && plugin.__raw !== PluginClass);
19184
- }
19185
18936
  });
19186
18937
  define("ember-template-compiler/lib/system/compile", ["exports", "require", "ember-template-compiler/lib/system/precompile"], function (_exports, _require, _precompile) {
19187
18938
  "use strict";
@@ -19316,7 +19067,7 @@ define("ember/version", ["exports"], function (_exports) {
19316
19067
  value: true
19317
19068
  });
19318
19069
  _exports.default = void 0;
19319
- var _default = "4.1.0-alpha.2";
19070
+ var _default = "4.1.0-alpha.6";
19320
19071
  _exports.default = _default;
19321
19072
  });
19322
19073
  define("simple-html-tokenizer", ["exports"], function (_exports) {