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

chore: remove unnecessary deps #64

Merged
merged 1 commit into from
Sep 9, 2024
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
37 changes: 7 additions & 30 deletions package-lock.json

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

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,12 @@
"jest-when": "3.6.0",
"prettier": "2.8.8",
"release-it": "17.6.0",
"rimraf": "5.0.9",
"rimraf": "5.0.10",
"ts-jest": "29.2.5",
"tsup": "8.2.4",
"typescript": "5.5.4"
},
"dependencies": {
"date-fns": "2.30.0",
"http-status-enum": "1.0.2",
"superagent": "9.0.2",
"tslog": "4.9.3"
},
Expand Down
39 changes: 0 additions & 39 deletions src/common/date/date-fns.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/common/httpClient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export type { HttpResult } from './models';
export type { HttpRequestConfiguration } from './models';
export type { QueryParams } from './models';
export { HttpMethod } from './models';

export * from './serialize';
export * from './testHttpClient';
export * from './testHttpClientHandler';
4 changes: 1 addition & 3 deletions src/common/httpClient/models.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import HttpStatus from 'http-status-enum';

export enum HttpMethod {
GET = 'GET',
POST = 'POST',
Expand All @@ -23,7 +21,7 @@ export interface HttpRequestConfiguration {

export interface HttpResult<TDto> {
body: TDto;
statusCode: HttpStatus;
statusCode: number;
}

export interface BasicHttpClient {
Expand Down
3 changes: 1 addition & 2 deletions src/common/httpClient/testHttpClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { BasicHttpClient, HttpRequestConfiguration, HttpResult } from './models';
import { RejectedTestHttpRequest, ResolvedTestHttpRequest, TestHttpClientHandler } from './testHttpClientHandler';
import HttpStatus from 'http-status-enum';
export class HttpRequestNotMockedError extends Error {}

export class TestHttpClient implements BasicHttpClient {
Expand All @@ -21,7 +20,7 @@ export class TestHttpClient implements BasicHttpClient {
if (resolvedObj) {
const httpResult: HttpResult<TDto> = {
body: resolvedObj as TDto,
statusCode: resolvedHttpRequest.resolveStatusCode ?? HttpStatus.OK,
statusCode: resolvedHttpRequest.resolveStatusCode ?? 200,
saschaheinl-fft marked this conversation as resolved.
Show resolved Hide resolved
};
return Promise.resolve(httpResult);
}
Expand Down
5 changes: 2 additions & 3 deletions src/common/httpClient/testHttpClientHandler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HttpMethod, QueryParams } from './models';
import HttpStatus from 'http-status-enum';
interface BasicTestHttpRequest {
method: HttpMethod;
url: string;
Expand All @@ -12,9 +11,9 @@ export interface ResolvedTestHttpRequest<Dto = unknown> extends BasicTestHttpReq
resolveTo: Dto;

/**
* if empty resolves to HttpStatus.OK
* if empty resolves to HttpStatus 200/OK
*/
resolveStatusCode?: HttpStatus;
resolveStatusCode?: number;
}

export interface RejectedTestHttpRequest<TError extends Error = Error> extends BasicTestHttpRequest {
Expand Down
1 change: 0 additions & 1 deletion src/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './httpClient';
export * from './date/date-fns';
export * from './projectConstants';
export * from './utils';
export * from './logging';
3 changes: 1 addition & 2 deletions src/fft-api/pickjob/fftPickJobService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isDate } from 'date-fns';
import {
AbstractModificationAction,
PickJob,
Expand All @@ -12,7 +11,7 @@ import {
} from '../types';
import { FftApiClient, MAX_ARRAY_SIZE } from '../common';
import { ResponseError } from 'superagent';
import { CustomLogger, QueryParams } from '../../common';
import { isDate, CustomLogger, QueryParams } from '../../common';
import { Logger } from 'tslog';

export class FftPickJobService {
Expand Down