Package Exports
- @releaseqa/core
Readme
@releaseqa/core
Core shared library for ReleaseQA test reporters. This package provides the HTTP client, types, and utilities used by all framework-specific reporters.
Installation
npm install @releaseqa/coreNote: Most users should install a framework-specific reporter (e.g.,
@releaseqa/jest) which includes this package as a dependency.
Features
- HTTP client with automatic retry and batching
- CI environment auto-detection (GitHub Actions, GitLab CI, Jenkins, CircleCI, etc.)
- Shared TypeScript types
- Silent failure mode (never breaks CI pipelines)
Usage
import { ReleaseQAClient, detectCIEnvironment } from '@releaseqa/core'
const client = new ReleaseQAClient({
apiKey: process.env.RELEASEQA_API_KEY!,
})
// Auto-detect CI environment
const ciEnv = detectCIEnvironment()
// Create a test run
const { runId } = await client.createRun({
project: 'my-app',
...ciEnv,
})
// Submit test results
await client.submitResults(runId, [
{
testSuite: 'auth.spec.ts',
testCase: 'should login successfully',
status: 'passed',
duration: 1500,
},
])
// Complete the run
await client.completeRun(runId)Configuration
| Option | Type | Default | Description |
|---|---|---|---|
apiKey |
string |
required | Your ReleaseQA API key |
baseUrl |
string |
https://releaseqa.com/api/v1 |
API base URL |
timeout |
number |
30000 |
Request timeout in ms |
retries |
number |
3 |
Number of retry attempts |
batchSize |
number |
50 |
Results per batch |
Supported CI Environments
The detectCIEnvironment() function automatically detects:
- GitHub Actions
- GitLab CI
- Jenkins
- CircleCI
- Travis CI
- Azure Pipelines
- Bitbucket Pipelines
- AWS CodeBuild
- TeamCity
License
MIT