Skip to content

Commit

Permalink
fix(deps): update all non-major dependencies (#2716)
Browse files Browse the repository at this point in the history
* fix(deps): update all non-major dependencies

* fix: resolved type errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Aura Román <kyradiscord@gmail.com>
  • Loading branch information
renovate[bot] and kyranet authored Jan 7, 2025
1 parent dba519b commit 1cba773
Show file tree
Hide file tree
Showing 8 changed files with 480 additions and 497 deletions.
574 changes: 287 additions & 287 deletions .yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-git-hooks.cjs
spec: "https://raw.githubusercontent.com/trufflehq/yarn-plugin-git-hooks/main/bundles/%40yarnpkg/plugin-git-hooks.js"

yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@
"update": "yarn upgrade-interactive"
},
"dependencies": {
"@discordjs/builders": "^1.9.0",
"@discordjs/builders": "^1.10.0",
"@discordjs/collection": "^2.1.1",
"@discordjs/core": "^1.2.0",
"@influxdata/influxdb-client": "^1.35.0",
"@influxdata/influxdb-client-apis": "^1.35.0",
"@prisma/client": "^6.1.0",
"@prisma/client": "^6.2.0",
"@sapphire/async-queue": "^1.5.5",
"@sapphire/bitfield": "^1.2.4",
"@sapphire/decorators": "^6.1.1",
"@sapphire/discord.js-utilities": "7.3.1",
"@sapphire/discord.js-utilities": "7.3.2",
"@sapphire/fetch": "^3.0.5",
"@sapphire/framework": "5.3.1",
"@sapphire/framework": "5.3.2",
"@sapphire/iterator-utilities": "^2.0.1",
"@sapphire/plugin-api": "^8.0.0",
"@sapphire/plugin-editable-commands": "^4.0.3",
"@sapphire/plugin-editable-commands": "^4.0.4",
"@sapphire/plugin-i18next": "^7.1.3",
"@sapphire/plugin-logger": "^4.0.2",
"@sapphire/plugin-subcommands": "^7.0.1",
Expand All @@ -74,7 +74,7 @@
"@sapphire/stopwatch": "^1.5.4",
"@sapphire/time-utilities": "^1.7.14",
"@sapphire/utilities": "^3.18.1",
"@sentry/node": "^8.47.0",
"@sentry/node": "^8.48.0",
"@skyra/ai": "^1.2.0",
"@skyra/char": "^1.0.3",
"@skyra/env-utilities": "^1.3.0",
Expand All @@ -84,8 +84,8 @@
"colorette": "^2.0.20",
"confusables": "^1.1.1",
"diff": "^7.0.0",
"discord-api-types": "0.37.98",
"discord.js": "~14.16.3",
"discord-api-types": "^0.37.115",
"discord.js": "~14.17.2",
"he": "^1.2.0",
"zlib-sync": "^0.1.9"
},
Expand All @@ -99,7 +99,7 @@
"@types/backoff": "^2.5.5",
"@types/diff": "^6.0.0",
"@types/he": "^1.2.3",
"@types/node": "^22.9.0",
"@types/node": "^22.10.5",
"@types/pg": "^8.11.10",
"@types/ws": "^8.5.13",
"@typescript-eslint/eslint-plugin": "^7.18.0",
Expand All @@ -111,15 +111,15 @@
"eslint-plugin-prettier": "^5.2.1",
"lint-staged": "^15.3.0",
"prettier": "^3.4.2",
"prisma": "^6.1.0",
"prisma": "^6.2.0",
"prisma-json-types-generator": "^3.2.2",
"tsc-watch": "^6.2.1",
"typescript": "~5.4.5",
"tsc-watch": "^6.3.0",
"typescript": "~5.7.2",
"vitest": "^2.1.8"
},
"resolutions": {
"ansi-regex": "^5.0.1",
"discord-api-types": "0.37.98",
"discord-api-types": "^0.37.115",
"minimist": "^1.2.8"
},
"engines": {
Expand All @@ -144,7 +144,7 @@
}
},
"prettier": "@sapphire/prettier-config",
"packageManager": "yarn@4.5.3",
"packageManager": "yarn@4.6.0",
"volta": {
"node": "22.12.0"
}
Expand Down
16 changes: 9 additions & 7 deletions src/lib/database/settings/structures/PermissionNodeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export const enum PermissionNodeAction {
Deny
}

type PermissionNodeValueResolvable = Role | GuildMember | User;

