ember-source 2.17.0 → 2.17.1

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
2
  SHA256:
3
- metadata.gz: 95e938d86ca0a249b756a1455bc026e00250e745e1e5bbdb08a48f8e2452b87b
4
- data.tar.gz: c9877fca81d912f7eeb3a34eae1639feba4c2e5f4366ed92f3741a16ad789555
3
+ metadata.gz: 907230693bf5fb1d27453e151be31f917b68d9e17e8fd5b3823a82fdeacaa914
4
+ data.tar.gz: ab7d134dee701dc5d2c5ae54aaa925284355615ca0064a628ccffc6afa7bc997
5
5
  SHA512:
6
- metadata.gz: 8b0dd35d73dc5487eda6b3ddf2bfada306126dae671903b5093febf624d65597d919018390f012dd31fa3f3f8a46f1e1a44109d92eb1ff886bc7ac465bb813f5
7
- data.tar.gz: 0f734ca572a886be16a720a9ddc6748522899796a2fe7647704fccdd93f9ff9cbbcb274f879781f06dfcd94d3971f71533839231888c3b4478a57383cc96071b
6
+ metadata.gz: 84274d10a9c9ca88846a8cd4c4b930a83cab4ba95a30be45e8c264acdf428b53f83aac611930121ce0195828045b602530bba8210c9efe664dba9f52dca54fec
7
+ data.tar.gz: a6b4b26402d7f2f2590bdb3405ed23cb8e98a04e88f8277e375ad05def66df7deeaa4f4c3383751da13f7983cacf28407f632ba58826560a7a3442649dc15719
@@ -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.17.0
9
+ * @version 2.17.1
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.17.0
9
+ * @version 2.17.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -16434,6 +16434,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16434
16434
  var options = (0, _emberUtils.assign)({ meta: {} }, _options),
16435
16435
  meta,
16436
16436
  potententialPugins,
16437
+ providedPlugins,
16437
16438
  pluginsToAdd;
16438
16439
 
16439
16440
  // move `moduleName` into `meta` property
@@ -16447,11 +16448,14 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16447
16448
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
16448
16449
  } else {
16449
16450
  potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
16451
+ providedPlugins = options.plugins.ast.map(function (plugin) {
16452
+ return wrapLegacyPluginIfNeeded(plugin);
16453
+ });
16450
16454
  pluginsToAdd = potententialPugins.filter(function (plugin) {
16451
16455
  return options.plugins.ast.indexOf(plugin) === -1;
16452
16456
  });
16453
16457
 
16454
- options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
16458
+ options.plugins.ast = providedPlugins.concat(pluginsToAdd);
16455
16459
  }
16456
16460
 
16457
16461
  return options;
@@ -16461,40 +16465,65 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
16461
16465
  throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16462
16466
  }
16463
16467
 
