refactor(devtools): move qwik dom protocol constants into the shared kit - #8825
Open
Aejkatappaja wants to merge 3 commits into
Open
refactor(devtools): move qwik dom protocol constants into the shared kit#8825Aejkatappaja wants to merge 3 commits into
Aejkatappaja wants to merge 3 commits into
Conversation
QWIK_CONTAINER_SELECTOR, V2_BINDING_ATTR, and QWIK_ATTR described shared framework/devtools protocol details but lived only in the browser extension. Move them into @qwik.dev/devtools/kit (protocol/dom.ts) and import them in the extension content script from there, so the extension and future consumers share one source of truth.
🦋 Changeset detectedLatest commit: e1015cc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@qwik.dev/core
@qwik.dev/router
eslint-plugin-qwik
create-qwik
@qwik.dev/optimizer
@qwik.dev/devtools
commit: |
Contributor
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Contributor
|
done @wmertens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
QWIK_CONTAINER_SELECTOR,V2_BINDING_ATTR, andQWIK_ATTRdescribe shared Qwik DOM / devtools protocol details, but they lived only inpackages/browser-extension/src/shared/constants.ts. Any other devtools consumer would have to redeclare them.Solution
@qwik.dev/devtools/kitasprotocol/dom.ts, exported through the kit barrel.@qwik.dev/devtools/kitand delete the extension-localconstants.ts(its only consumer).They are kept as a standalone DOM/container protocol module rather than folded into
QWIK_VNODE_PROTOCOL: the values are a different semantic layer (container attributes vs vnode serialization), and a couple of incidental value overlaps (:,q:id) are intentional.Note: the Qwik framework declares most of these names internally (
markers.ts:QContainerAttr,QBaseAttr,QManifestHash,QInstance), but they are not exported from@qwik.dev/core, so kit cannot import them;q:render/q:versionand the exclusion selector have no core constant at all. The kit module is the devtools-side source of truth.Verification
.d.mtsexports all three constants.tscon the browser extension passes (only the pre-existing wxtTS2742on the entrypoints remains), socontent.tsresolves the kit imports.shared/constantsimport remains; eslint passes on the touched files.References
QwikDev project board, card "p2 Qwik DOM Constants Duplication Risk": https://github.com/orgs/QwikDev/projects/6/views/1