thread-stream
Advanced tools
Comparing version 0.15.1 to 0.15.2
@@ -22,6 +22,5 @@ 'use strict' | ||
try { | ||
// TODO: fix loading .ts files in Windows. See: ../test/ts.test.ts | ||
if (filename.endsWith('.ts') || filename.endsWith('.cts')) { | ||
// TODO: add support for the TSM modules loader ( https://github.com/lukeed/tsm ). | ||
if (process[Symbol.for('ts-node.register.instance')]) { | ||
if (!process[Symbol.for('ts-node.register.instance')]) { | ||
realRequire('ts-node/register') | ||
@@ -32,3 +31,4 @@ } else if (process.env.TS_NODE_DEV) { | ||
// TODO: Support ES imports once tsc, tap & ts-node provide better compatibility guarantees. | ||
fn = realRequire(decodeURIComponent(filename.replace('file://', ''))) | ||
// Remove extra forwardslash on Windows | ||
fn = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) | ||
} else { | ||
@@ -35,0 +35,0 @@ fn = (await realImport(filename)) |
{ | ||
"name": "thread-stream", | ||
"version": "0.15.1", | ||
"version": "0.15.2", | ||
"description": "A streaming way to send data to a Node.js Worker Thread", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,8 +9,2 @@ import { test } from 'tap' | ||
test('typescript module', function (t) { | ||
if (process.platform === 'win32') { | ||
// TODO: Implement .ts files loading support for Windows | ||
t.plan(0) | ||
return | ||
} | ||
t.plan(5) | ||
@@ -17,0 +11,0 @@ |
55275
1635