diff --git a/biome.jsonc b/biome.jsonc index 752ffa773..a4ef098a3 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.13/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.14/schema.json", "root": true, "formatter": { "enabled": true, diff --git a/package.json b/package.json index e218a6fd9..746667871 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "postinstall": "husky" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "husky": "^9.1.7", "lint-staged": "^16.2.7", "turbo": "^2.8.4", diff --git a/packages/bot/package.json b/packages/bot/package.json index ecf473b6d..9e6af3648 100644 --- a/packages/bot/package.json +++ b/packages/bot/package.json @@ -31,7 +31,7 @@ "@discordeno/utils": "workspace:^" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@swc/cli": "^0.8.0", "@swc/core": "^1.15.11", "@types/chai": "^5.2.3", diff --git a/packages/bot/src/desiredProperties.ts b/packages/bot/src/desiredProperties.ts index 68e7979d9..eb1b7904a 100644 --- a/packages/bot/src/desiredProperties.ts +++ b/packages/bot/src/desiredProperties.ts @@ -964,13 +964,14 @@ export enum DesiredPropertiesBehavior { } /** @private This is subject to breaking changes without notices */ -export type RemoveKeyIfUndesired = IsKeyDesired< - Key, - TransformersDesiredPropertiesMetadata[KeyByValue]['dependencies'], - TProps[KeyByValue] -> extends true - ? Key - : never; +export type RemoveKeyIfUndesired = + IsKeyDesired< + Key, + TransformersDesiredPropertiesMetadata[KeyByValue]['dependencies'], + TProps[KeyByValue] + > extends true + ? Key + : never; /** @private This is subject to breaking changes without notices */ export type GetErrorWhenUndesired< @@ -1003,39 +1004,40 @@ export type IsObject = T extends object ? (T extends Function ? false : true) /** * Transform a generic object properties based on the desired properties and behavior for other transformer objects in the object. */ -export type TransformProperty = T extends Array // is it an array? - ? // Yes, apply the desired props - TransformProperty[] - : // No, is it a collection? - T extends Collection - ? // Yes, check for nested proprieties - Collection> - : // No, is it a Bot? - Equals extends true - ? // Yes, return a bot with the correct set of props & behavior - Bot - : // No, is it a transformed object? - T extends TransformersObjects[keyof TransformersObjects] - ? // Yes, apply the desired props - SetupDesiredProps - : // No, is it an interaction resolved data member? | We need to check this here because the type itself has not way of getting the desired props - Equals> extends true +export type TransformProperty = + T extends Array // is it an array? + ? // Yes, apply the desired props + TransformProperty[] + : // No, is it a collection? + T extends Collection + ? // Yes, check for nested proprieties + Collection> + : // No, is it a Bot? + Equals extends true + ? // Yes, return a bot with the correct set of props & behavior + Bot + : // No, is it a transformed object? + T extends TransformersObjects[keyof TransformersObjects] ? // Yes, apply the desired props - InteractionResolvedDataMember - : // No, is it an interaction resolved data channel? | We need to check this here because the type itself has not way of getting the desired props - Equals> extends true + SetupDesiredProps + : // No, is it an interaction resolved data member? | We need to check this here because the type itself has not way of getting the desired props + Equals> extends true ? // Yes, apply the desired props - InteractionResolvedDataChannel - : // Is it a function? - T extends (...args: infer P) => Promise - ? // Yes, we need to ensure we transform the return type as well - (...args: P) => Promise> - : // Is it an object? - IsObject extends true - ? // Yes, we need to ensure we transform the nested properties as well - { [K in keyof T]: TransformProperty } - : // No, this is a normal value such as string / bigint / number - T; + InteractionResolvedDataMember + : // No, is it an interaction resolved data channel? | We need to check this here because the type itself has not way of getting the desired props + Equals> extends true + ? // Yes, apply the desired props + InteractionResolvedDataChannel + : // Is it a function? + T extends (...args: infer P) => Promise + ? // Yes, we need to ensure we transform the return type as well + (...args: P) => Promise> + : // Is it an object? + IsObject extends true + ? // Yes, we need to ensure we transform the nested properties as well + { [K in keyof T]: TransformProperty } + : // No, this is a normal value such as string / bigint / number + T; /** * Apply desired properties to an object. diff --git a/packages/discordeno/package.json b/packages/discordeno/package.json index 15a895683..5bde28ce6 100644 --- a/packages/discordeno/package.json +++ b/packages/discordeno/package.json @@ -31,7 +31,7 @@ "@discordeno/utils": "workspace:^" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@swc/cli": "^0.8.0", "@swc/core": "^1.15.11", "@types/chai": "^5.2.3", diff --git a/packages/gateway/package.json b/packages/gateway/package.json index 368b33880..a68ee38e1 100644 --- a/packages/gateway/package.json +++ b/packages/gateway/package.json @@ -33,7 +33,7 @@ "fzstd": "^0.1.1" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@swc/cli": "^0.8.0", "@swc/core": "^1.15.11", "@types/chai": "^5.2.3", diff --git a/packages/rest/package.json b/packages/rest/package.json index 42840326a..5bacaed39 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -29,7 +29,7 @@ "@discordeno/utils": "workspace:^" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@swc/cli": "^0.8.0", "@swc/core": "^1.15.11", "@types/chai": "^5.2.3", diff --git a/packages/types/package.json b/packages/types/package.json index 14d9937f5..192ab16e5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -24,7 +24,7 @@ "test:type": "tsc --noEmit" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@swc/cli": "^0.8.0", "@swc/core": "^1.15.11", "@types/mocha": "^10.0.10", diff --git a/packages/utils/package.json b/packages/utils/package.json index beda948ba..f4a5c05e7 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -27,7 +27,7 @@ "@discordeno/types": "workspace:^" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@swc/cli": "^0.8.0", "@swc/core": "^1.15.11", "@types/chai": "^5.2.3", diff --git a/website/package.json b/website/package.json index e2deb7cff..a337eb4d8 100644 --- a/website/package.json +++ b/website/package.json @@ -31,7 +31,7 @@ "react-dom": "^19.2.4" }, "devDependencies": { - "@biomejs/biome": "2.3.13", + "@biomejs/biome": "2.3.14", "@docusaurus/module-type-aliases": "^3.9.2", "@docusaurus/tsconfig": "^3.9.2", "@docusaurus/types": "^3.9.2", diff --git a/website/yarn.lock b/website/yarn.lock index fceb9cbf4..1b328e3a2 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -5361,18 +5361,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/biome@npm:2.3.13" +"@biomejs/biome@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/biome@npm:2.3.14" dependencies: - "@biomejs/cli-darwin-arm64": "npm:2.3.13" - "@biomejs/cli-darwin-x64": "npm:2.3.13" - "@biomejs/cli-linux-arm64": "npm:2.3.13" - "@biomejs/cli-linux-arm64-musl": "npm:2.3.13" - "@biomejs/cli-linux-x64": "npm:2.3.13" - "@biomejs/cli-linux-x64-musl": "npm:2.3.13" - "@biomejs/cli-win32-arm64": "npm:2.3.13" - "@biomejs/cli-win32-x64": "npm:2.3.13" + "@biomejs/cli-darwin-arm64": "npm:2.3.14" + "@biomejs/cli-darwin-x64": "npm:2.3.14" + "@biomejs/cli-linux-arm64": "npm:2.3.14" + "@biomejs/cli-linux-arm64-musl": "npm:2.3.14" + "@biomejs/cli-linux-x64": "npm:2.3.14" + "@biomejs/cli-linux-x64-musl": "npm:2.3.14" + "@biomejs/cli-win32-arm64": "npm:2.3.14" + "@biomejs/cli-win32-x64": "npm:2.3.14" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -5392,62 +5392,62 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10c0/920c44c755ab8efa2114b441baf74b8f5fae8e6ad98a301ce02228f546d20ef6ab7c33b990b0a4acd1ffc8f5985ae839cf1fec59a6f169732a0f86c14308728b + checksum: 10c0/7dc4c0354c59046a24cc23e69465e0d7def81ba85e2039268b828461c5f0978693c68d917e08c554474392314a9b7039fed50487e8fc4b96d039f2f63b1b829a languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-darwin-arm64@npm:2.3.13" +"@biomejs/cli-darwin-arm64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-darwin-arm64@npm:2.3.14" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-darwin-x64@npm:2.3.13" +"@biomejs/cli-darwin-x64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-darwin-x64@npm:2.3.14" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-arm64-musl@npm:2.3.13" +"@biomejs/cli-linux-arm64-musl@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-arm64-musl@npm:2.3.14" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-arm64@npm:2.3.13" +"@biomejs/cli-linux-arm64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-arm64@npm:2.3.14" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-x64-musl@npm:2.3.13" +"@biomejs/cli-linux-x64-musl@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-x64-musl@npm:2.3.14" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-x64@npm:2.3.13" +"@biomejs/cli-linux-x64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-x64@npm:2.3.14" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-win32-arm64@npm:2.3.13" +"@biomejs/cli-win32-arm64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-win32-arm64@npm:2.3.14" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-win32-x64@npm:2.3.13" +"@biomejs/cli-win32-x64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-win32-x64@npm:2.3.14" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -20857,7 +20857,7 @@ __metadata: version: 0.0.0-use.local resolution: "website@workspace:." dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@docusaurus/core": "npm:^3.9.2" "@docusaurus/faster": "npm:^3.9.2" "@docusaurus/module-type-aliases": "npm:^3.9.2" diff --git a/yarn.lock b/yarn.lock index 9d20b0c91..c7a2831a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,18 +12,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/biome@npm:2.3.13" +"@biomejs/biome@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/biome@npm:2.3.14" dependencies: - "@biomejs/cli-darwin-arm64": "npm:2.3.13" - "@biomejs/cli-darwin-x64": "npm:2.3.13" - "@biomejs/cli-linux-arm64": "npm:2.3.13" - "@biomejs/cli-linux-arm64-musl": "npm:2.3.13" - "@biomejs/cli-linux-x64": "npm:2.3.13" - "@biomejs/cli-linux-x64-musl": "npm:2.3.13" - "@biomejs/cli-win32-arm64": "npm:2.3.13" - "@biomejs/cli-win32-x64": "npm:2.3.13" + "@biomejs/cli-darwin-arm64": "npm:2.3.14" + "@biomejs/cli-darwin-x64": "npm:2.3.14" + "@biomejs/cli-linux-arm64": "npm:2.3.14" + "@biomejs/cli-linux-arm64-musl": "npm:2.3.14" + "@biomejs/cli-linux-x64": "npm:2.3.14" + "@biomejs/cli-linux-x64-musl": "npm:2.3.14" + "@biomejs/cli-win32-arm64": "npm:2.3.14" + "@biomejs/cli-win32-x64": "npm:2.3.14" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -43,62 +43,62 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10c0/920c44c755ab8efa2114b441baf74b8f5fae8e6ad98a301ce02228f546d20ef6ab7c33b990b0a4acd1ffc8f5985ae839cf1fec59a6f169732a0f86c14308728b + checksum: 10c0/7dc4c0354c59046a24cc23e69465e0d7def81ba85e2039268b828461c5f0978693c68d917e08c554474392314a9b7039fed50487e8fc4b96d039f2f63b1b829a languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-darwin-arm64@npm:2.3.13" +"@biomejs/cli-darwin-arm64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-darwin-arm64@npm:2.3.14" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-darwin-x64@npm:2.3.13" +"@biomejs/cli-darwin-x64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-darwin-x64@npm:2.3.14" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-arm64-musl@npm:2.3.13" +"@biomejs/cli-linux-arm64-musl@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-arm64-musl@npm:2.3.14" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-arm64@npm:2.3.13" +"@biomejs/cli-linux-arm64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-arm64@npm:2.3.14" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-x64-musl@npm:2.3.13" +"@biomejs/cli-linux-x64-musl@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-x64-musl@npm:2.3.14" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-linux-x64@npm:2.3.13" +"@biomejs/cli-linux-x64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-linux-x64@npm:2.3.14" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-win32-arm64@npm:2.3.13" +"@biomejs/cli-win32-arm64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-win32-arm64@npm:2.3.14" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:2.3.13": - version: 2.3.13 - resolution: "@biomejs/cli-win32-x64@npm:2.3.13" +"@biomejs/cli-win32-x64@npm:2.3.14": + version: 2.3.14 + resolution: "@biomejs/cli-win32-x64@npm:2.3.14" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -116,7 +116,7 @@ __metadata: version: 0.0.0-use.local resolution: "@discordeno/bot@workspace:packages/bot" dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@discordeno/gateway": "workspace:^" "@discordeno/rest": "workspace:^" "@discordeno/types": "workspace:^" @@ -141,7 +141,7 @@ __metadata: version: 0.0.0-use.local resolution: "@discordeno/gateway@workspace:packages/gateway" dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@discordeno/types": "workspace:^" "@discordeno/utils": "workspace:^" "@swc/cli": "npm:^0.8.0" @@ -170,7 +170,7 @@ __metadata: version: 0.0.0-use.local resolution: "@discordeno/rest@workspace:packages/rest" dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@discordeno/types": "workspace:^" "@discordeno/utils": "workspace:^" "@swc/cli": "npm:^0.8.0" @@ -196,7 +196,7 @@ __metadata: version: 0.0.0-use.local resolution: "@discordeno/types@workspace:packages/types" dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@swc/cli": "npm:^0.8.0" "@swc/core": "npm:^1.15.11" "@types/mocha": "npm:^10.0.10" @@ -213,7 +213,7 @@ __metadata: version: 0.0.0-use.local resolution: "@discordeno/utils@workspace:packages/utils" dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@discordeno/types": "workspace:^" "@swc/cli": "npm:^0.8.0" "@swc/core": "npm:^1.15.11" @@ -1442,7 +1442,7 @@ __metadata: version: 0.0.0-use.local resolution: "discordeno-monorepo@workspace:." dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" husky: "npm:^9.1.7" lint-staged: "npm:^16.2.7" turbo: "npm:^2.8.4" @@ -1456,7 +1456,7 @@ __metadata: version: 0.0.0-use.local resolution: "discordeno@workspace:packages/discordeno" dependencies: - "@biomejs/biome": "npm:2.3.13" + "@biomejs/biome": "npm:2.3.14" "@discordeno/bot": "workspace:^" "@discordeno/gateway": "workspace:^" "@discordeno/rest": "workspace:^"