-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Description
This issue is extracted from #38551 (comment)
Our test of an old version of devtools-frontend is an odd one for us. It has so many transitional patterns that expose bugs in our JS-handling code that we'd lose with an updated code base. On the other hand, it's likely that fewer and fewer people use those patterns -- probably we should just update and allow support for the old way to bit-rot.
by @sandersn
The background is that the current version of devtools-frontend predates our migration to ES modules. For reference, the currently used version is 530099:
"chrome-devtools-frontend": "1.0.530099" |
That version was published on 2018-01-18. Since then, we have migrated to ES modules. Our NPM package hasn't fully been updated yet with that (CC @paulirish), but I recommend depending on a specific commit of our GitHub clone instead: https://github.com/chromedevtools/devtools-frontend
Why add a new version?
The usage of ES modules makes DevTools "easier" to typecheck. E.g. we are writing more idiomatic code that TypeScript expects. As such, it is better at understanding code and finding potential issues. However, it also uncovers issues in particularly the JSDoc parsing. Examples include #38551, #38550 and #38553
By adding a new version of devtools-frontend, it hopefully prevents such declaration issues from emerging before a new version of TypeScript is released.
Why keep the old version?
As @sandersn commented, there is value in keeping the older 2018 version around. The benefit would be the performance/usage of TypeScript on non-idomatic global-scope-sharing application code. I will leave that up to the TypeScript team to decide whether that is worth keeping around (with the increased maintenance, but potentially better at spotting regressions)