package.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {
  2. "name": "entities",
  3. "version": "7.0.1",
  4. "description": "Encode & decode XML and HTML entities with ease & speed",
  5. "keywords": [
  6. "html entities",
  7. "entity decoder",
  8. "entity encoding",
  9. "html decoding",
  10. "html encoding",
  11. "xml decoding",
  12. "xml encoding"
  13. ],
  14. "repository": {
  15. "type": "git",
  16. "url": "https://github.com/fb55/entities.git"
  17. },
  18. "funding": "https://github.com/fb55/entities?sponsor=1",
  19. "license": "BSD-2-Clause",
  20. "author": "Felix Boehm <me@feedic.com>",
  21. "sideEffects": false,
  22. "type": "module",
  23. "exports": {
  24. ".": {
  25. "import": {
  26. "types": "./dist/esm/index.d.ts",
  27. "default": "./dist/esm/index.js"
  28. },
  29. "require": {
  30. "types": "./dist/commonjs/index.d.ts",
  31. "default": "./dist/commonjs/index.js"
  32. }
  33. },
  34. "./decode": {
  35. "import": {
  36. "types": "./dist/esm/decode.d.ts",
  37. "default": "./dist/esm/decode.js"
  38. },
  39. "require": {
  40. "types": "./dist/commonjs/decode.d.ts",
  41. "default": "./dist/commonjs/decode.js"
  42. }
  43. },
  44. "./escape": {
  45. "import": {
  46. "types": "./dist/esm/escape.d.ts",
  47. "default": "./dist/esm/escape.js"
  48. },
  49. "require": {
  50. "types": "./dist/commonjs/escape.d.ts",
  51. "default": "./dist/commonjs/escape.js"
  52. }
  53. }
  54. },
  55. "main": "./dist/commonjs/index.js",
  56. "module": "./dist/esm/index.js",
  57. "types": "./dist/commonjs/index.d.ts",
  58. "files": [
  59. "decode.js",
  60. "decode.d.ts",
  61. "escape.js",
  62. "escape.d.ts",
  63. "dist",
  64. "src",
  65. "!**/*.spec.ts"
  66. ],
  67. "scripts": {
  68. "build:docs": "typedoc --hideGenerator src/index.ts",
  69. "build:encode-trie": "node --import=tsx scripts/write-encode-map.ts",
  70. "build:trie": "node --import=tsx scripts/write-decode-map.ts",
  71. "benchmark": "node --import=tsx scripts/benchmark.ts",
  72. "format": "npm run format:es && npm run format:biome",
  73. "format:es": "npm run lint:es -- --fix",
  74. "format:biome": "biome check --fix .",
  75. "lint": "npm run lint:es && npm run lint:ts && npm run lint:biome",
  76. "lint:es": "eslint . --ignore-path .gitignore",
  77. "lint:biome": "biome check .",
  78. "lint:ts": "tsc --noEmit",
  79. "prepublishOnly": "tshy",
  80. "test": "npm run test:vi && npm run lint",
  81. "test:vi": "vitest run"
  82. },
  83. "devDependencies": {
  84. "@biomejs/biome": "^2.3.11",
  85. "@types/node": "^25.0.9",
  86. "@typescript-eslint/eslint-plugin": "^8.53.1",
  87. "@typescript-eslint/parser": "^8.53.1",
  88. "@vitest/coverage-v8": "^3.2.4",
  89. "@types/he": "^1.2.3",
  90. "eslint": "^8.57.1",
  91. "eslint-config-biome": "^2.1.3",
  92. "eslint-plugin-n": "^17.23.2",
  93. "eslint-plugin-unicorn": "^56.0.1",
  94. "he": "^1.2.0",
  95. "html-entities": "^2.6.0",
  96. "parse-entities": "^4.0.2",
  97. "tinybench": "^5.1.0",
  98. "tshy": "^3.1.0",
  99. "tsx": "^4.21.0",
  100. "typedoc": "^0.28.16",
  101. "typescript": "^5.9.3",
  102. "vitest": "^3.2.4"
  103. },
  104. "engines": {
  105. "node": ">=0.12"
  106. },
  107. "tshy": {
  108. "exclude": [
  109. "**/*.spec.ts",
  110. "**/__fixtures__/*",
  111. "**/__tests__/*",
  112. "**/__snapshots__/*"
  113. ],
  114. "exports": {
  115. ".": "./src/index.ts",
  116. "./decode": "./src/decode.ts",
  117. "./escape": "./src/escape.ts"
  118. }
  119. }
  120. }