Skip to content

Commit 4366991

Browse files
anodynosweb-flow
authored andcommitted
Merge pull request #1 from anodynos/feat/UP-002-readme-hollywood
docs: README Hollywood refresh + Polar funding (UP-002) GitOrigin-RevId: ee3ced87dac35f5d2c3100f9ad9bdb715e5ce2f6
1 parent 04badc5 commit 4366991

8 files changed

Lines changed: 247 additions & 113 deletions

File tree

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
github: anodynos
2+
polar: anodynos
23
tidelift: npm/upath

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ build
55
DRAFT
66
*.tsbuildinfo
77
coverage
8+
.claude/worktrees/

.husky/pre-commit

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
npx lint-staged
1+
# If lint-staged not in PATH (no local node_modules), use main worktree's
2+
if ! command -v lint-staged >/dev/null 2>&1; then
3+
MAIN_WT=$(git worktree list --porcelain | head -1 | sed 's/worktree //')
4+
if [ -d "$MAIN_WT/node_modules/.bin" ]; then
5+
export PATH="$MAIN_WT/node_modules/.bin:$PATH"
6+
fi
7+
fi
8+
9+
lint-staged

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [3.0.6] - 2026-04-09
9+
10+
### Added
11+
12+
- **Polar.sh funding** -- added to `.github/FUNDING.yml` and `package.json` alongside existing GitHub Sponsors and Tidelift.
13+
- **"Who Uses upath" section** in README -- trust signals with notable dependents (Chokidar, Nuxt, 1,300+ npm packages).
14+
- **Architecture section** in README -- explains the dynamic proxy pattern and how upath stays in sync with Node.js.
15+
16+
### Changed
17+
18+
- **README revamped** -- pain-first API docs showing `path` vs `upath` behavior side-by-side, inspired by the v2-era docs. Every extra function now explains _why_ it exists (what `path` does wrong).
19+
- **Deterministic `docs/API.md` generation** -- test files are now sorted by name before the doc reporter processes them, eliminating spurious diffs caused by Jest's non-deterministic parallel execution order.
20+
21+
### Fixed
22+
23+
- **Pre-commit hook now works in git worktrees without `node_modules`** -- the hook falls back to the main worktree's `node_modules/.bin` when lint-staged isn't found locally.
24+
25+
## [3.0.1] - [3.0.5]
26+
27+
Patch releases for CI/CD setup (Copybara bidirectional sync, Trusted Publishing OIDC), build fixes, and internal tooling. No user-facing API changes.
28+
829
## [3.0.0] - 2026-04-05
930

1031
### Breaking Changes
@@ -31,4 +52,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
3152
- Build toolchain changed to tsup (dual CJS + ESM output).
3253
- Test framework changed to Jest with ts-jest.
3354

55+
[3.0.6]: https://github.com/anodynos/upath/compare/v3.0.5...v3.0.6
3456
[3.0.0]: https://github.com/anodynos/upath/releases/tag/v3.0.0

docs/API.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
> Auto-generated from test results by `doc-reporter.ts`. Do not edit manually.
44
>
5-
> **Note:** Node.js compatibility tests (200+ vectors in [`node-compat.test.ts`](../src/__tests__/node-compat.test.ts))
6-
> are excluded from this document for brevity. Those tests verify that every proxied `path` function produces identical
7-
> results to Node.js built-in `path`.
5+
> **Note:** Node.js compatibility tests (200+ vectors in [`node-compat.test.ts`](../src/__tests__/node-compat.test.ts)) are excluded from this document for brevity. Those tests verify that every proxied `path` function produces identical results to Node.js built-in `path`.
86
97
## `upath.addExt(filename, ext)`
108

@@ -128,50 +126,6 @@
128126
| `"fileWith/defaultExt.longExt", 'js', ['min', '.dev'], 8` | `"fileWith/defaultExt.longExt"` |
129127
| `"fileWith/defaultExt.longRext", 'js', ['min', '.dev'], 8` | `"fileWith/defaultExt.longRext.js"` |
130128

