Skip to content

Commit a3d29a7

Browse files
committed
merge main
2 parents 671a2e5 + eb417b2 commit a3d29a7

23 files changed

+611
-756
lines changed

.github/release-draft-template.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ version-resolver:
88
- 'breaking-change'
99
default: patch
1010
categories:
11-
- title: 'Breaking changes ⚠️'
11+
- title: '⚠️ Breaking changes'
1212
label: 'breaking-change'
13+
- title: '🚀 Enhancements'
14+
label: 'enhancement'
15+
- title: '🐛 Bug Fixes'
16+
label: 'bug'
17+
- title: '🔒 Security'
18+
label: 'security'
1319
template: |
14-
## Changes
15-
1620
$CHANGES
1721
1822
Thanks again to $CONTRIBUTORS! 🎉

.github/workflows/pre-release-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ name: Pre-Release Tests
44
# Will only run for PRs and pushes to bump-meilisearch-v*
55
on:
66
push:
7-
branches: bump-meilisearch-v*
7+
branches: [bump-meilisearch-v*]
88
pull_request:
9-
branches: bump-meilisearch-v*
9+
branches: [bump-meilisearch-v*]
1010

1111
jobs:
1212
integration_tests:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
node: [ '12', '14' ]
16+
node: ["12", "14", "16"]
1717
name: integration-tests-against-rc (Node.js ${{ matrix.node }})
1818
steps:
1919
- uses: actions/checkout@v2
@@ -24,7 +24,7 @@ jobs:
2424
./node_modules
2525
key: ${{ hashFiles('yarn.lock') }}
2626
- name: Setup node
27-
uses: actions/setup-node@v1
27+
uses: actions/setup-node@v2
2828
with:
2929
node-version: ${{ matrix.node }}
3030
- name: print version

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- uses: actions/setup-node@v1
12+
- uses: actions/setup-node@v2
1313
with:
1414
node-version: 12
1515
registry-url: https://registry.npmjs.org/

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
node: [ '12', '14' ]
21+
node: ["12", "14", "16"]
2222
name: integration-tests (Node.js ${{ matrix.node }})
2323
steps:
2424
- uses: actions/checkout@v2
@@ -29,7 +29,7 @@ jobs:
2929
./node_modules
3030
key: ${{ hashFiles('yarn.lock') }}
3131
- name: Setup node
32-
uses: actions/setup-node@v1
32+
uses: actions/setup-node@v2
3333
with:
3434
node-version: ${{ matrix.node }}
3535
- name: print version
@@ -63,7 +63,7 @@ jobs:
6363
./node_modules
6464
key: ${{ hashFiles('yarn.lock') }}
6565
- name: Setup node
66-
uses: actions/setup-node@v1
66+
uses: actions/setup-node@v2
6767
- name: Install dependencies
6868
run: yarn --dev
6969
- name: Run style check

CONTRIBUTING.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ First of all, thank you for contributing to MeiliSearch! The goal of this docume
44

55
<!-- MarkdownTOC autolink="true" style="ordered" indent=" " -->
66

