Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use @feathers/hooks and add async type #1798

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4b88ce7
Initial commit for async hooks
daffl Jan 9, 2019
85ddf9f
First final cut of hooks plugin and typings
daffl Jan 18, 2019
d44f22f
feat: Enable async hooks (#1585)
bertho-zero Oct 3, 2019
5392b83
old hook processing code with the async hooks
bertho-zero Oct 7, 2019
c8110ae
process error and finally hooks in async hooks
bertho-zero Oct 9, 2019
64d1580
feat: Old hook processing code with the async hooks (#1604)
bertho-zero Nov 30, 2019
02db6d0
chore(readme): Fix typo (#1752)
peterennis Dec 20, 2019
312cf7f
chore: readme typo (#1754)
peterennis Jan 1, 2020
2d01036
Merge branch 'hooks' of https://github.com/feathersjs/feathers into b…
bertho-zero Jan 6, 2020
90b7890
use @feathersjs/hooks
bertho-zero Jan 7, 2020
30ea8c5
Merge branch 'bertho-hooks2' of https://github.com/bertho-zero/feathe…
bertho-zero Jan 7, 2020
7d9cab9
use HookContext
bertho-zero Jan 30, 2020
874b261
Merge branch 'master' of https://github.com/feathersjs/feathers into …
bertho-zero Jan 30, 2020
337bccc
fix type
bertho-zero Jan 30, 2020
555ef2d
revert useless changes
bertho-zero Jan 30, 2020
9453cee
client: remove ref of unused koa-compose
bertho-zero Jan 30, 2020
a661e04
destructure
bertho-zero Jan 30, 2020
a60b317
remove blank line
bertho-zero Jan 30, 2020
60311fd
remove double skip
bertho-zero Jan 30, 2020
df9fada
remove useless instruction
bertho-zero Jan 30, 2020
3571f5d
improve usage of @feathers/hooks
bertho-zero Jan 31, 2020
7e711f2
remove useless async
bertho-zero Jan 31, 2020
9a67fc3
fix wrappers
bertho-zero Jan 31, 2020
8ea726c
add default collectors
bertho-zero Jan 31, 2020
3884091
exports code in a function
bertho-zero Jan 31, 2020
0dbfa9c
remove complexity
bertho-zero Jan 31, 2020
c23b6ba
remove usage of processHooks in @feathersjs/feathers
bertho-zero Feb 1, 2020
d261d13
remove useless spread
bertho-zero Feb 1, 2020
369a01e
remove unused import
bertho-zero Feb 1, 2020
2348555
add test for mix of @feathersjs/hooks and .hooks
bertho-zero Feb 1, 2020
26fef0f
move wrappers to commons
bertho-zero Feb 1, 2020
2e02acc
move const hooks
bertho-zero Feb 1, 2020
75c4638
Merge branch 'master' of https://github.com/feathersjs/feathers into …
bertho-zero Feb 24, 2020
320be21
upgrade @feathersjs/hooks
bertho-zero Feb 24, 2020
53c4e46
Merge branch 'master' into bertho-hooks2
bertho-zero Feb 25, 2020
ade512d
Merge branch 'master' of github.com:feathersjs/feathers into bertho-h…
daffl Mar 4, 2020
29fae8b
Merge branch 'master' into bertho-hooks2
bertho-zero Mar 4, 2020
7abe3e6
chore(package): Remove deprecated request library (#1917)
daffl Apr 16, 2020
d20b7d5
chore(package): Remove @feathersjs/primus packages from core (#1919)
daffl Apr 16, 2020
17d80e0
chore(typescript): Migrate @feathersjs/errors to modern classes and T…
daffl Apr 16, 2020
cbd31c1
fix(errors): Format package.json with spaces
daffl Apr 17, 2020
a9e1423
Merge branch 'dove' into bertho-hooks2
bertho-zero Apr 24, 2020
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: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Tell us about the applicable parts of your setup.

**React Native Version**:

**Module Loader**:
**Module Loader**:
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ packages/authentication-client/lib
packages/authentication-oauth/lib
packages/configuration/lib
packages/commons/lib
packages/errors/lib
packages/tests/lib
packages/transport-commons/lib
66 changes: 28 additions & 38 deletions package-lock.json

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

2 changes: 0 additions & 2 deletions packages/authentication-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
"devDependencies": {
"@feathersjs/authentication-local": "^4.5.2",
"@feathersjs/express": "^4.5.2",
"@feathersjs/primus": "^4.5.2",
"@feathersjs/primus-client": "^4.5.2",
"@feathersjs/rest-client": "^4.5.2",
"@feathersjs/socketio": "^4.5.2",
"@feathersjs/socketio-client": "^4.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/authentication-client/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class AuthenticationClient {
options: AuthenticationClientOptions;

constructor (app: Application, options: AuthenticationClientOptions) {
const socket = app.io || app.primus;
const socket = app.io || (app as any).primus;
const storage = new StorageWrapper(app.get('storage') || options.storage);

this.app = app;
Expand Down
1 change: 0 additions & 1 deletion packages/authentication-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ declare module '@feathersjs/feathers' {
interface Application<ServiceTypes = {}> {
io?: any;
rest?: any;
primus?: any;
authentication: AuthenticationClient;
authenticate: AuthenticationClient['authenticate'];
reAuthenticate: AuthenticationClient['reAuthenticate'];
Expand Down
45 changes: 0 additions & 45 deletions packages/authentication-client/test/integration/primus.test.ts

This file was deleted.

5 changes: 1 addition & 4 deletions packages/client/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import feathers from '@feathersjs/feathers';
import authentication from '@feathersjs/authentication-client';
import errors from '@feathersjs/errors';
import primus from '@feathersjs/primus-client';
import * as errors from '@feathersjs/errors';
import rest from '@feathersjs/rest-client';
import socketio from '@feathersjs/socketio-client';

Expand All @@ -13,14 +12,12 @@ export = feathersClient;
type Feathers = typeof feathers;
type FeathersAuthenticationClient = typeof authentication;
type FeathersErrors = typeof errors;
type FeathersPrimusClient = typeof primus;
type FeathersRestClient = typeof rest;
type FeathersSocketIOClient = typeof socketio;

interface FeathersClient extends Feathers {
authentication: FeathersAuthenticationClient;
errors: FeathersErrors;
primus: FeathersPrimusClient;
rest: FeathersRestClient;
socketio: FeathersSocketIOClient;
}
15 changes: 7 additions & 8 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@feathersjs/client",
"description": "A module that consolidates Feathers client modules for REST (jQuery, Request, Superagent) and Websocket (Socket.io, Primus) connections",
"description": "A module that consolidates Feathers client modules for REST and Websocket connections",
"version": "4.5.2",
"repository": {
"type": "git",
Expand Down Expand Up @@ -38,18 +38,18 @@
"last 2 versions",
"IE 10"
],
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"dependencies": {
"@feathersjs/authentication-client": "^4.5.2",
"@feathersjs/errors": "^4.5.2",
"@feathersjs/express": "^4.5.2",
"@feathersjs/feathers": "^4.5.2",
"@feathersjs/primus": "^4.5.2",
"@feathersjs/primus-client": "^4.5.2",
"@feathersjs/rest-client": "^4.5.2",
"@feathersjs/socketio": "^4.5.2",
"@feathersjs/socketio-client": "^4.5.2",
"@feathersjs/socketio-client": "^4.5.2"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@feathersjs/tests": "^4.5.2",
"babel-loader": "^8.1.0",
"body-parser": "^1.19.0",
Expand All @@ -60,7 +60,6 @@
"mocha-puppeteer": "^0.14.0",
"node-fetch": "^2.6.0",
"parallel-webpack": "^2.6.0",
"request": "^2.88.2",
"socket.io-client": "^2.3.0",
"superagent": "^5.2.2",
"uglifyjs-webpack-plugin": "^2.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages/client/primus.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ const errors = require('@feathersjs/errors');
const authentication = require('@feathersjs/authentication-client');
const rest = require('@feathersjs/rest-client');
const socketio = require('@feathersjs/socketio-client');
const primus = require('@feathersjs/primus-client');

Object.assign(feathers, {
errors,
socketio,
primus,
rest,
authentication
});
Expand Down
1 change: 0 additions & 1 deletion packages/client/src/primus.js

This file was deleted.

21 changes: 0 additions & 21 deletions packages/client/test/rest/request.test.js

This file was deleted.

29 changes: 0 additions & 29 deletions packages/client/test/sockets/primus.test.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/client/test/sockets/socketio.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const socketio = require('@feathersjs/socketio');
const baseTests = require('@feathersjs/tests/lib/client');

const app = require('../fixture');
const feathers = require('../../');
const feathers = require('../../src');

describe('Socket.io connector', function () {
const socket = io('http://localhost:9988');
Expand Down
7 changes: 4 additions & 3 deletions packages/client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
function createConfig (name, isProduction = false) {
const output = name === 'index' ? 'feathers' : name;
const commons = {
entry: `./src/${name}.js`,
entry: [
'regenerator-runtime/runtime',
`./src/${name}.js`
],
output: {
library: 'feathers',
libraryTarget: 'umd',
Expand Down Expand Up @@ -61,8 +64,6 @@ module.exports = [
createConfig('rest', true),
createConfig('socketio'),
createConfig('socketio', true),
createConfig('primus'),
createConfig('primus', true),
createConfig('authentication'),
createConfig('authentication', true)
];
3 changes: 3 additions & 0 deletions packages/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"publishConfig": {
"access": "public"
},
"dependencies": {
"@feathersjs/hooks": "^0.4.0-alpha.0"
},
"devDependencies": {
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.1",
Expand Down
Loading