Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update sapphire dependencies #794

Merged
merged 5 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

docs:
name: Docgen
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && false
uses: sapphiredev/.github/.github/workflows/reusable-yarn-job.yml@main
with:
script-name: docs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
docgen:
uses: sapphiredev/.github/.github/workflows/reusable-documentation.yml@main
if: false
with:
project-name: framework
secrets:
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
},
"dependencies": {
"@discordjs/builders": "^1.9.0",
"@sapphire/discord-utilities": "^3.4.1",
"@sapphire/discord.js-utilities": "^7.3.0",
"@sapphire/lexure": "^1.1.7",
"@sapphire/discord-utilities": "^3.4.2",
"@sapphire/discord.js-utilities": "^7.3.1",
"@sapphire/lexure": "^1.1.9",
"@sapphire/pieces": "^4.3.1",
"@sapphire/ratelimits": "^2.4.9",
"@sapphire/result": "^2.6.6",
"@sapphire/stopwatch": "^1.5.2",
"@sapphire/utilities": "^3.17.0"
"@sapphire/ratelimits": "^2.4.10",
"@sapphire/result": "^2.7.1",
"@sapphire/stopwatch": "^1.5.3",
"@sapphire/utilities": "^3.18.0"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
Expand All @@ -53,11 +53,11 @@
"@sapphire/node-utilities": "^1.0.2",
"@sapphire/prettier-config": "^2.0.0",
"@sapphire/ts-config": "^5.0.1",
"@types/node": "^20.17.1",
"@types/ws": "^8.5.12",
"@types/node": "^20.17.5",
"@types/ws": "^8.5.13",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^2.1.3",
"@vitest/coverage-v8": "^2.1.4",
"concurrently": "^9.0.1",
"cz-conventional-changelog": "^3.3.0",
"discord.js": "^14.16.3",
Expand All @@ -70,12 +70,12 @@
"gen-esm-wrapper": "^1.1.3",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"tsup": "^8.3.0",
"typedoc": "^0.26.10",
"tsup": "^8.3.5",
"typedoc": "^0.26.11",
"typedoc-json-parser": "^10.1.6",
"typescript": "~5.4.5",
"vite": "^5.4.10",
"vitest": "^2.1.3"
"vitest": "^2.1.4"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
export {
AliasPiece,
AliasStore,
container,
LoaderError,
MissingExportsError,
Piece,
Store,
StoreRegistry,
container,
type AliasPieceJSON,
type AliasPieceOptions,
type Container,
type LoaderPieceContext,
type PieceContext, // eslint-disable-line deprecation/deprecation
type PieceContext,

Check warning on line 54 in src/index.ts

View workflow job for this annotation

GitHub Actions / Linting / Linting / Run yarn job

'PieceContext' is deprecated. Use {@linkcode LoaderPieceContext } instead

Check warning on line 54 in src/index.ts

View workflow job for this annotation

GitHub Actions / Linting / Linting / Run yarn job

'PieceContext' is deprecated. Use {@linkcode LoaderPieceContext } instead
type PieceJSON,
type PieceLocationJSON,
type PieceOf,
Expand All @@ -66,7 +66,6 @@
} from '@sapphire/pieces';
export * from '@sapphire/result';
export type { Awaitable } from '@sapphire/utilities';
export * from './lib/SapphireClient';
export * from './lib/errors/ArgumentError';
export * from './lib/errors/Identifiers';
export * from './lib/errors/PreconditionError';
Expand All @@ -79,6 +78,7 @@
export type { EmojiObject } from './lib/resolvers/emoji';
export * as Resolvers from './lib/resolvers/index';
export type { MessageResolverOptions } from './lib/resolvers/message';
export * from './lib/SapphireClient';
export * from './lib/structures/Argument';
export * from './lib/structures/ArgumentStore';
export * from './lib/structures/Command';
Expand All @@ -100,14 +100,14 @@
} from './lib/utils/application-commands/ApplicationCommandRegistry';
export * from './lib/utils/logger/ILogger';
export * from './lib/utils/logger/Logger';
export * from './lib/utils/preconditions/IPreconditionContainer';
export * from './lib/utils/preconditions/PreconditionContainerArray';
export * from './lib/utils/preconditions/PreconditionContainerSingle';
export * from './lib/utils/preconditions/conditions/IPreconditionCondition';
export * from './lib/utils/preconditions/conditions/PreconditionConditionAnd';
export * from './lib/utils/preconditions/conditions/PreconditionConditionOr';
export * from './lib/utils/preconditions/containers/ClientPermissionsPrecondition';
export * from './lib/utils/preconditions/containers/UserPermissionsPrecondition';
export * from './lib/utils/preconditions/IPreconditionContainer';
export * from './lib/utils/preconditions/PreconditionContainerArray';
export * from './lib/utils/preconditions/PreconditionContainerSingle';
export { ApplicationCommandRegistries };