16464
- var plugin = void 0;
16468
+ for (i = 0; i < USER_PLUGINS.length; i++) {
16469
+ PLUGIN = USER_PLUGINS[i];
16470
+
16471
+ if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
16472
+ return;
16473
+ }
16474
+ }
16475
+
16476
+ var plugin = wrapLegacyPluginIfNeeded(_plugin),
16477
+ i,
16478
+ PLUGIN;
16479
+
16480
+ USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16481
+ };
16482
+ exports.unregisterPlugin = function (type, PluginClass) {
16483
+ if (type !== 'ast') {
16484
+ throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16485
+ }
16486
+
16487
+ USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16488
+ return plugin !== PluginClass && plugin.__raw !== PluginClass;
16489
+ });
16490
+ };
16491
+
16492
+ var USER_PLUGINS = [];
16493
+
16494
+ function wrapLegacyPluginIfNeeded(_plugin) {
16495
+ var plugin = _plugin;
16465
16496
  if (_plugin.prototype && _plugin.prototype.transform) {
16466
16497
  plugin = function (env) {
16498
+ var pluginInstantiated = false;
16499
+
16467
16500
  return {
16468
16501
  name: _plugin.constructor && _plugin.constructor.name,
16469
16502
 
16470
16503
  visitors: {
16471
16504
  Program: function (node) {
16472
- var plugin = new _plugin(env);
16505
+ var _plugin2;
16506
+
16507
+ if (!pluginInstantiated) {
16508
+
16509
+ pluginInstantiated = true;
16510
+ _plugin2 = new _plugin(env);
16511
+
16473
16512
 
16474
- plugin.syntax = env.syntax;
16513
+ _plugin2.syntax = env.syntax;
16475
16514
 
16476
- return plugin.transform(node);
16515
+ return _plugin2.transform(node);
16516
+ }
16477
16517
  }
16478
16518
  }
16479
16519
  };
16480
16520
  };
16481
- } else {
16482
- plugin = _plugin;
16483
- }
16484
16521
 
16485
- USER_PLUGINS = [plugin].concat(USER_PLUGINS);
16486
- };
16487
- exports.removePlugin = function (type, PluginClass) {
16488
- if (type !== 'ast') {
16489
- throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
16522
+ plugin.__raw = _plugin;
16490
16523
  }
16491
16524
 
16492
- USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
16493
- return plugin !== PluginClass;
16494
- });
16495
- };
16496
-
16497
- var USER_PLUGINS = [];
16525
+ return plugin;
16526
+ }
16498
16527
  });
16499
16528
  enifed('ember-template-compiler/system/compile', ['exports', 'require', 'ember-template-compiler/system/precompile'], function (exports, _require2, _precompile) {
16500
16529
  'use strict';
@@ -17320,7 +17349,7 @@ enifed('ember/features', ['exports', 'ember-environment', 'ember-utils'], functi
17320
17349
  enifed("ember/version", ["exports"], function (exports) {
17321
17350
  "use strict";
17322
17351
 
17323
- exports.default = "2.17.0";
17352
+ exports.default = "2.17.1";
17324
17353
  });
17325
17354
  enifed("handlebars", ["exports"], function (exports) {
17326
17355
  "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.17.0
9
+ * @version 2.17.1
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.17.0
9
+ * @version 2.17.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -17626,6 +17626,109 @@ QUnit.test('should pass ESLint', function(assert) {
17626
17626
  assert.ok(true, 'ember-glimmer/tests/integration/components/dynamic-components-test.js should pass ESLint\n\n');
17627
17627
  });
17628
17628
 
17629
+ 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) {
17630
+ 'use strict';
17631
+
17632
+ (0, _testCase.moduleFor)('Errors thrown during render', function (_RenderingTest) {
17633
+ (0, _emberBabel.inherits)(_class, _RenderingTest);
17634
+
17635
+ function _class() {
17636
+ (0, _emberBabel.classCallCheck)(this, _class);
17637
+ return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
17638
+ }
17639
+
17640
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during initial render'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringInitialRender(assert) {
17641
+ var _this2 = this;
17642
+
17643
+ var shouldThrow = true;
17644
+ var FooBarComponent = _helpers.Component.extend({
17645
+ init: function () {
17646
+ this._super.apply(this, arguments);
17647
+ if (shouldThrow) {
17648
+ throw new Error('silly mistake in init!');
17649
+ }
17650
+ }
17651
+ });
17652
+
17653
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
17654
+
17655
+ assert.throws(function () {
17656
+ _this2.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
17657
+ }, /silly mistake in init/);
17658
+
17659
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
17660
+
17661
+ this.assertText('');
17662
+
17663
+ this.runTask(function () {
17664
+ return (0, _emberMetal.set)(_this2.context, 'switch', false);
17665
+ });
17666
+
17667
+ shouldThrow = false;
17668
+
17669
+ this.runTask(function () {
17670
+ return (0, _emberMetal.set)(_this2.context, 'switch', true);
17671
+ });
17672
+
17673
+ this.assertText('hello');
17674
+ };
17675
+
17676
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during rerender'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringRerender(assert) {
17677
+ var _this3 = this;
17678
+
17679
+ var shouldThrow = false;
17680
+ var FooBarComponent = _helpers.Component.extend({
17681
+ init: function () {
17682
+ this._super.apply(this, arguments);
17683
+ if (shouldThrow) {
17684
+ throw new Error('silly mistake in init!');
17685
+ }
17686
+ }
17687
+ });
17688
+
17689
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
17690
+
17691
+ this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
17692
+
17693
+ this.assertText('hello');
17694
+
17695
+ this.runTask(function () {
17696
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
17697
+ });
17698
+
17699
+ shouldThrow = true;
17700
+
17701
+ assert.throws(function () {
17702
+ _this3.runTask(function () {
17703
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
17704
+ });
17705
+ }, /silly mistake in init/);
17706
+
17707
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
17708
+
17709
+ this.assertText('');
17710
+
17711
+ this.runTask(function () {
17712
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
17713
+ });
17714
+ shouldThrow = false;
17715
+
17716
+ this.runTask(function () {
17717
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
17718
+ });
17719
+
17720
+ this.assertText('hello');
17721
+ };
17722
+
17723
+ return _class;
17724
+ }(_testCase.RenderingTest));
17725
+ });
17726
+ QUnit.module('ESLint | ember-glimmer/tests/integration/components/error-handling-test.js');
17727
+ QUnit.test('should pass ESLint', function(assert) {
17728
+ assert.expect(1);
17729
+ assert.ok(true, 'ember-glimmer/tests/integration/components/error-handling-test.js should pass ESLint\n\n');
17730
+ });
17731
+
17629
17732
  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) {
17630
17733
  'use strict';
17631
17734
 
@@ -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.17.0
9
+ * @version 2.17.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -16607,6 +16607,102 @@ enifed('ember-glimmer/tests/integration/components/dynamic-components-test', ['e
16607
16607
  return _class;
16608
16608
  }(_testCase.RenderingTest));
16609
16609
  });
