tweak misskey-js config

This commit is contained in:
syuilo
2023-03-30 13:46:25 +09:00
parent ffbe896f28
commit ea6f9f1e7d
4 changed files with 82 additions and 286 deletions

View File

@@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"experimental": {
"keepImportAssertions": true
},
"baseUrl": "src",
"paths": {
"@/*": ["*"]
},
"target": "es2022"
},
"minify": false
}

View File

@@ -3,7 +3,7 @@
* https://jestjs.io/docs/en/configuration.html
*/
export default {
module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,
@@ -174,7 +174,7 @@ export default {
// A map from regular expressions to paths to transformers
transform: {
"^.+\\.(ts|tsx)$": "ts-jest"
"^.+\\.(t|j)sx?$": ["@swc/jest"],
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation

View File

@@ -5,43 +5,43 @@
"main": "./built/index.js",
"types": "./built/index.d.ts",
"scripts": {
"build": "tsc",
"tsc": "tsc",
"build": "swc src -d built -D",
"tsd": "tsd",
"api": "pnpm api-extractor run --local --verbose",
"api-prod": "pnpm api-extractor run --verbose",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"eslint": "eslint . --ext .js,.jsx,.ts,.tsx",
"typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && pnpm eslint",
"jest": "jest --coverage --detectOpenHandles",
"test": "pnpm jest && pnpm tsd",
"eslint": "pnpm lint",
"typecheck": "tsc --noEmit"
"test": "pnpm jest && pnpm tsd"
},
"repository": {
"type": "git",
"url": "git+https://github.com/misskey-dev/misskey.js.git"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.19.3",
"@types/jest": "^29.5.0",
"@microsoft/api-extractor": "7.34.4",
"@types/jest": "29.5.0",
"@types/node": "18.15.11",
"@typescript-eslint/eslint-plugin": "5.57.0",
"@typescript-eslint/parser": "5.57.0",
"@swc/jest": "0.2.24",
"eslint": "8.37.0",
"jest": "^29.5.0",
"jest-fetch-mock": "^3.0.3",
"jest-websocket-mock": "^2.2.1",
"mock-socket": "^9.0.8",
"ts-jest": "^29.0.5",
"ts-node": "10.4.0",
"tsd": "^0.19.1",
"jest-websocket-mock": "2.4.0",
"mock-socket": "9.2.1",
"tsd": "0.28.1",
"typescript": "5.0.2"
},
"files": [
"built"
],
"dependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "1.3.42",
"autobind-decorator": "^2.4.0",
"eventemitter3": "^4.0.7",
"eventemitter3": "5.0.0",
"reconnecting-websocket": "^4.4.0"
}
}