Andrew Bradley

Results 546 comments of Andrew Bradley
trafficstars

One note about the `NODE_OPTIONS` example, it gets messier in practice. `ts-node/esm` is resolved relative to the working directory, not the target script nor a global install dir. Keeping in...

We're discussing in Slack and in nodejs/loaders if we should empower `node --import` to handle some of the things that entrypoint hooks would do, or if it should be a...

Do you think something like this pseudocode can work to support CJS? ``` // entrypoint-hooks.cjs const {waitForTask} = require('entrypoint-hooks-api'); waitForTask(new Promise((res, rej) => { /* initialization logic */}); ```

I might be misunderstanding the goals, but I think there were two competing requirements: a) allow hooks a clear way to finish their async initialization *before* the entrypoint runs b)...

Might be some confusion here between "hooks installer" and "loader hooks," since the former will probably execute within the main thread, and the latter will probably move off-thread. I am...

> some of the order of the events for the first run of the event loop would be different. Interesting, where would the authors of this ticket suggest I go...

To support ESM in watch mode, I think you will need to implement your own ESM loader hook. It can append query params to each imported module, effectively making them...

Moving to Github Actions means running everything in docker, which conveniently means a consistent environment for running stuff locally, too. So e.g. folks on Windows can publish as long as...

Even on Windows without WSL, that should work correctly. On Sat, Jan 18, 2020, 1:41 AM Juerg B. wrote: > @cspotcode Interesting. > On my Windows I have WSL2.0 /...

> Custom types (describing the shape of a plain object or the signature of a callback) are accomplished via @typedef. We should also be able to sprinkle type-only `.ts` files...