esbuild 0.14.37
-
Add support for TypeScript's
moduleSuffixesfield from TypeScript 4.7The upcoming version of TypeScript adds the
moduleSuffixesfield totsconfig.jsonthat introduces more rules to import path resolution. SettingmoduleSuffixesto[".ios", ".native", ""]will try to look at the the relative files./foo.ios.ts,./foo.native.ts, and finally./foo.tsfor an import path of./foo. Note that the empty string""inmoduleSuffixesis necessary for TypeScript to also look-up./foo.ts. This was announced in the TypeScript 4.7 beta blog post. -
Match the new ASI behavior from TypeScript nightly builds (#2188)
This release updates esbuild to match some very recent behavior changes in the TypeScript parser regarding automatic semicolon insertion. For more information, see TypeScript issues #48711 and #48654 (I'm not linking to them directly to avoid Dependabot linkback spam on these issues due to esbuild's popularity). The result is that the following TypeScript code is now considered valid TypeScript syntax:
class A<T> {} new A<number> /* ASI now happens here */ if (0) {} interface B { (a: number): typeof a /* ASI now happens here */ <T>(): void }This fix was contributed by @g-plane.