package.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {
  2. "name": "encoding-sniffer",
  3. "version": "0.2.0",
  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. "source": "./src/index.ts",
  20. "types": "./dist/esm/index.d.ts",
  21. "default": "./dist/esm/index.js"
  22. },
  23. "require": {
  24. "source": "./src/index.ts",
  25. "types": "./dist/commonjs/index.d.ts",
  26. "default": "./dist/commonjs/index.js"
  27. }
  28. },
  29. "./sniffer": {
  30. "import": {
  31. "source": "./src/sniffer.ts",
  32. "types": "./dist/esm/sniffer.d.ts",
  33. "default": "./dist/esm/sniffer.js"
  34. },
  35. "require": {
  36. "source": "./src/sniffer.ts",
  37. "types": "./dist/commonjs/sniffer.d.ts",
  38. "default": "./dist/commonjs/sniffer.js"
  39. }
  40. }
  41. },
  42. "main": "./dist/commonjs/index.js",
  43. "types": "./dist/commonjs/index.d.ts",
  44. "files": [
  45. "dist"
  46. ],
  47. "scripts": {
  48. "build": "tshy",
  49. "build:docs": "typedoc --hideGenerator src/index.ts",
  50. "format": "npm run format:es && npm run format:prettier",
  51. "format:es": "npm run lint:es -- --fix",
  52. "format:prettier": "npm run prettier -- --write",
  53. "lint": "npm run lint:es && npm run lint:prettier",
  54. "lint:es": "eslint --ignore-path .gitignore .",
  55. "lint:prettier": "npm run prettier -- --check",
  56. "make-cjs": "sed -i '' 's/\"type\": \"module\"/\"type\": \"commonjs\"/g' package.json",
  57. "make-esm": "sed -i '' 's/\"type\": \"commonjs\"/\"type\": \"module\"/g' package.json",
  58. "prepublishOnly": "npm run build",
  59. "prettier": "prettier '**/*.{ts,md,json,yml}'",
  60. "test": "npm run test:jest && npm run lint",
  61. "test:jest": "jest"
  62. },
  63. "prettier": {
  64. "proseWrap": "always",
  65. "tabWidth": 4
  66. },
  67. "jest": {
  68. "coverageProvider": "v8",
  69. "moduleNameMapper": {
  70. "^(.*)\\.js$": [
  71. "$1",
  72. "$1.js"
  73. ]
  74. },
  75. "preset": "ts-jest",
  76. "testEnvironment": "node"
  77. },
  78. "dependencies": {
  79. "iconv-lite": "^0.6.3",
  80. "whatwg-encoding": "^3.1.1"
  81. },
  82. "devDependencies": {
  83. "@types/jest": "^29.5.12",
  84. "@types/node": "^20.14.2",
  85. "@types/whatwg-encoding": "^2.0.3",
  86. "@typescript-eslint/eslint-plugin": "^7.13.0",
  87. "@typescript-eslint/parser": "^7.13.0",
  88. "eslint": "^8.57.0",
  89. "eslint-config-prettier": "^9.1.0",
  90. "eslint-plugin-n": "^17.9.0",
  91. "eslint-plugin-unicorn": "^54.0.0",
  92. "jest": "^29.7.0",
  93. "prettier": "^3.3.2",
  94. "ts-jest": "^29.1.4",
  95. "tshy": "^1.15.1",
  96. "typedoc": "^0.25.13",
  97. "typescript": "^5.4.5"
  98. },
  99. "tshy": {
  100. "exports": {
  101. ".": "./src/index.ts",
  102. "./sniffer": "./src/sniffer.ts"
  103. },
  104. "exclude": [
  105. "src/**/*.spec.ts"
  106. ]
  107. }
  108. }