Skip to content

Commit e5ca767

Browse files
authored
fix: 依存関係の更新と ESM, vitest への移行 (#48)
* Migrate into ESM & bump deps * Migrate into ESM * Migrate test into vitest * style: Fix lint error * fix: Fix command name * build: Fix build script
1 parent 1994b92 commit e5ca767

43 files changed

Lines changed: 1029 additions & 3777 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

jest.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
11
{
22
"name": "github-secretary",
33
"version": "1.6.0",
4-
"main": "index.js",
4+
"exports": "./index.js",
5+
"type": "module",
56
"repository": "https://github.com/approvers/github-secretary",
67
"author": "MikuroXina <ryosukadnak@gmail.com>",
78
"license": "Apache-2.0",
89
"private": true,
910
"scripts": {
10-
"dev:bot": "ts-node src/bot/apps/release.ts",
11-
"build:bot": "esbuild --outfile=dist/bundle.js --sourcemap --bundle src/bot/apps/release.ts --platform=node --target=es2019 --external:discord.js --external:node-fetch",
11+
"dev:bot": "ts-node --esm src/bot/apps/release.ts",
12+
"build:bot": "esbuild --outfile=dist/bundle.js --format=esm --sourcemap --bundle src/bot/apps/release.ts --platform=node --target=node16 --external:./node_modules/*",
1213
"start:bot": "node dist/bundle.js",
1314
"dev:web": "next ./src/web",
1415
"build:web": "next build ./src/web",
1516
"start:web": "next start ./src/web",
16-
"test": "jest --passWithNoTests",
17+
"test": "vitest run",
1718
"lint": "eslint --ext .ts,.tsx --ignore-path .gitignore --ignore-path .eslintignore ./src/",
1819
"lint:fix": "npm run lint -- --fix"
1920
},
2021
"dependencies": {
21-
"@babel/core": "^7.18.2",
22-
"discord.js": "^13.7.0",
23-
"dotenv": "^10.0.0",
24-
"faunadb": "^4.5.4",
22+
"@babel/core": "^7.18.5",
23+
"discord.js": "^13.8.0",
24+
"dotenv": "^16.0.1",
25+
"faunadb": "^4.6.0",
2526
"mutex-promise": "^0.1.0",
26-
"next": "^11.1.4",
27-
"node-fetch": "^2.6.7",
28-
"react": "^17.0.2",
29-
"react-dom": "^17.0.2",
27+
"next": "^12.1.6",
28+
"node-fetch": "^3.2.6",
29+
"react": "^18.2.0",
30+
"react-dom": "^18.2.0",
3031
"toml": "^3.0.0"
3132
},
3233
"devDependencies": {
3334
"@next/eslint-plugin-next": "^12.1.6",
34-
"@types/jest": "^27.5.1",
35-
"@types/node": "^16.11.36",
36-
"@types/node-fetch": "^2.6.1",
37-
"@types/react": "^17.0.45",
38-
"@typescript-eslint/eslint-plugin": "^4.33.0",
39-
"@typescript-eslint/parser": "^4.33.0",
40-
"esbuild": "~0.14.42",
41-
"eslint": "^7.32.0",
42-
"eslint-config-next": "^11.1.4",
35+
"@types/node": "^18.0.0",
36+
"@types/node-fetch": "^2.6.2",
37+
"@types/react": "^18.0.14",
38+
"@typescript-eslint/eslint-plugin": "^5.28.0",
39+
"@typescript-eslint/parser": "^5.28.0",
40+
"esbuild": "~0.14.46",
41+
"eslint": "^8.18.0",
42+
"eslint-config-next": "^12.1.6",
4343
"eslint-config-prettier": "^8.5.0",
44-
"eslint-plugin-prettier": "^3.4.1",
44+
"eslint-plugin-prettier": "^4.0.0",
4545
"eslint-plugin-react": "^7.30.0",
46-
"jest": "^27.5.1",
47-
"prettier": "^2.6.2",
48-
"ts-jest": "^27.1.5",
49-
"ts-node": "^10.8.0",
50-
"typescript": "<4.5.0"
46+
"prettier": "^2.7.1",
47+
"ts-node": "^10.8.1",
48+
"typescript": "^4.7.4",
49+
"vitest": "^0.15.1"
5150
}
5251
}

0 commit comments

Comments
 (0)