Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Add an error when trying to use earlier versions with Feathers v3 #93

Merged
merged 2 commits into from
Oct 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# feathers-socketio

> _Important:_ For Feathers v3.0.0 or later use `@feathersjs/socketio` module instead of `feathers-socketio`.

[![Greenkeeper badge](https://badges.greenkeeper.io/feathersjs/feathers-socketio.svg)](https://greenkeeper.io/)

[![Build Status](https://travis-ci.org/feathersjs/feathers-socketio.png?branch=master)](https://travis-ci.org/feathersjs/feathers-socketio)
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export default function (port, options, config) {
return function () {
const app = this;

if (app.version && app.version >= '3.0.0') {
throw new Error(`feathers-socketio is not compatible with Feathers v${app.version}. Use the latest version of @feathersjs/socketio instead.`);
}

app.configure(socket('io'));

Proto.mixin({
Expand Down