From 7f7a4c7a8b4d01e8292147880c696f5071b90d5b Mon Sep 17 00:00:00 2001 From: Nicola Palavecino Date: Thu, 31 Aug 2023 00:06:17 -0300 Subject: [PATCH 1/3] Fix return type for create app that was lacking more precise generics instead of any --- src/create-app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/create-app.ts b/src/create-app.ts index d006b8b..6ec5bfd 100644 --- a/src/create-app.ts +++ b/src/create-app.ts @@ -120,6 +120,6 @@ export const setProvider = (provider: AppProvider) => export const createApp = ( opts?: Opts, -) => appProvider(opts); +): App => appProvider(opts); export default createApp; From 7aae866cf612bf927009c7231128e83392f5a27b Mon Sep 17 00:00:00 2001 From: Nicola Palavecino Date: Thu, 31 Aug 2023 00:06:36 -0300 Subject: [PATCH 2/3] Fix stop returning the app on setProvider and resetProvider functions --- src/create-app.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/create-app.ts b/src/create-app.ts index 6ec5bfd..108b016 100644 --- a/src/create-app.ts +++ b/src/create-app.ts @@ -113,10 +113,13 @@ const asyncAppProvider: AppProvider = < let appProvider: AppProvider = asyncAppProvider; -export const resetProvider = () => (appProvider = asyncAppProvider); +export const resetProvider = () => { + appProvider = asyncAppProvider; +}; -export const setProvider = (provider: AppProvider) => - (appProvider = provider); +export const setProvider = (provider: AppProvider) => { + appProvider = provider; +}; export const createApp = ( opts?: Opts, From 7921ba9ff3b80a50432107ea34bc233263859929 Mon Sep 17 00:00:00 2001 From: Nicola Palavecino Date: Thu, 31 Aug 2023 00:22:45 -0300 Subject: [PATCH 3/3] 4.8.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ee3f4a..abaa99c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "async-app", - "version": "4.8.0", + "version": "4.8.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "async-app", - "version": "4.8.0", + "version": "4.8.1", "license": "MIT", "dependencies": { "express": "^4.16.3", diff --git a/package.json b/package.json index 92085ff..fa06965 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "async-app", - "version": "4.8.0", + "version": "4.8.1", "description": "An express wrapper for handling async middlewares, order middlewares, schema validator, and other stuff", "type": "commonjs", "main": "dist/index.js",