• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "name": "parse5-build-scripts",
3    "private": true,
4    "type": "module",
5    "workspaces": [
6        "packages/*",
7        "bench",
8        "test"
9    ],
10    "devDependencies": {
11        "@eslint/js": "^9.13.0",
12        "@types/jest": "^29.5.14",
13        "eslint": "^9.13.0",
14        "eslint-config-prettier": "^9.1.0",
15        "eslint-plugin-unicorn": "^55.0.0",
16        "globals": "^15.11.0",
17        "husky": "^9.1.6",
18        "jest": "^29.7.0",
19        "lint-staged": "^15.2.10",
20        "outdent": "^0.8.0",
21        "prettier": "^3.3.3",
22        "ts-jest": "^29.2.5",
23        "ts-node": "^10.9.2",
24        "typedoc": "^0.26.10",
25        "typescript": "^5.6.3",
26        "typescript-eslint": "^8.11.0"
27    },
28    "scripts": {
29        "build": "npm run build:esm && npm run build:cjs --workspaces --if-present",
30        "build:esm": "tsc --build packages/* test",
31        "build:docs": "typedoc",
32        "prettier": "prettier '**/*.{js,ts,md,json,yml}' --log-level warn",
33        "format": "npm run format:es && npm run format:prettier",
34        "format:es": "npm run lint:es -- --fix",
35        "format:prettier": "npm run prettier -- --write",
36        "lint": "npm run lint:es && npm run lint:prettier",
37        "lint:es": "eslint .",
38        "lint:prettier": "npm run prettier -- --check",
39        "unit-tests": "NODE_OPTIONS=--experimental-vm-modules jest",
40        "test": "npm run lint && npm run unit-tests",
41        "generate-feedback-tests": "node --loader ts-node/esm scripts/generate-parser-feedback-test/index.ts test/data/html5lib-tests/tree-construction/*.dat",
42        "bench-perf": "npm run build && node bench/perf/index.js",
43        "bench-memory-sax": "npm run build && node bench/memory/sax-parser.js",
44        "preversion": "npm test",
45        "pre-commit": "lint-staged",
46        "publish": "npm publish --workspaces",
47        "prepare": "husky install",
48        "prepublish": "npm run build"
49    },
50    "lint-staged": {
51        "*.{js,ts}": [
52            "prettier --write",
53            "eslint --fix"
54        ],
55        "*.{md,json,yml}": [
56            "prettier --write"
57        ]
58    },
59    "jest": {
60        "preset": "ts-jest/presets/default-esm",
61        "testEnvironment": "node",
62        "coverageProvider": "v8",
63        "moduleNameMapper": {
64            "^(parse5[^/]*)/dist/(.*?)(?:\\.js)?$": "<rootDir>/packages/$1/lib/$2",
65            "^(parse5[^/]*)$": "<rootDir>/packages/$1/lib/index.ts",
66            "^(.*)\\.js$": [
67                "$1",
68                "$1.js"
69            ]
70        },
71        "coveragePathIgnorePatterns": [
72            "node_modules",
73            "bench",
74            "test"
75        ]
76    }
77}
78