diff --git a/templates/ts/_package.json b/templates/ts/_package.json index 685c73e..25ade8c 100644 --- a/templates/ts/_package.json +++ b/templates/ts/_package.json @@ -10,6 +10,7 @@ "scripts": { "build": "tsc", "dev": "tsc --watch", + "pretest": "npm run build", "test": "prettier --check . && xo && ava" }, "files": ["dist"], @@ -19,26 +20,34 @@ "react": "^18.2.0" }, "devDependencies": { + "@ava/typescript": "^5.0.0", + "@types/node": "^22.8.2", "@sindresorhus/tsconfig": "^3.0.1", "@types/react": "^18.0.32", "@vdemedes/prettier-config": "^2.0.1", - "ava": "^5.2.0", + "ava": "^6.2.0", "chalk": "^5.2.0", "eslint-config-xo-react": "^0.27.0", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", - "ink-testing-library": "^3.0.0", + "ink-testing-library": "^4.0.0", "prettier": "^2.8.7", "ts-node": "^10.9.1", "typescript": "^5.0.3", "xo": "^0.53.1" }, "ava": { - "extensions": { - "ts": "module", - "tsx": "module" + "typescript": { + "extensions": [ + "ts", + "tsx" + ], + "rewritePaths": { + "source/": "dist/" + }, + "compile": false }, - "nodeArguments": ["--loader=ts-node/esm"] + "require": ["ts-node/register"] }, "xo": { "extends": "xo-react", diff --git a/templates/ts/test.tsx b/templates/ts/source/test.tsx similarity index 100% rename from templates/ts/test.tsx rename to templates/ts/source/test.tsx