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

fix(deps): update module github.com/meilisearch/meilisearch-go to v0.26.0 #30

Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 17, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/meilisearch/meilisearch-go require minor v0.25.1 -> v0.26.0

Release Notes

meilisearch/meilisearch-go (github.com/meilisearch/meilisearch-go)

v0.26.0: 🐹

Compare Source

⚠️ Breaking changes: Enhanced Enumeration for Task Types & Statuses

The Meilisearch Go client has undergone a significant enhancement in how it handles task types and statuses. In prior versions, developers interfaced with tasks using generic strings. This methodology, while functional, lacked clarity and posed maintenance challenges.

TaskType and TaskStatus have transitioned from generic strings to definitive constants. This change augments code clarity, minimizes potential errors, and paves the way for smoother future updates.

Quick Exemple

// Before:
taskType := "documentDeletion"
...

// After:
taskType := meilisearch.TaskTypeDocumentDeletion

Real world example

// Before:
func Before() {
	resp, _ := meilisearchClient.GetTasks(&meilisearch.TasksQuery{
		Statuses: []string("enqueued", "processing"),
		Types: []string("documentDeletion", "documentAdditionOrUpdate"),
	})

	for _, task := range resp.Results {
		if task.Status == "processing" {
			// ...
		}

		if task.Type == "documentDeletion" {
			// ...
		}
	}
}

// After:
func After() {
	resp, _ := meilisearchClient.GetTasks(&meilisearch.TasksQuery{
		Statuses: []meilisearch.TaskStatus{
			meilisearch.TaskStatusEnqueued,
			meilisearch.TaskStatusProcessing,
		},
		Types: []meilisearch.TaskType{
			meilisearch.TaskTypeDocumentDeletion,
			meilisearch.TaskTypeDocumentAdditionOrUpdate,
		},
	})

	for _, task := range resp.Results {
		if task.Status == meilisearch.TaskStatusProcessing {
			// ...
		}

		if task.Type == meilisearch.TaskTypeDocumentDeletion {
			// ...
		}
	}
}

🚀 Enhancements

Thanks again to @​42atomys, @​curquiza, @​datbeohbbh, and @​tadejsv! 🎉


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@greenhat616 greenhat616 merged commit c5ce5f5 into main Dec 17, 2023
2 of 3 checks passed
@renovate renovate bot deleted the renovate/github.com-meilisearch-meilisearch-go-0.x branch December 17, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant