isaacs

Results 386 comments of isaacs

Not sure what kind of test should be added for this, since it just returns a string. Just comparing against a fixture feels kind of redundant?

Hm, this definitely needs a bit more work, because it _breaks_ on node versions that _don't_ have the off-thread loader hooks. (Ie, everything before v20.) I'm not sure the best...

@ljharb ooh sneaky, that might work. I'll look into that.

Added a commit to ~~only~~ not add the globalPreload registration on node versions less than 20.0.0. @cspotcode As far as I can tell, with this change, `ts-node --esm file.ts` is...

Got some time to dig into this. The issue with `ts-node --esm blah.mts` seems to have something to do with `lateBindHooks`. In node before v20, this works fine, but in...

Aha, of course. The `callInChild` is running `node --loader=child-loader.js child-entrypoint.js `. `child-loader.js` sets up the proxy hooks, and `child-entrypoint.js` assigns the values to them by calling `bootstrap()` from `../bin`, which...

Ok, got `ts-node --esm foo.mts` working, albeit in a somewhat unfortunate copypasta way. I suggest refactoring to remove the late-binding loaders entirely on all Node versions, and just set them...

I've been trying to throw some complicated scenarios at it, but I'm not sure how to go about triggering the situation you're thinking of here. The userland program isn't ever...

Er, rather, it's not _executed_ on the loader thread. Obviously the code is _loaded_ in the loader thread. But the typechecking happens when it compiles it to JS, and that...

Thinking through the double-checking scenario, I think you're right, but I don't think there's much to be done about it. The good news is, once source-returning commonjs loaders land in...