Skip to content

Commit

Permalink
fix: actually fix type bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Mar 23, 2024
1 parent ec01e4b commit 7e7074a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 59 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"bump": "cliff-jumper",
"check-update": "cliff-jumper --dry-run",
"prepack": "yarn build && concurrently \"yarn:prepack:*\"",
"prepack:clean-types": "tsx scripts/cleanup-dts-files.mts",
"prepack:cjs": "rollup-type-bundler -d dist/cjs -ot .cts",
"prepack:esm": "rollup-type-bundler -d dist/esm -t .mts"
},
Expand Down Expand Up @@ -72,7 +71,6 @@
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"tsx": "^4.7.1",
"typedoc": "^0.25.12",
"typedoc-json-parser": "^9.0.1",
"typescript": "^5.4.3",
Expand Down
20 changes: 0 additions & 20 deletions scripts/cleanup-dts-files.mts

This file was deleted.

1 change: 1 addition & 0 deletions src/lib/SapphireClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { container, Store, StoreRegistry } from '@sapphire/pieces';
import type { Awaitable } from '@sapphire/utilities';
import { Client, type ClientOptions, type Message, type Snowflake } from 'discord.js';
import { URL } from 'node:url';
import { loadApplicationCommandRegistriesListeners } from '../optional-listeners/application-command-registries-listeners/_load';
import { loadErrorListeners } from '../optional-listeners/error-listeners/_load';
import { loadMessageCommandListeners } from '../optional-listeners/message-command-listeners/_load';
Expand Down
3 changes: 2 additions & 1 deletion src/lib/structures/CommandStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AliasStore } from '@sapphire/pieces';
import type { Args } from '../parsers/Args';
import { RegisterBehavior } from '../types/Enums';
import {
allGuildIdsToFetchCommandsFor,
Expand Down Expand Up @@ -28,7 +29,7 @@ export class CommandStore extends AliasStore<Command, 'commands'> {
return [...categories] as string[];
}

public override unload(name: string | Command) {
public override unload(name: string | Command): Promise<Command<Args, Command.Options>> {
const piece = this.resolve(name);

// Remove the aliases from the store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import {
type MessageApplicationCommandData,
type UserApplicationCommandData
} from 'discord.js';
import type { Args } from '../../parsers/Args';
import type { Command } from '../../structures/Command';
import type { CommandOptions } from '../../types/CommandTypes';
import { InternalRegistryAPIType, RegisterBehavior } from '../../types/Enums';
import { allGuildIdsToFetchCommandsFor, getDefaultBehaviorWhenNotIdentical, getDefaultGuildIds } from './ApplicationCommandRegistries';
import type { CommandDifference } from './compute-differences/_shared';
Expand Down Expand Up @@ -88,7 +91,7 @@ export class ApplicationCommandRegistry {
this.commandName = commandName;
}

public get command() {
public get command(): Command<Args, CommandOptions> | undefined {
return container.stores.get('commands').get(this.commandName);
}

Expand Down
2 changes: 1 addition & 1 deletion src/preconditions/Cooldown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface CooldownPreconditionContext extends AllFlowsPrecondition.Contex
}

export class CorePrecondition extends AllFlowsPrecondition {
public buckets = new WeakMap<Command, RateLimitManager<string>>();
public buckets: WeakMap<Command, RateLimitManager<string>> = new WeakMap<Command, RateLimitManager<string>>();

public messageRun(message: Message, command: Command, context: CooldownPreconditionContext): AllFlowsPrecondition.Result {
const cooldownId = this.getIdFromMessage(message, context);
Expand Down
35 changes: 1 addition & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,6 @@ __metadata:
lint-staged: "npm:^15.2.2"
prettier: "npm:^3.2.5"
tsup: "npm:^8.0.2"
tsx: "npm:^4.7.1"
typedoc: "npm:^0.25.12"
typedoc-json-parser: "npm:^9.0.1"
typescript: "npm:^5.4.3"
Expand Down Expand Up @@ -2699,7 +2698,7 @@ __metadata:
languageName: node
linkType: hard

"esbuild@npm:^0.19.2, esbuild@npm:~0.19.10":
"esbuild@npm:^0.19.2":
version: 0.19.12
resolution: "esbuild@npm:0.19.12"
dependencies:
Expand Down Expand Up @@ -3387,15 +3386,6 @@ __metadata:
languageName: node
linkType: hard

"get-tsconfig@npm:^4.7.2":
version: 4.7.3
resolution: "get-tsconfig@npm:4.7.3"
dependencies:
resolve-pkg-maps: "npm:^1.0.0"
checksum: 10/7397bb4f8aef936df4d9016555b662dcf5279f3c46428b7c7c1ff5e94ab2b87d018b3dda0f4bc1a28b154d5affd0eac5d014511172c085fd8a9cdff9ea7fe043
languageName: node
linkType: hard

"git-cliff-darwin-arm64@npm:2.1.2":
version: 2.1.2
resolution: "git-cliff-darwin-arm64@npm:2.1.2"
Expand Down Expand Up @@ -5364,13 +5354,6 @@ __metadata:
languageName: node
linkType: hard

"resolve-pkg-maps@npm:^1.0.0":
version: 1.0.0
resolution: "resolve-pkg-maps@npm:1.0.0"
checksum: 10/0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e
languageName: node
linkType: hard

"restore-cursor@npm:^3.1.0":
version: 3.1.0
resolution: "restore-cursor@npm:3.1.0"
Expand Down Expand Up @@ -6120,22 +6103,6 @@ __metadata:
languageName: node
linkType: hard

"tsx@npm:^4.7.1":
version: 4.7.1
resolution: "tsx@npm:4.7.1"
dependencies:
esbuild: "npm:~0.19.10"
fsevents: "npm:~2.3.3"
get-tsconfig: "npm:^4.7.2"
dependenciesMeta:
fsevents:
optional: true
bin:
tsx: dist/cli.mjs
checksum: 10/3a462b595f31ae58b31f9c6e8c450577dc87660b1225012bd972b6b58d7d2f6c4034728763ebc53bb731acff68de8b0fa50586e4c1ec4c086226f1788ccf9b7d
languageName: node
linkType: hard

"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
version: 0.4.0
resolution: "type-check@npm:0.4.0"
Expand Down

0 comments on commit 7e7074a

Please sign in to comment.