File tree Expand file tree Collapse file tree 3 files changed +884
-9018
lines changed Expand file tree Collapse file tree 3 files changed +884
-9018
lines changed Original file line number Diff line number Diff line change 3
3
"license" : " MIT" ,
4
4
"scripts" : {
5
5
"test" : " node --test --import tsx 'tests/**/*.test.ts'" ,
6
- "g:ts-node" : " cd $INIT_CWD && ts-node" ,
7
6
"postinstall" : " node prepare.mjs"
8
7
},
9
8
"devDependencies" : {
10
- "@nrwl/cli" : " ^15.9.7" ,
11
- "@nrwl/js" : " ^15.9.7" ,
12
- "@nrwl/node" : " ^15.9.7" ,
13
- "@nrwl/workspace" : " ^15.9.7" ,
14
9
"@tsconfig/node18" : " ^18.2.4" ,
15
10
"@tsconfig/node22" : " ^22.0.2" ,
16
11
"@types/node" : " ^24.3.0" ,
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
- import { existsSync } from "node:fs" ;
3
- import { symlink } from "node:fs/promises" ;
4
2
import { dirname , resolve } from "node:path" ;
5
3
import { fileURLToPath } from "node:url" ;
6
4
import { patch } from "ts-patch" ;
7
5
8
6
const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ; // https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules
9
7
10
- async function symlinkTsNode ( ) {
11
- // we need to patch the root package node_modules in order for it to locate ts-node for the register tests.
12
- // installing ts-node as a depenency in the root is not an option since it would create two copies of ts-node
13
- // thus messing with the mocks in the tests
14
- const target = resolve ( __dirname , "node_modules/ts-node" ) ;
15
- const path = resolve ( __dirname , "../node_modules/ts-node" ) ;
16
-
17
- if ( ! existsSync ( path ) ) await symlink ( target , path , "junction" ) ;
18
- }
19
-
20
8
function patchTsModules ( ) {
21
9
const rootDir = __dirname ;
22
10
@@ -30,4 +18,3 @@ function patchTsModules() {
30
18
}
31
19
32
20
patchTsModules ( ) ;
33
- await symlinkTsNode ( ) ;
You can’t perform that action at this time.
0 commit comments