diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-02-15 10:24:22 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-15 10:24:22 +0900 |
| commit | ffd8cf07e683eae95858d89fa9e5d85bf271c4d6 (patch) | |
| tree | 8bfb9ce0377ff711d60460ed8676f830c3a570ee /packages/misskey-js | |
| parent | fix(frontend): Play の再読込時に UI が以前の状態を引き継い... (diff) | |
| download | misskey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.tar.gz misskey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.tar.bz2 misskey-ffd8cf07e683eae95858d89fa9e5d85bf271c4d6.zip | |
update deps (#15311)
* wip
* bump misskey-dev/eslint-plugin
* lint fixes (backend)
* lint fixes (frontend)
* lint fixes (frontend-embed)
* rollback nsfwjs to 4.2.0
ref: infinitered/nsfwjs#904
* rollback openapi-typescript to v6
v7でOpenAPIのバリデーションが入るようになった関係でスコープ外での変更が避けられないため一時的に戻した
* lint fixes (misskey-js)
* temporarily disable errored lint rule (frontend-shared)
* fix lint
* temporarily ignore errored file for lint (frontend-shared)
* rollback simplewebauthn/server to 12.0.0
v13 contains breaking changes that require some decision making
* lint fixes (frontend-shared)
* build misskey-js with types
* fix(backend): migrate simplewebauthn/server to v12
* fix(misskey-js/autogen): ignore indent rules to generate consistent output
* attempt to fix test
changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML)
* attempt to fix test
changes due to capricorn86/happy-dom#1617 (XMLSerializer now produces valid XML)
* fix test
* fix test
* fix test
* Apply suggestions from code review
Co-authored-by: anatawa12 <anatawa12@icloud.com>
* bump summaly to v5.2.0
* update tabler-icons to v3.30.0-based
---------
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: anatawa12 <anatawa12@icloud.com>
Diffstat (limited to 'packages/misskey-js')
| -rw-r--r-- | packages/misskey-js/eslint.config.js | 6 | ||||
| -rw-r--r-- | packages/misskey-js/etc/misskey-js.api.md | 6 | ||||
| -rw-r--r-- | packages/misskey-js/generator/eslint.config.js | 6 | ||||
| -rw-r--r-- | packages/misskey-js/generator/package.json | 12 | ||||
| -rw-r--r-- | packages/misskey-js/generator/src/generator.ts | 2 | ||||
| -rw-r--r-- | packages/misskey-js/generator/tsconfig.json | 2 | ||||
| -rw-r--r-- | packages/misskey-js/package.json | 18 | ||||
| -rw-r--r-- | packages/misskey-js/src/api.types.ts | 8 | ||||
| -rw-r--r-- | packages/misskey-js/src/autogen/endpoint.ts | 2 | ||||
| -rw-r--r-- | packages/misskey-js/src/entities.ts | 6 | ||||
| -rw-r--r-- | packages/misskey-js/src/streaming.ts | 6 |
11 files changed, 44 insertions, 30 deletions
diff --git a/packages/misskey-js/eslint.config.js b/packages/misskey-js/eslint.config.js index d8173f30e9..496892d897 100644 --- a/packages/misskey-js/eslint.config.js +++ b/packages/misskey-js/eslint.config.js @@ -26,4 +26,10 @@ export default [ }, }, }, + { + files: ['src/autogen/**/*.ts', 'src/autogen/**/*.tsx'], + rules: { + '@stylistic/indent': 'off', + }, + }, ]; diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index ac7babb250..1b935364f1 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -7,7 +7,7 @@ import type { AuthenticationResponseJSON } from '@simplewebauthn/types'; import { EventEmitter } from 'eventemitter3'; import { Options } from 'reconnecting-websocket'; -import type { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types'; +import type { PublicKeyCredentialRequestOptionsJSON as PublicKeyCredentialRequestOptionsJSON_2 } from '@simplewebauthn/types'; import _ReconnectingWebSocket from 'reconnecting-websocket'; // Warning: (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts @@ -3106,12 +3106,12 @@ type SigninFlowResponse = { } | { finished: false; next: 'passkey'; - authRequest: PublicKeyCredentialRequestOptionsJSON; + authRequest: PublicKeyCredentialRequestOptionsJSON_2; }; // @public (undocumented) type SigninWithPasskeyInitResponse = { - option: PublicKeyCredentialRequestOptionsJSON; + option: PublicKeyCredentialRequestOptionsJSON_2; context: string; }; diff --git a/packages/misskey-js/generator/eslint.config.js b/packages/misskey-js/generator/eslint.config.js index 4bf78c3b91..7139f88f5b 100644 --- a/packages/misskey-js/generator/eslint.config.js +++ b/packages/misskey-js/generator/eslint.config.js @@ -14,4 +14,10 @@ export default [ }, }, }, + { + files: ['built/autogen/**.ts'], + rules: { + '@stylistic/indent': 'off', + }, + }, ]; diff --git a/packages/misskey-js/generator/package.json b/packages/misskey-js/generator/package.json index b796bf8775..4203456889 100644 --- a/packages/misskey-js/generator/package.json +++ b/packages/misskey-js/generator/package.json @@ -8,14 +8,14 @@ }, "devDependencies": { "@readme/openapi-parser": "2.6.0", - "@types/node": "22.9.0", - "@typescript-eslint/eslint-plugin": "7.17.0", - "@typescript-eslint/parser": "7.17.0", + "@types/node": "22.10.7", + "@typescript-eslint/eslint-plugin": "8.20.0", + "@typescript-eslint/parser": "8.20.0", "openapi-types": "12.1.3", - "openapi-typescript": "6.7.3", + "openapi-typescript": "6.7.6", "ts-case-convert": "2.1.0", - "tsx": "4.4.0", - "typescript": "5.6.3" + "tsx": "4.19.2", + "typescript": "5.7.3" }, "files": [ "built" diff --git a/packages/misskey-js/generator/src/generator.ts b/packages/misskey-js/generator/src/generator.ts index a77ffeedc2..889051f3e8 100644 --- a/packages/misskey-js/generator/src/generator.ts +++ b/packages/misskey-js/generator/src/generator.ts @@ -173,7 +173,7 @@ async function generateEndpoints( endpointOutputLine.push( ...endpoints.map(it => '\t' + it.toLine()), ); - endpointOutputLine.push('}'); + endpointOutputLine.push('};'); endpointOutputLine.push(''); function generateEndpointReqMediaTypesType() { diff --git a/packages/misskey-js/generator/tsconfig.json b/packages/misskey-js/generator/tsconfig.json index c814df612e..d65042dc6d 100644 --- a/packages/misskey-js/generator/tsconfig.json +++ b/packages/misskey-js/generator/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "target": "ESNext", "module": "ESNext", - "moduleResolution": "nodenext", + "moduleResolution": "node16", "strict": true, "strictFunctionTypes": true, "strictNullChecks": true, diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index 601c261a05..afc1e6a1d1 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -35,29 +35,29 @@ "directory": "packages/misskey-js" }, "devDependencies": { - "@microsoft/api-extractor": "7.47.11", + "@microsoft/api-extractor": "7.49.1", "@swc/jest": "0.2.37", "@types/jest": "29.5.14", - "@types/node": "22.9.0", - "@typescript-eslint/eslint-plugin": "7.17.0", - "@typescript-eslint/parser": "7.17.0", + "@types/node": "22.10.7", + "@typescript-eslint/eslint-plugin": "8.20.0", + "@typescript-eslint/parser": "8.20.0", "jest": "29.7.0", "jest-fetch-mock": "3.0.3", "jest-websocket-mock": "2.5.0", "mock-socket": "9.3.1", "ncp": "2.0.0", - "nodemon": "3.1.7", + "nodemon": "3.1.9", "execa": "8.0.1", "tsd": "0.31.2", - "typescript": "5.6.3", - "esbuild": "0.24.0", - "glob": "11.0.0" + "typescript": "5.7.3", + "esbuild": "0.24.2", + "glob": "11.0.1" }, "files": [ "built" ], "dependencies": { - "@simplewebauthn/types": "11.0.0", + "@simplewebauthn/types": "12.0.0", "eventemitter3": "5.0.1", "reconnecting-websocket": "4.4.0" } diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 838949f8e1..fa803194bf 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -33,14 +33,15 @@ type IsCaseMatched<E extends keyof Endpoints, P extends Endpoints[E]['req'], C e Endpoints[E]['res'] extends SwitchCase // eslint-disable-next-line @typescript-eslint/no-explicit-any ? IsNeverType<StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>> extends false ? true : false - : false + : false; type GetCaseResult<E extends keyof Endpoints, P extends Endpoints[E]['req'], C extends number> = Endpoints[E]['res'] extends SwitchCase // eslint-disable-next-line @typescript-eslint/no-explicit-any ? StrictExtract<Endpoints[E]['res']['$switch']['$cases'][C], [P, any]>[1] - : never + : never; +/* eslint-disable @stylistic/indent */ export type SwitchCaseResponseType<E extends keyof Endpoints, P extends Endpoints[E]['req']> = Endpoints[E]['res'] extends SwitchCase ? IsCaseMatched<E, P, 0> extends true ? GetCaseResult<E, P, 0> : IsCaseMatched<E, P, 1> extends true ? GetCaseResult<E, P, 1> : @@ -53,6 +54,7 @@ export type SwitchCaseResponseType<E extends keyof Endpoints, P extends Endpoint IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> : IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']; +/* eslint-enable @stylistic/indent */ export type Endpoints = Overwrite< Gen, @@ -106,4 +108,4 @@ export type Endpoints = Overwrite< res: AdminRolesCreateResponse; } } -> +>; diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index a9903b9139..2de0bc9808 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -973,7 +973,7 @@ export type Endpoints = { 'users/show': { req: UsersShowRequest; res: UsersShowResponse }; 'users/update-memo': { req: UsersUpdateMemoRequest; res: EmptyResponse }; 'v2/admin/emoji/list': { req: V2AdminEmojiListRequest; res: V2AdminEmojiListResponse }; -} +}; /** * NOTE: The content-type for all endpoints not listed here is application/json. diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index dd88791ed0..f04ab25148 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -258,11 +258,11 @@ export type SignupRequest = { 'g-recaptcha-response'?: string | null; 'turnstile-response'?: string | null; 'm-captcha-response'?: string | null; -} +}; export type SignupResponse = MeDetailed & { token: string; -} +}; export type SignupPendingRequest = { code: string; @@ -313,4 +313,4 @@ export type SigninWithPasskeyResponse = { type Values<T extends Record<PropertyKey, unknown>> = T[keyof T]; -export type PartialRolePolicyOverride = Partial<{[k in keyof RolePolicies]: Omit<Values<Role['policies']>, 'value'> & { value: RolePolicies[k] }}>; +export type PartialRolePolicyOverride = Partial<{ [k in keyof RolePolicies]: Omit<Values<Role['policies']>, 'value'> & { value: RolePolicies[k] } }>; diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts index 0ef2d1e7a1..371f3f1d13 100644 --- a/packages/misskey-js/src/streaming.ts +++ b/packages/misskey-js/src/streaming.ts @@ -197,9 +197,9 @@ export default class Stream extends EventEmitter<StreamEvents> implements IStrea * Send a message to connection * ! ストリーム上のやり取りはすべてJSONで行われます ! */ - public send(typeOrPayload: string): void - public send(typeOrPayload: string, payload: unknown): void - public send(typeOrPayload: Record<string, unknown> | unknown[]): void + public send(typeOrPayload: string): void; + public send(typeOrPayload: string, payload: unknown): void; + public send(typeOrPayload: Record<string, unknown> | unknown[]): void; public send(typeOrPayload: string | Record<string, unknown> | unknown[], payload?: unknown): void { if (typeof typeOrPayload === 'string') { this.stream.send(JSON.stringify({ |