From 04ea0729c85e893401ee74024e7841c566173a39 Mon Sep 17 00:00:00 2001 From: yashrao2607 <140533789+yashrao2607@users.noreply.github.com> Date: Fri, 17 Jul 2026 15:55:52 +0530 Subject: [PATCH 1/2] fix: add repository.directory to publishable packages npm resolves relative links in a package README against the repo root unless package.json's repository.directory points at the package's actual subfolder. None of the monorepo's publishable packages set it, so every relative link in every published README (e.g. links to guide.md, CONTRIBUTING.md, sibling packages) 404s on npmjs.com. Fixes #1738 --- packages/all/package.json | 3 ++- packages/browser-client/package.json | 3 ++- packages/packer/package.json | 3 ++- .../plugins/rrweb-plugin-canvas-webrtc-record/package.json | 3 ++- .../plugins/rrweb-plugin-canvas-webrtc-replay/package.json | 3 ++- packages/plugins/rrweb-plugin-console-record/package.json | 3 ++- packages/plugins/rrweb-plugin-console-replay/package.json | 3 ++- packages/plugins/rrweb-plugin-network-record/package.json | 3 ++- packages/plugins/rrweb-plugin-network-replay/package.json | 3 ++- .../plugins/rrweb-plugin-sequential-id-record/package.json | 3 ++- .../plugins/rrweb-plugin-sequential-id-replay/package.json | 3 ++- packages/record/package.json | 3 ++- packages/replay/package.json | 3 ++- packages/rrdom-nodejs/package.json | 3 ++- packages/rrdom/package.json | 3 ++- packages/rrvideo/package.json | 3 ++- packages/rrweb-player/package.json | 3 ++- packages/rrweb-snapshot/package.json | 3 ++- packages/rrweb/package.json | 3 ++- packages/types/package.json | 3 ++- packages/utils/package.json | 3 ++- 21 files changed, 42 insertions(+), 21 deletions(-) diff --git a/packages/all/package.json b/packages/all/package.json index 8956268900..8e42f36408 100644 --- a/packages/all/package.json +++ b/packages/all/package.json @@ -26,7 +26,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/all" }, "license": "MIT", "type": "module", diff --git a/packages/browser-client/package.json b/packages/browser-client/package.json index 26f927d538..cb887ec3b7 100644 --- a/packages/browser-client/package.json +++ b/packages/browser-client/package.json @@ -34,7 +34,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/browser-client" }, "license": "MIT", "type": "module", diff --git a/packages/packer/package.json b/packages/packer/package.json index 849a67d687..0e66d83879 100644 --- a/packages/packer/package.json +++ b/packages/packer/package.json @@ -26,7 +26,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/packer" }, "license": "MIT", "type": "module", diff --git a/packages/plugins/rrweb-plugin-canvas-webrtc-record/package.json b/packages/plugins/rrweb-plugin-canvas-webrtc-record/package.json index f455862d62..34cd7d7a71 100644 --- a/packages/plugins/rrweb-plugin-canvas-webrtc-record/package.json +++ b/packages/plugins/rrweb-plugin-canvas-webrtc-record/package.json @@ -33,7 +33,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-canvas-webrtc-record" }, "keywords": [ "devtools", diff --git a/packages/plugins/rrweb-plugin-canvas-webrtc-replay/package.json b/packages/plugins/rrweb-plugin-canvas-webrtc-replay/package.json index f0945b56b6..15feee3cd4 100644 --- a/packages/plugins/rrweb-plugin-canvas-webrtc-replay/package.json +++ b/packages/plugins/rrweb-plugin-canvas-webrtc-replay/package.json @@ -33,7 +33,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-canvas-webrtc-replay" }, "keywords": [ "devtools", diff --git a/packages/plugins/rrweb-plugin-console-record/package.json b/packages/plugins/rrweb-plugin-console-record/package.json index b8efb4ff2a..b91bb635a9 100644 --- a/packages/plugins/rrweb-plugin-console-record/package.json +++ b/packages/plugins/rrweb-plugin-console-record/package.json @@ -35,7 +35,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-console-record" }, "keywords": [ "devtools", diff --git a/packages/plugins/rrweb-plugin-console-replay/package.json b/packages/plugins/rrweb-plugin-console-replay/package.json index e906d0ba3b..396646134a 100644 --- a/packages/plugins/rrweb-plugin-console-replay/package.json +++ b/packages/plugins/rrweb-plugin-console-replay/package.json @@ -33,7 +33,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-console-replay" }, "keywords": [ "devtools", diff --git a/packages/plugins/rrweb-plugin-network-record/package.json b/packages/plugins/rrweb-plugin-network-record/package.json index 0e8fda98f0..943bc989fb 100644 --- a/packages/plugins/rrweb-plugin-network-record/package.json +++ b/packages/plugins/rrweb-plugin-network-record/package.json @@ -35,7 +35,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-network-record" }, "keywords": [ "rrweb" diff --git a/packages/plugins/rrweb-plugin-network-replay/package.json b/packages/plugins/rrweb-plugin-network-replay/package.json index 811792dcb9..0084c166eb 100644 --- a/packages/plugins/rrweb-plugin-network-replay/package.json +++ b/packages/plugins/rrweb-plugin-network-replay/package.json @@ -33,7 +33,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-network-replay" }, "keywords": [ "rrweb" diff --git a/packages/plugins/rrweb-plugin-sequential-id-record/package.json b/packages/plugins/rrweb-plugin-sequential-id-record/package.json index 284abaa5b0..e124ab3e7c 100644 --- a/packages/plugins/rrweb-plugin-sequential-id-record/package.json +++ b/packages/plugins/rrweb-plugin-sequential-id-record/package.json @@ -33,7 +33,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-sequential-id-record" }, "keywords": [ "devtools", diff --git a/packages/plugins/rrweb-plugin-sequential-id-replay/package.json b/packages/plugins/rrweb-plugin-sequential-id-replay/package.json index 2c95a6e799..ec314e065c 100644 --- a/packages/plugins/rrweb-plugin-sequential-id-replay/package.json +++ b/packages/plugins/rrweb-plugin-sequential-id-replay/package.json @@ -33,7 +33,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/plugins/rrweb-plugin-sequential-id-replay" }, "keywords": [ "devtools", diff --git a/packages/record/package.json b/packages/record/package.json index 8f7b15d54f..b301bb9421 100644 --- a/packages/record/package.json +++ b/packages/record/package.json @@ -27,7 +27,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/record" }, "license": "MIT", "type": "module", diff --git a/packages/replay/package.json b/packages/replay/package.json index ae9c85c187..22b9655b46 100644 --- a/packages/replay/package.json +++ b/packages/replay/package.json @@ -26,7 +26,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/replay" }, "license": "MIT", "type": "module", diff --git a/packages/rrdom-nodejs/package.json b/packages/rrdom-nodejs/package.json index e1bd6f4d05..55c10c0011 100644 --- a/packages/rrdom-nodejs/package.json +++ b/packages/rrdom-nodejs/package.json @@ -19,7 +19,8 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/rrdom-nodejs" }, "license": "MIT", "type": "module", diff --git a/packages/rrdom/package.json b/packages/rrdom/package.json index 27c7a98645..f2dca0355c 100644 --- a/packages/rrdom/package.json +++ b/packages/rrdom/package.json @@ -28,7 +28,8 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/rrdom" }, "scripts": { "dev": "vite build --watch", diff --git a/packages/rrvideo/package.json b/packages/rrvideo/package.json index 56ef2d518d..0010f5b161 100644 --- a/packages/rrvideo/package.json +++ b/packages/rrvideo/package.json @@ -13,7 +13,8 @@ "types": "build/index.d.ts", "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/rrvideo" }, "scripts": { "install": "playwright install", diff --git a/packages/rrweb-player/package.json b/packages/rrweb-player/package.json index d5daf04e77..6e6dae9ada 100644 --- a/packages/rrweb-player/package.json +++ b/packages/rrweb-player/package.json @@ -62,7 +62,8 @@ "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/rrweb-player" }, "keywords": [ "devtools", diff --git a/packages/rrweb-snapshot/package.json b/packages/rrweb-snapshot/package.json index e42995f43e..b7b9ec12d3 100644 --- a/packages/rrweb-snapshot/package.json +++ b/packages/rrweb-snapshot/package.json @@ -21,7 +21,8 @@ "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/rrweb-snapshot" }, "keywords": [ "devtools", diff --git a/packages/rrweb/package.json b/packages/rrweb/package.json index e1d45a7d56..8fc3d0826a 100644 --- a/packages/rrweb/package.json +++ b/packages/rrweb/package.json @@ -27,7 +27,8 @@ "type": "module", "repository": { "type": "git", - "url": "git+ssh://git@github.com/rrweb-io/rrweb.git" + "url": "git+ssh://git@github.com/rrweb-io/rrweb.git", + "directory": "packages/rrweb" }, "keywords": [ "devtools", diff --git a/packages/types/package.json b/packages/types/package.json index 26bf9d7d39..d63ef51b30 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -24,7 +24,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/types" }, "license": "MIT", "type": "module", diff --git a/packages/utils/package.json b/packages/utils/package.json index f24b04a53f..3199c2ecf2 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -24,7 +24,8 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/rrweb-io/rrweb.git" + "url": "git+https://github.com/rrweb-io/rrweb.git", + "directory": "packages/utils" }, "license": "MIT", "type": "module", From 919c7c55834ea949f495ab7a9fa3f5b96dd92b06 Mon Sep 17 00:00:00 2001 From: yashrao2607 <140533789+yashrao2607@users.noreply.github.com> Date: Sat, 18 Jul 2026 14:32:50 +0530 Subject: [PATCH 2/2] chore: add changeset Co-Authored-By: Claude Sonnet 5 --- .changeset/shy-carrots-itch.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .changeset/shy-carrots-itch.md diff --git a/.changeset/shy-carrots-itch.md b/.changeset/shy-carrots-itch.md new file mode 100644 index 0000000000..883fec33e3 --- /dev/null +++ b/.changeset/shy-carrots-itch.md @@ -0,0 +1,25 @@ +--- +"@rrweb/all": patch +"@rrweb/browser-client": patch +"@rrweb/packer": patch +"@rrweb/record": patch +"@rrweb/replay": patch +"rrdom-nodejs": patch +"rrdom": patch +"rrvideo": patch +"rrweb-player": patch +"rrweb-snapshot": patch +"rrweb": patch +"@rrweb/types": patch +"@rrweb/utils": patch +"@rrweb/rrweb-plugin-canvas-webrtc-record": patch +"@rrweb/rrweb-plugin-canvas-webrtc-replay": patch +"@rrweb/rrweb-plugin-console-record": patch +"@rrweb/rrweb-plugin-console-replay": patch +"@rrweb/rrweb-plugin-network-record": patch +"@rrweb/rrweb-plugin-network-replay": patch +"@rrweb/rrweb-plugin-sequential-id-record": patch +"@rrweb/rrweb-plugin-sequential-id-replay": patch +--- + +Add `repository.directory` to package.json so relative links in each published README resolve to the correct GitHub path instead of 404ing