Skip to content

Commit

Permalink
Merge pull request #44 from AssemblyAI/E07417BDFEA3614F5967B1520F8B2F61
Browse files Browse the repository at this point in the history
Sync from internal repo (2024/04/15)
  • Loading branch information
Swimburger committed Apr 15, 2024
2 parents 56a61f8 + 60ee84a commit 651cdb7
Show file tree
Hide file tree
Showing 25 changed files with 553 additions and 428 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/api-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js 20
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 20
- name: Checkout source code
uses: actions/checkout@v4
uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8.10.0
Expand All @@ -38,7 +38,7 @@ jobs:
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js 20
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 20
- name: Checkout source code
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
Expand All @@ -24,7 +24,7 @@ jobs:
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
# - windows-latest
steps:
- name: Setup Node.js ${{ matrix['node-version'] }}
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: ${{ matrix['node-version'] }}
- name: Checkout source code
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
Expand All @@ -35,7 +35,7 @@ jobs:
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand All @@ -48,5 +48,5 @@ jobs:
run: pnpm build
- name: Lint code
run: pnpm lint
- name: Run tests
run: pnpm test
- name: Run unit tests
run: pnpm test:unit
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
.gitignore
.npmignore
coverage
dist
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [4.4.0] - 2024-04-12

### Added

- Add `disablePartialTranscripts` parameter to `CreateRealtimeTranscriberParams`
- Add `enableExtraSessionInformation` parameter to `CreateRealtimeTranscriberParams`
- Add `session_information` event to `RealtimeTranscriber.on()`

### Updated

- ⚠️ Deprecate `conformer-2` literal for `TranscriptParams.speech_model` property

### Fixed

- Add missing `status` property to `AutoHighlightsResult`

## [4.3.4] - 2024-04-02

### Added
Expand Down
14 changes: 14 additions & 0 deletions jest.integration.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type {import('jest').Config} */
const config = {
preset: "ts-jest",
testEnvironment: "node",
collectCoverage: true,
modulePathIgnorePatterns: ["<rootDir>/dist"],
testMatch: ["**/tests/integration/**/*.test.ts"],
clearMocks: true,
maxConcurrency: 1,
};

process.env.TESTDATA_DIR = "tests/static";

module.exports = config;
6 changes: 5 additions & 1 deletion jest.config.js → jest.unit.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
module.exports = {
/** @type {import('jest').Config} */
const config = {
preset: "ts-jest",
testEnvironment: "node",
collectCoverage: true,
modulePathIgnorePatterns: ["<rootDir>/dist"],
testMatch: ["**/tests/unit/**/*.test.ts"],
};

process.env.TESTDATA_DIR = "tests/static";

module.exports = config;
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "assemblyai",
"version": "4.3.4",
"version": "4.4.0",
"description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.",
"engines": {
"node": ">=18"
Expand Down Expand Up @@ -69,9 +69,11 @@
"build": "pnpm clean && pnpm rollup -c",
"clean": "rimraf dist/* && rimraf temp/* && rimraf temp-docs/*",
"lint": "eslint -c .eslintrc.json '{src,tests}/**/*.{js,ts}' && publint && tsc --noEmit -p tsconfig.json",
"test": "jest --config jest.config.js",
"test": "pnpm run test:unit && pnpm run test:integration",
"test:unit": "jest --config jest.unit.config.js",
"test:integration": "jest --config jest.integration.config.js --testTimeout 360000",
"format": "prettier '**/*' --write",
"generate:types": "tsx ./scripts/generate-types.ts && pnpm format",
"generate:types": "tsx ./scripts/generate-types.ts && prettier 'src/types/*.generated.ts' --write",
"generate:reference": "typedoc",
"copybara:dry-run": "./copybara.sh dry_run --init-history",
"copybara:pr": "./copybara.sh sync_out --init-history"
Expand Down
Loading

0 comments on commit 651cdb7

Please sign in to comment.