/* eslint-disable deprecation/deprecation */
Expand Down
4 changes: 2 additions & 2 deletions src/lib/types/CommandTypes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AliasPiece, type AliasPieceJSON } from '@sapphire/pieces';
import { type NonNullObject, type Nullish } from '@sapphire/utilities';
import type { Nullish } from '@sapphire/utilities';
import {
ChannelType,
ChatInputCommandInteraction,
Expand All @@ -16,7 +16,7 @@ import { BucketScope, CommandOptionsRunTypeEnum } from './Enums';

export type DetailedDescriptionCommand = string | DetailedDescriptionCommandObject;

export interface DetailedDescriptionCommandObject extends NonNullObject {}
export interface DetailedDescriptionCommandObject {}

/**
* The allowed values for {@link CommandOptions.runIn}.
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/DMOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionDMOnly,
message: 'You cannot run this command outside DMs.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildNewsOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildNewsOnly,
message: 'You can only run this command in server announcement channels.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildNewsThreadOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildNewsThreadOnly,
message: 'You can only run this command in server announcement thread channels.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildOnly,
message: 'You cannot run this command in DMs.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildPrivateThreadOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildPrivateThreadOnly,
message: 'You can only run this command in private server thread channels.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildPublicThreadOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildPublicThreadOnly,
message: 'You can only run this command in public server thread channels.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildTextOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildTextOnly,
message: 'You can only run this command in server text channels.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildThreadOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionThreadOnly,
message: 'You can only run this command in server thread channels.'
});
Expand Down
1 change: 0 additions & 1 deletion src/preconditions/GuildVoiceOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class CorePrecondition extends AllFlowsPrecondition {

private makeSharedError(): AllFlowsPrecondition.Result {
return this.error({
// eslint-disable-next-line deprecation/deprecation
identifier: Identifiers.PreconditionGuildVoiceOnly,
message: 'You can only run this command in server voice channels.'
});
Expand Down
6 changes: 3 additions & 3 deletions tests/resolvers/emoji.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Emoji resolver tests', () => {
test('GIVEN an unicode emoji THEN returns emojiObject', () => {
const resolvedEmoji = resolveEmoji('😄');
expect(resolvedEmoji.isOk()).toBe(true);
expect(resolvedEmoji.unwrapErr).toThrowError();
expect(() => resolvedEmoji.unwrapErr()).toThrowError();
expect(resolvedEmoji.unwrap()).toMatchObject({ id: null, name: '😄' });
});
test('GIVEN a string emoji THEN returns ArgumentEmojiError', () => {
Expand All @@ -24,13 +24,13 @@ describe('Emoji resolver tests', () => {
test('GIVEN a string custom emoji THEN returns emojiObject', () => {
const resolvedEmoji = resolveEmoji('<:custom:737141877803057244>');
expect(resolvedEmoji.isOk()).toBe(true);
expect(resolvedEmoji.unwrapErr).toThrowError();
expect(() => resolvedEmoji.unwrapErr()).toThrowError();
expect(resolvedEmoji.unwrap()).toMatchObject({ id: '737141877803057244', name: 'custom' });
});
test('GIVEN a string custom animated emoji THEN returns emojiObject', () => {
const resolvedEmoji = resolveEmoji('<a:custom:737141877803057244>');
expect(resolvedEmoji.isOk()).toBe(true);
expect(resolvedEmoji.unwrapErr).toThrowError();
expect(() => resolvedEmoji.unwrapErr()).toThrowError();
expect(resolvedEmoji.unwrap()).toMatchObject({ animated: true, id: '737141877803057244', name: 'custom' });
});
});
Loading
Loading