16610
+ 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) {
16611
+ 'use strict';
16612
+
16613
+ (0, _testCase.moduleFor)('Errors thrown during render', function (_RenderingTest) {
16614
+ (0, _emberBabel.inherits)(_class, _RenderingTest);
16615
+
16616
+ function _class() {
16617
+ return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
16618
+ }
16619
+
16620
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during initial render'] = function (assert) {
16621
+ var _this2 = this;
16622
+
16623
+ var shouldThrow = true;
16624
+ var FooBarComponent = _helpers.Component.extend({
16625
+ init: function () {
16626
+ this._super.apply(this, arguments);
16627
+ if (shouldThrow) {
16628
+ throw new Error('silly mistake in init!');
16629
+ }
16630
+ }
16631
+ });
16632
+
16633
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
16634
+
16635
+ assert.throws(function () {
16636
+ _this2.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
16637
+ }, /silly mistake in init/);
16638
+
16639
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
16640
+
16641
+ this.assertText('');
16642
+
16643
+ this.runTask(function () {
16644
+ return (0, _emberMetal.set)(_this2.context, 'switch', false);
16645
+ });
16646
+
16647
+ shouldThrow = false;
16648
+
16649
+ this.runTask(function () {
16650
+ return (0, _emberMetal.set)(_this2.context, 'switch', true);
16651
+ });
16652
+
16653
+ this.assertText('hello');
16654
+ };
16655
+
16656
+ _class.prototype['@test it can recover resets the transaction when an error is thrown during rerender'] = function (assert) {
16657
+ var _this3 = this;
16658
+
16659
+ var shouldThrow = false;
16660
+ var FooBarComponent = _helpers.Component.extend({
16661
+ init: function () {
16662
+ this._super.apply(this, arguments);
16663
+ if (shouldThrow) {
16664
+ throw new Error('silly mistake in init!');
16665
+ }
16666
+ }
16667
+ });
16668
+
16669
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
16670
+
16671
+ this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
16672
+
16673
+ this.assertText('hello');
16674
+
16675
+ this.runTask(function () {
16676
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
16677
+ });
16678
+
16679
+ shouldThrow = true;
16680
+
16681
+ assert.throws(function () {
16682
+ _this3.runTask(function () {
16683
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
16684
+ });
16685
+ }, /silly mistake in init/);
16686
+
16687
+ assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
16688
+
16689
+ this.assertText('');
16690
+
16691
+ this.runTask(function () {
16692
+ return (0, _emberMetal.set)(_this3.context, 'switch', false);
16693
+ });
16694
+ shouldThrow = false;
16695
+
16696
+ this.runTask(function () {
16697
+ return (0, _emberMetal.set)(_this3.context, 'switch', true);
16698
+ });
16699
+
16700
+ this.assertText('hello');
16701
+ };
16702
+
16703
+ return _class;
16704
+ }(_testCase.RenderingTest));
16705
+ });
16610
16706
  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) {
16611
16707
  'use strict';
16612
16708
 
@@ -60493,7 +60589,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
60493
60589
 
60494
60590
  exports.default = compileOptions;
60495
60591
  exports.registerPlugin = registerPlugin;
60496
- exports.removePlugin = removePlugin;
60592
+ exports.unregisterPlugin = unregisterPlugin;
60497
60593
 
60498
60594
 
60499
60595
  var USER_PLUGINS = [];
@@ -60511,51 +60607,73 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
60511
60607
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
60512
60608
  } else {
60513
60609
  var potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
60610
+ var providedPlugins = options.plugins.ast.map(function (plugin) {
60611
+ return wrapLegacyPluginIfNeeded(plugin);
60612
+ });
60514
60613
  var pluginsToAdd = potententialPugins.filter(function (plugin) {
60515
60614
  return options.plugins.ast.indexOf(plugin) === -1;
60516
60615
  });
60517
- options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
60616
+ options.plugins.ast = providedPlugins.concat(pluginsToAdd);
60518
60617
  }
