deps: defer to pptr for devtools-protocol version #12534
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #12284, we risk issues with two sets of protocol definitions active in our type system. There's a performance issue (the types are big and we do lots of unioning and narrowing of them...having two of them would mean we'd also do type comparisons of the giant unions/narrowings of two different versions of the protocol), but if the types drift too much we'll also get type errors.
Those errors happen today at the fraggle rock session boundaries if you do
yarn add -D devtools-protocol@latest
to get the latest version of the protocol vs what's currently shipped in puppeteer (release from April 6).I suggested in the last PR that if we are going to go all in on puppeteer for our protocol provider, then we should just defer to them for the protocol version. An easy way is to just use the same version number as them, which this PR is doing, but that's kind of annoying to remember to update every time we bump puppeteer (I guess we could add a CI check).
I was hoping another approach would be to have our version float on
devtools-protocol@*
, butyarn
doesn't show any interest in updating that when you change the other version in the transitive dependency.Anyone else have ideas or completely different approaches to stay in sync?