chore(deps)(deps-dev): bump typescript from 5.9.3 to 6.0.2 in /clients/javascript #11
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: JavaScript SDK CI/CD | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'clients/javascript/**' | |
| - '.github/workflows/javascript-sdk-ci.yml' | |
| tags: | |
| - 'javascript-sdk-v*' | |
| pull_request: | |
| paths: | |
| - 'clients/javascript/**' | |
| - '.github/workflows/javascript-sdk-ci.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint JavaScript SDK | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: clients/javascript | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: clients/javascript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Check formatting | |
| run: npm run format:check | |
| - name: Type check | |
| run: npm run typecheck | |
| test: | |
| name: Test JavaScript SDK | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node-version: ['18', '20', '22'] | |
| defaults: | |
| run: | |
| working-directory: clients/javascript | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: clients/javascript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Generate coverage | |
| if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20' | |
| run: npm run test:coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: clients/javascript/coverage/lcov.info | |
| flags: javascript-sdk | |
| name: javascript-sdk-coverage | |
| build: | |
| name: Build JavaScript SDK | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: clients/javascript | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: clients/javascript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: javascript-sdk-dist | |
| path: clients/javascript/dist/ | |
| publish: | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/javascript-sdk-v') | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: clients/javascript | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| cache-dependency-path: clients/javascript/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build package | |
| run: npm run build | |
| - name: Publish to npm | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npm publish --access public |