Registry / devops / feathers-socket-commons

feathers-socket-commons

JSON →
library2.4.0jsnpmunverified

Internal package providing shared WebSocket provider logic for Feathers.js, version 2.4.0. It is used by feathers-socketio and feathers-primus, handling common functionality like channel authentication and event dispatching. Released as an MIT-licensed dependency; maintained infrequently as part of the Feathers ecosystem. No active development expected; users should migrate to Feathers v5 (Dove) which integrates WebSocket support directly.

npm install feathers-socket-commons
INSTALL
IMPORT
SIG · FEATHERS-SOCKET-CO
F
feathers-socket-commons
devopsjavascriptv2.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default (library singleton)
const commons = require('feathers-socket-commons');
import commons from 'feathers-socket-commons';
Package does not provide ES module exports; use CommonJS require().
providers
const { providers } = require('feathers-socket-commons');
const providers = require('feathers-socket-commons').providers;
Direct property access works but destructuring is idiomatic.
channels
const { channels } = require('feathers-socket-commons');
channels is a core export used for managing real-time connections.

Demonstrates using providers.connection and channels to manage real-time connections in Feathers.js.

const { providers, channels } = require('feathers-socket-commons'); // Example: Create a provider mock const socket = { id: 1, feathers: {} }; const connection = providers.connection(socket); // Setup channel const channel = channels('myChannel'); channel.join(connection); console.assert(channel.connections.length === 1); // Cleanup channel.leave(connection);
Debug
Known issues
deprecatedThis package is largely internal and may be replaced in Feathers v5.
fix
Use Feathers v5's built-in socket support instead of this package directly.
affects: >=2.0
breakingBreaking changes in v2.0: Removed support for Node < 4.
fix
Upgrade Node to version 4 or higher.
affects: >=2.0
gotchaDo not import directly; always use via feathers-socketio or feathers-primus.
fix
Install feathers-socketio or feathers-primus as your dependency.
affects: >=1.0
gotchaCommonJS only — no ES module support.
fix
Use require() instead of import statements.
affects: >=1.0
Errors
Common errors & fixes
Cannot find module 'feathers-socket-commons'
Package not installed or used incorrectly as a direct dependency.
fix
Install one of feathers-socketio or feathers-primus, which include feathers-socket-commons as a dependency.
TypeError: commons is not a function
Default export does not expose a function; use named exports like providers or channels.
fix
Use destructured require: const { providers } = require('feathers-socket-commons');
Upgrade
Version history
2.4.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
feathers-socket-commons — npm install feathers-socket-commons · libregistry