Skip to content

refactor: change how sanitize from DOMPurify is imported #687

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

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

jourdiw
Copy link
Contributor

@jourdiw jourdiw commented Apr 3, 2025

Issue

https://github.com/gravitee-io/gravitee-ui-components/issues/XXXXX

Description

When upgrading portal-webui to Angular 19, a compile error was thrown:

 [ERROR] No matching export in "node_modules/@gravitee/ui-components/node_modules/dompurify/dist/purify.es.mjs" for import "sanitize"

    node_modules/@gravitee/ui-components/src/lib/text-format.js:43:9:
      43 │ import { sanitize } from 'dompurify';
         ╵          ~~~~~~~~

To fix the error, the import is handled differently in text-format.js.

Additional context


📚  View the storybook of this branch here

Copy link

sonarqubecloud bot commented Apr 3, 2025

@graviteeio
Copy link
Contributor

Gravitee.io Automatic Deployment

A beta version of this package has been published! 🚀

To use it in your project run the following lines:

npm install @gravitee/ui-components@4.3.0-apim-fix-dompurify-error-eb46b36

or

yarn add @gravitee/ui-components@4.3.0-apim-fix-dompurify-error-eb46b36

@jourdiw jourdiw marked this pull request as ready for review April 4, 2025 13:39
@jourdiw jourdiw requested a review from a team as a code owner April 4, 2025 13:39
@jourdiw jourdiw merged commit 4c88b15 into master Apr 4, 2025
11 checks passed
@jourdiw jourdiw deleted the apim-fix-dompurify-error branch April 4, 2025 13:58
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.

3 participants