131-
## `upath.normalize(path)`
132-
133-
| Input | Output |
134-
| --------------------------------- | -------------------------- |
135-
| `"c:/windows/nodejs/path"` | `"c:/windows/nodejs/path"` |
136-
| `"c:/windows/../nodejs/path"` | `"c:/nodejs/path"` |
137-
| `"c:\\windows\\nodejs\\path"` | `"c:/windows/nodejs/path"` |
138-
| `"c:\\windows\\..\\nodejs\\path"` | `"c:/nodejs/path"` |
139-
| `"/windows\\unix/mixed"` | `"/windows/unix/mixed"` |
140-
| `"\\windows//unix/mixed"` | `"/windows/unix/mixed"` |
141-
| `"\\windows\\..\\unix/mixed/"` | `"/unix/mixed/"` |
142-
143-
## `upath.join(paths...)`
144-
145-
| Input | Output |
146-
| ------------------------------------ | --------------------- |
147-
| `["some/nodejs/deep","../path"]` | `"some/nodejs/path"` |
148-
| `["some/nodejs\\windows","../path"]` | `"some/nodejs/path"` |
149-
| `["some\\windows\\only","..\\path"]` | `"some/windows/path"` |
150-
151-
## `upath.toUnix(path)`
152-
153-
| Input | Output |
154-
| ----------------------------------- | ---------------------------- |
155-
| `".//windows\\//unix/\\/mixed////"` | `"./windows/unix/mixed/"` |
156-
| `"..///windows\\..\\\\unix/mixed"` | `"../windows/../unix/mixed"` |
157-
| `""` | `""` |
158-
| `"/"` | `"/"` |
159-
| `"\\\\server\\share"` | `"//server/share"` |
160-
| `"already/forward/slashes"` | `"already/forward/slashes"` |
161-
| `"\\"` | `"/"` |
162-
| `"////multiple///slashes"` | `"//multiple/slashes"` |
163-
| `"mixed\\back//and///slashes"` | `"mixed/back/and/slashes"` |
164-
| `"a\\b\\c"` | `"a/b/c"` |
165-
| `"C:\\Users\\test"` | `"C:/Users/test"` |
166-
167-
## `upath.isAbsolute(path) — backslash normalization`
168-
169-
| Input | Output |
170-
| --------------------- | ------------------------------ |
171-
| `"\\foo"` | `true (backslash normalized)` |
172-
| `"\\\\server\\share"` | `true (backslash normalized)` |
173-
| `"foo\\bar"` | `false (backslash normalized)` |
174-
175129
## `upath.normalizeSafe(path)`
176130

177131
### equal to path.normalize
@@ -246,3 +200,47 @@
246200
| `["//./c:/temp/file","../path"]` | `"//./c:/temp/path"` |
247201
| `["",""]` | `"."` |
248202
| `["./foo","","bar"]` | `"./foo/bar"` |
203+
204+
## `upath.normalize(path)`
205+
206+
| Input | Output |
207+
| --------------------------------- | -------------------------- |
208+
| `"c:/windows/nodejs/path"` | `"c:/windows/nodejs/path"` |
209+
| `"c:/windows/../nodejs/path"` | `"c:/nodejs/path"` |
210+
| `"c:\\windows\\nodejs\\path"` | `"c:/windows/nodejs/path"` |
211+
| `"c:\\windows\\..\\nodejs\\path"` | `"c:/nodejs/path"` |
212+
| `"/windows\\unix/mixed"` | `"/windows/unix/mixed"` |
213+
| `"\\windows//unix/mixed"` | `"/windows/unix/mixed"` |
214+
| `"\\windows\\..\\unix/mixed/"` | `"/unix/mixed/"` |
215+
216+
## `upath.join(paths...)`
217+
218+
| Input | Output |
219+
| ------------------------------------ | --------------------- |
220+
| `["some/nodejs/deep","../path"]` | `"some/nodejs/path"` |
221+
| `["some/nodejs\\windows","../path"]` | `"some/nodejs/path"` |
222+
| `["some\\windows\\only","..\\path"]` | `"some/windows/path"` |
223+
224+
## `upath.toUnix(path)`
225+
226+
| Input | Output |
227+
| ----------------------------------- | ---------------------------- |
228+
| `".//windows\\//unix/\\/mixed////"` | `"./windows/unix/mixed/"` |
229+
| `"..///windows\\..\\\\unix/mixed"` | `"../windows/../unix/mixed"` |
230+
| `""` | `""` |
231+
| `"/"` | `"/"` |
232+
| `"\\\\server\\share"` | `"//server/share"` |
233+
| `"already/forward/slashes"` | `"already/forward/slashes"` |
234+
| `"\\"` | `"/"` |
235+
| `"////multiple///slashes"` | `"//multiple/slashes"` |
236+
| `"mixed\\back//and///slashes"` | `"mixed/back/and/slashes"` |
237+
| `"a\\b\\c"` | `"a/b/c"` |
238+
| `"C:\\Users\\test"` | `"C:/Users/test"` |
239+
240+
## `upath.isAbsolute(path) — backslash normalization`
241+
242+
| Input | Output |
243+
| --------------------- | ------------------------------ |
244+
| `"\\foo"` | `true (backslash normalized)` |
245+
| `"\\\\server\\share"` | `true (backslash normalized)` |
246+
| `"foo\\bar"` | `false (backslash normalized)` |

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "upath",
33
"description": "A drop-in replacement / proxy to Node.js path, replacing \\\\ with / for all results & adding file extension functions.",
4-
"version": "3.0.5",
4+
"version": "3.0.6",
55
"homepage": "https://github.com/anodynos/upath/",
66
"author": {
77
"name": "Angelos Pikoulas",
@@ -13,6 +13,10 @@
1313
"type": "github",
1414
"url": "https://github.com/sponsors/anodynos"
1515
},
16+
{
17+
"type": "polar",
18+
"url": "https://polar.sh/anodynos"
19+
},
1620
{
1721
"type": "tidelift",
1822
"url": "https://tidelift.com/subscription/pkg/npm-upath"

0 commit comments

Comments
 (0)