diff --git a/packages/common/.vscode/tasks.json b/packages/common/.vscode/tasks.json index fdba10777..beb462b43 100644 --- a/packages/common/.vscode/tasks.json +++ b/packages/common/.vscode/tasks.json @@ -5,7 +5,6 @@ "label": "npm run build", "type": "npm", "script": "build", - "problemMatcher": [], "group": { "kind": "build", "isDefault": true diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json index 20d4e9e49..3147ea9c6 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -10,8 +10,8 @@ "module": "ESNext", // Required for enabling JavaScript import assertion support "declaration": true, "declarationMap": true, - "outDir": "dist/esm", "declarationDir": "dist/types", + "outDir": "dist/esm", "sourceMap": true, // `NodeNext` will throw compilation errors if relative import paths are missing file extension // reference: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js @@ -19,6 +19,6 @@ "esModuleInterop": true }, "include": [ - "./src", + "src", ] } \ No newline at end of file diff --git a/packages/web5-user-agent/.vscode/launch.json b/packages/web5-user-agent/.vscode/launch.json index e2927b1de..bc398db79 100644 --- a/packages/web5-user-agent/.vscode/launch.json +++ b/packages/web5-user-agent/.vscode/launch.json @@ -11,7 +11,9 @@ "runtimeExecutable": "${workspaceFolder:root}/node_modules/.bin/mocha", "console": "internalConsole", "preLaunchTask": "build tests", - "skipFiles": ["/**"] + "skipFiles": [ + "/**" + ] } ] } \ No newline at end of file diff --git a/packages/web5/.vscode/launch.json b/packages/web5/.vscode/launch.json index 9036e3fe1..666f5afc0 100644 --- a/packages/web5/.vscode/launch.json +++ b/packages/web5/.vscode/launch.json @@ -17,8 +17,10 @@ "name": "test:node", "runtimeExecutable": "${workspaceFolder:root}/node_modules/.bin/mocha", "console": "internalConsole", - "preLaunchTask": "tsc: test", - "skipFiles": ["/**"] + "preLaunchTask": "build tests", + "skipFiles": [ + "/**" + ] } ] } \ No newline at end of file diff --git a/packages/web5/tsconfig.cjs.json b/packages/web5/tsconfig.cjs.json index 6e3977dd3..0384273d6 100644 --- a/packages/web5/tsconfig.cjs.json +++ b/packages/web5/tsconfig.cjs.json @@ -6,8 +6,8 @@ "ES5", ], "target": "ES5", - "outDir": "dist/cjs", "module": "CommonJS", + "outDir": "dist/cjs", "declaration": false, "declarationMap": false, "declarationDir": null diff --git a/web5-js.code-workspace b/web5-js.code-workspace index 28c58b5e4..850885daf 100644 --- a/web5-js.code-workspace +++ b/web5-js.code-workspace @@ -62,9 +62,9 @@ "name": "Test All - Node", "runtimeExecutable": "${workspaceFolder:root}/node_modules/.bin/mocha", "runtimeArgs": [ - "packages/**/__tests__/**/*.spec.js" + "${workspaceFolder:root}/packages/**/tests/compiled/**/*.spec.js" ], - "preLaunchTask": "Build All", + "preLaunchTask": "build tests", "console": "internalConsole", "internalConsoleOptions": "openOnSessionStart", } @@ -83,6 +83,22 @@ "isDefault": true } }, + { + "label": "build tests", + "type": "shell", + "command": "npm", + "args": [ + "run", + "build:tests:node", + "--ws" + ], + "problemMatcher": [ + "$tsc" + ], + "options": { + "cwd": "${workspaceFolder:root}" + } + }, ] } } \ No newline at end of file