fix: misskey-js、bubble-game、reversiのビルドをesbuildに統合する (#13600)

* fix: ビルドが遅いパッケージのビルド速度を改善

* dependenciesの整理

* fix ci

* ビルド開始時に古いファイルを消す

* fix ci

* fix ci
This commit is contained in:
おさむのひと 2024-03-30 15:28:19 +09:00 committed by GitHub
parent b35ae97ba7
commit 2a851437ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 421 additions and 281 deletions

View file

@ -92,6 +92,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:tsc
- run: pnpm --filter misskey-reversi run build
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter ${{ matrix.workspace }} run typecheck

View file

@ -56,7 +56,9 @@
"postcss": "8.4.35",
"tar": "6.2.0",
"terser": "5.28.1",
"typescript": "5.3.3"
"typescript": "5.3.3",
"esbuild": "0.19.11",
"glob": "10.3.10"
},
"devDependencies": {
"@types/node": "^20.11.28",

View file

@ -19,5 +19,6 @@
},
"target": "es2022"
},
"minify": false
"minify": false,
"sourceMaps": "inline"
}

View file

@ -5,3 +5,4 @@ node_modules
/jest.config.ts
/test
/test-d
build.js

View file

@ -1,31 +1,105 @@
import * as esbuild from "esbuild";
import { build } from "esbuild";
import { globSync } from "glob";
import { execa } from "execa";
import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { dirname } from "node:path";
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const _package = JSON.parse(fs.readFileSync(_dirname + '/package.json', 'utf-8'));
const entryPoints = globSync("./src/**/**.{ts,tsx}");
/** @type {import('esbuild').BuildOptions} */
const options = {
entryPoints,
minify: true,
outdir: "./built/esm",
target: "es2022",
platform: "browser",
format: "esm",
entryPoints,
minify: process.env.NODE_ENV === 'production',
outdir: "./built",
target: "es2022",
platform: "browser",
format: "esm",
sourcemap: 'linked',
};
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);
}
},
};
// built配下をすべて削除する
fs.rmSync('./built', { recursive: true, force: true });
if (process.argv.map(arg => arg.toLowerCase()).includes("--watch")) {
await watchSrc();
} else {
await buildSrc();
}
build(options).catch((err) => {
process.stderr.write(err.stderr);
process.exit(1);
});
async function buildSrc() {
console.log(`[${_package.name}] start building...`);
await build(options)
.then(it => {
console.log(`[${_package.name}] build succeeded.`);
})
.catch((err) => {
process.stderr.write(err.stderr);
process.exit(1);
});
if (process.env.NODE_ENV === 'production') {
console.log(`[${_package.name}] skip building d.ts because NODE_ENV is production.`);
} else {
await buildDts();
}
console.log(`[${_package.name}] finish building.`);
}
function buildDts() {
return execa(
'tsc',
[
'--project', 'tsconfig.json',
'--outDir', 'built',
'--declaration', 'true',
'--emitDeclarationOnly', 'true',
],
{
stdout: process.stdout,
stderr: process.stderr,
}
);
}
async function watchSrc() {
const plugins = [{
name: 'gen-dts',
setup(build) {
build.onStart(() => {
console.log(`[${_package.name}] detect changed...`);
});
build.onEnd(async result => {
if (result.errors.length > 0) {
console.error(`[${_package.name}] watch build failed:`, result);
return;
}
await buildDts();
});
},
}];
console.log(`[${_package.name}] start watching...`)
const context = await esbuild.context({ ...options, plugins });
await context.watch();
await new Promise((resolve, reject) => {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('SIGKILL', resolve);
process.on('uncaughtException', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();
console.log(`[${_package.name}] finish watching.`);
});
}

View file

@ -2,24 +2,21 @@
"type": "module",
"name": "misskey-bubble-game",
"version": "0.0.1",
"types": "./built/dts/index.d.ts",
"main": "./built/index.js",
"types": "./built/index.d.ts",
"exports": {
".": {
"import": "./built/esm/index.js",
"types": "./built/dts/index.d.ts"
"import": "./built/index.js",
"types": "./built/index.d.ts"
},
"./*": {
"import": "./built/esm/*",
"types": "./built/dts/*"
"import": "./built/*",
"types": "./built/*"
}
},
"scripts": {
"build": "node ./build.js",
"build:tsc": "npm run tsc",
"tsc": "npm run tsc-esm && npm run tsc-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\"",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint . --ext .js,.jsx,.ts,.tsx",
"typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
@ -27,21 +24,22 @@
"devDependencies": {
"@misskey-dev/eslint-plugin": "1.0.0",
"@types/matter-js": "0.19.6",
"@types/node": "20.11.5",
"@types/seedrandom": "3.0.8",
"@types/node": "20.11.5",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"eslint": "8.57.0",
"nodemon": "3.0.2",
"typescript": "5.3.3"
"execa": "8.0.1",
"typescript": "5.3.3",
"esbuild": "0.19.11",
"glob": "10.3.10"
},
"files": [
"built"
],
"dependencies": {
"esbuild": "0.19.11",
"eventemitter3": "5.0.1",
"glob": "^10.3.10",
"matter-js": "0.19.0",
"seedrandom": "3.0.5"
}

View file

@ -6,5 +6,9 @@
import { DropAndFusionGame, Mono } from './game.js';
export {
DropAndFusionGame, Mono,
DropAndFusionGame,
};
export type {
Mono,
};

View file

@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"sourceMap": false,
"outDir": "./built/",
"removeComments": true,
"strict": true,

View file

@ -5,3 +5,4 @@ node_modules
/jest.config.ts
/test
/test-d
build.js

View file

@ -45,7 +45,7 @@
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
*/
"mainEntryPointFilePath": "<projectFolder>/built/dts/index.d.ts",
"mainEntryPointFilePath": "<projectFolder>/built/index.d.ts",
/**
* A list of NPM package names whose exports should be treated as part of this package.

View file

@ -0,0 +1,105 @@
import * as esbuild from "esbuild";
import { build } from "esbuild";
import { globSync } from "glob";
import { execa } from "execa";
import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { dirname } from "node:path";
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const _package = JSON.parse(fs.readFileSync(_dirname + '/package.json', 'utf-8'));
const entryPoints = globSync("./src/**/**.{ts,tsx}");
/** @type {import('esbuild').BuildOptions} */
const options = {
entryPoints,
minify: process.env.NODE_ENV === 'production',
outdir: "./built",
target: "es2022",
platform: "browser",
format: "esm",
sourcemap: 'linked',
};
// built配下をすべて削除する
fs.rmSync('./built', { recursive: true, force: true });
if (process.argv.map(arg => arg.toLowerCase()).includes("--watch")) {
await watchSrc();
} else {
await buildSrc();
}
async function buildSrc() {
console.log(`[${_package.name}] start building...`);
await build(options)
.then(it => {
console.log(`[${_package.name}] build succeeded.`);
})
.catch((err) => {
process.stderr.write(err.stderr);
process.exit(1);
});
if (process.env.NODE_ENV === 'production') {
console.log(`[${_package.name}] skip building d.ts because NODE_ENV is production.`);
} else {
await buildDts();
}
console.log(`[${_package.name}] finish building.`);
}
function buildDts() {
return execa(
'tsc',
[
'--project', 'tsconfig.json',
'--outDir', 'built',
'--declaration', 'true',
'--emitDeclarationOnly', 'true',
],
{
stdout: process.stdout,
stderr: process.stderr,
}
);
}
async function watchSrc() {
const plugins = [{
name: 'gen-dts',
setup(build) {
build.onStart(() => {
console.log(`[${_package.name}] detect changed...`);
});
build.onEnd(async result => {
if (result.errors.length > 0) {
console.error(`[${_package.name}] watch build failed:`, result);
return;
}
await buildDts();
});
},
}];
console.log(`[${_package.name}] start watching...`)
const context = await esbuild.context({ ...options, plugins });
await context.watch();
await new Promise((resolve, reject) => {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('SIGKILL', resolve);
process.on('uncaughtException', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();
console.log(`[${_package.name}] finish watching.`);
});
}

View file

@ -3,23 +3,21 @@
"name": "misskey-js",
"version": "2024.3.1",
"description": "Misskey SDK for JavaScript",
"types": "./built/dts/index.d.ts",
"main": "./built/index.js",
"types": "./built/index.d.ts",
"exports": {
".": {
"import": "./built/esm/index.js",
"types": "./built/dts/index.d.ts"
"import": "./built/index.js",
"types": "./built/index.d.ts"
},
"./*": {
"import": "./built/esm/*",
"types": "./built/dts/*"
"import": "./built/*",
"types": "./built/*"
}
},
"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 ts\"",
"build": "node ./build.js",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"tsd": "tsd",
"api": "pnpm api-extractor run --local --verbose",
"api-prod": "pnpm api-extractor run --verbose",
@ -49,17 +47,16 @@
"mock-socket": "9.3.1",
"ncp": "2.0.0",
"nodemon": "3.1.0",
"execa": "8.0.1",
"tsd": "0.30.7",
"typescript": "5.3.3"
"typescript": "5.3.3",
"esbuild": "0.19.11",
"glob": "10.3.10"
},
"files": [
"built",
"built/esm",
"built/dts"
"built"
],
"dependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "1.3.105",
"eventemitter3": "5.0.1",
"reconnecting-websocket": "4.4.0"
}

View file

@ -3,7 +3,7 @@ import './autogen/apiClientJSDoc.js';
import { SwitchCaseResponseType } from './api.types.js';
import type { Endpoints } from './api.types.js';
export {
export type {
SwitchCaseResponseType,
} from './api.types.js';

View file

@ -1,17 +1,20 @@
import { Endpoints } from './api.types.js';
import { type Endpoints } from './api.types.js';
import Stream, { Connection } from './streaming.js';
import { Channels } from './streaming.types.js';
import { Acct } from './acct.js';
import { type Channels } from './streaming.types.js';
import { type Acct } from './acct.js';
import * as consts from './consts.js';
export {
export type {
Endpoints,
Stream,
Connection as ChannelConnection,
Channels,
Acct,
};
export {
Stream,
Connection as ChannelConnection,
};
export const permissions = consts.permissions;
export const notificationTypes = consts.notificationTypes;
export const noteVisibilities = consts.noteVisibilities;

View file

@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"sourceMap": false,
"outDir": "./built/",
"removeComments": true,
"strict": true,

View file

@ -5,3 +5,4 @@ node_modules
/jest.config.ts
/test
/test-d
build.js

View file

@ -1,31 +1,105 @@
import * as esbuild from "esbuild";
import { build } from "esbuild";
import { globSync } from "glob";
import { execa } from "execa";
import fs from "node:fs";
import { fileURLToPath } from "node:url";
import { dirname } from "node:path";
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const _package = JSON.parse(fs.readFileSync(_dirname + '/package.json', 'utf-8'));
const entryPoints = globSync("./src/**/**.{ts,tsx}");
/** @type {import('esbuild').BuildOptions} */
const options = {
entryPoints,
minify: true,
outdir: "./built/esm",
target: "es2022",
platform: "browser",
format: "esm",
entryPoints,
minify: process.env.NODE_ENV === 'production',
outdir: "./built",
target: "es2022",
platform: "browser",
format: "esm",
sourcemap: 'linked',
};
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);
}
},
};
// built配下をすべて削除する
fs.rmSync('./built', { recursive: true, force: true });
if (process.argv.map(arg => arg.toLowerCase()).includes("--watch")) {
await watchSrc();
} else {
await buildSrc();
}
build(options).catch((err) => {
process.stderr.write(err.stderr);
process.exit(1);
});
async function buildSrc() {
console.log(`[${_package.name}] start building...`);
await build(options)
.then(it => {
console.log(`[${_package.name}] build succeeded.`);
})
.catch((err) => {
process.stderr.write(err.stderr);
process.exit(1);
});
if (process.env.NODE_ENV === 'production') {
console.log(`[${_package.name}] skip building d.ts because NODE_ENV is production.`);
} else {
await buildDts();
}
console.log(`[${_package.name}] finish building.`);
}
function buildDts() {
return execa(
'tsc',
[
'--project', 'tsconfig.json',
'--outDir', 'built',
'--declaration', 'true',
'--emitDeclarationOnly', 'true',
],
{
stdout: process.stdout,
stderr: process.stderr,
}
);
}
async function watchSrc() {
const plugins = [{
name: 'gen-dts',
setup(build) {
build.onStart(() => {
console.log(`[${_package.name}] detect changed...`);
});
build.onEnd(async result => {
if (result.errors.length > 0) {
console.error(`[${_package.name}] watch build failed:`, result);
return;
}
await buildDts();
});
},
}];
console.log(`[${_package.name}] start watching...`)
const context = await esbuild.context({ ...options, plugins });
await context.watch();
await new Promise((resolve, reject) => {
process.on('SIGHUP', resolve);
process.on('SIGINT', resolve);
process.on('SIGTERM', resolve);
process.on('SIGKILL', resolve);
process.on('uncaughtException', reject);
process.on('exit', resolve);
}).finally(async () => {
await context.dispose();
console.log(`[${_package.name}] finish watching.`);
});
}

