Skip to content

Commit

Permalink
use bun patch
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguyMichardiere committed Jul 20, 2024
1 parent dd5d5ff commit 3b253a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ import type { KnipConfig } from "knip";

export default {
ignore: ["src/**/*.test.ts"],
ignoreBinaries: ["sed"],
ignoreDependencies: ["pino-pretty"],
} satisfies KnipConfig;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "presta-sons",
"private": true,
"scripts": {
"postinstall": "sed -i.bak 's/export type Snowflake = string;/export type Snowflake = string \\& import(\"zod\").z.BRAND<\"Snowflake\">;/' node_modules/discord-api-types/globals.d.ts && rm node_modules/discord-api-types/globals.d.ts.bak",
"update-dependencies": "npm-check-updates -u && bun install && bun update",
"postupdate-dependencies": "biome format --write package.json",
"pregenerate-migration": "rm -f src/db/_migration.sql",
Expand Down Expand Up @@ -35,5 +34,8 @@
"npm-check-updates": "16.14.20",
"pino-pretty": "11.2.1",
"typescript": "5.5.3"
},
"patchedDependencies": {
"discord-api-types@0.37.83": "patches/discord-api-types@0.37.83.patch"
}
}
13 changes: 13 additions & 0 deletions patches/discord-api-types@0.37.83.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/globals.d.ts b/globals.d.ts
index bd4145c11a6b431126526127d9df3f4e526e8d56..f4d10dd97ef55a2a2f9257eed8f04610513f3d04 100644
--- a/globals.d.ts
+++ b/globals.d.ts
@@ -1,7 +1,7 @@
/**
* https://discord.com/developers/docs/reference#snowflakes
*/
-export type Snowflake = string;
+export type Snowflake = string & import("zod").BRAND<"Snowflake">;
/**
* https://discord.com/developers/docs/topics/permissions
*

0 comments on commit 3b253a0

Please sign in to comment.