Files
Martin Adámek 3c2dd5cc37 chore: use typescript 7 for the packages, keep 6 for the docs build (#4058)
Bumps typescript to `^7.0.2` (native compiler) for building and
type-aware linting, together with `oxlint-tsgolint@^7.0.2001`, which
version-tracks TS 7.

The docs build stays on TS 6: typedoc needs the TypeScript JS API, which
the native compiler no longer exposes. The website keeps its own
`typescript: ^6.0.0` pin and pnpm nests that copy under
`node_modules/typedoc`, so typedoc resolves 6.x while the packages
compile with TS 7.

TS 7 also caught one real issue in the tests: `RequestList#initialize()`
is private, and the call in `request_list.test.ts` now needs the same
`@ts-expect-error` the surrounding test already uses for the private
constructor.

The api-extractor runner script also imports `typescript` for its report
parsing; that import now goes through a `typescript-v6` alias
(`npm:typescript@^6.0.0`), since the parsing needs the classic JS API
(api-extractor itself bundles its own TypeScript and is unaffected). The
regenerated reports in `docs/public-api/` pick up TS 7's single-quoted
string literal types in three packages, 4 lines total.

Same change as apify/apify-sdk-js#695. Build, docs build, type-aware
lint, test typecheck and the unit suite all pass.
2026-08-21 09:07:53 +02:00

157 lines
6.4 KiB
JSON

{
"name": "@crawlee/root",
"private": true,
"type": "module",
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
"keywords": [
"apify",
"headless",
"chrome",
"puppeteer",
"crawler",
"scraper"
],
"author": {
"name": "Apify",
"email": "support@apify.com",
"url": "https://apify.com"
},
"contributors": [
"Jan Curn <jan@apify.com>",
"Marek Trunkat <marek@apify.com>",
"Ondra Urban <ondra@apify.com>"
],
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/apify/crawlee"
},
"bugs": {
"url": "https://github.com/apify/crawlee/issues"
},
"homepage": "https://crawlee.dev",
"scripts": {
"prepublishOnly": "turbo run copy --filter=./packages/*",
"clean": "turbo run clean --filter=./packages/* && rimraf .turbo packages/*/.turbo packages/*/*.tsbuildinfo",
"build": "turbo run build --filter=./packages/* && node ./scripts/typescript_fixes.mjs",
"ci:build": "turbo run build --filter=./packages/* --cache-dir=\".turbo\" && node ./scripts/typescript_fixes.mjs",
"test": "vitest run --silent",
"test:e2e": "node test/e2e/run.mjs",
"test:integration": "cross-env CRAWLEE_DIFFICULT_TESTS=1 vitest run --silent=true test/integration",
"test:integration:services:up": "docker network create crawlee-it 2>/dev/null; docker run -d --rm --name crawlee-it-browserless --network crawlee-it -p 3000:3000 -e CONCURRENT=4 ghcr.io/browserless/chromium && docker run -d --rm --name crawlee-it-httpbin --network crawlee-it --network-alias httpbin -p 8080:80 kennethreitz/httpbin",
"test:integration:services:down": "docker stop crawlee-it-browserless crawlee-it-httpbin; docker network rm crawlee-it 2>/dev/null; true",
"test:full": "cross-env CRAWLEE_DIFFICULT_TESTS=1 vitest run --silent",
"tsc-check-tests": "tsc --noEmit --project test/tsconfig.json",
"coverage": "vitest --coverage",
"publish:next": "lerna publish from-package --contents dist --dist-tag v4 --force-publish --yes",
"release:next": "pnpm build && pnpm publish:next",
"publish:rc": "lerna publish from-package --contents dist --dist-tag rc --force-publish --yes",
"publish:prod": "lerna publish from-package --contents dist --force-publish --yes",
"release:prod": "pnpm build && pnpm publish:prod",
"release:pin-versions": "turbo run copy -- -- --pin-versions",
"api:extract": "pnpm build && tsx scripts/api-extractor/run.ts",
"api:check": "tsx scripts/api-extractor/run.ts --verify",
"lint": "oxlint packages test docs --tsconfig=tsconfig.json --type-aware",
"lint:fix": "oxlint packages test docs --tsconfig=tsconfig.json --type-aware --fix",
"format": "oxfmt packages test docs --write",
"format:check": "oxfmt packages test docs --check",
"prepare": "husky"
},
"devDependencies": {
"@apify/log": "^2.5.18",
"@apify/oxlint-config": "^0.2.5",
"@apify/tsconfig": "^0.2.0",
"@commitlint/config-conventional": "^21.0.0",
"@crawlee/basic": "workspace:*",
"@crawlee/cheerio": "workspace:*",
"@crawlee/core": "workspace:*",
"@crawlee/http-client": "workspace:*",
"@crawlee/impit-client": "workspace:*",
"@crawlee/jsdom": "workspace:*",
"@crawlee/linkedom": "workspace:*",
"@crawlee/playwright": "workspace:*",
"@crawlee/puppeteer": "workspace:*",
"@crawlee/stagehand": "workspace:*",
"@crawlee/types": "workspace:*",
"@crawlee/utils": "workspace:*",
"@microsoft/api-extractor": "^7.58.9",
"@oxlint/plugins": "^1.62.0",
"@playwright/browser-chromium": "1.61.1",
"@playwright/browser-firefox": "1.61.1",
"@playwright/browser-webkit": "1.61.1",
"@types/content-type": "^1.1.8",
"@types/deep-equal": "^1.0.4",
"@types/domhandler": "^3.1.0",
"@types/express": "^5.0.1",
"@types/fs-extra": "^11.0.4",
"@types/inquirer": "^9.0.8",
"@types/is-ci": "^3.0.4",
"@types/lodash.isequal": "^4.5.8",
"@types/lodash.merge": "^4.6.9",
"@types/mime-types": "^2.1.4",
"@types/node": "^24.0.0",
"@types/proper-lockfile": "^4.1.4",
"@types/ps-tree": "^1.1.6",
"@types/rimraf": "^4.0.5",
"@types/sax": "^1.2.7",
"@types/semver": "^7.7.0",
"@types/stream-json": "^1.7.8",
"@types/whatwg-mimetype": "^3.0.2",
"@types/yargs": "^17.0.33",
"@vitest/coverage-v8": "^4.0.16",
"apify": "*",
"apify-node-curl-impersonate": "^1.0.23",
"basic-auth-parser": "^0.0.2",
"body-parser": "^2.3.0",
"camoufox-js": "^0.11.0",
"commitlint": "^21.0.0",
"crawlee": "workspace:*",
"cross-env": "^10.0.0",
"deep-equal": "^2.2.3",
"express": "^5.1.0",
"fs-extra": "^11.3.0",
"gen-esm-wrapper": "^1.1.3",
"globby": "^15.0.0",
"got": "^14.4.7",
"husky": "^9.1.7",
"iconv-lite": "^0.7.2",
"is-ci": "^4.1.0",
"lerna": "^9.0.0",
"lint-staged": "^17.0.0",
"nock": "^14.0.10",
"oxfmt": "^0.46.0",
"oxlint": "^1.62.0",
"oxlint-tsgolint": "^7.0.2001",
"playwright": "1.61.1",
"portastic": "^1.0.1",
"proxy": "^2.2.0",
"puppeteer": "25.8.0",
"rimraf": "^6.0.1",
"tsx": "^4.19.4",
"turbo": "^2.10.11",
"typescript": "^7.0.2",
"typescript-v6": "npm:typescript@^6.0.0",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^4.1.0-beta.6",
"zod": "catalog:"
},
"lint-staged": {
"{packages,test,docs}/**/*.{js,ts,mjs,mts,cjs,cts}": [
"oxlint --fix --no-error-on-unmatched-pattern",
"oxfmt --write --no-error-on-unmatched-pattern"
]
},
"packageManager": "pnpm@11.22.0",
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "11.22.0",
"onFail": "error"
}
},
"volta": {
"node": "24.18.0",
"pnpm": "11.22.0"
}
}