unified-error-handling
Version:
A lightweight, zero-dependency error handling library with dynamic adapter loading for multiple error tracking services
124 lines • 3.44 kB
JSON
{
"name": "unified-error-handling",
"version": "2.0.0",
"description": "A lightweight, zero-dependency error handling library with dynamic adapter loading for multiple error tracking services",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./react": {
"types": "./dist/react/index.d.ts",
"import": "./dist/react/index.js",
"require": "./dist/react/index.cjs"
}
},
"files": [
"dist/",
"README.md",
"LICENSE"
],
"author": {
"name": "Ahsan Mahmood",
"email": "aoneahsan@gmail.com",
"url": "https://github.com/aoneahsan"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/aoneahsan/unified-error-handling.git"
},
"bugs": {
"url": "https://github.com/aoneahsan/unified-error-handling/issues"
},
"keywords": [
"error-handling",
"crash-reporting",
"sentry",
"firebase-crashlytics",
"bugsnag",
"rollbar",
"datadog",
"logrocket",
"raygun",
"appcenter",
"zero-dependency",
"provider-less",
"react",
"typescript"
],
"scripts": {
"build": "npm run clean && npm run build:esm && npm run build:cjs && npm run build:types",
"build:esm": "esbuild src/index.ts src/react/index.ts --bundle --format=esm --outdir=dist --platform=browser --target=es2020 --sourcemap --external:react --external:react-dom",
"build:cjs": "esbuild src/index.ts --bundle --format=cjs --outfile=dist/index.cjs --platform=node --target=node16 && esbuild src/react/index.ts --bundle --format=cjs --outfile=dist/react/index.cjs --platform=node --target=node16 --external:react --external:react-dom",
"build:types": "tsc --emitDeclarationOnly --declaration --declarationMap",
"clean": "rimraf ./dist",
"dev": "npm run build:esm -- --watch",
"test": "vitest run",
"test:watch": "vitest watch",
"test:coverage": "vitest run --coverage",
"lint": "eslint . --ext ts,tsx",
"format": "prettier --write \"**/*.{ts,tsx,js,json,md}\"",
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build",
"size": "size-limit",
"analyze": "size-limit --why"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"peerDependenciesMeta": {
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
},
"devDependencies": {
"@size-limit/preset-small-lib": "^11.0.0",
"@types/node": "^24.1.0",
"@types/react": "^19.1.9",
"@typescript-eslint/eslint-plugin": "^8.38.0",
"@typescript-eslint/parser": "^8.38.0",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
"esbuild": "^0.20.0",
"eslint": "^9.32.0",
"husky": "^9.1.7",
"lint-staged": "^16.1.2",
"prettier": "~3.6.2",
"rimraf": "^6.0.1",
"size-limit": "^11.0.0",
"typescript": "~5.9.2",
"vitest": "^3.2.4"
},
"size-limit": [
{
"path": "dist/index.js",
"limit": "10 KB"
},
{
"path": "dist/react/index.js",
"limit": "8 KB"
}
],
"engines": {
"node": ">=16.0.0"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.{js,json,md}": [
"prettier --write"
]
}
}