diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index bfe29d543e43f8..c10a1c9dc4e47f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,147 +23,7 @@ env: jobs: main: - if: ${{ github.repository_owner == 'microsoft' }} - runs-on: macos-14-xlarge - permissions: - contents: 'read' - actions: 'read' - - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 - with: - main-branch-name: 'master' - - - uses: actions/setup-node@v6 - with: - cache: 'yarn' - node-version: '22' - - - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" - - - run: yarn install --frozen-lockfile - - - name: Workspace lint - run: | - yarn nx run workspace-plugin:check-graph - yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify - yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify - - - name: Type-check just.config.ts files - run: | - # following packages need to be build in advance: - # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, - # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance - # - # NOTE: we are running this via nx in order to get cache hits later on - yarn nx run-many -t build -p api-docs digest - yarn tsc -p ./tsconfig.just-scripts-configs.json - - - name: 'check packages: installed dependencies versions' - run: | - yarn check:installed-dependencies-versions - - - name: check formatting - run: | - yarn nx format:check --base origin/master - - - name: build, test, lint, test-ssr (affected) - run: | - FLUENT_JEST_WORKER=2 yarn nx affected -t build test lint type-check test-ssr test-integration verify-packaging --nxBail - - - name: 'Check for unstaged changes' - run: | - git status --porcelain - git diff-index --quiet HEAD -- || exit 1 - - react-compiler-analyzer: - if: ${{ github.repository_owner == 'microsoft' }} - runs-on: macos-14-xlarge - permissions: - contents: 'read' - actions: 'read' - - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 - with: - main-branch-name: 'master' - - - uses: actions/setup-node@v6 - with: - cache: 'yarn' - node-version: '22' - - - run: yarn install --frozen-lockfile - - - name: React Compiler analysis (affected) - run: | - yarn nx affected -t react-compiler-analyzer--lint --nxBail - - react-major-versions-integration: - if: ${{ github.repository_owner == 'microsoft' }} - runs-on: macos-14-xlarge - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 - with: - main-branch-name: 'master' - - - uses: actions/setup-node@v6 - with: - cache: 'yarn' - node-version: '22' - - - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" - - - run: | - yarn install --frozen-lockfile - yarn rit --react 17 --install-deps - yarn rit --react 18 --install-deps - - - name: Verify Cypress installs from RIT temp workspaces (React 17 -> v13, React 18 -> v14) - run: | - "$GITHUB_WORKSPACE"/tmp/rit/react-17/node_modules/.bin/cypress verify - "$GITHUB_WORKSPACE"/tmp/rit/react-18/node_modules/.bin/cypress verify - - - name: React Versions Integration Tests (17,18) - E2E - id: e2e - run: | - yarn nx affected -t test-rit--17--e2e,test-rit--18--e2e --exclude='react-19-tests-v9,react-charting,react' - - - name: Upload Cypress screenshots if exist - uses: actions/upload-artifact@v6 - if: always() && steps.e2e.outcome == 'failure' - with: - name: cypress-screenshots-react-test-rit - path: | - tmp/rit/**/cypress/screenshots/**/*.png - retention-days: 1 - - - name: React Versions Integration Tests (17,18) - Type-check & Test - env: - NODE_OPTIONS: --max-old-space-size=4096 - run: | - FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--type-check,test-rit--18--type-check,test-rit--17--test,test-rit--18--test --exclude='react-19-tests-v9' - - e2e: - if: ${{ github.repository_owner == 'microsoft' }} - # TODO: switch to macos once problematic tests are fixed - # https://github.com/microsoft/fluentui/issues/33173 - # https://github.com/microsoft/fluentui/issues/33172 + # if: ${{ github.repository_owner == 'microsoft' }} runs-on: ubuntu-latest permissions: contents: 'read' @@ -188,21 +48,262 @@ jobs: - run: yarn install --frozen-lockfile - - name: Install Playwright dependencies - run: yarn playwright install --with-deps - - - name: Verify Cypress install - run: yarn cypress verify - - - name: Cypress/Playwright E2E tests - run: yarn nx affected -t e2e --nxBail --parallel 1 - - - name: Upload Cypress screenshots if exist - uses: actions/upload-artifact@v6 - if: failure() - with: - name: cypress-screenshots - path: | - apps/*/cypress/screenshots/**/*.png - packages/**/cypress/screenshots/**/*.png - retention-days: 1 + # - name: Workspace lint + # run: | + # yarn nx run workspace-plugin:check-graph + # yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify + # yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify + + # - name: Type-check just.config.ts files + # run: | + # # following packages need to be build in advance: + # # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, + # # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance + # # + # # NOTE: we are running this via nx in order to get cache hits later on + # yarn nx run-many -t build -p api-docs digest + # yarn tsc -p ./tsconfig.just-scripts-configs.json + # + # - name: 'check packages: installed dependencies versions' + # run: | + # yarn check:installed-dependencies-versions + # + # - name: check formatting + # run: | + # yarn nx format:check --base origin/master + + - name: build and lint + run: | + yarn nx run eslint-plugin-react-components:build + FLUENT_JEST_WORKER=2 yarn nx run-many -t build lint --exclude react-19-tests-v9 --nxBail + + # - name: 'Check for unstaged changes' + # run: | + # git status --porcelain + # git diff-index --quiet HEAD -- || exit 1 + # + # react_integration_tests_collocated: + # if: ${{ github.repository_owner == 'microsoft' }} + # runs-on: macos-14-xlarge + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # + # - name: Derive appropriate SHAs for base and head for `nx affected` commands + # uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 + # with: + # main-branch-name: 'master' + # + # - uses: actions/setup-node@v4 + # with: + # cache: 'yarn' + # node-version: '20' + # + # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # + # - run: | + # yarn install --frozen-lockfile + # yarn rit --react 17 --install-deps + # yarn rit --react 19 --install-deps + # + # - name: Verify Cypress installs from RIT temp workspaces (React 17 -> v13, React 19 -> v14) + # run: | + # "$GITHUB_WORKSPACE"/tmp/rit/react-17/node_modules/.bin/cypress verify + # "$GITHUB_WORKSPACE"/tmp/rit/react-19/node_modules/.bin/cypress verify + # + # - name: React Versions Integration Tests (17,19) - E2E + # id: e2e + # run: | + # yarn nx affected -t test-rit--17--e2e,test-rit--19--e2e + # + # - name: Upload Cypress screenshots if exist + # uses: actions/upload-artifact@v4 + # if: always() && steps.e2e.outcome == 'failure' + # with: + # name: cypress-screenshots-react-test-rit + # path: | + # tmp/rit/**/cypress/screenshots/**/*.png + # retention-days: 1 + # + # - name: React Versions Integration Tests (17,19) - Test,Type-check + # run: | + # FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--test,test-rit--17--type-check,test-rit--19--test,test-rit--19--type-check + # + # react_integration_tests: + # if: ${{ github.repository_owner == 'microsoft' }} + # runs-on: ubuntu-latest + # strategy: + # matrix: + # react: [17, 18, 19] + # fluentui: [8, 9] + # exclude: + # - react: 17 + # fluentui: 8 + # - react: 19 + # fluentui: 8 + # fail-fast: false + # permissions: + # contents: 'read' + # actions: 'read' + # name: React ${{ matrix.react }} / v${{ matrix.fluentui }} Integration + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # + # - name: Derive appropriate SHAs for base and head for `nx affected` commands + # uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 + # with: + # main-branch-name: 'master' + # + # - uses: actions/setup-node@v4 + # with: + # cache: 'yarn' + # node-version: '20' + # + # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # + # - run: yarn install --frozen-lockfile + # + # - name: Verify Cypress install + # run: yarn cypress verify + # + # - name: Affected e2e:integration Projects + # id: affected_projects_e2e_count + # run: | + # affected_count=$(yarn --silent nx show projects -t e2e:integration --affected --verbose false | wc -l | tr -d ' ') + # echo "value=$affected_count" >> $GITHUB_OUTPUT + # + # - name: Affected type-check:integration Projects + # id: affected_projects_type_check_count + # run: | + # affected_count=$(yarn --silent nx show projects -t type-check:integration --affected --verbose false | wc -l | tr -d ' ') + # echo "value=$affected_count" >> $GITHUB_OUTPUT + # + # - name: Affected test:integration Projects + # id: affected_projects_test_count + # run: | + # affected_count=$(yarn --silent nx show projects -t test:integration --affected --verbose false | wc -l | tr -d ' ') + # echo "value=$affected_count" >> $GITHUB_OUTPUT + # + # - name: type-check (affected) + # id: type-check + # if: steps.affected_projects_type_check_count.outputs.value > 0 + # run: yarn nx run-many -p react-${{ matrix.react }}-tests-v${{ matrix.fluentui }} -t type-check:integration --nxBail + # continue-on-error: true + # + # - name: Prepare TSC logs + # if: always() && steps.type-check.outcome == 'failure' + # run: | + # mkdir -p tsc-logs + # yarn tsc -p apps/react-${{ matrix.react }}-tests-v${{ matrix.fluentui }}/tsconfig.react-${{ matrix.react }}.json --listFilesOnly > tsc-logs/tsc-debug-files-map.md + # + # - name: Upload TSC logs + # if: always() && steps.type-check.outcome == 'failure' + # uses: actions/upload-artifact@v4 + # with: + # name: typescript-react-${{ matrix.react }}-v${{ matrix.fluentui }} + # path: tsc-logs + # retention-days: 1 + # + # # run targets only on affected changes - need to run this outside nx runner context to avoid https://github.com/nrwl/nx/issues/30562 + # - name: test (affected) + # id: test + # if: steps.affected_projects_test_count.outputs.value > 0 + # run: | + # yarn nx run-many -p react-${{ matrix.react }}-tests-v${{ matrix.fluentui }} -t build:integration --nxBail + # yarn workspace @fluentui/react-${{ matrix.react }}-tests-v${{ matrix.fluentui }} test:integration + # continue-on-error: true + # + # # run targets only on affected changes - need to run this outside nx runner context to avoid https://github.com/nrwl/nx/issues/30562 + # - name: e2e (affected) + # id: e2e + # if: steps.affected_projects_e2e_count.outputs.value > 0 + # run: | + # yarn workspace @fluentui/react-${{ matrix.react }}-tests-v${{ matrix.fluentui }} e2e:integration + # echo $? + # continue-on-error: true + # + # - name: Upload Cypress screenshots if exist + # uses: actions/upload-artifact@v4 + # if: always() && steps.e2e.outcome == 'failure' + # with: + # name: cypress-screenshots-react-${{ matrix.react }}-v${{ matrix.fluentui }} + # path: | + # apps/*/cypress/screenshots/**/*.png + # packages/**/cypress/screenshots/**/*.png + # retention-days: 1 + # + # - name: Integration tests summary + # if: always() + # run: | + # echo "### React ${{ matrix.react }} / v${{ matrix.fluentui }} Integration Tests Results" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # echo "- Type-check: ${{ steps.type-check.outcome }}" >> $GITHUB_STEP_SUMMARY + # echo "- E2E: ${{ steps.e2e.outcome }}" >> $GITHUB_STEP_SUMMARY + # echo "- Test: ${{ steps.test.outcome }}" >> $GITHUB_STEP_SUMMARY + # + # # Treat skipped steps as successful since they indicate no affected projects + # type_check_success=$([[ "${{ steps.type-check.outcome }}" == "success" || "${{ steps.type-check.outcome }}" == "skipped" ]] && echo "true" || echo "false") + # e2e_success=$([[ "${{ steps.e2e.outcome }}" == "success" || "${{ steps.e2e.outcome }}" == "skipped" ]] && echo "true" || echo "false") + # test_success=$([[ "${{ steps.test.outcome }}" == "success" || "${{ steps.test.outcome }}" == "skipped" ]] && echo "true" || echo "false") + # + # if [[ "$type_check_success" == "true" && "$e2e_success" == "true" && "$test_success" == "true" ]]; then + # echo "✅ React ${{ matrix.react }} / v${{ matrix.fluentui }} integration tests passed" + # exit 0 + # else + # echo "❌ React ${{ matrix.react }} / v${{ matrix.fluentui }} integration tests failed" + # echo "Type-check: ${{ steps.type-check.outcome }}" + # echo "E2E: ${{ steps.e2e.outcome }}" + # echo "Test: ${{ steps.test.outcome }}" + # exit 1 + # fi + # + # e2e: + # if: ${{ github.repository_owner == 'microsoft' }} + # # TODO: switch to macos once problematic tests are fixed + # # https://github.com/microsoft/fluentui/issues/33173 + # # https://github.com/microsoft/fluentui/issues/33172 + # runs-on: ubuntu-latest + # permissions: + # contents: 'read' + # actions: 'read' + # + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # + # - name: Derive appropriate SHAs for base and head for `nx affected` commands + # uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 + # with: + # main-branch-name: 'master' + # + # - uses: actions/setup-node@v4 + # with: + # cache: 'yarn' + # node-version: '20' + # + # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # + # - run: yarn install --frozen-lockfile + # + # - name: Install Playwright dependencies + # run: yarn playwright install --with-deps + # + # - name: Verify Cypress install + # run: yarn cypress verify + # + # - name: Cypress/Playwright E2E tests + # run: yarn nx affected -t e2e --exclude react-19-tests-v9 --nxBail --parallel 1 + # + # - name: Upload Cypress screenshots if exist + # uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: cypress-screenshots + # path: | + # apps/*/cypress/screenshots/**/*.png + # packages/**/cypress/screenshots/**/*.png + # retention-days: 1 diff --git a/patches/@typescript-eslint+eslint-plugin+8.46.2.patch b/patches/@typescript-eslint+eslint-plugin+8.46.2.patch deleted file mode 100644 index ec68047848978e..00000000000000 --- a/patches/@typescript-eslint+eslint-plugin+8.46.2.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js -index 84d6ced..4512f06 100644 ---- a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js -+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-deprecated.js -@@ -90,19 +90,26 @@ exports.default = (0, util_1.createRule)({ - ? getJsDocDeprecation(symbol) - : undefined; - } -+ const seen = new Set(); - const targetSymbol = checker.getAliasedSymbol(symbol); -- while (tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)) { -- const reason = getJsDocDeprecation(symbol); -+ let current = symbol; -+ while (tsutils.isSymbolFlagSet(current, ts.SymbolFlags.Alias)) { -+ if (seen.has(current)) { -+ break; -+ } -+ seen.add(current); -+ const reason = getJsDocDeprecation(current); - if (reason != null) { - return reason; - } -- const immediateAliasedSymbol = symbol.getDeclarations() && checker.getImmediateAliasedSymbol(symbol); -- if (!immediateAliasedSymbol) { -+ const nextAlias = current.getDeclarations() && -+ checker.getImmediateAliasedSymbol(current); -+ if (!nextAlias) { - break; - } -- symbol = immediateAliasedSymbol; -- if (checkDeprecationsOfAliasedSymbol && symbol === targetSymbol) { -- return getJsDocDeprecation(symbol); -+ current = nextAlias; -+ if (checkDeprecationsOfAliasedSymbol && current === targetSymbol) { -+ return getJsDocDeprecation(current); - } - } - return undefined;