Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 2.8.1 #3

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 43 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ commands:
steps:
- get-code
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ arch }}-{{ checksum "package.json" }}
- run:
name: Installing dependencies
command: node -v && npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
key: dependency-cache-{{ arch }}-{{ checksum "package.json" }}
paths:
- ./node_modules
build:
Expand All @@ -83,7 +83,7 @@ commands:
- build
- run:
name: Running build checks
command: npm run test:es5 && npm run test:typecheck && npm run lint && npm run test:unit
command: npm run test:es5 && npm run test:esm && npm run test:typecheck && npm run lint && npm run test:unit
- store_artifacts:
path: coverage
destination: coverage
Expand All @@ -92,7 +92,7 @@ commands:
- build
- run:
name: Running integration tests
command: npm run test:integration
command: chmod +x ./scripts/run-integration-tests.sh && ./scripts/run-integration-tests.sh
network-tests:
steps:
- get-code
Expand Down Expand Up @@ -126,13 +126,20 @@ jobs:
type: string
browser:
type: string
build_label:
type: string
integration_test_files:
type: string
default: ""
executor:
name: docker-with-browser
browser: <<parameters.browser>>
bver: <<parameters.bver>>
environment:
BROWSER: <<parameters.browser>>
BVER: <<parameters.bver>>
BUILD_LABEL: <<parameters.build_label>>
INTEGRATION_TEST_FILES: <<parameters.integration_test_files>>
steps: [integration-tests]
run-release:
parameters:
Expand Down Expand Up @@ -168,6 +175,26 @@ jobs:
# Workflows
###
workflows:
healthcheck-workflow:
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- master
jobs:
- run-integration-tests:
name: Integration tests <<matrix.browser>> <<matrix.bver>>
context:
- dockerhub-pulls
- vblocks-js
matrix:
parameters:
browser: ["chrome"]
bver: ["stable"]
build_label: ["Healthcheck"]
integration_test_files: ["tests/integration/device.ts"]
daily-build-workflow:
triggers:
- schedule:
Expand All @@ -182,14 +209,15 @@ workflows:
- vblocks-js
name: Build Checks
- run-integration-tests:
name: Integration Tests <<matrix.browser>> <<matrix.bver>>
name: Integration tests <<matrix.browser>> <<matrix.bver>>
context:
- dockerhub-pulls
- vblocks-js
matrix:
parameters:
browser: ["chrome", "firefox"]
bver: ["beta", "unstable", "stable"]
build_label: ["Daily build"]
pull-request-workflow:
when:
and:
Expand All @@ -201,14 +229,15 @@ workflows:
- vblocks-js
name: Build Checks
- run-integration-tests:
name: Integration Tests <<matrix.browser>> <<matrix.bver>>
name: Integration tests <<matrix.browser>> <<matrix.bver>>
context:
- dockerhub-pulls
- vblocks-js
matrix:
parameters:
browser: ["chrome", "firefox"]
bver: ["beta", "unstable", "stable"]
build_label: ["Integration tests"]
# NOTE(csantos): Will be addressed on a future epic
# - run-network-tests:
# name: Network Tests <<matrix.browser>> <<matrix.bver>>
Expand All @@ -230,11 +259,12 @@ workflows:
context:
- dockerhub-pulls
- vblocks-js
name: Integration Tests <<matrix.browser>> <<matrix.bver>>
name: Integration tests <<matrix.browser>> <<matrix.bver>>
matrix:
parameters:
browser: ["chrome", "firefox"]
bver: ["beta", "unstable", "stable"]
build_label: ["Release build"]
# NOTE(csantos): Will be addressed on a future epic
# - run-network-tests:
# context:
Expand All @@ -255,13 +285,13 @@ workflows:
- Build Checks
# NOTE(mhuynh): Temporarily allow release without these tests passing
# # Chrome integration tests
# - Integration Tests chrome beta
# - Integration Tests chrome unstable
# - Integration Tests chrome stable
# - Integration tests chrome beta
# - Integration tests chrome unstable
# - Integration tests chrome stable
# # Firefox integration tests
# - Integration Tests firefox beta
# - Integration Tests firefox unstable
# - Integration Tests firefox stable
# - Integration tests firefox beta
# - Integration tests firefox unstable
# - Integration tests firefox stable
# # Chrome network tests
# - Network Tests chrome stable
# # Firefox network tests
Expand Down
6 changes: 3 additions & 3 deletions .release.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"node ./node_modules/.bin/release --bump ${CURRENT_VERSION} ${RELEASE_VERSION}",
"git config user.name \"${GIT_USER_NAME}\"",
"git config user.email \"${GIT_USER_EMAIL}\"",
"git rm -rf --ignore-unmatch dist es5 docs lib/twilio/constants.ts",
"git rm -rf --ignore-unmatch dist es5 esm docs lib/twilio/constants.ts",
"npm run build:release",
"git add package.json",
"git add -f dist es5 docs lib/twilio/constants.ts",
"git add -f dist es5 esm docs lib/twilio/constants.ts",
"git commit -nm \"${RELEASE_VERSION}\"",
"git tag ${RELEASE_VERSION}",
"git remote set-url origin \"https://${GH_TOKEN}@${GH_REF}\"",
Expand All @@ -40,7 +40,7 @@
"development": {
"commands": [
"node ./node_modules/.bin/release --bump ${RELEASE_VERSION} ${DEVELOPMENT_VERSION}",
"git rm -rf dist es5 docs lib/twilio/constants.ts",
"git rm -rf dist es5 esm docs lib/twilio/constants.ts",
"npm run clean",
"npm run docs:clean",
"git add package.json",
Expand Down
124 changes: 122 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,121 @@
2.6.1 (In Progress)
===================
:warning: **Important**: If you are upgrading to version 2.3.0 or later and have firewall rules or network configuration that blocks any unknown traffic by default, you need to update your configuration to allow connections to the new DNS names and IP addresses. Please refer to this [changelog](#230-january-23-2023) for more details.

2.8.0 (October 16, 2023)
=======================

New Features
------------

- Added a new feature flag `enableImprovedSignalingErrorPrecision` to enhance the precision of errors emitted by `Device` and `Call` objects.

```ts
const token = ...;
const device = new Device(token, {
enableImprovedSignalingErrorPrecision: true,
});
```

The default value of this option is `false`.

When this flag is enabled, some errors that would have been described with a generic error code are now described with a more precise error code. With this feature, the following errors now have their own error codes. Please see this [page](https://www.twilio.com/docs/api/errors) for more details about each error.

- Device Error Changes

```ts
const device = new Device(token, {
enableImprovedSignalingErrorPrecision: true,
});
device.on('error', (deviceError) => {
// the following table describes how deviceError will change with this feature flag
});
```

| Device Error Name | Device Error Code with Feature Flag Enabled | Device Error Code with Feature Flag Disabled |
| --- | --- | --- |
| `GeneralErrors.ApplicationNotFoundError` | `31001` | `53000` |
| `GeneralErrors.ConnectionDeclinedError` | `31002` | `53000` |
| `GeneralErrors.ConnectionTimeoutError` | `31003` | `53000` |
| `MalformedRequestErrors.MissingParameterArrayError` | `31101` | `53000` |
| `MalformedRequestErrors.AuthorizationTokenMissingError` | `31102` | `53000` |
| `MalformedRequestErrors.MaxParameterLengthExceededError` | `31103` | `53000` |
| `MalformedRequestErrors.InvalidBridgeTokenError` | `31104` | `53000` |
| `MalformedRequestErrors.InvalidClientNameError` | `31105` | `53000` |
| `MalformedRequestErrors.ReconnectParameterInvalidError` | `31107` | `53000` |
| `SignatureValidationErrors.AccessTokenSignatureValidationFailed` | `31202` | `53000` |
| `AuthorizationErrors.NoValidAccountError` | `31203` | `53000` |
| `AuthorizationErrors.JWTTokenExpirationTooLongError` | `31207` | `53000` |
| `ClientErrors.NotFound` | `31404` | `53000` |
| `ClientErrors.TemporarilyUnavilable` | `31480` | `53000` |
| `ClientErrors.BusyHere` | `31486` | `53000` |
| `SIPServerErrors.Decline` | `31603` | `53000` |

- Call Error Changes

```ts
const device = new Device(token, {
enableImprovedSignalingErrorPrecision: true,
});
const call = device.connect(...);
call.on('error', (callError) => {
// the following table describes how callError will change with this feature flag
});
```

| Call Error Name | Call Error Code with Feature Flag Enabled | Call Error Code with Feature Flag Disabled |
| --- | --- | --- |
| `GeneralErrors.ConnectionDeclinedError` | `31002` | `31005` |
| `AuthorizationErrors.InvalidJWTTokenError` | `31204` | `31005` |
| `AuthorizationErrors.JWTTokenExpiredError` | `31205` | `31005` |

_**IMPORTANT:** If your application logic currently relies on listening to the generic error code `53000` or `31005`, and you opt into enabling the feature flag, then your applicaton logic needs to be updated to anticipate the new error code when any of the above errors happen._

2.7.3 (October 6, 2023)
======================

Bug Fixes
---------

- Fixed an [issue](https://github.com/twilio/twilio-voice.js/issues/163) where, sometimes a TypeError is raised while handling an incoming call under the following circumstances:
- Network interruptions
- updating the token before accepting the call

2.7.2 (September 21, 2023)
=========================

Changes
-------

- Fixed an [issue](https://github.com/twilio/twilio-voice.js/issues/197) where audio in the Chrome browser is choppy when another application is also using the audio devices.
- Added missing documentation for the following events:
- `call.on('ringing', handler)`
- `call.on('warning', handler)`
- `call.on('warning-cleared', handler)`
- `device.on('destroyed', handler)`

2.7.1 (August 3, 2023)
======================

Bug Fixes
---------

- Fixed an issue where `call.sendMessage()` API throws an error if the SDK is imported as an [ECMAScript Module (ESM)](https://nodejs.org/api/esm.html) using the `@twilio/voice-sdk/esm` path.

2.7.0 (August 1, 2023)
======================

ECMAScript Module Support
-------------------------

Currently, the SDK is imported as a [CommonJS Module (CJS)](https://nodejs.org/api/modules.html) using the root path `@twilio/voice-sdk`. With this release, the SDK contains an **experimental feature** that allows it to be imported as an [ECMAScript Module (ESM)](https://nodejs.org/api/esm.html) using the `@twilio/voice-sdk/esm` path. As this is an experimental feature, some frameworks using bundlers like `Vite` and `Rollup` may not work. Full support for ESM will be available in a future release and will become the default import behavior of the SDK.

Example:

```ts
import { Device } from '@twilio/voice-sdk/esm';
```

2.6.1 (July 7, 2023)
====================

Changes
-------
Expand Down Expand Up @@ -166,7 +282,11 @@ Bug Fixes
- Use DOMException instead of DOMError, which has been deprecated
- Removed npm util from the package, instead favoring native functions

<<<<<<< HEAD
2.1.0 (December 16, 2021)
=======
2.1.0 (January 6, 2022)
>>>>>>> 55a956dc49644ec896d53a522e926513daf985c7
=========================

New Features
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ Twilio's Voice SDK allows you to add real-time voice and PSTN calling to your we
* [Quickstart](https://www.twilio.com/docs/voice/client/javascript/quickstart)
* [Changelog](https://github.com/twilio/twilio-voice.js/blob/master/CHANGELOG.md)

### Technical Support
If you need technical support, contact
[[email protected]](mailto:[email protected]).
### Issues and Support
Please check out our [common issues](COMMON_ISSUES.md) page or file any issues you find here on Github. For general inquiries related to the Voice SDK you can file a support ticket. Please ensure that you are not sharing any [Personally Identifiable Information(PII)](https://www.twilio.com/docs/glossary/what-is-personally-identifiable-information-pii) or sensitive account information (API keys, credentials, etc.) when reporting an issue.

Installation
------------
Expand Down
Loading