View file

@ -2,24 +2,21 @@
"type": "module",
"name": "misskey-reversi",
"version": "0.0.1",
"types": "./built/dts/index.d.ts",
"main": "./built/index.js",
"types": "./built/index.d.ts",
"exports": {
".": {
"import": "./built/esm/index.js",
"types": "./built/dts/index.d.ts"
"import": "./built/index.js",
"types": "./built/index.d.ts"
},
"./*": {
"import": "./built/esm/*",
"types": "./built/dts/*"
"import": "./built/*",
"types": "./built/*"
}
},
"scripts": {
"build": "node ./build.js",
"build:tsc": "npm run tsc",
"tsc": "npm run tsc-esm && npm run tsc-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\"",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint . --ext .js,.jsx,.ts,.tsx",
"typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && pnpm eslint"
@ -30,15 +27,16 @@
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"eslint": "8.57.0",
"execa": "8.0.1",
"nodemon": "3.0.2",
"typescript": "5.3.3"
"typescript": "5.3.3",
"esbuild": "0.19.11",
"glob": "10.3.10"
},
"files": [
"built"
],
"dependencies": {
"crc-32": "1.2.2",
"esbuild": "0.19.11",
"glob": "10.3.10"
"crc-32": "1.2.2"
}
}

View file

