---
source_url: https://www.pubnub.com/docs/sdks/javascript/migration-guides/javascript-v8-migration-guide
title: JavaScript SDK 8.0.0 migration guide
updated_at: 2026-05-29T11:11:05.609Z
sdk_name: PubNub JavaScript SDK
sdk_version: 11.0.1
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# JavaScript SDK 8.0.0 migration guide

PubNub JavaScript SDK, use the latest version: 11.0.1

Install:

```bash
npm install pubnub@11.0.1
```

The 8.0.0 release of the JavaScript SDK removes the need for the `@types/pubnub` package. The SDK now ships its own types.

We kept the API surface close to 7.x.x. To upgrade to the [JavaScript SDK](https://www.pubnub.com/docs/sdks/javascript) v8.0.0, make a few focused updates in your code.

This guide summarizes the differences and the steps to migrate to JavaScript SDK v8.0.0.

## Differences between 7.x.x and 8.0.0

See the major differences:

| Feature/Method/Field/Package | JavaScript SDK `7.x.x` | JavaScript SDK `8.x.x` |
| --- | --- | --- |
| `@types/pubnub` package dependency | Yes | No, remove the dependency |
| API group names in imports | N/A | Yes |

## @types/pubnub dependency

The `@types/pubnub` dependency is no longer required in v8.0.0. Remove it from your project. The SDK package now provides types without external dependencies.

:::note Affected types
This change only affects code that uses the types directly (for example, in function arguments or variables).
:::

Endpoint-related types moved to their endpoint namespaces. Types are grouped by the API they belong to. You can see API groups in the [documentation](https://www.pubnub.com/docs/sdks/javascript) sidebar. Your IDE should also hint type locations.

#### JavaScript SDK 7.x.x

import PubNub, { GetMembershipsParameters } from 'pubnub'
// other code
const params: GetMembershipsParameters = {};

#### JavaScript SDK 8.x.x

import PubNub, { AppContext } from 'pubnub'
// other code
const params: AppContext.GetMembershipsParameters = {};

Available API endpoint groups:

* `Subscription`
* `AppContext`
* `ChannelGroup`
* `Publish`
* `Signal`
* `Presence`
* `History`
* `MessageAction`
* `FileSharing`
* `PAM`
* `Time`
* `Push`

To migrate from v7.x.x to v8.0.0:

1. Remove the `@pubnub/types` dependency.
2. Update import statements for PubNub types to use the endpoint groups the types belong to.

## Migration steps

To migrate from JavaScript SDK `7.x.x` to `8.0.0`, upgrade the SDK in your project, review the differences above, and update your code.