Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes related to the next Meilisearch release (v1.11.0) #1325

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e15136b
🐛 fix(geosearch): Don't overwrite object ID in geosearch response
queer Aug 4, 2024
52e9348
Update README.md
meili-bot Jul 29, 2024
829ca5e
Update meilisearch version to 0.42.0
brunoocasali Aug 26, 2024
f114abe
Add changelog
brunoocasali Aug 26, 2024
db7d720
Version Packages
github-actions[bot] Aug 26, 2024
1c655f4
Add test
flevi29 Aug 27, 2024
23c1407
Fix test
flevi29 Aug 27, 2024
5d0e787
Add changeset
flevi29 Aug 27, 2024
09519cb
Bump vite from 4.5.3 to 4.5.5 in the npm_and_yarn group
dependabot[bot] Sep 18, 2024
4ca62b1
Bump the npm_and_yarn group with 3 updates
dependabot[bot] Sep 18, 2024
5355455
Version Packages
github-actions[bot] Sep 18, 2024
bbd057f
Update README.md
meili-bot Sep 23, 2024
b1436c1
Update meilisearch-js dependency verison
curquiza Oct 6, 2024
4ccd792
Fix Jest removing Node.js native fetch
flevi29 Oct 7, 2024
1ce2955
Make error more detailed temporarily
flevi29 Oct 7, 2024
c5a18c7
Make Jest verbose
flevi29 Oct 7, 2024
5938d6e
Revert "Make Jest verbose"
flevi29 Oct 7, 2024
16b5b47
Revert "Make error more detailed temporarily"
flevi29 Oct 7, 2024
409c52d
Fix Jest for autocomplete as well
flevi29 Oct 7, 2024
517e502
Update parcel and turbo, adjust playgrounds
flevi29 Oct 7, 2024
2835a70
Update parcel
flevi29 Oct 7, 2024
a40a8ad
Attempt fix
flevi29 Oct 7, 2024
ba30e71
Delete angular playground as it's no longer supported by instantsearch
flevi29 Oct 7, 2024
e5bbb7c
Exclude node builtins from parcel
flevi29 Oct 7, 2024
8d8e440
Add changeset
flevi29 Oct 7, 2024
6814ed3
Add changeset
flevi29 Oct 7, 2024
9e8ce3b
Remove accidental dependencies, misc
flevi29 Oct 7, 2024
6a68535
Externalize node:process
flevi29 Oct 7, 2024
40839f1
Make autocomplete have a minor version bump
flevi29 Oct 7, 2024
5e906c6
Version Packages
github-actions[bot] Oct 7, 2024
7664f24
Fix wrong meilisearch client being imported in UMD
flevi29 Oct 16, 2024
e58d681
Add changeset
flevi29 Oct 16, 2024
f8add9f
Version Packages
github-actions[bot] Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"ignore": [
"@meilisearch/geo-playground",
"@meilisearch/vanilla-playground",
"@meilisearch/angular-playground",
"@meilisearch/vue3-ts-playground",
"@meilisearch/react-playground",
"@meilisearch/local-react-playground",
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ typings/
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
# parcel cache (https://parceljs.org/)
.parcel-cache

# Next.js build output
.next
Expand Down Expand Up @@ -123,6 +123,4 @@ dist
data.ms
.turbo

.angular

.idea
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ yarn playground:html
An additional playground is provided to test out the [GeoSearch](./packages/instant-meilisearch#-geo-search).

```bash
yarn playground:geo-javascript
yarn playground:geosearch
```

Note: If the Google Maps stopped working, please create a new [Google Api Key](https://developers.google.com/maps/documentation/javascript/get-api-key) and add it in the `.env` file at the root of the playground: `/playgrounds/geo-javascript`
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"scripts": {
"playground:geosearch": "turbo run dev --filter=@meilisearch/geo-playground --parallel",
"playground:vanilla": "turbo run dev --filter=@meilisearch/vanilla-playground --parallel",
"playground:angular": "turbo run dev --filter=@meilisearch/angular-playground --parallel",
"playground:vue3": "turbo run dev --filter=@meilisearch/vue3-ts-playground --parallel",
"playground:react": "turbo run dev --filter=@meilisearch/react-playground --parallel",
"playground:local-react": "turbo run dev --filter=@meilisearch/local-react-playground --parallel",
Expand All @@ -37,12 +36,17 @@
"@testing-library/jest-dom": "^5.16.5",
"@types/jest": "^29.5.1",
"@types/jest-diff": "^24.3.0",
"parcel-bundler": "^1.12.5",
"turbo": "^1.10.12"
"parcel": "^2.12.0",
"turbo": "^2.1.3"
},
"dependencies": {
"@changesets/cli": "^2.26.1",
"instantsearch.css": "^8.0.0"
},
"alias": {
"node:crypto": false,
"node:buffer": false,
"node:process": false
},
"packageManager": "yarn@1.22.22"
}
13 changes: 13 additions & 0 deletions packages/autocomplete-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @meilisearch/autocomplete-client

## 0.4.0

### Minor Changes

- 26e7cfd: - update `meilisearch` js client
- update `parcel` and `turbo`
- get rid of angular playground tests, as [angular-instantsearch got deprecated](https://www.algolia.com/blog/algolia/migrating-from-angular-instantsearch/)

### Patch Changes

- Updated dependencies [26e7cfd]
- @meilisearch/instant-meilisearch@0.21.0

## 0.3.0

### Minor Changes
Expand Down
10 changes: 4 additions & 6 deletions packages/autocomplete-client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ module.exports = {
projects: [
{
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
'ts-jest': { tsconfig: 'tsconfig.test.json' },
fetch: globalThis.fetch,
},
preset: 'ts-jest',
displayName: 'dom',
Expand All @@ -22,9 +21,8 @@ module.exports = {
},
{
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
'ts-jest': { tsconfig: 'tsconfig.test.json' },
fetch: globalThis.fetch,
},
preset: 'ts-jest',
displayName: 'node',
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meilisearch/autocomplete-client",
"version": "0.3.0",
"version": "0.4.0",
"private": false,
"description": "The search client to use Meilisearch with autocomplete.js.",
"homepage": "https://github.com/meilisearch/meilisearch-js-plugins/tree/main/packages/autocomplete-client",
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete-client/src/package-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PACKAGE_VERSION = '0.3.0'
export const PACKAGE_VERSION = '0.4.0'
3 changes: 1 addition & 2 deletions packages/autocomplete-client/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
},
"include": [
"./**/*"
],
"exclude": ["playgrounds/angular"]
]
}
9 changes: 9 additions & 0 deletions packages/eslint-config-meilisearch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# eslint-config-meilisearch

## 0.0.1

### Patch Changes

- 26e7cfd: - update `meilisearch` js client
- update `parcel` and `turbo`
- get rid of angular playground tests, as [angular-instantsearch got deprecated](https://www.algolia.com/blog/algolia/migrating-from-angular-instantsearch/)
2 changes: 0 additions & 2 deletions packages/eslint-config-meilisearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ module.exports = {
browser: true, // for jest/puppeteer tests in tests/env/express
context: true, // for jest/puppeteer tests in tests/env/express
jestPuppeteer: true, // for jest/puppeteer tests in tests/env/express
jasmine: true, // for angular e2e tests in playground/angular
},
extends: [
'standard',
Expand Down Expand Up @@ -120,7 +119,6 @@ module.exports = {
browser: true, // for jest/puppeteer tests in tests/env/express
context: true, // for jest/puppeteer tests in tests/env/express
jestPuppeteer: true, // for jest/puppeteer tests in tests/env/express
jasmine: true, // for angular e2e tests in playground/angular
},
extends: [
'standard',
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-meilisearch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-meilisearch",
"version": "0.0.0",
"version": "0.0.1",
"main": "index.js",
"license": "MIT",
"private": true,
Expand Down
26 changes: 26 additions & 0 deletions packages/instant-meilisearch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @meilisearch/instant-meilisearch

## 0.21.1

### Patch Changes

- 1e7bf78: Fix wrong "meilisearch" client being imported in UMD bundle.

## 0.21.0

### Minor Changes

- 26e7cfd: - update `meilisearch` js client
- update `parcel` and `turbo`
- get rid of angular playground tests, as [angular-instantsearch got deprecated](https://www.algolia.com/blog/algolia/migrating-from-angular-instantsearch/)

## 0.20.1

### Patch Changes

- fa02104: Don't write objectID property if it already exists when adapting geosearch.

## 0.20.0

### Minor Changes

- 1885691: Update meilisearch version to v0.42.0

## 0.19.3

### Patch Changes
Expand Down
58 changes: 57 additions & 1 deletion packages/instant-meilisearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,66 @@ NB: If you don't have any Meilisearch instance running and containing your data,
- [⚡ Supercharge your Meilisearch experience](#-supercharge-your-meilisearch-experience)
- [🔧 Installation](#-installation)
- [🎬 Usage](#-usage)
- [Basic](#basic)
- [Parameters](#parameters)
- [💅 Customization](#-customization)
- [Placeholder Search](#placeholder-search)
- [Finite Pagination](#finite-pagination)
- [Primary key](#primary-key)
- [Keep zero facets](#keep-zero-facets)
- [Request Config](#request-config)
- [Custom HTTP client](#custom-http-client)
- [Meilisearch search parameters](#meilisearch-search-parameters)
- [Modify Meilisearch search parameters](#modify-meilisearch-search-parameters)
- [🪡 Example with InstantSearch](#-example-with-instantsearch)
- [More Documentation](#more-documentation)
- [🤖 Compatibility with Meilisearch and InstantSearch](#-compatibility-with-meilisearch-and-instantsearch)
- [📜 API Resources](#-api-resources)
- [📜 API resources](#-api-resources)
- [Table Of Widgets](#table-of-widgets)
- [✅ InstantSearch](#-instantsearch)
- [✅ Index](#-index)
- [✅ SearchBox](#-searchbox)
- [✅ Configure](#-configure)
- [❌ ConfigureRelatedItems](#-configurerelateditems)
- [Panel](#panel)
- [❌ Autocomplete](#-autocomplete)
- [✅ Voice Search](#-voice-search)
- [✅ Insight](#-insight)
- [✅ Middleware](#-middleware)
- [✅ renderState](#-renderstate)
- [✅ Hits](#-hits)
- [✅ InfiniteHits](#-infinitehits)
- [✅ Highlight](#-highlight)
- [✅ Snippet](#-snippet)
- [✅ Geo Search](#-geo-search)
- [Requirements](#requirements)
- [Usage](#usage)
- [❌ Answers](#-answers)
- [✅ RefinementList](#-refinementlist)
- [✅ HierarchicalMenu](#-hierarchicalmenu)
- [Hierarchical Menu Usage](#hierarchical-menu-usage)
- [✅ RangeSlider](#-rangeslider)
- [✅ Menu](#-menu)
- [✅ currentRefinements](#-currentrefinements)
- [✅ RangeInput](#-rangeinput)
- [✅ MenuSelect](#-menuselect)
- [✅ ToggleRefinement](#-togglerefinement)
- [✅ NumericMenu](#-numericmenu)
- [✅ RatingMenu](#-ratingmenu)
- [✅ ClearRefinements](#-clearrefinements)
- [✅ Pagination](#-pagination)
- [✅ HitsPerPage](#-hitsperpage)
- [✅ Breadcrumb](#-breadcrumb)
- [✅ Stats](#-stats)
- [❌ Analytics](#-analytics)
- [❌ QueryRuleCustomData](#-queryrulecustomdata)
- [❌ QueryRuleContext](#-queryrulecontext)
- [✅ SortBy](#-sortby)
- [Sort formula](#sort-formula)
- [Relevancy](#relevancy)
- [Example](#example)
- [❌ RelevantSort](#-relevantsort)
- [✅ Routing](#-routing)
- [⚙️ Development Workflow and Contributing](#️-development-workflow-and-contributing)

## 📖 Documentation
Expand Down
10 changes: 4 additions & 6 deletions packages/instant-meilisearch/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ module.exports = {
projects: [
{
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
'ts-jest': { tsconfig: 'tsconfig.test.json' },
fetch: globalThis.fetch,
},
preset: 'ts-jest',
displayName: 'dom',
Expand All @@ -22,9 +21,8 @@ module.exports = {
},
{
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
'ts-jest': { tsconfig: 'tsconfig.test.json' },
fetch: globalThis.fetch,
},
preset: 'ts-jest',
displayName: 'node',
Expand Down
6 changes: 3 additions & 3 deletions packages/instant-meilisearch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meilisearch/instant-meilisearch",
"version": "0.19.3",
"version": "0.21.1",
"private": false,
"description": "The search client to use Meilisearch with InstantSearch.",
"homepage": "https://github.com/meilisearch/meilisearch-js-plugins/tree/main/packages/instant-meilisearch",
Expand Down Expand Up @@ -50,7 +50,7 @@
"templates"
],
"dependencies": {
"meilisearch": "^0.41.0"
"meilisearch": "^0.44.0"
},
"devDependencies": {
"@babel/cli": "^7.22.9",
Expand Down Expand Up @@ -78,4 +78,4 @@
"tslib": "^2.6.1",
"typescript": "^4.9.5"
}
}
}
7 changes: 1 addition & 6 deletions packages/instant-meilisearch/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const ROLLUP_OPTIONS = [
// browser-friendly IIFE build
{
input: INPUT, // directory to transpilation of typescript
external: ['cross-fetch', 'cross-fetch/polyfill'],
output: {
name: 'window',
extend: true,
Expand All @@ -55,11 +54,7 @@ const ROLLUP_OPTIONS = [
},
plugins: [
...COMMON_PLUGINS,
nodeResolve({
mainFields: ['jsnext', 'browser', 'main'],
preferBuiltins: true,
browser: true,
}),
nodeResolve({ exportConditions: ['browser'] }),
commonjs(),
babel(),
// json(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,29 @@ describe('Geopoint adapter', () => {
expect(adaptedHits[1]._formatted._geoloc).toBeUndefined()
expect(adaptedHits[1]._formatted._geo).toBeUndefined()
})

test('hits with _geoloc field should not overwrite `objectID` property', () => {
const hits = [
{
objectID: '2',
id: 2,
_geo: {
lat: 1,
lng: 2,
},
_formatted: {
_geo: {
lat: 1,
lng: 2,
},
},
},
]

const adaptedHits = adaptGeoResponse(hits)

expect(adaptedHits[0]._geoloc).toEqual(hits[0]._geo)
expect(adaptedHits[0]._geo).toEqual(hits[0]._geo)
expect(adaptedHits[0].objectID).toEqual(hits[0].objectID)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ export function adaptGeoResponse(hits: any[]): Array<Record<string, any>> {
const objectID = `${i + Math.random() * 1000000}`
if (hits[i]._geo) {
hits[i]._geoloc = hits[i]._geo
hits[i].objectID = objectID
if (!hits[i].objectID) {
hits[i].objectID = objectID
}
}

if (hits[i]._formatted?._geo) {
hits[i]._formatted._geoloc = hits[i]._formatted._geo
hits[i]._formatted.objectID = objectID
if (!hits[i]._formatted.objectID) {
hits[i]._formatted.objectID = objectID
}
}
}
return hits
Expand Down
2 changes: 1 addition & 1 deletion packages/instant-meilisearch/src/package-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PACKAGE_VERSION = '0.19.3'
export const PACKAGE_VERSION = '0.21.1'
5 changes: 2 additions & 3 deletions packages/instant-meilisearch/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"suppressImplicitAnyIndexErrors": true,
"suppressImplicitAnyIndexErrors": true
},
"include": [
"./**/*"
],
"exclude": ["playgrounds/angular"]
]
}
5 changes: 0 additions & 5 deletions playgrounds/angular/.eslintrc.js

This file was deleted.

Loading