ember-source 2.16.2 → 2.16.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3cae6aadab3a9b1f89304fc6ac6790e785131d5c
4
- data.tar.gz: cb65a1ac3894e4b4b95a6c87c9a96bbcffa4d49a
2
+ SHA256:
3
+ metadata.gz: ff13e40f6a8e2537054b740bdd89d6909db8862432145a27331555df41e43a9e
4
+ data.tar.gz: 794790c78faa257465729be2f9f427b7e51a9cea1b08ee18144a2fbd9331b6f0
5
5
  SHA512:
6
- metadata.gz: 64632d3193ec7c79e042309d1d8ac04998d448365bbffa6fe78a756598854502d8a79369ca9366ed9ca8a0684aa26cd6ff3a3f6d76ea8df4ca31feb790dfdc66
7
- data.tar.gz: 95f80c4940c73cce104fceb0ddbbfc44a7550530fd2458185e5ba09188d720799f0a4b5bae2e8b284146fb617bae6b968549a0a1dba4ab97771a628c9dac15f5
6
+ metadata.gz: 0653dc862118f647d5fd2b15e1a1a7152dfd8554502a8cb6307eae313b7fdf6307a8377471d440a1bf641a2ecf727f56f5cda57439d44a831199c9b4d64cfbe3
7
+ data.tar.gz: 3bf01d0baf14fd1ec82a2a117e4558c9ad3aca2c19a6524ce77810afaf2060b825fa7c6841bf4c6150f79c5aa105f9127723e500599c814605376176554c5db5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.16.2
1
+ 2.16.3
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -2038,9 +2038,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
2038
2038
  {
2039
2039
  debugStack = context$$1.env.debugStack;
2040
2040
  }
2041
- context$$1[methodName]();
2042
- inTransaction = false;
2043
- counter++;
2041
+
2042
+ try {
2043
+ context$$1[methodName]();
2044
+ } finally {
2045
+ inTransaction = false;
2046
+ counter++;
2047
+ }
2048
+
2044
2049
  return shouldReflush;
2045
2050
  };
2046
2051
 
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -8264,9 +8264,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
8264
8264
  {
8265
8265
  debugStack = context$$1.env.debugStack;
8266
8266
  }
8267
- context$$1[methodName]();
8268
- inTransaction = false;
8269
- counter++;
8267
+
8268
+ try {
8269
+ context$$1[methodName]();
8270
+ } finally {
8271
+ inTransaction = false;
8272
+ counter++;
8273
+ }
8274
+
8270
8275
  return shouldReflush;
8271
8276
  };
8272
8277
 
@@ -16407,6 +16412,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16407
16412
  var options = (0, _emberUtils.assign)({ meta: {} }, _options),
16408
16413
  meta,
16409
16414
  potententialPugins,
16415
+ providedPlugins,
16410
16416
  pluginsToAdd;
16411
16417
 
16412
16418
  // move `moduleName` into `meta` property
@@ -16420,11 +16426,14 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16420
16426
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
16421
16427
  } else {
16422
16428
  potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
16429
+ providedPlugins = options.plugins.ast.map(function (plugin) {
16430
+ return wrapLegacyPluginIfNeeded(plugin);
16431
+ });
16423
16432
  pluginsToAdd = potententialPugins.filter(function (plugin) {
16424
16433
  return options.plugins.ast.indexOf(plugin) === -1;
16425
16434
  });
16426
16435
 
16427
- options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
16436
+ options.plugins.ast = providedPlugins.concat(pluginsToAdd);
16428
16437
  }
16429
16438
 
16430
16439
  return options;
@@ -16434,40 +16443,65 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16434
16443
  throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16435
16444
  }
16436
16445
 
