Andrew Bradley
Andrew Bradley
I'm thinking about a situation where one loader needs to augment the behavior of a helper function, and another loader needs to pass an implementation of that helper function into...
To override `node:loader_utils` in an ambient loader, do you imagine it aliases the existing `node:loader_utils` -- possibly coming from another loader in the chain -- to a new specifier? And...
It might help to get a usage example for invoking `packageResolve` with a custom implementation of `tryStatSync`, to make sure we're on the same page as far as intended usage...
The situation I'm thinking of is: what's intended implementation when `tryStatSync` needs to be customized within a call to `packageResolve`? Knowing that `packageResolve` is going to call `findPackageJson`, which will...
I'm thinking about virtual filesystem situations. Not sure if that's intended to be done in this way, or via the virtual filesystem hooks. But I like that we got clarification...
It's still my understanding that the thought experiment from https://github.com/nodejs/loaders/pull/89#issuecomment-1162114548 requires composing helper functions from two different loaders into one. This design by itself doesn't seem to fill that need....
The yarn team might have some good insight on the design, since they have similar functions in their yarn PnP API. For example, referring to https://github.com/nodejs/loaders/pull/94#issuecomment-1193385401: > Note that `packageResolve`...
> But I think that’s exactly what popular tools like ts-node are already doing, often depending on a library resolve that provides exactly that. I want to clarify for anyone...
For what it's worth, the relevant files are in `raw` and `dist-raw`. The former are copy-pasted from node, kept there merely for convenience when using the `diff` command. The latter...
Another couple cases that I need to support: * Determining format of `foo.ts` when the only file on disk is `foo.ts` * Determining format of `foo.ts` when both `foo.js` and...