Skip to content

Commit 6f05273

Browse files
committed
some clean up
1 parent 1d860a9 commit 6f05273

File tree

3 files changed

+884
-9018
lines changed

3 files changed

+884
-9018
lines changed

test/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
"license": "MIT",
44
"scripts": {
55
"test": "node --test --import tsx 'tests/**/*.test.ts'",
6-
"g:ts-node": "cd $INIT_CWD && ts-node",
76
"postinstall": "node prepare.mjs"
87
},
98
"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",
149
"@tsconfig/node18": "^18.2.4",
1510
"@tsconfig/node22": "^22.0.2",
1611
"@types/node": "^24.3.0",

test/prepare.mjs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
// @ts-check
2-
import { existsSync } from "node:fs";
3-
import { symlink } from "node:fs/promises";
42
import { dirname, resolve } from "node:path";
53
import { fileURLToPath } from "node:url";
64
import { patch } from "ts-patch";
75

86
const __dirname = dirname(fileURLToPath(import.meta.url)); // https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules
97

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-
208
function patchTsModules() {
219
const rootDir = __dirname;
2210

@@ -30,4 +18,3 @@ function patchTsModules() {
3018
}
3119

3220
patchTsModules();
33-
await symlinkTsNode();

0 commit comments

Comments
 (0)