16437
- var plugin = void 0;
16446
+ for (i = 0; i < USER_PLUGINS.length; i++) {
16447
+ PLUGIN = USER_PLUGINS[i];
16448
+
16449
+ if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
16450
+ return;
16451
+ }
16452
+ }
16453
+
16454
+ var plugin = wrapLegacyPluginIfNeeded(_plugin),
16455
+ i,
16456
+ PLUGIN;
16457
+
16458
+ USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16459
+ };
16460
+ exports.unregisterPlugin = function (type, PluginClass) {
16461
+ if (type !== 'ast') {
16462
+ throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16463
+ }
16464
+
16465
+ USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16466
+ return plugin !== PluginClass && plugin.__raw !== PluginClass;
16467
+ });
16468
+ };
16469
+
16470
+ var USER_PLUGINS = [];
16471
+
16472
+ function wrapLegacyPluginIfNeeded(_plugin) {
16473
+ var plugin = _plugin;
16438
16474
  if (_plugin.prototype && _plugin.prototype.transform) {
16439
16475
  plugin = function (env) {
16476
+ var pluginInstantiated = false;
16477
+
16440
16478
  return {
16441
16479
  name: _plugin.constructor && _plugin.constructor.name,
16442
16480
 
16443
16481
  visitors: {
16444
16482
  Program: function (node) {
16445
- var plugin = new _plugin(env);
16483
+ var _plugin2;
16484
+
16485
+ if (!pluginInstantiated) {
16446
16486
 
16447
- plugin.syntax = env.syntax;
16487
+ pluginInstantiated = true;
16488
+ _plugin2 = new _plugin(env);
16448
16489
 
16449
- return plugin.transform(node);
16490
+
16491
+ _plugin2.syntax = env.syntax;
16492
+
16493
+ return _plugin2.transform(node);
16494
+ }
16450
16495
  }
16451
16496
  }
16452
16497
  };
16453
16498
  };
16454
- } else {
16455
- plugin = _plugin;
16456
- }
16457
16499
 
16458
- USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16459
- };
16460
- exports.removePlugin = function (type, PluginClass) {
16461
- if (type !== 'ast') {
16462
- throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16500
+ plugin.__raw = _plugin;
16463
16501
  }
16464
16502
 
16465
- USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16466
- return plugin !== PluginClass;
16467
- });
16468
- };
16469
-
16470
- var USER_PLUGINS = [];
16503
+ return plugin;
16504
+ }
16471
16505
  });
