Version 1.0.0
@stackline/path-browserify
the path module from node core for browsers
Independent maintenance of path-browserify 1.0.1. Original authors and licenses are retained.
Installation
# Preserve existing imports with an npm alias
npm install path-browserify@npm:@stackline/path-browserify@1.0.0
# Or use the scoped package name in your imports
npm install @stackline/path-browserify@1.0.0Node.js: See compatibility notes. Read the compatibility and maintenance notes before migrating.
Usage and API
The reference below may retain upstream package names. Use the alias installation above to run those imports with this Stackline release.
@stackline/path-browserify
Independent maintenance fork of path-browserify@1.0.1. Original API, module format, runtime dependency ranges, and supported Node.js engines are preserved.
npm install @stackline/path-browserify
# Preserve existing imports with an npm alias:
npm install path-browserify@npm:@stackline/path-browserify@1.0.0
See UPSTREAM.md for the exact source and issue review, and CHANGELOG.md for focused maintenance changes. Development and release tooling runs on Node.js 24; that does not change the library runtime requirement.
Maintained by Stackline. Issues · npm.
Upstream documentation
path-browserify 
The
pathmodule from Node.js for browsers
This implements the Node.js path module for environments that do not have it, like browsers.
path-browserifycurrently matches the Node.js 10.3 API.
Install
You usually do not have to install path-browserify yourself! If your code runs in Node.js, path is built in. If your code runs in the browser, bundlers like browserify or webpack include the path-browserify module by default.
But if none of those apply, with npm do:
npm install path-browserify
Usage
var path = require('path')
var filename = 'logo.png';
var logo = path.join('./assets/img', filename);
document.querySelector('#logo').src = logo;
API
See the Node.js path docs. path-browserify currently matches the Node.js 10.3 API.
path-browserify only implements the POSIX functions, not the win32 ones.
Contributing
PRs are very welcome! The main way to contribute to path-browserify is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js.
This module intends to provide exactly the same API as Node.js, so features that are not available in the core path module will not be accepted. Feature requests should instead be directed at nodejs/node and will be added to this module once they are implemented in Node.js.
If there is a difference in behaviour between Node.js's path module and this module, please open an issue!
License
Upstream issues and maintenance review
Upstream and compatibility
This independent fork starts from path-browserify@1.0.1, source commit
872fec31a8bac7b9b43be0e54ef3037e0202c5fb in
browserify/path-browserify.
The native GitHub fork preserves the upstream history, branches and tags. Stackline work lives on stackline.
The original POSIX implementation and MIT license are unchanged. No runtime dependencies or Node engine declaration were added. Use an npm alias to preserve require('path-browserify') in existing applications.
Issue review
Reviewed upstream open issues on 2026-09-29, including their reported use cases:
- #35 and #26: Windows path behavior is outside this POSIX implementation. Backslashes remain ordinary characters and
win32remains null. Changing those semantics in this compatibility release would break existing browser callers. Contract tests cover the retained behavior. - #34: relative
resolve()needs aprocess.cwd()implementation in browser bundles. Supply the bundler process shim; this release does not invent a browser current working directory. A VM test checks the API with an explicit browser process shim.
The upstream test suite and the same API checks against an installed tarball run in CI. Issue review does not imply that every upstream issue is fixed.
Release changes
Changelog
1.0.0 — 2026-09-29
- Publish the preserved path-browserify 1.0.1 POSIX implementation as
@stackline/path-browserify. - Preserve upstream authorship, MIT license, API, and runtime dependency/engine declarations.
- Add installed-tarball and browser-shim contract checks, issue review, CI, CodeQL, exact-artifact npm provenance, and immutable release evidence.
- Update the development-only Tape test runner. No runtime implementation changes.
Upstream changelog
path-browserify change log
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
1.0.1
- Fix a duplicate test name.
- Tweak LICENSE text so Github can recognise it.
- Tweak LICENSE text to include the year and author.
- Add security policy file.
1.0.0
This release updates to the Node v10.3.0 API. This change is breaking, because path methods now throw errors when called with arguments that are not strings.
- Add
path.parseandpath.format. - Add
path.posixas an alias topath. - Port tests from Node.js.
Release files and references
- README.md
- UPSTREAM.md
- CHANGELOG.md
- LICENSE
- NOTICE
- Package and publication metadata
- Full text documentation
Package bytes, npm provenance and the immutable GitHub release were verified for this version. Security checks describe the reviewed release; documented compatibility risks and upstream reports are not blanket claims of resolution.