Skip to content

Format everything with prettier #1862

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Bug Report 🐞
about: Create a report to help us improve.
title: ''
labels: ''
assignees: ''
title: ""
labels: ""
assignees: ""
---

<!-- This is not an exhaustive model but a help. No step is mandatory. -->
Expand All @@ -21,6 +21,7 @@ What happened.
If applicable, add screenshots or logs to help explain your problem.

**Environment (please complete the following information):**

- OS: [e.g. Debian GNU/Linux]
- Meilisearch version: [e.g. v.0.20.0]
- meilisearch-js version: [e.g v0.18.2]
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Feature Request & Enhancement 💡
about: Suggest a new idea for the project.
title: ''
labels: ''
assignees: ''
title: ""
labels: ""
assignees: ""
---

<!-- This is not an exhaustive model but a help. No step is mandatory. -->
Expand Down
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'monthly'
interval: "monthly"
labels:
- 'skip-changelog'
- 'dependencies'
- "skip-changelog"
- "dependencies"
rebase-strategy: disabled

- package-ecosystem: npm
directory: '/'
directory: "/"

schedule:
interval: 'monthly'
time: '04:00'
interval: "monthly"
time: "04:00"
open-pull-requests-limit: 10
labels:
- skip-changelog
Expand Down
42 changes: 21 additions & 21 deletions .github/release-draft-template.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name-template: 'v$RESOLVED_VERSION 🌻'
tag-template: 'v$RESOLVED_VERSION'
name-template: "v$RESOLVED_VERSION 🌻"
tag-template: "v$RESOLVED_VERSION"
exclude-labels:
- 'skip-changelog'
- "skip-changelog"
version-resolver:
minor:
labels:
- 'breaking-change'
- "breaking-change"
default: patch
categories:
- title: '⚠️ Breaking changes'
label: 'breaking-change'
- title: '🚀 Enhancements'
label: 'enhancement'
- title: '🐛 Bug Fixes'
label: 'bug'
- title: '🔒 Security'
label: 'security'
- title: '⚙️ Maintenance/misc'
- title: "⚠️ Breaking changes"
label: "breaking-change"
- title: "🚀 Enhancements"
label: "enhancement"
- title: "🐛 Bug Fixes"
label: "bug"
- title: "🔒 Security"
label: "security"
- title: "⚙️ Maintenance/misc"
label:
- 'maintenance'
- 'documentation'
- "maintenance"
- "documentation"
template: |
$CHANGES

Thanks again to $CONTRIBUTORS! 🎉
no-changes-template: 'Changes are coming soon 😎'
sort-direction: 'ascending'
no-changes-template: "Changes are coming soon 😎"
sort-direction: "ascending"
replacers:
- search: '/(?:and )?@dependabot-preview(?:\[bot\])?,?/g'
replace: ''
replace: ""
- search: '/(?:and )?@dependabot(?:\[bot\])?,?/g'
replace: ''
- search: '/(?:and )?@meili-bot,?/g'
replace: ''
replace: ""
- search: "/(?:and )?@meili-bot,?/g"
replace: ""
16 changes: 8 additions & 8 deletions .github/workflows/meilisearch-prototype-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: Meilisearch prototype tests

env:
HUSKY: 0
NODE_OPTIONS: '--trace-warnings'
NODE_OPTIONS: "--trace-warnings"

# Will only run for PRs and pushes to *-beta
on:
pull_request:
branches:
- 'prototype-beta/**'
- "prototype-beta/**"
push:
branches:
- 'prototype-beta/**'
- "prototype-beta/**"

jobs:
meilisearch-version:
Expand All @@ -35,18 +35,18 @@ jobs:
echo "meilisearch_version=$MEILISEARCH_VERSION" >> $GITHUB_OUTPUT
integration_tests:
runs-on: ubuntu-latest
needs: ['meilisearch-version']
needs: ["meilisearch-version"]
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
MEILI_MASTER_KEY: "masterKey"
MEILI_NO_ANALYTICS: "true"
ports:
- '7700:7700'
- "7700:7700"
strategy:
matrix:
node: ['18', '20', '22']
node: ["18", "20", "22"]
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v4
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Pre-Release Tests

env:
HUSKY: 0
NODE_OPTIONS: '--trace-warnings'
NODE_OPTIONS: "--trace-warnings"

# Will only run for PRs and pushes to bump-meilisearch-v*
on:
pull_request:
branches:
- 'bump-meilisearch-v**'
- 'pre-release-beta/**'
- "bump-meilisearch-v**"
- "pre-release-beta/**"
push:
branches:
- 'bump-meilisearch-v**'
- 'pre-release-beta/**'
- "bump-meilisearch-v**"
- "pre-release-beta/**"