16472
16506
  enifed('ember-template-compiler/system/compile', ['exports', 'require', 'ember-template-compiler/system/precompile'], function (exports, _require2, _precompile) {
16473
16507
  'use strict';
@@ -17293,7 +17327,7 @@ enifed('ember/features', ['exports', 'ember-environment', 'ember-utils'], functi
17293
17327
  enifed("ember/version", ["exports"], function (exports) {
17294
17328
  "use strict";
17295
17329
 
17296
- exports.default = "2.16.2";
17330
+ exports.default = "2.16.3";
17297
17331
  });
17298
17332
  enifed("handlebars", ["exports"], function (exports) {
17299
17333
  "use strict";
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -17476,6 +17476,109 @@ QUnit.test('should pass ESLint', function(assert) {
17476
17476
  assert.ok(true, 'ember-glimmer/tests/integration/components/dynamic-components-test.js should pass ESLint\n\n');
17477
17477
  });
17478
17478
 
17479
+ enifed('ember-glimmer/tests/integration/components/error-handling-test', ['ember-babel', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/test-case'], function (_emberBabel, _emberMetal, _helpers, _testCase) {
17480
+ 'use strict';
17481
+
17482
+ (0, _testCase.moduleFor)('Errors thrown during render', function (_RenderingTest) {
17483
+ (0, _emberBabel.inherits)(_class, _RenderingTest);
17484
+
17485
+ function _class() {
17486
+ (0, _emberBabel.classCallCheck)(this, _class);
17487
+ return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
17488
+ }
17489
+
17490
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during initial render'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringInitialRender(assert) {
17491
+ var _this2 = this;
17492
+
17493
+ var shouldThrow = true;
17494
+ var FooBarComponent = _helpers.Component.extend({
17495
+ init: function () {
17496
+ this._super.apply(this, arguments);
17497
+ if (shouldThrow) {
17498
+ throw new Error('silly mistake in init!');
17499
+ }
17500
+ }
17501
+ });
17502
+
17503
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
17504
+
17505
+ assert.throws(function () {
17506
+ _this2.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
17507
+ }, /silly mistake in init/);
17508
+
17509
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
17510
+
17511
+ this.assertText('');
17512
+
17513
+ this.runTask(function () {
17514
+ return (0, _emberMetal.set)(_this2.context, 'switch', false);
17515
+ });
17516
+
17517
+ shouldThrow = false;
17518
+
17519
+ this.runTask(function () {
17520
+ return (0, _emberMetal.set)(_this2.context, 'switch', true);
17521
+ });
17522
+
17523
+ this.assertText('hello');
17524
+ };
17525
+
17526
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during rerender'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringRerender(assert) {
17527
+ var _this3 = this;
17528
+
17529
+ var shouldThrow = false;
17530
+ var FooBarComponent = _helpers.Component.extend({
17531
+ init: function () {
17532
+ this._super.apply(this, arguments);
17533
+ if (shouldThrow) {
17534
+ throw new Error('silly mistake in init!');
17535
+ }
17536
+ }
17537
+ });
17538
+
17539
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
17540
+
17541
+ this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
17542
+
17543
+ this.assertText('hello');
17544
+
17545
+ this.runTask(function () {
17546
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
17547
+ });
17548
+
17549
+ shouldThrow = true;
17550
+
17551
+ assert.throws(function () {
17552
+ _this3.runTask(function () {
17553
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
17554
+ });
17555
+ }, /silly mistake in init/);
17556
+
17557
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
17558
+
17559
+ this.assertText('');
17560
+
17561
+ this.runTask(function () {
17562
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
17563
+ });
17564
+ shouldThrow = false;
17565
+
17566
+ this.runTask(function () {
17567
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
17568
+ });
17569
+
17570
+ this.assertText('hello');
17571
+ };
17572
+
17573
+ return _class;
17574
+ }(_testCase.RenderingTest));
17575
+ });
17576
+ QUnit.module('ESLint | ember-glimmer/tests/integration/components/error-handling-test.js');
17577
+ QUnit.test('should pass ESLint', function(assert) {
17578
+ assert.expect(1);
17579
+ assert.ok(true, 'ember-glimmer/tests/integration/components/error-handling-test.js should pass ESLint\n\n');
17580
+ });
17581
+
17479
17582
  enifed('ember-glimmer/tests/integration/components/fragment-components-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/helpers', 'ember-metal'], function (_emberBabel, _testCase, _abstractTestCase, _helpers, _emberMetal) {
17480
17583
  'use strict';
17481
17584
 
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -16458,6 +16458,102 @@ enifed('ember-glimmer/tests/integration/components/dynamic-components-test', ['e
16458
16458
  return _class;
16459
16459
  }(_testCase.RenderingTest));
16460
16460
  });
16461
+ enifed('ember-glimmer/tests/integration/components/error-handling-test', ['ember-babel', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/test-case'], function (_emberBabel, _emberMetal, _helpers, _testCase) {
16462
+ 'use strict';
16463
+
16464
+ (0, _testCase.moduleFor)('Errors thrown during render', function (_RenderingTest) {
16465
+ (0, _emberBabel.inherits)(_class, _RenderingTest);
16466
+
16467
+ function _class() {
16468
+ return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
16469
+ }
16470
+
16471
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during initial render'] = function (assert) {
16472
+ var _this2 = this;
16473
+
16474
+ var shouldThrow = true;
16475
+ var FooBarComponent = _helpers.Component.extend({
16476
+ init: function () {
16477
+ this._super.apply(this, arguments);
16478
+ if (shouldThrow) {
16479
+ throw new Error('silly mistake in init!');
16480
+ }
16481
+ }
16482
+ });
16483
+
16484
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
16485
+
16486
+ assert.throws(function () {
16487
+ _this2.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
16488
+ }, /silly mistake in init/);
16489
+
16490
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
16491
+
16492
+ this.assertText('');
16493
+
16494
+ this.runTask(function () {
16495
+ return (0, _emberMetal.set)(_this2.context, 'switch', false);
16496
+ });
16497
+
16498
+ shouldThrow = false;
16499
+
16500
+ this.runTask(function () {
16501
+ return (0, _emberMetal.set)(_this2.context, 'switch', true);
16502
+ });
16503
+
16504
+ this.assertText('hello');
16505
+ };
16506
+
16507
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during rerender'] = function (assert) {
16508
+ var _this3 = this;
16509
+
16510
+ var shouldThrow = false;
16511
+ var FooBarComponent = _helpers.Component.extend({
16512
+ init: function () {
16513
+ this._super.apply(this, arguments);
16514
+ if (shouldThrow) {
16515
+ throw new Error('silly mistake in init!');
16516
+ }
16517
+ }
16518
+ });
16519
+
16520
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
16521
+
16522
+ this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
16523
+
16524
+ this.assertText('hello');
16525
+
16526
+ this.runTask(function () {
16527
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
16528
+ });
16529
+
16530
+ shouldThrow = true;
16531
+
16532
+ assert.throws(function () {
16533
+ _this3.runTask(function () {
16534
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
16535
+ });
16536
+ }, /silly mistake in init/);
16537
+
16538
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
16539
+
16540
+ this.assertText('');
16541
+
16542
+ this.runTask(function () {
16543
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
16544
+ });
16545
+ shouldThrow = false;
16546
+
16547
+ this.runTask(function () {
16548
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
16549
+ });
16550
+
16551
+ this.assertText('hello');
16552
+ };
16553
+
16554
+ return _class;
16555
+ }(_testCase.RenderingTest));
16556
+ });
16461
16557
  enifed('ember-glimmer/tests/integration/components/fragment-components-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/helpers', 'ember-metal'], function (_emberBabel, _testCase, _abstractTestCase, _helpers, _emberMetal) {
16462
16558
  'use strict';
16463
16559
 
@@ -60542,7 +60638,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
60542
60638
 
60543
60639
  exports.default = compileOptions;
60544
60640
  exports.registerPlugin = registerPlugin;
60545
- exports.removePlugin = removePlugin;
60641
+ exports.unregisterPlugin = unregisterPlugin;
60546
60642
 
60547
60643
 
60548
60644
  var USER_PLUGINS = [];
@@ -60560,51 +60656,73 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
60560
60656
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
60561
60657
  } else {
60562
60658
  var potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
60659
+ var providedPlugins = options.plugins.ast.map(function (plugin) {
60660
+ return wrapLegacyPluginIfNeeded(plugin);
60661
+ });
60563
60662
  var pluginsToAdd = potententialPugins.filter(function (plugin) {
60564
60663
  return options.plugins.ast.indexOf(plugin) === -1;
60565
60664
  });
60566
- options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
60665
+ options.plugins.ast = providedPlugins.concat(pluginsToAdd);
60567
60666
  }
