diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a19d1b161..dbf834a4b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -91,6 +91,6 @@ jobs: - run: pnpm i --frozen-lockfile - run: pnpm --filter misskey-js run build if: ${{ matrix.workspace == 'backend' }} - - run: pnpm --filter misskey-reversi run build + - run: pnpm --filter misskey-reversi run build:tsc if: ${{ matrix.workspace == 'backend' }} - run: pnpm --filter ${{ matrix.workspace }} run typecheck diff --git a/package.json b/package.json index 5d49f4912..6932f513b 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "sharp": "0.33.2" }, "dependencies": { - "execa": "8.0.1", "cssnano": "6.0.3", + "execa": "8.0.1", "js-yaml": "4.1.0", "postcss": "8.4.33", "terser": "5.27.0", @@ -64,8 +64,8 @@ "cross-env": "7.0.3", "cypress": "13.6.3", "eslint": "8.56.0", - "start-server-and-test": "2.0.3", - "ncp": "2.0.0" + "ncp": "2.0.0", + "start-server-and-test": "2.0.3" }, "optionalDependencies": { "@tensorflow/tfjs-core": "4.4.0" diff --git a/packages/backend/package.json b/packages/backend/package.json index 7ee46b72b..f93fddad2 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -171,7 +171,7 @@ "slacc": "0.0.10", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", - "systeminformation": "5.21.23", + "systeminformation": "5.21.24", "tinycolor2": "1.6.0", "tmp": "0.2.1", "tsc-alias": "1.8.8", diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 767823b48..f2160cd82 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -28,8 +28,8 @@ "@syuilo/aiscript": "0.17.0", "@tabler/icons-webfont": "2.46.0", "@twemoji/parser": "15.0.0", - "@vitejs/plugin-vue": "5.0.2", - "@vue/compiler-sfc": "3.4.3", + "@vitejs/plugin-vue": "5.0.3", + "@vue/compiler-sfc": "3.4.15", "aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.6", "astring": "1.8.6", "broadcast-channel": "7.0.0", @@ -66,7 +66,7 @@ "shiki": "0.14.7", "strict-event-emitter-types": "2.0.0", "textarea-caret": "3.1.0", - "three": "0.160.0", + "three": "0.160.1", "throttle-debounce": "5.0.0", "tinycolor2": "1.6.0", "tsc-alias": "1.8.8", @@ -125,7 +125,7 @@ "happy-dom": "10.0.3", "intersection-observer": "0.12.2", "micromatch": "4.0.5", - "msw": "2.1.2", + "msw": "2.1.3", "msw-storybook-addon": "1.10.0", "nodemon": "3.0.3", "prettier": "3.2.4", diff --git a/packages/misskey-bubble-game/build.js b/packages/misskey-bubble-game/build.js new file mode 100644 index 000000000..4744dfaf7 --- /dev/null +++ b/packages/misskey-bubble-game/build.js @@ -0,0 +1,31 @@ +import { build } from "esbuild"; +import { globSync } from "glob"; + +const entryPoints = globSync("./src/**/**.{ts,tsx}"); + +/** @type {import('esbuild').BuildOptions} */ +const options = { + entryPoints, + minify: true, + outdir: "./built/esm", + target: "es2022", + platform: "browser", + format: "esm", +}; + +if (process.env.WATCH === "true") { + options.watch = { + onRebuild(error, result) { + if (error) { + console.error("watch build failed:", error); + } else { + console.log("watch build succeeded:", result); + } + }, + }; +} + +build(options).catch((err) => { + process.stderr.write(err.stderr); + process.exit(1); +}); diff --git a/packages/misskey-bubble-game/package.json b/packages/misskey-bubble-game/package.json index f1c7aaabb..d42ca46d4 100644 --- a/packages/misskey-bubble-game/package.json +++ b/packages/misskey-bubble-game/package.json @@ -13,18 +13,21 @@ } }, "scripts": { - "build": "npm run ts", - "ts": "npm run ts-esm && npm run ts-dts", - "ts-esm": "tsc --outDir built/esm", - "ts-dts": "tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true", - "watch": "nodemon -w src -e ts,js,cjs,mjs,json --exec \"pnpm run build\"", + "build": "node ./build.js", + "build:tsc": "npm run tsc", + "tsc": "npm run ts-esm && npm run ts-dts", + "tsc-esm": "tsc --outDir built/esm", + "tsc-dts": "tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true", + "watch": "nodemon -w src -e ts,js,cjs,mjs,json --exec \"pnpm run build:tsc\"", "eslint": "eslint . --ext .js,.jsx,.ts,.tsx", "typecheck": "tsc --noEmit", "lint": "pnpm typecheck && pnpm eslint" }, "devDependencies": { "@misskey-dev/eslint-plugin": "1.0.0", + "@types/matter-js": "0.19.6", "@types/node": "20.11.5", + "@types/seedrandom": "3.0.8", "@typescript-eslint/eslint-plugin": "6.18.1", "@typescript-eslint/parser": "6.18.1", "eslint": "8.56.0", @@ -35,9 +38,9 @@ "built" ], "dependencies": { - "@types/matter-js": "0.19.6", - "@types/seedrandom": "3.0.8", + "esbuild": "0.19.11", "eventemitter3": "5.0.1", + "glob": "^10.3.10", "matter-js": "0.19.0", "seedrandom": "3.0.5" } diff --git a/packages/misskey-reversi/.eslintrc.cjs b/packages/misskey-reversi/.eslintrc.cjs index e2e31e9e3..db37a0109 100644 --- a/packages/misskey-reversi/.eslintrc.cjs +++ b/packages/misskey-reversi/.eslintrc.cjs @@ -1,4 +1,5 @@ module.exports = { + root: true, parserOptions: { tsconfigRootDir: __dirname, project: ['./tsconfig.json'], diff --git a/packages/misskey-reversi/build.js b/packages/misskey-reversi/build.js new file mode 100644 index 000000000..4744dfaf7 --- /dev/null +++ b/packages/misskey-reversi/build.js @@ -0,0 +1,31 @@ +import { build } from "esbuild"; +import { globSync } from "glob"; + +const entryPoints = globSync("./src/**/**.{ts,tsx}"); + +/** @type {import('esbuild').BuildOptions} */ +const options = { + entryPoints, + minify: true, + outdir: "./built/esm", + target: "es2022", + platform: "browser", + format: "esm", +}; + +if (process.env.WATCH === "true") { + options.watch = { + onRebuild(error, result) { + if (error) { + console.error("watch build failed:", error); + } else { + console.log("watch build succeeded:", result); + } + }, + }; +} + +build(options).catch((err) => { + process.stderr.write(err.stderr); + process.exit(1); +}); diff --git a/packages/misskey-reversi/package.json b/packages/misskey-reversi/package.json index 21421e863..9f2949363 100644 --- a/packages/misskey-reversi/package.json +++ b/packages/misskey-reversi/package.json @@ -13,11 +13,12 @@ } }, "scripts": { - "build": "npm run ts", - "ts": "npm run ts-esm && npm run ts-dts", - "ts-esm": "tsc --outDir built/esm", - "ts-dts": "tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true", - "watch": "nodemon -w src -e ts,js,cjs,mjs,json --exec \"pnpm run build\"", + "build": "node ./build.js", + "build:tsc": "npm run ts", + "tsc": "npm run ts-esm && npm run ts-dts", + "tsc-esm": "tsc --outDir built/esm", + "tsc-dts": "tsc --outDir built/dts --declaration true --emitDeclarationOnly true --declarationMap true", + "watch": "nodemon -w src -e ts,js,cjs,mjs,json --exec \"pnpm run build:tsc\"", "eslint": "eslint . --ext .js,.jsx,.ts,.tsx", "typecheck": "tsc --noEmit", "lint": "pnpm typecheck && pnpm eslint" @@ -31,6 +32,10 @@ "nodemon": "3.0.3", "typescript": "5.3.3" }, + "dependencies": { + "esbuild": "0.19.11", + "glob": "^10.3.10" + }, "files": [ "built" ] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9be4422f8..2e66b8324 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 2.1.0 version: 2.1.0 systeminformation: - specifier: 5.21.23 - version: 5.21.23 + specifier: 5.21.24 + version: 5.21.24 tinycolor2: specifier: 1.6.0 version: 1.6.0 @@ -702,11 +702,11 @@ importers: specifier: 15.0.0 version: 15.0.0 '@vitejs/plugin-vue': - specifier: 5.0.2 - version: 5.0.2(vite@5.0.12)(vue@3.4.15) + specifier: 5.0.3 + version: 5.0.3(vite@5.0.12)(vue@3.4.15) '@vue/compiler-sfc': - specifier: 3.4.3 - version: 3.4.3 + specifier: 3.4.15 + version: 3.4.15 aiscript-vscode: specifier: github:aiscript-dev/aiscript-vscode#v0.0.6 version: github.com/aiscript-dev/aiscript-vscode/b5a8aa0ad927831a0b867d1c183460a14e6c48cd @@ -816,8 +816,8 @@ importers: specifier: 3.1.0 version: 3.1.0 three: - specifier: 0.160.0 - version: 0.160.0 + specifier: 0.160.1 + version: 0.160.1 throttle-debounce: specifier: 5.0.0 version: 5.0.0 @@ -911,7 +911,7 @@ importers: version: 7.6.10(typescript@5.3.3)(vite@5.0.12)(vue@3.4.15) '@testing-library/vue': specifier: 8.0.1 - version: 8.0.1(@vue/compiler-sfc@3.4.3)(vue@3.4.15) + version: 8.0.1(@vue/compiler-sfc@3.4.15)(vue@3.4.15) '@types/escape-regexp': specifier: 0.0.3 version: 0.0.3 @@ -988,11 +988,11 @@ importers: specifier: 4.0.5 version: 4.0.5 msw: - specifier: 2.1.2 - version: 2.1.2(typescript@5.3.3) + specifier: 2.1.3 + version: 2.1.3(typescript@5.3.3) msw-storybook-addon: specifier: 1.10.0 - version: 1.10.0(msw@2.1.2) + version: 1.10.0(msw@2.1.3) nodemon: specifier: 3.0.3 version: 3.0.3 @@ -1032,15 +1032,15 @@ importers: packages/misskey-bubble-game: dependencies: - '@types/matter-js': - specifier: 0.19.6 - version: 0.19.6 - '@types/seedrandom': - specifier: 3.0.8 - version: 3.0.8 + esbuild: + specifier: 0.19.11 + version: 0.19.11 eventemitter3: specifier: 5.0.1 version: 5.0.1 + glob: + specifier: ^10.3.10 + version: 10.3.10 matter-js: specifier: 0.19.0 version: 0.19.0 @@ -1051,9 +1051,15 @@ importers: '@misskey-dev/eslint-plugin': specifier: 1.0.0 version: 1.0.0(@typescript-eslint/eslint-plugin@6.18.1)(@typescript-eslint/parser@6.18.1)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + '@types/matter-js': + specifier: 0.19.6 + version: 0.19.6 '@types/node': specifier: 20.11.5 version: 20.11.5 + '@types/seedrandom': + specifier: 3.0.8 + version: 3.0.8 '@typescript-eslint/eslint-plugin': specifier: 6.18.1 version: 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3) @@ -1171,6 +1177,13 @@ importers: version: 5.3.3 packages/misskey-reversi: + dependencies: + esbuild: + specifier: 0.19.11 + version: 0.19.11 + glob: + specifier: ^10.3.10 + version: 10.3.10 devDependencies: '@misskey-dev/eslint-plugin': specifier: 1.0.0 @@ -7488,7 +7501,7 @@ packages: '@testing-library/dom': 9.3.4 dev: true - /@testing-library/vue@8.0.1(@vue/compiler-sfc@3.4.3)(vue@3.4.15): + /@testing-library/vue@8.0.1(@vue/compiler-sfc@3.4.15)(vue@3.4.15): resolution: {integrity: sha512-l51ZEpjTQ6glq3wM+asQ1GbKJMGcxwgHEygETx0aCRN4TjFEGvMZy4YdWKs/y7bu4bmLrxcxhbEPP7iPSW/2OQ==} engines: {node: '>=14'} peerDependencies: @@ -7497,7 +7510,7 @@ packages: dependencies: '@babel/runtime': 7.23.8 '@testing-library/dom': 9.3.4 - '@vue/compiler-sfc': 3.4.3 + '@vue/compiler-sfc': 3.4.15 '@vue/test-utils': 2.4.3(vue@3.4.15) vue: 3.4.15(typescript@5.3.3) transitivePeerDependencies: @@ -7814,6 +7827,7 @@ packages: /@types/matter-js@0.19.6: resolution: {integrity: sha512-ffk6tqJM5scla+ThXmnox+mdfCo3qYk6yMjQsNcrbo6eQ5DqorVdtnaL+1agCoYzxUjmHeiNB7poBMAmhuLY7w==} + dev: true /@types/mdx@2.0.10: resolution: {integrity: sha512-Rllzc5KHk0Al5/WANwgSPl1/CwjqCy+AZrGd78zuK+jO9aDM6ffblZ+zIjgPNAaEBmlO0RYDvLNh7wD0zKVgEg==} @@ -7997,7 +8011,7 @@ packages: /@types/seedrandom@3.0.8: resolution: {integrity: sha512-TY1eezMU2zH2ozQoAFAQFOPpvP15g+ZgSfTZt31AUUH/Rxtnz3H+A/Sv1Snw2/amp//omibc+AEkTaA8KUeOLQ==} - dev: false + dev: true /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} @@ -8286,8 +8300,8 @@ packages: vue: 3.4.15(typescript@5.3.3) dev: true - /@vitejs/plugin-vue@5.0.2(vite@5.0.12)(vue@3.4.15): - resolution: {integrity: sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==} + /@vitejs/plugin-vue@5.0.3(vite@5.0.12)(vue@3.4.15): + resolution: {integrity: sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.0.0 @@ -8384,27 +8398,12 @@ packages: estree-walker: 2.0.2 source-map-js: 1.0.2 - /@vue/compiler-core@3.4.3: - resolution: {integrity: sha512-u8jzgFg0EDtSrb/hG53Wwh1bAOQFtc1ZCegBpA/glyvTlgHl+tq13o1zvRfLbegYUw/E4mSTGOiCnAJ9SJ+lsg==} - dependencies: - '@babel/parser': 7.23.6 - '@vue/shared': 3.4.3 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.0.2 - /@vue/compiler-dom@3.4.15: resolution: {integrity: sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==} dependencies: '@vue/compiler-core': 3.4.15 '@vue/shared': 3.4.15 - /@vue/compiler-dom@3.4.3: - resolution: {integrity: sha512-oGF1E9/htI6JWj/lTJgr6UgxNCtNHbM6xKVreBWeZL9QhRGABRVoWGAzxmtBfSOd+w0Zi5BY0Es/tlJrN6WgEg==} - dependencies: - '@vue/compiler-core': 3.4.3 - '@vue/shared': 3.4.3 - /@vue/compiler-sfc@3.4.15: resolution: {integrity: sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==} dependencies: @@ -8418,31 +8417,12 @@ packages: postcss: 8.4.33 source-map-js: 1.0.2 - /@vue/compiler-sfc@3.4.3: - resolution: {integrity: sha512-NuJqb5is9I4uzv316VRUDYgIlPZCG8D+ARt5P4t5UDShIHKL25J3TGZAUryY/Aiy0DsY7srJnZL5ryB6DD63Zw==} - dependencies: - '@babel/parser': 7.23.6 - '@vue/compiler-core': 3.4.3 - '@vue/compiler-dom': 3.4.3 - '@vue/compiler-ssr': 3.4.3 - '@vue/shared': 3.4.3 - estree-walker: 2.0.2 - magic-string: 0.30.5 - postcss: 8.4.33 - source-map-js: 1.0.2 - /@vue/compiler-ssr@3.4.15: resolution: {integrity: sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==} dependencies: '@vue/compiler-dom': 3.4.15 '@vue/shared': 3.4.15 - /@vue/compiler-ssr@3.4.3: - resolution: {integrity: sha512-wnYQtMBkeFSxgSSQbYGQeXPhQacQiog2c6AlvMldQH6DB+gSXK/0F6DVXAJfEiuBSgBhUc8dwrrG5JQcqwalsA==} - dependencies: - '@vue/compiler-dom': 3.4.3 - '@vue/shared': 3.4.3 - /@vue/language-core@1.8.27(typescript@5.3.3): resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} peerDependencies: @@ -8493,9 +8473,6 @@ packages: /@vue/shared@3.4.15: resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==} - /@vue/shared@3.4.3: - resolution: {integrity: sha512-rIwlkkP1n4uKrRzivAKPZIEkHiuwY5mmhMJ2nZKCBLz8lTUlE73rQh4n1OnnMurXt1vcUNyH4ZPfdh8QweTjpQ==} - /@vue/test-utils@2.4.3(vue@3.4.15): resolution: {integrity: sha512-F4K7mF+ad++VlTrxMJVRnenKSJmO6fkQt2wpRDiKDesQMkfpniGWsqEi/JevxGBo2qEkwwjvTUAoiGJLNx++CA==} peerDependencies: @@ -14724,17 +14701,17 @@ packages: msgpackr-extract: 3.0.2 dev: false - /msw-storybook-addon@1.10.0(msw@2.1.2): + /msw-storybook-addon@1.10.0(msw@2.1.3): resolution: {integrity: sha512-soCTMTf7DnLeaMnFHPrtVgbyeFTJALVvnDHpzzXpJad+HOzJgQdwU4EAzVfDs1q+X5cVEgxOdAhSMC7ljvnSXg==} peerDependencies: msw: '>=0.35.0 <2.0.0' dependencies: is-node-process: 1.2.0 - msw: 2.1.2(typescript@5.3.3) + msw: 2.1.3(typescript@5.3.3) dev: true - /msw@2.1.2(typescript@5.3.3): - resolution: {integrity: sha512-7OKbeZNFQTCPFe++o+zZHMkQRIUi4D/5N1dAD3lOlaV+2Wpv3Srp3VFrFeH+2ftZJbb4jAiC0caZoW1efr80KQ==} + /msw@2.1.3(typescript@5.3.3): + resolution: {integrity: sha512-ZYOpBIxwnGkYKeGqkk9tI87OgOqYXeRpk5ZBTxJILOTyglVwzSde7E2TOoUlma4Kwu2cwgBEGlZnz0RbZPJuoA==} engines: {node: '>=18'} hasBin: true requiresBuild: true @@ -14763,7 +14740,7 @@ packages: outvariant: 1.4.2 path-to-regexp: 6.2.1 strict-event-emitter: 0.5.1 - type-fest: 4.9.0 + type-fest: 4.10.0 typescript: 5.3.3 yargs: 17.7.2 dev: true @@ -18114,8 +18091,8 @@ packages: resolution: {integrity: sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==} dev: true - /systeminformation@5.21.23: - resolution: {integrity: sha512-hI8W9WoPKgRAahVsfqfqg7H6JyIQXoA5RKOohUSOeyZwG+D0vnLOdXaKAUvdaMaL6CCsfN4x3mQYUIY4Qaalcg==} + /systeminformation@5.21.24: + resolution: {integrity: sha512-xQada8ByGGFoRXJaUptGgddn3i7IjtSdqNdCKzB8xkzsM7pHnfLYBWxkPdGzhZ0Z/l+W1yo+aZQZ74d2isj8kw==} engines: {node: '>=8.0.0'} os: [darwin, linux, win32, freebsd, openbsd, netbsd, sunos, android] hasBin: true @@ -18261,8 +18238,8 @@ packages: real-require: 0.2.0 dev: false - /three@0.160.0: - resolution: {integrity: sha512-DLU8lc0zNIPkM7rH5/e1Ks1Z8tWCGRq6g8mPowdDJpw1CFBJMU7UoJjC6PefXW7z//SSl0b2+GCw14LB+uDhng==} + /three@0.160.1: + resolution: {integrity: sha512-Bgl2wPJypDOZ1stAxwfWAcJ0WQf7QzlptsxkjYiURPz+n5k4RBDLsq+6f9Y75TYxn6aHLcWz+JNmwTOXWrQTBQ==} dev: false /throttle-debounce@5.0.0: @@ -18556,8 +18533,8 @@ packages: engines: {node: '>=12.20'} dev: true - /type-fest@4.9.0: - resolution: {integrity: sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==} + /type-fest@4.10.0: + resolution: {integrity: sha512-NPaKJsb4wyJ16qc8zBQrWswLKv/YirgBFykvUQ1Iajt2wd+twC8E4hFXdlIXqiMl6kWA0zY8tUJ9ELVAdu5h7w==} engines: {node: '>=16'} dev: true @@ -19173,7 +19150,7 @@ packages: '@babel/parser': 7.23.6 '@babel/types': 7.23.6 '@vue/compiler-dom': 3.4.15 - '@vue/compiler-sfc': 3.4.3 + '@vue/compiler-sfc': 3.4.15 ast-types: 0.16.1 hash-sum: 2.0.0 lru-cache: 8.0.5