Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauryD committed Aug 14, 2024
1 parent 668f752 commit 54b7273
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
Expand All @@ -42,10 +42,10 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2.2.4
uses: actions/setup-node@v4
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
Expand Down
1 change: 0 additions & 1 deletion packages/http/src/decorators/use-guard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { container } from '@triptyk/nfw-core';
import type { Class } from 'type-fest';
import type { GuardInterface } from '../interfaces/guard.js';
Expand Down
1 change: 0 additions & 1 deletion packages/http/src/decorators/use-middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { container } from '@triptyk/nfw-core';
import type { Class } from 'type-fest';
import { MetadataStorage } from '../storages/metadata-storage.js';
Expand Down
1 change: 0 additions & 1 deletion packages/http/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export * from './builders/default.js';
export * from './decorators/verbs.js';
export * from './decorators/controller.js';
Expand Down
1 change: 0 additions & 1 deletion packages/http/src/storages/metadata/use-middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import type { Class } from 'type-fest';
import type { AnyMiddlewareType } from '../../types/any-middleware.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import type { Class } from 'type-fest';
import type { ResponseHandlerInterface } from '../../interfaces/response-handler.js';

Expand Down
1 change: 0 additions & 1 deletion packages/http/src/utils/numerical-sort.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export function numericalSortOnKeyASC<O extends Record<string, any>> (array : O[], propertyName: keyof O) {
return [...array].sort((a, b) => a[propertyName] - b[propertyName]);
}
1 change: 0 additions & 1 deletion packages/http/src/utils/resolve-params.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { ParamResolver } from '../resolvers/param-resolver.js';
import type { UseParamsMetadataArgs } from '../storages/metadata/use-param.js';
import type { ControllerContextType } from '../types/controller-context.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rejects = createCustomDecorator(() => Promise.reject(new Error('test')), '
})
class C {
@POST('/')
public test (@rejects reject: string) {
public test (@rejects _reject: string) {
return 'test';
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class SortValidator {
}
}

// eslint-disable-next-line max-statements
// eslint-disable-next-line max-statements, complexity
private recursiveSortValidation (sort: SortQuery, field: string, schema: ResourceSchema<Resource>) {
const directionOrSortQuery = sort[field];

Expand Down
4 changes: 2 additions & 2 deletions packages/resource-jsonapi/src/serialization/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export class DocumentSerializer {
return doc;
}

private getSchemaFor(resource: Resource) {
private getSchemaFor (resource: Resource) {
if (!resource.resourceType) {
throw new Error(`Resource ${resource} has no resourceType assigned`);
}

try {
return this.registry.getSchemaFor(resource.resourceType);
return this.registry.getSchemaFor(resource.resourceType);
} catch (e) {
throw new Error(`No schema found for resource type ${resource.resourceType}`);
}
Expand Down

0 comments on commit 54b7273

Please sign in to comment.