60568
60667
 
60569
60668
  return options;
60570
60669
  }
60571
60670
 
60572
- function registerPlugin(type, _plugin) {
60573
- if (type !== 'ast') {
60574
- throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60575
- }
60576
-
60577
- var plugin = void 0;
60671
+ function wrapLegacyPluginIfNeeded(_plugin) {
60672
+ var plugin = _plugin;
60578
60673
  if (_plugin.prototype && _plugin.prototype.transform) {
60579
60674
  plugin = function (env) {
60675
+ var pluginInstantiated = false;
60676
+
60580
60677
  return {
60581
60678
  name: _plugin.constructor && _plugin.constructor.name,
60582
60679
 
60583
60680
  visitors: {
60584
60681
  Program: function (node) {
60585
- var plugin = new _plugin(env);
60682
+ if (!pluginInstantiated) {
60683
+
60684
+ pluginInstantiated = true;
60685
+ var _plugin2 = new _plugin(env);
60586
60686
 
60587
- plugin.syntax = env.syntax;
60687
+ _plugin2.syntax = env.syntax;
60588
60688
 
60589
- return plugin.transform(node);
60689
+ return _plugin2.transform(node);
60690
+ }
60590
60691
  }
60591
60692
  }
60592
60693
  };
60593
60694
  };
60594
- } else {
60595
- plugin = _plugin;
60695
+
60696
+ plugin.__raw = _plugin;
60596
60697
  }
60597
60698
 
60699
+ return plugin;
60700
+ }
60701
+
60702
+ function registerPlugin(type, _plugin) {
60703
+ if (type !== 'ast') {
60704
+ throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60705
+ }
60706
+
60707
+ for (var i = 0; i < USER_PLUGINS.length; i++) {
60708
+ var PLUGIN = USER_PLUGINS[i];
60709
+ if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
60710
+ return;
60711
+ }
60712
+ }
60713
+
60714
+ var plugin = wrapLegacyPluginIfNeeded(_plugin);
60715
+
60598
60716
  USER_PLUGINS = [plugin].concat(USER_PLUGINS);
60599
60717
  }
60600
60718
 
60601
- function removePlugin(type, PluginClass) {
60719
+ function unregisterPlugin(type, PluginClass) {
60602
60720
  if (type !== 'ast') {
60603
60721
  throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60604
60722
  }
60605
60723
 
60606
60724
  USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
60607
- return plugin !== PluginClass;
60725
+ return plugin !== PluginClass && plugin.__raw !== PluginClass;
60608
60726
  });
60609
60727
  }
60610
60728
  });
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -20158,6 +20158,9 @@ enifed('ember-glimmer/renderer', ['exports', 'ember-babel', 'ember-glimmer/utils
20158
20158
  } finally {
20159
20159
  if (!completedWithoutError) {
20160
20160
  this._lastRevision = _reference.CURRENT_TAG.value();
20161
+ if (this._env.inTransaction === true) {
20162
+ this._env.commit();
20163
+ }
20161
20164
  }
20162
20165
  this._isRenderingRoots = false;
20163
20166
  }
@@ -23334,9 +23337,14 @@ enifed('ember-metal', ['exports', 'ember-environment', 'ember-utils', 'ember-deb
23334
23337
  {
23335
23338
  debugStack = context$$1.env.debugStack;
23336
23339
  }
23337
- context$$1[methodName]();
23338
- inTransaction = false;
23339
- counter++;
23340
+
23341
+ try {
23342
+ context$$1[methodName]();
23343
+ } finally {
23344
+ inTransaction = false;
23345
+ counter++;
23346
+ }
23347
+
23340
23348
  return shouldReflush;
23341
23349
  };
23342
23350
 
@@ -43573,7 +43581,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
43573
43581
 
43574
43582
  exports.default = compileOptions;
43575
43583
  exports.registerPlugin = registerPlugin;
43576
- exports.removePlugin = removePlugin;
43584
+ exports.unregisterPlugin = unregisterPlugin;
43577
43585
 
43578
43586
 
43579
43587
  var USER_PLUGINS = [];
@@ -43591,51 +43599,73 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
43591
43599
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
43592
43600
  } else {
43593
43601
  var potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
43602
+ var providedPlugins = options.plugins.ast.map(function (plugin) {
43603
+ return wrapLegacyPluginIfNeeded(plugin);
43604
+ });
43594
43605
  var pluginsToAdd = potententialPugins.filter(function (plugin) {
43595
43606
  return options.plugins.ast.indexOf(plugin) === -1;
43596
43607
  });
43597
- options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
43608
+ options.plugins.ast = providedPlugins.concat(pluginsToAdd);
43598
43609
  }
43599
43610
 
43600
43611
  return options;
43601
43612
  }
