You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
3.0.0 - 2025-12-16
Breaking changes
This package now does only provide an ES module, the CJS entry point is removed.
The behavior of basename and dirname was fixed to behave similar
to the methods from the Node.js paths module and the PHP methods.
This mainly affects special cases:
trailing slash on basename is ignored
basename('subdir/')
- ""+ "subdir"
dirname always respects the root path:
dirname('/')
- ""+ "/"
dirname('')
- ""+ "."
dirname('/file')
- ""+ "/"
dirname('file')
- ""+ "."
Added
feat(basename): add support for removing an extension (#843)
Fixed
fix!: make dirname and basename behave like PHP and Node (#839)
Changed
chore!: drop commonJs entry points
chore!: remove deprecated joinPaths in favor of join