Update npm non-major dependencies (#5197) #13649
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Static Analysis | |
| on: | |
| pull_request: {} | |
| merge_group: | |
| types: [checks_requested] | |
| push: | |
| branches: [develop, master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} # No permissions needed | |
| jobs: | |
| ts_lint: | |
| name: "Typescript Syntax Check" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: package.json | |
| - name: Install Deps | |
| run: "pnpm install" | |
| - name: Typecheck | |
| run: "pnpm run lint:types" | |
| js_lint: | |
| name: "ESLint" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: package.json | |
| - name: Install Deps | |
| run: "pnpm install" | |
| - name: Run Linter | |
| run: "pnpm run lint:js" | |
| node_example_lint: | |
| name: "Node.js example" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: package.json | |
| - name: Install Deps | |
| run: "pnpm install" | |
| - name: Build Types | |
| run: "pnpm build:types" | |
| - name: Install Example Deps | |
| run: "npm install" | |
| working-directory: "examples/node" | |
| - name: Check Syntax | |
| run: "node --check app.js" | |
| working-directory: "examples/node" | |
| - name: Typecheck | |
| run: "npx tsc" | |
| working-directory: "examples/node" | |
| workflow_lint: | |
| name: "Workflow Lint" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: package.json | |
| - name: Install Deps | |
| run: "pnpm install --frozen-lockfile" | |
| - name: Run Linter | |
| run: "pnpm lint:workflows" | |
| docs: | |
| name: "JSDoc Checker" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: package.json | |
| - name: Install Deps | |
| run: "pnpm install" | |
| - name: Generate Docs | |
| run: "pnpm run gendoc --treatWarningsAsErrors --suppressCommentWarningsInDeclarationFiles" | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: docs | |
| path: _docs | |
| # We'll only use this in a workflow_run, then we're done with it | |
| retention-days: 1 | |
| analyse_dead_code: | |
| name: "Analyse Dead Code" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version-file: package.json | |
| - name: Install Deps | |
| run: "pnpm install --frozen-lockfile" | |
| - name: Run linter | |
| run: "pnpm run lint:knip" | |
| element-web: | |
| name: Downstream tsc element-web | |
| if: github.event_name == 'merge_group' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| repository: element-hq/element-web | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | |
| with: | |
| cache: "pnpm" | |
| node-version: "lts/*" | |
| - name: Install Dependencies | |
| run: "./scripts/layered.sh" | |
| env: | |
| # tell layered.sh to check out the right sha of the JS-SDK | |
| JS_SDK_GITHUB_BASE_REF: ${{ github.sha }} | |
| - name: Typecheck | |
| run: "pnpm run lint:types" | |
| # Hook for branch protection to skip downstream typechecking outside of merge queues | |
| downstream: | |
| name: Downstream Typescript Syntax Check | |
| runs-on: ubuntu-24.04 | |
| if: always() | |
| needs: | |
| - element-web | |
| steps: | |
| - if: needs.element-web.result != 'skipped' && needs.element-web.result != 'success' | |
| run: exit 1 |