Skip to content

Commit

Permalink
feat: rename packages (#5787)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Haroen Viaene <[email protected]>
  • Loading branch information
dhayab and Haroenv committed Aug 7, 2023
1 parent f9762ce commit c133170
Show file tree
Hide file tree
Showing 853 changed files with 1,560 additions and 88,917 deletions.
8 changes: 1 addition & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,7 @@ jobs:
- packages/instantsearch.js/dist
- packages/react-instantsearch/dist
- packages/react-instantsearch-core/dist
- packages/react-instantsearch-dom/dist
- packages/react-instantsearch-dom-maps/dist
- packages/react-instantsearch-native/dist
- packages/react-instantsearch-hooks/dist
- packages/react-instantsearch-hooks-web/dist
- packages/react-instantsearch-hooks-router-nextjs/dist
- packages/react-instantsearch-hooks-server/dist
- packages/react-instantsearch-router-nextjs/dist
- packages/vue-instantsearch/vue2
- packages/vue-instantsearch/vue3

Expand Down
7 changes: 2 additions & 5 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
"sandboxes": [
"instantsearchjs-es-template-pcw1k",
"github/algolia/instantsearch.js/tree/templates/react-instantsearch",
"/examples/react-hooks/default-theme",
"/examples/react/default-theme",
"/examples/vue/default-theme"
],
"buildCommand": "build --no-private --ignore *-maps --ignore *-native",
"packages": [
"packages/instantsearch.js",
"packages/react-instantsearch",
"packages/react-instantsearch-core",
"packages/react-instantsearch-dom",
"packages/react-instantsearch-hooks",
"packages/react-instantsearch-hooks-web",
"packages/react-instantsearch-hooks-server",
"packages/vue-instantsearch",
"packages/instantsearch.css"
],
Expand Down
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ coverage

# Non-lintable source files
## React-Native TypeScript wasn't supporting the mix of react 18 and 17
examples/react-hooks/react-native
examples/react/react-native
## Excluded from global typescript config
examples/react-hooks/next/next-env.d.ts
examples/react/next/next-env.d.ts
## templates that don't get installed
packages/create-instantsearch-app/src/templates
## test fixtures for codemods
Expand Down
39 changes: 5 additions & 34 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,7 @@ const config = {
caseInsensitive: true,
},
'newlines-between': 'always',
groups: [
'builtin',
'external',
'parent',
'sibling',
'index',
'type',
],
groups: ['builtin', 'external', 'parent', 'sibling', 'index', 'type'],
pathGroups: [
{
pattern: '@/**/*',
Expand Down Expand Up @@ -200,8 +193,8 @@ const config = {
},
{
files: [
'packages/react-instantsearch-hooks/**/*',
'packages/react-instantsearch-hooks-*/**/*',
'packages/react-instantsearch/**/*',
'packages/react-instantsearch-*/**/*',
],
rules: {
'@typescript-eslint/consistent-type-assertions': 'off',
Expand Down Expand Up @@ -250,25 +243,6 @@ const config = {
},
},
// Disable stricter rules introduced for the next versions of the libraries.
{
files: [
'packages/react-instantsearch-core/**/*',
'packages/react-instantsearch-dom/**/*',
],
rules: {
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/ban-types': 'off',
},
},
{
files: [
'examples/react-hooks/react-native/**/*.ts',
'examples/react-hooks/react-native/**/*.tsx',
],
parserOptions: {
project: 'examples/react-hooks/react-native/tsconfig.json',
},
},
{
files: [
'packages/instantsearch.js/src/**/*.ts',
Expand Down Expand Up @@ -373,12 +347,9 @@ const config = {
},
},
{
files: [
'packages/react-instantsearch-hooks-router-nextjs/__tests__/e2e/**/*',
],
files: ['packages/react-instantsearch-router-nextjs/__tests__/e2e/**/*'],
parserOptions: {
project:
'packages/react-instantsearch-hooks-router-nextjs/tsconfig.json',
project: 'packages/react-instantsearch-router-nextjs/tsconfig.json',
},
},
{
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ body:
<th>Sandboxes</th>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/instantsearch.js" target="_blank">InstantSearch.js</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/react-instantsearch" target="_blank">React InstantSearch</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/react-instantsearch-hooks" target="_blank">React InstantSearch Hooks</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/vue-instantsearch" target="_blank">Vue InstantSearch</a></td>
<td><a href="https://codesandbox.io/s/github/algolia/instantsearch.js/tree/templates/angular-instantsearch" target="_blank">Angular InstantSearch</a></td>
</tr>
Expand Down
15 changes: 4 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,8 @@ Here are the main files and folders of the project.
```
▸ examples/ << Examples, grouped per flavor
▸ packages/ << Packages of the project
▸ react-instantsearch/ << Bundled React InstantSearch library
▸ react-instantsearch-core/ << Runtime-independent React InstantSearch version
▸ react-instantsearch-dom/ << DOM-specific React InstantSearch version
▸ react-instantsearch-native/ << React Native-specific InstantSearch version
▸ react-instantsearch-dom-maps/ << DOM-specific React InstantSearch version with Google Maps
▸ react-instantsearch-hooks/ << React InstantSearch Hooks library
▸ react-instantsearch-hooks-web/ << DOM-specific React InstantSearch Hooks version
▸ react-instantsearch-hooks-server/ << Server-specific React InstantSearch Hooks version
▸ react-instantsearch/ << Bundled React InstantSearch library
▸ react-instantsearch-core/ << Runtime-independent React InstantSearch version
▸ instantsearch.js/ << The InstantSearch.js library
▸ tests/ << The test utilites
Expand Down Expand Up @@ -163,15 +156,15 @@ This monorepo has as goal to be used for all InstantSearch flavors and tools. To
8. replace commit messages which refer to issues/PRs with #xxx by also referencing the original repo: `git filter-branch --msg-filter 'sed -E "s/(#[[:digit:]]+)/algolia\/myproject\1/"' master..feat/import-myproject`
9. make any changes necessary to make the project work in the monorepo and commit those
10. make a pull request and _merge using rebase or merge_ (if you merge using squash the history will be lost)
11. manually tag and push the latest release commit from the imported project to let shipjs know which version to take into account during the next release process
11. manually tag and push the latest release commit from the imported project to let shipjs know which version to take into account during the next release process

## Tests

The general philosophy of testing in InstantSearch follows [Testing Library's guiding principles](https://testing-library.com/docs/guiding-principles):

>The more your tests resemble the way your software is used, the more confidence they can give you.
We rely on [Jest](https://jestjs.io/) for unit tests on all flavors of InstantSearch. In addition, [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) is used to test interactions in React InstantSearch Hooks.
We rely on [Jest](https://jestjs.io/) for unit tests on all flavors of InstantSearch. In addition, [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) is used to test interactions in React InstantSearch.

### How to write a test

Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,8 @@ It is part of the InstantSearch family which is designed for different platforms
| [`create-instantsearch-app`](packages/create-instantsearch-app) | [![create-instantsearch-app npm version](https://img.shields.io/npm/v/create-instantsearch-app.svg?style=flat-square)](https://npmjs.org/package/create-instantsearch-app) | Command-line utility to quickly bootstrap a project with InstantSearch |
| [`instantsearch.css`](packages/instantsearch.css) | [![instantsearch.css npm version](https://img.shields.io/npm/v/instantsearch.css.svg?style=flat-square)](https://npmjs.org/package/instantsearch.css) | Default CSS themes for InstantSearch |
| [`instantsearch.js`](packages/instantsearch.js) | [![instantsearch.js npm version](https://img.shields.io/npm/v/instantsearch.js.svg?style=flat-square)](https://npmjs.org/package/instantsearch.js) | InstantSearch.js |
| [`react-instantsearch`](packages/react-instantsearch) | [![react-instantsearch npm version](https://img.shields.io/npm/v/react-instantsearch.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch)| React InstantSearch (prefer using `react-instantsearch-hooks-web` instead) |
| [`react-instantsearch-core`](packages/react-instantsearch-core) | [![react-instantsearch-core npm version](https://img.shields.io/npm/v/react-instantsearch-core.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-core) | React InstantSearch Core (prefer using `react-instantsearch-hooks` instead) |
| [`react-instantsearch-dom`](packages/react-instantsearch-dom) | [![react-instantsearch-dom npm version](https://img.shields.io/npm/v/react-instantsearch-dom.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-dom) | React InstantSearch DOM (prefer using `react-instantsearch-hooks-web` instead) |
| [`react-instantsearch-dom-maps`](packages/react-instantsearch-dom-maps) | [![react-instantsearch-dom-maps npm version](https://img.shields.io/npm/v/react-instantsearch-dom-maps.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-dom-maps)| GeoSearch widget for React InstantSearch DOM |
| [`react-instantsearch-hooks`](packages/react-instantsearch-hooks) | [![react-instantsearch-hooks npm version](https://img.shields.io/npm/v/react-instantsearch-hooks?style=flat-square)](https://npmjs.org/package/react-instantsearch-hooks) | React InstantSearch Hooks |
| [`react-instantsearch-hooks-server`](packages/react-instantsearch-hooks-server) | [![react-instantsearch-hooks-server npm version](https://img.shields.io/npm/v/react-instantsearch-hooks-server.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-hooks-server) | Utilities to do server-side rendering with React InstantSearch Hooks |
| [`react-instantsearch-hooks-web`](packages/react-instantsearch-hooks-web) | [![react-instantsearch-hooks-web npm version](https://img.shields.io/npm/v/react-instantsearch-hooks-web.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-hooks-web) | React InstantSearch Hooks bundled with UI components |
| [`react-instantsearch-native`](packages/react-instantsearch-native) | [![react-instantsearch-native npm version](https://img.shields.io/npm/v/react-instantsearch-native.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-native) | React InstantSearch Native (prefer using `react-instantsearch-hooks` instead) |
| [`react-instantsearch`](packages/react-instantsearch) | [![react-instantsearch npm version](https://img.shields.io/npm/v/react-instantsearch.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch)| React InstantSearch bundled library |
| [`react-instantsearch-core`](packages/react-instantsearch-core) | [![react-instantsearch-core npm version](https://img.shields.io/npm/v/react-instantsearch-core.svg?style=flat-square)](https://npmjs.org/package/react-instantsearch-core) | Runtime-independent React InstantSearch version |
| [`vue-instantsearch`](packages/vue-instantsearch) | [![vue-instantsearch npm version](https://img.shields.io/npm/v/vue-instantsearch.svg?style=flat-square)](https://npmjs.org/package/vue-instantsearch) | Vue InstantSearch |

## Contributing
Expand All @@ -68,7 +62,7 @@ To start contributing to code, you need to:
1. [Fork the project](https://help.github.com/articles/fork-a-repo/)
1. [Clone the repository](https://help.github.com/articles/cloning-a-repository/)
1. Install the dependencies: `yarn`
1. [Pick a package to work on](#packages) and cd into it (e.g. `cd packages/react-instantsearch-hooks`)
1. [Pick a package to work on](#packages) and cd into it (e.g. `cd packages/react-instantsearch`)

Please read [our contribution process](CONTRIBUTING.md) to learn more.

Expand All @@ -87,7 +81,7 @@ InstantSearch is [MIT licensed][license-url].

[algolia-website]: https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository "Algolia's website"
[instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/?utm_source=instantsearch.js&utm_campaign=repository "InstantSearch.js documentation"
[react-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react-hooks/?utm_source=instantsearch.js&utm_campaign=repository "React InstantSearch documentation"
[react-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/?utm_source=instantsearch.js&utm_campaign=repository "React InstantSearch documentation"
[vue-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/vue/?utm_source=instantsearch.js&utm_campaign=repository "Vue InstantSearch documentation"
[angular-instantsearch-docs]: https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/angular/?utm_source=instantsearch.js&utm_campaign=repository "Angular InstantSearch documentation"
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
Expand Down
7 changes: 0 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ module.exports = (api) => {
],
],
},
{
test: 'packages/react-instantsearch-dom-maps',
plugins: clean([
'@babel/plugin-syntax-dynamic-import',
!isRollup && 'babel-plugin-dynamic-import-node',
]),
},
],
// jsx is transpiled, so the comment should no longer be present in the final files
shouldPrintComment: (value) => value !== '* @jsx h ',
Expand Down
26 changes: 1 addition & 25 deletions bundlesize.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,14 @@
"path": "./packages/instantsearch.js/dist/instantsearch.development.js",
"maxSize": "165 kB"
},
{
"path": "packages/react-instantsearch/dist/umd/Core.min.js",
"maxSize": "3.50 kB"
},
{
"path": "packages/react-instantsearch/dist/umd/Connectors.min.js",
"maxSize": "26 kB"
},
{
"path": "packages/react-instantsearch/dist/umd/Dom.min.js",
"maxSize": "44.50 kB"
},
{
"path": "packages/react-instantsearch-core/dist/umd/ReactInstantSearchCore.min.js",
"maxSize": "29.50 kB"
},
{
"path": "packages/react-instantsearch-hooks/dist/umd/ReactInstantSearchHooks.min.js",
"maxSize": "46.25 kB"
},
{
"path": "packages/react-instantsearch-hooks-web/dist/umd/ReactInstantSearchHooksDOM.min.js",
"path": "packages/react-instantsearch/dist/umd/ReactInstantSearch.min.js",
"maxSize": "56 kB"
},
{
"path": "packages/react-instantsearch-dom/dist/umd/ReactInstantSearchDOM.min.js",
"maxSize": "44.75 kB"
},
{
"path": "packages/react-instantsearch-dom-maps/dist/umd/ReactInstantSearchDOMMaps.min.js",
"maxSize": "7.25 kB"
},
{
"path": "packages/vue-instantsearch/vue2/umd/index.js",
"maxSize": "63 kB"
Expand Down
30 changes: 0 additions & 30 deletions examples/react-hooks/default-theme/index.html

This file was deleted.

23 changes: 0 additions & 23 deletions examples/react-hooks/default-theme/package.json

This file was deleted.

Loading

0 comments on commit c133170

Please sign in to comment.