60519
60618
 
60520
60619
  return options;
60521
60620
  }
60522
60621
 
60523
- function registerPlugin(type, _plugin) {
60524
- if (type !== 'ast') {
60525
- throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60526
- }
60527
-
60528
- var plugin = void 0;
60622
+ function wrapLegacyPluginIfNeeded(_plugin) {
60623
+ var plugin = _plugin;
60529
60624
  if (_plugin.prototype && _plugin.prototype.transform) {
60530
60625
  plugin = function (env) {
60626
+ var pluginInstantiated = false;
60627
+
60531
60628
  return {
60532
60629
  name: _plugin.constructor && _plugin.constructor.name,
60533
60630
 
60534
60631
  visitors: {
60535
60632
  Program: function (node) {
60536
- var plugin = new _plugin(env);
60633
+ if (!pluginInstantiated) {
60634
+
60635
+ pluginInstantiated = true;
60636
+ var _plugin2 = new _plugin(env);
60537
60637
 
60538
- plugin.syntax = env.syntax;
60638
+ _plugin2.syntax = env.syntax;
60539
60639
 
60540
- return plugin.transform(node);
60640
+ return _plugin2.transform(node);
60641
+ }
60541
60642
  }
60542
60643
  }
60543
60644
  };
60544
60645
  };
60545
- } else {
60546
- plugin = _plugin;
60646
+
60647
+ plugin.__raw = _plugin;
60547
60648
  }
60548
60649
 
60650
+ return plugin;
60651
+ }
60652
+
60653
+ function registerPlugin(type, _plugin) {
60654
+ if (type !== 'ast') {
60655
+ throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60656
+ }
60657
+
60658
+ for (var i = 0; i < USER_PLUGINS.length; i++) {
60659
+ var PLUGIN = USER_PLUGINS[i];
60660
+ if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
60661
+ return;
60662
+ }
60663
+ }
60664
+
60665
+ var plugin = wrapLegacyPluginIfNeeded(_plugin);
60666
+
60549
60667
  USER_PLUGINS = [plugin].concat(USER_PLUGINS);
60550
60668
  }