@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"sourceMap": false,
"outDir": "./built/",
"removeComments": true,
"strict": true,

View file

@ -15,12 +15,18 @@ importers:
cssnano:
specifier: 6.0.5
version: 6.0.5(postcss@8.4.35)
esbuild:
specifier: 0.19.11
version: 0.19.11
execa:
specifier: 8.0.1
version: 8.0.1
fast-glob:
specifier: 3.3.2
version: 3.3.2
glob:
specifier: 10.3.10
version: 10.3.10
ignore-walk:
specifier: 6.0.4
version: 6.0.4
@ -1037,15 +1043,9 @@ importers:
packages/misskey-bubble-game:
dependencies:
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
@ -1071,9 +1071,18 @@ importers:
'@typescript-eslint/parser':
specifier: 7.1.0
version: 7.1.0(eslint@8.57.0)(typescript@5.3.3)
esbuild:
specifier: 0.19.11
version: 0.19.11
eslint:
specifier: 8.57.0
version: 8.57.0
execa:
specifier: 8.0.1
version: 8.0.1
glob:
specifier: 10.3.10
version: 10.3.10
nodemon:
specifier: 3.0.2
version: 3.0.2
@ -1083,12 +1092,6 @@ importers:
packages/misskey-js:
dependencies:
'@swc/cli':
specifier: 0.1.63
version: 0.1.63(@swc/core@1.3.105)
'@swc/core':
specifier: 1.3.105
version: 1.3.105
eventemitter3:
specifier: 5.0.1
version: 5.0.1
@ -1104,7 +1107,7 @@ importers:
version: 1.0.0(@typescript-eslint/eslint-plugin@7.1.0)(@typescript-eslint/parser@7.1.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0)
'@swc/jest':
specifier: 0.2.31
version: 0.2.31(@swc/core@1.3.105)
version: 0.2.31(@swc/core@1.3.107)
'@types/jest':
specifier: 29.5.12
version: 29.5.12
@ -1117,9 +1120,18 @@ importers:
'@typescript-eslint/parser':
specifier: 7.1.0
version: 7.1.0(eslint@8.57.0)(typescript@5.3.3)
esbuild:
specifier: 0.19.11
version: 0.19.11
eslint:
specifier: 8.57.0
version: 8.57.0
execa:
specifier: 8.0.1
version: 8.0.1
glob:
specifier: 10.3.10
version: 10.3.10
jest:
specifier: 29.7.0
version: 29.7.0(@types/node@20.11.22)
@ -1186,12 +1198,6 @@ importers:
crc-32:
specifier: 1.2.2
version: 1.2.2
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
@ -1205,9 +1211,18 @@ importers:
'@typescript-eslint/parser':
specifier: 7.1.0
version: 7.1.0(eslint@8.57.0)(typescript@5.3.3)
esbuild:
specifier: 0.19.11
version: 0.19.11
eslint:
specifier: 8.57.0
version: 8.57.0
execa:
specifier: 8.0.1
version: 8.0.1
glob:
specifier: 10.3.10
version: 10.3.10
nodemon:
specifier: 3.0.2
version: 3.0.2
@ -6669,26 +6684,6 @@ packages:
- supports-color
dev: true
/@swc/cli@0.1.63(@swc/core@1.3.105):
resolution: {integrity: sha512-EM9oxxHzmmsprYRbGqsS2M4M/Gr5Gkcl0ROYYIdlUyTkhOiX822EQiRCpPCwdutdnzH2GyaTN7wc6i0Y+CKd3A==}
engines: {node: '>= 12.13'}
hasBin: true
peerDependencies:
'@swc/core': ^1.2.66
chokidar: 3.5.3
peerDependenciesMeta:
chokidar:
optional: true
dependencies:
'@mole-inc/bin-wrapper': 8.0.1
'@swc/core': 1.3.105
commander: 7.2.0
fast-glob: 3.3.2
semver: 7.5.4
slash: 3.0.0
source-map: 0.7.4
dev: false
/@swc/cli@0.1.63(@swc/core@1.3.107)(chokidar@3.5.3):
resolution: {integrity: sha512-EM9oxxHzmmsprYRbGqsS2M4M/Gr5Gkcl0ROYYIdlUyTkhOiX822EQiRCpPCwdutdnzH2GyaTN7wc6i0Y+CKd3A==}
engines: {node: '>= 12.13'}
@ -6721,14 +6716,6 @@ packages:
dev: false
optional: true
/@swc/core-darwin-arm64@1.3.105:
resolution: {integrity: sha512-buWeweLVDXXmcnfIemH4PGnpjwsDTUGitnPchdftb0u1FU8zSSP/lw/pUCBDG/XvWAp7c/aFxgN4CyG0j7eayA==}
engines: {node: '>=10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
optional: true
/@swc/core-darwin-arm64@1.3.107:
resolution: {integrity: sha512-47tD/5vSXWxPd0j/ZllyQUg4bqalbQTsmqSw0J4dDdS82MWqCAwUErUrAZPRjBkjNQ6Kmrf5rpCWaGTtPw+ngw==}
engines: {node: '>=10'}
@ -6746,14 +6733,6 @@ packages:
dev: false
optional: true
/@swc/core-darwin-x64@1.3.105:
resolution: {integrity: sha512-hFmXPApqjA/8sy/9NpljHVaKi1OvL9QkJ2MbbTCCbJERuHMpMUeMBUWipHRfepGHFhU+9B9zkEup/qJaJR4XIg==}
engines: {node: '>=10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
optional: true
/@swc/core-darwin-x64@1.3.107:
resolution: {integrity: sha512-hwiLJ2ulNkBGAh1m1eTfeY1417OAYbRGcb/iGsJ+LuVLvKAhU/itzsl535CvcwAlt2LayeCFfcI8gdeOLeZa9A==}
engines: {node: '>=10'}
@ -6782,14 +6761,6 @@ packages:
dev: false
optional: true
/@swc/core-linux-arm-gnueabihf@1.3.105:
resolution: {integrity: sha512-mwXyMC41oMKkKrPpL8uJpOxw7fyfQoVtIw3Y5p0Blabk+espNYqix0E8VymHdRKuLmM//z5wVmMsuHdGBHvZeg==}
engines: {node: '>=10'}
cpu: [arm]
os: [linux]
requiresBuild: true
optional: true
/@swc/core-linux-arm-gnueabihf@1.3.107:
resolution: {integrity: sha512-I2wzcC0KXqh0OwymCmYwNRgZ9nxX7DWnOOStJXV3pS0uB83TXAkmqd7wvMBuIl9qu4Hfomi9aDM7IlEEn9tumQ==}
engines: {node: '>=10'}
@ -6807,14 +6778,6 @@ packages:
dev: false
optional: true
/@swc/core-linux-arm64-gnu@1.3.105:
resolution: {integrity: sha512-H7yEIVydnUtqBSUxwmO6vpIQn7j+Rr0DF6ZOORPyd/SFzQJK9cJRtmJQ3ZMzlJ1Bb+1gr3MvjgLEnmyCYEm2Hg==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
optional: true
/@swc/core-linux-arm64-gnu@1.3.107:
resolution: {integrity: sha512-HWgnn7JORYlOYnGsdunpSF8A+BCZKPLzLtEUA27/M/ZuANcMZabKL9Zurt7XQXq888uJFAt98Gy+59PU90aHKg==}
engines: {node: '>=10'}
@ -6832,14 +6795,6 @@ packages:
dev: false
optional: true
/@swc/core-linux-arm64-musl@1.3.105:
resolution: {integrity: sha512-Jg7RTFT3pGFdGt5elPV6oDkinRy7q9cXpenjXnJnM2uvx3jOwnsAhexPyCDHom8SHL0j+9kaLLC66T3Gz1E4UA==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
optional: true
/@swc/core-linux-arm64-musl@1.3.107:
resolution: {integrity: sha512-vfPF74cWfAm8hyhS8yvYI94ucMHIo8xIYU+oFOW9uvDlGQRgnUf/6DEVbLyt/3yfX5723Ln57U8uiMALbX5Pyw==}
engines: {node: '>=10'}
@ -6857,14 +6812,6 @@ packages:
dev: false
optional: true
/@swc/core-linux-x64-gnu@1.3.105:
resolution: {integrity: sha512-DJghplpyusAmp1X5pW/y93MmS/u83Sx5GrpJxI6KLPa82+NItTgMcl8KBQmW5GYAJpVKZyaIvBanS5TdR8aN2w==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
requiresBuild: true
optional: true
/@swc/core-linux-x64-gnu@1.3.107:
resolution: {integrity: sha512-uBVNhIg0ip8rH9OnOsCARUFZ3Mq3tbPHxtmWk9uAa5u8jQwGWeBx5+nTHpDOVd3YxKb6+5xDEI/edeeLpha/9g==}
engines: {node: '>=10'}
@ -6882,14 +6829,6 @@ packages:
dev: false
optional: true
/@swc/core-linux-x64-musl@1.3.105:
resolution: {integrity: sha512-wD5jL2dZH/5nPNssBo6jhOvkI0lmWnVR4vnOXWjuXgjq1S0AJpO5jdre/6pYLmf26hft3M42bteDnjR4AAZ38w==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
requiresBuild: true
optional: true
/@swc/core-linux-x64-musl@1.3.107:
resolution: {integrity: sha512-mvACkUvzSIB12q1H5JtabWATbk3AG+pQgXEN95AmEX2ZA5gbP9+B+mijsg7Sd/3tboHr7ZHLz/q3SHTvdFJrEw==}
engines: {node: '>=10'}
@ -6907,14 +6846,6 @@ packages:
dev: false
optional: true
/@swc/core-win32-arm64-msvc@1.3.105:
resolution: {integrity: sha512-UqJtwILUHRw2+3UTPnRkZrzM/bGdQtbR4UFdp79mZQYfryeOUVNg7aJj/bWUTkKtLiZ3o+FBNrM/x2X1mJX5bA==}
engines: {node: '>=10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
optional: true
/@swc/core-win32-arm64-msvc@1.3.107:
resolution: {integrity: sha512-J3P14Ngy/1qtapzbguEH41kY109t6DFxfbK4Ntz9dOWNuVY3o9/RTB841ctnJk0ZHEG+BjfCJjsD2n8H5HcaOA==}
engines: {node: '>=10'}
@ -6932,14 +6863,6 @@ packages:
dev: false
optional: true
/@swc/core-win32-ia32-msvc@1.3.105:
resolution: {integrity: sha512-Z95C6vZgBEJ1snidYyjVKnVWiy/ZpPiIFIXGWkDr4ZyBgL3eZX12M6LzZ+NApHKffrbO4enbFyFomueBQgS2oA==}
engines: {node: '>=10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
optional: true
/@swc/core-win32-ia32-msvc@1.3.107:
resolution: {integrity: sha512-ZBUtgyjTHlz8TPJh7kfwwwFma+ktr6OccB1oXC8fMSopD0AxVnQasgun3l3099wIsAB9eEsJDQ/3lDkOLs1gBA==}
engines: {node: '>=10'}
@ -6957,14 +6880,6 @@ packages:
dev: false
optional: true
/@swc/core-win32-x64-msvc@1.3.105:
resolution: {integrity: sha512-3J8fkyDPFsS3mszuYUY4Wfk7/B2oio9qXUwF3DzOs2MK+XgdyMLIptIxL7gdfitXJBH8k39uVjrIw1JGJDjyFA==}
engines: {node: '>=10'}
cpu: [x64]
os: [win32]
requiresBuild: true
optional: true
/@swc/core-win32-x64-msvc@1.3.107:
resolution: {integrity: sha512-Eyzo2XRqWOxqhE1gk9h7LWmUf4Bp4Xn2Ttb0ayAXFp6YSTxQIThXcT9kipXZqcpxcmDwoq8iWbbf2P8XL743EA==}
engines: {node: '>=10'}
@ -6982,30 +6897,6 @@ packages:
dev: false
optional: true
/@swc/core@1.3.105:
resolution: {integrity: sha512-me2VZyr3OjqRpFrYQJJYy7x/zbFSl9nt+MAGnIcBtjDsN00iTVqEaKxBjPBFQV9BDAgPz2SRWes/DhhVm5SmMw==}
engines: {node: '>=10'}
requiresBuild: true
peerDependencies:
'@swc/helpers': ^0.5.0
peerDependenciesMeta:
'@swc/helpers':
optional: true
dependencies:
'@swc/counter': 0.1.1
'@swc/types': 0.1.5
optionalDependencies:
'@swc/core-darwin-arm64': 1.3.105
'@swc/core-darwin-x64': 1.3.105
'@swc/core-linux-arm-gnueabihf': 1.3.105
'@swc/core-linux-arm64-gnu': 1.3.105
'@swc/core-linux-arm64-musl': 1.3.105
'@swc/core-linux-x64-gnu': 1.3.105
'@swc/core-linux-x64-musl': 1.3.105
'@swc/core-win32-arm64-msvc': 1.3.105
'@swc/core-win32-ia32-msvc': 1.3.105
'@swc/core-win32-x64-msvc': 1.3.105
/@swc/core@1.3.107:
resolution: {integrity: sha512-zKhqDyFcTsyLIYK1iEmavljZnf4CCor5pF52UzLAz4B6Nu/4GLU+2LQVAf+oRHjusG39PTPjd2AlRT3f3QWfsQ==}
engines: {node: '>=10'}
@ -7033,17 +6924,6 @@ packages:
/@swc/counter@0.1.1:
resolution: {integrity: sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw==}
/@swc/jest@0.2.31(@swc/core@1.3.105):
resolution: {integrity: sha512-Gh0Ste380O8KUY1IqsKr+aOvqqs2Loa+WcWWVNwl+lhXqOWK1iTFAP1K0IDfLqAuFP68+D/PxcpBJn21e6Quvw==}
engines: {npm: '>= 7.0.0'}
peerDependencies:
'@swc/core': '*'
dependencies:
'@jest/create-cache-key-function': 29.7.0
'@swc/core': 1.3.105
jsonc-parser: 3.2.0
dev: true
/@swc/jest@0.2.31(@swc/core@1.3.107):
resolution: {integrity: sha512-Gh0Ste380O8KUY1IqsKr+aOvqqs2Loa+WcWWVNwl+lhXqOWK1iTFAP1K0IDfLqAuFP68+D/PxcpBJn21e6Quvw==}
engines: {npm: '>= 7.0.0'}

View file

@ -16,35 +16,36 @@ await execa('pnpm', ['clean'], {
stderr: process.stderr,
});
await execa('pnpm', ['build-pre'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await Promise.all([
execa('pnpm', ['build-pre'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
}),
execa('pnpm', ['build-assets'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
}),
execa('pnpm', ['--filter', 'misskey-js', 'build'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
}),
]);
await execa('pnpm', ['build-assets'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await execa('pnpm', ['--filter', 'misskey-js', 'ts'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await execa('pnpm', ['--filter', 'misskey-reversi', 'build:tsc'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await execa('pnpm', ['--filter', 'misskey-bubble-game', 'build:tsc'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
});
await Promise.all([
execa('pnpm', ['--filter', 'misskey-reversi', 'build'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
}),
execa('pnpm', ['--filter', 'misskey-bubble-game', 'build'], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,
}),
]);
execa('pnpm', ['build-pre', '--watch'], {
cwd: _dirname + '/../',