@flareapp/vue 1.0.1 → 2.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareapp/vue",
3
- "version": "1.0.1",
3
+ "version": "2.0.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",
@@ -9,29 +9,59 @@
9
9
  "url": "git+https://github.com/spatie/flare-client-js.git"
10
10
  },
11
11
  "license": "MIT",
12
- "author": "adriaan@spatie.be",
13
- "main": "./dist/index.js",
12
+ "author": {
13
+ "name": "Spatie",
14
+ "email": "info@spatie.be"
15
+ },
16
+ "contributors": [
17
+ "Adriaan Marain <adriaan@spatie.be>",
18
+ "Alex Vanderbist <alex@spatie.be>",
19
+ "Dries Heyninck <dries@spatie.be>",
20
+ "Freek Van der Herten <freek@spatie.be>",
21
+ "Sebastian De Deyne <sebastian@spatie.be>",
22
+ "Sébastien Henau <seba@spatie.be>"
23
+ ],
24
+ "main": "./dist/index.cjs",
14
25
  "module": "./dist/index.mjs",
15
- "types": "./dist/index.d.ts",
26
+ "types": "./dist/index.d.cts",
16
27
  "exports": {
17
28
  ".": {
18
- "require": "./dist/index.js",
19
- "import": "./dist/index.mjs"
29
+ "import": {
30
+ "types": "./dist/index.d.mts",
31
+ "default": "./dist/index.mjs"
32
+ },
33
+ "require": {
34
+ "types": "./dist/index.d.cts",
35
+ "default": "./dist/index.cjs"
36
+ }
20
37
  }
21
38
  },
22
39
  "scripts": {
23
40
  "prepublishOnly": "npm run build",
24
- "build": "tsup src/index.js --format cjs,esm --dts --clean"
41
+ "build": "tsdown src/index.ts --format cjs,esm --dts --env.PACKAGE_VERSION=\"$(node -p \"require('./package.json').version\")\" --clean",
42
+ "typescript": "tsc --noEmit",
43
+ "release": "release-it",
44
+ "test": "vitest run"
25
45
  },
26
46
  "devDependencies": {
27
47
  "@flareapp/js": "file:../js",
28
- "tsup": "^8.0.1",
29
- "typescript": "^5.3.3",
30
- "vue": "^3.0.0"
48
+ "@vue/test-utils": "^2.4.0",
49
+ "jsdom": "^26.1.0",
50
+ "tsdown": "^0.20.3",
51
+ "typescript": "^5.7.0",
52
+ "vitest": "^4.0.0",
53
+ "vue": "^3.0.0",
54
+ "vue-router": "^4.6.4"
31
55
  },
32
56
  "peerDependencies": {
33
- "@flareapp/js": "^1.0.0",
34
- "vue": "^2.0.0||^3.0.0"
57
+ "@flareapp/js": "^2.0.0",
58
+ "vue": "^3.0.0",
59
+ "vue-router": "^4.0.0"
60
+ },
61
+ "peerDependenciesMeta": {
62
+ "vue-router": {
63
+ "optional": true
64
+ }
35
65
  },
36
66
  "publishConfig": {
37
67
  "access": "public"
package/dist/index.d.ts DELETED
@@ -1,28 +0,0 @@
1
- import { flare } from '@flareapp/js';
2
-
3
- function flareVue(app) {
4
- const initialErrorHandler = app.config.errorHandler;
5
-
6
- app.config.errorHandler = (error, vm, info) => {
7
- const componentName =
8
- vm && vm.$options && vm.$options.name
9
- ? vm.$options.name
10
- : 'AnonymousComponent';
11
-
12
- const context = {
13
- vue: { info, componentName },
14
- };
15
-
16
- flare.report(error, context, { vue: { vm, info } });
17
-
18
- if (typeof initialErrorHandler === 'function') {
19
- initialErrorHandler(error, vm, info);
20
-
21
- return;
22
- }
23
-
24
- throw error;
25
- };
26
- }
27
-
28
- export { flareVue };
package/dist/index.js DELETED
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.js
21
- var src_exports = {};
22
- __export(src_exports, {
23
- flareVue: () => flareVue
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
- var import_js = require("@flareapp/js");
27
- function flareVue(app) {
28
- const initialErrorHandler = app.config.errorHandler;
29
- app.config.errorHandler = (error, vm, info) => {
30
- const componentName = vm && vm.$options && vm.$options.name ? vm.$options.name : "AnonymousComponent";
31
- const context = {
32
- vue: { info, componentName }
33
- };
34
- import_js.flare.report(error, context, { vue: { vm, info } });
35
- if (typeof initialErrorHandler === "function") {
36
- initialErrorHandler(error, vm, info);
37
- return;
38
- }
39
- throw error;
40
- };
41
- }
42
- // Annotate the CommonJS export names for ESM import in node:
43
- 0 && (module.exports = {
44
- flareVue
45
- });
package/src/index.js DELETED
@@ -1,26 +0,0 @@
1
- import { flare } from '@flareapp/js';
2
-
3
- export function flareVue(app) {
4
- const initialErrorHandler = app.config.errorHandler;
5
-
6
- app.config.errorHandler = (error, vm, info) => {
7
- const componentName =
8
- vm && vm.$options && vm.$options.name
9
- ? vm.$options.name
10
- : 'AnonymousComponent';
11
-
12
- const context = {
13
- vue: { info, componentName },
14
- };
15
-
16
- flare.report(error, context, { vue: { vm, info } });
17
-
18
- if (typeof initialErrorHandler === 'function') {
19
- initialErrorHandler(error, vm, info);
20
-
21
- return;
22
- }
23
-
24
- throw error;
25
- };
26
- }