1{ 2 "name": "parse5-build-scripts", 3 "private": true, 4 "type": "module", 5 "workspaces": [ 6 "packages/*", 7 "bench", 8 "test" 9 ], 10 "devDependencies": { 11 "@types/jest": "^27.4.1", 12 "@typescript-eslint/eslint-plugin": "^5.20.0", 13 "@typescript-eslint/parser": "^5.20.0", 14 "eslint": "^8.13.0", 15 "eslint-config-prettier": "^8.5.0", 16 "eslint-plugin-unicorn": "^42.0.0", 17 "husky": "^7.0.4", 18 "jest": "^27.5.1", 19 "lint-staged": "^12.3.8", 20 "outdent": "^0.8.0", 21 "prettier": "^2.6.2", 22 "ts-jest": "^27.1.4", 23 "ts-node": "^10.7.0", 24 "typedoc": "^0.22.15", 25 "typescript": "^4.6.3" 26 }, 27 "scripts": { 28 "build": "npm run build:esm && npm run build:cjs --workspaces --if-present", 29 "build:esm": "tsc --build packages/* test", 30 "build:docs": "node --max-old-space-size=8192 node_modules/.bin/typedoc .", 31 "prettier": "prettier '**/*.{js,ts,md,json,yml}' --loglevel warn", 32 "format": "npm run format:es && npm run format:prettier", 33 "format:es": "npm run lint:es -- --fix", 34 "format:prettier": "npm run prettier -- --write", 35 "lint": "npm run lint:es && npm run lint:prettier", 36 "lint:es": "eslint .", 37 "lint:prettier": "npm run prettier -- --check", 38 "unit-tests": "NODE_OPTIONS=--experimental-vm-modules jest", 39 "test": "npm run lint && npm run unit-tests", 40 "generate-feedback-tests": "node --loader ts-node/esm scripts/generate-parser-feedback-test/index.ts test/data/html5lib-tests/tree-construction/*.dat", 41 "bench-perf": "npm run build && node bench/perf/index.js", 42 "bench-memory-sax": "npm run build && node bench/memory/sax-parser.js", 43 "preversion": "npm test", 44 "pre-commit": "lint-staged", 45 "publish": "npm publish --workspaces", 46 "prepare": "husky install", 47 "prepublish": "npm run build" 48 }, 49 "lint-staged": { 50 "*.{js,ts}": [ 51 "prettier --write", 52 "eslint --fix" 53 ], 54 "*.{md,json,yml}": [ 55 "prettier --write" 56 ] 57 }, 58 "jest": { 59 "preset": "ts-jest/presets/default-esm", 60 "testEnvironment": "node", 61 "coverageProvider": "v8", 62 "globals": { 63 "ts-jest": { 64 "useESM": true 65 } 66 }, 67 "moduleNameMapper": { 68 "^(parse5[^/]*)/dist/(.*?)(?:\\.js)?$": "<rootDir>/packages/$1/lib/$2", 69 "^(parse5[^/]*)$": "<rootDir>/packages/$1/lib/index.ts", 70 "^(.*)\\.js$": "$1" 71 } 72 } 73} 74