From a6ecf7df8834fb71eb7e0721dccaee82dfb21762 Mon Sep 17 00:00:00 2001 From: Kaushik Narayan R Date: Tue, 11 Mar 2025 22:59:00 -0700 Subject: [PATCH] bugfix, ts target stuff --- routes/auth.ts | 2 +- routes/playlists.ts | 2 +- tsconfig.json | 11 ++++++----- utils/flake.ts | 2 -- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/routes/auth.ts b/routes/auth.ts index 125e036..dbd9c4f 100644 --- a/routes/auth.ts +++ b/routes/auth.ts @@ -3,7 +3,7 @@ const authRouter: Router = Router(); import { login, callback, refresh, logout } from "../controllers/auth.ts"; import { isAuthenticated } from "../middleware/authCheck.ts"; -import { validate } from "../validators/index.ts"; +// import { validate } from "../validators/index.ts"; authRouter.get("/login", login); diff --git a/routes/playlists.ts b/routes/playlists.ts index b02838b..e00e094 100644 --- a/routes/playlists.ts +++ b/routes/playlists.ts @@ -3,7 +3,7 @@ const router: Router = Router(); import { fetchUserPlaylists } from "../controllers/playlists.ts"; -import { validate } from "../validators/index.ts"; +// import { validate } from "../validators/index.ts"; router.get("/me", fetchUserPlaylists); diff --git a/tsconfig.json b/tsconfig.json index c5831e8..65fec55 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "exclude": [ - "./boilerplates" + "boilerplates", + "tsout" ], "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ @@ -12,9 +13,9 @@ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "ES2024", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": [ - "ESNext" + "ES2024" ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "libReplacement": true, /* Enable lib replacement. */ @@ -28,9 +29,9 @@ "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ "moduleDetection": "force", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "NodeNext", /* Specify what module code is generated. */ + "module": "Node18", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */ + "moduleResolution": "node16", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ diff --git a/utils/flake.ts b/utils/flake.ts index 86c2d1b..369230d 100644 --- a/utils/flake.ts +++ b/utils/flake.ts @@ -3,5 +3,3 @@ export const sleep = (ms: number): Promise => export const randomBool = (chance_of_failure = 0.25): boolean => Math.random() < chance_of_failure; - -new Promise((resolve) => setTimeout(resolve, 100));