Releases: NaverPayDev/nurl
Releases · NaverPayDev/nurl
v1.0.1
v1.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
v0.1.1
v0.1.0
Minor Changes
-
fa4eec3: string 으로 인스턴스 생성시 baseUrl 과 pathname 이 생략된 url 을 지정가능하도록 합니다.
PR: string 으로 인스턴스 생성시 baseUrl 과 pathname 이 생략된 url 을 지정가능하도록 합니다.
Patch Changes
-
fce2c49: fix declaration file bug with pite