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

chore: release v4.49.1 #5163

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ jobs:
- *attach_workspace
- *install_yarn_version
- *restore_yarn_cache
- *run_yarn_install
- run:
name: Update dependencies
command: |
Expand Down Expand Up @@ -205,4 +204,4 @@ jobs:
command: |
git config --global user.email "instantsearch-bot@algolia.com"
git config --global user.name "InstantSearch"
yarn run release --yes --no-browse
yarn run shipjs prepare --yes --no-browse
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ yarn-error.log
/website/stories
/storybook/dist/*

# Unneeded changelogs
examples/*/*/CHANGELOG.md

# Test output
/junit
38 changes: 22 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

Hello and welcome to the contributing guide for InstantSearch.js. Thanks for considering participating in our project 🙇
Hello and welcome to the contributing guide for InstantSearch. Thanks for considering participating in our project 🙇

If this guide does not contain what you are looking for and thus prevents you from contributing, don't hesitate to leave a message on the [community forum](https://discourse.algolia.com/) or to [open an issue](https://github.com/algolia/instantsearch.js/issues).

Expand All @@ -19,7 +19,7 @@ If this guide does not contain what you are looking for and thus prevents you fr
- [Requirements](#requirements)
- [Launch the dev environment](#launch-the-dev-environment)
- [Folders of the project](#folders-of-the-project)
- [The source folder](#the-source-folder)
- [InstantSearch.js source folder](#instantsearchjs-source-folder)
- [Tests](#tests)
- [Unit tests](#unit-tests)
- [Type checks](#type-checks)
Expand Down Expand Up @@ -103,7 +103,7 @@ _Note that no new features will be developed or backported for the `vX` branches

To run this project, you will need:

- Node.js ≥ 8 (current stable version) – [nvm](https://github.com/creationix/nvm#install-script) is recommended
- Node.js ≥ 14 (current stable version) – [nvm](https://github.com/creationix/nvm#install-script) is recommended
- [Yarn](https://yarnpkg.com)

## Launch the dev environment
Expand All @@ -112,7 +112,8 @@ We use [Storybook](https://github.com/storybooks/storybook) to create stories fo

```sh
yarn
yarn dev
cd packages/instantsearch.js
yarn storybook
```

Go to <http://localhost:6006> for the widget playground.
Expand All @@ -122,18 +123,24 @@ Go to <http://localhost:6006> for the widget playground.
Here are the main files and folders of the project.

```
▸ .storybook/ << the storybook configuration source
▸ scripts/ << the scripts for maintaining the project
▸ src/ << the source of the library
▸ stories/ << the widget stories
▸ website/ << the website source
CHANGELOG.md << the autogenerated changelog (based on commits)
CONTRIBUTING.md << this file
package.json << the definition of the project
README.md << the introduction of the project
▸ examples/ << Examples, grouped per flavor
▸ packages/ << Packages of the project
▸ instantsearch.js/ << Source code of the library
▸ src/ << The source of the library
▸ .storybook/ << The storybook configuration
▸ stories/ << The widget stories
▸ test/ << Utilities for the tests
▸ mocks/ << Fake versions of the API, for testing
▸ testutils/ << Global utilities for the tests
▸ website/ << The generated website
▸ scripts/ << The scripts for maintaining the project
CHANGELOG.md << The autogenerated changelog (based on commits)
CONTRIBUTING.md << this file
package.json << The definition of the project
README.md << The introduction of the project
```

### The source folder
### InstantSearch.js source folder

```
▸ src/
Expand Down Expand Up @@ -177,8 +184,7 @@ yarn type-check
Since we still support `algoliasearch@3`, you should also type check against v3.x.

```sh
yarn remove @algolia/client-search
yarn add @types/algoliasearch@3.34.10 algoliasearch@3.35.1
./scripts/legacy/downgrade-algoliasearch-dependency.js
yarn type-check:v3
```

Expand Down
197 changes: 197 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
<p align="center">
<a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/">
<img alt="InstantSearch.js" src=".github/banner.png">
</a>

<p align="center">
InstantSearch.js is a JavaScript library for building performant and instant search experiences with <a href="https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository">Algolia</a>.
</p>
</p>

---

[![Version][version-svg]][package-url]
[![License][license-image]][license-url]
[![Build Status][ci-svg]][ci-url]
[![Pull reminders][pull-reminders-svg]][pull-reminders-url]

InstantSearch.js is a vanilla JavaScript library that lets you create an instant-search result experience using [Algolia][algolia-website]’s search API. It is part of the InstantSearch family:

**InstantSearch.js** | [React InstantSearch][react-instantsearch-github] | [Vue InstantSearch][vue-instantsearch-github] | [Angular InstantSearch][instantsearch-angular-github] | [React InstantSearch Native][react-instantsearch-github] | [InstantSearch Android][instantsearch-android-github] | [InstantSearch iOS][instantsearch-ios-github]

<details>
<summary><strong>Table of contents</strong></summary>

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Why](#why)
- [Getting started](#getting-started)
- [Installation](#installation)
- [TypeScript users](#typescript-users)
- [Documentation](#documentation)
- [Demos](#demos)
- [Playground](#playground)
- [Browser support](#browser-support)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

</details>

## Why

You should be using InstantSearch if you want to:

- Design search experiences with best practices
- Customize your components at will
- Remain independent from external frameworks

## Getting started

Using InstantSearch.js is as simple as adding this JavaScript code to your page:

```javascript
// 1. Instantiate the search
const search = instantsearch({
indexName: 'instant_search',
searchClient: algoliasearch('latency', '6be0576ff61c053d5f9a3225e2a90f76'),
});

search.addWidgets([
// 2. Create an interactive search box
instantsearch.widgets.searchBox({
container: '#searchbox',
placeholder: 'Search for products',
}),

// 3. Plug the search results into the product container
instantsearch.widgets.hits({
container: '#products',
templates: {
item: '{{#helpers.highlight}}{ "attribute": "name" }{{/helpers.highlight}}',
},
}),

// 4. Make the brands refinable
instantsearch.widgets.refinementList({
container: '#brand',
attribute: 'brand',
}),
]);

// 5. Start the search!
search.start();
```

<p align="center">
<a href="https://codesandbox.io/s/github/algolia/doc-code-samples/tree/master/InstantSearch.js/getting-started" title="Edit on CodeSandbox">
<img alt="Edit on CodeSandbox" src="https://codesandbox.io/static/img/play-codesandbox.svg">
</a>
</p>

To learn more about the library, follow the [getting started](https://www.algolia.com/doc/guides/building-search-ui/getting-started/js/) guide or check how to [add it to your own project](https://www.algolia.com/doc/guides/building-search-ui/installation/js/).

## Installation

```sh
npm install instantsearch.js algoliasearch
# or
yarn add instantsearch.js algoliasearch
```

### TypeScript users

To use InstantSearch.js in a TypeScript environment, depending on your [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript) version, you need to import different types.

>You still need to import these types even if you don't use InstantSearch.js with [`algoliasearch`](https://github.com/algolia/algoliasearch-client-javascript).

#### `algoliasearch` v4.x

This version uses types provided by both `algoliasearch` and `@algolia/client-search`.

```bash
yarn add algoliasearch@4 @algolia/client-search
```

#### `algoliasearch` v3.x

```bash
yarn add @types/algoliasearch@3
```

>v3.x is deprecated and will soon no longer be supported.

## Documentation

The documentation is available on the [Algolia website](https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/).

## Demos

| E-commerce | Media | Travel |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a href="https://instantsearchjs.netlify.com/examples/e-commerce/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/e-commerce-2c7ed6b6.png" width="250" alt="E-commerce demo preview"></a> | <a href="https://instantsearchjs.netlify.com/examples/media/"><img src="https://www.algolia.com/doc/assets/images/build-search-ui/demos/media-articles-abc153ab.png" width="250" alt="Media demo preview"></a> | <a href="https://instantsearchjs.netlify.com/examples/tourism/"><img src="https://instantsearchjs.netlify.com/examples/tourism/capture.png" width="250" alt="Tourism demo preview"></a> |

See more demos [on the website](https://www.algolia.com/doc/guides/building-search-ui/resources/demos/js/).

## Playground

You can get to know InstantSearch.js on [this playground](https://codesandbox.io/s/github/algolia/create-instantsearch-app/tree/templates/instantsearch.js).

Start by [adding widgets](https://www.algolia.com/doc/guides/building-search-ui/widgets/showcase/js/) and tweaking the display. Once you feel familiar with the library, we recommend following the [getting started guide](https://www.algolia.com/doc/guides/building-search-ui/getting-started/js/).

## Browser support

We support the **last two versions of major browsers** (Chrome, Edge, Firefox, Safari).

Please refer to the [browser support](https://www.algolia.com/doc/guides/building-search-ui/installation/js/#browser-support) section in the documentation to use InstantSearch.js on other browsers.

## Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/guides/building-search-ui/troubleshooting/faq/js/) where you will find answers for the most common issues and gotchas with the library.

## Contributing

We welcome all contributors, from casual to regular 💙

- **Bug report**. Is something not working as expected? [Send a bug report](https://github.com/algolia/instantsearch.js/issues/new?template=Bug_report.md).
- **Feature request**. Would you like to add something to the library? [Send a feature request](https://github.com/algolia/instantsearch.js/issues/new?template=Feature_request.md).
- **Documentation**. Did you find a typo in the doc? [Open an issue](https://github.com/algolia/instantsearch.js/issues/new) and we'll take care of it.
- **Development**. If you don't know where to start, you can check the open issues that are [tagged easy](https://github.com/algolia/instantsearch.js/issues?q=is%3Aopen+is%3Aissue+label%3A%22Difficulty%3A++++++%E2%9D%84%EF%B8%8F+easy%22), the [bugs](https://github.com/algolia/instantsearch.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22%E2%9D%A4+Bug%22) or [chores](https://github.com/algolia/instantsearch.js/issues?q=is%3Aissue+is%3Aopen+label%3A%22%E2%9C%A8+Chore%22).

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. Run the development mode: `cd packages/instantsearch.js && yarn storybook`
1. [Open the stories](http://localhost:6006)

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

## License

InstantSearch.js is [MIT licensed][license-url].

<!-- Badges -->

[version-svg]: https://img.shields.io/npm/v/instantsearch.js.svg?style=flat-square
[package-url]: https://npmjs.org/package/instantsearch.js
[ci-svg]: https://img.shields.io/circleci/project/github/algolia/instantsearch.js.svg?style=flat-square
[ci-url]: https://circleci.com/gh/algolia/instantsearch.js
[pull-reminders-svg]: https://img.shields.io/badge/pull%20reminders-✓-success.svg?style=flat-square
[pull-reminders-url]: https://pullreminders.com?ref=badge
[license-image]: http://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license-url]: LICENSE

<!-- Links -->

[algolia-website]: https://www.algolia.com/?utm_source=instantsearch.js&utm_campaign=repository
[react-instantsearch-github]: https://github.com/algolia/react-instantsearch/
[vue-instantsearch-github]: https://github.com/algolia/vue-instantsearch
[instantsearch-android-github]: https://github.com/algolia/instantsearch-android
[instantsearch-ios-github]: https://github.com/algolia/instantsearch-ios
[instantsearch-angular-github]: https://github.com/algolia/angular-instantsearch
8 changes: 4 additions & 4 deletions examples/js/calendar-widget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-instantsearch-calendar-widget",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"start": "parcel index.html --port 3000",
Expand All @@ -9,12 +9,12 @@
},
"dependencies": {
"algoliasearch": "4.11.0",
"instantsearch.js": "4.49.1"
"instantsearch.js": "4.49.2"
},
"devDependencies": {
"@babel/core": "7.12.0",
"parcel": "2.8.0",
"@parcel/packager-raw-url": "2.8.0",
"@parcel/transformer-webmanifest": "2.8.0"
"@parcel/transformer-webmanifest": "2.8.0",
"parcel": "2.8.0"
}
}
8 changes: 4 additions & 4 deletions examples/js/e-commerce/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-instantsearch-ecommerce",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"start": "parcel index.html --port 3000",
Expand All @@ -10,12 +10,12 @@
"browserslist": "last 2 versions, IE 11",
"dependencies": {
"algoliasearch": "4.11.0",
"instantsearch.js": "4.49.1"
"instantsearch.js": "4.49.2"
},
"devDependencies": {
"@babel/core": "7.12.0",
"parcel": "2.8.0",
"@parcel/packager-raw-url": "2.8.0",
"@parcel/transformer-webmanifest": "2.8.0"
"@parcel/transformer-webmanifest": "2.8.0",
"parcel": "2.8.0"
}
}
8 changes: 4 additions & 4 deletions examples/js/media/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-instantsearch-media",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"start": "parcel index.html --port 3000",
Expand All @@ -10,12 +10,12 @@
"dependencies": {
"algoliasearch": "4.11.0",
"date-fns": "2.25.0",
"instantsearch.js": "4.49.1"
"instantsearch.js": "4.49.2"
},
"devDependencies": {
"@babel/core": "7.12.0",
"parcel": "2.8.0",
"@parcel/packager-raw-url": "2.8.0",
"@parcel/transformer-webmanifest": "2.8.0"
"@parcel/transformer-webmanifest": "2.8.0",
"parcel": "2.8.0"
}
}
8 changes: 4 additions & 4 deletions examples/js/tourism/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example-instantsearch-tourism",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"start": "parcel index.html --port 3000",
Expand All @@ -9,12 +9,12 @@
},
"dependencies": {
"algoliasearch": "4.11.0",
"instantsearch.js": "4.49.1"
"instantsearch.js": "4.49.2"
},
"devDependencies": {
"@babel/core": "7.12.0",
"parcel": "2.8.0",
"@parcel/packager-raw-url": "2.8.0",
"@parcel/transformer-webmanifest": "2.8.0"
"@parcel/transformer-webmanifest": "2.8.0",
"parcel": "2.8.0"
}
}