Skip to content

v3.0.0

Latest

Choose a tag to compare

@susnux susnux released this 16 Dec 12:50
· 6 commits to main since this release
a57d821

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
  • test: add unit tests for encodePath