package.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "name": "ts-custom-error",
  3. "version": "3.3.1",
  4. "description": "Extend native Error to create custom errors",
  5. "repository": "github:adriengibrat/ts-custom-error",
  6. "bugs": "https://github.com/adriengibrat/ts-custom-error/issues",
  7. "keywords": [
  8. "custom Error",
  9. "extend",
  10. "Error"
  11. ],
  12. "author": "Adrien Gibrat <adrien.gibrat@gmail.com>",
  13. "license": "MIT",
  14. "main": "dist/custom-error.js",
  15. "module": "dist/custom-error.mjs",
  16. "unpkg": "dist/custom-error.umd.js",
  17. "types": "dist/custom-error.d.ts",
  18. "engines": {
  19. "node": ">=14.0.0"
  20. },
  21. "scripts": {
  22. "start": "jest --watch --notify",
  23. "prebuild": "rm -rf dist",
  24. "build": "tsc --build tsconfig.json && microbundle build --no-compress --entry dist/src/index.js",
  25. "postbuild": "npm run minify:umd && npm run types:concat && npm run dist:cleanup",
  26. "minify:umd": "uglifyjs --compress --output dist/custom-error.umd.js -- dist/custom-error.umd.js",
  27. "types:concat": "cat dist/src/factory.d.ts >> dist/src/custom-error.d.ts && cat dist/src/custom-error.d.ts > dist/custom-error.d.ts && cat dist/custom-error.d.ts > dist/custom-error.umd.d.ts",
  28. "dist:cleanup": "rm -rf dist/src",
  29. "test": "jest",
  30. "coverage": "jest --coverage",
  31. "commit": "lint-staged && git-cz"
  32. },
  33. "devDependencies": {
  34. "@semantic-release/changelog": "^6.0.1",
  35. "@semantic-release/git": "^10.0.1",
  36. "@types/jest": "^28.1.8",
  37. "@types/node": "^18.7.13",
  38. "commitizen": "^4.2.5",
  39. "cz-conventional-changelog": "^3.3.0",
  40. "jest": "^28.0.0",
  41. "jest-tap-reporter": "^1.9.0",
  42. "lint-staged": "^13.0.3",
  43. "microbundle": "^0.15.1",
  44. "prettier": "^2.7.1",
  45. "semantic-release": "^19.0.5",
  46. "ts-jest": "^28.0.8",
  47. "tslint": "^6.1.2",
  48. "tslint-config-prettier": "^1.18.0",
  49. "tslint-config-standard": "^9.0.0",
  50. "typescript": "^4.8.2",
  51. "uglifyjs": "^2.4.11"
  52. },
  53. "mangle": {
  54. "regex": "^(?!CustomError\b).*"
  55. },
  56. "config": {
  57. "commitizen": {
  58. "path": "cz-conventional-changelog"
  59. }
  60. },
  61. "prettier": {
  62. "useTabs": true,
  63. "semi": false,
  64. "singleQuote": true,
  65. "trailingComma": "all"
  66. },
  67. "lint-staged": {
  68. "*.ts": [
  69. "prettier --write",
  70. "tslint",
  71. "git add"
  72. ]
  73. },
  74. "jest": {
  75. "reporters": [
  76. "jest-tap-reporter"
  77. ],
  78. "testRegex": "\\.spec\\.ts$",
  79. "transform": {
  80. "^.+\\.tsx?$": "ts-jest"
  81. },
  82. "moduleFileExtensions": [
  83. "ts",
  84. "js"
  85. ],
  86. "preset": "ts-jest",
  87. "testMatch": null
  88. },
  89. "release": {
  90. "branches": [
  91. "main"
  92. ],
  93. "verifyConditions": [
  94. "@semantic-release/changelog",
  95. "@semantic-release/npm",
  96. "@semantic-release/git"
  97. ],
  98. "prepare": [
  99. "@semantic-release/changelog",
  100. "@semantic-release/npm",
  101. "@semantic-release/git"
  102. ],
  103. "publish": [
  104. "@semantic-release/npm",
  105. {
  106. "path": "@semantic-release/github",
  107. "assets": [
  108. {
  109. "path": "dist/custom-error.d.ts",
  110. "label": "Typescript typings"
  111. },
  112. {
  113. "path": "dist/custom-error.js",
  114. "label": "Common JS"
  115. },
  116. {
  117. "path": "dist/custom-error.js.map",
  118. "label": "Common JS - sourcemap"
  119. },
  120. {
  121. "path": "dist/custom-error.mjs",
  122. "label": "ES module"
  123. },
  124. {
  125. "path": "dist/custom-error.mjs.map",
  126. "label": "ES module - sourcemap"
  127. },
  128. {
  129. "path": "dist/custom-error.umd.js",
  130. "label": "UMD (minified, CDN ready)"
  131. },
  132. {
  133. "path": "dist/custom-error.umd.js.map",
  134. "label": "UMD - sourcemap"
  135. }
  136. ]
  137. }
  138. ]
  139. },
  140. "__npminstall_done": true,
  141. "_from": "ts-custom-error@3.3.1",
  142. "_resolved": "https://registry.npmmirror.com/ts-custom-error/-/ts-custom-error-3.3.1.tgz"
  143. }