ember-source 4.0.0-beta.5 → 4.0.0-beta.9

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 (50) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
  3. package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
  4. package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
  5. package/blueprints/helper-test/index.js +4 -22
  6. package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
  7. package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
  8. package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
  9. package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
  10. package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
  11. package/build-metadata.json +3 -3
  12. package/dist/dependencies/@glimmer/manager.js +19 -98
  13. package/dist/dependencies/@glimmer/opcode-compiler.js +9 -146
  14. package/dist/dependencies/@glimmer/runtime.js +1 -55
  15. package/dist/dependencies/@glimmer/validator.js +19 -51
  16. package/dist/ember-template-compiler.js +377 -695
  17. package/dist/ember-template-compiler.map +1 -1
  18. package/dist/ember-testing.js +1 -1
  19. package/dist/ember-testing.map +1 -1
  20. package/dist/ember.debug.js +3090 -6029
  21. package/dist/ember.debug.map +1 -1
  22. package/dist/header/license.js +1 -1
  23. package/dist/packages/@ember/-internals/container/index.js +1 -1
  24. package/dist/packages/@ember/-internals/environment/index.js +0 -15
  25. package/dist/packages/@ember/-internals/glimmer/index.js +4816 -6761
  26. package/dist/packages/@ember/-internals/metal/index.js +4 -14
  27. package/dist/packages/@ember/-internals/routing/lib/services/routing.js +1 -1
  28. package/dist/packages/@ember/-internals/routing/lib/system/route.js +1 -41
  29. package/dist/packages/@ember/-internals/routing/lib/system/router.js +13 -47
  30. package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -43
  31. package/dist/packages/@ember/-internals/utils/index.js +0 -3
  32. package/dist/packages/@ember/-internals/views/index.js +0 -1
  33. package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
  34. package/dist/packages/@ember/application/lib/application.js +7 -8
  35. package/dist/packages/@ember/canary-features/index.js +0 -2
  36. package/dist/packages/@ember/component/index.js +1 -1
  37. package/dist/packages/@ember/deprecated-features/index.js +0 -1
  38. package/dist/packages/@ember/engine/index.js +1 -2
  39. package/dist/packages/@ember/routing/index.js +1 -1
  40. package/dist/packages/ember/index.js +9 -61
  41. package/dist/packages/ember/version.js +1 -1
  42. package/docs/data.json +317 -1111
  43. package/lib/index.js +11 -48
  44. package/package.json +16 -17
  45. package/dist/packages/@ember/-internals/views/lib/mixins/text_support.js +0 -345
  46. package/dist/packages/@ember/component/checkbox.js +0 -17
  47. package/dist/packages/@ember/component/text-area.js +0 -17
  48. package/dist/packages/@ember/component/text-field.js +0 -17
  49. package/dist/packages/@ember/routing/link-component.js +0 -17
  50. 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.9 (November 20, 2021)
