You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0e1696f added some code that skips over bad version numbers from caniuse. It looks like we could also use that logic to filter out bad versions supplied through target.
For instance, if you use browserslist-to-esbuild right now it is likely not to work because of the presence of the version safariTP.
[ERROR] Invalid version: "TP"
All version numbers passed to esbuild must be in the format "X", "X.Y", or "X.Y.Z" where X, Y, and Z are non-negative integers.
I don't think esbuild is the correct place to handle this. I think browserslist-to-esbuild shouldn't be generating this value in the first place. The value TP doesn't correspond to any specific version of Safari, so it's unclear what esbuild should be replacing it with.
From what I understand the way browserslist-to-esbuild works is that it gets a list of browser versions from browserslist, filters them to the ones that esbuild supports, and then picks the last one. In this case the last one is safariTP which is invalid, but esbuild would need to fall back to the next-to-last one, except esbuild has no way of knowing what that is. That information is something that browserslist-to-esbuild has to provide because it's the only thing with that information.
Please file a bug with browserslist-to-esbuild about this instead.
0e1696f added some code that skips over bad version numbers from
caniuse
. It looks like we could also use that logic to filter out bad versions supplied throughtarget
.For instance, if you use
browserslist-to-esbuild
right now it is likely not to work because of the presence of the versionsafariTP
.Repro: https://esbuild.github.io/try/#dAAwLjE5LjcAe3RhcmdldDonc2FmYXJpVFAnfQA
The text was updated successfully, but these errors were encountered: