Migrating to a turborepo architecture
bidoubiwa opened this issue · comments
What is turborepo
Turborepo is a high-performance build system for JavaScript and TypeScript codebases.
It manages and publishes multiple JavaScript/TypeScript packages from the same repository (mono repo).
Examples: supabase
Why do we need turbo
Currently, this repository contains only one package: instant-meilisearch
. Instant-meilisearch is a search client adapting the search requests from different tools, currently only instantsearch.js, to Meilisearch compatible search requests. Same for search responses.
Our ambition is to be able to also add other adapters. For example, to be able to use meilisearch with autocomplete.
In order to ease the development of these adapters, having them all in the same repo helps a lot. In this case, we can ensure that the adapter of autocomplete
works well with the instantMeilisearch
client without having to wait on publishing or creating symlinks between repos.
How does it impact our current structure
Our current architecture is not compliant to a turborepo architecture. This means that a lot of files are going to be moved around and configuration files will need to be added and updated.
Nonetheless, this should not impact at all our end user.
What needs to be done
- Change the name of the repo
- Move instant-meilisearch inside a
package
folder- source code
- tests
- readme
- package.json
- tsconfig
- Playgrounds:
- Ensure hot reloading still works
- javascript
- geosearch
- react
- angular
- vue
- Ensure linting works
- javascript
- geosearch
- react
- angular
- vue
- Ensure build works
- javascript
- geosearch
- react
- angular
- vue
- Ensure hot reloading still works
- Tests:
- Tests must be added in the instant-meilisearch package
- Update the contributing guide
- Create a new readme containing all the plugins
- Cleanup the package.json at the root
- Cleanup the package.json of instant-melisearch
- update tsconfig
- update eslint
- Add turborepo config
- Update CI's
- Update Publish CI
- Update dependabot CI to automatically accept package updates in the playgrounds