Skip to content

Commit 996a371

Browse files
committed
Exclude old/ compat tests from published @fedify/uri-template
The package previously shipped the `old/` directory and pointed package consumers at `deno task test:old`, but those compatibility tests only make sense inside the Fedify monorepo: they import from `old/url-template.test.ts` and `old/uri-template-router.test.ts`, and the `test:old` task lives in the workspace's *deno.json*, not in the published artifact. Drop the directory from both publish paths and rewrite the README pointer so it directs readers to the source repository instead of to a task they cannot run: - `package.json` gains a `files` allowlist of `dist`, `package.json`, and `README.md`, mirroring the `@fedify/postgres` layout. - `deno.json`'s `publish.exclude` adds `old/` alongside the other development-only directories. - *README.md* replaces the `deno task test:old` snippet with a short note that the comparison tests live under *packages/uri-template/old/* in the source repository and are intentionally not part of the published package. Reported by CodeRabbit in #758 (2026-05-11). Assisted-by: Claude Opus 4.7 (1M context)
1 parent 2c1d58a commit 996a371

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

packages/uri-template/README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,11 @@ The important differences are:
114114
active route entries directly, which keeps the implementation independent
115115
and dependency-free at runtime.
116116

117-
The old implementation differences can be checked by running the compatibility
118-
tests in *old/url-template.test.ts* and *old/uri-template-router.test.ts*.
119-
These tests intentionally run Fedify's expected behavior against the old
120-
libraries, so the failing cases show the gaps:
121-
122-
~~~~ bash
123-
deno task test:old
124-
~~~~
117+
The concrete differences from the previous [url-template] and
118+
[uri-template-router] libraries are encoded as compatibility tests under
119+
*packages/uri-template/old/* in the package's source repository. Refer to
120+
those tests for behavior comparisons against the older libraries; they are
121+
not shipped in the published package.
125122

126123

127124
Features

packages/uri-template/deno.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"exclude": [
2121
"**/*.bench.ts",
2222
"**/*.test.ts",
23+
"old/",
2324
"src/tests/",
2425
"summary.txt",
2526
"tsdown.config.ts"

packages/uri-template/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
"test:bun": "bun test src/**/*.test.ts",
4646
"test": "node --experimental-transform-types --test src/**/*.test.ts"
4747
},
48+
"files": [
49+
"dist",
50+
"package.json",
51+
"README.md"
52+
],
4853
"keywords": [
4954
"Fedify",
5055
"URI Template",

0 commit comments

Comments
 (0)