Import-meta-based path utilities for modern Node.js ESM applications.
- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- API
- Packaging
- Examples
- Support
- Links
- License
Compose paths from module locations or directory strings. Convert file URLs and log path operations with an injected logger.
Use Node.js 26 or later and native ESM.
Install @eliware/path:
npm install @eliware/pathPass import.meta or a directory path to a helper:
import path, { pathUrl, relativePath, resolvePath } from "@eliware/path";
const filePath = path(import.meta, "config", "app.json");
const fileUrl = pathUrl(import.meta, "module.mjs");
const absolutePath = resolvePath(import.meta, "data", "input.json");
const relative = relativePath(import.meta, "data", "input.json");Read release notes for package changes.
Read the specifications index for repository requirements. Read the documentation index for user guides.
Run aggregate validation with npm test.
Run npm run lint, npm run audit, npm run format, npm run format:check, npm run typecheck, or npm run pack for focused checks.
Read the troubleshooting guide for input and URL errors.
Path segments can move outside the starting directory. Check paths from user input before file access. Logging records omit path values and results.
Read the API reference for exported functions and types.
The package includes src/, docs/, README.md, AGENTS.md, LICENSE, RELEASE_NOTES.md, examples/, specs/, and .env.example.
Use MAJOR.MINOR.PATCH versions and matching v<version> tags.
The npm workflow publishes only a matching version tag after validation passes.
Get Eliware Operations approval before publication.
Read the package guide for package files.
Run an example from the repository root with node examples/example.mjs.
Read the example index for all examples.
For help, questions, or to chat with the author and community, visit:


