From f4c8c69495d49687ae12796a12e8fcd411e8ebd7 Mon Sep 17 00:00:00 2001 From: Nathaniel Furniss Date: Mon, 16 Aug 2021 23:09:32 -0700 Subject: [PATCH] Remove deprecated Modifier Manager version 3.13 --- .../test/managers/modifier-manager-test.ts | 76 ------------------- .../@glimmer/manager/lib/public/modifier.ts | 6 +- 2 files changed, 3 insertions(+), 79 deletions(-) diff --git a/packages/@glimmer/integration-tests/test/managers/modifier-manager-test.ts b/packages/@glimmer/integration-tests/test/managers/modifier-manager-test.ts index 0808f7b627..6338b46f73 100644 --- a/packages/@glimmer/integration-tests/test/managers/modifier-manager-test.ts +++ b/packages/@glimmer/integration-tests/test/managers/modifier-manager-test.ts @@ -282,81 +282,6 @@ abstract class ModifierManagerTest extends RenderTest { } } -class ModifierManagerTest313 extends ModifierManagerTest { - static suiteName = 'Basic Custom Modifier Manager: 3.13'; - - CustomModifierManager = class CustomModifierManager implements ModifierManager { - capabilities = modifierCapabilities('3.13'); - - constructor(public owner: Owner) {} - - createModifier( - Modifier: { create(owner: Owner, args: Arguments): CustomModifier }, - args: Arguments - ) { - return Modifier.create(this.owner, args); - } - - installModifier(instance: CustomModifier, element: Element, args: Arguments) { - instance.element = element; - instance.args = args; - instance.didInsertElement(); - } - - updateModifier(instance: CustomModifier, args: Arguments) { - instance.args = args; - instance.didUpdate(); - } - - destroyModifier(instance: CustomModifier) { - instance.willDestroyElement(); - } - }; - - @test 'modifers consume all arguments'(assert: Assert) { - let insertCount = 0; - let updateCount = 0; - - let foo = this.defineModifier( - class extends CustomModifier { - didInsertElement() { - insertCount++; - - // consume qux - // eslint-disable-next-line no-unused-expressions - this.args.named.qux; - } - - didUpdate() { - updateCount++; - - // consume qux - // eslint-disable-next-line no-unused-expressions - this.args.named.qux; - } - } - ); - - let Main = defineComponent({ foo }, '

hello world

'); - let args = trackedObj({ bar: 'bar', qux: 'qux' }); - - this.renderComponent(Main, args); - - this.assertHTML(`

hello world

`); - - assert.equal(insertCount, 1); - assert.equal(updateCount, 0); - - args.bar = 'other bar'; - this.rerender(); - assert.equal(updateCount, 1); - - args.qux = 'quuuuxxxxxx'; - this.rerender(); - assert.equal(updateCount, 2); - } -} - class ModifierManagerTest322 extends ModifierManagerTest { static suiteName = 'Basic Custom Modifier Manager: 3.22'; @@ -488,4 +413,3 @@ class ModifierManagerTest322 extends ModifierManagerTest { } jitSuite(ModifierManagerTest322); -jitSuite(ModifierManagerTest313); diff --git a/packages/@glimmer/manager/lib/public/modifier.ts b/packages/@glimmer/manager/lib/public/modifier.ts index 18c35539c7..74a2f76e6c 100644 --- a/packages/@glimmer/manager/lib/public/modifier.ts +++ b/packages/@glimmer/manager/lib/public/modifier.ts @@ -27,17 +27,17 @@ export function modifierCapabilities