Skip to content

Commit 4c45c52

Browse files
Bump the feathersjs group across 1 directory with 10 updates (#1504)
* Bump the feathersjs group across 1 directory with 10 updates Bumps the feathersjs group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@feathersjs/authentication](https://github.com/feathersjs/feathers/tree/HEAD/packages/authentication) | `4.5.15` | `5.0.34` | | [@feathersjs/authentication-local](https://github.com/feathersjs/feathers/tree/HEAD/packages/authentication-local) | `4.5.15` | `5.0.34` | | [@feathersjs/authentication-oauth](https://github.com/feathersjs/feathers/tree/HEAD/packages/authentication-oauth) | `4.5.15` | `5.0.34` | | [@feathersjs/configuration](https://github.com/feathersjs/feathers/tree/HEAD/packages/configuration) | `4.5.15` | `5.0.34` | | [@feathersjs/express](https://github.com/feathersjs/feathers/tree/HEAD/packages/express) | `4.5.15` | `5.0.34` | | [@feathersjs/feathers](https://github.com/feathersjs/feathers/tree/HEAD/packages/feathers) | `4.5.15` | `5.0.34` | | [@feathersjs/socketio](https://github.com/feathersjs/feathers/tree/HEAD/packages/socketio) | `4.5.18` | `5.0.34` | | [feathers-hooks-common](https://github.com/feathersjs-ecosystem/feathers-hooks-common) | `6.1.5` | `8.2.1` | | [feathers-sequelize](https://github.com/feathersjs-ecosystem/feathers-sequelize) | `6.4.0` | `7.0.3` | Updates `@feathersjs/authentication` from 4.5.15 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/authentication/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/authentication) Updates `@feathersjs/authentication-local` from 4.5.15 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/authentication-local/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/authentication-local) Updates `@feathersjs/authentication-oauth` from 4.5.15 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/authentication-oauth/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/authentication-oauth) Updates `@feathersjs/configuration` from 4.5.15 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/configuration/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/configuration) Updates `@feathersjs/errors` from 5.0.33 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/errors/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/errors) Updates `@feathersjs/express` from 4.5.15 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/express/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/express) Updates `@feathersjs/feathers` from 4.5.15 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/feathers/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/feathers) Updates `@feathersjs/socketio` from 4.5.18 to 5.0.34 - [Release notes](https://github.com/feathersjs/feathers/releases) - [Changelog](https://github.com/feathersjs/feathers/blob/dove/packages/socketio/CHANGELOG.md) - [Commits](https://github.com/feathersjs/feathers/commits/v5.0.34/packages/socketio) Updates `feathers-hooks-common` from 6.1.5 to 8.2.1 - [Release notes](https://github.com/feathersjs-ecosystem/feathers-hooks-common/releases) - [Changelog](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/CHANGELOG.md) - [Commits](feathersjs-ecosystem/feathers-hooks-common@v6.1.5...v8.2.1) Updates `feathers-sequelize` from 6.4.0 to 7.0.3 - [Release notes](https://github.com/feathersjs-ecosystem/feathers-sequelize/releases) - [Changelog](https://github.com/feathersjs-ecosystem/feathers-sequelize/blob/master/CHANGELOG.md) - [Commits](feathersjs-ecosystem/feathers-sequelize@v6.4.0...v7.0.3) --- updated-dependencies: - dependency-name: "@feathersjs/authentication" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: "@feathersjs/authentication-local" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: "@feathersjs/authentication-oauth" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: "@feathersjs/configuration" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: "@feathersjs/errors" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: feathersjs - dependency-name: "@feathersjs/express" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: "@feathersjs/feathers" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: "@feathersjs/socketio" dependency-version: 5.0.34 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: feathers-hooks-common dependency-version: 8.2.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs - dependency-name: feathers-sequelize dependency-version: 7.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: feathersjs ... Signed-off-by: dependabot[bot] <[email protected]> * fix: upgrade feather 4 * fix: fix lint --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bervianto Leo Pratama <[email protected]>
1 parent d2cdad3 commit 4c45c52

25 files changed

+1421
-1084
lines changed

.gitpod.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This configuration file was automatically generated by Gitpod.
2+
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
3+
# and commit this file to your remote git repository to share the goodness with others.
4+
5+
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
6+
7+
tasks:
8+
- init: yarn install && yarn run compile
9+
command: yarn run start
10+
11+

config/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"host": "localhost",
33
"port": 14444,
4-
"public": "../public/",
4+
"public": "./public/",
55
"paginate": {
66
"default": 10,
77
"max": 50
88
},
9-
"nedb": "../data",
9+
"nedb": "./data",
1010
"authentication": {
1111
"entity": "user",
1212
"service": "users",

package.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,28 @@
3434
},
3535
"types": "lib/",
3636
"dependencies": {
37-
"@bervproject/feathers-advance-hook": "^1.1.1",
38-
"@feathersjs/authentication": "^4.5.15",
39-
"@feathersjs/authentication-jwt": "^2.0.10",
40-
"@feathersjs/authentication-local": "^4.5.15",
41-
"@feathersjs/authentication-oauth": "^4.5.15",
42-
"@feathersjs/configuration": "^4.5.15",
37+
"@bervproject/feathers-advance-hook": "^2.0.3",
38+
"@feathersjs/authentication": "^5.0.34",
39+
"@feathersjs/authentication-local": "^5.0.34",
40+
"@feathersjs/authentication-oauth": "^5.0.34",
41+
"@feathersjs/configuration": "^5.0.34",
4342
"@feathersjs/errors": "^5.0.33",
44-
"@feathersjs/express": "^4.5.15",
45-
"@feathersjs/feathers": "^4.5.15",
46-
"@feathersjs/socketio": "^4.5.18",
43+
"@feathersjs/express": "^5.0.34",
44+
"@feathersjs/feathers": "^5.0.34",
45+
"@feathersjs/socketio": "^5.0.34",
4746
"cls-hooked": "^4.2.2",
4847
"compression": "^1.8.0",
4948
"cors": "^2.8.5",
5049
"cross-env": "^7.0.3",
5150
"feathers-authentication-hooks": "^1.0.2",
52-
"feathers-hooks-common": "^6.1.5",
51+
"feathers-hooks-common": "^8.2.1",
5352
"feathers-permissions": "^2.1.4",
54-
"feathers-sequelize": "^6.4.0",
53+
"feathers-sequelize": "^7.0.3",
5554
"helmet": "^8.1.0",
5655
"pg": "^8.16.0",
5756
"sequelize": "^6.37.7",
5857
"serve-favicon": "^2.5.0",
59-
"uuid": "^8.3.2",
58+
"uuid": "^11.1.0",
6059
"winston": "^3.17.0"
6160
},
6261
"devDependencies": {
@@ -69,8 +68,8 @@
6968
"@types/serve-favicon": "^2.5.7",
7069
"@types/uuid": "^9.0.0",
7170
"@types/validator": "^13.15.0",
72-
"@typescript-eslint/eslint-plugin": "^7.0.0",
73-
"@typescript-eslint/parser": "^6.21.0",
71+
"@typescript-eslint/eslint-plugin": "^8.32.1",
72+
"@typescript-eslint/parser": "^8.32.1",
7473
"axios": "^1.9.0",
7574
"eslint": "^8.57.1",
7675
"eslint-config-prettier": "^10.1.5",

src/app.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ import compress from 'compression';
44
import helmet from 'helmet';
55
import cors from 'cors';
66

7-
import feathers from '@feathersjs/feathers';
7+
import { feathers } from '@feathersjs/feathers';
88
import configuration from '@feathersjs/configuration';
9-
import express from '@feathersjs/express';
9+
import express, {
10+
json,
11+
urlencoded,
12+
static as staticFiles,
13+
rest,
14+
notFound,
15+
errorHandler,
16+
} from '@feathersjs/express';
1017
import socketio from '@feathersjs/socketio';
1118

1219
import { Application } from './declarations';
@@ -26,14 +33,14 @@ app.configure(configuration());
2633
app.use(helmet());
2734
app.use(cors());
2835
app.use(compress());
29-
app.use(express.json());
30-
app.use(express.urlencoded({ extended: true }));
36+
app.use(json());
37+
app.use(urlencoded({ extended: true }));
3138
app.use(favicon(path.join(app.get('public'), 'favicon.ico')));
3239
// Host the public folder
33-
app.use('/', express.static(app.get('public')));
40+
app.use('/', staticFiles(app.get('public')));
3441

3542
// Set up Plugins and providers
36-
app.configure(express.rest());
43+
app.configure(rest());
3744
app.configure(socketio());
3845

3946
app.configure(sequelize);
@@ -47,8 +54,8 @@ app.configure(services);
4754
app.configure(channels);
4855

4956
// Configure a middleware for 404s and the error handler
50-
app.use(express.notFound());
51-
app.use(express.errorHandler({ logger }));
57+
app.use(notFound());
58+
app.use(errorHandler({ logger }));
5259

5360
app.hooks(appHooks);
5461

src/authentication.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
import { ServiceAddons, Params } from '@feathersjs/feathers';
1+
import { Params } from '@feathersjs/feathers';
22
import {
33
AuthenticationService,
44
JWTStrategy,
55
AuthenticationResult,
66
} from '@feathersjs/authentication';
77
import { LocalStrategy } from '@feathersjs/authentication-local';
8-
import { expressOauth, OAuthProfile } from '@feathersjs/authentication-oauth';
8+
import { oauth, OAuthProfile } from '@feathersjs/authentication-oauth';
99
import { OAuthStrategy } from '@feathersjs/authentication-oauth';
1010

1111
import { Application } from './declarations';
1212

1313
declare module './declarations' {
1414
interface ServiceTypes {
15-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
16-
authentication: AuthenticationService & ServiceAddons<any>;
15+
authentication: AuthenticationService;
1716
}
1817
}
1918

@@ -65,6 +64,6 @@ export default function (app: Application): void {
6564
authentication.register('local', new LocalStrategy());
6665
authentication.register('google', new GoogleStrategy());
6766

68-
app.use('/authentication', authentication);
69-
app.configure(expressOauth());
67+
app.use('authentication', authentication);
68+
app.configure(oauth());
7069
}

src/declarations.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { Application as ExpressFeathers } from '@feathersjs/express';
2+
import { HookContext as FeathersHookContext } from '@feathersjs/feathers';
23

34
// A mapping of service names to types. Will be extended in service files.
4-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
5+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
56
export interface ServiceTypes {}
67
// The application instance type that will be used everywhere else
78
export type Application = ExpressFeathers<ServiceTypes>;
9+
export type HookContext = FeathersHookContext<Application>;

src/hooks/log.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// about the logger.
44
import logger from '../logger';
55
import util from 'util';
6-
import { HookContext, Hook } from '@feathersjs/feathers';
6+
import { HookContext } from '../declarations';
77

88
// To see more detailed messages, uncomment the following line:
99
logger.level = 'debug';
1010

11-
export default function (): Hook {
11+
export default () => {
1212
return (context: HookContext) => {
1313
// This debugs the service call and a stringified version of the hook context
1414
// You can customize the message (and logger) to your needs
@@ -28,4 +28,4 @@ export default function (): Hook {
2828
logger.error(context.error.stack);
2929
}
3030
};
31-
}
31+
};

src/index.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ import logger from './logger';
33
import app from './app';
44

55
const port = app.get('port');
6-
const server = app.listen(port);
76

87
process.on('unhandledRejection', (reason, p) =>
98
logger.error('Unhandled Rejection at: Promise ', p, reason),
109
);
1110

12-
server.on('listening', () =>
13-
logger.info(
14-
'Feathers application started on http://%s:%d',
15-
app.get('host'),
16-
port,
17-
),
18-
);
11+
app
12+
.listen(port)
13+
.then(() =>
14+
logger.info(
15+
'Feathers application started on http://%s:%d',
16+
app.get('host'),
17+
port,
18+
),
19+
);

src/services/blog/blog.class.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import { Service, SequelizeServiceOptions } from 'feathers-sequelize';
2-
import { Application } from '../../declarations';
1+
import { SequelizeService } from 'feathers-sequelize';
32

4-
export class Blog extends Service {
5-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6-
constructor(options: Partial<SequelizeServiceOptions>, app: Application) {
7-
super(options);
8-
}
9-
}
3+
export class Blog extends SequelizeService {}

src/services/blog/blog.hooks.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import * as feathersAuthentication from '@feathersjs/authentication';
22
import { userAuditHook } from '@bervproject/feathers-advance-hook';
33
const { authenticate } = feathersAuthentication.hooks;
44
import checkPermissions from 'feathers-permissions';
5+
import { HookOptions } from '@feathersjs/feathers';
6+
import { Application } from '../../declarations';
7+
import { Blog } from './blog.class';
58

69
export default {
710
before: {
@@ -59,4 +62,4 @@ export default {
5962
patch: [],
6063
remove: [],
6164
},
62-
};
65+
} as HookOptions<Application, Blog>;

0 commit comments

Comments
 (0)