Antoine du Hamel

Results 948 comments of Antoine du Hamel

``` src/node_sqlite.cc:383: Tab found; better to use spaces [whitespace/tab] [1] src/node_sqlite.cc:475: Lines should be

> What would the value be in a Worker thread? Good question! With the current implementation, it is `true` for the Worker entry point, and `false` for sub-modules. To check...

@jkrems regarding your first point, having a way to tell if current module is the entry point is a motivation clearly stated in the [`import.meta` proposal](https://github.com/tc39/proposal-import-meta#am-i-the-main-module). The way I understand...

Do we want to reconsider this? Asking because it's been recently brought up in https://github.com/nodejs/node/issues/34882, it seems there are users looking for it.

> The code inside of the block is a test itself, will only ever run as a subprocess[…]. It doesn't allow running multiple tests inside of the same process (or...

> I don't think that's true. It's fairly simple to run a file using export main in the browser: Yes sorry, I meant the fact that the HTML standard might...

@jkrems With this PR implementation, you can do: `new Worker('./moduleAsMain.mjs')`. Does this address your concern?

> This implementation of `import.meta.main` doesn't replicate them though. Why though? If someone is writing a custom loader, it doesn't seem very complicated to replace `import.meta.main` with `true` or `false`...

A few questions come to mind: - Are we making an exception for TS only, or are we open to adding more file extensions custom error message in the future?...

@GeoffreyBooth let's imagine that the solution ends up looking like that (oversimplification): ```js if (entryPoint.endsWith('.ts')) { process.argv.unshift(entryPoint); entryPoint = '~/.node/typescript-node-core/bin.js'; } ``` Sure `typescript-node-core` will probably use loaders, but that's...