Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit c3e8fe5

Browse files
committed
change test commands & config to use tsx/ESBuild packages for compilation with separate typechecking
works around bugs in TS compiler: @see microsoft/TypeScript#41567
1 parent 0479a6c commit c3e8fe5

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

tests/package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,34 @@
11
{
22
"name": "tests",
33
"version": "0.0.0",
4+
"private": true,
45
"description": "",
56
"main": "index.js",
67
"scripts": {
7-
"test": "TRYORAMA_LOG_LEVEL=debug RUST_BACKTRACE=1 RUST_LOG=holochain::core::ribosome::host_fn::debug=debug TRYORAMA_HOLOCHAIN_PATH=\"holochain\" node --loader ts-node/esm --experimental-specifier-resolution=node src/index.ts"
8+
"test": "npm run test:typecheck && npm run test:integration",
9+
"test:typecheck": "tsc -p ./tsconfig.json",
10+
"test:integration": "TRYORAMA_LOG_LEVEL=debug RUST_BACKTRACE=1 RUST_LOG=holochain::core::ribosome::host_fn::debug=debug TRYORAMA_HOLOCHAIN_PATH=\"holochain\" TS_NODE_PROJECT=./tsconfig.json ../node_modules/tape/bin/tape -r ../node_modules/tsx/dist/preflight.cjs src/**/*.ts | tap-dot"
811
},
912
"author": "",
1013
"license": "CAL-1.0",
1114
"dependencies": {
1215
"@msgpack/msgpack": "^2.7.0",
13-
"esm": "^3.2.25",
1416
"js-base64": "^3.6.1",
1517
"lodash-es": "^4.17.21",
1618
"path": "^0.12.7",
17-
"tape": "^5.2.2",
18-
"ts-node": "^10.6.0",
19-
"typescript": "^4.5.5",
19+
"tape": "^5.6.3",
20+
"typescript": "^5.0.4",
2021
"uuidv4": "^6.2.11"
2122
},
2223
"devDependencies": {
2324
"@holochain/client": "0.12.0",
2425
"@holochain/tryorama": "0.11.0",
26+
"@neighbourhoods/client": "file:../client",
2527
"@types/lodash": "^4.14.158",
2628
"@types/node": "^14.0.14",
29+
"@types/tape-promise": "^4.0.1",
30+
"tap-dot": "^2.0.0",
2731
"tape-promise": "^4.0.0",
28-
"@neighbourhoods/client": "file:../client"
29-
},
30-
"type": "module"
31-
}
32+
"tsx": "^3.12.6"
33+
}
34+
}

tests/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
"moduleResolution": "node",
99
"lib": ["es2017", "dom"],
1010
"sourceMap": true,
11+
"types": [],
1112
/* Strict Type-Checking Options */
1213
"strict": true /* Enable all strict type-checking options. */,
1314
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
1415
"allowSyntheticDefaultImports": true,
1516
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
1617
/* Advanced Options */
1718
"skipLibCheck": true /* Skip type checking of declaration files. */,
18-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
19+
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
20+
"noEmit": true /* Disable output so we can use `tsc` to typecheck independently of tsx/ESBuild */
1921
},
2022
"include": [
2123
"src/**/*.ts",

0 commit comments

Comments
 (0)