package.json 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. "name": "encoding-sniffer",
  3. "version": "0.2.1",
  4. "description": "Implementation of the HTML encoding sniffer algo, with stream support",
  5. "bugs": {
  6. "url": "https://github.com/fb55/encoding-sniffer/issues"
  7. },
  8. "repository": {
  9. "type": "git",
  10. "url": "git://github.com/fb55/encoding-sniffer.git"
  11. },
  12. "funding": "https://github.com/fb55/encoding-sniffer?sponsor=1",
  13. "license": "MIT",
  14. "author": "Felix Boehm <me@feedic.com>",
  15. "type": "module",
  16. "exports": {
  17. ".": {
  18. "import": {
  19. "types": "./dist/esm/index.d.ts",
  20. "default": "./dist/esm/index.js"
  21. },
  22. "require": {
  23. "types": "./dist/commonjs/index.d.ts",
  24. "default": "./dist/commonjs/index.js"
  25. }
  26. },
  27. "./sniffer": {
  28. "import": {
  29. "types": "./dist/esm/sniffer.d.ts",
  30. "default": "./dist/esm/sniffer.js"
  31. },
  32. "require": {
  33. "types": "./dist/commonjs/sniffer.d.ts",
  34. "default": "./dist/commonjs/sniffer.js"
  35. }
  36. }
  37. },
  38. "main": "./dist/commonjs/index.js",
  39. "module": "./dist/esm/index.js",
  40. "types": "./dist/commonjs/index.d.ts",
  41. "files": [
  42. "sniffer.js",
  43. "sniffer.d.ts",
  44. "dist"
  45. ],
  46. "scripts": {
  47. "build": "tshy",
  48. "build:docs": "typedoc --hideGenerator src/index.ts",
  49. "format": "npm run format:es && npm run format:prettier",
  50. "format:es": "npm run lint:es -- --fix",
  51. "format:prettier": "npm run prettier -- --write",
  52. "lint": "npm run lint:es && npm run lint:ts && npm run lint:prettier",
  53. "lint:es": "eslint --ignore-path .gitignore .",
  54. "lint:prettier": "npm run prettier -- --check",
  55. "lint:ts": "tsc --noEmit",
  56. "prepublishOnly": "npm run build",
  57. "prettier": "prettier '**/*.{ts,md,json,yml}'",
  58. "test": "npm run test:vi && npm run lint",
  59. "test:vi": "vitest run"
  60. },
  61. "prettier": {
  62. "proseWrap": "always",
  63. "tabWidth": 4
  64. },
  65. "dependencies": {
  66. "iconv-lite": "^0.6.3",
  67. "whatwg-encoding": "^3.1.1"
  68. },
  69. "devDependencies": {
  70. "@types/node": "^22.15.30",
  71. "@types/whatwg-encoding": "^2.0.3",
  72. "@typescript-eslint/eslint-plugin": "^8.27.0",
  73. "@typescript-eslint/parser": "^8.33.1",
  74. "@vitest/coverage-v8": "^2.1.8",
  75. "eslint": "^8.57.1",
  76. "eslint-config-prettier": "^10.1.5",
  77. "eslint-plugin-n": "^17.19.0",
  78. "eslint-plugin-unicorn": "^56.0.1",
  79. "prettier": "^3.5.3",
  80. "tshy": "^3.0.2",
  81. "typedoc": "^0.28.5",
  82. "typescript": "^5.8.3",
  83. "vitest": "^2.0.2"
  84. },
  85. "tshy": {
  86. "exports": {
  87. ".": "./src/index.ts",
  88. "./sniffer": "./src/sniffer.ts"
  89. },
  90. "exclude": [
  91. "src/**/*.spec.ts"
  92. ]
  93. }
  94. }