Skip to content

chore: remove prerelease tags and main branch target #3524

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

Merged
merged 6 commits into from
Aug 14, 2024
Merged
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
48 changes: 7 additions & 41 deletions clients/algoliasearch-client-javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,59 +37,25 @@ To get started, you first need to install algoliasearch (or any other available
All of our clients comes with type definition, and are available for both browser and node environments.

```bash
yarn add algoliasearch@beta
yarn add algoliasearch
# or
npm install algoliasearch@beta
```

Or use a specific package:

```bash
yarn add @algolia/client-search@beta
# or
npm install @algolia/client-search@beta
npm install algoliasearch
```

Without a package manager

Add the following JavaScript snippet to the <head> of your website:

```html
<script src="https://cdn.jsdelivr.net/npm/algoliasearch@beta/dist/algoliasearch.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch.umd.min.js"></script>
```

You can now import the Algolia API client in your project and play with it.

```js
import { searchClient } from '@algolia/client-search';

const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

// Add a new record to your Algolia index
const response = await client.saveObject({
indexName: '<YOUR_INDEX_NAME>',
body: { objectID: 'id', test: 'val' },
});

// use typed response
console.log(response);

// Poll the task status to know when it has been indexed
await client.waitForTask({ indexName: '<YOUR_INDEX_NAME>', taskID: response.taskID });

// Fetch search results, with typo tolerance
const response = await client.search({
requests: [
{
indexName: '<YOUR_INDEX_NAME>',
query: '<YOUR_QUERY>',
hitsPerPage: 50,
},
],
});

// use typed response
console.log(response);
import { algoliasearch } from 'algoliasearch';

const client = liteClient('YOUR_APP_ID', 'YOUR_API_KEY');
```

For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.
Expand All @@ -100,4 +66,4 @@ Encountering an issue? Before reaching out to support, we recommend heading to o

## 📄 License

The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
First, install Algolia PHP API Client via the [composer](https://getcomposer.org/) package manager:

```bash
composer require algolia/algoliasearch-client-php "^4.0@beta"
composer require algolia/algoliasearch-client-php "^4.0"
```

You can now import the Algolia API client in your project and play with it.
Expand Down
20 changes: 10 additions & 10 deletions config/release.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"repo": "api-clients-automation",
"teamSlug": "api-clients-automation",
"targetBranch": {
"csharp": "next",
"csharp": "main",
"dart": "main",
"go": "next",
"java": "next",
"javascript": "next",
"kotlin": "next",
"php": "next",
"python": "next",
"ruby": "next",
"scala": "next",
"swift": "next"
"go": "main",
"java": "main",
"javascript": "main",
"kotlin": "main",
"php": "main",
"python": "main",
"ruby": "main",
"scala": "main",
"swift": "main"
},
"defaultTargetBranch": "next",
"gitAuthor": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("index.mustache", "", "index.js"));
supportingFiles.add(new SupportingFile("index.d.mustache", "", "index.d.ts"));
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));

