modernize megalodon to target the same ES and TS standards as the rest of the app

This commit is contained in:
Hazelnoot 2025-10-05 23:55:32 -04:00
parent 169d35885c
commit 0861541b18
124 changed files with 2144 additions and 2463 deletions

View file

@ -1,12 +1,17 @@
{
"name": "megalodon",
"type": "module",
"version": "7.0.1",
"private": true,
"description": "Mastodon API client for node.js and browser",
"main": "./lib/src/index.js",
"typings": "./lib/src/index.d.ts",
"scripts": {
"build": "tsc -p ./",
"test": "cross-env NODE_ENV=test jest -u --maxWorkers=3"
"build": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig.json --noEmit",
"lint": "pnpm run typecheck",
"jest": "cross-env NODE_ENV=test node --no-experimental-require-module --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --coverage --detectOpenHandles",
"test": "pnpm run jest"
},
"engines": {
"node": "^22.0.0"
@ -28,42 +33,23 @@
"bugs": {
"url": "https://github.com/h3poteto/megalodon/issues"
},
"jest": {
"moduleFileExtensions": [
"ts",
"js"
],
"moduleNameMapper": {
"^@/(.+)": "<rootDir>/src/$1",
"^~/(.+)": "<rootDir>/$1"
},
"testMatch": [
"**/test/**/*.spec.ts"
],
"preset": "ts-jest/presets/default",
"transform": {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
"tsconfig": "tsconfig.json"
}
]
},
"testEnvironment": "node"
},
"homepage": "https://github.com/h3poteto/megalodon#readme",
"dependencies": {
"axios": "1.12.2",
"dayjs": "1.11.18",
"form-data": "4.0.4",
"oauth": "0.10.2",
"typescript": "5.9.2"
"oauth": "0.10.2"
},
"devDependencies": {
"@jest/globals": "30.1.2",
"@types/jest": "30.0.0",
"@types/node": "22.18.1",
"@types/oauth": "0.9.6",
"jest": "30.1.3",
"jest-mock": "30.0.5",
"jest-worker": "30.1.0",
"ts-jest": "29.4.4"
"ts-jest": "29.4.4",
"ts-node": "10.9.2",
"typescript": "5.9.2"
}
}