1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-23 06:37:03 +09:00

use node 22, update deps (#822)

Co-authored-by: riku6460 <17585784+riku6460@users.noreply.github.com>
This commit is contained in:
あわわわとーにゅ 2024-11-23 01:44:01 +09:00 committed by GitHub
parent f4ebae3956
commit b4865fd9ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 2480 additions and 2366 deletions

View File

@ -75,7 +75,7 @@ body:
Examples:
* Installation Method or Hosting Service: docker compose, k8s/docker, systemd, "Misskey install shell script", development environment
* Misskey: 13.x.x
* Node: 20.x.x
* Node: 22.x.x
* PostgreSQL: 15.x.x
* Redis: 7.x.x
* OS and Architecture: Ubuntu 22.04.2 LTS aarch64

View File

@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
services:
postgres:
@ -84,7 +84,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
services:
postgres:

View File

@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v4.1.1

View File

@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:

View File

@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v4.1.1

View File

@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v4.1.1

View File

@ -1 +1 @@
20
22

View File

@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.4
ARG NODE_VERSION=20
ARG NODE_VERSION=22
# build assets & compile TypeScript
@ -75,7 +75,7 @@ ARG GID="991"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg tini curl libjemalloc-dev libjemalloc2 \
curl ffmpeg libjemalloc-dev libjemalloc2 tini \
&& ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so \
&& corepack enable \
&& groupadd -g "${GID}" misskey \
@ -101,7 +101,8 @@ COPY --chown=misskey:misskey --from=native-builder /misskey/packages/backend/bui
COPY --chown=misskey:misskey --from=native-builder /misskey/fluent-emojis /misskey/fluent-emojis
COPY --chown=misskey:misskey . ./
RUN corepack pack
RUN corepack install \
&& corepack pack
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
ENV MALLOC_CONF=background_thread:true,metadata_thp:auto,dirty_decay_ms:30000,muzzy_decay_ms:30000

View File

@ -63,16 +63,16 @@
"cssnano": "7.0.6",
"execa": "9.5.1",
"js-yaml": "4.1.0",
"postcss": "8.4.47",
"postcss": "8.4.49",
"terser": "5.36.0",
"typescript": "5.6.3"
},
"devDependencies": {
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"cross-env": "7.0.3",
"cypress": "13.15.2",
"cypress": "13.16.0",
"eslint": "8.57.1",
"ncp": "2.0.0",
"start-server-and-test": "2.0.8"

View File

@ -34,16 +34,16 @@
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
},
"optionalDependencies": {
"@swc/core-darwin-arm64": "1.9.1",
"@swc/core-darwin-x64": "1.9.1",
"@swc/core-linux-arm-gnueabihf": "1.9.1",
"@swc/core-linux-arm64-gnu": "1.9.1",
"@swc/core-linux-arm64-musl": "1.9.1",
"@swc/core-linux-x64-gnu": "1.9.1",
"@swc/core-linux-x64-musl": "1.9.1",
"@swc/core-win32-arm64-msvc": "1.9.1",
"@swc/core-win32-ia32-msvc": "1.9.1",
"@swc/core-win32-x64-msvc": "1.9.1",
"@swc/core-darwin-arm64": "1.9.3",
"@swc/core-darwin-x64": "1.9.3",
"@swc/core-linux-arm-gnueabihf": "1.9.3",
"@swc/core-linux-arm64-gnu": "1.9.3",
"@swc/core-linux-arm64-musl": "1.9.3",
"@swc/core-linux-x64-gnu": "1.9.3",
"@swc/core-linux-x64-musl": "1.9.3",
"@swc/core-win32-arm64-msvc": "1.9.3",
"@swc/core-win32-ia32-msvc": "1.9.3",
"@swc/core-win32-x64-msvc": "1.9.3",
"@tensorflow/tfjs": "4.22.0",
"@tensorflow/tfjs-node": "4.22.0",
"bufferutil": "4.0.8",
@ -64,13 +64,13 @@
},
"dependencies": {
"@authenio/samlify-node-xmllint": "2.0.0",
"@aws-sdk/client-s3": "3.687.0",
"@aws-sdk/lib-storage": "3.687.0",
"@bull-board/api": "6.3.3",
"@bull-board/fastify": "6.3.3",
"@bull-board/ui": "6.3.3",
"@aws-sdk/client-s3": "3.698.0",
"@aws-sdk/lib-storage": "3.698.0",
"@bull-board/api": "6.5.3",
"@bull-board/fastify": "6.5.3",
"@bull-board/ui": "6.5.3",
"@discordapp/twemoji": "15.1.0",
"@elastic/elasticsearch": "8.15.1",
"@elastic/elasticsearch": "8.16.2",
"@fastify/accepts": "5.0.1",
"@fastify/cookie": "11.0.1",
"@fastify/cors": "10.0.1",
@ -78,20 +78,20 @@
"@fastify/formbody": "8.0.1",
"@fastify/http-proxy": "10.0.1",
"@fastify/multipart": "9.0.1",
"@fastify/static": "8.0.2",
"@fastify/static": "8.0.3",
"@fastify/view": "10.0.1",
"@misskey-dev/sharp-read-bmp": "1.2.0",
"@misskey-dev/summaly": "MisskeyIO/summaly#5.1.1",
"@napi-rs/canvas": "0.1.60",
"@nestjs/common": "10.4.7",
"@nestjs/core": "10.4.7",
"@nestjs/testing": "10.4.7",
"@napi-rs/canvas": "0.1.62",
"@nestjs/common": "10.4.8",
"@nestjs/core": "10.4.8",
"@nestjs/testing": "10.4.8",
"@peertube/http-signature": "1.7.0",
"@simplewebauthn/server": "11.0.0",
"@sinonjs/fake-timers": "11.3.1",
"@smithy/node-http-handler": "3.2.5",
"@swc/cli": "0.5.0",
"@swc/core": "1.9.1",
"@smithy/node-http-handler": "3.3.1",
"@swc/cli": "0.5.1",
"@swc/core": "1.9.3",
"@twemoji/parser": "15.1.1",
"accepts": "1.3.8",
"ajv": "8.17.1",
@ -100,7 +100,7 @@
"bcryptjs": "2.4.3",
"blurhash": "2.0.5",
"body-parser": "1.20.3",
"bullmq": "5.25.2",
"bullmq": "5.29.0",
"cacheable-lookup": "7.0.0",
"cbor": "10.0.3",
"chalk": "5.3.0",
@ -119,7 +119,7 @@
"fluent-ffmpeg": "2.1.3",
"form-data": "4.0.1",
"got": "14.4.4",
"happy-dom": "15.11.0",
"happy-dom": "15.11.6",
"hpagent": "1.2.0",
"htmlescape": "1.1.1",
"http-link-header": "1.1.3",
@ -150,11 +150,11 @@
"oauth2orize": "1.12.0",
"oauth2orize-pkce": "0.1.2",
"os-utils": "0.0.14",
"otpauth": "9.3.4",
"otpauth": "9.3.5",
"parse5": "7.2.1",
"pg": "8.13.1",
"pino": "9.5.0",
"pino-pretty": "12.0.0",
"pino-pretty": "13.0.0",
"pkce-challenge": "4.1.0",
"probe-image-size": "7.2.3",
"promise-limit": "2.7.0",
@ -171,7 +171,7 @@
"rxjs": "7.8.1",
"samlify": "2.8.11",
"sanitize-html": "2.13.1",
"secure-json-parse": "2.7.0",
"secure-json-parse": "3.0.1",
"sharp": "0.33.5",
"slacc": "0.0.10",
"strict-event-emitter-types": "2.0.0",
@ -193,7 +193,7 @@
"devDependencies": {
"@jest/globals": "29.7.0",
"@misskey-dev/eslint-plugin": "1.0.0",
"@nestjs/platform-express": "10.4.7",
"@nestjs/platform-express": "10.4.8",
"@simplewebauthn/types": "11.0.0",
"@swc/jest": "0.2.37",
"@types/accepts": "1.3.7",
@ -212,9 +212,9 @@
"@types/jsrsasign": "10.5.14",
"@types/mime-types": "2.1.4",
"@types/ms": "0.7.34",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@types/node-forge": "1.3.11",
"@types/nodemailer": "6.4.16",
"@types/nodemailer": "6.4.17",
"@types/oauth": "0.9.6",
"@types/oauth2orize": "1.11.5",
"@types/oauth2orize-pkce": "0.1.2",

View File

@ -2,21 +2,21 @@ import { EventEmitter } from 'node:events';
import * as Bull from 'bullmq';
export class Queues<DataType = any, ResultType = any, NameType extends string = string> {
public readonly queues: ReadonlyArray<Bull.Queue<DataType, ResultType, NameType>>;
public readonly queues: ReadonlyArray<Bull.Queue<void, void, string, DataType, ResultType, NameType>>;
constructor(queues: Bull.Queue<DataType, ResultType, NameType>[]) {
constructor(queues: Bull.Queue<void, void, string, DataType, ResultType, NameType>[]) {
if (queues.length === 0) {
throw new Error('queues cannot be empty.');
}
this.queues = queues;
}
getRandomQueue(): Bull.Queue<DataType, ResultType, NameType> {
get randomQueue(): Bull.Queue<void, void, string, DataType, ResultType, NameType> {
return this.queues[Math.floor(Math.random() * this.queues.length)];
}
add(name: NameType, data: DataType, opts?: Bull.JobsOptions): Promise<Bull.Job<DataType, ResultType, NameType>> {
return this.getRandomQueue().add(name, data, opts);
return this.randomQueue.add(name, data, opts);
}
async addBulk(jobs: { name: NameType; data: DataType; opts?: Bull.BulkJobOptions }[]): Promise<Bull.Job<DataType, ResultType, NameType>[]> {
@ -30,7 +30,7 @@ export class Queues<DataType = any, ResultType = any, NameType extends string =
}
async getDelayed(start?: number, end?: number): Promise<Bull.Job<DataType, ResultType, NameType>[]> {
return (await Promise.allSettled(this.queues.map(queue => queue.getDelayed(start, end))))
return (await Promise.allSettled(this.queues.map(queue => queue.getDelayed(start, end) as Promise<Bull.Job<DataType, ResultType, NameType>[]>)))
.filter((value): value is PromiseFulfilledResult<Bull.Job<DataType, ResultType, NameType>[]> => value.status === 'fulfilled')
.flatMap(value => value.value);
}
@ -46,7 +46,7 @@ export class Queues<DataType = any, ResultType = any, NameType extends string =
}, {} as Record<string, number>);
}
once<U extends keyof Bull.QueueListener<DataType, ResultType, NameType>>(event: U, listener: Bull.QueueListener<DataType, ResultType, NameType>[U]): void {
once<U extends keyof Bull.QueueListener<Bull.Job<DataType, ResultType, NameType>>>(event: U, listener: Bull.QueueListener<Bull.Job<DataType, ResultType, NameType>>[U]): void {
const e = new EventEmitter();
e.once(event, listener);
@ -62,7 +62,7 @@ export class Queues<DataType = any, ResultType = any, NameType extends string =
}
async getJobs(types?: Bull.JobType[] | Bull.JobType, start?: number, end?: number, asc?: boolean): Promise<Bull.Job<DataType, ResultType, NameType>[]> {
return (await Promise.allSettled(this.queues.map(queue => queue.getJobs(types, start, end, asc))))
return (await Promise.allSettled(this.queues.map(queue => queue.getJobs(types, start, end, asc) as Promise<Bull.Job<DataType, ResultType, NameType>[]>)))
.filter((value): value is PromiseFulfilledResult<Bull.Job<DataType, ResultType, NameType>[]> => value.status === 'fulfilled')
.flatMap(value => value.value);
}

View File

@ -95,15 +95,14 @@ describe('Webリソース', () => {
describe.each([
{ path: '/', type: HTML },
{ path: '/docs/ja-JP/about', type: HTML }, // "指定されたURLに該当するページはありませんでした。"
// fastify-static gives charset=UTF-8 instead of utf-8 and that's okay
{ path: '/api-doc', type: 'text/html; charset=UTF-8' },
{ path: '/api-doc', type: 'text/html; charset=utf-8' },
{ path: '/api.json', type: JSON_UTF8 },
{ path: '/api-console', type: HTML },
{ path: '/_info_card_', type: HTML },
{ path: '/bios', type: HTML },
{ path: '/cli', type: HTML },
{ path: '/flush', type: HTML },
{ path: '/robots.txt', type: 'text/plain; charset=UTF-8' },
{ path: '/robots.txt', type: 'text/plain; charset=utf-8' },
{ path: '/favicon.ico', type: 'image/vnd.microsoft.icon' },
{ path: '/opensearch.xml', type: 'application/opensearchdescription+xml' },
{ path: '/apple-touch-icon.png', type: 'image/png' },

View File

@ -27,10 +27,10 @@
"@rollup/plugin-typescript": "12.1.1",
"@rollup/pluginutils": "5.1.3",
"@syuilo/aiscript": "0.19.0",
"@tabler/icons-webfont": "3.21.0",
"@tabler/icons-webfont": "3.22.0",
"@twemoji/parser": "15.1.1",
"@vitejs/plugin-vue": "5.1.4",
"@vue/compiler-sfc": "3.5.12",
"@vitejs/plugin-vue": "5.2.0",
"@vue/compiler-sfc": "3.5.13",
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.9",
"astring": "1.9.0",
"broadcast-channel": "7.0.0",
@ -40,8 +40,8 @@
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-chart-matrix": "2.0.1",
"chartjs-plugin-gradient": "0.6.1",
"chartjs-plugin-zoom": "2.0.1",
"chromatic": "11.18.0",
"chartjs-plugin-zoom": "2.1.0",
"chromatic": "11.18.1",
"compare-versions": "6.1.1",
"cropperjs": "2.0.0-rc.0",
"date-fns": "4.1.0",
@ -59,10 +59,10 @@
"misskey-reversi": "workspace:*",
"photoswipe": "5.4.4",
"punycode": "2.3.1",
"rollup": "4.24.4",
"rollup": "4.27.3",
"sanitize-html": "2.13.1",
"sass": "1.80.6",
"shiki": "1.22.2",
"sass": "1.81.0",
"shiki": "1.23.1",
"strict-event-emitter-types": "2.0.0",
"textarea-caret": "3.1.0",
"three": "0.170.0",
@ -71,40 +71,40 @@
"tsc-alias": "1.8.10",
"tsconfig-paths": "4.2.0",
"typescript": "5.6.3",
"uuid": "11.0.2",
"uuid": "11.0.3",
"v-code-diff": "1.13.1",
"vite": "5.4.10",
"vue": "3.5.12",
"vite": "5.4.11",
"vue": "3.5.13",
"vue-gtag": "2.0.1",
"vuedraggable": "next"
},
"devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0",
"@misskey-dev/summaly": "MisskeyIO/summaly#5.1.1",
"@storybook/addon-actions": "8.4.2",
"@storybook/addon-essentials": "8.4.2",
"@storybook/addon-interactions": "8.4.2",
"@storybook/addon-links": "8.4.2",
"@storybook/addon-mdx-gfm": "8.4.2",
"@storybook/addon-storysource": "8.4.2",
"@storybook/blocks": "8.4.2",
"@storybook/components": "8.4.2",
"@storybook/core-events": "8.4.2",
"@storybook/manager-api": "8.4.2",
"@storybook/preview-api": "8.4.2",
"@storybook/react": "8.4.2",
"@storybook/react-vite": "8.4.2",
"@storybook/test": "8.4.2",
"@storybook/theming": "8.4.2",
"@storybook/types": "8.4.2",
"@storybook/vue3": "8.4.2",
"@storybook/vue3-vite": "8.4.2",
"@storybook/addon-actions": "8.4.5",
"@storybook/addon-essentials": "8.4.5",
"@storybook/addon-interactions": "8.4.5",
"@storybook/addon-links": "8.4.5",
"@storybook/addon-mdx-gfm": "8.4.5",
"@storybook/addon-storysource": "8.4.5",
"@storybook/blocks": "8.4.5",
"@storybook/components": "8.4.5",
"@storybook/core-events": "8.4.5",
"@storybook/manager-api": "8.4.5",
"@storybook/preview-api": "8.4.5",
"@storybook/react": "8.4.5",
"@storybook/react-vite": "8.4.5",
"@storybook/test": "8.4.5",
"@storybook/theming": "8.4.5",
"@storybook/types": "8.4.5",
"@storybook/vue3": "8.4.5",
"@storybook/vue3-vite": "8.4.5",
"@testing-library/vue": "8.1.0",
"@types/escape-regexp": "0.0.3",
"@types/estree": "1.0.6",
"@types/matter-js": "0.19.7",
"@types/micromatch": "4.0.9",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@types/punycode": "2.1.4",
"@types/sanitize-html": "2.13.0",
"@types/throttle-debounce": "5.0.2",
@ -112,29 +112,29 @@
"@types/ws": "8.5.13",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"@vitest/coverage-v8": "2.1.4",
"@vue/runtime-core": "3.5.12",
"@vitest/coverage-v8": "2.1.5",
"@vue/runtime-core": "3.5.13",
"acorn": "8.14.0",
"cross-env": "7.0.3",
"cypress": "13.15.2",
"cypress": "13.16.0",
"eslint": "8.57.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-vue": "9.30.0",
"eslint-plugin-vue": "9.31.0",
"fast-glob": "3.3.2",
"happy-dom": "15.11.0",
"happy-dom": "15.11.6",
"intersection-observer": "0.12.2",
"micromatch": "4.0.8",
"msw": "2.6.2",
"msw": "2.6.5",
"msw-storybook-addon": "2.0.4",
"nodemon": "3.1.7",
"prettier": "3.3.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"start-server-and-test": "2.0.8",
"storybook": "8.4.2",
"storybook": "8.4.5",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"vite-plugin-turbosnap": "1.0.3",
"vitest": "2.1.4",
"vitest": "2.1.5",
"vitest-fetch-mock": "0.3.0",
"vue-component-type-helpers": "2.1.10",
"vue-eslint-parser": "9.4.3",

View File

@ -6,7 +6,7 @@ import { type UserConfig, defineConfig } from 'vite';
import locales from '../../locales/index.js';
import meta from '../../package.json';
import packageInfo from './package.json' assert { type: 'json' };
import packageInfo from './package.json' with { type: 'json' };
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name.js';
import pluginJson5 from './vite.json5.js';

View File

@ -26,7 +26,7 @@
"devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0",
"@types/matter-js": "0.19.7",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@types/seedrandom": "3.0.8",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",

View File

@ -9,7 +9,7 @@
"devDependencies": {
"@misskey-dev/eslint-plugin": "^1.0.0",
"@readme/openapi-parser": "2.6.0",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"eslint": "8.57.1",

View File

@ -35,11 +35,11 @@
"url": "git+https://github.com/misskey-dev/misskey.js.git"
},
"devDependencies": {
"@microsoft/api-extractor": "7.47.11",
"@microsoft/api-extractor": "7.47.12",
"@misskey-dev/eslint-plugin": "1.0.0",
"@swc/jest": "0.2.37",
"@types/jest": "29.5.14",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"eslint": "8.57.1",
@ -58,8 +58,8 @@
"built/dts"
],
"dependencies": {
"@swc/cli": "0.5.0",
"@swc/core": "1.9.1",
"@swc/cli": "0.5.1",
"@swc/core": "1.9.3",
"eventemitter3": "5.0.1",
"reconnecting-websocket": "4.4.0"
}

View File

@ -25,7 +25,7 @@
},
"devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@typescript-eslint/eslint-plugin": "7.10.0",
"@typescript-eslint/parser": "7.10.0",
"eslint": "8.57.1",

View File

@ -8,7 +8,7 @@
import { fileURLToPath } from 'node:url';
import * as esbuild from 'esbuild';
import locales from '../../locales/index.js';
import meta from '../../package.json' assert { type: "json" };
import meta from '../../package.json' with { type: "json" };
const watch = process.argv[2]?.includes('watch');
const __dirname = fileURLToPath(new URL('.', import.meta.url))

View File

@ -15,7 +15,7 @@
},
"devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0",
"@types/serviceworker": "0.0.102",
"@types/serviceworker": "0.0.105",
"@typescript-eslint/parser": "7.10.0",
"eslint": "8.57.1",
"eslint-plugin-import": "2.31.0",

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ import * as terser from 'terser';
import { build as buildLocales } from '../locales/index.js';
import generateDTS from '../locales/generateDTS.js';
import meta from '../package.json' assert { type: "json" };
import meta from '../package.json' with { type: "json" };
let locales = buildLocales();