Skip to content

Commit c5be7e2

Browse files
authored
Merge branch 'main' into bump-meilisearch-v1.11.0
2 parents c8783db + 0204a2d commit c5be7e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2643
-2812
lines changed

.editorconfig

Lines changed: 0 additions & 22 deletions
This file was deleted.

.eslintrc.js

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,77 +5,77 @@ module.exports = {
55
env: { es2022: true, browser: true, node: true },
66
// Standard linting for pure javascript files
77
extends: [
8-
'eslint:recommended',
8+
"eslint:recommended",
99
// Disables all style rules (must always be put last, so it overrides anything before it)
1010
// https://prettier.io/docs/en/integrating-with-linters.html
1111
// https://github.com/prettier/eslint-config-prettier
12-
'prettier',
12+
"prettier",
1313
],
1414
overrides: [
1515
// TypeScript linting for TypeScript files
1616
{
17-
files: '*.ts',
17+
files: "*.ts",
1818
plugins: [
19-
'@typescript-eslint',
19+
"@typescript-eslint",
2020
// https://tsdoc.org/
21-
'eslint-plugin-tsdoc',
21+
"eslint-plugin-tsdoc",
2222
],
23-
parser: '@typescript-eslint/parser',
24-
parserOptions: { project: 'tsconfig.eslint.json' },
23+
parser: "@typescript-eslint/parser",
24+
parserOptions: { project: "tsconfig.eslint.json" },
2525
extends: [
26-
'plugin:@typescript-eslint/recommended-type-checked',
27-
'prettier',
26+
"plugin:@typescript-eslint/recommended-type-checked",
27+
"prettier",
2828
],
2929
rules: {
30-
'tsdoc/syntax': 'error',
30+
"tsdoc/syntax": "error",
3131
// @TODO: Remove the ones between "~~", adapt code
3232
// ~~
33-
'@typescript-eslint/prefer-as-const': 'off',
34-
'@typescript-eslint/ban-ts-comment': 'off',
35-
'@typescript-eslint/no-unsafe-call': 'off',
36-
'@typescript-eslint/no-unsafe-member-access': 'off',
37-
'@typescript-eslint/no-unsafe-return': 'off',
38-
'@typescript-eslint/no-unsafe-assignment': 'off',
39-
'@typescript-eslint/no-unsafe-argument': 'off',
40-
'@typescript-eslint/no-floating-promises': 'off',
33+
"@typescript-eslint/prefer-as-const": "off",
34+
"@typescript-eslint/ban-ts-comment": "off",
35+
"@typescript-eslint/no-unsafe-call": "off",
36+
"@typescript-eslint/no-unsafe-member-access": "off",
37+
"@typescript-eslint/no-unsafe-return": "off",
38+
"@typescript-eslint/no-unsafe-assignment": "off",
39+
"@typescript-eslint/no-unsafe-argument": "off",
40+
"@typescript-eslint/no-floating-promises": "off",
4141
// ~~
42-
'@typescript-eslint/array-type': ['warn', { default: 'array-simple' }],
42+
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
4343
// @TODO: Should be careful with this rule, should leave it be and disable
4444
// it within files where necessary with explanations
45-
'@typescript-eslint/no-explicit-any': 'off',
46-
'@typescript-eslint/no-unused-vars': [
47-
'error',
45+
"@typescript-eslint/no-explicit-any": "off",
46+
"@typescript-eslint/no-unused-vars": [
47+
"error",
4848
// argsIgnorePattern: https://eslint.org/docs/latest/rules/no-unused-vars#argsignorepattern
4949
// varsIgnorePattern: https://eslint.org/docs/latest/rules/no-unused-vars#varsignorepattern
50-
{ args: 'all', argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
50+
{ args: "all", argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
5151
],
5252
// @TODO: Not recommended to disable rule, should instead disable locally
5353
// with explanation
54-
'@typescript-eslint/ban-ts-ignore': 'off',
54+
"@typescript-eslint/ban-ts-ignore": "off",
5555
},
5656
},
5757
// Jest linting for test files
5858
{
59-
files: 'tests/*.ts',
60-
plugins: ['jest'],
59+
files: "tests/*.ts",
60+
plugins: ["jest"],
6161
env: {
6262
// @TODO: Jasmine is not meant to be used in Jest tests,
6363
// there's even a rule for it in plugin:jest/recommended
6464
jasmine: true,
6565
jest: true,
66-
'jest/globals': true,
66+
"jest/globals": true,
6767
},
68-
extends: ['plugin:jest/recommended', 'prettier'],
68+
extends: ["plugin:jest/recommended", "prettier"],
6969
// @TODO: Remove all of these rules and adapt code!
7070
rules: {
71-
'jest/no-disabled-tests': 'off',
72-
'jest/expect-expect': 'off',
73-
'jest/no-conditional-expect': 'off',
74-
'jest/valid-title': 'off',
75-
'jest/no-jasmine-globals': 'off',
76-
'jest/valid-expect-in-promise': 'off',
77-
'jest/valid-expect': 'off',
78-
'jest/no-alias-methods': 'off',
71+
"jest/no-disabled-tests": "off",
72+
"jest/expect-expect": "off",
73+
"jest/no-conditional-expect": "off",
74+
"jest/valid-title": "off",
75+
"jest/no-jasmine-globals": "off",
76+
"jest/valid-expect-in-promise": "off",
77+
"jest/valid-expect": "off",
78+
"jest/no-alias-methods": "off",
7979
},
8080
},
8181
],

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ updates:
2121
- dependencies
2222
versioning-strategy: increase
2323
rebase-strategy: disabled
24+
groups:
25+
production-dependencies:
26+
dependency-type: "production"

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// https://prettier.io/docs/en/options.html
22

33
module.exports = {
4-
plugins: ['./node_modules/prettier-plugin-jsdoc/dist/index.js'],
4+
plugins: ["./node_modules/prettier-plugin-jsdoc/dist/index.js"],
55
// https://github.com/hosseinmd/prettier-plugin-jsdoc#tsdoc
66
tsdoc: true,
77
};

jest.config.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
/** @type {import('jest').Config} */
1+
/** @type {import("jest").Config} */
22
const config = {
3-
rootDir: '.',
4-
testMatch: ['<rootDir>/tests/**/*.ts?(x)'],
3+
rootDir: ".",
4+
testMatch: ["<rootDir>/tests/**/*.ts?(x)"],
55
verbose: true,
6-
testPathIgnorePatterns: ['meilisearch-test-utils', 'env'],
6+
testPathIgnorePatterns: ["meilisearch-test-utils", "env"],
77
collectCoverage: true,
88
coverageThreshold: {
99
global: {
10-
'ts-jest': {
11-
tsConfig: '<rootDir>/tsconfig.json',
10+
"ts-jest": {
11+
tsConfig: "<rootDir>/tsconfig.json",
1212
},
1313
},
1414
},
1515
watchPlugins: [
16-
'jest-watch-typeahead/filename',
17-
'jest-watch-typeahead/testname',
16+
"jest-watch-typeahead/filename",
17+
"jest-watch-typeahead/testname",
1818
],
1919
projects: [
2020
{
21-
preset: 'ts-jest',
22-
displayName: 'browser',
23-
testEnvironment: 'jsdom',
24-
testMatch: ['<rootDir>/tests/**/*.ts?(x)'],
21+
preset: "ts-jest",
22+
displayName: "browser",
23+
testEnvironment: "jsdom",
24+
testMatch: ["<rootDir>/tests/**/*.ts?(x)"],
2525
testPathIgnorePatterns: [
26-
'meilisearch-test-utils',
27-
'env/',
28-
'token.test.ts',
26+
"meilisearch-test-utils",
27+
"env/",
28+
"token.test.ts",
2929
],
3030
// make sure built-in Node.js fetch doesn't get replaced for consistency
3131
globals: { fetch: global.fetch, AbortController: global.AbortController },
3232
},
3333
{
34-
preset: 'ts-jest',
35-
displayName: 'node',
36-
testEnvironment: 'node',
37-
testMatch: ['<rootDir>/tests/**/*.ts?(x)'],
38-
testPathIgnorePatterns: ['meilisearch-test-utils', 'env/'],
34+
preset: "ts-jest",
35+
displayName: "node",
36+
testEnvironment: "node",
37+
testMatch: ["<rootDir>/tests/**/*.ts?(x)"],
38+
testPathIgnorePatterns: ["meilisearch-test-utils", "env/"],
3939
},
4040
],
4141
};

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
"@babel/core": "^7.25.2",
7777
"@babel/preset-env": "^7.25.4",
7878
"@rollup/plugin-babel": "^6.0.4",
79-
"@rollup/plugin-commonjs": "25.0.2",
80-
"@rollup/plugin-json": "^6.0.0",
81-
"@rollup/plugin-node-resolve": "15.1.0",
79+
"@rollup/plugin-commonjs": "28.0.0",
80+
"@rollup/plugin-json": "^6.1.0",
81+
"@rollup/plugin-node-resolve": "15.3.0",
8282
"@types/jest": "^29.5.11",
8383
"@typescript-eslint/eslint-plugin": "^6.19.0",
8484
"@typescript-eslint/parser": "^6.19.0",
@@ -94,16 +94,16 @@
9494
"jest-watch-typeahead": "^2.2.2",
9595
"kleur": "^4.1.5",
9696
"lint-staged": "15.2.10",
97-
"nodemon": "^2.0.16",
97+
"nodemon": "^3.1.7",
9898
"prettier": "^3.3.3",
9999
"prettier-plugin-jsdoc": "^1.3.0",
100100
"pretty-bytes": "^5.6.0",
101-
"rollup": "^2.79.1",
101+
"rollup": "^4.22.5",
102102
"rollup-plugin-terser": "^7.0.0",
103103
"rollup-plugin-typescript2": "^0.36.0",
104104
"shx": "^0.3.2",
105105
"ts-jest": "^29.2.5",
106-
"typedoc": "^0.25.13",
106+
"typedoc": "^0.26.7",
107107
"typescript": "^5.4.5"
108108
},
109109
"packageManager": "[email protected]"

playgrounds/javascript/src/app.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { MeiliSearch } from '../../../src';
1+
import { MeiliSearch } from "../../../src";
22

33
const config = {
4-
host: 'http://127.0.0.1:7700',
5-
apiKey: 'masterKey',
4+
host: "http://127.0.0.1:7700",
5+
apiKey: "masterKey",
66
};
77

88
const client = new MeiliSearch(config);
9-
const indexUid = 'movies';
9+
const indexUid = "movies";
1010

1111
const addDataset = async () => {
1212
await client.deleteIndex(indexUid);
@@ -16,16 +16,16 @@ const addDataset = async () => {
1616
const documents = await client.index(indexUid).getDocuments();
1717

1818
const dataset = [
19-
{ id: 1, title: 'Carol', genres: ['Romance', 'Drama'] },
20-
{ id: 2, title: 'Wonder Woman', genres: ['Action', 'Adventure'] },
21-
{ id: 3, title: 'Life of Pi', genres: ['Adventure', 'Drama'] },
19+
{ id: 1, title: "Carol", genres: ["Romance", "Drama"] },
20+
{ id: 2, title: "Wonder Woman", genres: ["Action", "Adventure"] },
21+
{ id: 3, title: "Life of Pi", genres: ["Adventure", "Drama"] },
2222
{
2323
id: 4,
24-
title: 'Mad Max: Fury Road',
25-
genres: ['Adventure', 'Science Fiction'],
24+
title: "Mad Max: Fury Road",
25+
genres: ["Adventure", "Science Fiction"],
2626
},
27-
{ id: 5, title: 'Moana', genres: ['Fantasy', 'Action'] },
28-
{ id: 6, title: 'Philadelphia', genres: ['Drama'] },
27+
{ id: 5, title: "Moana", genres: ["Fantasy", "Action"] },
28+
{ id: 6, title: "Philadelphia", genres: ["Drama"] },
2929
];
3030
if (documents.results.length === 0) {
3131
const { taskUid } = await client.index(indexUid).addDocuments(dataset);
@@ -37,24 +37,24 @@ const addDataset = async () => {
3737
try {
3838
await addDataset();
3939
const indexes = await client.getRawIndexes();
40-
document.querySelector('.indexes').innerText = JSON.stringify(
40+
document.querySelector(".indexes").innerText = JSON.stringify(
4141
indexes,
4242
null,
4343
1,
4444
);
45-
const resp = await client.index(indexUid).search('', {
46-
attributesToHighlight: ['title'],
45+
const resp = await client.index(indexUid).search("", {
46+
attributesToHighlight: ["title"],
4747
});
4848
console.log({ resp });
4949
console.log({ hit: resp.hits[0] });
50-
document.querySelector('.hits').innerText = JSON.stringify(
50+
document.querySelector(".hits").innerText = JSON.stringify(
5151
resp.hits.map((hit) => hit.title),
5252
null,
5353
1,
5454
);
55-
document.querySelector('.errors_title').style.display = 'none';
55+
document.querySelector(".errors_title").style.display = "none";
5656
} catch (e) {
5757
console.error(e);
58-
document.querySelector('.errors').innerText = JSON.stringify(e, null, 1);
58+
document.querySelector(".errors").innerText = JSON.stringify(e, null, 1);
5959
}
6060
})();

0 commit comments

Comments
 (0)