Skip to content

Upgrading to v2

Fresh

Installation

bash
npm i @elgato/streamdeck@latest

Breaking Changes

1. UI Namespace Simplification

Sending messages:

typescript
// Before (v1)
streamDeck.ui.current?.sendToPropertyInspector(data);

// After (v2)
streamDeck.ui.sendToPropertyInspector(data);

Accessing actions:

typescript
// Before (v1)
const action = streamDeck.ui.current;

// After (v2)
const action = streamDeck.ui.action;

2. Dependencies Decoupled

Some imports moved from @elgato/streamdeck to @elgato/utils:

ImportOld PackageNew Package
JsonObject, JsonPrimitive, JsonValue@elgato/streamdeck@elgato/utils
Enumerable, EventEmitter, EventsOf@elgato/streamdeck@elgato/utils

LogLevel change:

typescript
// Before (v1)
LogLevel.TRACE

// After (v2)
"trace" // string literal

3. Manifest Access Removed

The manifest is now a protected resource (DRM). Direct runtime access via streamDeck.manifest no longer exists.

4. Browser Import Eliminated

Importing @elgato/streamdeck into Property Inspector HTML is no longer supported.

Migration Checklist

  • [ ] Update package: npm i @elgato/streamdeck@latest
  • [ ] Replace streamDeck.ui.current?. with streamDeck.ui.
  • [ ] Replace streamDeck.ui.current with streamDeck.ui.action
  • [ ] Move JSON types to @elgato/utils
  • [ ] Replace LogLevel.X with string literals
  • [ ] Remove any streamDeck.manifest usage
  • [ ] Remove @elgato/streamdeck imports from PI HTML