Skip to content

Commit

Permalink
Migrate: Migrate to Hono
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Aug 29, 2024
1 parent f044a7f commit 487dc14
Show file tree
Hide file tree
Showing 14 changed files with 2,059 additions and 3,497 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/frontend-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: frontend/.node-version
node-version-file: .node-version
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: frontend/.node-version
node-version-file: .node-version
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sub-chart-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: sub-chart/.node-version
node-version-file: .node-version
cache: "pnpm"
cache-dependency-path: sub-chart/pnpm-lock.yaml

Expand Down
File renamed without changes.
7 changes: 6 additions & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
"enabled": true
},
"files": {
"ignore": ["./frontend/build", "./frontend/node_modules"]
"ignore": [
"./frontend/build",
"./frontend/node_modules",
"./sub-chart/node_modules",
"./sub-chart/dist"
]
},
"formatter": {
"indentStyle": "space",
Expand Down
24 changes: 0 additions & 24 deletions sub-chart/.eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion sub-chart/.node-version

This file was deleted.

8 changes: 0 additions & 8 deletions sub-chart/.prettierrc.json

This file was deleted.

33 changes: 25 additions & 8 deletions sub-chart/build.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
import * as esbuild from "esbuild"
import { rollup } from "rollup";
import esbuild from "rollup-plugin-esbuild";
import nodeResolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
import terser from "@rollup/plugin-terser";

esbuild.build({
entryPoints: ["./src/index.ts"],
bundle: true,
outfile: "dist/index.js",
platform: "node",
minify: true,
})
const bundle = await rollup({
input: `${import.meta.dirname}/src/index.ts`,
plugins: [
esbuild(),
nodeResolve({
preferBuiltins: true,
}),
commonjs(),
json(),
terser(),
],
});

await bundle.write({
file: `${import.meta.dirname}/dist/index.js`,
format: "es",
});

console.log("Build complete");
40 changes: 19 additions & 21 deletions sub-chart/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "sub-chart",
"version": "1.0.0",
"type": "module",
"description": "",
"main": "dist/index.js",
"exports": {
Expand All @@ -10,42 +11,39 @@
"dev": "tsx watch src/server.ts",
"build": "tsx ./build.ts",
"start": "node ./dist/index.js",
"lint": "eslint --ext .ts .",
"lint:fix": "eslint --ext .ts . --fix",
"test": "vitest",
"typecheck": "tsc --noEmit"
"check": "biome check src *.ts",
"format": "biome check --write src *.ts",
"typecheck": "tsc --noEmit",
"test": "vitest"
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "pnpm@9.9.0",
"dependencies": {
"@sentry/node": "^7.111.0",
"@hono/node-server": "^1.12.2",
"@hono/sentry": "^1.2.0",
"@hono/zod-validator": "^0.2.2",
"axios": "^1.6.8",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"morgan": "^1.10.0",
"hono": "^4.5.9",
"sonolus-pjsekai-engine-extended": "github:sevenc-nanashi/sonolus-pjsekai-engine-extended#build",
"tempy": "^1.0.1",
"url-join": "^4.0.1",
"usctool": "^0.4.1"
"usctool": "^0.4.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/morgan": "^1.9.9",
"@types/node": "^18.19.31",
"@types/supertest": "^2.0.16",
"@biomejs/biome": "^1.8.3",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@types/node": "^22.5.1",
"@types/url-join": "^4.0.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"esbuild": "^0.17.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^4.2.1",
"nodemon": "^2.0.22",
"prettier": "^2.8.8",
"supertest": "^6.3.4",
"rollup": "^4.21.1",
"rollup-plugin-esbuild": "^6.1.1",
"terser": "^5.30.3",
"tsx": "^4.7.2",
"typescript": "^4.9.5",
Expand Down
Loading

0 comments on commit 487dc14

Please sign in to comment.