Skip to content

Add a new package: safe-html-react-parser#199

Merged
yujeong-jeon merged 6 commits intomainfrom
feature/198
Oct 24, 2025
Merged

Add a new package: safe-html-react-parser#199
yujeong-jeon merged 6 commits intomainfrom
feature/198

Conversation

@yujeong-jeon
Copy link
Contributor

@yujeong-jeon yujeong-jeon commented Oct 23, 2025

Related Issue

Describe your changes

Request

@yujeong-jeon yujeong-jeon requested a review from a team as a code owner October 23, 2025 05:41
@npayfebot
Copy link
Collaborator

npayfebot commented Oct 23, 2025

✅ Changeset detected

Latest commit: 80a2486

@naverpay/safe-html-react-parser package have detected changes.

If no version change is needed, please add skip-detect-change to the label.

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@naverpay/safe-html-react-parser 💥 Major
powered by: naverpay changeset detect-add actions

@npayfebot
Copy link
Collaborator

npayfebot commented Oct 23, 2025

NPM Packages

📦 @naverpay/safe-html-react-parser

Total Sizes: 1.58 kB

Total Changes: +1.58 kB 🆕

File Status Previous Size Updated Size Changed
/dist/esm/index.mjs - 667 B +667 B
/dist/cjs/index.js - 909 B +909 B

🧩 Dependency Changes

Package Status Previous Version Updated Version Bundle Size (Max) Changed
html-react-parser@^5.2.7 - ^5.2.7 470 kB 470 kB
isomorphic-dompurify@^2.30.1 - ^2.30.1 5.71 kB 5.71 kB

powered by: naverpay size-action

2-one-week
2-one-week previously approved these changes Oct 23, 2025
Copy link
Member

@2-one-week 2-one-week left a comment

Choose a reason for hiding this comment

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

LGTM

@yujeong-jeon
Copy link
Contributor Author

/canary-publish

* @returns Parsed React elements
*/
export function safeParse(htmlString: string, options: SafeParseOptions = {}) {
const {sanitizeConfig = DEFAULT_SANITIZE_CONFIG, preserveCustomTags, ...parserOptions} = options
Copy link
Contributor

Choose a reason for hiding this comment

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

If I customize ALLOWED_TAGS externally, it doesn’t merge with the defaults — it completely overrides them, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought merging might be better, but it makes sense to keep it this way since someone might want to remove certain tags. The default config is exported anyway, so developers can merge it however they want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, so I exported the DEFAULT_SANITIZE_CONFIG . You can use it when you need an extension of the default value.

@npayfebot
Copy link
Collaborator

Published Canary Packages

@naverpay/safe-html-react-parser@1.0.0-canary.251023-65a2c81

Comment on lines +25 to +32
"devDependencies": {
"@types/react": "0.14 || 15 || 16 || 17 || 18 || 19",
"react": "0.14 || 15 || 16 || 17 || 18 || 19"
},
"peerDependencies": {
"@types/react": "0.14 || 15 || 16 || 17 || 18 || 19",
"react": "0.14 || 15 || 16 || 17 || 18 || 19"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the peerDeps of html-react-parser.

https://github.com/remarkablemark/html-react-parser

yceffort-naver
yceffort-naver previously approved these changes Oct 23, 2025
Copy link
Contributor

@yceffort-naver yceffort-naver left a comment

Choose a reason for hiding this comment

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

LGTM

@yceffort-naver
Copy link
Contributor

I’ve set up the Nexus registry initialization in Forge.

yceffort-naver
yceffort-naver previously approved these changes Oct 23, 2025
Copy link
Contributor

@yceffort-naver yceffort-naver left a comment

Choose a reason for hiding this comment

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

LGTM

@yujeong-jeon
Copy link
Contributor Author

/rc-publish

@npayfebot
Copy link
Collaborator

Published Canary Packages

@naverpay/safe-html-react-parser@1.0.0-rc.251023-1b2085b

yceffort-naver
yceffort-naver previously approved these changes Oct 23, 2025
@yujeong-jeon
Copy link
Contributor Author

/rc-publish

@npayfebot
Copy link
Collaborator

Published Canary Packages

@naverpay/safe-html-react-parser@1.0.0-rc.251023-80a2486

@yujeong-jeon
Copy link
Contributor Author

스크린샷 2025-10-23 오후 11 40 08 스크린샷 2025-10-23 오후 11 40 20

wtf - -

@yceffort
Copy link

LOL

@yujeong-jeon yujeong-jeon merged commit ab910bc into main Oct 24, 2025
7 checks passed
@yujeong-jeon yujeong-jeon deleted the feature/198 branch October 24, 2025 04:38
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.

5 participants

Comments