diff --git a/ember-autofocus-modifier/package.json b/ember-autofocus-modifier/package.json index e6558b85..c862c54a 100644 --- a/ember-autofocus-modifier/package.json +++ b/ember-autofocus-modifier/package.json @@ -35,6 +35,7 @@ }, "dependencies": { "@embroider/addon-shim": "^1.8.7", + "ember-lifeline": "^7.0.0", "ember-modifier": "^4.1.0" }, "devDependencies": { diff --git a/ember-autofocus-modifier/src/modifiers/autofocus.ts b/ember-autofocus-modifier/src/modifiers/autofocus.ts index 727cdcdb..7097a7f8 100644 --- a/ember-autofocus-modifier/src/modifiers/autofocus.ts +++ b/ember-autofocus-modifier/src/modifiers/autofocus.ts @@ -1,5 +1,5 @@ import { modifier } from "ember-modifier"; -import { next } from "@ember/runloop"; +import { runTask } from "ember-lifeline"; const focusableElements = [ "BUTTON", @@ -68,7 +68,7 @@ const autofocus = modifier(function autofocus( element.setAttribute("tabindex", "-1"); } - next(function () { + runTask(element, function () { targetElement.focus(); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b734f229..cc2f1d82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,9 +41,12 @@ importers: '@embroider/addon-shim': specifier: ^1.8.7 version: 1.8.7 + ember-lifeline: + specifier: ^7.0.0 + version: 7.0.0 ember-modifier: specifier: ^4.1.0 - version: 4.1.0(ember-source@4.12.2) + version: 4.1.0 ember-source: specifier: 4.12.2 version: 4.12.2(@babel/core@7.23.9)(@glimmer/component@1.1.2)(@glint/template@1.4.0)(webpack@5.94.0) @@ -110,7 +113,7 @@ importers: version: 9.1.0(eslint@8.56.0) eslint-plugin-ember: specifier: ^12.2.0 - version: 12.2.0(@babel/core@7.23.9)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0) + version: 12.2.0(@babel/core@7.23.9)(@typescript-eslint/parser@8.6.0)(eslint@8.56.0) eslint-plugin-node: specifier: ^11.1.0 version: 11.1.0(eslint@8.56.0) @@ -270,7 +273,7 @@ importers: version: 9.1.0(eslint@8.56.0) eslint-plugin-ember: specifier: 12.2.0 - version: 12.2.0(@babel/core@7.23.9)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0) + version: 12.2.0(@babel/core@7.23.9)(@typescript-eslint/parser@8.6.0)(eslint@8.56.0) eslint-plugin-n: specifier: 16.6.2 version: 16.6.2(eslint@8.56.0) @@ -2203,7 +2206,7 @@ packages: dependencies: '@glimmer/component': 1.1.2(@babel/core@7.23.9) '@glint/template': 1.4.0 - ember-modifier: 4.1.0(ember-source@4.12.2) + ember-modifier: 4.1.0 dev: true /@glint/template@1.4.0: @@ -6639,7 +6642,7 @@ packages: engines: {node: '>= 0.10.0'} dev: true - /ember-eslint-parser@0.4.3(@babel/core@7.23.9)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0): + /ember-eslint-parser@0.4.3(@babel/core@7.23.9)(@typescript-eslint/parser@8.6.0)(eslint@8.56.0): resolution: {integrity: sha512-wMPoaaA+i/F/tPPxURRON9XXJH5MRUOZ5x/9CVJTSpL+0n4EWphyztb20gR+ZJeShnOACQpAdFy6YSS1/JSHKw==} engines: {node: '>=16.0.0'} peerDependencies: @@ -6652,7 +6655,7 @@ packages: '@babel/core': 7.23.9 '@babel/eslint-parser': 7.23.10(@babel/core@7.23.9)(eslint@8.56.0) '@glimmer/syntax': 0.92.3 - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.6.0(eslint@8.56.0)(typescript@5.6.2) content-tag: 1.2.2 eslint-scope: 7.2.2 html-tags: 3.3.1 @@ -6683,6 +6686,20 @@ packages: - supports-color dev: true + /ember-lifeline@7.0.0: + resolution: {integrity: sha512-2l51NzgH5vjN972zgbs+32rnXnnEFKB7qsSpJF+lBI4V5TG6DMy4SfowC72ZEuAtS58OVfwITbOO+RnM21EdpA==} + engines: {node: 16.* || >= 18} + peerDependencies: + '@ember/test-helpers': '>= 1.0.0' + peerDependenciesMeta: + '@ember/test-helpers': + optional: true + dependencies: + '@embroider/addon-shim': 1.8.7 + transitivePeerDependencies: + - supports-color + dev: false + /ember-load-initializers@2.1.2(@babel/core@7.23.9): resolution: {integrity: sha512-CYR+U/wRxLbrfYN3dh+0Tb6mFaxJKfdyz+wNql6cqTrA0BBi9k6J3AaKXj273TqvEpyyXegQFFkZEiuZdYtgJw==} engines: {node: 6.* || 8.* || >= 10.*} @@ -6706,7 +6723,7 @@ packages: - supports-color dev: true - /ember-modifier@4.1.0(ember-source@4.12.2): + /ember-modifier@4.1.0: resolution: {integrity: sha512-YFCNpEYj6jdyy3EjslRb2ehNiDvaOrXTilR9+ngq+iUqSHYto2zKV0rleiA1XJQ27ELM1q8RihT29U6Lq5EyqQ==} peerDependencies: ember-source: 4.12.2 @@ -6717,7 +6734,6 @@ packages: '@embroider/addon-shim': 1.8.7 ember-cli-normalize-entity-name: 1.0.0 ember-cli-string-utils: 1.1.0 - ember-source: 4.12.2(@babel/core@7.23.9)(@glimmer/component@1.1.2)(@glint/template@1.4.0)(webpack@5.94.0) transitivePeerDependencies: - supports-color @@ -7171,7 +7187,7 @@ packages: resolution: {integrity: sha512-Uk/TVLt6Nf6Xoz7C1iYuZjOSdJxe5aaauGRke8JhKeJwD66Y61/pY2FjtLP04Ooq9PwV34bzrkKkU2UZ5FtDRA==} dev: true - /eslint-plugin-ember@12.2.0(@babel/core@7.23.9)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0): + /eslint-plugin-ember@12.2.0(@babel/core@7.23.9)(@typescript-eslint/parser@8.6.0)(eslint@8.56.0): resolution: {integrity: sha512-Pf0LB70qzrGqbxrieASFDqxvGu7/xgejM78Kj+VsH27XqkuoluF1M5fBU5xxNB7oRCpA5IFA5jdN9WnnSjLzKA==} engines: {node: 18.* || 20.* || >= 21} peerDependencies: @@ -7182,9 +7198,9 @@ packages: optional: true dependencies: '@ember-data/rfc395-data': 0.0.4 - '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.6.0(eslint@8.56.0)(typescript@5.6.2) css-tree: 2.3.1 - ember-eslint-parser: 0.4.3(@babel/core@7.23.9)(@typescript-eslint/parser@6.21.0)(eslint@8.56.0) + ember-eslint-parser: 0.4.3(@babel/core@7.23.9)(@typescript-eslint/parser@8.6.0)(eslint@8.56.0) ember-rfc176-data: 0.3.18 eslint: 8.56.0 eslint-utils: 3.0.0(eslint@8.56.0) diff --git a/test-app/config/ember-try.js b/test-app/config/ember-try.js index 783e93fd..9b76a12a 100644 --- a/test-app/config/ember-try.js +++ b/test-app/config/ember-try.js @@ -101,18 +101,18 @@ module.exports = async function () { embroiderSafe({ npm: { devDependencies: { - '@embroider/compat': '^3.2.1', - '@embroider/core': '^3.2.1', - '@embroider/webpack': '^3.1.5', + '@embroider/compat': '^3.3.0', + '@embroider/core': '^3.4.0', + '@embroider/webpack': '^3.2.1', }, }, }), embroiderOptimized({ npm: { devDependencies: { - '@embroider/compat': '^3.2.1', - '@embroider/core': '^3.2.1', - '@embroider/webpack': '^3.1.5', + '@embroider/compat': '^3.3.0', + '@embroider/core': '^3.4.0', + '@embroider/webpack': '^3.2.1', }, }, }),