node/test/fixtures/source-map/ts-node.ts
77e3dfca5c
lib: don't parse windows drive letters as schemes
We were incorrectly parsing windows drive letters as schemes. This was
polluting the source map cache with malformed file paths.

Fixes: https://github.com/nodejs/node/issues/50523
PR-URL: https://github.com/nodejs/node/pull/50580
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-12-05 09:24:14 +00:00

11 lines
372 B
TypeScript

function foo(str: string) {
return str;
}
foo('noop');
// To recreate (Windows only):
//
// const filePath = require.resolve('./test/fixtures/source-map/ts-node.ts');
// const compiled = require('ts-node').create({ transpileOnly: true }).compile(fs.readFileSync(filePath, 'utf8'), filePath);
// fs.writeFileSync('test/fixtures/source-map/ts-node-win32.js', compiled);