kkomelin / isomorphic-dompurify

Use DOMPurify on server and client in the same way
MIT License
423 stars 13 forks source link

Remove Deprecated Type Dependency #301

Open Bro3Simon opened 1 week ago

Bro3Simon commented 1 week ago
  "dependencies": {
    "@types/dompurify": "^3.0.5",

https://www.npmjs.com/package/@types/dompurify

This deprecated type dependency causes TS to throw an error: Cannot find type definition file for 'dompurify'. The file is in the program because: Entry point for implicit type library 'dompurify'

This is caused because @types/dompurify doesn't have an index file. This is documented here: https://devblogs.microsoft.com/typescript/announcing-typescript-5-1-beta/#explicit-typeroots-disables-upward-walks-for-node_modules/@types

Just run npm uninstall @types/dompurify to fix.

kkomelin commented 5 days ago

Thanks @Bro3Simon for the suggestion. I'll work on it now

kkomelin commented 5 days ago

@Bro3Simon please test with the new version https://github.com/kkomelin/isomorphic-dompurify/releases/tag/v2.17.0