update deps (MisskeyIO#786)
This commit is contained in:
parent
fcfd004c38
commit
557f45b9d1
@ -49,7 +49,7 @@
|
||||
"@tensorflow/tfjs-core": "4.22.0",
|
||||
"chokidar": "4.0.1",
|
||||
"cookie": "1.0.1",
|
||||
"cookie-signature": "1.2.1",
|
||||
"cookie-signature": "1.2.2",
|
||||
"debug": "4.3.7",
|
||||
"esbuild": "0.24.0",
|
||||
"lodash": "4.17.21",
|
||||
@ -58,18 +58,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"cssnano": "7.0.6",
|
||||
"execa": "9.4.1",
|
||||
"execa": "9.5.1",
|
||||
"js-yaml": "4.1.0",
|
||||
"postcss": "8.4.47",
|
||||
"terser": "5.36.0",
|
||||
"typescript": "5.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "22.7.8",
|
||||
"@types/node": "22.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.15.0",
|
||||
"cypress": "13.15.1",
|
||||
"eslint": "8.57.1",
|
||||
"ncp": "2.0.0",
|
||||
"start-server-and-test": "2.0.8"
|
||||
|
@ -34,16 +34,16 @@
|
||||
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@swc/core-darwin-arm64": "1.7.39",
|
||||
"@swc/core-darwin-x64": "1.7.39",
|
||||
"@swc/core-linux-arm-gnueabihf": "1.7.39",
|
||||
"@swc/core-linux-arm64-gnu": "1.7.39",
|
||||
"@swc/core-linux-arm64-musl": "1.7.39",
|
||||
"@swc/core-linux-x64-gnu": "1.7.39",
|
||||
"@swc/core-linux-x64-musl": "1.7.39",
|
||||
"@swc/core-win32-arm64-msvc": "1.7.39",
|
||||
"@swc/core-win32-ia32-msvc": "1.7.39",
|
||||
"@swc/core-win32-x64-msvc": "1.7.39",
|
||||
"@swc/core-darwin-arm64": "1.8.0",
|
||||
"@swc/core-darwin-x64": "1.8.0",
|
||||
"@swc/core-linux-arm-gnueabihf": "1.8.0",
|
||||
"@swc/core-linux-arm64-gnu": "1.8.0",
|
||||
"@swc/core-linux-arm64-musl": "1.8.0",
|
||||
"@swc/core-linux-x64-gnu": "1.8.0",
|
||||
"@swc/core-linux-x64-musl": "1.8.0",
|
||||
"@swc/core-win32-arm64-msvc": "1.8.0",
|
||||
"@swc/core-win32-ia32-msvc": "1.8.0",
|
||||
"@swc/core-win32-x64-msvc": "1.8.0",
|
||||
"@tensorflow/tfjs": "4.22.0",
|
||||
"@tensorflow/tfjs-node": "4.22.0",
|
||||
"bufferutil": "4.0.8",
|
||||
@ -60,15 +60,15 @@
|
||||
"slacc-linux-x64-musl": "0.0.10",
|
||||
"slacc-win32-arm64-msvc": "0.0.10",
|
||||
"slacc-win32-x64-msvc": "0.0.10",
|
||||
"utf-8-validate": "6.0.4"
|
||||
"utf-8-validate": "6.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||
"@aws-sdk/client-s3": "3.676.0",
|
||||
"@aws-sdk/lib-storage": "3.676.0",
|
||||
"@bull-board/api": "6.2.4",
|
||||
"@bull-board/fastify": "6.2.4",
|
||||
"@bull-board/ui": "6.2.4",
|
||||
"@aws-sdk/client-s3": "3.685.0",
|
||||
"@aws-sdk/lib-storage": "3.685.0",
|
||||
"@bull-board/api": "6.3.3",
|
||||
"@bull-board/fastify": "6.3.3",
|
||||
"@bull-board/ui": "6.3.3",
|
||||
"@discordapp/twemoji": "15.1.0",
|
||||
"@elastic/elasticsearch": "8.15.1",
|
||||
"@fastify/accepts": "5.0.1",
|
||||
@ -82,16 +82,16 @@
|
||||
"@fastify/view": "10.0.1",
|
||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||
"@misskey-dev/summaly": "5.1.0",
|
||||
"@napi-rs/canvas": "0.1.58",
|
||||
"@nestjs/common": "10.4.5",
|
||||
"@nestjs/core": "10.4.5",
|
||||
"@nestjs/testing": "10.4.5",
|
||||
"@napi-rs/canvas": "0.1.59",
|
||||
"@nestjs/common": "10.4.7",
|
||||
"@nestjs/core": "10.4.7",
|
||||
"@nestjs/testing": "10.4.7",
|
||||
"@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.4.0",
|
||||
"@swc/core": "1.7.39",
|
||||
"@swc/cli": "0.5.0",
|
||||
"@swc/core": "1.8.0",
|
||||
"@twemoji/parser": "15.1.1",
|
||||
"accepts": "1.3.8",
|
||||
"ajv": "8.17.1",
|
||||
@ -100,9 +100,9 @@
|
||||
"bcryptjs": "2.4.3",
|
||||
"blurhash": "2.0.5",
|
||||
"body-parser": "1.20.3",
|
||||
"bullmq": "5.21.2",
|
||||
"bullmq": "5.24.0",
|
||||
"cacheable-lookup": "7.0.0",
|
||||
"cbor": "9.0.2",
|
||||
"cbor": "10.0.2",
|
||||
"chalk": "5.3.0",
|
||||
"chalk-template": "1.1.0",
|
||||
"chokidar": "4.0.1",
|
||||
@ -118,8 +118,8 @@
|
||||
"file-type": "19.6.0",
|
||||
"fluent-ffmpeg": "2.1.3",
|
||||
"form-data": "4.0.1",
|
||||
"got": "14.4.3",
|
||||
"happy-dom": "15.7.4",
|
||||
"got": "14.4.4",
|
||||
"happy-dom": "15.9.0",
|
||||
"hpagent": "1.2.0",
|
||||
"htmlescape": "1.1.1",
|
||||
"http-link-header": "1.1.3",
|
||||
@ -133,26 +133,26 @@
|
||||
"json5": "2.2.3",
|
||||
"jsonld": "8.3.2",
|
||||
"jsrsasign": "11.1.0",
|
||||
"meilisearch": "0.44.1",
|
||||
"meilisearch": "0.45.0",
|
||||
"mfm-js": "0.24.0",
|
||||
"microformats-parser": "2.0.2",
|
||||
"mime-types": "2.1.35",
|
||||
"misskey-js": "workspace:*",
|
||||
"misskey-reversi": "workspace:*",
|
||||
"ms": "3.0.0-canary.1",
|
||||
"nanoid": "5.0.7",
|
||||
"nanoid": "5.0.8",
|
||||
"nested-property": "4.0.0",
|
||||
"node-fetch": "3.3.2",
|
||||
"node-forge": "1.3.1",
|
||||
"nodemailer": "6.9.15",
|
||||
"nodemailer": "6.9.16",
|
||||
"nsfwjs": "2.4.2",
|
||||
"oauth": "0.10.0",
|
||||
"oauth2orize": "1.12.0",
|
||||
"oauth2orize-pkce": "0.1.2",
|
||||
"os-utils": "0.0.14",
|
||||
"otpauth": "9.3.4",
|
||||
"parse5": "7.2.0",
|
||||
"pg": "8.13.0",
|
||||
"parse5": "7.2.1",
|
||||
"pg": "8.13.1",
|
||||
"pino": "9.5.0",
|
||||
"pino-pretty": "11.3.0",
|
||||
"pkce-challenge": "4.1.0",
|
||||
@ -193,26 +193,26 @@
|
||||
"devDependencies": {
|
||||
"@jest/globals": "29.7.0",
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@nestjs/platform-express": "10.4.5",
|
||||
"@nestjs/platform-express": "10.4.7",
|
||||
"@simplewebauthn/types": "11.0.0",
|
||||
"@swc/jest": "0.2.36",
|
||||
"@swc/jest": "0.2.37",
|
||||
"@types/accepts": "1.3.7",
|
||||
"@types/archiver": "6.0.2",
|
||||
"@types/archiver": "6.0.3",
|
||||
"@types/bcryptjs": "2.4.6",
|
||||
"@types/body-parser": "1.19.5",
|
||||
"@types/color-convert": "2.0.4",
|
||||
"@types/content-disposition": "0.5.8",
|
||||
"@types/fluent-ffmpeg": "2.1.26",
|
||||
"@types/fluent-ffmpeg": "2.1.27",
|
||||
"@types/htmlescape": "^1.1.3",
|
||||
"@types/http-link-header": "1.0.7",
|
||||
"@types/jest": "29.5.13",
|
||||
"@types/jest": "29.5.14",
|
||||
"@types/js-yaml": "4.0.9",
|
||||
"@types/jsdom": "21.1.7",
|
||||
"@types/jsonld": "1.5.15",
|
||||
"@types/jsrsasign": "10.5.14",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/node": "22.7.8",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/node-forge": "1.3.11",
|
||||
"@types/nodemailer": "6.4.16",
|
||||
"@types/oauth": "0.9.6",
|
||||
@ -233,14 +233,14 @@
|
||||
"@types/tmp": "0.2.6",
|
||||
"@types/vary": "1.1.3",
|
||||
"@types/web-push": "3.6.4",
|
||||
"@types/ws": "8.5.12",
|
||||
"@types/ws": "8.5.13",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"aws-sdk-client-mock": "4.1.0",
|
||||
"cross-env": "7.0.3",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"execa": "9.4.1",
|
||||
"execa": "9.5.1",
|
||||
"fkill": "^9.0.0",
|
||||
"jest": "29.7.0",
|
||||
"jest-mock": "29.7.0",
|
||||
|
@ -25,9 +25,9 @@
|
||||
"@rollup/plugin-json": "6.1.0",
|
||||
"@rollup/plugin-replace": "6.0.1",
|
||||
"@rollup/plugin-typescript": "12.1.1",
|
||||
"@rollup/pluginutils": "5.1.2",
|
||||
"@rollup/pluginutils": "5.1.3",
|
||||
"@syuilo/aiscript": "0.19.0",
|
||||
"@tabler/icons-webfont": "3.19.0",
|
||||
"@tabler/icons-webfont": "3.21.0",
|
||||
"@twemoji/parser": "15.1.1",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.12",
|
||||
@ -36,12 +36,12 @@
|
||||
"broadcast-channel": "7.0.0",
|
||||
"buraha": "0.0.1",
|
||||
"canvas-confetti": "1.9.3",
|
||||
"chart.js": "4.4.5",
|
||||
"chart.js": "4.4.6",
|
||||
"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.14.0",
|
||||
"chromatic": "11.16.5",
|
||||
"compare-versions": "6.1.1",
|
||||
"cropperjs": "2.0.0-rc.0",
|
||||
"date-fns": "4.1.0",
|
||||
@ -59,21 +59,21 @@
|
||||
"misskey-reversi": "workspace:*",
|
||||
"photoswipe": "5.4.4",
|
||||
"punycode": "2.3.1",
|
||||
"rollup": "4.24.0",
|
||||
"rollup": "4.24.4",
|
||||
"sanitize-html": "2.13.1",
|
||||
"sass": "1.80.3",
|
||||
"shiki": "1.22.0",
|
||||
"sass": "1.80.6",
|
||||
"shiki": "1.22.2",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"textarea-caret": "3.1.0",
|
||||
"three": "0.169.0",
|
||||
"three": "0.170.0",
|
||||
"throttle-debounce": "5.0.2",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tsc-alias": "1.8.10",
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"typescript": "5.6.3",
|
||||
"uuid": "10.0.0",
|
||||
"uuid": "11.0.2",
|
||||
"v-code-diff": "1.13.1",
|
||||
"vite": "5.4.9",
|
||||
"vite": "5.4.10",
|
||||
"vue": "3.5.12",
|
||||
"vue-gtag": "2.0.1",
|
||||
"vuedraggable": "next"
|
||||
@ -81,64 +81,63 @@
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@misskey-dev/summaly": "5.1.0",
|
||||
"@storybook/addon-actions": "8.3.6",
|
||||
"@storybook/addon-essentials": "8.3.6",
|
||||
"@storybook/addon-interactions": "8.3.6",
|
||||
"@storybook/addon-links": "8.3.6",
|
||||
"@storybook/addon-mdx-gfm": "8.3.6",
|
||||
"@storybook/addon-storysource": "8.3.6",
|
||||
"@storybook/blocks": "8.3.6",
|
||||
"@storybook/components": "8.3.6",
|
||||
"@storybook/core-events": "8.3.6",
|
||||
"@storybook/manager-api": "8.3.6",
|
||||
"@storybook/preview-api": "8.3.6",
|
||||
"@storybook/react": "8.3.6",
|
||||
"@storybook/react-vite": "8.3.6",
|
||||
"@storybook/test": "8.3.6",
|
||||
"@storybook/theming": "8.3.6",
|
||||
"@storybook/types": "8.3.6",
|
||||
"@storybook/vue3": "8.3.6",
|
||||
"@storybook/vue3-vite": "8.3.6",
|
||||
"@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",
|
||||
"@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.7.8",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/punycode": "2.1.4",
|
||||
"@types/sanitize-html": "2.13.0",
|
||||
"@types/throttle-debounce": "5.0.2",
|
||||
"@types/tinycolor2": "1.4.6",
|
||||
"@types/uuid": "10.0.0",
|
||||
"@types/ws": "8.5.12",
|
||||
"@types/ws": "8.5.13",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"@vitest/coverage-v8": "2.1.3",
|
||||
"@vitest/coverage-v8": "2.1.4",
|
||||
"@vue/runtime-core": "3.5.12",
|
||||
"acorn": "8.13.0",
|
||||
"acorn": "8.14.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.15.0",
|
||||
"cypress": "13.15.1",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
"eslint-plugin-vue": "9.29.1",
|
||||
"eslint-plugin-vue": "9.30.0",
|
||||
"fast-glob": "3.3.2",
|
||||
"happy-dom": "15.7.4",
|
||||
"happy-dom": "15.9.0",
|
||||
"intersection-observer": "0.12.2",
|
||||
"micromatch": "4.0.8",
|
||||
"msw": "2.5.0",
|
||||
"msw-storybook-addon": "2.0.3",
|
||||
"msw": "2.6.0",
|
||||
"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.3.6",
|
||||
"storybook": "8.4.2",
|
||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||
"vite-plugin-turbosnap": "1.0.3",
|
||||
"vitest": "2.1.3",
|
||||
"vitest": "2.1.4",
|
||||
"vitest-fetch-mock": "0.3.0",
|
||||
"vue-component-type-helpers": "2.1.6",
|
||||
"vue-component-type-helpers": "2.1.10",
|
||||
"vue-eslint-parser": "9.4.3",
|
||||
"vue-tsc": "2.1.6"
|
||||
"vue-tsc": "2.1.10"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@types/matter-js": "0.19.7",
|
||||
"@types/node": "22.7.8",
|
||||
"@types/node": "22.9.0",
|
||||
"@types/seedrandom": "3.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
|
@ -9,14 +9,14 @@
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "^1.0.0",
|
||||
"@readme/openapi-parser": "2.6.0",
|
||||
"@types/node": "22.7.8",
|
||||
"@types/node": "22.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"eslint": "8.57.1",
|
||||
"openapi-types": "12.1.3",
|
||||
"openapi-typescript": "6.7.6",
|
||||
"ts-case-convert": "2.1.0",
|
||||
"tsx": "4.19.1",
|
||||
"tsx": "4.19.2",
|
||||
"typescript": "5.6.3"
|
||||
},
|
||||
"files": [
|
||||
|
@ -37,9 +37,9 @@
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.47.11",
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@swc/jest": "0.2.36",
|
||||
"@types/jest": "29.5.13",
|
||||
"@types/node": "22.7.8",
|
||||
"@swc/jest": "0.2.37",
|
||||
"@types/jest": "29.5.14",
|
||||
"@types/node": "22.9.0",
|
||||
"@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.4.0",
|
||||
"@swc/core": "1.7.39",
|
||||
"@swc/cli": "0.5.0",
|
||||
"@swc/core": "1.8.0",
|
||||
"eventemitter3": "5.0.1",
|
||||
"reconnecting-websocket": "4.4.0"
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@types/node": "22.7.8",
|
||||
"@types/node": "22.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"eslint": "8.57.1",
|
||||
|
@ -15,7 +15,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@types/serviceworker": "0.0.101",
|
||||
"@types/serviceworker": "0.0.102",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"eslint": "8.57.1",
|
||||
"eslint-plugin-import": "2.31.0",
|
||||
|
3700
pnpm-lock.yaml
3700
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
extends: [
|
||||
'../../packages/shared/.eslintrc.js',
|
||||
],
|
||||
};
|
3
scripts/changelog-checker/.gitignore
vendored
3
scripts/changelog-checker/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
node_modules
|
||||
coverage
|
||||
.idea
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"name": "changelog-checker",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"run": "vite-node src/index.ts",
|
||||
"test": "vitest run",
|
||||
"test:coverage": "vitest run --coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mdast": "4.0.3",
|
||||
"@types/node": "20.10.7",
|
||||
"@vitest/coverage-v8": "1.1.3",
|
||||
"mdast-util-to-string": "4.0.0",
|
||||
"remark": "15.0.1",
|
||||
"remark-parse": "11.0.0",
|
||||
"typescript": "5.6.3",
|
||||
"unified": "11.0.4",
|
||||
"vite": "5.0.12",
|
||||
"vite-node": "1.1.3",
|
||||
"vitest": "1.1.3"
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Release } from './parser.js';
|
||||
|
||||
export class Result {
|
||||
public readonly success: boolean;
|
||||
public readonly message?: string;
|
||||
|
||||
private constructor(success: boolean, message?: string) {
|
||||
this.success = success;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
static ofSuccess(): Result {
|
||||
return new Result(true);
|
||||
}
|
||||
|
||||
static ofFailed(message?: string): Result {
|
||||
return new Result(false, message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* develop -> masterまたはrelease -> masterを想定したパターン。
|
||||
* base側の先頭とhead側で追加された分のリリースより1つ前のバージョンが等価であるかチェックする。
|
||||
*/
|
||||
export function checkNewRelease(base: Release[], head: Release[]): Result {
|
||||
const releaseCountDiff = head.length - base.length;
|
||||
if (releaseCountDiff <= 0) {
|
||||
return Result.ofFailed('Invalid release count.');
|
||||
}
|
||||
|
||||
const baseLatest = base[0];
|
||||
const headPrevious = head[releaseCountDiff];
|
||||
|
||||
if (baseLatest.releaseName !== headPrevious.releaseName) {
|
||||
return Result.ofFailed('Contains unexpected releases.');
|
||||
}
|
||||
|
||||
return Result.ofSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* topic -> developまたはtopic -> masterを想定したパターン。
|
||||
* head側の最新リリース配下に書き加えられているかをチェックする。
|
||||
*/
|
||||
export function checkNewTopic(base: Release[], head: Release[]): Result {
|
||||
if (head.length !== base.length) {
|
||||
return Result.ofFailed('Invalid release count.');
|
||||
}
|
||||
|
||||
const headLatest = head[0];
|
||||
for (let relIdx = 0; relIdx < base.length; relIdx++) {
|
||||
const baseItem = base[relIdx];
|
||||
const headItem = head[relIdx];
|
||||
if (baseItem.releaseName !== headItem.releaseName) {
|
||||
// リリースの順番が変わってると成立しないのでエラーにする
|
||||
return Result.ofFailed(`Release is different. base:${baseItem.releaseName}, head:${headItem.releaseName}`);
|
||||
}
|
||||
|
||||
if (baseItem.categories.length !== headItem.categories.length) {
|
||||
// カテゴリごと書き加えられたパターン
|
||||
if (headLatest.releaseName !== headItem.releaseName) {
|
||||
// 最新リリース以外に追記されていた場合
|
||||
return Result.ofFailed(`There is an error in the update history. expected additions:${headLatest.releaseName}, actual additions:${headItem.releaseName}`);
|
||||
}
|
||||
} else {
|
||||
// カテゴリ数の変動はないのでリスト項目の数をチェック
|
||||
for (let catIdx = 0; catIdx < baseItem.categories.length; catIdx++) {
|
||||
const baseCategory = baseItem.categories[catIdx];
|
||||
const headCategory = headItem.categories[catIdx];
|
||||
|
||||
if (baseCategory.categoryName !== headCategory.categoryName) {
|
||||
// カテゴリの順番が変わっていると成立しないのでエラーにする
|
||||
return Result.ofFailed(`Category is different. base:${baseCategory.categoryName}, head:${headCategory.categoryName}`);
|
||||
}
|
||||
|
||||
if (baseCategory.items.length !== headCategory.items.length) {
|
||||
if (headLatest.releaseName !== headItem.releaseName) {
|
||||
// 最新リリース以外に追記されていた場合
|
||||
return Result.ofFailed(`There is an error in the update history. expected additions:${headLatest.releaseName}, actual additions:${headItem.releaseName}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Result.ofSuccess();
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as process from 'process';
|
||||
import * as fs from 'fs';
|
||||
import { parseChangeLog } from './parser.js';
|
||||
import { checkNewRelease, checkNewTopic } from './checker.js';
|
||||
|
||||
function abort(message?: string) {
|
||||
if (message) {
|
||||
console.error(message);
|
||||
}
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
function main() {
|
||||
if (!fs.existsSync('./CHANGELOG-base.md') || !fs.existsSync('./CHANGELOG-head.md')) {
|
||||
console.error('CHANGELOG-base.md or CHANGELOG-head.md is missing.');
|
||||
return;
|
||||
}
|
||||
|
||||
const base = parseChangeLog('./CHANGELOG-base.md');
|
||||
const head = parseChangeLog('./CHANGELOG-head.md');
|
||||
|
||||
const result = (base.length < head.length)
|
||||
? checkNewRelease(base, head)
|
||||
: checkNewTopic(base, head);
|
||||
|
||||
if (!result.success) {
|
||||
abort(result.message);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import * as fs from 'node:fs';
|
||||
import { unified } from 'unified';
|
||||
import remarkParse from 'remark-parse';
|
||||
import { Heading, List, Node } from 'mdast';
|
||||
import { toString } from 'mdast-util-to-string';
|
||||
|
||||
export class Release {
|
||||
public readonly releaseName: string;
|
||||
public readonly categories: ReleaseCategory[];
|
||||
|
||||
constructor(releaseName: string, categories: ReleaseCategory[] = []) {
|
||||
this.releaseName = releaseName;
|
||||
this.categories = [...categories];
|
||||
}
|
||||
}
|
||||
|
||||
export class ReleaseCategory {
|
||||
public readonly categoryName: string;
|
||||
public readonly items: string[];
|
||||
|
||||
constructor(categoryName: string, items: string[] = []) {
|
||||
this.categoryName = categoryName;
|
||||
this.items = [...items];
|
||||
}
|
||||
}
|
||||
|
||||
function isHeading(node: Node): node is Heading {
|
||||
return node.type === 'heading';
|
||||
}
|
||||
|
||||
function isList(node: Node): node is List {
|
||||
return node.type === 'list';
|
||||
}
|
||||
|
||||
export function parseChangeLog(path: string): Release[] {
|
||||
const input = fs.readFileSync(path, { encoding: 'utf8' });
|
||||
const processor = unified().use(remarkParse);
|
||||
|
||||
const releases: Release[] = [];
|
||||
const root = processor.parse(input);
|
||||
|
||||
let release: Release | null = null;
|
||||
let category: ReleaseCategory | null = null;
|
||||
for (const it of root.children) {
|
||||
if (isHeading(it) && it.depth === 2) {
|
||||
// リリース
|
||||
release = new Release(toString(it));
|
||||
releases.push(release);
|
||||
} else if (isHeading(it) && it.depth === 3 && release) {
|
||||
// リリース配下のカテゴリ
|
||||
category = new ReleaseCategory(toString(it));
|
||||
release.categories.push(category);
|
||||
} else if (isList(it) && category) {
|
||||
for (const listItem of it.children) {
|
||||
// カテゴリ配下のリスト項目
|
||||
category.items.push(toString(listItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return releases;
|
||||
}
|
@ -1,419 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import {expect, suite, test} from "vitest";
|
||||
import {Release, ReleaseCategory} from "../src/parser";
|
||||
import {checkNewRelease, checkNewTopic} from "../src/checker";
|
||||
|
||||
suite('checkNewRelease', () => {
|
||||
test('headに新しいリリースがある1', () => {
|
||||
const base = [new Release('2024.12.0')]
|
||||
const head = [new Release('2024.12.1'), new Release('2024.12.0')]
|
||||
|
||||
const result = checkNewRelease(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
test('headに新しいリリースがある2', () => {
|
||||
const base = [new Release('2024.12.0')]
|
||||
const head = [new Release('2024.12.2'), new Release('2024.12.1'), new Release('2024.12.0')]
|
||||
|
||||
const result = checkNewRelease(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
|
||||
test('リリースの数が同じ', () => {
|
||||
const base = [new Release('2024.12.0')]
|
||||
const head = [new Release('2024.12.0')]
|
||||
|
||||
const result = checkNewRelease(base, head)
|
||||
|
||||
console.log(result.message)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
test('baseにあるリリースがheadにない', () => {
|
||||
const base = [new Release('2024.12.0')]
|
||||
const head = [new Release('2024.12.2'), new Release('2024.12.1')]
|
||||
|
||||
const result = checkNewRelease(base, head)
|
||||
|
||||
console.log(result.message)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
suite('checkNewTopic', () => {
|
||||
test('追記なし', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
test('最新バージョンにカテゴリを追加したときはエラーにならない', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
test('最新バージョンからカテゴリを削除したときはエラーにならない', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat3',
|
||||
'feat4',
|
||||
])
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
test('最新バージョンに追記したときはエラーにならない', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
'feat3',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
test('最新バージョンから削除したときはエラーにならない', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
test('古いバージョンにカテゴリを追加したときはエラーになる', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
new ReleaseCategory('Client', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
console.log(result.message)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
test('古いバージョンからカテゴリを削除したときはエラーになる', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
console.log(result.message)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
test('古いバージョンに追記したときはエラーになる', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
'feat3',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
console.log(result.message)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
test('古いバージョンから削除したときはエラーになる', () => {
|
||||
const base = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const head = [
|
||||
new Release('2024.12.1', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
'feat2',
|
||||
]),
|
||||
]),
|
||||
new Release('2024.12.0', [
|
||||
new ReleaseCategory('Server', [
|
||||
'feat1',
|
||||
]),
|
||||
])
|
||||
]
|
||||
|
||||
const result = checkNewTopic(base, head)
|
||||
|
||||
console.log(result.message)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
})
|
@ -1,31 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"removeComments": true,
|
||||
"strict": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"experimentalDecorators": true,
|
||||
"noImplicitReturns": true,
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": [
|
||||
"./node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"esnext"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"test/**/*"
|
||||
]
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
import {defineConfig} from 'vite';
|
||||
|
||||
|
||||
const config = defineConfig({});
|
||||
|
||||
export default config;
|
Loading…
Reference in New Issue
Block a user