@flareapp/vue 2.2.0 → 2.3.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @flareapp/vue
2
2
 
3
- Vue integration for [Flare](https://flareapp.io) error tracking. Installs a Vue error handler that catches component errors and reports them to Flare with Vue-specific context (component name, lifecycle info).
3
+ Vue integration for [Flare](https://flareapp.io) error tracking and logging. Installs a Vue error handler that catches component errors and reports them to Flare with Vue-specific context (component name, lifecycle info).
4
4
 
5
5
  ## Installation
6
6
 
@@ -28,6 +28,18 @@ flareVue(app);
28
28
  app.mount('#app');
29
29
  ```
30
30
 
31
+ ## Logging
32
+
33
+ Beyond errors, the client can send structured logs. Logs are opt-in: enable them with `enableLogs`, then call any of the eight syslog levels (`debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`).
34
+
35
+ ```js
36
+ import { flare } from '@flareapp/js';
37
+
38
+ flare.configure({ enableLogs: true });
39
+
40
+ flare.logger.info('Checkout started', { cartId: cart.id, total: cart.total });
41
+ ```
42
+
31
43
  ## Documentation
32
44
 
33
45
  Full documentation on the Vue error handler and its options is available at [flareapp.io/docs/vue/general/installation](https://flareapp.io/docs/vue/general/installation).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareapp/vue",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Vue client for flareapp.io",
5
5
  "homepage": "https://flareapp.io",
6
6
  "bugs": "https://github.com/spatie/flare-client-js/issues",
@@ -21,6 +21,9 @@
21
21
  "Sebastian De Deyne <sebastian@spatie.be>",
22
22
  "Sébastien Henau <seba@spatie.be>"
23
23
  ],
24
+ "files": [
25
+ "dist"
26
+ ],
24
27
  "main": "./dist/index.cjs",
25
28
  "module": "./dist/index.mjs",
26
29
  "types": "./dist/index.d.cts",
@@ -54,7 +57,7 @@
54
57
  "vue-router": "^5.0.0"
55
58
  },
56
59
  "peerDependencies": {
57
- "@flareapp/js": "^2.2.0",
60
+ "@flareapp/js": "^2.3.0",
58
61
  "vue": "^3.0.0",
59
62
  "vue-router": "^4.0.0 || ^5.0.0"
60
63
  },
package/.oxlintrc.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/oxlint/configuration_schema.json",
3
- "extends": ["../../.oxlintrc.json"],
4
- "plugins": ["vue"],
5
- "env": {
6
- "browser": true
7
- }
8
- }
package/CHANGELOG.md DELETED
@@ -1,23 +0,0 @@
1
- ## 2.0.0
2
-
3
- ### Breaking changes
4
-
5
- - Bumps peer dependency `@flareapp/js` to `^2.0.0`. See its CHANGELOG for wire format changes.
6
- - `flareVue` no longer passes a third `extraSolutionParameters` arg to `flare.report`.
7
- - Vue error context now lands on the report as `attributes['context.custom'].vue.*` (was nested under `context.vue.*`). Key fields: `vue.info`, `vue.errorOrigin`, `vue.componentName`, `vue.componentHierarchy`, `vue.componentHierarchyFrames`, `vue.componentProps`, `vue.route`.
8
- - `vue-router` moved from a required to an optional peer dependency.
9
- - Dropped Vue 2 support. Only Vue 3 (`^3.0.0`) is supported.
10
-
11
- ### New
12
-
13
- - **`FlareErrorBoundary` component.** Vue equivalent of the React error boundary. Catches errors in its subtree via `onErrorCaptured`, reports to Flare with full Vue context, and renders a `#fallback` slot with `error`, `componentProps`, `componentHierarchy`, `componentHierarchyFrames`, and `resetErrorBoundary`. Supports `resetKeys` for auto-reset and `onReset` callback.
14
- - **Lifecycle hooks on `flareVue()`.** `beforeEvaluate`, `beforeSubmit`, and `afterSubmit` options give control over the report pipeline at the app level.
15
- - **`captureWarnings` option.** When enabled, Vue warnings are reported via `flare.reportMessage()` at `warning` level.
16
- - **Prop serialization.** `attachProps` (boolean), `propsMaxDepth` (number), `propsDenylist` (regex), and `replaceDefaultDenylist` (boolean) control which component props are included in reports. `DEFAULT_PROPS_DENYLIST` is exported.
17
- - **Component hierarchy frames.** Reports include structured `componentHierarchyFrames` with component name, file path, and serialized props per frame.
18
- - Route context is automatically captured from `app.config.globalProperties.$router` when an error occurs. No explicit router option needed.
19
- - Non-`Error` values are coerced to `Error`.
20
- - Chains existing `app.config.errorHandler` instead of replacing it silently.
21
- - Duplicate-install guard prevents double-reporting when `app.use(flareVue)` is called more than once.
22
- - The package self-identifies via `flare.setSdkInfo({ name: '@flareapp/vue', version })` and `flare.setFramework({ name: 'Vue', version: app.version })` on install.
23
- - New exported types: `ComponentHierarchyFrame`, `ErrorOrigin`, `FlareErrorBoundaryFallbackProps`, `FlareErrorBoundaryHookParams`, `FlareVueContext`, `FlareVueOptions`, `FlareVueWarningContext`, `RouteContext`, `RouteParamValue`, `RouteQueryValue`.