Skip to content
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

fix: update DOMPurify to 2.5.7 #624

Merged
merged 9 commits into from
Oct 25, 2024
Merged

fix: update DOMPurify to 2.5.7 #624

merged 9 commits into from
Oct 25, 2024

Conversation

DiegoCardoso
Copy link
Contributor

Description

Update DOMPurify to the latest 2.X version.

Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated package-lock-p3.json to keep using "lockfileVersion": 2.

Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After converting to P3, I'm now getting errors when running npm run generate-typings:

node_modules/typescript/lib/lib.dom.d.ts:4796:101 - error TS2344: Type 'HTMLElementTagNameMap[K]' does not satisfy the constraint 'Element'.
  Type 'HTMLElement | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | HTMLAnchorElement | ... 69 more ... | ChartElement' is not assignable to type 'Element'.
    Type 'ChartSeriesElement' is missing the following properties from type 'Element': assignedSlot, attributes, classList, className, and 123 more.

4796     getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
                                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:5169:101 - error TS2344: Type 'HTMLElementTagNameMap[K]' does not satisfy the constraint 'Element'.
  Type 'HTMLElement | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | HTMLAnchorElement | ... 69 more ... | ChartElement' is not assignable to type 'Element'.
    Type 'ChartSeriesElement' is not assignable to type 'Element'.

5169     getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
                                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:11335:87 - error TS2344: Type 'HTMLElementTagNameMap[K]' does not satisfy the constraint 'Node'.
  Type 'HTMLElement | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | HTMLAnchorElement | ... 69 more ... | ChartElement' is not assignable to type 'Node'.
    Type 'ChartSeriesElement' is missing the following properties from type 'Node': baseURI, childNodes, firstChild, isConnected, and 47 more.

11335     querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
                                                                                            ~~~~~~~~~~~~~~~~~~~~~~~~
src/vaadin-chart-series.d.ts:64:42 - error TS2304: Cannot find name 'Polymer'.

64 declare class ChartSeriesElement extends Polymer.Element {
                                            ~~~~~~~
src/vaadin-chart.d.ts:29:9 - error TS2304: Cannot find name 'ChartDeepMerger'.

29 export {ChartDeepMerger};
           ~~~~~~~~~~~~~~~
src/vaadin-chart.d.ts:368:3 - error TS2416: Property 'title' in type 'ChartElement' is not assignable to the same property in base type 'PolymerElement'.
  Type 'string | null | undefined' is not assignable to type 'string'.
    Type 'undefined' is not assignable to type 'string'.

368   title: string|null|undefined;
      ~~~~~

Looks like it's caused by declare class ChartSeriesElement extends Polymer.Element in vaadin-chart-series.d.ts

@DiegoCardoso
Copy link
Contributor Author

DiegoCardoso commented Oct 18, 2024

This error seems to be reproducible in master as well. Any idea what it could be?

@web-padawan
Copy link
Member

Nevermind, in V14 we don't publish .d.ts for vaadin-charts e.g. I couldn't find them when installing v6.3.7.

Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Probably could mark this as fix: to indicate it's actually a fix in release notes.

@DiegoCardoso DiegoCardoso changed the title chore: update dompurify to 2.5.7 fix: update dompurify to 2.5.7 Oct 25, 2024
@DiegoCardoso DiegoCardoso changed the title fix: update dompurify to 2.5.7 fix: update DOMPurify to 2.5.7 Oct 25, 2024
@DiegoCardoso DiegoCardoso merged commit ca45c00 into master Oct 25, 2024
4 checks passed
@DiegoCardoso DiegoCardoso deleted the chore/update-dompurify branch October 25, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants