Matter.js 0.17.x

This file summarizes the matter.js 0.17.x deltas compared with matter.js 0.16.11.

It focuses only on the changes that matter for Matterbridge.

Deprecated and modified cluster types

You can just have the single types:

type WiredAttrs = PowerSource.WiredAttributes;
type BaseWiredAttrs = PowerSource.BaseAttributes & PowerSource.WiredAttributes;

The important distinction is:

PowerSource.Attributes: the flattened full superset, not feature-specific.

PowerSource.BaseAttributes: the always present attributes.

PowerSource.WiredAttributes: only the Wired feature attributes.

PowerSource.BaseAttributes & PowerSource.WiredAttributes: what a wired power source exposes.

Removed without deprecation notice

Old name (matter.js ≤ 0.16) New name (matter.js 0.17)
AreaNamespaceTag CommonAreaNamespaceTag
ClosureTag CommonClosureTag
CompassDirectionTag CommonCompassDirectionTag
CompassLocationTag CommonCompassLocationTag
DirectionTag CommonDirectionTag
LandmarkNamespaceTag CommonLandmarkNamespaceTag
LevelTag CommonLevelTag
LocationTag CommonLocationTag
NumberTag CommonNumberTag
PositionTag CommonPositionTag
RelativePositionTag CommonRelativePositionTag

Custom clusters

The way to create custom cluster in matter.js has changed.

In matter.js there are no more typescript source files for cluster types: they are generated. The memory usage has dropped by around 20%-50% that is great.

I will leave (without exporting them) the three Matter 1.5.1 cluster I created for testing like example of custom clusters.

Implementation plan

I plan to release matter.js 0.17.0 in Matterbridge 3.8.0.

At that point, all plugins should require Matterbridge 3.8.0 and make the refactor eventually required.