bugstack-sdk 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -96
- package/README.md +423 -421
- package/bin/bugstack.cjs +6 -6
- package/dist/adapters/express/index.d.mts +2 -2
- package/dist/adapters/express/index.d.ts +2 -2
- package/dist/adapters/express/index.js +2 -2
- package/dist/adapters/express/index.js.map +1 -1
- package/dist/adapters/express/index.mjs +2 -2
- package/dist/adapters/express/index.mjs.map +1 -1
- package/dist/adapters/generic/index.d.mts +2 -2
- package/dist/adapters/generic/index.d.ts +2 -2
- package/dist/adapters/generic/index.js +2 -2
- package/dist/adapters/generic/index.js.map +1 -1
- package/dist/adapters/generic/index.mjs +2 -2
- package/dist/adapters/generic/index.mjs.map +1 -1
- package/dist/adapters/nextjs/index.d.mts +2 -2
- package/dist/adapters/nextjs/index.d.ts +2 -2
- package/dist/adapters/nextjs/index.js +2 -2
- package/dist/adapters/nextjs/index.js.map +1 -1
- package/dist/adapters/nextjs/index.mjs +2 -2
- package/dist/adapters/nextjs/index.mjs.map +1 -1
- package/dist/build/cli.js.map +1 -1
- package/dist/build/cli.mjs.map +1 -1
- package/dist/build/upload.js.map +1 -1
- package/dist/build/upload.mjs.map +1 -1
- package/dist/{client-DoqE7sNh.d.mts → client-DK_ItP55.d.mts} +1 -1
- package/dist/{client-DoqE7sNh.d.ts → client-DK_ItP55.d.ts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/next-config/index.js.map +1 -1
- package/dist/next-config/index.mjs.map +1 -1
- package/package.json +103 -104
package/CHANGELOG.md
CHANGED
|
@@ -1,96 +1,109 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `bugstack-sdk` are documented here.
|
|
4
|
-
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
-
|
|
6
|
-
## [2.2.
|
|
7
|
-
|
|
8
|
-
### Fixed
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- New
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
`
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `bugstack-sdk` are documented here.
|
|
4
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
|
+
|
|
6
|
+
## [2.2.2] — 2026-10-29
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **Errors reach Bugstack without setting an endpoint.** The default
|
|
10
|
+
endpoint was `http://localhost:3001/api/capture`, so an app that did not
|
|
11
|
+
pass `endpoint` or set `BUGSTACK_ENDPOINT` reported nothing. It is now
|
|
12
|
+
`https://dashboard.bugstack.ai/api/ingest/sdk`, the ingest endpoint, which accepts this SDK's payload and its
|
|
13
|
+
`X-BugStack-API-Key` header. Source-map uploads derive
|
|
14
|
+
`https://dashboard.bugstack.ai/api/ingest/sdk/api/sourcemaps/upload` from it. An explicit `endpoint` or
|
|
15
|
+
`BUGSTACK_ENDPOINT` still wins.
|
|
16
|
+
- **The package's homepage is bugstack.ai.** npm listed the GitHub README
|
|
17
|
+
as the homepage; it now links to https://bugstack.ai.
|
|
18
|
+
|
|
19
|
+
## [2.2.1] — 2026-04-30
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **`bugstack` CLI is now installed on the user's `PATH`.** In `2.2.0`,
|
|
23
|
+
npm dropped the `bin[bugstack]` entry at publish time because the path
|
|
24
|
+
was prefixed with `./`, so `npx bugstack sourcemaps upload` and global
|
|
25
|
+
installs could not resolve the binary. Path normalized to
|
|
26
|
+
`bin/bugstack.cjs`.
|
|
27
|
+
|
|
28
|
+
## [2.2.0] — 2026-04-29
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- **Source-map upload pipeline for production builds.** Customers can now
|
|
32
|
+
upload server-side source maps to Bugstack so the orchestrator resolves
|
|
33
|
+
bundled stack frames (`.next/server/chunks/8393.js:1:8734`) back to
|
|
34
|
+
source-file positions (`app/api/orders/route.ts:42:5`) — turning the
|
|
35
|
+
"Could not identify primary file" failure mode into auto-fixable
|
|
36
|
+
errors. Two-step setup:
|
|
37
|
+
1. Wrap your `next.config.js`:
|
|
38
|
+
```js
|
|
39
|
+
const { withBugstack } = require('bugstack-sdk/next-config')
|
|
40
|
+
module.exports = withBugstack({ /* your config */ })
|
|
41
|
+
```
|
|
42
|
+
This enables `webpack.devtool = 'source-map'` for production
|
|
43
|
+
server builds, preserving any existing webpack hook.
|
|
44
|
+
2. Append to your `build` script:
|
|
45
|
+
```json
|
|
46
|
+
"build": "next build && bugstack sourcemaps upload"
|
|
47
|
+
```
|
|
48
|
+
The CLI walks `.next/server/**/*.map`, uploads each with the
|
|
49
|
+
active release identifier, and never fails the build.
|
|
50
|
+
- New `bugstack` CLI binary (registered via `bin`) — `bugstack sourcemaps
|
|
51
|
+
upload [--api-key X] [--release Y] [--endpoint Z] [--server-dir D]
|
|
52
|
+
[--concurrency N] [--max-bytes N] [--quiet]`. Auto-detects release from
|
|
53
|
+
`BUGSTACK_RELEASE`, `RENDER_GIT_COMMIT`, `VERCEL_GIT_COMMIT_SHA`,
|
|
54
|
+
`GITHUB_SHA`, or `git rev-parse HEAD` in that order.
|
|
55
|
+
- New programmatic API: `import { uploadSourceMaps } from 'bugstack-sdk/build'`
|
|
56
|
+
for callers who want to invoke the uploader from a custom Node script
|
|
57
|
+
rather than via the CLI.
|
|
58
|
+
- New entry: `bugstack-sdk/next-config` exports `withBugstack(config,
|
|
59
|
+
options?)` — the Next.js config wrapper. Idempotent and pass-through
|
|
60
|
+
when `emitServerSourceMaps: false`.
|
|
61
|
+
|
|
62
|
+
### Internal
|
|
63
|
+
- New tsup entries for `src/build/upload`, `src/build/cli`, and
|
|
64
|
+
`src/next-config`. Bin stub at `bin/bugstack.cjs` requires the built
|
|
65
|
+
CLI so the shebang concern stays in checked-in JavaScript and out of
|
|
66
|
+
the bundler's hands.
|
|
67
|
+
|
|
68
|
+
## [2.1.0] — 2026-04-29
|
|
69
|
+
|
|
70
|
+
### Added
|
|
71
|
+
- **Chunk-load error telemetry.** `ChunkLoadError` and the related family
|
|
72
|
+
(`Loading chunk N failed`, `Loading CSS chunk N failed`,
|
|
73
|
+
`Failed to fetch dynamically imported module`,
|
|
74
|
+
`Importing a module script failed`) are now detected and routed to a
|
|
75
|
+
lightweight telemetry endpoint instead of the main fix pipeline. They
|
|
76
|
+
aren't real bugs (stale-tab artifacts after a redeploy) and have no
|
|
77
|
+
source frames the orchestrator could fix, so they were wasting LLM
|
|
78
|
+
cycles when they hit `/api/capture`. The new path lets the dashboard
|
|
79
|
+
render a deploy-health spike detector while keeping the noise out of
|
|
80
|
+
the bug feed.
|
|
81
|
+
- New config option `dropChunkErrors` (default `false`) — set to `true`
|
|
82
|
+
to disable telemetry forwarding entirely and silently discard chunk
|
|
83
|
+
errors instead.
|
|
84
|
+
- New config option `chunkErrorsEndpoint` (default auto-derived from the
|
|
85
|
+
main `endpoint` — `/api/capture` becomes `/api/chunk-errors`). Override
|
|
86
|
+
if your error service splits telemetry across hosts.
|
|
87
|
+
- New exported helper `isChunkLoadError(error)` so callers can reuse the
|
|
88
|
+
same detection logic in their own browser-side error boundaries (e.g.
|
|
89
|
+
to soft-reload the page on first occurrence).
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
- The wire header `X-BugStack-SDK-Version` reported `0.2.0` since pre-2.0,
|
|
93
|
+
regardless of the actual installed version. Now injected at build time
|
|
94
|
+
from `package.json` via `tsup`'s `define`, so it stays in sync on every
|
|
95
|
+
release.
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
- Default behavior of `reportError` for chunk-load errors is now route-to-
|
|
99
|
+
telemetry. Previously these went into the main capture pipeline (where
|
|
100
|
+
they'd create unfixable rows the orchestrator would burn cycles on).
|
|
101
|
+
This is a soft behavior change: customer code is unaffected, but the
|
|
102
|
+
destination endpoint differs. Hosted customers (api.bugstack.ai) get
|
|
103
|
+
the new endpoint automatically; self-hosted error-service deployments
|
|
104
|
+
should pull the matching error-service release for the
|
|
105
|
+
`/api/chunk-errors` ingest route.
|
|
106
|
+
|
|
107
|
+
## [2.0.2] — 2026-02-27
|
|
108
|
+
|
|
109
|
+
Previous published baseline.
|