43602
43613
 
43603
- function registerPlugin(type, _plugin) {
43604
- if (type !== 'ast') {
43605
- throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43606
- }
43607
-
43608
- var plugin = void 0;
43614
+ function wrapLegacyPluginIfNeeded(_plugin) {
43615
+ var plugin = _plugin;
43609
43616
  if (_plugin.prototype && _plugin.prototype.transform) {
43610
43617
  plugin = function (env) {
43618
+ var pluginInstantiated = false;
43619
+
43611
43620
  return {
43612
43621
  name: _plugin.constructor && _plugin.constructor.name,
43613
43622
 
43614
43623
  visitors: {
43615
43624
  Program: function (node) {
43616
- var plugin = new _plugin(env);
43625
+ if (!pluginInstantiated) {
43626
+
43627
+ pluginInstantiated = true;
43628
+ var _plugin2 = new _plugin(env);
43617
43629
 
43618
- plugin.syntax = env.syntax;
43630
+ _plugin2.syntax = env.syntax;
43619
43631
 
43620
- return plugin.transform(node);
43632
+ return _plugin2.transform(node);
43633
+ }
43621
43634
  }
43622
43635
  }
43623
43636
  };
43624
43637
  };
43625
- } else {
43626
- plugin = _plugin;
43638
+
43639
+ plugin.__raw = _plugin;
43627
43640
  }
43628
43641
 
43642
+ return plugin;
43643
+ }
43644
+
43645
+ function registerPlugin(type, _plugin) {
43646
+ if (type !== 'ast') {
43647
+ throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43648
+ }
43649
+
43650
+ for (var i = 0; i < USER_PLUGINS.length; i++) {
43651
+ var PLUGIN = USER_PLUGINS[i];
43652
+ if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
43653
+ return;
43654
+ }
43655
+ }
43656
+
43657
+ var plugin = wrapLegacyPluginIfNeeded(_plugin);
43658
+
43629
43659
  USER_PLUGINS = [plugin].concat(USER_PLUGINS);
43630
43660
  }
43631
43661
 
43632
- function removePlugin(type, PluginClass) {
43662
+ function unregisterPlugin(type, PluginClass) {
43633
43663
  if (type !== 'ast') {
43634
43664
  throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43635
43665
  }
43636
43666
 
43637
43667
  USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
43638
- return plugin !== PluginClass;
43668
+ return plugin !== PluginClass && plugin.__raw !== PluginClass;
43639
43669
  });
43640
43670
  }
43641
43671
  });
@@ -48439,7 +48469,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
48439
48469
  enifed("ember/version", ["exports"], function (exports) {
48440
48470
  "use strict";
48441
48471
 
48442
- exports.default = "2.16.2";
48472
+ exports.default = "2.16.3";
48443
48473
  });
48444
48474
  enifed("handlebars", ["exports"], function (exports) {
48445
48475
  "use strict";
@@ -1360,7 +1360,7 @@ this._lastRevision=i.CURRENT_TAG.value(),u.commit()}while(l||a.length>h)
1360
1360
  for(;c.length;)o=c.pop(),s=a.indexOf(o),a.splice(s,1)
1361
1361
  0===this._roots.length&&p(this)},e.prototype._renderRootsTransaction=function(){if(!this._isRenderingRoots){this._isRenderingRoots=!0
1362
1362
  var e=!1
1363
- try{this._renderRoots(),e=!0}finally{e||(this._lastRevision=i.CURRENT_TAG.value()),this._isRenderingRoots=!1}}},e.prototype._clearAllRoots=function(){var e,t,n=this._roots
1363
+ try{this._renderRoots(),e=!0}finally{e||(this._lastRevision=i.CURRENT_TAG.value(),this._env.inTransaction===!0&&this._env.commit()),this._isRenderingRoots=!1}}},e.prototype._clearAllRoots=function(){var e,t,n=this._roots
1364
1364
  for(e=0;e<n.length;e++)t=n[e],t.destroy()
1365
1365
  this._removedRoots.length=0,this._roots=null,n.length&&p(this)},e.prototype._scheduleRevalidate=function(){f.scheduleOnce("render",this,this._revalidate)},e.prototype._isValid=function(){return this._destroyed||0===this._roots.length||i.CURRENT_TAG.validate(this._lastRevision)},e.prototype._revalidate=function(){this._isValid()||this._renderRootsTransaction()},e}()
