Skip to content

release: 1.6.3#97

Merged
Tweentyy merged 9 commits intomainfrom
develop
Apr 22, 2026
Merged

release: 1.6.3#97
Tweentyy merged 9 commits intomainfrom
develop

Conversation

@Tweentyy
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2026 08:53
@Tweentyy Tweentyy merged commit d8e8b2e into main Apr 22, 2026
3 checks passed
@Tweentyy Tweentyy deleted the develop branch April 22, 2026 08:53
@Tweentyy Tweentyy restored the develop branch April 22, 2026 08:53
@Tweentyy Tweentyy deleted the develop branch April 22, 2026 08:53
@Tweentyy Tweentyy restored the develop branch April 22, 2026 08:53
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Release bump to 1.6.3, including dependency updates, ESLint configuration changes, and improved error logging ergonomics by accepting unknown errors.

Changes:

  • Bump package version and update dependencies/devDependencies (notably ESLint v10, discord.js, i18next, TypeScript).
  • Add toError() helper and update logger/error handling to accept unknown instead of any.
  • Update TypeScript/ESLint project configuration (tsconfig include, new eslint.config.ts, remove eslint.config.mjs).

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tsconfig.json Adds include to ensure src/** is part of the TS program.
src/utils/logger.ts Updates error logging to normalize unknown via toError().
src/utils/index.ts Re-exports the new error utility.
src/utils/error.ts Introduces toError() helper for normalizing thrown values.
src/managers/EventManager.ts Switches catch typing from any to unknown.
src/client/StelliaUtils.ts Switches multiple catch typings from any to unknown.
package.json Release version bump, dependency updates, and lint script change.
eslint.config.ts Replaces previous ESLint flat config file with a TS-based config.
eslint.config.mjs Removed in favor of eslint.config.ts.
pnpm-lock.yaml Lockfile updates reflecting dependency changes.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eslint.config.ts
Comment on lines +9 to +77
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: globals.node,
},
},
ts.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
prettierConfig,
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: "latest",
},
},
rules: {
"import/namespace": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["parent", "sibling", "index"],
"object",
"type",
],
pathGroups: [
{
pattern: "@/**",
group: "internal",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"import/newline-after-import": ["error", { count: 1 }],
"import/no-unresolved": "error",
"import/no-duplicates": "error",
"no-console": "off",
"no-var": "error",
"prefer-const": "error",
},
settings: {
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
node: {
extensions: [".js", ".ts"],
},
},
},
},
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint.config.ts is formatted with 2-space indentation, but the repo Prettier config specifies tabs (useTabs: true, tabWidth: 4). Consider formatting this file with Prettier to keep indentation consistent across the repo.

Suggested change
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: globals.node,
},
},
ts.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
prettierConfig,
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: "latest",
},
},
rules: {
"import/namespace": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["parent", "sibling", "index"],
"object",
"type",
],
pathGroups: [
{
pattern: "@/**",
group: "internal",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"import/newline-after-import": ["error", { count: 1 }],
"import/no-unresolved": "error",
"import/no-duplicates": "error",
"no-console": "off",
"no-var": "error",
"prefer-const": "error",
},
settings: {
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
node: {
extensions: [".js", ".ts"],
},
},
},
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: globals.node,
},
},
ts.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
prettierConfig,
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: "latest",
},
},
rules: {
"import/namespace": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["parent", "sibling", "index"],
"object",
"type",
],
pathGroups: [
{
pattern: "@/**",
group: "internal",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"import/newline-after-import": ["error", { count: 1 }],
"import/no-unresolved": "error",
"import/no-duplicates": "error",
"no-console": "off",
"no-var": "error",
"prefer-const": "error",
},
settings: {
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
node: {
extensions: [".js", ".ts"],
},
},
},
},

Copilot uses AI. Check for mistakes.
Comment thread src/utils/error.ts
return error;
}
if (typeof error === "object") {
return new Error(JSON.stringify(error));
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toError uses JSON.stringify(error) for non-Error objects. JSON.stringify can throw (e.g., circular references or BigInt values), which would make logger.errorWithInformation throw while handling an error. Wrap the stringify in a try/catch (or use a safe serializer like util.inspect) and fall back to String(error) when serialization fails.

Suggested change
return new Error(JSON.stringify(error));
try {
return new Error(JSON.stringify(error));
} catch {
return new Error(String(error));
}

Copilot uses AI. Check for mistakes.
Comment thread src/utils/error.ts
Comment on lines +2 to +9
if (error instanceof Error) {
return error;
}
if (typeof error === "object") {
return new Error(JSON.stringify(error));
}

return new Error(String(error));
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new file is indented with spaces, but the repo Prettier config specifies useTabs: true/tabWidth: 4. Reformat with tabs (or run Prettier) to avoid inconsistent formatting and future diffs.

Suggested change
if (error instanceof Error) {
return error;
}
if (typeof error === "object") {
return new Error(JSON.stringify(error));
}
return new Error(String(error));
if (error instanceof Error) {
return error;
}
if (typeof error === "object") {
return new Error(JSON.stringify(error));
}
return new Error(String(error));

Copilot uses AI. Check for mistakes.
Comment thread package.json
"types": "./dist/index.d.ts",
"scripts": {
"lint": "eslint src --ext .ts",
"lint": "eslint src",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint script was changed to eslint src, which (with the default ESLint CLI behavior) typically only lints JS extensions and may skip .ts files. Use eslint src --ext .ts (as before) or a glob like eslint "src/**/*.{ts,tsx}" to ensure TypeScript is actually linted.

Suggested change
"lint": "eslint src",
"lint": "eslint src --ext .ts",

Copilot uses AI. Check for mistakes.
Comment thread eslint.config.ts
Comment on lines +9 to +16
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: globals.node,
},
},
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first config block applies to **/*.{js,...,ts,...} and enables JS recommended rules without setting a TS parser. Depending on flat-config merging order, this can cause .ts files to be parsed by Espree (syntax errors) or make rule application unpredictable. Consider limiting this block to JS extensions only, and include js.configs.recommended directly (similar to the previous config) instead of plugins: { js } + extends: ["js/recommended"].

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants