Skip to content

Commit

Permalink
refactor: use TypeScript's faster transpileModule
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Oct 13, 2024
1 parent 5c03bd7 commit 72bd099
Show file tree
Hide file tree
Showing 7 changed files with 1,873 additions and 1,844 deletions.
5 changes: 5 additions & 0 deletions .changeset/curly-chicken-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/ts-node-paths": patch
---

Use TypeScript's faster transpileModule
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
39 changes: 21 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,38 +61,41 @@
"path": "cz-conventional-changelog"
}
},
"resolutions": {
"eslint-plugin-markdown": "5.1.0"
},
"dependencies": {
"colorette": "^2.0.20",
"get-tsconfig": "^4.7.6",
"get-tsconfig": "^4.8.1",
"package-up": "^5.0.0",
"ts-node": "11.0.0-beta.1",
"tsconfig-paths": "^4.2.0"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.7",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@hyperse/eslint-config-hyperse": "^1.0.10",
"@types/node": "^20.14.11",
"commitizen": "4.3.0",
"@changesets/cli": "2.27.9",
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@hyperse/eslint-config-hyperse": "^1.1.3",
"@types/node": "^22.7.5",
"commitizen": "4.3.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "^9.7.0",
"execa": "^9.3.0",
"husky": "9.1.1",
"lint-staged": "15.2.7",
"eslint": "^9.12.0",
"execa": "^9.4.0",
"husky": "9.1.6",
"lint-staged": "15.2.10",
"npm-run-all": "^4.1.5",
"tsup": "^8.2.1",
"tsx": "^4.16.2",
"typescript": "^5.5.3",
"vite": "^5.3.4",
"vitest": "^2.0.3"
"tsup": "^8.3.0",
"tsx": "^4.19.1",
"typescript": "^5.6.3",
"vite": "^5.4.8",
"vitest": "^2.1.2"
},
"packageManager": "yarn@4.5.0",
"engines": {
"node": ">=20"
},
"publishConfig": {
"access": "public"
},
"packageManager": "yarn@4.3.1"
}
}
6 changes: 6 additions & 0 deletions src/loader/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ if (process.env.TS_NODE_PROJECT) {
delete process.env.TS_NODE_PROJECT;
}

// Skip project config resolution and loading
process.env.TS_NODE_SKIP_PROJECT = 'true';

// https://github.com/TypeStrong/ts-node?tab=readme-ov-file#typechecking
// Use TypeScript's faster transpileModule
process.env.TS_NODE_TRANSPILE_ONLY = 'true';

process.env.TS_NODE_COMPILER_OPTIONS = JSON.stringify(pathAlias.opts);

register('@hyperse/ts-node-paths/esm', pathToFileURL('./'));
Loading

0 comments on commit 72bd099

Please sign in to comment.