7-
- [Hacktoberfest](#hacktoberfest)
87
- [Assumptions](#assumptions)
98
- [How to Contribute](#how-to-contribute)
109
- [Development Workflow](#development-workflow)
@@ -13,16 +12,6 @@ First of all, thank you for contributing to MeiliSearch! The goal of this docume
1312

1413
<!-- /MarkdownTOC -->
1514

16-
## Hacktoberfest
17-
18-
It's [Hacktoberfest month](https://blog.meilisearch.com/contribute-hacktoberfest-2021/)! 🥳
19-
20-
🚀 If your PR gets accepted it will count into your participation to Hacktoberfest!
21-
22-
✅ To be accepted it has either to have been merged, approved or tagged with the `hacktoberfest-accepted` label.
23-
24-
🧐 Don't forget to check the [quality standards](https://hacktoberfest.digitalocean.com/resources/qualitystandards)! Low-quality PRs might get marked as `spam` or `invalid`, and will not count toward your participation in Hacktoberfest.
25-
2615
## Assumptions
2716

2817
1. **You're familiar with [GitHub](https://github.com) and the [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) (PR) workflow.**
@@ -45,7 +34,7 @@ It's [Hacktoberfest month](https://blog.meilisearch.com/contribute-hacktoberfest
4534

4635
To run this project, you will need:
4736

48-
- Node.js >= v12 and node < 15
37+
- Node.js >= v12 and node <= 16
4938
- Yarn
5039

5140

@@ -95,7 +84,7 @@ Some notes on GitHub PRs:
9584

9685
- [Convert your PR as a draft](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request) if your changes are a work in progress: no one will review it until you pass your PR as ready for review.<br>
9786
The draft PR can be very useful if you want to show that you are working on something and make your work visible.
98-
- The branch related to the PR must be **up-to-date with `main`** before merging. Fortunately, this project [integrates a bot](https://github.com/meilisearch/integration-guides/blob/main/guides/bors.md) to automatically enforce this requirement without the PR author having to do it manually.
87+
- The branch related to the PR must be **up-to-date with `main`** before merging. Fortunately, this project [integrates a bot](https://github.com/meilisearch/integration-guides/blob/main/resources/bors.md) to automatically enforce this requirement without the PR author having to do it manually.
9988
- All PRs must be reviewed and approved by at least one maintainer.
10089
- The PR title should be accurate and descriptive of the changes. The title of the PR will be indeed automatically added to the next [release changelogs](https://github.com/meilisearch/meilisearch-js/releases/).
10190

@@ -106,24 +95,24 @@ MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org
10695
### Automation to Rebase and Merge the PRs
10796

10897
This project integrates a bot that helps us manage pull requests merging.<br>
109-
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/bors.md)._
98+
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/resources/bors.md)._
11099

111100
### Automated Changelogs
112101

113102
This project integrates a tool to create automated changelogs.<br>
114-
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/release-drafter.md)._
103+
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/resources/release-drafter.md)._
115104

116105
### How to Publish the Release
117106

118-
⚠️ Before doing anything, make sure you got through the guide about [Releasing an Integration](https://github.com/meilisearch/integration-guides/blob/main/guides/integration-release.md).
107+
⚠️ Before doing anything, make sure you got through the guide about [Releasing an Integration](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md).
119108

120109
Make a PR modifying the file [`package.json`](/package.json) with the right version.
121110

122111
```javascript
123112
"version": "X.X.X",
124113
```
125114

126-
Once the changes are merged on `main`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/meilisearch-js/releases).
115+
Once the changes are merged on `main`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/meilisearch-js/releases): on this page, click on `Edit` (related to the draft release) > update the description (be sure you apply [these recommandations](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md#writting-the-release-description)) > when you are ready, click on `Publish release`.
127116

128117
GitHub Actions will be triggered and push the package to [npm](https://www.npmjs.com/package/meilisearch).
129118

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ See our [Documentation](https://docs.meilisearch.com/learn/tutorials/getting_sta
4343

4444
## 🔧 Installation
4545

46-
We only guarantee that the package works with `node` >= 12 and `node` < 15.
46+
We only guarantee that the package works with `node` >= 12 and `node` <= 16.
4747

4848
With `npm`:
4949

@@ -206,8 +206,7 @@ All the supported options are described in the [search parameters](https://docs.
206206
await index.search(
207207
'wonder',
208208
{
209-
attributesToHighlight: ['*'],
210-
filter: 'id >= 1'
209+
attributesToHighlight: ['*']
211210
}
212211
)
213212
```

bors.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
status = [
22
'linter-check',
33
'integration-tests (Node.js 12)',
4-
'integration-tests (Node.js 14)'
4+
'integration-tests (Node.js 14)',
5+
'integration-tests (Node.js 16)'
56
]
67
# 1 hour timeout
78
timeout-sec = 3600

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "meilisearch",
3-
"version": "0.22.2",
3+
"version": "0.22.3",
44
"description": "The MeiliSearch JS client for Node.js and the browser.",
55
"keywords": [
66
"meilisearch",
@@ -68,7 +68,7 @@
6868
"cross-fetch": "^3.1.4"
6969
},
7070
"devDependencies": {
71-
"@babel/preset-env": "^7.15.8",
71+
"@babel/preset-env": "^7.16.0",
7272
"@rollup/plugin-babel": "^5.3.0",
7373
"@rollup/plugin-commonjs": "21.0.1",
7474
"@rollup/plugin-json": "^4.0.2",
@@ -96,7 +96,7 @@
9696
"lint-staged": "11.1.2",
9797
"prettier": "^2.2.1",
9898
"pretty-bytes": "^5.6.0",
99-
"rollup": "^2.58.0",
99+
"rollup": "^2.59.0",
100100
"rollup-plugin-terser": "^7.0.0",
101101
"rollup-plugin-typescript2": "^0.30.0",
102102
"shx": "^0.3.2",

playgrounds/javascript/index.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<meta
6-
name="viewport"
7-
content="width=device-width, initial-scale=1, shrink-to-fit=no"
8-
/>
9-
<meta name="theme-color" content="#000000" />
10-
</head>
11-
<body>
123

4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
7+
<meta name="theme-color" content="#000000" />
8+
</head>
139

10+
<body>
11+
12+
13+
<h2 class="errors_title">Errors:</h2>
14+
<div class="errors"></div>
15+
16+
<h2>Movies index:</h2>
17+
<div class="indexes"></div>
18+
<h2>Search response:</h2>
19+
<div class="hits"></div>
20+
<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4"></script>
21+
<script src="/src/app.js"></script>
22+
</body>
1423

15-
<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4"></script>
16-
<script src="/src/app.js"></script>
17-
</body>
1824
</html>

playgrounds/javascript/src/app.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,31 @@ const addDataset = async () => {
3131
}
3232

3333
;(async () => {
34-
await addDataset()
3534
try {
36-
const index = await client.getOrCreateIndex('movies')
37-
38-
const resp = await index.search(
39-
'Moana',
35+
await addDataset()
36+
const indexes = await client.getIndexes()
37+
document.querySelector('.indexes').innerText = JSON.stringify(
38+
indexes,
39+
null,
40+
2
41+
)
42+
const resp = await client.index(uid).search(
43+
'',
4044
{
41-
limit: 1,
4245
attributesToHighlight: ['title'],
4346
},
4447
'POST'
4548
)
4649
console.log({ resp })
4750
console.log({ hit: resp.hits[0] })
51+
document.querySelector('.hits').innerText = JSON.stringify(
52+
resp.hits,
53+
null,
54+
2
55+
)
56+
document.querySelector('.errors_title').style.display = 'none'
4857
} catch (e) {
4958
console.error(e)
59+
document.querySelector('.errors').innerText = JSON.stringify(e, null, 2)
5060
}
5161
})()

0 commit comments

Comments
 (0)