{"id":45632599,"url":"https://github.com/getbooboo/js","last_synced_at":"2026-03-02T21:19:35.943Z","repository":{"id":339552671,"uuid":"1162391788","full_name":"getbooboo/js","owner":"getbooboo","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-23T21:08:05.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T05:36:18.550Z","etag":null,"topics":["error-tracking","javascript","monitoring","react","sdk","typescript","vue"],"latest_commit_sha":null,"homepage":"https://booboo.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getbooboo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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-20T07:50:19.000Z","updated_at":"2026-02-23T21:04:58.000Z","dependencies_parsed_at":"2026-02-25T02:00:34.888Z","dependency_job_id":null,"html_url":"https://github.com/getbooboo/js","commit_stats":null,"previous_names":["getbooboo/js"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/getbooboo/js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbooboo%2Fjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbooboo%2Fjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbooboo%2Fjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbooboo%2Fjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getbooboo","download_url":"https://codeload.github.com/getbooboo/js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbooboo%2Fjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29808860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"online","status_checked_at":"2026-02-25T02:00:07.329Z","response_time":61,"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":["error-tracking","javascript","monitoring","react","sdk","typescript","vue"],"created_at":"2026-02-24T01:00:13.608Z","updated_at":"2026-03-02T21:19:35.936Z","avatar_url":"https://github.com/getbooboo.png","language":"TypeScript","readme":"# @booboo.dev/js\n\n[![CI](https://github.com/getbooboo/js/actions/workflows/ci.yml/badge.svg)](https://github.com/getbooboo/js/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/@booboo.dev/js.svg)](https://www.npmjs.com/package/@booboo.dev/js)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nOfficial JavaScript SDK for [booboo.dev](https://booboo.dev) error tracking. Zero runtime dependencies.\n\n## Installation\n\n```bash\nnpm install @booboo.dev/js\n```\n\n## Quick Start\n\n```javascript\nimport { init } from \"@booboo.dev/js\";\n\ninit({ dsn: \"your-dsn-here\" });\n```\n\nThat's it. Unhandled errors and promise rejections are automatically captured.\n\n## Manual Capture\n\n```javascript\nimport { captureException, captureMessage, flush } from \"@booboo.dev/js\";\n\ntry {\n  riskyOperation();\n} catch (error) {\n  captureException(error);\n}\n\ncaptureMessage(\"Something noteworthy happened\", \"warning\");\n\n// Drain pending events (e.g. before shutdown)\nawait flush();\n```\n\n## User Context\n\n```javascript\nimport { setUser } from \"@booboo.dev/js\";\n\nsetUser({\n  id: \"123\",\n  email: \"user@example.com\",\n  username: \"alice\",\n});\n```\n\n## Breadcrumbs\n\nBreadcrumbs are captured automatically (console, clicks, navigation, fetch). You can also add custom ones:\n\n```javascript\nimport { addBreadcrumb } from \"@booboo.dev/js\";\n\naddBreadcrumb({\n  type: \"custom\",\n  category: \"auth\",\n  message: \"User logged in\",\n});\n```\n\n## Configuration\n\n```javascript\nimport { init } from \"@booboo.dev/js\";\n\ninit({\n  dsn: \"your-dsn-here\",\n  endpoint: \"https://api.booboo.dev/ingest/\", // default\n  environment: \"production\",\n  breadcrumbs: true, // or { console: true, clicks: true, navigation: true, fetch: true }\n  maxBreadcrumbs: 30,\n  tags: { version: \"1.2.3\" },\n  context: { version: \"1.2.3\" },\n  user: { id: \"123\" },\n  beforeSend: (event) =\u003e {\n    // Return null to drop the event, or modify and return it\n    return event;\n  },\n});\n```\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `dsn` | (required) | Your project's DSN from booboo.dev |\n| `endpoint` | `https://api.booboo.dev/ingest/` | Ingestion endpoint URL |\n| `environment` | `\"\"` | Environment name (e.g. `\"production\"`, `\"staging\"`). Attached to every event. |\n| `breadcrumbs` | `true` | Enable/disable automatic breadcrumb capture |\n| `maxBreadcrumbs` | `30` | Maximum breadcrumbs to keep in buffer |\n| `tags` | `{}` | Custom tags attached to every event |\n| `context` | `{}` | Custom context attached to every event |\n| `user` | `null` | Initial user context |\n| `captureHttpErrors` | `false` | Auto-capture HTTP errors from fetch. `true` = 5xx, `[429, 500]` = specific codes, or object with `statuses` and `targets` |\n| `beforeSend` | `null` | Hook to modify or drop events before sending |\n\n## HTTP Error Capture\n\nAutomatically capture HTTP errors from `fetch()` requests:\n\n```javascript\nimport { init } from \"@booboo.dev/js\";\n\n// Capture all 5xx responses\ninit({ dsn: \"your-dsn-here\", captureHttpErrors: true });\n\n// Or specify exact status codes\ninit({ dsn: \"your-dsn-here\", captureHttpErrors: [429, 500, 502, 503] });\n\n// Filter by URL to avoid capturing errors from third-party services\ninit({\n  dsn: \"your-dsn-here\",\n  captureHttpErrors: {\n    targets: [\"api.myapp.com\", /^https:\\/\\/internal\\./],\n  },\n});\n\n// Combine specific statuses with URL filtering\ninit({\n  dsn: \"your-dsn-here\",\n  captureHttpErrors: {\n    statuses: [429, 500, 502, 503],\n    targets: [\"api.myapp.com\"],\n  },\n});\n```\n\n### Axios\n\nFor Axios, use the `axiosErrorInterceptor` helper:\n\n```javascript\nimport axios from \"axios\";\nimport { axiosErrorInterceptor } from \"@booboo.dev/js\";\n\nconst api = axios.create({ baseURL: \"/api\" });\napi.interceptors.response.use(null, axiosErrorInterceptor());\n\n// Custom status codes\napi.interceptors.response.use(null, axiosErrorInterceptor({ statuses: [429, 500] }));\n```\n\n## React\n\n```jsx\nimport { ErrorBoundary } from \"@booboo.dev/js/react\";\n\nfunction App() {\n  return (\n    \u003cErrorBoundary fallback={\u003cdiv\u003eSomething went wrong\u003c/div\u003e}\u003e\n      \u003cMyApp /\u003e\n    \u003c/ErrorBoundary\u003e\n  );\n}\n```\n\nThe `fallback` prop also accepts a render function:\n\n```jsx\n\u003cErrorBoundary fallback={(error, reset) =\u003e (\n  \u003cdiv\u003e\n    \u003cp\u003eError: {error.message}\u003c/p\u003e\n    \u003cbutton onClick={reset}\u003eTry again\u003c/button\u003e\n  \u003c/div\u003e\n)}\u003e\n  \u003cMyApp /\u003e\n\u003c/ErrorBoundary\u003e\n```\n\n### React Query\n\nAutomatically capture errors from TanStack Query / React Query. Query keys, hashes, and mutation IDs are included as context for easier debugging:\n\n```javascript\nimport { QueryClient, QueryCache, MutationCache } from \"@tanstack/react-query\";\nimport { boobooQueryIntegration } from \"@booboo.dev/js/react\";\n\nconst b = boobooQueryIntegration();\nconst queryClient = new QueryClient({\n  queryCache: new QueryCache(b.queryCache),\n  mutationCache: new MutationCache(b.mutationCache),\n});\n```\n\n## Vue\n\n```javascript\nimport { createApp } from \"vue\";\nimport { init } from \"@booboo.dev/js\";\nimport { BoobooVue } from \"@booboo.dev/js/vue\";\n\ninit({ dsn: \"your-dsn-here\" });\n\nconst app = createApp(App);\napp.use(BoobooVue());\napp.mount(\"#app\");\n```\n\n## Features\n\n- Automatic capture of unhandled errors and promise rejections\n- Automatic HTTP error capture from `fetch()` with `captureHttpErrors`\n- Stack trace parsing for Chrome, Firefox, and Safari\n- Source context enrichment\n- Automatic breadcrumbs (console, clicks, navigation, fetch)\n- React `ErrorBoundary` component\n- React Query / TanStack Query integration\n- Axios error interceptor\n- Vue 3 plugin\n- `flush()` to drain pending events before shutdown\n- `beforeSend` hook for event filtering\n- Custom tags, context, and user data\n- Non-blocking event delivery with page visibility flush\n- Zero runtime dependencies\n- ESM and CJS dual output\n- Full TypeScript support\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetbooboo%2Fjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetbooboo%2Fjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetbooboo%2Fjs/lists"}