1366
1366
  e.InertRenderer=function(e){function n(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(n,e),n.create=function(e){var t=e.env,n=e.rootTemplate,r=e._viewRegistry
@@ -2604,7 +2604,7 @@ var b,_=s.computed
2604
2604
  _.alias=s.alias,s["default"].computed=_,s["default"].ComputedProperty=s.ComputedProperty,s["default"].cacheFor=s.cacheFor,s["default"].assert=u.assert,s["default"].warn=u.warn,s["default"].debug=u.debug,s["default"].deprecate=u.deprecate,s["default"].deprecateFunc=u.deprecateFunc,s["default"].runInDebug=u.runInDebug,s["default"].Debug={registerDeprecationHandler:u.registerDeprecationHandler,registerWarnHandler:u.registerWarnHandler},s["default"].merge=s.merge,s["default"].instrument=s.instrument,s["default"].subscribe=s.instrumentationSubscribe,s["default"].Instrumentation={instrument:s.instrument,subscribe:s.instrumentationSubscribe,unsubscribe:s.instrumentationUnsubscribe,reset:s.instrumentationReset},s["default"].Error=u.Error,s["default"].META_DESC=s.META_DESC,s["default"].meta=s.meta,s["default"].get=s.get,s["default"].getWithDefault=s.getWithDefault,s["default"]._getPath=s._getPath,s["default"].set=s.set,s["default"].trySet=s.trySet,s["default"].FEATURES=a.FEATURES,s["default"].FEATURES.isEnabled=u.isFeatureEnabled,s["default"]._Cache=s.Cache,s["default"].on=s.on,s["default"].addListener=s.addListener,s["default"].removeListener=s.removeListener,s["default"]._suspendListener=s.suspendListener,s["default"]._suspendListeners=s.suspendListeners,s["default"].sendEvent=s.sendEvent,s["default"].hasListeners=s.hasListeners,s["default"].watchedEvents=s.watchedEvents,s["default"].listenersFor=s.listenersFor,s["default"].isNone=s.isNone,s["default"].isEmpty=s.isEmpty,s["default"].isBlank=s.isBlank,s["default"].isPresent=s.isPresent,s["default"].run=s.run,s["default"]._ObserverSet=s.ObserverSet,s["default"].propertyWillChange=s.propertyWillChange,s["default"].propertyDidChange=s.propertyDidChange,s["default"].overrideChains=s.overrideChains,s["default"].beginPropertyChanges=s.beginPropertyChanges,s["default"].endPropertyChanges=s.endPropertyChanges,s["default"].changeProperties=s.changeProperties,s["default"].platform={defineProperty:!0,hasPropertyAccessors:!0},s["default"].defineProperty=s.defineProperty,s["default"].watchKey=s.watchKey,s["default"].unwatchKey=s.unwatchKey,s["default"].removeChainWatcher=s.removeChainWatcher,s["default"]._ChainNode=s.ChainNode,s["default"].finishChains=s.finishChains,s["default"].watchPath=s.watchPath,s["default"].unwatchPath=s.unwatchPath,s["default"].watch=s.watch,s["default"].isWatching=s.isWatching,s["default"].unwatch=s.unwatch,s["default"].destroy=s.destroy,s["default"].libraries=s.libraries,s["default"].OrderedSet=s.OrderedSet,s["default"].Map=s.Map,s["default"].MapWithDefault=s.MapWithDefault,s["default"].getProperties=s.getProperties,s["default"].setProperties=s.setProperties,s["default"].expandProperties=s.expandProperties,s["default"].NAME_KEY=i.NAME_KEY,s["default"].addObserver=s.addObserver,s["default"].observersFor=s.observersFor,s["default"].removeObserver=s.removeObserver,s["default"]._suspendObserver=s._suspendObserver,s["default"]._suspendObservers=s._suspendObservers,s["default"].required=s.required,s["default"].aliasMethod=s.aliasMethod,s["default"].observer=s.observer,s["default"].immediateObserver=s._immediateObserver,s["default"].mixin=s.mixin,s["default"].Mixin=s.Mixin,s["default"].bind=s.bind,s["default"].Binding=s.Binding,s["default"].isGlobalPath=s.isGlobalPath,Object.defineProperty(s["default"],"ENV",{get:function(){return n.ENV},enumerable:!1}),Object.defineProperty(s["default"],"lookup",{get:function(){return n.context.lookup},set:function(e){n.context.lookup=e},enumerable:!1}),s["default"].EXTEND_PROTOTYPES=n.ENV.EXTEND_PROTOTYPES,Object.defineProperty(s["default"],"LOG_STACKTRACE_ON_DEPRECATION",{get:function(){return n.ENV.LOG_STACKTRACE_ON_DEPRECATION},set:function(e){n.ENV.LOG_STACKTRACE_ON_DEPRECATION=!!e},enumerable:!1}),Object.defineProperty(s["default"],"LOG_VERSION",{get:function(){return n.ENV.LOG_VERSION},set:function(e){n.ENV.LOG_VERSION=!!e},enumerable:!1}),Object.defineProperty(s["default"],"LOG_BINDINGS",{get:function(){return n.ENV.LOG_BINDINGS},set:function(e){n.ENV.LOG_BINDINGS=!!e},enumerable:!1}),Object.defineProperty(s["default"],"onerror",{get:s.getOnerror,set:s.setOnerror,enumerable:!1}),Object.defineProperty(s["default"],"K",{get:function(){return v}}),Object.defineProperty(s["default"],"testing",{get:u.isTesting,set:u.setTesting,enumerable:!1}),s["default"]._Backburner=c["default"],s["default"].Logger=l["default"],s["default"].String=p.String,s["default"].Object=p.Object,s["default"]._RegistryProxyMixin=p.RegistryProxyMixin,s["default"]._ContainerProxyMixin=p.ContainerProxyMixin,s["default"].compare=p.compare,s["default"].copy=p.copy,s["default"].isEqual=p.isEqual,s["default"].inject=p.inject,s["default"].Array=p.Array,s["default"].Comparable=p.Comparable,s["default"].Enumerable=p.Enumerable,s["default"].ArrayProxy=p.ArrayProxy,s["default"].ObjectProxy=p.ObjectProxy,s["default"].ActionHandler=p.ActionHandler,s["default"].CoreObject=p.CoreObject,s["default"].NativeArray=p.NativeArray,s["default"].Copyable=p.Copyable,s["default"].Freezable=p.Freezable,s["default"].FROZEN_ERROR=p.FROZEN_ERROR,s["default"].MutableEnumerable=p.MutableEnumerable,s["default"].MutableArray=p.MutableArray,s["default"].TargetActionSupport=p.TargetActionSupport,s["default"].Evented=p.Evented,s["default"].PromiseProxyMixin=p.PromiseProxyMixin,s["default"].Observable=p.Observable,s["default"].typeOf=p.typeOf,s["default"].isArray=p.isArray,s["default"].Object=p.Object,s["default"].onLoad=p.onLoad,s["default"].runLoadHooks=p.runLoadHooks,s["default"].Controller=p.Controller,s["default"].ControllerMixin=p.ControllerMixin,s["default"].Service=p.Service,s["default"]._ProxyMixin=p._ProxyMixin,s["default"].RSVP=p.RSVP,s["default"].Namespace=p.Namespace,_.empty=p.empty,_.notEmpty=p.notEmpty,_.none=p.none,_.not=p.not,_.bool=p.bool,_.match=p.match,_.equal=p.equal,_.gt=p.gt,_.gte=p.gte,_.lt=p.lt,_.lte=p.lte,_.oneWay=p.oneWay,_.reads=p.oneWay,_.readOnly=p.readOnly,_.deprecatingAlias=p.deprecatingAlias,_.and=p.and,_.or=p.or,_.any=p.any,_.sum=p.sum,_.min=p.min,_.max=p.max,_.map=p.map,_.sort=p.sort,_.setDiff=p.setDiff,_.mapBy=p.mapBy,_.filter=p.filter,_.filterBy=p.filterBy,_.uniq=p.uniq,_.uniqBy=p.uniqBy,_.union=p.union,_.intersect=p.intersect,_.collect=p.collect,Object.defineProperty(s["default"],"STRINGS",{configurable:!1,get:p.getStrings,set:p.setStrings}),Object.defineProperty(s["default"],"BOOTED",{configurable:!1,enumerable:!1,get:p.isNamespaceSearchDisabled,set:p.setNamespaceSearchDisabled}),s["default"].Component=h.Component,h.Helper.helper=h.helper,s["default"].Helper=h.Helper,s["default"].Checkbox=h.Checkbox,s["default"].TextField=h.TextField,s["default"].TextArea=h.TextArea,s["default"].LinkComponent=h.LinkComponent,n.ENV.EXTEND_PROTOTYPES.String&&(String.prototype.htmlSafe=function(){return(0,h.htmlSafe)(this)})
2605
2605
  var w=s["default"].Handlebars=s["default"].Handlebars||{},O=s["default"].HTMLBars=s["default"].HTMLBars||{},E=w.Utils=w.Utils||{}
2606
2606
  Object.defineProperty(w,"SafeString",{get:h._getSafeString}),O.template=w.template=h.template,E.escapeExpression=h.escapeExpression,p.String.htmlSafe=h.htmlSafe,p.String.isHTMLSafe=h.isHTMLSafe,Object.defineProperty(s["default"],"TEMPLATES",{get:h.getTemplates,set:h.setTemplates,configurable:!1,enumerable:!1}),e.VERSION=f["default"],s["default"].VERSION=f["default"],s.libraries.registerCoreLibrary("Ember",f["default"]),s["default"].$=d.jQuery,s["default"].ViewTargetActionSupport=d.ViewTargetActionSupport,s["default"].ViewUtils={isSimpleClick:d.isSimpleClick,getViewElement:d.getViewElement,getViewBounds:d.getViewBounds,getViewClientRects:d.getViewClientRects,getViewBoundingClientRect:d.getViewBoundingClientRect,getRootViews:d.getRootViews,getChildViews:d.getChildViews},s["default"].TextSupport=d.TextSupport,s["default"].ComponentLookup=d.ComponentLookup,s["default"].EventDispatcher=d.EventDispatcher,s["default"].Location=m.Location,s["default"].AutoLocation=m.AutoLocation,s["default"].HashLocation=m.HashLocation,s["default"].HistoryLocation=m.HistoryLocation,s["default"].NoneLocation=m.NoneLocation,s["default"].controllerFor=m.controllerFor,s["default"].generateControllerFactory=m.generateControllerFactory,s["default"].generateController=m.generateController,s["default"].RouterDSL=m.RouterDSL,s["default"].Router=m.Router,s["default"].Route=m.Route,s["default"].Application=g.Application,s["default"].ApplicationInstance=g.ApplicationInstance,s["default"].Engine=g.Engine,s["default"].EngineInstance=g.EngineInstance,s["default"].DefaultResolver=s["default"].Resolver=g.Resolver,(0,p.runLoadHooks)("Ember.Application",g.Application),s["default"].DataAdapter=y.DataAdapter,s["default"].ContainerDebugAdapter=y.ContainerDebugAdapter,(0,t.has)("ember-template-compiler")&&(0,t["default"])("ember-template-compiler"),(0,t.has)("ember-testing")&&(b=(0,t["default"])("ember-testing"),s["default"].Test=b.Test,s["default"].Test.Adapter=b.Adapter,s["default"].Test.QUnitAdapter=b.QUnitAdapter,s["default"].setupForTesting=b.setupForTesting),(0,p.runLoadHooks)("Ember"),e["default"]=s["default"],r.IS_NODE?r.module.exports=s["default"]:n.context.exports.Ember=n.context.exports.Em=s["default"]}),e("ember/version",["exports"],function(e){"use strict"
2607
- e["default"]="2.16.2"}),e("node-module",["exports"],function(e){var t="object"==typeof module&&"function"==typeof module.require
2607
+ e["default"]="2.16.3"}),e("node-module",["exports"],function(e){var t="object"==typeof module&&"function"==typeof module.require
2608
2608
  t?(e.require=module.require,e.module=module,e.IS_NODE=t):(e.require=null,e.module=null,e.IS_NODE=t)}),e("route-recognizer",["exports"],function(e){"use strict"
2609
2609
  function t(){var e=g(null)
2610
2610
  return e.__=void 0,delete e.__,e}function n(e,t,r){return function(i,o){var s=e+i
@@ -6,7 +6,7 @@
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 2.16.2
9
+ * @version 2.16.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -19677,6 +19677,9 @@ enifed('ember-glimmer/renderer', ['exports', 'ember-babel', 'ember-glimmer/utils
19677
19677
  } finally {
19678
19678
  if (!completedWithoutError) {
19679
19679
  this._lastRevision = _reference.CURRENT_TAG.value();
19680
+ if (this._env.inTransaction === true) {
19681
+ this._env.commit();
19682
+ }
19680
19683
  }
19681
19684
  this._isRenderingRoots = false;
19682
19685
  }
@@ -44548,7 +44551,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
44548
44551
  enifed("ember/version", ["exports"], function (exports) {
44549
44552
  "use strict";
44550
44553
 
44551
- exports.default = "2.16.2";
44554
+ exports.default = "2.16.3";
44552
44555
  });
44553
44556
  enifed('node-module', ['exports'], function(_exports) {
44554
44557
  var IS_NODE = typeof module === 'object' && typeof module.require === 'function';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.2
4
+ version: 2.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-01 00:00:00.000000000 Z
11
+ date: 2018-02-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ember.js source code wrapper for use with Ruby libs.
14
14
  email:
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project:
51
- rubygems_version: 2.6.14
51
+ rubygems_version: 2.7.5
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: Ember.js source code wrapper.