Registry / testing / matterbridge-test

matterbridge-test

JSON →
library2.0.15jsnpmunverified

The `matterbridge-test` package serves as a development and demonstration plugin within the `Matterbridge` ecosystem, a platform designed to bridge various smart home protocols like Matter and Homebridge for unified IoT device control. As of April 2026, its current stable version is 2.0.15. The package exhibits an active release cadence, with frequent patch updates primarily focused on dependency management, internal tooling improvements, and developer experience enhancements. It is not intended for direct end-user functionality but rather provides a reference implementation or testing ground for plugin development within the Matterbridge framework, ensuring compatibility and illustrating integration patterns. A key differentiator is its role in validating the Matterbridge plugin API and its strong adherence to modern TypeScript practices, as evidenced by its included type definitions and strict Node.js engine requirements, facilitating type-safe development for other Matterbridge plugin authors.

npm install matterbridge-test
INSTALL
IMPORT
SIG · MATTERBRIDGE-TEST
M
matterbridge-test
testingjavascriptv2.0.15
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestPlugin
✓ import { TestPlugin } from 'matterbridge-test';
✗ const TestPlugin = require('matterbridge-test').TestPlugin;
The package ships with TypeScript types and is primarily used with ESM imports.
TestPluginOptions
✓ import { TestPluginOptions } from 'matterbridge-test';
✗ import { type TestPluginOptions } from 'matterbridge-test/dist/plugin';
Imports the TypeScript interface for plugin configuration options.

Demonstrates how to register and initialize the `Matterbridge Test Plugin` within a hypothetical `Matterbridge` instance, including basic configuration, and simulates a graceful shutdown.

import { Matterbridge } from 'matterbridge'; // Assuming 'matterbridge' is the core framework import { TestPlugin, TestPluginOptions } from 'matterbridge-test'; async function main() { // Initialize Matterbridge core (hypothetical instance) // In a real scenario, configuration might be loaded from a file or environment. const matterbridge = new Matterbridge({ logLevel: 'debug' // Example Matterbridge core configuration }); // Define configuration for the TestPlugin. This structure is defined by TestPluginOptions. const pluginConfig: TestPluginOptions = { name: "MyTestPluginInstance", testSetting: "exampleValue", // Placeholder for a setting specific to TestPlugin // Add other settings as required by TestPluginOptions }; // Register the TestPlugin with the Matterbridge instance. // The exact registration API might vary based on the 'matterbridge' framework version. console.log(`Registering TestPlugin with config:`, pluginConfig); matterbridge.registerPlugin(TestPlugin, pluginConfig); // Start the Matterbridge instance, which will initialize and run the registered plugin(s). await matterbridge.start(); console.log("Matterbridge started successfully with Matterbridge Test Plugin."); // For a test or demonstration plugin, you might set up a timeout to gracefully shut down // or perform specific test actions. setTimeout(async () => { console.log("Simulating graceful shutdown after 30 seconds..."); await matterbridge.stop(); console.log("Matterbridge stopped."); process.exit(0); }, 30000); // Stop after 30 seconds for demonstration } main().catch(err => { console.error("An error occurred during Matterbridge operation:", err); process.exit(1); });
Debug
Known issues
breakingThe package has very strict Node.js engine compatibility requirements, specifying narrow ranges for versions 20, 22, and 24. Running with an unsupported Node.js version will prevent the package from loading or functioning correctly.
fix
Ensure your Node.js environment strictly matches one of the specified versions: `>=20.19.0 <21.0.0`, `>=22.13.0 <23.0.0`, or `>=24.0.0 <25.0.0`. Use a version manager like `nvm` or `fnm` to easily switch versions.
affects: >=2.0.0
gotchaWhile the changelog primarily details internal dependency updates and developer environment enhancements, there are no explicit breaking change notices for consumers of the `matterbridge-test` plugin's API in recent versions. Users should monitor for potential indirect breaking changes if Matterbridge's core plugin API evolves rapidly, especially considering the frequent major version bumps in underlying dependencies like `eslint` and `typescript`.
fix
Regularly review the `matterbridge` and `matterbridge-test` changelogs when upgrading to detect any subtle behavioral changes. Test your plugin integrations thoroughly after updates.
affects: >=2.0.0
Errors
Common errors & fixes
Error: The package 'matterbridge-test' requires Node.js version X.X.X. Your current Node.js version is Y.Y.Y.
The installed Node.js version does not satisfy the `engines` requirement specified in `package.json`.
fix
Upgrade or downgrade your Node.js environment to a compatible version (e.g., `>=20.19.0 <21.0.0`) using a Node.js version manager like `nvm` (`nvm install X.X.X && nvm use X.X.X`).
TypeError: matterbridge.registerPlugin is not a function
The `registerPlugin` method or the `matterbridge` instance itself is not correctly initialized or configured according to the `Matterbridge` framework's API.
fix
Refer to the official `Matterbridge` documentation for the correct way to instantiate the `Matterbridge` core and register plugins. Ensure all necessary setup steps are completed before attempting to register your plugin.
ERR_PACKAGE_PATH_NOT_EXPORTED (or similar CommonJS `require()` error)
Attempting to use CommonJS `require()` syntax with `matterbridge-test`, which is likely an ESM-only module, or trying to access an unexported subpath.
fix
Ensure your project is configured for ECMAScript Modules (ESM) by adding `"type": "module"` to your `package.json` and use `import` statements (e.g., `import { TestPlugin } from 'matterbridge-test';`).
Upgrade
Version history
2.0.15latest on npm
Audit
Dependencies
automatorrequiredCore dependency likely for automation tasks or part of the build/release process within the Matterbridge ecosystem.
node-persist-managerrequiredUsed for persistent storage of plugin-specific data or configuration.
node-ansi-loggerrequiredProvides structured and colored console logging capabilities.
Agent activity
2 hits · last 30 days
node
2
Resources
matterbridge-test — npm install matterbridge-test · libregistry