Skip to content

Commit b56e8f7

Browse files
committed
fix: docs errors
1 parent c4f0860 commit b56e8f7

File tree

6 files changed

+11
-60
lines changed

6 files changed

+11
-60
lines changed

docs/.vitepress/plugins/markdownTransform.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export function MarkdownTransform(options: MarkdownTransformOptions): Plugin {
3434

3535
const utility = utilitiesList.find(x => x.pathMd === slug)
3636
if (!utility) {
37-
console.warn(`Utility not found for slug: ${slug}`)
3837
return null
3938
}
4039

docs/.vitepress/utilities.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ export async function discoverUtilities() {
4848

4949
const slug = kebabCase(title)
5050

51-
console.log(`Processing ${filePath} -> ${slug}`)
52-
5351
const utility: Utility = {
5452
name: title,
5553
title,

docs/migrating.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1 @@
11
# Migrating
2-
3-
Version 5.0.0 of `feathers-hooks-common` is compatible with Feathers v4 and up.
4-
5-
## Deprecations
6-
7-
The following hooks and utilities have been deprecated and replaced with different named alternatives, Feathers v4 or Lodash functionality:
8-
9-
### Hooks
10-
11-
- `callback-to-promise` - Use `async/await`, native Promises or NodeJS [utils.promisify](https://nodejs.org/api/util.html#util_util_promisify_original)
12-
- `client` - Use [paramsFromClient](hooks#paramsfromclient) instead
13-
- `disable` - Use [disallow](hooks#disallow) instead
14-
- `disable-multi-item-change` - Use the database adapter `multi` option instead. See the [Feathers v4 migration guide](https://docs.feathersjs.com/guides/migrating.html) for more information.
15-
- disable-multi-item-create - Use the database adapter `multi` option instead. See the [Feathers v4 migration guide](https://docs.feathersjs.com/guides/migrating.html) for more information.
16-
- `pluck` - Use `iff(isProvider('external'), keep(...fieldNames))` instead
17-
- `pluckQuery` - Use [keepQuery](hooks#keepquery) instead
18-
- promiseToCallback - No longer necessary since callbacks have been deprecated in Feathers v3 and later
19-
- `removeQuery` - Use [discardQuery](hooks#discardquery) instead
20-
- `setCreatedAt` - Use [setNow](hooks#setnow) instead
21-
- `setUpdatedAt` - Use [setNow](hooks#setnow) instead
22-
- `skipRemainingHooks` - Use conditional hook chains with [iff](hooks#iff) instead
23-
- `skipRemainingHooksOnFlag` - Use conditional hook chains with [iff](hooks#iff) instead
24-
- `softDelete2` - Use Feathers v4 database adapters and the new [softDelete](hooks#softdelete) instead
25-
26-
### Utilities
27-
28-
Several utility methods have been replaced by [Lodash](https://lodash.com) methods which are thoroughly tested and performance optimized in many different environments.
29-
30-
- `existsByDot` - Use [\_.has()](https://lodash.com/docs/latest#has)
31-
- `deleteByDot` - Use [\_.omit](https://lodash.com/docs/latest#omit)
32-
- `getByDot` - Use [\_.get()](https://lodash.com/docs/latest#get)
33-
- `setByDot` - Use [\_.set()](https://lodash.com/docs/latest#set)
34-
35-
## Safe mutations
36-
37-
Most hooks have been updated to safely delete or add properties by replacing the object on the context with a new object instead of mutating it. This should prevent difficult to debug situations where e.g. `params` or `params.query` get changes in nested hooks when passed along.
38-
39-
## stashBefore
40-
41-
## softDelete
42-
43-
## setField
44-
45-
Moved to [feathers-authentication-hooks](https://github.com/feathersjs-ecosystem/feathers-authentication-hooks#setfield)

docs/overview.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44

55
This documentation has several parts:
66

7-
- [Hooks API](./hooks.md) - The API for the available hooks
8-
- [Utilities API](./utilities.md) - The API for the available utility methods
9-
- [Predicates](./predicates.md)- The API for the available predicates
7+
- [Hooks API](./hooks/index.md) - The API for the available hooks
8+
- [Utilities API](./utils/index.md) - The API for the available utility methods
9+
- [Predicates](./predicates/index.md)- The API for the available predicates
1010
- [Migrating](./migrating.md) - Information on how to migrate to the latest version of `feathers-hooks-common`
1111
- [Guides](./guides.md) - More in-depth guides for some of the available hooks
12-
13-
## Notable Changes
14-
15-
### 6.1.0
16-
17-
- **new hook `setField`**: The `setField` hook allows to set a field on the hook context based on the value of another field on the hook context. [see docs](./hooks.md#setfield)

src/hooks/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export * from './cache/cache.js'
22
export * from './check-required/check-required.js'
33
export * from './combine/combine.js'
4+
export * from './create-related/create-related.js'
45
export * from './debug/debug.js'
56
export * from './disable-pagination/disable-pagination.js'
67
export * from './disallow/disallow.js'
@@ -27,6 +28,8 @@ export * from './stash-before/stash-before.js'
2728
export * from './throw-if-is-multi/throw-if-is-multi.js'
2829
export * from './throw-if-is-provider/throw-if-is-provider.js'
2930
export * from './throw-if/throw-if.js'
31+
export * from './trim-data/trim-data.js'
32+
export * from './trim-result/trim-result.js'
3033
export * from './transform-data/transform-data.js'
3134
export * from './transform-result/transform-result.js'
3235
export * from './traverse/traverse.js'

src/utils/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
export * from './calling-params/calling-params.js'
2-
export * from './check-context/check-context.js'
32
export * from './check-context-if.js'
4-
export * from './get-items/get-items.js'
3+
export * from './check-context/check-context.js'
54
export * from './get-data-is-array/get-data-is-array.js'
5+
export * from './get-exposed-methods/get-exposed-methods.js'
6+
export * from './get-items/get-items.js'
7+
export * from './get-paginate/get-paginate.js'
68
export * from './get-result-is-array/get-result-is-array.js'
7-
export * from './replace-items/replace-items.js'
89
export * from './replace-data/replace-data.js'
10+
export * from './replace-items/replace-items.js'
911
export * from './replace-result/replace-result.js'
10-
export * from './get-paginate/get-paginate.js'
1112
export * from './skip-result/skip-result.js'
1213
export * from './transform-params/transform-params.js'

0 commit comments

Comments
 (0)