diff --git a/.vscode/launch.json b/.vscode/launch.json index a411692e8..e9111194b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,11 +13,11 @@ ], }, { - "name": "Debug 2", + "name": "Debug Example: running a test fixture against local ts-node/esm loader", "type": "pwa-node", "request": "launch", "cwd": "${workspaceFolder}/tests/esm", - "runtimeArgs": ["--loader", "ts-node/esm"], + "runtimeArgs": ["--loader", "../../ts-node/esm"], "program": "throw error.ts", "outputCapture": "std", "skipFiles": [ diff --git a/package-lock.json b/package-lock.json index 4afe9815c..8dba42678 100644 --- a/package-lock.json +++ b/package-lock.json @@ -314,11 +314,13 @@ "@cspotcode/source-map-consumer": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==" + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "dev": true }, "@cspotcode/source-map-support": { - "version": "git+https://github.com/cspotcode/node-source-map-support.git#944a35d7c67df45afa3cf3076148017528bf69ba", - "from": "git+https://github.com/cspotcode/node-source-map-support.git#trace-mapping", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.0.tgz", + "integrity": "sha512-pOQRG+w/T1KogjiuO4uqqa+dw/IIb8kDY0ctYfiJstWv7TOTmtuAkx8ZB4YgauDNn2huHR33oruOgi45VcatOg==", "requires": { "@jridgewell/trace-mapping": "0.3.9" } @@ -4264,14 +4266,6 @@ "source-map": "^0.6.0" } }, - "source-map-support-old": { - "version": "npm:@cspotcode/source-map-support@0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", - "requires": { - "@cspotcode/source-map-consumer": "0.8.0" - } - }, "spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", diff --git a/package.json b/package.json index 35a98e5e3..4483c3859 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ } }, "dependencies": { - "@cspotcode/source-map-support": "git+https://github.com/cspotcode/node-source-map-support.git#trace-mapping", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -168,7 +168,6 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "source-map-support-old": "npm:@cspotcode/source-map-support@^0.7.0", "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, diff --git a/src/index.ts b/src/index.ts index 30521dbf5..ff2186ba3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -796,7 +796,6 @@ export function createFromPreloadedConfig( function installSourceMapSupport() { const sourceMapSupport = require('@cspotcode/source-map-support') as typeof _sourceMapSupport; - // require('source-map-support-old') as typeof _sourceMapSupport; sourceMapSupport.install({ environment: 'node', retrieveFile(pathOrUrl: string) { diff --git a/src/test.ts b/src/test.ts deleted file mode 100644 index 92fde1f2b..000000000 --- a/src/test.ts +++ /dev/null @@ -1 +0,0 @@ -throw new Error(); diff --git a/src/test/esm-loader.spec.ts b/src/test/esm-loader.spec.ts index 9be1c5c37..54242abff 100644 --- a/src/test/esm-loader.spec.ts +++ b/src/test/esm-loader.spec.ts @@ -55,8 +55,6 @@ test.suite('esm', (test) => { cwd: join(TEST_DIR, './esm'), } ); - t.log(stdout); - t.log(stderr); expect(err).not.toBe(null); const expectedModuleUrl = pathToFileURL( join(TEST_DIR, './esm/throw error.ts')