jobs:
meilisearch-version:
Expand All @@ -32,18 +32,18 @@ jobs:
integration_tests:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || startsWith(github.base_ref, 'bump-meilisearch-v') || startsWith(github.base_ref, 'pre-release-beta')
needs: ['meilisearch-version']
needs: ["meilisearch-version"]
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
MEILI_MASTER_KEY: "masterKey"
MEILI_NO_ANALYTICS: "true"
ports:
- '7700:7700'
- "7700:7700"
strategy:
matrix:
node: ['18', '20', '22']
node: ["18", "20", "22"]
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: 'yarn'
cache: "yarn"
- name: Check release validity
run: sh .github/scripts/check-release.sh
- name: Check tag format
Expand All @@ -25,12 +25,12 @@ jobs:
- name: Build meilisearch-js
run: yarn build
- name: Publish with latest tag
if: '!github.event.release.prerelease'
if: !github.event.release.prerelease
run: npm publish .
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish with beta tag
if: 'github.event.release.prerelease'
if: github.event.release.prerelease
run: npm publish . --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
20 changes: 8 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests

env:
HUSKY: 0
NODE_OPTIONS: '--trace-warnings'
NODE_OPTIONS: "--trace-warnings"

on:
pull_request:
Expand All @@ -29,22 +29,22 @@ jobs:
meilisearch:
image: getmeili/meilisearch:latest
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
MEILI_MASTER_KEY: "masterKey"
MEILI_NO_ANALYTICS: "true"
ports:
- '7700:7700'
- "7700:7700"
strategy:
fail-fast: false
matrix:
node: ['18', '20', '22']
node: ["18", "20", "22"]
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "yarn"
- name: Install dependencies
run: yarn --dev
- name: Run tests
Expand Down Expand Up @@ -72,15 +72,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
cache: "yarn"
- name: Install dependencies
run: yarn --dev
- name: Run code style check
run: yarn style
- name: Run yaml style check
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
types_tests:
runs-on: ubuntu-latest
name: types-check
Expand All @@ -90,7 +86,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
cache: "yarn"
- name: Install dependencies
run: yarn --dev
- name: Build project
Expand Down
6 changes: 1 addition & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
node_modules
dist
/tests/env
/coverage
*.md
tests/env/browser/meilisearch.umd.js
9 changes: 0 additions & 9 deletions .yamllint.yml

This file was deleted.

26 changes: 14 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
4. Review the [Development Workflow](#development-workflow) section that describes the steps to maintain the repository.
5. Make the changes on your branch.
6. [Submit the branch as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch of the main meilisearch-js repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer.<br>
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/meilisearch-js/releases/).
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/meilisearch-js/releases/).

## Development Workflow

Expand Down Expand Up @@ -128,7 +128,7 @@ Make a PR modifying the following files with the right version:
[`src/package-version`](/src/package-version.ts)

```javascript
export const PACKAGE_VERSION = 'X.X.X'
export const PACKAGE_VERSION = "X.X.X";
```

#### Github publish
Expand All @@ -148,18 +148,20 @@ This package is able to create multiple types of betas:
Here are the steps to release a beta version of this package depending on its type:

1. Create a new branch containing the changes with the correct name format following these rules:
- `package beta`: create a branch `beta/xx-xx` with the context of your beta.
Example: `beta/refactor`.
- Meilisearch `pre-release beta`: create a branch originating from `bump-meilisearch-v*.*.*` named `pre-release-beta/v*.*.*`. <br>
Example: `pre-release-beta/v0.30.0`
- Meilisearch `prototype beta`: create a branch `prototype-beta/xx-xx`. Where `xxx` has the same name as the docker image containing the prototype.
Example: If the [docker image](https://hub.docker.com/r/getmeili/meilisearch/tags) is named: `prototype-multi-search-0`, the branch should be named: `prototype-beta/prototype-multi-search`

- `package beta`: create a branch `beta/xx-xx` with the context of your beta.
Example: `beta/refactor`.
- Meilisearch `pre-release beta`: create a branch originating from `bump-meilisearch-v*.*.*` named `pre-release-beta/v*.*.*`. <br>
Example: `pre-release-beta/v0.30.0`
- Meilisearch `prototype beta`: create a branch `prototype-beta/xx-xx`. Where `xxx` has the same name as the docker image containing the prototype.
Example: If the [docker image](https://hub.docker.com/r/getmeili/meilisearch/tags) is named: `prototype-multi-search-0`, the branch should be named: `prototype-beta/prototype-multi-search`

2. [Update the version](#version-update) following the correct format (X are numbers):
- package and prototype beta: `X.X.X-***.X`
example: `0.2.0-new-feature.0`
- pre-release beta: `X.X.X-vX.X.X-pre-release.X`
example: `0.2.0-v0.30.0-pre-release.0`

- package and prototype beta: `X.X.X-***.X`
example: `0.2.0-new-feature.0`
- pre-release beta: `X.X.X-vX.X.X-pre-release.X`
example: `0.2.0-v0.30.0-pre-release.0`

3. Commit and push your code to the newly created branch (step 1).

Expand Down
Loading