Skip to main content

Migrating from v6 to v7

The new version 7 of the SDK is mostly backwards compatible with v6.

There are some small breaking changes.

1. TypeScript Types import path change

All TypeScript types are now imported directly from the @neurosity/sdk path.

There's not longer a need to reference them from the @neurosity/neurosity/dist/esm/{typeName} path.

Before:

import { DeviceStatus } from "@neurosity/sdk/dist/esm/types/status";

After:

import { DeviceStatus } from "@neurosity/sdk";

Consolidated bundles

In v6 and prior, the SDK exported a custom bundle for Electron. In v7, the default import "@neurosity/sdk" will now use the same bundle as the browser and Node.js imports.

Before:

import { Neurosity } from "@neurosity/sdk/dist/electron";

After:

import { Neurosity } from "@neurosity/sdk";