Files
sdk/.github/workflows/javascript.yml
T
Mo Elzubeir 252ea713b1 feat: add entity analytics, pluggable cache, and pitfalls docs
- Add Cache interface with MemoryCache and NoopCache implementations
- Make SocialhoseClient accept injectable cache option
- Remove Next.js next.revalidate coupling from transport
- Add entity analytics: getEntityBrief, getEntityStats, getEntityBriefs,
  getCampaignIdByMatch with exact sentiment/platform faceting and
  cumulative-differenced timeline
- Add 23 new tests (29 total) covering entity analytics, cache injection,
  sentiment reconciliation, bounded concurrency, and timeline differencing
- Update README with entity analytics, custom caching, and pitfalls sections
- Fix CI branch: main -> master
2026-05-29 13:10:05 -05:00

62 lines
1.6 KiB
YAML

name: JavaScript SDK
on:
pull_request:
paths:
- 'sdks/javascript/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.github/workflows/javascript.yml'
push:
branches: [master]
paths:
- 'sdks/javascript/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.github/workflows/javascript.yml'
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/setup-node@v4
with:
node-version: '22.13.0'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @socialhose/api test
- run: pnpm --filter @socialhose/api typecheck
- run: pnpm --filter @socialhose/api build
- run: npm pack --pack-destination /tmp
working-directory: sdks/javascript
publish-js:
if: github.event_name == 'release'
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/setup-node@v4
with:
node-version: '22.13.0'
registry-url: https://registry.npmjs.org
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @socialhose/api publish --access public --provenance --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}