export class PermissionNodeManager {
private sorted = new Collection<string, PermissionsManagerNode>();
#cachedRawPermissionRoles: readonly PermissionsNode[] = [];
Expand All @@ -20,7 +22,7 @@ export class PermissionNodeManager {
this.refresh(settings);
}

public settingsPropertyFor(target: Role | GuildMember | User) {
public settingsPropertyFor(target: PermissionNodeValueResolvable) {
return (target instanceof Role ? 'permissionsRoles' : 'permissionsUsers') satisfies keyof ReadonlyGuildData;
}

Expand All @@ -32,7 +34,7 @@ export class PermissionNodeManager {
return this.sorted.has(roleId);
}

public add(target: Role | GuildMember | User, command: string, action: PermissionNodeAction): readonly PermissionsNode[] {
public add(target: PermissionNodeValueResolvable, command: string, action: PermissionNodeAction): readonly PermissionsNode[] {
const nodes = this.#getPermissionNodes(target);

const nodeIndex = nodes.findIndex((n) => n.id === target.id);
Expand Down Expand Up @@ -63,7 +65,7 @@ export class PermissionNodeManager {
return nodes.with(nodeIndex, node);
}

public remove(target: Role | GuildMember | User, command: string, action: PermissionNodeAction): readonly PermissionsNode[] {
public remove(target: PermissionNodeValueResolvable, command: string, action: PermissionNodeAction): readonly PermissionsNode[] {
const nodes = this.#getPermissionNodes(target);

const nodeIndex = nodes.findIndex((n) => n.id === target.id);
Expand All @@ -80,16 +82,16 @@ export class PermissionNodeManager {

const node: PermissionsNode = {
id: target.id,
allow: 'allow' ? previous.allow.toSpliced(commandIndex, 1) : previous.allow,
deny: 'deny' ? previous.deny.toSpliced(commandIndex, 1) : previous.deny
allow: action === PermissionNodeAction.Allow ? previous.allow.toSpliced(commandIndex, 1) : previous.allow,
deny: action === PermissionNodeAction.Deny ? previous.deny.toSpliced(commandIndex, 1) : previous.deny
};

return node.allow.length === 0 && node.deny.length === 0 //
? nodes.toSpliced(nodeIndex, 1)
: nodes.with(nodeIndex, node);
}

public reset(target: Role | GuildMember | User): readonly PermissionsNode[] {
public reset(target: PermissionNodeValueResolvable): readonly PermissionsNode[] {
const nodes = this.#getPermissionNodes(target);

const nodeIndex = nodes.findIndex((n) => n.id === target.id);
Expand Down Expand Up @@ -226,7 +228,7 @@ export class PermissionNodeManager {
}
}

#getPermissionNodes(target: Role | GuildMember | User): readonly PermissionsNode[] {
#getPermissionNodes(target: PermissionNodeValueResolvable): readonly PermissionsNode[] {
return target instanceof Role ? this.#cachedRawPermissionRoles : this.#cachedRawPermissionUsers;
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/lib/structures/data/SortedCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class SortedCollection<K extends number | string | bigint, V> implements
/**
* Returns an iterator that contains all the keys in the collection.
*/
public *keys(): IterableIterator<K> {
public *keys(): MapIterator<K> {
for (const [key] of this.#entries) {
yield key;
}
Expand All @@ -201,7 +201,7 @@ export class SortedCollection<K extends number | string | bigint, V> implements
/**
* Returns an iterator that yields all the values in the collection.
*/
public *values(): IterableIterator<V> {
public *values(): MapIterator<V> {
for (const [, value] of this.#entries) {
yield value;
}
Expand All @@ -210,14 +210,14 @@ export class SortedCollection<K extends number | string | bigint, V> implements
/**
* Returns an iterator that yields all the entries in the collection.
*/
public *entries(): IterableIterator<[K, V]> {
public *entries(): MapIterator<[K, V]> {
yield* this.#entries;
}

/**
* Returns an iterator that yields all the entries in the collection.
*/
public *[Symbol.iterator](): IterableIterator<[K, V]> {
public *[Symbol.iterator](): MapIterator<[K, V]> {
yield* this.#entries;
}

Expand Down
2 changes: 1 addition & 1 deletion src/listeners/guilds/members/rawGuildMemberUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class UserListener extends Listener {
action_type: AuditLogEvent.MemberRoleUpdate
});

const updatedRoleId = this.getChange(auditLogs, data.user!.id);
const updatedRoleId = this.getChange(auditLogs, data.user.id);
if (updatedRoleId === null) return;

let memberRoles = data.roles;
Expand Down
3 changes: 2 additions & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"outDir": "../dist",
"rootDir": ".",
"baseUrl": ".",
"resolvePackageJsonImports": true
"resolvePackageJsonImports": true,
"skipLibCheck": true
},
"include": [".", "./**/*.json"],
"exclude": ["./tsconfig.json"]
Expand Down
Loading

0 comments on commit 1cba773

Please sign in to comment.