Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b87f6e5
Initial commit
brandur Nov 8, 2023
473b198
License should've been LGPL, not GPL
brandur Nov 8, 2023
c62a662
Add insert-only River TypeScript package (#1)
brandur Jun 1, 2026
7436ecb
Deduplicate by unique key from inside batch (#2)
brandur Jun 1, 2026
e65e810
Prepare release 0.1.0 (#13)
brandur Jun 1, 2026
59d60c8
Bump the npm-dependencies group across 3 directories with 5 updates (…
dependabot[bot] Jul 6, 2026
33c30c6
Group Dependabot updates by dependency type (#24)
bgentry Aug 1, 2026
81f5200
fix Dependabot pnpm workspace updates (#27)
bgentry Aug 1, 2026
9e74cdb
Bump five development dependencies (#28)
dependabot[bot] Aug 1, 2026
bc8e6f4
require Vite security fixes (#30)
bgentry Aug 1, 2026
7354a17
Migrate Prisma example to v7 (#31)
bgentry Aug 1, 2026
6d350a0
bump Prisma to 7.9.1 (#32)
bgentry Aug 1, 2026
0d48a1d
import riverqueue-js history into js/
bgentry Oct 5, 2026
5db3fa3
wire the JavaScript workspace into River
bgentry Oct 5, 2026
1fcb482
build for Node 26 with TypeScript 6
bgentry Oct 4, 2026
ea9b8ce
add River's error hierarchy and name validation
bgentry Oct 4, 2026
9144c22
add a pino-style logger interface and runtime metrics
bgentry Oct 4, 2026
e68079d
add River's JSON value model
bgentry Oct 4, 2026
db0fe76
add Temporal durations and unreferenced runtime timers
bgentry Oct 4, 2026
e6d0eb0
add completion batching and background task supervision
bgentry Oct 4, 2026
bee1d28
rebuild the client as a complete River runtime
bgentry Oct 4, 2026
98b347a
test job definitions, codecs, unique keys, and events
bgentry Oct 4, 2026
ff753f2
test query normalization, list cursors, and maintenance batching
bgentry Oct 4, 2026
1172ae3
test the worker runtime against a fake driver
bgentry Oct 4, 2026
49aa5e1
test leadership, maintenance services, and periodic jobs
bgentry Oct 4, 2026
f948c35
test the pilot seam's operations and producer sessions
bgentry Oct 4, 2026
ad1ee32
add cron schedules that fire like River Go's
bgentry Oct 4, 2026
703717b
add @riverqueue/migrate with River's canonical migrations
bgentry Oct 4, 2026
38156a2
test the PostgreSQL driver against a real database
bgentry Oct 4, 2026
f890da4
test the Prisma driver with mocked and real clients
bgentry Oct 4, 2026
a390cf4
add a SQLite driver on node:sqlite
bgentry Oct 4, 2026
abf9318
test SQLite against Go's riversqlite and the pilot seam
bgentry Oct 4, 2026
5e4bb75
add @riverqueue/worker-threads for CPU-bound handlers
bgentry Oct 4, 2026
f19861e
add @riverqueue/test helpers for producers and workers
bgentry Oct 4, 2026
a73e22a
add the riverqueue command line in @riverqueue/cli
bgentry Oct 4, 2026
b953b53
add a riverqueue 0.1 upgrade codemod
bgentry Oct 4, 2026
8652dc6
add runnable worker examples
bgentry Oct 4, 2026
1605157
document the runtime, drivers, and packages
bgentry Oct 4, 2026
1bde98e
check packed packages before publishing
bgentry Oct 4, 2026
547ee65
keep API reports for every published entry point
bgentry Oct 4, 2026
752f029
catch unused exports and check the next TypeScript
bgentry Oct 4, 2026
57648a4
run every JavaScript gate in CI
bgentry Oct 4, 2026
5eef0ef
Align JavaScript CI path filtering with Rust
brandur Oct 5, 2026
53423e8
Fix for intermittent failing tests
brandur Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/actions/setup-js/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Set up JavaScript workspace
description: >-
Install pnpm and an official Node.js 26 build, prove that it has native
Temporal, and install the locked dependencies of the workspace in `js/`.

inputs:
node-version:
default: ""
description: >-
Node.js version to use instead of the one in `js/.node-version`.

runs:
using: composite
steps:
- uses: pnpm/action-setup@v6
with:
package_json_file: js/package.json

- uses: actions/setup-node@v6
with:
cache: pnpm
cache-dependency-path: js/pnpm-lock.yaml
node-version: ${{ inputs.node-version }}
node-version-file: ${{ inputs.node-version == '' && 'js/.node-version' || '' }}

# Official Node.js 26 binaries enable Temporal; some builds from source do
# not, and River refuses to run without it.
- name: Require native Temporal
shell: bash
run: |
node --version
test "$(node -p 'typeof Temporal')" = object

- run: pnpm install --frozen-lockfile
shell: bash
working-directory: js
33 changes: 32 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ updates:
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
# The JavaScript workflows' composite actions live under .github/actions.
directories:
- "/"
- "/.github/actions/*"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
Expand All @@ -30,3 +33,31 @@ updates:
- "patch"
schedule:
interval: "weekly"
# Routine minor and patch updates to the JavaScript workspace arrive as one
# grouped pull request per dependency type; major updates stay separate so
# each can be reviewed on its own. Exact pins in package.json (Prisma, the
# TypeScript-next preview, pnpm overrides) stay exact because `increase`
# rewrites the pinned version rather than widening it.
- package-ecosystem: "npm"
directory: "/js"
cooldown:
default-days: 7
groups:
development-dependencies:
dependency-type: "development"
patterns:
- "*"
update-types:
- "minor"
- "patch"
production-dependencies:
dependency-type: "production"
patterns:
- "*"
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 10
schedule:
interval: "monthly"
versioning-strategy: increase
231 changes: 231 additions & 0 deletions .github/workflows/js.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
name: JavaScript

on:
# Filter the whole workflow so unrelated changes don't create skipped
# matrix jobs. Keep both events' paths in sync. Release tags always run it.
push:
branches:
- master
paths:
- ".github/actions/setup-js/**"
- ".github/workflows/js.yaml"
- "Makefile"
- "js/**"
- "riverdriver/**/*.sql"
tags: ["v*"]
pull_request:
paths:
- ".github/actions/setup-js/**"
- ".github/workflows/js.yaml"
- "Makefile"
- "js/**"
- "riverdriver/**/*.sql"

concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: read

# The full runtime deliberately requires native Temporal from Node 26. Every
# job installs the official build selected by js/.node-version (or the matrix)
# and asserts `typeof Temporal` before doing anything else.

defaults:
run:
working-directory: js

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: ./.github/actions/setup-js

- run: pnpm run build:all

- run: pnpm run typecheck:tests

- run: pnpm run typecheck:next

# Compares the generated mirror with River's canonical migration sources.
- run: pnpm run verify:migrations

- run: pnpm run api:check

- run: pnpm run docs:api

- run: pnpm run docs:snippets

- run: pnpm run migration:legacy

lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: ./.github/actions/setup-js

# Type-aware lint reads `riverqueue` through its built declarations.
- run: pnpm run build

- run: pnpm run lint

- run: pnpm run fmt:check

- run: pnpm run license:check

- run: pnpm audit

packages:
name: Package archives
runs-on: ubuntu-latest
timeout-minutes: 20

# The packed `node:test` suite runs its PostgreSQL tests against this
# database, and RIVER_REQUIRE_POSTGRES makes them fail instead of skip
# when DATABASE_URL is missing.
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: river_test
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_test?sslmode=disable
RIVER_REQUIRE_POSTGRES: "1"

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: ./.github/actions/setup-js

- run: pnpm run build:all

# The packed examples that need a database use its default schema.
- run: node cli/dist/bin.js migrate-up --database-url "$DATABASE_URL"

- run: pnpm run package:check

examples:
name: Examples
runs-on: ubuntu-latest
timeout-minutes: 20

services:
postgres:
image: postgres:18
env:
POSTGRES_DB: river_test
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_test?sslmode=disable

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: ./.github/actions/setup-js

- run: pnpm run build:all

- run: node cli/dist/bin.js migrate-up --database-url "$DATABASE_URL"

- run: pnpm run package:examples

test:
name: Test (Node ${{ matrix.node-version || 'from .node-version' }})
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
# The minimum supported release and the current Node 26 release.
node-version: ["26.0.0", ""]

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: ./.github/actions/setup-js
with:
node-version: ${{ matrix.node-version }}

# The unit tests import the other workspace packages through their
# build output, and worker threads run compiled handler modules.
- run: pnpm run build:all

- run: pnpm run test

test_integration:
name: Test (integration, PostgreSQL ${{ matrix.postgres-version }})
runs-on: ubuntu-latest
timeout-minutes: 20

strategy:
fail-fast: false
matrix:
postgres-version: [14, 15, 16, 17, 18]

services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_DB: river_test
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

env:
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_test?sslmode=disable

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: ./.github/actions/setup-js

- run: pnpm run build:all

- run: node cli/dist/bin.js migrate-up --database-url "$TEST_DATABASE_URL"

- run: pnpm run test:integration
Loading
Loading