Skip to content

Commit

Permalink
Update to Feathers Buzzard (v3) (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Dec 1, 2017
1 parent 75d6ae7 commit f3b0d71
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 122 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const errors = require('feathers-errors');
const errors = require('@feathersjs/errors');
const makeDebug = require('debug');

const {
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const errors = require('feathers-errors');
const errors = require('@feathersjs/errors');

function getType (value) {
let type = (Array.isArray(value) && 'array') ||
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const feathersFilter = require('feathers-query-filters');
const feathersFilter = require('@feathersjs/commons').filterQuery;

const { removeProps } = require('./core');
const { parseQuery } = require('./parse-query');
Expand Down
161 changes: 62 additions & 99 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,18 @@
"lib": "lib"
},
"dependencies": {
"debug": "^3.0.0",
"feathers-errors": "^2.5.0",
"feathers-query-filters": "^2.1.2",
"@feathersjs/commons": "^1.3.0",
"@feathersjs/errors": "^3.2.0",
"debug": "^3.1.0",
"uberproto": "^1.2.0"
},
"devDependencies": {
"body-parser": "^1.15.2",
"@feathersjs/express": "^1.1.2",
"@feathersjs/feathers": "^3.0.1",
"@feathersjs/socketio": "^3.0.1",
"chai": "^4.0.0",
"elasticsearch": "^14.0.0",
"feathers": "^2.0.3",
"feathers-rest": "^1.6.0",
"feathers-service-tests": "^0.10.0",
"feathers-socketio": "^2.0.0",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^4.0.0",
"semistandard": "^11.0.0"
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const { expect } = require('chai');
const { base, example } = require('feathers-service-tests');

const feathers = require('feathers');
const errors = require('feathers-errors');
const feathers = require('@feathersjs/feathers');
const errors = require('@feathersjs/errors');
const elasticsearch = require('elasticsearch');
const service = require('../lib');
const server = require('./test-app');
Expand Down
16 changes: 8 additions & 8 deletions test/test-app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-unused-expressions */
const elasticsearch = require('elasticsearch');
const feathers = require('feathers');
const rest = require('feathers-rest');
const socketio = require('feathers-socketio');
const bodyParser = require('body-parser');
const feathers = require('@feathersjs/feathers');
const express = require('@feathersjs/express');
const rest = require('@feathersjs/express/rest');
const socketio = require('@feathersjs/socketio');
const service = require('../lib');

const apiVersion = !process.env.ES_VERSION || process.env.ES_VERSION.split('.')[0] !== '5'
Expand All @@ -29,15 +29,15 @@ const todoService = service({
});

// Create a feathers instance.
let app = feathers()
// Enable REST services
let app = express(// Enable REST services
feathers())
.configure(rest())
// Enable Socket.io services
.configure(socketio())
// Turn on JSON parser for REST services
.use(bodyParser.json())
.use(express.json())
// Turn on URL-encoded parser for REST services
.use(bodyParser.urlencoded({ extended: true }))
.use(express.urlencoded({ extended: true }))
.use('/todos', todoService);

// Start the server.
Expand Down
3 changes: 1 addition & 2 deletions test/utils/core.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* eslint-disable no-unused-expressions */
const { expect } = require('chai');
const errors = require('@feathersjs/errors');

const {
getType,
validateType,
removeProps
} = require('../../lib/utils/core');

const { errors } = require('feathers-errors');

module.exports = function utilsCoreTests () {
describe('getType', () => {
it('should recognize number', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/parse-query.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-unused-expressions */
const { expect } = require('chai');
const { errors } = require('feathers-errors');
const errors = require('@feathersjs/errors');

const { parseQuery } = require('../../lib/utils');

Expand Down

0 comments on commit f3b0d71

Please sign in to comment.