// `client` related files, `algoliasearch` have it's own logic below
if (!isAlgoliasearchClient) {
Expand All @@ -72,6 +73,8 @@ public void processOpts() {
}
// `algoliasearch` related files
else {
supportingFiles.add(new SupportingFile("README.mustache", "", "../../README.md"));

// `algoliasearch` builds
supportingFiles.add(new SupportingFile("algoliasearch/builds/browser.mustache", "builds", "browser.ts"));
supportingFiles.add(new SupportingFile("algoliasearch/builds/node.mustache", "builds", "node.ts"));
Expand Down Expand Up @@ -147,6 +150,7 @@ private void setDefaultGeneratorOptions() {
additionalProperties.put("isAlgoliasearchClient", isAlgoliasearchClient);
additionalProperties.put("packageVersion", Helpers.getPackageJsonVersion(packageName));
additionalProperties.put("packageName", packageName);
additionalProperties.put("npmPackageName", isAlgoliasearchClient ? packageName : "@algolia/" + packageName);
additionalProperties.put("nodeSearchHelpers", CLIENT.equals("search") || isAlgoliasearchClient);

if (isAlgoliasearchClient) {
Expand Down
81 changes: 81 additions & 0 deletions templates/javascript/clients/README.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<p align="center">
<a href="https://www.algolia.com">
<img alt="Algolia for JavaScript" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/javascript.png" >
</a>

<h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your JavaScript project</h4>

<p align="center">
<a href="https://npmjs.org/package/{{npmPackageName}}"><img src="https://img.shields.io/npm/v/{{npmPackageName}}.svg?style=flat-square" alt="NPM version"></img></a>
<a href="http://npm-stat.com/charts.html?package={{npmPackageName}}"><img src="https://img.shields.io/npm/dm/{{npmPackageName}}.svg?style=flat-square" alt="NPM downloads"></a>
<a href="https://www.jsdelivr.com/package/npm/{{npmPackageName}}"><img src="https://data.jsdelivr.com/v1/package/npm/{{npmPackageName}}/badge" alt="jsDelivr Downloads"></img></a>
<a href="LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat-square" alt="License"></a>
</p>
</p>

<p align="center">
<a href="https://www.algolia.com/doc/api-client/getting-started/install/javascript/" target="_blank">Documentation</a> •
<a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/" target="_blank">InstantSearch</a> •
<a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
<a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
<a href="https://github.com/algolia/algoliasearch-client-javascript/issues" target="_blank">Report a bug</a> •
<a href="https://www.algolia.com/doc/api-client/troubleshooting/faq/javascript/" target="_blank">FAQ</a> •
<a href="https://alg.li/support" target="_blank">Support</a>
</p>

## ✨ Features

- Thin & **minimal low-level HTTP client** to interact with Algolia's API
- Works both on the **browser** and **node.js**
- **UMD and ESM compatible**, you can use it with any module loader
- Built with TypeScript

## 💡 Getting Started

To get started, you first need to install {{npmPackageName}} (or any other available API client package).

All of our clients comes with type definition, and are available for both browser and node environments.

```bash
yarn add {{npmPackageName}}
# or
npm install {{npmPackageName}}
```

Without a package manager

Add the following JavaScript snippet to the <head> of your website:

```html
<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/{{packageName}}.umd.min.js"></script>
```

You can now import the Algolia API client in your project and play with it.

```js
{{^isAlgoliasearchClient}}
import { {{apiName}} } from '{{npmPackageName}}';

const client = {{apiName}}('YOUR_APP_ID', 'YOUR_API_KEY');
{{/isAlgoliasearchClient}}
{{#isAlgoliasearchClient}}
import { algoliasearch } from '{{npmPackageName}}';

const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');

// or with the lite client
import { {{apiName}} } from '{{npmPackageName}}/lite';

const client = {{apiName}}('YOUR_APP_ID', 'YOUR_API_KEY');
{{/isAlgoliasearchClient}}
```

For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.

## ❓ Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/javascript/) where you will find answers for the most common issues and gotchas with the client. You can also open [a GitHub issue](https://github.com/algolia/api-clients-automation/issues/new?assignees=&labels=&projects=&template=Bug_report.md)

## 📄 License

The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
4 changes: 2 additions & 2 deletions templates/swift/podspec.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/algolia/algoliasearch-client-swift.git', :tag => '{{{packageVersion}}}' }
s.authors = { 'Algolia' => '[email protected]' }
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.homepage = 'https://github.com/algolia/algoliasearch-client-swift/tree/next'
s.homepage = 'https://github.com/algolia/algoliasearch-client-swift/tree/main'
s.summary = 'Algolia Search API Client written in Swift.'
s.documentation_url = 'https://www.algolia.com/doc/api-client/getting-started/what-is-the-api-client/swift/'
s.ios.deployment_target = '14.0'
Expand All @@ -24,4 +24,4 @@ Pod::Spec.new do |s|
subs.dependency '{{projectName}}/Core'
end
{{/packageList}}
end
end
20 changes: 10 additions & 10 deletions website/docs/clients/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ If you wish to contribute, please see [the contributing page](/docs/contributing

Generated code in production can be find on repository of the clients.

- [C#](https://github.com/algolia/algoliasearch-client-csharp/tree/next)
- [C#](https://github.com/algolia/algoliasearch-client-csharp/tree/main)
- [Dart](https://github.com/algolia/algoliasearch-client-dart/)
- [Go](https://github.com/algolia/algoliasearch-client-go/tree/next/)
- [JavaScript](https://github.com/algolia/algoliasearch-client-javascript/tree/next/)
- [Java](https://github.com/algolia/algoliasearch-client-java/tree/next/)
- [Kotlin](https://github.com/algolia/algoliasearch-client-kotlin/tree/next/)
- [PHP](https://github.com/algolia/algoliasearch-client-php/tree/next/)
- [Python](https://github.com/algolia/algoliasearch-client-python/tree/next)
- [Ruby](https://github.com/algolia/algoliasearch-client-ruby/tree/next)
- [Scala](https://github.com/algolia/algoliasearch-client-scala/tree/next)
- [Swift](https://github.com/algolia/algoliasearch-client-swift/tree/next)
- [Go](https://github.com/algolia/algoliasearch-client-go/tree/main/)
- [JavaScript](https://github.com/algolia/algoliasearch-client-javascript/tree/main/)
- [Java](https://github.com/algolia/algoliasearch-client-java/tree/main/)
- [Kotlin](https://github.com/algolia/algoliasearch-client-kotlin/tree/main/)
- [PHP](https://github.com/algolia/algoliasearch-client-php/tree/main/)
- [Python](https://github.com/algolia/algoliasearch-client-python/tree/main)
- [Ruby](https://github.com/algolia/algoliasearch-client-ruby/tree/main)
- [Scala](https://github.com/algolia/algoliasearch-client-scala/tree/main)
- [Swift](https://github.com/algolia/algoliasearch-client-swift/tree/main)

## Usage

Expand Down
2 changes: 1 addition & 1 deletion website/docs/clients/migration-guides/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: PHP

| Previous | Latest | Description |
|-----------------------------------------------|:---------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `"algolia/algoliasearch-client-php": "^3.2"` | `"algolia/algoliasearch-client-php": "^4.0@alpha"` | **During the beta phase**, the clients are available under the package 4.x.x-alpha , you can find a full list [here](https://packagist.org/packages/algolia/algoliasearch-client-php). |
| `"algolia/algoliasearch-client-php": "^3.2"` | `"algolia/algoliasearch-client-php": "^4.0"` | **During the beta phase**, the clients are available under the package 4.x.x-alpha , you can find a full list [here](https://packagist.org/packages/algolia/algoliasearch-client-php). |
| `Algolia\AlgoliaSearch` | `Algolia\AlgoliaSearch\Api` | Exported clients have now the namespace suffixed by `Api`. |
| `Algolia\AlgoliaSearch\Config` | `Algolia\AlgoliaSearch\Configuration` | Configuration classes are now located in a `Configuration` directory (instead of `Config` before). |
| `Algolia\AlgoliaSearch\Support\UserAgent` | `Algolia\AlgoliaSearch\Support\AlgoliaAgent` | `UserAgent` class has been renamed to `AlgoliaAgent` for consistency across client languages (`addCustomUserAgent` method also became `addAlgoliaAgent`). |
Expand Down
12 changes: 6 additions & 6 deletions website/docs/clients/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ To get started, you first need to install `algoliasearch` (or any other availabl
All of our clients comes with type definition, and are available for both `browser` and `node` environments.

```bash
yarn add algoliasearch@beta
yarn add algoliasearch
# or
npm install algoliasearch@beta
npm install algoliasearch
```

Or use a specific package:

```bash
yarn add @algolia/client-search@beta
yarn add @algolia/client-search
# or
npm install @algolia/client-search@beta
npm install @algolia/client-search
```

**Without a package manager**

Add the following JavaScript snippet to the `<head>` of your website:

```html
<script src="https://cdn.jsdelivr.net/npm/algoliasearch@beta/dist/algoliasearch.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch.umd.min.js"></script>
```

</TabItem>
Expand All @@ -61,7 +61,7 @@ pip install --upgrade 'algoliasearch>=4.0,<5.0'
First, install Algolia PHP API Client via the composer package manager:

```bash
composer require algolia/algoliasearch-client-php "^4.0@beta"
composer require algolia/algoliasearch-client-php "^4.0"
```

</TabItem>
Expand Down
Loading