-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bump-meilisearch-v1.11.0
- Loading branch information
Showing
59 changed files
with
1,347 additions
and
2,404 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
const eslint = require("@eslint/js"); | ||
const tseslint = require("typescript-eslint"); | ||
const tsdoc = require("eslint-plugin-tsdoc"); | ||
const vitest = require("@vitest/eslint-plugin"); | ||
const globals = require("globals"); | ||
const prettier = require("eslint-config-prettier"); | ||
|
||
/** @type {import("eslint").Linter.Config[]} */ | ||
module.exports = [ | ||
{ | ||
ignores: ["dist/", "tests/env/", "coverage/", "playgrounds/", "docs/"], | ||
}, | ||
// Standard linting for js files | ||
{ | ||
files: ["**/*.js"], | ||
languageOptions: { sourceType: "script", globals: globals.node }, | ||
plugins: { eslint }, | ||
rules: eslint.configs.recommended.rules, | ||
}, | ||
// TypeScript linting for ts files | ||
...tseslint.configs.recommendedTypeChecked.map((config) => ({ | ||
...config, | ||
files: ["**/*.ts"], | ||
languageOptions: { | ||
...config.languageOptions, | ||
globals: { ...config.languageOptions?.globals, ...globals.node }, | ||
parserOptions: { | ||
...config.languageOptions?.parserOptions, | ||
project: "tsconfig.eslint.json", | ||
}, | ||
}, | ||
plugins: { ...config.plugins, tsdoc }, | ||
rules: { | ||
...config.rules, | ||
"tsdoc/syntax": "error", | ||
// @TODO: Remove the ones between "~~", adapt code | ||
// ~~ | ||
"@typescript-eslint/prefer-as-const": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-floating-promises": "off", | ||
// ~~ | ||
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }], | ||
// @TODO: Should be careful with this rule, should leave it be and disable | ||
// it within files where necessary with explanations | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
// argsIgnorePattern: https://eslint.org/docs/latest/rules/no-unused-vars#argsignorepattern | ||
// varsIgnorePattern: https://eslint.org/docs/latest/rules/no-unused-vars#varsignorepattern | ||
{ args: "all", argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, | ||
], | ||
// @TODO: Not recommended to disable rule, should instead disable locally | ||
// with explanation | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
}, | ||
})), | ||
// Vitest linting for test files | ||
{ | ||
files: ["tests/*.ts"], | ||
plugins: { vitest }, | ||
rules: { | ||
...vitest.configs.recommended.rules, | ||
// @TODO: Remove all of these rules and adapt code! | ||
"vitest/expect-expect": "off", | ||
"vitest/valid-title": "off", | ||
"vitest/valid-expect": "off", | ||
}, | ||
}, | ||
prettier, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "meilisearch", | ||
"version": "0.42.0", | ||
"version": "0.43.0", | ||
"description": "The Meilisearch JS client for Node.js and the browser.", | ||
"keywords": [ | ||
"meilisearch", | ||
|
@@ -23,26 +23,34 @@ | |
"types": "./dist/types/index.d.ts", | ||
"jsdelivr": "./dist/bundles/meilisearch.umd.js", | ||
"unpkg": "./dist/bundles/meilisearch.umd.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/types/index.d.ts", | ||
"browser": "./dist/bundles/meilisearch.umd.js", | ||
"import": "./dist/bundles/meilisearch.esm.js", | ||
"require": "./dist/bundles/meilisearch.cjs.js", | ||
"default": "./dist/bundles/meilisearch.umd.js" | ||
} | ||
}, | ||
"sideEffects": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/meilisearch/meilisearch-js" | ||
}, | ||
"scripts": { | ||
"playground:javascript": "yarn --cwd ./playgrounds/javascript && yarn --cwd ./playgrounds/javascript start", | ||
"clear_jest": "jest --clearCache", | ||
"cleanup": "shx rm -rf dist/", | ||
"build": "yarn cleanup && rollup -c && rollup -c --environment NODE_ENV:production", | ||
"build:docs": "typedoc", | ||
"watch": "yarn cleanup && rollup -c --watch", | ||
"postbuild": "yarn size && yarn typingsheader", | ||
"test": "yarn clear_jest && jest --runInBand --verbose", | ||
"test": "vitest run --coverage", | ||
"types:watch": "nodemon --config nodemon.json", | ||
"types": "yarn tsc", | ||
"test:env:browser": "yarn build && yarn --cwd tests/env/express && yarn --cwd tests/env/express test", | ||
"test:watch": "yarn clear_jest && yarn test --watch", | ||
"test:coverage": "yarn test --coverage", | ||
"test:ci": "yarn test --ci", | ||
"test:watch": "vitest watch", | ||
"test:coverage": "yarn test", | ||
"test:ci": "yarn test", | ||
"test:env": "yarn build && yarn test:env:nodejs && yarn test:env:esm && yarn test:env:node-ts", | ||
"test:env:node-ts": "yarn --cwd tests/env/typescript-node start", | ||
"test:env:nodejs": "yarn build && node tests/env/node/index.js && node tests/env/node/getting_started.js", | ||
|
@@ -53,8 +61,8 @@ | |
"style:fix": "yarn fmt:fix && yarn lint:fix", | ||
"fmt": "prettier -c ./**/*.{js,ts}", | ||
"fmt:fix": "prettier -w ./**/*.{js,ts}", | ||
"lint": "eslint --ext .js,.ts,.tsx .", | ||
"lint:fix": "eslint --ext .js,.ts,.tsx --fix .", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint --fix .", | ||
"typingsheader": "node scripts/build.js" | ||
}, | ||
"files": [ | ||
|
@@ -75,23 +83,21 @@ | |
"devDependencies": { | ||
"@babel/core": "^7.25.2", | ||
"@babel/preset-env": "^7.25.4", | ||
"@eslint/js": "^9.11.1", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"@rollup/plugin-commonjs": "28.0.0", | ||
"@rollup/plugin-json": "^6.1.0", | ||
"@rollup/plugin-node-resolve": "15.3.0", | ||
"@types/jest": "^29.5.11", | ||
"@typescript-eslint/eslint-plugin": "^6.19.0", | ||
"@typescript-eslint/parser": "^6.19.0", | ||
"@types/eslint__js": "^8.42.3", | ||
"@vitest/coverage-v8": "2.0.5", | ||
"@vitest/eslint-plugin": "^1.1.4", | ||
"@types/node": "^20.16.10", | ||
"brotli-size": "^4.0.0", | ||
"eslint": "^8.56.0", | ||
"eslint": "^9.11.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-jest": "^27.6.3", | ||
"eslint-plugin-tsdoc": "^0.2.17", | ||
"eslint-plugin-tsdoc": "^0.3.0", | ||
"globals": "^15.9.0", | ||
"gzip-size": "^6.0.0", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"jest-fetch-mock": "^3.0.3", | ||
"jest-watch-typeahead": "^2.2.2", | ||
"kleur": "^4.1.5", | ||
"lint-staged": "15.2.10", | ||
"nodemon": "^3.1.7", | ||
|
@@ -102,9 +108,10 @@ | |
"rollup-plugin-terser": "^7.0.0", | ||
"rollup-plugin-typescript2": "^0.36.0", | ||
"shx": "^0.3.2", | ||
"ts-jest": "^29.2.5", | ||
"typedoc": "^0.26.7", | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.4.5", | ||
"typescript-eslint": "^8.8.0", | ||
"vitest": "2.0.5" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const PACKAGE_VERSION = "0.42.0"; | ||
export const PACKAGE_VERSION = "0.43.0"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.