Skip to content

Latest commit

 

History

History
167 lines (91 loc) · 4.33 KB

File metadata and controls

167 lines (91 loc) · 4.33 KB

@naverpay/nurl

1.1.0

Minor Changes

  • 92343a8: feat: add NURL.match() and NURL.mask() static methods

    • NURL.match(url, pattern): Match URL path against a pattern with dynamic segments and extract parameters
    • NURL.mask(url, options): Mask sensitive path parameters in a URL for logging purposes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

  • 393bd3d: 🔧 Fix pathname handling and href generation in NURL class

    • Previously, when creating an NURL instance with an explicitly empty string ('') for the pathname, the resulting URL automatically defaulted to a root path ('/'). This behavior was inconsistent with the native JavaScript URL object, which retains an empty pathname as-is, resulting in a URL consisting only of query parameters.
    // as-is
    // Input
    const url = new NURL({pathname: '', query: {test: '1'}})
    
    // Output
    url.href === '/?test=1'
    
    // to-be
    // Input
    const url = new NURL({pathname: '', query: {test: '1'}})
    
    // Output
    url.href === '?test=1'
    • Previously, assigning an empty string ('') to the pathname property via setter retained the existing pathname. However, to align with the native JavaScript URL object’s behavior, assigning an empty string now explicitly clears the pathname.
    // Before
    url.pathname = '' // pathname remained '/hello'
    
    // After (new default behavior):
    url.pathname = '' // pathname becomes '', resulting in removal of '/hello'

    PR: 🔧 Fix pathname handling and href generation in NURL class

0.1.1

Patch Changes

0.1.0

Minor Changes

Patch Changes

0.0.12

Patch Changes

0.0.11

Patch Changes

0.0.10

Patch Changes

0.0.9

Patch Changes

  • 0e6c484: Add basePath Support to NURL Class with Duplicate Prevention

0.0.8

Patch Changes

  • 1047b48: 🚚 punycode 를 내재화합니다.

0.0.7

Patch Changes

0.0.6

Patch Changes

  • 95cf37d: - search 파라미터 이중 인코딩 제거 #35

0.0.5

Patch Changes

  • 9d429a1: [#31] 💩 esm 에서도 punycode cjs 동작하도록 변경

0.0.4

Patch Changes

  • 57b65f2: 잘못 지워진 빌드 스텝 추가

0.0.3

Patch Changes

  • 3b4ad06: esm 에서 동작하기 위한 dependency alias 적용 #26