Skip to content

Commit cb9cb92

Browse files
committed
Change transform naming to Adapt
1 parent 23cf7ae commit cb9cb92

13 files changed

+19
-25
lines changed

src/transformers/__tests__/filters.tests.ts renamed to src/adapter/__tests__/filters.tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mergeFiltersAndNumericFilters } from '../'
1+
import { mergeFiltersAndNumericFilters } from '..'
22

33
const filtersTestsParameters = [
44
{

src/transformers/__tests__/pagination.tests.ts renamed to src/adapter/__tests__/pagination.tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getNumberPages, paginateHits } from '../'
1+
import { getNumberPages, paginateHits } from '..'
22
import { defaultContext } from './utils'
33

44
const numberPagesTestParameters = [
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/transformers/to-instantsearch-hits.ts renamed to src/adapter/to-instantsearch-hits.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { TransformToISHitsm } from '../types'
1+
import { AdaptToISHitsm } from '../types'
22
import { paginateHits } from './pagination'
33
import {
44
createHighlighResult,
55
createSnippetResult,
66
} from './to-instantsearch-highlight'
77

8-
export const transformToISHits: TransformToISHitsm = function (
8+
export const adaptToISHits: AdaptToISHitsm = function (
99
meiliSearchHits,
1010
instantSearchParams,
1111
instantMeiliSearchContext

src/transformers/to-instantsearch-response.ts renamed to src/adapter/to-instantsearch-response.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { TransformToISResponse } from '../types'
1+
import { AdaptToISResponse } from '../types'
22
import { getNumberPages } from './pagination'
3-
import { transformToISHits } from './to-instantsearch-hits'
3+
import { adaptToISHits } from './to-instantsearch-hits'
44

5-
export const transformToISResponse: TransformToISResponse = function (
5+
export const adaptToISResponse: AdaptToISResponse = function (
66
indexUid,
77
{
88
exhaustiveFacetsCount,
@@ -29,11 +29,7 @@ export const transformToISResponse: TransformToISResponse = function (
2929
nbHits,
3030
processingTimeMS: processingTimeMs,
3131
query,
32-
hits: transformToISHits(
33-
hits,
34-
instantSearchParams,
35-
instantMeiliSearchContext
36-
),
32+
hits: adaptToISHits(hits, instantSearchParams, instantMeiliSearchContext),
3733
}
3834
return {
3935
results: [ISResponse],
File renamed without changes.

src/transformers/to-meilisearch-params.ts renamed to src/adapter/to-meilisearch-params.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { TransformToMeiliSearchParams } from '../types'
1+
import { AdaptToMeiliSearchParams } from '../types'
22
import { mergeFiltersAndNumericFilters } from './to-meilisearch-filters'
33

4-
export const transformToMeiliSearchParams: TransformToMeiliSearchParams = function (
4+
export const adaptToMeiliSearchParams: AdaptToMeiliSearchParams = function (
55
{
66
query,
77
facets,

0 commit comments

Comments
 (0)