web
web copied to clipboard
Migrate to parse5/tools package and drop internal copy
Draft until open questions are resolved.
Open questions
What shall we do with the leftovers of the parse5-utils
package in this repo?
The following functions remain:
-
isHtmlFragment
- seems to test by regex if a doc is a fragment or not -
appendToDocument
- seems to be used by the web sockets plugin to append the web socket script to the doc
Of these, isHtmlFragment
i feel should be moved to some other appropriate place in this repo since it isn't actually specific to the AST. it just tests a regex against a string.
The appendToDocument
function should probably stay in this repo too tbh. especially since it consumes a string and doesn't operate directly on an AST, it doesn't seem to fit with the parse5/tools package.
I had to upgrade typescript to consume the new parse5 package
Does that mean mw needs a version bump after this or something? not too sure here.
This also caused DynamicTerminal.ts
to stop building 😭 so i guess typescript changed the interface of Console
and its no longer as loosely typed as it was before. not entirely sure how to sort that yet
cc @daKmoR if you can tag someone who knows these areas of the codebase, that'd be helpful
⚠️ No Changeset found
Latest commit: a0d53a391b8e5c9f2e0e13bf60b23bf635f8f1ab
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
got a bit further with this.
@parse5/tools
package doesn't support cjs and it would be nice to avoid the need to. but i guess our hand might be forced here as it seems like your polyfills-loader package at least depends on CJS