Accept search context as options (aka keyword arguments)
Accept the search context (start and dot) as options (aka keyword arguments) instead of positional parameters. This formation has the benefit of making the API call more clear, easier to pass options through (such as by @antora/user-require-helper), allows optional arguments be optional instead of having to step over them, and makes room for future parameters.
const expandPath = require('@antora/expand-path-helper')
expandPath('file.ext', { base: '/base/dir' })
As part of this change (since the argument names will now be part of the API), rename start
to base
for clarity. It's more common to think of a "base path" rather than a "start path".
This change will warrant a new major version.