Skip to content

Commit

Permalink
fix: removes unused extra logger module
Browse files Browse the repository at this point in the history
  • Loading branch information
Figedi committed Sep 9, 2023
1 parent 7bf86f0 commit 25e943e
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion logger.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion logger.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/ApplicationBuilder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { assert, stub } from "sinon";

import { AppBuilderBindings, ApplicationBuilder } from "./ApplicationBuilder.js";
import { type Command, type Provider, ErrorHandle, ShutdownHandle, type AppConfig } from "./types/app.js";
import { type Logger, createStubbedLogger } from "../logger/index.js";
import { type Logger, createStubbedLogger } from "./utils/logger.js";

describe("ApplicationBuilder", function AppBuilderTest() {
this.timeout(20000);
Expand Down
2 changes: 1 addition & 1 deletion src/app/ApplicationBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
set,
} from "lodash-es";
import { str, bool, num, host, port, url, json, cleanEnv } from "envalid";
import { createLogger, type Logger } from "../logger/index.js";
import { createLogger, type Logger } from "./utils/logger.js";
import {
sleep,
remapTree,
Expand Down
2 changes: 1 addition & 1 deletion src/app/TestApplicationBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Container } from "inversify";
import type { ApplicationBuilder, RegisterFnArgs } from "./ApplicationBuilder.js";
import type { Logger } from "../logger/index.js";
import type { Logger } from "./utils/logger.js";
import type { UnpackTransformConfigTypes } from "./types/index.js";

export type Stub<T> = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/remoteConfig/BaseReplicaService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IReplicaService } from "./types/index.js";
import type { Logger } from "../../logger/index.js";
import type { Logger } from "../utils/logger.js";

export class BaseReplicaService implements IReplicaService {
public async runsInK8s(): Promise<boolean> {
Expand Down
2 changes: 1 addition & 1 deletion src/app/remoteConfig/RemoteConfig.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from "./shared.specFiles/index.js";
import { TestApplicationBuilder } from "../TestApplicationBuilder.js";
import { PollingRemoteSource } from "./remoteSource/PollingRemoteSource.js";
import { createStubbedLogger } from "../../logger/index.js";
import { createStubbedLogger } from "../utils/logger.js";
import { ApplicationBuilder } from "../ApplicationBuilder.js";
import type { ReactsOnFn } from "./types/index.js";
import { InvalidConfigWithoutDataError, MaxRetriesWithoutDataError } from "./remoteSource/index.js";
Expand Down
2 changes: 1 addition & 1 deletion src/app/remoteConfig/remoteSource/BaseRemoteSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import stringify from "fast-json-stable-stringify";

import { remapTreeAsync } from "../../utils/index.js";
import { InvalidConfigWithoutDataError } from "./errors.js";
import type { Logger } from "../../../logger/index.js";
import type { Logger } from "../../utils/logger.js";
import type { IJsonDecryptor, RemoteDependencyArgs } from "../types/index.js";
import type { ConfigMetrics } from "./types.js";
import type { ServiceWithLifecycleHandlers } from "../../types/index.js";
Expand Down
2 changes: 1 addition & 1 deletion src/app/remoteConfig/remoteSource/PollingRemoteSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BaseRemoteSource } from "./BaseRemoteSource.js";
import { MaxRetriesWithDataError, MaxRetriesWithoutDataError } from "./errors.js";
import type { IJsonDecryptor, IReloadingStrategy, RemoteDependencyArgs } from "../types/index.js";
import type { IRemoteSource } from "./types.js";
import type { Logger } from "../../../logger/index.js";
import type { Logger } from "../../utils/logger.js";
import {
type AddTransformConfigToPrimitives,
type DynamicOnceTransformConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/app/types/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Container } from "inversify";
import type { ValidatorSpec, Spec } from "envalid";
import type { ParsedArgs } from "minimist";
import type { Observable } from "rxjs";
import type { Logger } from "../../logger/index.js";
import type { Logger } from "../utils/logger.js";
import type { Primitive } from "./base.js";
import type { ArgvParsingParams, AddOptionType } from "./args.js";
import type { IOnceRemoteConfigValue, IStreamedRemoteConfigValue } from "../remoteConfig/remoteValues/types.js";
Expand Down
1 change: 1 addition & 0 deletions src/app/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from "./constantCase.js";
export * from "./parseBoolean.js";
export * from "./isErrorType.js";
export * from "./service.js";
export * from "./logger.js";
File renamed without changes.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./app/index.js";
export * from "./logger/index.js";
2 changes: 1 addition & 1 deletion src/k8s/K8sReplicaService.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { KubeConfig, CoreV1Api } from "@kubernetes/client-node";
import { hostname } from "node:os";
import type { IReplicaService } from "../app/remoteConfig/index.js";
import type { Logger } from "../logger/index.js";
import type { Logger } from "../app/utils/logger.js";

interface K8sReplicaServiceOpts {
namespace: string; // the namespace the svc is deployed in, e.g. 'dev'
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/K8sRollingUpdateStrategy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { IReloadingStrategy, IReplicaService } from "../app/remoteConfig/index.js";
import type { ServiceWithLifecycleHandlers } from "../app/types/index.js";
import { sleep } from "../app/utils/index.js";
import type { Logger } from "../logger/index.js";
import type { Logger } from "../app/utils/logger.js";

/**
* Reloading-strategy to gracefully restart a pod with neighbouring replicas.
Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/index.ts", "src/k8s/index.ts", "src/logger/index.ts", "src/remoteConfig/index.ts"],
entry: ["src/index.ts", "src/k8s/index.ts", "src/remoteConfig/index.ts"],
format: ["cjs", "esm"],
target: "es2022",

Expand Down

0 comments on commit 25e943e

Please sign in to comment.