diff --git a/.circleci/config.yml b/.circleci/config.yml index 784758beed8be8..50598a93d9f0c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -236,11 +236,25 @@ jobs: - run: name: '`pnpm docs:typescript:formatted` changes committed?' command: git add -A && git diff --exit-code --staged + - restore_cache: + keys: + - typescript-cache-v5-{{ checksum "pnpm-lock.yaml" }} + - typescript-cache-v5- + - run: + name: Extract TypeScript build cache + command: tar -xzvf .tsbuildinfo-archive.tgz || true - run: name: Tests TypeScript definitions command: pnpm typescript:ci environment: NODE_OPTIONS: --max-old-space-size=3072 + - run: + name: Archive TypeScript build cache + command: find . \( -name node_modules -o -path '*/.*' \) -prune -o -name "*.tsbuildinfo" -print | tar -czvf .tsbuildinfo-archive.tgz -T - + - save_cache: + key: typescript-cache-v5-{{ checksum "pnpm-lock.yaml" }} + paths: + - .tsbuildinfo-archive.tgz - run: name: Test module augmentation command: pnpm typescript:module-augmentation diff --git a/.gitignore b/.gitignore index c8ee6531db54a9..ef7f709f3aa129 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ docs/public/static/blog/feed/* .nx/workspace-data screenshots packed +.tsbuildinfo-archive.tgz # typescript *.tsbuildinfo diff --git a/package.json b/package.json index 36762bfabf9f55..0f8a7d436796a5 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "extract-error-codes": "code-infra extract-error-codes --errorCodesPath docs/public/static/error-codes.json --skip @mui/core-downloads-tracker @mui/envinfo @mui/docs @mui/codemod @mui/icons-material", "template:screenshot": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/generateTemplateScreenshots", "eslint": "eslint . --cache --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0", - "eslint:ci": "eslint . --cache --cache-strategy content --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0", + "eslint:ci": "pnpm eslint --cache-strategy content", "stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"docs/**/*.?(c|m)[jt]s?(x)\" \"docs/**/*.css\" --ignore-path .lintignore", "markdownlint": "markdownlint-cli2 \"**/*.md\"", "valelint": "pnpm vale sync && git ls-files | grep -h \".md$\" | xargs pnpm vale --filter='.Level==\"error\"'", @@ -72,7 +72,7 @@ "test:unit": "nx run nx_test_unit", "test:argos": "code-infra argos-push --folder test/regressions/screenshots/chrome", "typescript": "lerna run --no-bail typescript", - "typescript:ci": "lerna run --concurrency 2 --no-bail typescript", + "typescript:ci": "lerna run --concurrency 2 --no-bail typescript -- --incremental", "typescript:module-augmentation": "lerna run --concurrency 2 --no-bail typescript:module-augmentation", "use-react-version": "node ./scripts/useReactVersion.mjs", "validate-declarations": "tsx scripts/validateTypescriptDeclarations.mts",