From 23c715aa10903de6142e9f7f31af6e542b625e3e Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 13 Jun 2024 16:10:52 +0200 Subject: [PATCH] refactor(runtime)!: remove `runtime/*` compatibility exports --- src/core/index.ts | 2 -- src/runtime/app.ts | 4 ---- src/runtime/cache.ts | 8 -------- src/runtime/config.ts | 3 --- src/runtime/context.ts | 3 --- src/runtime/database.ts | 3 --- src/runtime/error.ts | 3 --- src/runtime/plugin.ts | 3 --- src/runtime/storage.ts | 3 --- src/runtime/task.ts | 3 --- src/runtime/utils.ts | 2 -- 11 files changed, 37 deletions(-) delete mode 100644 src/runtime/app.ts delete mode 100644 src/runtime/cache.ts delete mode 100644 src/runtime/config.ts delete mode 100644 src/runtime/context.ts delete mode 100644 src/runtime/database.ts delete mode 100644 src/runtime/error.ts delete mode 100644 src/runtime/plugin.ts delete mode 100644 src/runtime/storage.ts delete mode 100644 src/runtime/task.ts delete mode 100644 src/runtime/utils.ts diff --git a/src/core/index.ts b/src/core/index.ts index 20043fe6ec..a6e3a23c65 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,5 +1,3 @@ -import type { NitroConfig } from "nitropack/types"; - // Core export { createNitro } from "./nitro"; diff --git a/src/runtime/app.ts b/src/runtime/app.ts deleted file mode 100644 index cc26a2bb7f..0000000000 --- a/src/runtime/app.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { useNitroApp } from "./internal/app"; -export type { NitroApp } from "nitropack/types"; diff --git a/src/runtime/cache.ts b/src/runtime/cache.ts deleted file mode 100644 index ff0b9f1a25..0000000000 --- a/src/runtime/cache.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { - cachedEventHandler, - cachedFunction, - defineCachedEventHandler, - defineCachedFunction, -} from "./internal/cache"; diff --git a/src/runtime/config.ts b/src/runtime/config.ts deleted file mode 100644 index 5c8d6f5b13..0000000000 --- a/src/runtime/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { useAppConfig, useRuntimeConfig } from "./internal/config"; diff --git a/src/runtime/context.ts b/src/runtime/context.ts deleted file mode 100644 index 9d5f35ef03..0000000000 --- a/src/runtime/context.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { useEvent } from "./internal/context"; diff --git a/src/runtime/database.ts b/src/runtime/database.ts deleted file mode 100644 index 7a38c43cf4..0000000000 --- a/src/runtime/database.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { useDatabase } from "./internal/database"; diff --git a/src/runtime/error.ts b/src/runtime/error.ts deleted file mode 100644 index c08fefcf35..0000000000 --- a/src/runtime/error.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { default } from "./internal/error"; diff --git a/src/runtime/plugin.ts b/src/runtime/plugin.ts deleted file mode 100644 index 88821df27c..0000000000 --- a/src/runtime/plugin.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { defineNitroPlugin, nitroPlugin } from "./internal/plugin"; diff --git a/src/runtime/storage.ts b/src/runtime/storage.ts deleted file mode 100644 index bf822b763a..0000000000 --- a/src/runtime/storage.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { useStorage } from "./internal/storage"; diff --git a/src/runtime/task.ts b/src/runtime/task.ts deleted file mode 100644 index 6e7cce97b2..0000000000 --- a/src/runtime/task.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" - -export { defineTask, runTask } from "./internal/task"; diff --git a/src/runtime/utils.ts b/src/runtime/utils.ts deleted file mode 100644 index 2b7ecfb52c..0000000000 --- a/src/runtime/utils.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Backward compatibility for imports from "#internal/nitro/*" or "nitropack/runtime/*" -export { isJsonRequest, normalizeError } from "./internal/utils";