diff --git a/.github/workflows/docs-pr-netlify.yaml b/.github/workflows/docs-pr-netlify.yaml index 297986ac9..4e1b09c5b 100644 --- a/.github/workflows/docs-pr-netlify.yaml +++ b/.github/workflows/docs-pr-netlify.yaml @@ -14,7 +14,7 @@ jobs: # There's a 'download artifact' action, but it hasn't been updated for the workflow_run action # (https://github.com/actions/download-artifact/issues/60) so instead we get this mess: - name: 📥 Download artifact - uses: dawidd6/action-download-artifact@b12b127cf24433d14b4f93cee62f5465076ba82a # v2.24.1 + uses: dawidd6/action-download-artifact@e6e25ac3a2b93187502a8be1ef9e9603afc34925 # v2.24.2 with: workflow: static_analysis.yml run_id: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 0054561f4..5f6127278 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -66,9 +66,44 @@ jobs: run: "yarn run gendoc" - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs path: _docs # We'll only use this in a workflow_run, then we're done with it retention-days: 1 + + tsc-strict: + name: Typescript Strict Error Checker + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + pull-requests: read + checks: write + steps: + - uses: actions/checkout@v3 + + - name: Get diff lines + id: diff + uses: Equip-Collaboration/diff-line-numbers@v1.0.0 + with: + include: '["\\.tsx?$"]' + + - name: Detecting files changed + id: files + uses: futuratrepadeira/changed-files@v4.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + pattern: '^.*\.tsx?$' + + - uses: t3chguy/typescript-check-action@main + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + use-check: false + check-fail-mode: added + output-behaviour: annotate + ts-extra-args: '--noImplicitAny' + files-changed: ${{ steps.files.outputs.files_updated }} + files-added: ${{ steps.files.outputs.files_created }} + files-deleted: ${{ steps.files.outputs.files_deleted }} + line-numbers: ${{ steps.diff.outputs.lineNumbers }} diff --git a/package.json b/package.json index 46a062cc8..fbc6c6fa5 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@types/content-type": "^1.1.5", "@types/domexception": "^4.0.0", "@types/jest": "^29.0.0", - "@types/node": "16", + "@types/node": "18", "@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/parser": "^5.6.0", "allchange": "^1.0.6", @@ -93,14 +93,14 @@ "babelify": "^10.0.0", "better-docs": "^2.4.0-beta.9", "browserify": "^17.0.0", - "docdash": "^1.2.0", + "docdash": "^2.0.0", "domexception": "^4.0.0", - "eslint": "8.26.0", + "eslint": "8.28.0", "eslint-config-google": "^0.14.0", "eslint-import-resolver-typescript": "^3.5.1", "eslint-plugin-import": "^2.26.0", "eslint-plugin-matrix-org": "^0.8.0", - "eslint-plugin-unicorn": "^44.0.2", + "eslint-plugin-unicorn": "^45.0.0", "exorcist": "^2.0.0", "fake-indexeddb": "^4.0.0", "jest": "^29.0.0", diff --git a/spec/test-utils/webrtc.ts b/spec/test-utils/webrtc.ts index 661107011..efee15d12 100644 --- a/spec/test-utils/webrtc.ts +++ b/spec/test-utils/webrtc.ts @@ -360,7 +360,7 @@ export class MockMediaDevices { Promise.resolve(new MockMediaStream("local_stream").typed()), ); - public getDisplayMedia = jest.fn, [DisplayMediaStreamConstraints]>().mockReturnValue( + public getDisplayMedia = jest.fn, [MediaStreamConstraints]>().mockReturnValue( Promise.resolve(new MockMediaStream("local_display_stream").typed()), ); diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index 0e4a664fb..00a9b37d7 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -1079,7 +1079,7 @@ export class MatrixCall extends TypedEventEmitter