Skip to content

Commit

Permalink
refactor!: remove deprecated APIs
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove the deprecated APIs:
- `createPrefixTree()` -> `new PrefixTree()`
- `VueRouterExports` -> `VueRouterAutoImports`
  • Loading branch information
posva committed Feb 21, 2024
1 parent 30af445 commit 0415b9e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
7 changes: 0 additions & 7 deletions src/core/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,6 @@ export class PrefixTree extends TreeNode {
}
}

/**
* @deprecated Use `new PrefixTree()` instead.
*/
export function createPrefixTree(options: ResolvedOptions) {
return new PrefixTree(options)
}

/**
* Splits a path into by finding the first '/' and returns the tail and segment. If it has an extension, it removes it.
* If it contains a named view, it returns the view name as well (otherwise it's default).
Expand Down
2 changes: 2 additions & 0 deletions src/data-fetching/defineColadaLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ export interface DefineDataLoaderOptions<
DataLoaderContext,
_RouteLocationNormalizedLoaded<Name>
>

// TODO: option to skip refresh if the used properties of the route haven't changed
}

export interface DataLoaderContext extends DataLoaderContextBase {}
Expand Down
10 changes: 0 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,9 @@ export { createRoutesContext }
export { getFileBasedRouteName, getPascalCaseRouteName } from './core/utils'

// Route Tree and edition
// FIXME: deprecated, remove in next major
export { createPrefixTree } from './core/tree'
export { createTreeNodeValue } from './core/treeNodeValue'
export { EditableTreeNode } from './core/extendRoutes'

// FIXME: deprecated, remove in next major
/**
* @deprecated use `VueRouterAutoImports` instead
*/
export const VueRouterExports: Array<
string | [importName: string, alias: string]
> = ['useRoute', 'useRouter', 'onBeforeRouteUpdate', 'onBeforeRouteLeave']

/**
* Adds useful auto imports to the AutoImport config:
* @example
Expand Down

0 comments on commit 0415b9e

Please sign in to comment.