60551
60669
 
60552
- function removePlugin(type, PluginClass) {
60670
+ function unregisterPlugin(type, PluginClass) {
60553
60671
  if (type !== 'ast') {
60554
60672
  throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60555
60673
  }
60556
60674
 
60557
60675
  USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
60558
- return plugin !== PluginClass;
60676
+ return plugin !== PluginClass && plugin.__raw !== PluginClass;
60559
60677
  });
60560
60678
  }
60561
60679
  });
@@ -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.17.0
9
+ * @version 2.17.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -20137,6 +20137,9 @@ enifed('ember-glimmer/renderer', ['exports', 'ember-babel', 'ember-glimmer/utils
20137
20137
  } finally {
20138
20138
  if (!completedWithoutError) {
20139
20139
  this._lastRevision = _reference.CURRENT_TAG.value();
20140
+ if (this._env.inTransaction === true) {
20141
+ this._env.commit();
20142
+ }
20140
20143
  }
20141
20144
  this._isRenderingRoots = false;
20142
20145
  }
@@ -43631,7 +43634,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
43631
43634
 
43632
43635
  exports.default = compileOptions;
43633
43636
  exports.registerPlugin = registerPlugin;
43634
- exports.removePlugin = removePlugin;
43637
+ exports.unregisterPlugin = unregisterPlugin;
43635
43638
 
43636
43639
 
43637
43640
  var USER_PLUGINS = [];
@@ -43649,51 +43652,73 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
43649
43652
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
43650
43653
  } else {
43651
43654
  var potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
43655
+ var providedPlugins = options.plugins.ast.map(function (plugin) {
43656
+ return wrapLegacyPluginIfNeeded(plugin);
43657
+ });
43652
43658
  var pluginsToAdd = potententialPugins.filter(function (plugin) {
43653
43659
  return options.plugins.ast.indexOf(plugin) === -1;
43654
43660
  });
43655
- options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
43661
+ options.plugins.ast = providedPlugins.concat(pluginsToAdd);
43656
43662
  }
43657
43663
 
43658
43664
  return options;
43659
43665
  }
43660
43666
 
43661
- function registerPlugin(type, _plugin) {
43662
- if (type !== 'ast') {
43663
- throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43664
- }
43665
-
43666
- var plugin = void 0;
43667
+ function wrapLegacyPluginIfNeeded(_plugin) {
43668
+ var plugin = _plugin;
43667
43669
  if (_plugin.prototype && _plugin.prototype.transform) {
43668
43670
  plugin = function (env) {
43671
+ var pluginInstantiated = false;
43672
+
43669
43673
  return {
43670
43674
  name: _plugin.constructor && _plugin.constructor.name,
43671
43675
 
43672
43676
  visitors: {
43673
43677
  Program: function (node) {
43674
- var plugin = new _plugin(env);
43678
+ if (!pluginInstantiated) {
43679
+
43680
+ pluginInstantiated = true;
43681
+ var _plugin2 = new _plugin(env);
43675
43682
 
43676
- plugin.syntax = env.syntax;
43683
+ _plugin2.syntax = env.syntax;
43677
43684
 
43678
- return plugin.transform(node);
43685
+ return _plugin2.transform(node);
43686
+ }
43679
43687
  }
43680
43688
  }
43681
43689
  };
43682
43690
  };
43683
- } else {
43684
- plugin = _plugin;
43691
+
43692
+ plugin.__raw = _plugin;
43685
43693
  }
43686
43694
 
43695
+ return plugin;
43696
+ }
43697
+
43698
+ function registerPlugin(type, _plugin) {
43699
+ if (type !== 'ast') {
43700
+ throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43701
+ }
43702
+
43703
+ for (var i = 0; i < USER_PLUGINS.length; i++) {
43704
+ var PLUGIN = USER_PLUGINS[i];
43705
+ if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
43706
+ return;
43707
+ }
43708
+ }
43709
+
43710
+ var plugin = wrapLegacyPluginIfNeeded(_plugin);
43711
+
43687
43712
  USER_PLUGINS = [plugin].concat(USER_PLUGINS);
43688
43713
  }
