{"id":50487254,"url":"https://github.com/chee/pnpm-plugin-patchwork","last_synced_at":"2026-06-01T23:30:36.124Z","repository":{"id":340873646,"uuid":"1167991939","full_name":"chee/pnpm-plugin-patchwork","owner":"chee","description":"pnpm-resolver-patchwork","archived":false,"fork":false,"pushed_at":"2026-04-29T13:29:14.000Z","size":2112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T15:34:23.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-26T22:43:59.000Z","updated_at":"2026-04-29T13:30:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chee/pnpm-plugin-patchwork","commit_stats":null,"previous_names":["chee/pnpm-resolver-patchwork","chee/pnpm-plugin-patchwork"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chee/pnpm-plugin-patchwork","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fpnpm-plugin-patchwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fpnpm-plugin-patchwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fpnpm-plugin-patchwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fpnpm-plugin-patchwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chee","download_url":"https://codeload.github.com/chee/pnpm-plugin-patchwork/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chee%2Fpnpm-plugin-patchwork/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33798943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-01T23:30:35.216Z","updated_at":"2026-06-01T23:30:36.118Z","avatar_url":"https://github.com/chee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pnpm-plugin-patchwork\n\n\u003e **Warning**: chee has not read line 1 of this codebase. It was entirely written by the computer.\n\nA pnpm custom resolver and fetcher for installing packages from a [patchwork](https://github.com/inkandswitch/patchwork) filesystem (automerge-repo).\n\nSpecify dependencies as `automerge:\u003cdocumentId\u003e` in your `package.json` and pnpm will resolve and fetch them from the automerge sync server.\n\n## Requirements\n\n- pnpm v11 (beta.2+) — uses the top-level `resolvers`/`fetchers` plugin API\n\n## Setup\n\n1. Add `pnpm-plugin-patchwork` as a config dependency in your `pnpm-workspace.yaml`:\n\n```yaml\nconfigDependencies:\n  pnpm-plugin-patchwork: \"0.1.0\"\n```\n\n2. Add automerge dependencies to your `package.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"@patchwork/chat\": \"automerge:6iXwddwF9cwrjmM5yqp2xUENxUY\"\n  }\n}\n```\n\n3. Run `pnpm install`.\n\n## How it works\n\n- **Resolver**: Detects `automerge:` specifiers, connects to the automerge sync server, reads the folder document's `package.json` to get the package manifest, and returns a `custom:automerge` resolution.\n\n- **Fetcher**: Connects to the sync server, recursively walks the automerge folder document tree to collect all files, packs them into a tarball, and delegates to pnpm's built-in `localTarball` fetcher.\n\n- **Caching**: The document ID + heads hash is used as the resolution ID in the lockfile, so installs are cached until the document changes.\n\n## Subpath resolution\n\nYou can resolve a subfolder of a folder document as the package root:\n\n```json\n{\n  \"dependencies\": {\n    \"my-pkg\": \"automerge:6iXwddwF9cwrjmM5yqp2xUENxUY/dist\"\n  }\n}\n```\n\n## Configuration\n\nThe sync server defaults to `wss://sync3.automerge.org`. To use a different server, add a `patchwork.server` field to your `package.json`:\n\n```json\n{\n  \"patchwork\": {\n    \"server\": \"wss://my-sync-server.example.com\"\n  }\n}\n```\n\nOr set the `PATCHWORK_SYNC_SERVER` environment variable (takes precedence):\n\n```sh\nPATCHWORK_SYNC_SERVER=wss://my-sync-server.example.com pnpm install\n```\n\n## Tests\n\n```sh\npnpm test\n```\n\nUnit tests use a mocked automerge repo. The e2e test runs `pnpm install` in `test/fixture/` against the real sync server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchee%2Fpnpm-plugin-patchwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchee%2Fpnpm-plugin-patchwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchee%2Fpnpm-plugin-patchwork/lists"}