Skip to content

Conversation

@chan-hwi
Copy link

This PR adds a subpath exports (/utils) to the nurl package, allowing utility functions (match, mask) to be imported via @naverpay/nurl/utils.

import { match, mask } from '@naverpay/nurl/utils'


const params = match('/v1/user/12345/info', '/v1/user/:userId/info')

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

Copy link
Contributor

@boxersb boxersb left a comment

Choose a reason for hiding this comment

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

Is it not permitted to export anything in internal.ts externally?
Why?

@chan-hwi
Copy link
Author

Is it not permitted to export anything in internal.ts externally? Why?

The utility functions in internal.ts have not been exported previously, so I assumed they were intended for internal use only.

Is there a need to export these functions as well?

@yceffort-naver yceffort-naver merged commit 7c2e8df into NaverPayDev:epic/masking Dec 30, 2025
4 of 6 checks passed
@boxersb
Copy link
Contributor

boxersb commented Dec 30, 2025

Is it not permitted to export anything in internal.ts externally? Why?

@yceffort-naver What do you think?

@yceffort-naver
Copy link
Contributor

Since the functions in internal.ts are already exposed in the build output, I think we have two options:

  1. Merge internal.ts and external.ts into a single file and export everything
  2. Adjust the bundler configuration to prevent internal.ts from being exported as a separate module (more difficult)

Which approach would you prefer?

@boxersb
Copy link
Contributor

boxersb commented Dec 30, 2025

@yceffort-naver I think option 1 would be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants