Core: Remove deprecated export

This commit is contained in:
fuma-nama
2024-09-20 22:10:52 +08:00
parent 352c7a7d68
commit e45bc67c09
7 changed files with 10 additions and 13 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'fumadocs-core': major
---
**Remove deprecated `fumadocs-core/middleware` export**
**migrate:** Use `fumadocs-core/i18n`.
-4
View File
@@ -52,10 +52,6 @@
"import": "./dist/link.js",
"types": "./dist/link.d.ts"
},
"./middleware": {
"import": "./dist/middleware.js",
"types": "./dist/middleware.d.ts"
},
"./mdx-plugins": {
"import": "./dist/mdx-plugins/index.js",
"types": "./dist/mdx-plugins/index.d.ts"
-2
View File
@@ -1,2 +0,0 @@
// TODO: Remove this export (major)
export * from './i18n/middleware';
+1 -4
View File
@@ -9,10 +9,7 @@ import {
export interface MetaFile {
file: FileInfo;
format: 'meta';
data: {
// TODO: Merge it into data (major)
data: MetaData;
};
data: MetaData;
}
export interface PageFile {
+1 -1
View File
@@ -301,7 +301,7 @@ function createOutput(options: LoaderOptions): LoaderOutput<LoaderConfig> {
function fileToMeta<Data = MetaData>(file: MetaFile): Meta<Data> {
return {
file: file.file,
data: file.data.data as Data,
data: file.data as Data,
};
}
@@ -171,7 +171,7 @@ function buildFolderNode(
'page',
);
const metadata = meta?.data.data;
const metadata = meta?.data;
const index = indexFile ? buildFileNode(indexFile, ctx) : undefined;
let children: PageTree.Node[];
-1
View File
@@ -12,7 +12,6 @@ export default defineConfig({
'src/search/server.ts',
'src/search/algolia.ts',
'src/utils/use-on-change.ts',
'src/middleware.ts',
'src/i18n/index.ts',
],
});