Skip to content

Commit

Permalink
Update dependencies (#936)
Browse files Browse the repository at this point in the history
* Update dependencies

* Update ember-cli to v5.11

* Update ember-cli to v5.11

* Update package lock

* Fix lint
  • Loading branch information
mkszepp authored Aug 27, 2024
1 parent 87525ef commit d816d19
Show file tree
Hide file tree
Showing 11 changed files with 458 additions and 361 deletions.
2 changes: 1 addition & 1 deletion docs/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "5.10.0",
"version": "5.11.0",
"blueprints": [
{
"name": "app",
Expand Down
20 changes: 10 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"@types/ember__utils": "^4.0.7",
"@types/qunit": "^2.19.10",
"@types/rsvp": "^4.0.9",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.2",
"ember-auto-import": "^2.7.4",
"ember-cli": "~5.10.0",
"ember-cli": "~5.11.0",
"ember-cli-app-version": "^7.0.0",
"ember-cli-babel": "^8.2.0",
"ember-cli-clean-css": "^3.0.0",
Expand All @@ -96,31 +96,31 @@
"ember-prism": "^1.0.0",
"ember-qunit": "^8.1.0",
"ember-resolver": "^12.0.1",
"ember-source": "~5.10.0",
"ember-source": "~5.11.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^6.0.0",
"ember-try": "^3.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^12.1.1",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-ember": "^12.2.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-qunit": "^8.1.1",
"eslint-plugin-qunit": "^8.1.2",
"loader.js": "^4.7.0",
"prember": "~2.1.0",
"prember-crawler": "^1.0.0",
"prettier": "^3.3.3",
"prettier-plugin-ember-template-tag": "^2.0.2",
"qunit": "^2.21.1",
"qunit": "^2.22.0",
"qunit-dom": "^3.2.0",
"rsvp": "^4.8.5",
"sass": "^1.77.8",
"stylelint": "^16.8.1",
"stylelint": "^16.8.2",
"stylelint-config-standard": "^36.0.1",
"stylelint-prettier": "^5.0.2",
"tracked-built-ins": "^3.3.0",
"typescript": "^5.5.4",
"webpack": "^5.93.0"
"webpack": "^5.94.0"
},
"engines": {
"node": ">= 18"
Expand Down
18 changes: 9 additions & 9 deletions ember-basic-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/runtime": "^7.25.0",
"@babel/runtime": "^7.25.4",
"@ember/string": "^4.0.0",
"@ember/test-helpers": "^4.0.2",
"@embroider/addon-dev": "^5.0.0",
Expand Down Expand Up @@ -111,27 +111,27 @@
"@types/ember__test": "^4.0.6",
"@types/ember__utils": "^4.0.7",
"@types/ember__destroyable": "^4.0.5",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"babel-plugin-ember-template-compilation": "^2.2.5",
"concurrently": "^8.2.2",
"ember-source": "~5.10.1",
"ember-source": "~5.11.0",
"ember-template-lint": "^6.0.0",
"ember-eslint-parser": "^0.4.2",
"ember-eslint-parser": "^0.5.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^12.1.1",
"eslint-plugin-ember": "^12.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.2.1",
"node-sass": "^9.0.0",
"prettier": "^3.3.3",
"prettier-plugin-ember-template-tag": "^2.0.2",
"rollup": "^4.19.1",
"rollup": "^4.21.1",
"rollup-plugin-styles": "^4.0.0",
"rsvp": "^4.8.5",
"typescript": "^5.5.4",
"webpack": "^5.93.0"
"webpack": "^5.94.0"
},
"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0 || >=5.0.0",
Expand Down
8 changes: 5 additions & 3 deletions ember-basic-dropdown/src/components/basic-dropdown-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ export default class BasicDropdownContent extends Component<BasicDropdownContent

respondToEvents = modifier(
(dropdownElement: Element): (() => void) => {
this.args.dropdown?.actions?.registerDropdownElement &&
if (this.args.dropdown?.actions?.registerDropdownElement) {
this.args.dropdown.actions.registerDropdownElement(
dropdownElement as HTMLElement,
);
}

const selector = `[data-ebd-id=${this.args.dropdown?.uniqueId}-trigger]`;
let triggerElement: HTMLElement | null = null;
Expand Down Expand Up @@ -174,8 +175,9 @@ export default class BasicDropdownContent extends Component<BasicDropdownContent
return;
}

this.args.dropdown?.actions?.close &&
if (this.args.dropdown?.actions?.close) {
this.args.dropdown.actions.close(e, true);
}
};
document.addEventListener(
this.args.rootEventType || 'click',
Expand Down Expand Up @@ -571,7 +573,7 @@ function closestContent(el: Element): Element | null {
return el;
}

// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
function waitForAnimations(element: Element, callback: Function): void {
window.requestAnimationFrame(function () {
const computedStyle = window.getComputedStyle(element);
Expand Down
25 changes: 16 additions & 9 deletions ember-basic-dropdown/src/components/basic-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ interface BasicDropdownArgs {
rootEventType?: TRootEventType;
preventScroll?: boolean;
matchTriggerWidth?: boolean;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
onInit?: Function;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
registerAPI?: Function;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
onOpen?: Function;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
onClose?: Function;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
triggerComponent?: string | ComponentLike<any> | undefined;
Expand Down Expand Up @@ -169,7 +169,9 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {
// eslint-disable-next-line ember/no-side-effects
this.isOpen = false;
}
this.args.registerAPI && this.args.registerAPI(this.publicAPI);
if (this.args.registerAPI) {
this.args.registerAPI(this.publicAPI);
}
});
}
// eslint-disable-next-line ember/no-side-effects
Expand All @@ -192,7 +194,9 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {
if (this.args.onInit) {
this.args.onInit(this.publicAPI);
}
this.args.registerAPI && this.args.registerAPI(this.publicAPI);
if (this.args.registerAPI) {
this.args.registerAPI(this.publicAPI);
}
}

override willDestroy(): void {
Expand All @@ -215,7 +219,9 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {
return;
}
this.isOpen = true;
this.args.registerAPI && this.args.registerAPI(this.publicAPI);
if (this.args.registerAPI) {
this.args.registerAPI(this.publicAPI);
}
const trigger = this._getTriggerElement();
if (trigger) {
const parent = trigger.parentElement;
Expand Down Expand Up @@ -243,7 +249,9 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {
this.top = this.left = this.right = this.width = this.height = undefined;
this.previousVerticalPosition = this.previousHorizontalPosition = undefined;
this.isOpen = false;
this.args.registerAPI && this.args.registerAPI(this.publicAPI);
if (this.args.registerAPI) {
this.args.registerAPI(this.publicAPI);
}
const trigger = this._getTriggerElement();
if (!trigger) {
return;
Expand Down Expand Up @@ -364,7 +372,6 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {
}
for (const prop in positions.style) {
if (!IGNORED_STYLES.includes(prop)) {
changes.otherStyles;
changes.otherStyles[prop] = positions.style[prop];
}
}
Expand Down
3 changes: 2 additions & 1 deletion ember-basic-dropdown/src/modifiers/basic-dropdown-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ export default class DropdownTriggerModifier extends Modifier<Signature> {
setup(element: HTMLElement) {
// Keep a reference to the element for cleanup
this.triggerElement = element;
this.dropdown?.actions?.registerTriggerElement &&
if (this.dropdown?.actions?.registerTriggerElement) {
this.dropdown.actions.registerTriggerElement(element);
}

if (!element.getAttribute('role')) element.setAttribute('role', 'button');

Expand Down
27 changes: 6 additions & 21 deletions ember-basic-dropdown/src/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,13 @@ export interface ReadonlyRegistry {
}

declare module '@glint/environment-ember-loose/registry' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export default interface Registry
extends EmberTruthRegistry /* other addon registries */ {
// local entries
}

export default interface Registry
extends EmbroiderUtilRegistry /* other registries here */ {
// ...
}

export default interface Registry
extends EmberElementHelperRegistry /* other registries here */ {
// ...
}

export default interface Registry
extends StyleHelperRegistry /* other registries here */ {
// ...
}

export default interface Registry
extends ReadonlyRegistry /* other registries here */ {
extends EmberTruthRegistry,
EmbroiderUtilRegistry,
EmberElementHelperRegistry,
StyleHelperRegistry,
ReadonlyRegistry /* other registries here */ {
// ...
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '@glint/environment-ember-template-imports';

declare module '@glint/environment-ember-loose/registry' {
// Remove this once entries have been added! 👇
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export default interface Registry {
// Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates)
// See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons
Expand Down
Loading

0 comments on commit d816d19

Please sign in to comment.