4
+
5
+ - [#19749](https://github.com/emberjs/ember.js/pull/19749) [CLEANUP] Remove `deprecate-router-events` support code
6
+ - [#19762](https://github.com/emberjs/ember.js/pull/19762) [CLEANUP] Update GlimmerVM to 0.81
7
+ - removes deprecation of mutations during helper compute
8
+ - removes deprecation of mutations during unknownProperty
9
+ - `@glimmer/integration-tests`, `@glimmer/manager`, `@glimmer/validator`
10
+ * [#1330](https://github.com/glimmerjs/glimmer-vm/pull/1330) Remove deprecated support for mutation after consumption during certain manager hooks ([@snewcomer](https://github.com/snewcomer))
11
+ - `@glimmer/manager`
12
+ * [#1328](https://github.com/glimmerjs/glimmer-vm/pull/1328) Remove deprecated Component Manager version 3.4 ([@nlfurniss](https://github.com/nlfurniss))
13
+ - `@glimmer/integration-tests`, `@glimmer/manager`
14
+ * [#1329](https://github.com/glimmerjs/glimmer-vm/pull/1329) Remove deprecated Modifier Manager version 3.13 ([@nlfurniss](https://github.com/nlfurniss))
15
+ - [#19806](https://github.com/emberjs/ember.js/pull/19806) [CLEANUP] Drop export of built-ins, remove legacy components
16
+
17
+ ### v4.0.0-beta.8 (November 5, 2021)
18
+
19
+ - [#19823](https://github.com/emberjs/ember.js/pull/19823) / [#19828](https://github.com/emberjs/ember.js/pull/19828) [BUGFIX] Fix deprecation `until` and link for Component.reopenClass and Component.reopen
20
+ - [#19825](https://github.com/emberjs/ember.js/pull/19825) [BUGFIX] Replace `assert.equal` in blueprints with `assert.strictEqual` to pass eslint-plugin-qunit v7 on generation
21
+ - [#19808](https://github.com/emberjs/ember.js/pull/19808) [CLEANUP] Remove the `--test-type` option from the helper blueprint
22
+ - [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
23
+
24
+ ### v4.0.0-beta.7 (November 1, 2021)
25
+
26
+ - [#19677](https://github.com/emberjs/ember.js/pull/19677) [CLEANUP] Remove jQuery from build
27
+
28
+ ### v4.0.0-beta.6 (October 26, 2021)
29
+
30
+ - [#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)
31
+
3
32
  ### v4.0.0-beta.5 (October 11, 2021)
4
33
 
5
34
  - [#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
@@ -65,7 +94,19 @@
65
94
  - [#19695](https://github.com/emberjs/ember.js/pull/19695) [CLEANUP] Remove {{partial}}
66
95
  - [#19691](https://github.com/emberjs/ember.js/pull/19691) Add build assertion against `{{outlet named}}`
67
96
 
68
- ### v3.28.1 (August 30, 2021)
97
+ ## v3.28.5 (November 3, 2021)
98
+
99
+ - [#19820](https://github.com/emberjs/ember.js/pull/19820) Fix memory leak when looking up non-instantiable objects from the owner
100
+
101
+ ## v3.28.3 (October 22, 2021)
102
+
103
+ - [#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)
104
+
105
+ ## v3.28.2 (October 21, 2021)
106
+
107
+ - [glimmerjs/glimmer-vm#1351](https://github.com/glimmerjs/glimmer-vm/pull/1351) Support lexical scope in loose mode
108
+
109
+ ## v3.28.1 (August 30, 2021)
69
110
 
70
111
  - [#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
71
112
 
@@ -7,6 +7,6 @@ test('visiting /<%= dasherizedModuleName %>', function(assert) {
7
7
  visit('/<%= dasherizedModuleName %>');
8
8
 
9
9
  andThen(function() {
10
- assert.equal(currentURL(), '/<%= dasherizedModuleName %>');
10
+ assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>');
11
11
  });
12
12
  });
@@ -8,6 +8,6 @@ module('<%= friendlyTestName %>', function(hooks) {
8
8
  test('visiting /<%= dasherizedModuleName %>', async function(assert) {
9
9
  await visit('/<%= dasherizedModuleName %>');
10
10
 
11
- assert.equal(currentURL(), '/<%= dasherizedModuleName %>');
11
+ assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>');
12
12
  });
13
13
  });
@@ -13,7 +13,7 @@ test('it renders', function(assert) {
13
13
 
14
14
  this.render(hbs`<%= selfCloseComponent(componentName) %>`);
15
15
 
16
- assert.equal(this.$().text().trim(), '');
16
+ assert.strictEqual(this.$().text().trim(), '');
17
17
 
18
18
  // Template block usage:
19
19
  this.render(hbs`
@@ -22,10 +22,10 @@ test('it renders', function(assert) {
22
22
  <%= closeComponent(componentName) %>
23
23
  `);
24
24
 
25
- assert.equal(this.$().text().trim(), 'template block text');<% } else if(testType === 'unit') { %>
25
+ assert.strictEqual(this.$().text().trim(), 'template block text');<% } else if(testType === 'unit') { %>
26
26
  // Creates the component instance
27
27
  /*let component =*/ this.subject();
28
28
  // Renders the component to the page
29
29
  this.render();
30
- assert.equal(this.$().text().trim(), '');<% } %>
30
+ assert.strictEqual(this.$().text().trim(), '');<% } %>
31
31
  });
@@ -7,29 +7,15 @@ const semver = require('semver');
7
7
  const useTestFrameworkDetector = require('../test-framework-detector');
8
8
 
9
9
  module.exports = useTestFrameworkDetector({
10
- description: 'Generates a helper integration test or a unit test.',
11
-
12
- availableOptions: [
13
- {
14
- name: 'test-type',
15
- type: ['integration', 'unit'],
16
- default: 'integration',
17
- aliases: [
18
- { i: 'integration' },
19
- { u: 'unit' },
20
- { integration: 'integration' },
21
- { unit: 'unit' },
22
- ],
23
- },
24
- ],
10
+ description: 'Generates a helper integration test.',
25
11
 
26
12
  fileMapTokens: function () {
27
13
  return {
28
14
  __root__() {
29
15
  return 'tests';
30
16
  },
31
- __testType__(options) {
32
- return options.locals.testType || 'integration';
17
+ __testType__() {
18
+ return 'integration';
33
19
  },
34
20
  __collection__() {
35
21
  return 'helpers';
@@ -38,9 +24,7 @@ module.exports = useTestFrameworkDetector({
38
24
  },
39
25
 
40
26
  locals: function (options) {
41
- let testType = options.testType || 'integration';
42
- let testName = testType === 'integration' ? 'Integration' : 'Unit';
43
- let friendlyTestName = [testName, 'Helper', options.entity.name].join(' | ');
27
+ let friendlyTestName = ['Integration', 'Helper', options.entity.name].join(' | ');
44
28
  let dasherizedModulePrefix = stringUtils.dasherize(options.project.config().modulePrefix);
45
29
 
46
30
  let hbsImportStatement = this._useNamedHbsImport()
@@ -48,7 +32,6 @@ module.exports = useTestFrameworkDetector({
48
32
  : "import hbs from 'htmlbars-inline-precompile';";
49
33
 
50
34
  return {
51
- testType,
52
35
  friendlyTestName,
53
36
  dasherizedModulePrefix,
54
37
  hbsImportStatement,
@@ -68,7 +51,6 @@ module.exports = useTestFrameworkDetector({
68
51
  afterInstall: function (options) {
69
52
  if (
70
53
  !options.dryRun &&
71
- options.testType === 'integration' &&
72
54
  !this._useNamedHbsImport() &&
73
55
  isPackageMissing(this, 'ember-cli-htmlbars-inline-precompile')
74
56
  ) {
@@ -1,5 +1,5 @@
1
1
  import { expect } from 'chai';
2
- <% if (testType == 'integration') { %>import { describe, it } from 'mocha';
2
+ import { describe, it } from 'mocha';
3
3
  import { setupComponentTest } from 'ember-mocha';
4
4
  import hbs from 'htmlbars-inline-precompile';
5
5
 
@@ -24,15 +24,3 @@ describe('<%= friendlyTestName %>', function() {
24
24
  expect(this.$().text().trim()).to.equal('1234');
25
25
  });
26
26
  });
27
- <% } else if (testType == 'unit') { %>import { describe, it } from 'mocha';
28
- import { <%= camelizedModuleName %> } from '<%= dasherizedPackageName %>/helpers/<%= dasherizedModuleName %>';
29
-
30
- describe('<%= friendlyTestName %>', function() {
31
-
32
- // TODO: Replace this with your real tests.
33
- it('works', function() {
34
- let result = <%= camelizedModuleName %>(42);
35
- expect(result).to.be.ok;
36
- });
37
- });
38
- <% } %>
@@ -1,5 +1,4 @@
1
1
  import { expect } from 'chai';
2
- <% if (testType == 'integration') { %>
3
2
  import { describeComponent, it } from 'ember-mocha';
4
3
  import hbs from 'htmlbars-inline-precompile';
5
4
 
@@ -25,15 +24,3 @@ describeComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleNam
25
24
  });
26
25
  }
27
26
  );
28
- <% } else if (testType == 'unit') { %>import { describe, it } from 'mocha';
29
- import { <%= camelizedModuleName %> } from '<%= dasherizedPackageName %>/helpers/<%= dasherizedModuleName %>';
30
-
31
- describe('<%= friendlyTestName %>', function() {
32
-
33
- // TODO: Replace this with your real tests.
34
- it('works', function() {
35
- let result = <%= camelizedModuleName %>(42);
36
- expect(result).to.be.ok;
37
- });
38
- });
39
- <% } %>
@@ -1,5 +1,5 @@
1
1
  import { expect } from 'chai';
2
- <% if (testType == 'integration') { %>import { describe, it } from 'mocha';
2
+ import { describe, it } from 'mocha';
3
3
  import { setupRenderingTest } from 'ember-mocha';
4
4
  import { render } from '@ember/test-helpers';
5
5
  <%= hbsImportStatement %>
@@ -15,14 +15,4 @@ describe('<%= friendlyTestName %>', function() {
15
15
 
16
16
  expect(this.element.textContent.trim()).to.equal('1234');
17
17
  });
18
- });<% } else if (testType == 'unit') { %>import { describe, it } from 'mocha';
19
- import { <%= camelizedModuleName %> } from '<%= dasherizedPackageName %>/helpers/<%= dasherizedModuleName %>';
20
-
21
- describe('<%= friendlyTestName %>', function() {
22
-
23
- // TODO: Replace this with your real tests.
24
- it('works', function() {
25
- let result = <%= camelizedModuleName %>(42);
26
- expect(result).to.be.ok;
27
- });
28
- });<% } %>
18
+ });
@@ -1,4 +1,4 @@
1
- <% if (testType == 'integration') { %>import { moduleForComponent, test } from 'ember-qunit';
1
+ import { moduleForComponent, test } from 'ember-qunit';
2
2
  import hbs from 'htmlbars-inline-precompile';
3
3
 
4
4
  moduleForComponent('<%= dasherizedModuleName %>', 'helper:<%= dasherizedModuleName %>', {
@@ -11,16 +11,5 @@ test('it renders', function(assert) {
11
11
 
12
12
  this.render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);
13
13
 
14
- assert.equal(this.$().text().trim(), '1234');
15
- });<% } else if (testType == 'unit') { %>
16
- import { <%= camelizedModuleName %> } from '<%= dasherizedModulePrefix %>/helpers/<%= dasherizedModuleName %>';
17
- import { module, test } from 'qunit';
18
-
19
- module('<%= friendlyTestName %>');
20
-
21
- // TODO: Replace this with your real tests.
22
- test('it works', function(assert) {
23
- let result = <%= camelizedModuleName %>([42]);
24
- assert.ok(result);
14
+ assert.strictEqual(this.$().text().trim(), '1234');
25
15
  });
26
- <% } %>
@@ -1,4 +1,4 @@
1
- <% if (testType === 'integration') { %>import { module, test } from 'qunit';
1
+ import { module, test } from 'qunit';
2
2
  import { setupRenderingTest } from 'ember-qunit';
3
3
  import { render } from '@ember/test-helpers';
4
4
  <%= hbsImportStatement %>
@@ -14,16 +14,4 @@ module('<%= friendlyTestName %>', function(hooks) {
14
14
 
15
15
  assert.dom(this.element).hasText('1234');
16
16
  });
17
- });<% } else if (testType === 'unit') { %>import { <%= camelizedModuleName %> } from '<%= dasherizedModulePrefix %>/helpers/<%= dasherizedModuleName %>';
18
- import { module, test } from 'qunit';
19
- import { setupTest } from 'ember-qunit';
20
-
21
- module('<%= friendlyTestName %>', function(hooks) {
22
- setupTest(hooks);
23
-
24
- // TODO: Replace this with your real tests.
25
- test('it works', function(assert) {
26
- let result = <%= camelizedModuleName %>([42]);
27
- assert.ok(result);
28
- });
29
- });<% } %>
17
+ });
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.0.0-beta.5",
2
+ "version": "4.0.0-beta.9",
3
3
  "buildType": "tag",
4
- "SHA": "1b443eccb4d119b2a5151f67ffa7a052a23991f4",
5
- "assetPath": "/tag/shas/1b443eccb4d119b2a5151f67ffa7a052a23991f4.tgz"
4
+ "SHA": "c4be3a86a7c03860bde7f4928ff6fc54a3216e24",
5
+ "assetPath": "/tag/shas/c4be3a86a7c03860bde7f4928ff6fc54a3216e24.tgz"
6
6
  }
@@ -1,9 +1,8 @@
1
1
  import { DEBUG } from '@glimmer/env';
2
- import { debugToString, _WeakSet, HAS_NATIVE_PROXY, assign, dict } from '@glimmer/util';
2
+ import { debugToString, _WeakSet, HAS_NATIVE_PROXY } from '@glimmer/util';
3
3
  import { valueForRef, createConstRef, createComputeRef, UNDEFINED_REFERENCE } from '@glimmer/reference';
4
- import { track, deprecateMutationsInTrackingTransaction, createUpdatableTag, untrack } from '@glimmer/validator';
4
+ import { track, createUpdatableTag, untrack } from '@glimmer/validator';
5
5
  import { registerDestructor, associateDestroyableChild } from '@glimmer/destroyable';
6
- import { setOwner } from '@glimmer/owner';
7
6
 
8
7
  const COMPONENT_MANAGERS = new WeakMap();
9
8
  const MODIFIER_MANAGERS = new WeakMap();
@@ -382,16 +381,11 @@ const CAPABILITIES = {
382
381
  hasSubOwner: false
383
382
  };
384
383
  function componentCapabilities(managerAPI, options = {}) {
385
- if (DEBUG && managerAPI !== '3.4' && managerAPI !== '3.13') {
384
+ if (DEBUG && managerAPI !== '3.13') {
386
385
  throw new Error('Invalid component manager compatibility specified');
387
386
  }
388
387
 
389
- let updateHook = true;
390
-
391
- if (managerAPI === '3.13') {
392
- updateHook = Boolean(options.updateHook);
393
- }
394
-
388
+ let updateHook = Boolean(options.updateHook);
395
389
  return buildCapabilities({
396
390
  asyncLifeCycleCallbacks: Boolean(options.asyncLifecycleCallbacks),
397
391
  destructor: Boolean(options.destructor),
@@ -456,7 +450,7 @@ class CustomComponentManager {
456
450
 
457
451
  if (DEBUG && !FROM_CAPABILITIES.has(delegate.capabilities)) {
458
452
  // TODO: This error message should make sense in both Ember and Glimmer https://github.com/glimmerjs/glimmer-vm/issues/1200
459
- throw new Error(`Custom component managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.4' | '3.13')\` (imported via \`import { capabilities } from '@ember/component';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
453
+ throw new Error(`Custom component managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.13')\` (imported via \`import { capabilities } from '@ember/component';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
460
454
  }
461
455
 
462
456
  componentManagerDelegates.set(owner, delegate);
@@ -468,16 +462,7 @@ class CustomComponentManager {
468
462
  create(owner, definition, vmArgs) {
469
463
  let delegate = this.getDelegateFor(owner);
470
464
  let args = argsProxyFor(vmArgs.capture(), 'component');
471
- let component;
472
-
473
- if (DEBUG && deprecateMutationsInTrackingTransaction !== undefined) {
474
- deprecateMutationsInTrackingTransaction(() => {
475
- component = delegate.createComponent(definition, args);
476
- });
477
- } else {
478
- component = delegate.createComponent(definition, args);
479
- }
480
-
465
+ let component = delegate.createComponent(definition, args);
481
466
  return new CustomComponentState(component, delegate, args);
482
467
  }
483
468
 
@@ -563,16 +548,12 @@ class CustomComponentState {
563
548
  }
564
549
 
565
550
  function modifierCapabilities(managerAPI, optionalFeatures = {}) {
566
- if (DEBUG && managerAPI !== '3.13' && managerAPI !== '3.22') {
551
+ if (DEBUG && managerAPI !== '3.22') {
567
552
  throw new Error('Invalid modifier manager compatibility specified');
568
553
  }
569
554
 
570
555
  return buildCapabilities({
571
- disableAutoTracking: Boolean(optionalFeatures.disableAutoTracking),
572
- useArgsProxy: managerAPI === '3.13' ? false : true,
573
- // This capability is used in Ember, exclusively in resolution mode. See the
574
- // Ember glimmer resolver for details.
575
- passFactoryToCreate: managerAPI === '3.13'
556
+ disableAutoTracking: Boolean(optionalFeatures.disableAutoTracking)
576
557
  });
577
558
  }
578
559
  /**
@@ -620,7 +601,7 @@ class CustomModifierManager {
620
601
 
621
602
  if (DEBUG && !FROM_CAPABILITIES.has(delegate.capabilities)) {
622
603
  // TODO: This error message should make sense in both Ember and Glimmer https://github.com/glimmerjs/glimmer-vm/issues/1200
623
- throw new Error(`Custom modifier managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.13' | '3.22')\` (imported via \`import { capabilities } from '@ember/modifier';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
604
+ throw new Error(`Custom modifier managers must have a \`capabilities\` property that is the result of calling the \`capabilities('3.22')\` (imported via \`import { capabilities } from '@ember/modifier';\`). Received: \`${JSON.stringify(delegate.capabilities)}\` for: \`${delegate}\``);
624
605
  }
625
606
 
626
607
  componentManagerDelegates.set(owner, delegate);
@@ -631,67 +612,23 @@ class CustomModifierManager {
631
612
 
632
613
  create(owner, element, definition, capturedArgs) {
633
614
  let delegate = this.getDelegateFor(owner);
634
- let {
635
- useArgsProxy,
636
- passFactoryToCreate
637
- } = delegate.capabilities;
638
- let argsProxy = argsProxyFor(capturedArgs, 'modifier');
639
- let args = useArgsProxy ? argsProxy : reifyArgs(capturedArgs);
640
- let instance;
641
- let factoryOrDefinition = definition;
642
-
643
- if (passFactoryToCreate) {
644
- // Make a fake factory. While not perfect, this should generally prevent
645
- // breakage in users of older modifier capabilities.
646
- factoryOrDefinition = {
647
- create(args) {
648
- let params = assign({}, args);
649
- setOwner(params, owner);
650
- return definition.create(args);
651
- },
652
-
653
- class: definition
654
- };
655
- }
656
-
657
- if (DEBUG && deprecateMutationsInTrackingTransaction !== undefined) {
658
- deprecateMutationsInTrackingTransaction(() => {
659
- instance = delegate.createModifier(factoryOrDefinition, args);
660
- });
661
- } else {
662
- instance = delegate.createModifier(factoryOrDefinition, args);
663
- }
664
-
615
+ let args = argsProxyFor(capturedArgs, 'modifier');
616
+ let instance = delegate.createModifier(definition, args);
665
617
  let tag = createUpdatableTag();
666
618
  let state;
667
-
668
- if (useArgsProxy) {
669
- state = {
670
- tag,
671
- element,
672
- delegate,
673
- args,
674
- modifier: instance
675
- };
676
- } else {
677
- state = {
678
- tag,
679
- element,
680
- modifier: instance,
681
- delegate,
682
-
683
- get args() {
684
- return reifyArgs(capturedArgs);
685
- }
686
-
687
- };
688
- }
619
+ state = {
620
+ tag,
621
+ element,
622
+ delegate,
623
+ args,
624
+ modifier: instance
625
+ };
689
626
 
690
627
  if (DEBUG) {
691
628
  state.debugName = typeof definition === 'function' ? definition.name : definition.toString();
692
629
  }
693
630
 
694
- registerDestructor(state, () => delegate.destroyModifier(instance, argsProxy));
631
+ registerDestructor(state, () => delegate.destroyModifier(instance, args));
695
632
  return state;
696
633
  }
697
634
 
@@ -745,22 +682,6 @@ class CustomModifierManager {
745
682
  }
746
683
 
747
684
  }
748
- function reifyArgs({
749
- named,
750
- positional
751
- }) {
752
- let reifiedNamed = dict();
753
-
754
- for (let key in named) {
755
- reifiedNamed[key] = valueForRef(named[key]);
756
- }
757
-
758
- let reifiedPositional = positional.map(valueForRef);
759
- return {
760
- named: reifiedNamed,
761
- positional: reifiedPositional
762
- };
763
- }
764
685
 
765
686
  function helperCapabilities(managerAPI, options = {}) {
766
687
  if (DEBUG && managerAPI !== '3.23') {