Skip to content

Commit 369ec22

Browse files
bors[bot]meili-botbidoubiwacurquizabrunoocasali
authored
Merge #615
615: Changes related to the next MeiliSearch release (v0.25.0) r=curquiza a=meili-bot This PR gathers the changes related to the next MeiliSearch release (v0.25.0) so that this package is ready when the official release is out. ⚠️ This PR should NOT be merged until: - the next release of MeiliSearch (v0.25.0) is out. - the [`meilisearch-js`](https://github.com/meilisearch/meilisearch-js) dependency has been released to be compatible with MeiliSearch v0.25.0. Once the release is out, the upgrade of the `meilisearch-js` dependency might be committed to this branch. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/master/guides/pre-release-week.md) purpose._ --- This PR is breaking because uses meilisearch-js v0.24.0 that only works with MeiliSearch v0.25.0 and later -> it enforces the users to upgrade their MeiliSearch version Co-authored-by: meili-bot <[email protected]> Co-authored-by: cvermand <[email protected]> Co-authored-by: Charlotte Vermandel <[email protected]> Co-authored-by: Clémentine Urquizar <[email protected]> Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: Morgane Dubus <[email protected]>
2 parents 8140806 + 35763ff commit 369ec22

File tree

17 files changed

+126
-138
lines changed

17 files changed

+126
-138
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { instantMeiliSearch } from '@meilisearch/instant-meilisearch'
6969

7070
const searchClient = instantMeiliSearch(
7171
'https://integration-demos.meilisearch.com',
72-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25'
72+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae'
7373
)
7474
```
7575

@@ -80,7 +80,7 @@ import { instantMeiliSearch } from '@meilisearch/instant-meilisearch'
8080

8181
const searchClient = instantMeiliSearch(
8282
'https://integration-demos.meilisearch.com',
83-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25',
83+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae',
8484
{
8585
paginationTotalHits: 30, // default: 200.
8686
placeholderSearch: false, // default: true.
@@ -133,7 +133,7 @@ const search = instantsearch({
133133
indexName: 'steam-video-games',
134134
searchClient: instantMeiliSearch(
135135
'https://integration-demos.meilisearch.com',
136-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25'
136+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae'
137137
),
138138
})
139139

@@ -254,7 +254,7 @@ const search = instantsearch({
254254
indexName: 'instant_search',
255255
searchClient: instantMeiliSearch(
256256
'https://integration-demos.meilisearch.com',
257-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25',
257+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae',
258258
{
259259
// ... InstantMeiliSearch options
260260
}

cypress/integration/search-ui.spec.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,15 @@ describe(`${playground} playground test`, () => {
5757
})
5858

5959
it('click on facets', () => {
60+
cy.get(HIT_ITEM_CLASS).eq(0).contains('Counter-Strike')
61+
6062
const checkbox = `.ais-RefinementList-list .ais-RefinementList-checkbox`
6163
cy.get(checkbox).eq(1).click()
64+
6265
if (playground === 'react') cy.contains('1,939')
6366
if (playground === 'angular') cy.contains('1939')
64-
cy.get(HIT_ITEM_CLASS)
65-
.eq(0)
66-
.contains('Safecracker: The Ultimate Puzzle Adventure')
67-
cy.get(HIT_ITEM_CLASS).eq(0).contains('4.99 $')
67+
68+
cy.contains('Counter-Strike').should('not.exist')
6869
})
6970

7071
it('Search', () => {
@@ -87,14 +88,19 @@ describe(`${playground} playground test`, () => {
8788
})
8889

8990
it('Paginate Search', () => {
91+
cy.get(HIT_ITEM_CLASS).eq(0).contains('Counter-Strike')
92+
9093
if (playground === 'react') {
9194
cy.get('.ais-InfiniteHits-loadMore').click()
9295
cy.get(HIT_ITEM_CLASS).should('have.length', 12)
9396
} else {
94-
if (playground === 'vue') cy.get('.ais-Pagination-item').eq(3).click()
95-
else cy.get('.ais-Pagination-item--page').eq(1).click()
96-
cy.wait(500)
97-
cy.get(HIT_ITEM_CLASS).eq(0).contains('Darwinia')
97+
if (playground === 'vue') {
98+
cy.get('.ais-Pagination-item').eq(3).click()
99+
} else {
100+
cy.get('.ais-Pagination-item--page').eq(1).click()
101+
}
102+
103+
cy.contains('Counter-Strike').should('not.exist')
98104
}
99105
})
100106
})

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@meilisearch/instant-meilisearch",
3-
"version": "0.5.11",
3+
"version": "0.6.0",
44
"private": false,
55
"description": "The search client to use MeiliSearch with InstantSearch.",
66
"scripts": {
@@ -59,7 +59,7 @@
5959
"url": "https://github.com/meilisearch/instant-meilisearch.git"
6060
},
6161
"dependencies": {
62-
"meilisearch": "^0.23.0"
62+
"meilisearch": "0.24.0"
6363
},
6464
"devDependencies": {
6565
"@babel/cli": "^7.16.0",

playgrounds/angular/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { instantMeiliSearch } from '../../../../src'
33

44
const searchClient = instantMeiliSearch(
55
'https://integration-demos.meilisearch.com',
6-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25'
6+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae'
77
)
88

99
@Component({

playgrounds/geo-javascript/src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ injectScript(
1010
indexName: 'world_cities',
1111
searchClient: instantMeiliSearch(
1212
'https://integration-demos.meilisearch.com',
13-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25',
13+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae',
1414
{
1515
limitPerRequest: 20,
1616
}

playgrounds/html/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
indexName: "steam-video-games",
2929
searchClient: instantMeiliSearch(
3030
"https://integration-demos.meilisearch.com",
31-
"dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25"
31+
"SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae"
3232
)
3333
});
3434
search.addWidgets([

playgrounds/javascript/src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const search = instantsearch({
44
indexName: 'steam-video-games',
55
searchClient: instantMeiliSearch(
66
'https://integration-demos.meilisearch.com',
7-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25',
7+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae',
88
{
99
limitPerRequest: 30,
1010
}

playgrounds/react/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { instantMeiliSearch } from '../../../src/index'
1818

1919
const searchClient = instantMeiliSearch(
2020
'https://integration-demos.meilisearch.com',
21-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25',
21+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae',
2222
{
2323
paginationTotalHits: 60,
2424
primaryKey: 'id',

playgrounds/vue/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default {
8585
recommendation: '',
8686
searchClient: instantMeiliSearch(
8787
'https://integration-demos.meilisearch.com',
88-
'dc3fedaf922de8937fdea01f0a7d59557f1fd31832cb8440ce94231cfdde7f25'
88+
'SEJe5jmM54f7afa09d0500b1fcc5bbeda8e4667453f5af2707c7fd62db6e4727701be0ae'
8989
),
9090
}
9191
},

tests/configure.attributes-to-retrieve.tests.ts

Lines changed: 51 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { searchClient, dataset, Movies } from './assets/utils'
22

33
describe('Instant MeiliSearch Browser test', () => {
44
beforeAll(async () => {
5-
try {
6-
await searchClient.MeiliSearchClient.deleteIndex('movies')
7-
} catch (e) {
8-
// movies does not exist
9-
}
10-
const moviesUpdate = await searchClient.MeiliSearchClient.index(
5+
const deleteTask = await searchClient.MeiliSearchClient.deleteIndex(
6+
'movies'
7+
)
8+
await searchClient.MeiliSearchClient.waitForTask(deleteTask.uid)
9+
10+
const documentsTask = await searchClient.MeiliSearchClient.index(
1111
'movies'
1212
).addDocuments(dataset)
13-
await searchClient.MeiliSearchClient.index('movies').waitForPendingUpdate(
14-
moviesUpdate.updateId
13+
await searchClient.MeiliSearchClient.index('movies').waitForTask(
14+
documentsTask.uid
1515
)
1616
})
1717

@@ -43,18 +43,14 @@ describe('Instant MeiliSearch Browser test', () => {
4343
},
4444
},
4545
])
46-
const notRetrieved = [
47-
'id',
48-
'overview',
49-
'genres',
50-
'poster',
51-
'release_date',
52-
'title',
53-
]
46+
5447
const hit = <Movies>response.results[0].hits[0]
55-
notRetrieved.map((attribute: string) =>
56-
expect(hit[attribute]).not.toBeDefined()
57-
)
48+
expect(hit.id).not.toBeDefined()
49+
expect(hit.overview).not.toBeDefined()
50+
expect(hit.genres).not.toBeDefined()
51+
expect(hit.poster).not.toBeDefined()
52+
expect(hit.release_date).not.toBeDefined()
53+
expect(hit.title).not.toBeDefined()
5854
})
5955

6056
test('Test attributesToRetrieve on one non existing attribute', async () => {
@@ -67,20 +63,15 @@ describe('Instant MeiliSearch Browser test', () => {
6763
},
6864
},
6965
])
70-
const notRetrieved = [
71-
'id',
72-
'overview',
73-
'genres',
74-
'poster',
75-
'release_date',
76-
'title',
77-
]
66+
7867
const hit = <Movies>response.results[0].hits[0]
79-
notRetrieved.map(
80-
(attribute: string) =>
81-
hit._highlightResult &&
82-
expect(hit._highlightResult[attribute]).toBeDefined()
83-
)
68+
69+
expect(hit._highlightResult?.id).toBeDefined()
70+
expect(hit._highlightResult?.overview).toBeDefined()
71+
expect(hit._highlightResult?.genres).toBeDefined()
72+
expect(hit._highlightResult?.poster).toBeDefined()
73+
expect(hit._highlightResult?.release_date).toBeDefined()
74+
expect(hit._highlightResult?.title).toBeDefined()
8475
})
8576

8677
test('Test attributesToRetrieve on one existing attribute', async () => {
@@ -93,12 +84,14 @@ describe('Instant MeiliSearch Browser test', () => {
9384
},
9485
},
9586
])
96-
const notRetrieved = ['id', 'overview', 'genres', 'poster', 'release_date']
9787
const hit = <Movies>response.results[0].hits[0]
9888
expect(hit.title).toEqual('Ariel')
99-
notRetrieved.map((attribute: string) =>
100-
expect(hit[attribute]).not.toBeDefined()
101-
)
89+
expect(hit.id).not.toBeDefined()
90+
expect(hit.overview).not.toBeDefined()
91+
expect(hit.genres).not.toBeDefined()
92+
expect(hit.poster).not.toBeDefined()
93+
expect(hit.release_date).not.toBeDefined()
94+
expect(hit.title).toBeDefined()
10295
})
10396

10497
test('Test attributesToRetrieve on default value', async () => {
@@ -110,18 +103,24 @@ describe('Instant MeiliSearch Browser test', () => {
110103
},
111104
},
112105
])
113-
const notRetrieved = ['id', 'overview', 'genres', 'poster', 'release_date']
106+
114107
const hit = <Movies>response.results[0].hits[0]
115108
expect(hit.title).toEqual('Ariel')
116109
expect(hit._highlightResult).toBeDefined()
117-
notRetrieved.map((attribute: string) =>
118-
expect(hit[attribute]).toBeDefined()
119-
)
120-
notRetrieved.map(
121-
(attribute: string) =>
122-
hit._highlightResult &&
123-
expect(hit._highlightResult[attribute]).toBeDefined()
124-
)
110+
111+
expect(hit.id).toBeDefined()
112+
expect(hit.overview).toBeDefined()
113+
expect(hit.genres).toBeDefined()
114+
expect(hit.poster).toBeDefined()
115+
expect(hit.release_date).toBeDefined()
116+
expect(hit.title).toBeDefined()
117+
118+
expect(hit._highlightResult?.id).toBeDefined()
119+
expect(hit._highlightResult?.overview).toBeDefined()
120+
expect(hit._highlightResult?.genres).toBeDefined()
121+
expect(hit._highlightResult?.poster).toBeDefined()
122+
expect(hit._highlightResult?.release_date).toBeDefined()
123+
expect(hit._highlightResult?.title).toBeDefined()
125124
})
126125

127126
test('Test attributesToRetrieve on wild card', async () => {
@@ -134,21 +133,14 @@ describe('Instant MeiliSearch Browser test', () => {
134133
},
135134
},
136135
])
137-
const retrieved = [
138-
'id',
139-
'overview',
140-
'genres',
141-
'poster',
142-
'release_date',
143-
'title',
144-
]
136+
145137
const hit = <Movies>response.results[0].hits[0]
146138
expect(hit.title).toEqual('Ariel')
147-
retrieved.map((attribute: string) => expect(hit[attribute]).toBeDefined())
148-
retrieved.map(
149-
(attribute: string) =>
150-
hit._highlightResult &&
151-
expect(hit._highlightResult[attribute]).toBeDefined()
152-
)
139+
expect(hit._highlightResult?.id).toBeDefined()
140+
expect(hit._highlightResult?.overview).toBeDefined()
141+
expect(hit._highlightResult?.genres).toBeDefined()
142+
expect(hit._highlightResult?.poster).toBeDefined()
143+
expect(hit._highlightResult?.release_date).toBeDefined()
144+
expect(hit._highlightResult?.title).toBeDefined()
153145
})
154146
})

0 commit comments

Comments
 (0)