esbuild 0.8.56
-
Fix a discrepancy with esbuild's
tsconfig.jsonimplementation (#913)If a
tsconfig.jsonfile contains a"baseUrl"value and"extends"anothertsconfig.jsonfile that contains a"paths"value, the base URL used for interpreting the paths should be the overridden value. Previously esbuild incorrectly used the inherited value, but with this release esbuild will now use the overridden value instead. -
Work around the Jest testing framework breaking node's
BufferAPI (#914)Running esbuild within a Jest test fails because Jest causes
Bufferinstances to not be consideredUint8Arrayinstances, which then breaks the code esbuild uses to communicate with its child process. More info is here: https://github.com/facebook/jest/issues/4422. This release contains a workaround that copies eachBufferobject into aUint8Arrayobject when this invariant is broken. That should prevent esbuild from crashing when it's run from within a Jest test. -
Better handling of implicit
mainfields inpackage.jsonIf esbuild's automatic
mainvs.moduledetection is enabled forpackage.jsonfiles, esbuild will now useindex.jsas an implicitmainfield if themainfield is missing butindex.jsis present. This means if apackage.jsonfile only contains amodulefield but not amainfield and the package is imported using both an ESMimportstatement and a CommonJSrequirecall, theindex.jsfile will now be picked instead of the file in themodulefield.