From a11e22e80eb94af693258f406d2bc14f56afd448 Mon Sep 17 00:00:00 2001 From: joelamb <42837452+joelamb@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:02:15 +0100 Subject: [PATCH] chore: upgrade ember-modifier to v4.1.0 --- ember-headless-table/package.json | 2 +- ember-headless-table/src/-private/table.ts | 45 ++++++++----------- pnpm-lock.yaml | 50 +++++++++++----------- 3 files changed, 45 insertions(+), 52 deletions(-) diff --git a/ember-headless-table/package.json b/ember-headless-table/package.json index cf82a983..f34dd691 100644 --- a/ember-headless-table/package.json +++ b/ember-headless-table/package.json @@ -94,7 +94,7 @@ "@ember/string": "^3.0.0", "@embroider/addon-shim": "^1.0.0", "@embroider/macros": "1.10.0", - "ember-modifier": "^3.2.7", + "ember-modifier": "^4.1.0", "ember-resources": "^5.4.0", "ember-tracked-storage-polyfill": "^1.0.0", "tracked-built-ins": "^3.1.0" diff --git a/ember-headless-table/src/-private/table.ts b/ember-headless-table/src/-private/table.ts index 28e69fb5..0689228c 100644 --- a/ember-headless-table/src/-private/table.ts +++ b/ember-headless-table/src/-private/table.ts @@ -131,15 +131,12 @@ export class Table extends Resource> { * These are all no-use, no-cost utilities */ modifiers = { - container: modifier( - (element: HTMLElement): Destructor => { - let modifiers = this.plugins.map((plugin) => plugin.containerModifier); - let composed = composeFunctionModifiers([attachContainer, ...modifiers]); + container: modifier((element: HTMLElement): Destructor => { + let modifiers = this.plugins.map((plugin) => plugin.containerModifier); + let composed = composeFunctionModifiers([attachContainer, ...modifiers]); - return composed(element, this); - }, - { eager: false } - ), + return composed(element, this); + }), // resize: ResizeModifier, // TODO: switch to composing real modifiers once "curry" and "compose" @@ -150,25 +147,19 @@ export class Table extends Resource> { // // With curried+composed modifiers, only the plugin's headerModifier // that has tracked changes would run, leaving the other modifiers alone - columnHeader: modifier( - (element: HTMLElement, [column]: [Column]): Destructor => { - let modifiers = this.plugins.map((plugin) => plugin.headerCellModifier); - let composed = composeFunctionModifiers(modifiers); - - return composed(element, { column, table: this }); - }, - { eager: false } - ), - - row: modifier( - (element: HTMLElement, [row]: [Row]): Destructor => { - let modifiers = this.plugins.map((plugin) => plugin.rowModifier); - let composed = composeFunctionModifiers(modifiers); - - return composed(element, { row, table: this }); - }, - { eager: false } - ), + columnHeader: modifier((element: HTMLElement, [column]: [Column]): Destructor => { + let modifiers = this.plugins.map((plugin) => plugin.headerCellModifier); + let composed = composeFunctionModifiers(modifiers); + + return composed(element, { column, table: this }); + }), + + row: modifier((element: HTMLElement, [row]: [Row]): Destructor => { + let modifiers = this.plugins.map((plugin) => plugin.rowModifier); + let composed = composeFunctionModifiers(modifiers); + + return composed(element, { row, table: this }); + }), }; /** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9ae4602..e3ee4219 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,7 +74,7 @@ importers: version: 1.0.1(@babel/core@7.22.5)(ember-source@4.12.0) ember-headless-table: specifier: workspace:* - version: file:ember-headless-table(@babel/core@7.22.5)(@ember/test-helpers@2.9.4)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@4.12.0) + version: file:ember-headless-table(@ember/test-helpers@2.9.4)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@4.12.0) ember-modifier: specifier: ^4.1.0 version: 4.1.0(ember-source@4.12.0) @@ -365,8 +365,8 @@ importers: specifier: 1.10.0 version: 1.10.0 ember-modifier: - specifier: ^3.2.7 - version: 3.2.7(@babel/core@7.21.4) + specifier: ^4.1.0 + version: 4.1.0(ember-source@4.10.0) ember-resources: specifier: ^5.4.0 version: 5.6.4(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-source@4.10.0) @@ -550,7 +550,7 @@ importers: version: 2.1.1(ember-source@3.28.11) ember-headless-table: specifier: workspace:* - version: file:ember-headless-table(@babel/core@7.21.4)(@ember/test-helpers@2.9.3)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@3.28.11) + version: file:ember-headless-table(@ember/test-helpers@2.9.3)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@3.28.11) ember-resources: specifier: ^5.4.0 version: 5.6.4(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-source@3.28.11) @@ -8998,31 +8998,35 @@ packages: - supports-color dev: true - /ember-modifier@3.2.7(@babel/core@7.21.4): - resolution: {integrity: sha512-ezcPQhH8jUfcJQbbHji4/ZG/h0yyj1jRDknfYue/ypQS8fM8LrGcCMo0rjDZLzL1Vd11InjNs3BD7BdxFlzGoA==} - engines: {node: 12.* || >= 14} + /ember-modifier@4.1.0(ember-source@3.28.11): + resolution: {integrity: sha512-YFCNpEYj6jdyy3EjslRb2ehNiDvaOrXTilR9+ngq+iUqSHYto2zKV0rleiA1XJQ27ELM1q8RihT29U6Lq5EyqQ==} + peerDependencies: + ember-source: '*' + peerDependenciesMeta: + ember-source: + optional: true dependencies: - ember-cli-babel: 7.26.11 + '@embroider/addon-shim': 1.8.4 ember-cli-normalize-entity-name: 1.0.0 ember-cli-string-utils: 1.1.0 - ember-cli-typescript: 5.2.1 - ember-compatibility-helpers: 1.2.6(@babel/core@7.21.4) + ember-source: 3.28.11(@babel/core@7.21.4) transitivePeerDependencies: - - '@babel/core' - supports-color dev: false - /ember-modifier@3.2.7(@babel/core@7.22.5): - resolution: {integrity: sha512-ezcPQhH8jUfcJQbbHji4/ZG/h0yyj1jRDknfYue/ypQS8fM8LrGcCMo0rjDZLzL1Vd11InjNs3BD7BdxFlzGoA==} - engines: {node: 12.* || >= 14} + /ember-modifier@4.1.0(ember-source@4.10.0): + resolution: {integrity: sha512-YFCNpEYj6jdyy3EjslRb2ehNiDvaOrXTilR9+ngq+iUqSHYto2zKV0rleiA1XJQ27ELM1q8RihT29U6Lq5EyqQ==} + peerDependencies: + ember-source: '*' + peerDependenciesMeta: + ember-source: + optional: true dependencies: - ember-cli-babel: 7.26.11 + '@embroider/addon-shim': 1.8.4 ember-cli-normalize-entity-name: 1.0.0 ember-cli-string-utils: 1.1.0 - ember-cli-typescript: 5.2.1 - ember-compatibility-helpers: 1.2.6(@babel/core@7.22.5) + ember-source: 4.10.0(@babel/core@7.21.4)(@glimmer/component@1.1.2) transitivePeerDependencies: - - '@babel/core' - supports-color dev: false @@ -17683,7 +17687,7 @@ packages: /zwitch@1.0.5: resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==} - file:ember-headless-table(@babel/core@7.21.4)(@ember/test-helpers@2.9.3)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@3.28.11): + file:ember-headless-table(@ember/test-helpers@2.9.3)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@3.28.11): resolution: {directory: ember-headless-table, type: directory} id: file:ember-headless-table name: ember-headless-table @@ -17710,19 +17714,18 @@ packages: '@glimmer/component': 1.1.2(@babel/core@7.21.4) '@glint/template': 1.0.2 ember-cached-decorator-polyfill: 1.0.1(@babel/core@7.21.4)(ember-source@3.28.11) - ember-modifier: 3.2.7(@babel/core@7.21.4) + ember-modifier: 4.1.0(ember-source@3.28.11) ember-resources: 5.6.4(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-source@3.28.11) ember-source: 3.28.11(@babel/core@7.21.4) ember-tracked-storage-polyfill: 1.0.0 tracked-built-ins: 3.1.1 transitivePeerDependencies: - - '@babel/core' - '@glimmer/tracking' - ember-concurrency - supports-color dev: false - file:ember-headless-table(@babel/core@7.22.5)(@ember/test-helpers@2.9.4)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@4.12.0): + file:ember-headless-table(@ember/test-helpers@2.9.4)(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-cached-decorator-polyfill@1.0.1)(ember-source@4.12.0): resolution: {directory: ember-headless-table, type: directory} id: file:ember-headless-table name: ember-headless-table @@ -17749,13 +17752,12 @@ packages: '@glimmer/component': 1.1.2(@babel/core@7.22.5) '@glint/template': 1.0.2 ember-cached-decorator-polyfill: 1.0.1(@babel/core@7.22.5)(ember-source@4.12.0) - ember-modifier: 3.2.7(@babel/core@7.22.5) + ember-modifier: 4.1.0(ember-source@4.12.0) ember-resources: 5.6.4(@ember/test-waiters@3.0.2)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.0.2)(ember-source@4.12.0) ember-source: 4.12.0(@babel/core@7.22.5)(@glimmer/component@1.1.2)(webpack@5.83.1) ember-tracked-storage-polyfill: 1.0.0 tracked-built-ins: 3.1.1 transitivePeerDependencies: - - '@babel/core' - '@glimmer/tracking' - ember-concurrency - supports-color