43689
43714
 
43690
- function removePlugin(type, PluginClass) {
43715
+ function unregisterPlugin(type, PluginClass) {
43691
43716
  if (type !== 'ast') {
43692
43717
  throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
43693
43718
  }
43694
43719
 
43695
43720
  USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
43696
- return plugin !== PluginClass;
43721
+ return plugin !== PluginClass && plugin.__raw !== PluginClass;
43697
43722
  });
43698
43723
  }
43699
43724
  });
@@ -48497,7 +48522,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
48497
48522
  enifed("ember/version", ["exports"], function (exports) {
48498
48523
  "use strict";
48499
48524
 
48500
- exports.default = "2.17.0";
48525
+ exports.default = "2.17.1";
48501
48526
  });
48502
48527
  enifed("handlebars", ["exports"], function (exports) {
48503
48528
  "use strict";
@@ -1355,7 +1355,7 @@ this._lastRevision=i.CURRENT_TAG.value(),u.commit()}while(l||a.length>h)
1355
1355
  for(;c.length;)o=c.pop(),s=a.indexOf(o),a.splice(s,1)
1356
1356
  0===this._roots.length&&p(this)},e.prototype._renderRootsTransaction=function(){if(!this._isRenderingRoots){this._isRenderingRoots=!0
1357
1357
  var e=!1
1358
- 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
1358
+ 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
1359
1359
  for(e=0;e<n.length;e++)t=n[e],t.destroy()
1360
1360
  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}()
1361
1361
  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
@@ -2592,7 +2592,7 @@ var b,_=s.computed
2592
2592
  _.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.deleteMeta,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)})
2593
2593
  var w=s["default"].Handlebars=s["default"].Handlebars||{},O=s["default"].HTMLBars=s["default"].HTMLBars||{},E=w.Utils=w.Utils||{}
2594
2594
  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"
2595
- e["default"]="2.17.0"}),e("node-module",["exports"],function(e){var t="object"==typeof module&&"function"==typeof module.require
2595
+ e["default"]="2.17.1"}),e("node-module",["exports"],function(e){var t="object"==typeof module&&"function"==typeof module.require
2596
2596
  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"
2597
2597
  function t(){var e=g(null)
2598
2598
  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.17.0
9
+ * @version 2.17.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -19652,6 +19652,9 @@ enifed('ember-glimmer/renderer', ['exports', 'ember-babel', 'ember-glimmer/utils
19652
19652
  } finally {
19653
19653
  if (!completedWithoutError) {
19654
19654
  this._lastRevision = _reference.CURRENT_TAG.value();
19655
+ if (this._env.inTransaction === true) {
19656
+ this._env.commit();
19657
+ }
19655
19658
  }
19656
19659
  this._isRenderingRoots = false;
19657
19660
  }
@@ -44495,7 +44498,7 @@ enifed('ember/index', ['exports', 'require', 'ember-environment', 'node-module',
44495
44498
  enifed("ember/version", ["exports"], function (exports) {
44496
44499
  "use strict";
44497
44500
 
44498
- exports.default = "2.17.0";
44501
+ exports.default = "2.17.1";
44499
44502
  });
44500
44503
  enifed('node-module', ['exports'], function(_exports) {
44501
44504
  var IS_NODE = typeof module === 'object' && typeof module.require === 'function';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-source",
3
- "version": "2.17.0",
3
+ "version": "2.17.1",
4
4
  "description": "A JavaScript framework for creating ambitious web applications",
5
5
  "keywords": [
6
6
  "ember-addon"
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.17.0
4
+ version: 2.17.1
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-29 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.7.3
51
+ rubygems_version: 2.7.5
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: Ember.js source code wrapper.