diff --git a/.changeset/smart-ants-wash.md b/.changeset/smart-ants-wash.md index b27ba9acc4..e0069063d6 100644 --- a/.changeset/smart-ants-wash.md +++ b/.changeset/smart-ants-wash.md @@ -3,4 +3,4 @@ '@commercetools-frontend/mc-scripts': patch --- -Sanitize SVG icon only when comparing diffs, as the icon is sanitized in the API. Expose the `sanitizeSvg` logic from the `@commercetools-frontend/application-config/ssr` entry point. +Sanitize SVG icon only when comparing diffs, as the icon is sanitized in the API. Expose the `sanitizeSvg` logic from the `@commercetools-frontend/application-config`. diff --git a/packages/application-config/src/index.ts b/packages/application-config/src/index.ts index a91810739a..d67e9467a6 100644 --- a/packages/application-config/src/index.ts +++ b/packages/application-config/src/index.ts @@ -1,5 +1,6 @@ export { default as processConfig } from './process-config'; export { getConfigPath } from './load-config'; +export { default as sanitizeSvg } from './sanitize-svg'; export * from './constants'; export * from './errors'; export * from './types'; diff --git a/packages/application-config/src/ssr.ts b/packages/application-config/src/ssr.ts index c6159f4c26..ad4ce58d7f 100644 --- a/packages/application-config/src/ssr.ts +++ b/packages/application-config/src/ssr.ts @@ -1,2 +1 @@ export * from './formatters'; -export { default as sanitizeSvg } from './sanitize-svg'; diff --git a/packages/mc-scripts/src/utils/get-config-diff.ts b/packages/mc-scripts/src/utils/get-config-diff.ts index 1d0fbdb058..266fee359a 100644 --- a/packages/mc-scripts/src/utils/get-config-diff.ts +++ b/packages/mc-scripts/src/utils/get-config-diff.ts @@ -1,6 +1,8 @@ import chalk from 'chalk'; -import type { CustomApplicationData } from '@commercetools-frontend/application-config'; -import { sanitizeSvg } from '@commercetools-frontend/application-config/ssr'; +import { + sanitizeSvg, + type CustomApplicationData, +} from '@commercetools-frontend/application-config'; // Since not all terminal supports colors, to make things more consistent for testing purposes, // during tests the color used is appended before the string instead of coloring it.