Andrew Bradley

Results 546 comments of Andrew Bradley
trafficstars

I like that plan: opt-in via a flag today, enable by default in the next major version, get feedback in the meantime. How about `experimentalPathMapping: 'both' | 'cjs' | 'esm'...

I see that tsconfig-paths does some special-casing for node's built-in modules. I'm not sure if we need to do the same. https://github.com/dividab/tsconfig-paths/blob/0b259d4cf6cffbc03ad362cfc6bb129d040375b7/src/register.ts#L80-L88 Given the following admittedly contrived tsconfig; ``` "paths":...

What if someone is using paths to declare types via `.d.ts` files? For example they want `import "colors"` to resolve to `src/types/colors.d.ts` but they want node to execute `colors` from...

I think we'll need to add a fallback so that when mappings fail, the unmapped specifier is resolved, too. This matches tsc's behavior.

We also need to handle when `baseUrl` is set and `paths` is not. It appears to be equivalent to `paths: {"*": ["*"]}` EDIT: is this `"*": ["*"]` always implied, even...

I found why tsconfig-paths prefers node's builtins: https://github.com/dividab/tsconfig-paths/pull/60 I also did some tests. * the `"*": ["*"]` mapping is implied when the paths object is omitted *or* when the paths...

I've merged #1614 into this PR, meant to establish a common core for `_resolveFilename` hooks. The findings from https://github.com/TypeStrong/ts-node/pull/1585#issuecomment-1022241341 still need to be addressed.

I think we still need to avoid this bug? https://github.com/dividab/tsconfig-paths/issues/56

> I‘m unsure if I’d consider the issue a bug. The issue boils down to: querystring references the core module when not transpiled and references the installed module when transpiled...

Any update on this? Any thoughts on the proposed test coverage? I'm wondering if this will make it in for v10.6.0