-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update parse5 to v7 #3602
Conversation
1ff2006
to
6cd54a7
Compare
...late-compiler/src/__tests__/fixtures/parsing-errors/forbidden-embed-tag/actual.html.disabled
Outdated
Show resolved
Hide resolved
6cd54a7
to
73b7317
Compare
...ate-compiler/src/__tests__/fixtures/expression-complex/valid/text-node-adjacency/expected.js
Show resolved
Hide resolved
export type Preprocessor = Omit<Parse5Preprocessor, 'pos'> & { | ||
pos: number; | ||
advance: () => void; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine this with src/parser/expression-complex/html.ts
?
} else { | ||
super.DATA_STATE(codePoint); | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a tracking issue for upstream private
to protected
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue was fixed in inikulin/parse5#996. I can come back in a second PR and remove the type workarounds that are now redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, conditional +1 on a few things:
- We figure out how
<meta>
and<embed>
parsing changed, and if possible maintain the same behavior as before to avoid causing an observable change. - We wait until after CLCO for safety's sake.
73b7317
to
3f850a5
Compare
# Conflicts: # packages/@lwc/template-compiler/package.json
a469249
to
3d13fcc
Compare
Details
This upgrades
parse5
from v6 to v7. Some things worth noting:parse5
upgrade.parse5
's history. They ported to TypeScript, including some refactors of tracking internal logic.parse5
internals were untyped prior to v6, we had our own types in place to provide some guard-rails. Those types are omitted, now thatparse5
internals a typed.private
inparse5
. They're present in the compiled JavaScript, but the type system complains without these workarounds.Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?