@flareapp/js 2.2.0 → 2.2.1

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/dist/index.cjs CHANGED
@@ -134,7 +134,7 @@ var FetchFileReader = class {
134
134
 
135
135
  //#endregion
136
136
  //#region src/env/index.ts
137
- const CLIENT_VERSION = typeof process !== "undefined" && true ? "2.2.0" : "?";
137
+ const CLIENT_VERSION = typeof process !== "undefined" && true ? "2.2.1" : "?";
138
138
 
139
139
  //#endregion
140
140
  //#region src/index.ts
package/dist/index.mjs CHANGED
@@ -133,7 +133,7 @@ var FetchFileReader = class {
133
133
 
134
134
  //#endregion
135
135
  //#region src/env/index.ts
136
- const CLIENT_VERSION = typeof process !== "undefined" && true ? "2.2.0" : "?";
136
+ const CLIENT_VERSION = typeof process !== "undefined" && true ? "2.2.1" : "?";
137
137
 
138
138
  //#endregion
139
139
  //#region src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareapp/js",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "JavaScript client for flareapp.io",
5
5
  "homepage": "https://flareapp.io",
6
6
  "bugs": {
@@ -23,6 +23,9 @@
23
23
  "Sebastian De Deyne <sebastian@spatie.be>",
24
24
  "Sébastien Henau <seba@spatie.be>"
25
25
  ],
26
+ "files": [
27
+ "dist"
28
+ ],
26
29
  "main": "./dist/index.cjs",
27
30
  "module": "./dist/index.mjs",
28
31
  "types": "./dist/index.d.cts",
@@ -46,7 +49,7 @@
46
49
  "release": "release-it"
47
50
  },
48
51
  "dependencies": {
49
- "@flareapp/core": "2.2.0"
52
+ "@flareapp/core": "2.2.1"
50
53
  },
51
54
  "devDependencies": {
52
55
  "error-stack-parser": "^2.0.2",
package/CHANGELOG.md DELETED
@@ -1,45 +0,0 @@
1
- ## next-version — 2026-05-28
2
-
3
- - Internal refactor: most env-agnostic logic moved to the new `@flareapp/core`
4
- package. Public API is unchanged: `import { flare, Flare, ... } from '@flareapp/js'`
5
- continues to work.
6
- - `redactFullPath` is now a deprecated alias for `redactUrlQuery` (re-exported
7
- from `@flareapp/core`). Replace call sites at your convenience; both keep
8
- working.
9
- - Per-call mutable state (glows, context attributes, entry point) now lives on
10
- a `Scope` object internally. Behavior is identical in the browser. The change
11
- enables `@flareapp/node` to isolate per-request state via AsyncLocalStorage.
12
-
13
- ## 2.0.0
14
-
15
- ### Breaking changes
16
-
17
- - **Endpoint changed.** SDK now POSTs to `https://ingress.flareapp.io/v1/errors`. Success response is `201 Created`. Auth header is `x-api-token`.
18
- - **Wire format reshaped to match the server's canonical schema.**
19
- - `Report` uses camelCase top-level fields (`exceptionClass`, `seenAtUnixNano`, `sourcemapVersionId`, `isLog`, `level`, `attributes`, `events`).
20
- - `StackFrame` uses camelCase (`lineNumber`, `columnNumber`, `codeSnippet`, `isApplicationFrame`).
21
- - `Context` is gone. User context is set via `addContext(name, value)` and `addContextGroup(group, value)`; both write into the flat `attributes` map under `context.custom` and `context.<group>`.
22
- - Glows ride along as `php_glow`-typed entries in `events[]`.
23
- - **`report()` second argument** is now an `Attributes` map (was a freeform context object). The third argument (solution provider parameters) is removed.
24
- - **Config keys renamed:** `reportingUrl` → `ingestUrl`, `sourcemapVersion` → `sourcemapVersionId`.
25
- - **Deprecated trailing setters removed:** `flare.beforeEvaluate = …`, `flare.beforeSubmit = …`, `flare.stage = …`. Use `flare.configure({ … })`.
26
- - **`reportMessage` signature changed:** `reportMessage(message, level?, attributes?)`. The old `'Log INFO'` regex is gone, pass `level` directly.
27
- - **Solutions API removed:** `registerSolutionProvider`, `Solution`, `SolutionProvider`, `SolutionProviderExtraParameters` are all deleted.
28
- - **`flare.config` is now `Readonly<Config>`** and `flare.glows` is `readonly Glow[]`. Direct property mutation no longer works; use `configure()`.
29
-
30
- ### New
31
-
32
- - **URL redaction.** Sensitive query-string parameters (`password`, `token`, `secret`, `authorization`, etc.) are automatically replaced with `[redacted]` in `url.full`, `url.query`, and `flare.entry_point.value` attributes. Configurable via `urlDenylist` (custom regex) and `replaceDefaultUrlDenylist` (boolean) config options.
33
- - `DEFAULT_URL_DENYLIST`, `redactFullPath`, and `resolveDenylist` are exported for direct use by framework adapters.
34
- - `setEntryPoint({ identifier?, name?, type? })` — mutable global setter for the entry-point handler. SPA framework adapters call this on every navigation.
35
- - `setSdkInfo({ name, version })` — overridable SDK identity (default `@flareapp/js` + client version). Integrations override it.
36
- - `setFramework({ name, version? })` — host framework attribution (e.g. React, Vue).
37
- - `code` field auto-populated from `error.code` when present (string, ≤64 chars).
38
- - Non-`Error` values passed to `report()` are coerced to `Error` instead of silently failing.
39
- - Browser context attributes (`url.full`, `url.query`, `browser.user_agent`, `browser.viewport.*`, cookies, request data) are auto-collected on each report.
40
- - New exported types: `SpanEvent`, `EntryPointHandler`, `Framework`, `SdkInfo`, `OverriddenGrouping`, `Attributes`, `AttributeValue`.
41
- - **`sampleRate` config option.** Number between `0` and `1` (default `1`). Controls what fraction of errors are reported. Applies to `report()`, `reportMessage()`, and `reportUnhandledRejection()`.
42
-
43
- ### Notes
44
-
45
- - `seenAtUnixNano` is now real nanoseconds (`Date.now() * 1_000_000`).
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "paths": {
5
- "@flareapp/core": ["../core/src/index.ts"]
6
- }
7
- },
8
- "include": ["src"]
9
- }
package/vitest.config.ts DELETED
@@ -1,17 +0,0 @@
1
- import { resolve, dirname } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
-
4
- import { defineConfig } from 'vitest/config';
5
-
6
- const __dirname = dirname(fileURLToPath(import.meta.url));
7
-
8
- export default defineConfig({
9
- test: {
10
- environment: 'node',
11
- },
12
- resolve: {
13
- alias: {
14
- '@flareapp/core': resolve(__dirname, '../core/src/index.ts'),
15
- },
16
- },
17
- });