esbuild 0.8.52
-
Fix a concurrent map write with the
--inject:feature (#878)This release fixes an issue where esbuild could potentially crash sometimes with a concurrent map write when using injected files and entry points that were neither relative nor absolute paths. This was an edge case where esbuild's low-level file subsystem was being used without being behind a mutex lock. This regression was likely introduced in version 0.8.21. The cause of the crash has been fixed.
-
Provide
kindtoonResolveplugins (#879)Plugins that add
onResolvecallbacks now have access to thekindparameter which tells you what kind of import is being resolved. It will be one of the following values:-
"entry-point"in JS (api.ResolveEntryPointin Go)An entry point provided by the user
-
"import-statement"in JS (api.ResolveJSImportStatementin Go)A JavaScript
importorexportstatement -
"require-call"in JS (api.ResolveJSRequireCallin Go)A JavaScript call to
require(...)with a string argument -
"dynamic-import"in JS (api.ResolveJSDynamicImportin Go)A JavaScript
import(...)expression with a string argument -
"require-resolve"in JS (api.ResolveJSRequireResolvein Go)A JavaScript call to
require.resolve(...)with a string argument -
"import-rule"in JS (api.ResolveCSSImportRulein Go)A CSS
@importrule -
"url-token"in JS (api.ResolveCSSURLTokenin Go)A CSS
url(...)token
These values are pretty much identical to the
kindfield in the JSON metadata file. -