{"id":36858469,"url":"https://github.com/be9/faster-pbts","last_synced_at":"2026-01-12T14:47:54.531Z","repository":{"id":248530354,"uuid":"828949931","full_name":"be9/faster-pbts","owner":"be9","description":"A faster alternative for pbts from protobuf.js","archived":false,"fork":false,"pushed_at":"2025-05-22T07:03:40.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-22T07:42:12.573Z","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/be9.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}},"created_at":"2024-07-15T13:00:10.000Z","updated_at":"2025-05-22T07:03:43.000Z","dependencies_parsed_at":"2024-07-15T15:33:41.779Z","dependency_job_id":"bcf9dd2f-ddd9-454a-8a8e-da39d5df92b6","html_url":"https://github.com/be9/faster-pbts","commit_stats":null,"previous_names":["be9/faster-pbts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/be9/faster-pbts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be9%2Ffaster-pbts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be9%2Ffaster-pbts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be9%2Ffaster-pbts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be9%2Ffaster-pbts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/be9","download_url":"https://codeload.github.com/be9/faster-pbts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/be9%2Ffaster-pbts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-01-12T14:47:51.173Z","updated_at":"2026-01-12T14:47:54.496Z","avatar_url":"https://github.com/be9.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# faster-pbts\n\n[pbts]: https://github.com/protobufjs/protobuf.js/\n\n[![npm version](https://img.shields.io/npm/v/faster-pbts.svg)](https://www.npmjs.com/package/faster-pbts)\n[![license](https://img.shields.io/npm/l/faster-pbts.svg)](./LICENSE)\n\nA faster alternative to [pbts], the TypeScript typings generator from `protobuf.js`.\n\n## 🚀 Motivation\n\nFor large Protobuf collections, `pbts` can be slow and memory-intensive. This is due to its reliance on [JSDoc](https://www.npmjs.com/package/jsdoc), which is not optimized for performance.\n\nFor example, with a collection of ca. 2000 `.proto` files, `pbjs` produces a 233MB JavaScript file. Generating TypeScript typings from it using `pbts` takes approximately **13 minutes** and requires increasing memory limits:\n\n```bash\nNODE_OPTIONS=--max_old_space_size=16384 pbts ...\n```\n\n## ⚡ How `faster-pbts` Works\n\nLike `pbts`, `faster-pbts` extracts types from JSDoc annotations generated by `pbjs`. \nThe key difference is the implementation:\n\n* Uses [tree-sitter-javascript] and [tree-sitter-jsdoc] for fast, incremental parsing.\n* Processes input in **streaming mode**, significantly reducing memory usage.\n\nAs a result, generating typings for the same 233MB file takes **under 1 minute**.\n\n## 📦 Installation \u0026 Usage\n\n```bash\n# Add the package to your project\nnpm install faster-pbts\n\n# Generate typings\nnode_modules/.bin/faster-pbts -o output.d.ts input.js\n```\n\n* `input.js` should be the output file generated by `pbjs`.\n* This tool is a drop-in replacement for `pbts` in most workflows.\n\nUse `--help` to see other available options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe9%2Ffaster-pbts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbe9%2Ffaster-pbts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbe9%2Ffaster-pbts/lists"}