Skip to content

Commit 1c2035e

Browse files
authored
chore: remove prerelease tags and main branch target (#3524)
1 parent 2798e35 commit 1c2035e

File tree

9 files changed

+122
-71
lines changed

9 files changed

+122
-71
lines changed

clients/algoliasearch-client-javascript/README.md

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -37,59 +37,25 @@ To get started, you first need to install algoliasearch (or any other available
3737
All of our clients comes with type definition, and are available for both browser and node environments.
3838

3939
```bash
40-
yarn add algoliasearch@beta
40+
yarn add algoliasearch
4141
# or
42-
npm install algoliasearch@beta
43-
```
44-
45-
Or use a specific package:
46-
47-
```bash
48-
yarn add @algolia/client-search@beta
49-
# or
50-
npm install @algolia/client-search@beta
42+
npm install algoliasearch
5143
```
5244

5345
Without a package manager
5446

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

5749
```html
58-
<script src="https://cdn.jsdelivr.net/npm/algoliasearch@beta/dist/algoliasearch.umd.min.js"></script>
50+
<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch.umd.min.js"></script>
5951
```
6052

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

6355
```js
64-
import { searchClient } from '@algolia/client-search';
65-
66-
const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');
67-
68-
// Add a new record to your Algolia index
69-
const response = await client.saveObject({
70-
indexName: '<YOUR_INDEX_NAME>',
71-
body: { objectID: 'id', test: 'val' },
72-
});
73-
74-
// use typed response
75-
console.log(response);
76-
77-
// Poll the task status to know when it has been indexed
78-
await client.waitForTask({ indexName: '<YOUR_INDEX_NAME>', taskID: response.taskID });
79-
80-
// Fetch search results, with typo tolerance
81-
const response = await client.search({
82-
requests: [
83-
{
84-
indexName: '<YOUR_INDEX_NAME>',
85-
query: '<YOUR_QUERY>',
86-
hitsPerPage: 50,
87-
},
88-
],
89-
});
90-
91-
// use typed response
92-
console.log(response);
56+
import { algoliasearch } from 'algoliasearch';
57+
58+
const client = liteClient('YOUR_APP_ID', 'YOUR_API_KEY');
9359
```
9460

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

10167
## 📄 License
10268

103-
The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
69+
The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).

clients/algoliasearch-client-php/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
First, install Algolia PHP API Client via the [composer](https://getcomposer.org/) package manager:
3535

3636
```bash
37-
composer require algolia/algoliasearch-client-php "^4.0@beta"
37+
composer require algolia/algoliasearch-client-php "^4.0"
3838
```
3939

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

config/release.config.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"repo": "api-clients-automation",
66
"teamSlug": "api-clients-automation",
77
"targetBranch": {
8-
"csharp": "next",
8+
"csharp": "main",
99
"dart": "main",
10-
"go": "next",
11-
"java": "next",
12-
"javascript": "next",
13-
"kotlin": "next",
14-
"php": "next",
15-
"python": "next",
16-
"ruby": "next",
17-
"scala": "next",
18-
"swift": "next"
10+
"go": "main",
11+
"java": "main",
12+
"javascript": "main",
13+
"kotlin": "main",
14+
"php": "main",
15+
"python": "main",
16+
"ruby": "main",
17+
"scala": "main",
18+
"swift": "main"
1919
},
2020
"defaultTargetBranch": "next",
2121
"gitAuthor": {

generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public void processOpts() {
5959
supportingFiles.add(new SupportingFile("index.mustache", "", "index.js"));
6060
supportingFiles.add(new SupportingFile("index.d.mustache", "", "index.d.ts"));
6161
supportingFiles.add(new SupportingFile("LICENSE", "", "LICENSE"));
62+
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
6263

6364
// `client` related files, `algoliasearch` have it's own logic below
6465
if (!isAlgoliasearchClient) {
@@ -72,6 +73,8 @@ public void processOpts() {
7273
}
7374
// `algoliasearch` related files
7475
else {
76+
supportingFiles.add(new SupportingFile("README.mustache", "", "../../README.md"));
77+
7578
// `algoliasearch` builds
7679
supportingFiles.add(new SupportingFile("algoliasearch/builds/browser.mustache", "builds", "browser.ts"));
7780
supportingFiles.add(new SupportingFile("algoliasearch/builds/node.mustache", "builds", "node.ts"));
@@ -147,6 +150,7 @@ private void setDefaultGeneratorOptions() {
147150
additionalProperties.put("isAlgoliasearchClient", isAlgoliasearchClient);
148151
additionalProperties.put("packageVersion", Helpers.getPackageJsonVersion(packageName));
149152
additionalProperties.put("packageName", packageName);
153+
additionalProperties.put("npmPackageName", isAlgoliasearchClient ? packageName : "@algolia/" + packageName);
150154
additionalProperties.put("nodeSearchHelpers", CLIENT.equals("search") || isAlgoliasearchClient);
151155

152156
if (isAlgoliasearchClient) {
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<p align="center">
2+
<a href="https://www.algolia.com">
3+
<img alt="Algolia for JavaScript" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/javascript.png" >
4+
</a>
5+
6+
<h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your JavaScript project</h4>
7+
8+
<p align="center">
9+
<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>
10+
<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>
11+
<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>
12+
<a href="LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat-square" alt="License"></a>
13+
</p>
14+
</p>
15+
16+
<p align="center">
17+
<a href="https://www.algolia.com/doc/api-client/getting-started/install/javascript/" target="_blank">Documentation</a> •
18+
<a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/" target="_blank">InstantSearch</a> •
19+
<a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
20+
<a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
21+
<a href="https://github.com/algolia/algoliasearch-client-javascript/issues" target="_blank">Report a bug</a> •
22+
<a href="https://www.algolia.com/doc/api-client/troubleshooting/faq/javascript/" target="_blank">FAQ</a> •
23+
<a href="https://alg.li/support" target="_blank">Support</a>
24+
</p>
25+
26+
## ✨ Features
27+
28+
- Thin & **minimal low-level HTTP client** to interact with Algolia's API
29+
- Works both on the **browser** and **node.js**
30+
- **UMD and ESM compatible**, you can use it with any module loader
31+
- Built with TypeScript
32+
33+
## 💡 Getting Started
34+
35+
To get started, you first need to install {{npmPackageName}} (or any other available API client package).
36+
37+
All of our clients comes with type definition, and are available for both browser and node environments.
38+
39+
```bash
40+
yarn add {{npmPackageName}}
41+
# or
42+
npm install {{npmPackageName}}
43+
```
44+
45+
Without a package manager
46+
47+
Add the following JavaScript snippet to the <head> of your website:
48+
49+
```html
50+
<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/{{packageName}}.umd.min.js"></script>
51+
```
52+
53+
You can now import the Algolia API client in your project and play with it.
54+
55+
```js
56+
{{^isAlgoliasearchClient}}
57+
import { {{apiName}} } from '{{npmPackageName}}';
58+
59+
const client = {{apiName}}('YOUR_APP_ID', 'YOUR_API_KEY');
60+
{{/isAlgoliasearchClient}}
61+
{{#isAlgoliasearchClient}}
62+
import { algoliasearch } from '{{npmPackageName}}';
63+
64+
const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');
65+
66+
// or with the lite client
67+
import { {{apiName}} } from '{{npmPackageName}}/lite';
68+
69+
const client = {{apiName}}('YOUR_APP_ID', 'YOUR_API_KEY');
70+
{{/isAlgoliasearchClient}}
71+
```
72+
73+
For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.
74+
75+
## ❓ Troubleshooting
76+
77+
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)
78+
79+
## 📄 License
80+
81+
The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).

templates/swift/podspec.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Pod::Spec.new do |s|
55
s.source = { :git => 'https://github.com/algolia/algoliasearch-client-swift.git', :tag => '{{{packageVersion}}}' }
66
s.authors = { 'Algolia' => '[email protected]' }
77
s.license = { :type => 'MIT', :file => 'LICENSE' }
8-
s.homepage = 'https://github.com/algolia/algoliasearch-client-swift/tree/next'
8+
s.homepage = 'https://github.com/algolia/algoliasearch-client-swift/tree/main'
99
s.summary = 'Algolia Search API Client written in Swift.'
1010
s.documentation_url = 'https://www.algolia.com/doc/api-client/getting-started/what-is-the-api-client/swift/'
1111
s.ios.deployment_target = '14.0'
@@ -24,4 +24,4 @@ Pod::Spec.new do |s|
2424
subs.dependency '{{projectName}}/Core'
2525
end
2626
{{/packageList}}
27-
end
27+
end

website/docs/clients/introduction.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ If you wish to contribute, please see [the contributing page](/docs/contributing
1212

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

15-
- [C#](https://github.com/algolia/algoliasearch-client-csharp/tree/next)
15+
- [C#](https://github.com/algolia/algoliasearch-client-csharp/tree/main)
1616
- [Dart](https://github.com/algolia/algoliasearch-client-dart/)
17-
- [Go](https://github.com/algolia/algoliasearch-client-go/tree/next/)
18-
- [JavaScript](https://github.com/algolia/algoliasearch-client-javascript/tree/next/)
19-
- [Java](https://github.com/algolia/algoliasearch-client-java/tree/next/)
20-
- [Kotlin](https://github.com/algolia/algoliasearch-client-kotlin/tree/next/)
21-
- [PHP](https://github.com/algolia/algoliasearch-client-php/tree/next/)
22-
- [Python](https://github.com/algolia/algoliasearch-client-python/tree/next)
23-
- [Ruby](https://github.com/algolia/algoliasearch-client-ruby/tree/next)
24-
- [Scala](https://github.com/algolia/algoliasearch-client-scala/tree/next)
25-
- [Swift](https://github.com/algolia/algoliasearch-client-swift/tree/next)
17+
- [Go](https://github.com/algolia/algoliasearch-client-go/tree/main/)
18+
- [JavaScript](https://github.com/algolia/algoliasearch-client-javascript/tree/main/)
19+
- [Java](https://github.com/algolia/algoliasearch-client-java/tree/main/)
20+
- [Kotlin](https://github.com/algolia/algoliasearch-client-kotlin/tree/main/)
21+
- [PHP](https://github.com/algolia/algoliasearch-client-php/tree/main/)
22+
- [Python](https://github.com/algolia/algoliasearch-client-python/tree/main)
23+
- [Ruby](https://github.com/algolia/algoliasearch-client-ruby/tree/main)
24+
- [Scala](https://github.com/algolia/algoliasearch-client-scala/tree/main)
25+
- [Swift](https://github.com/algolia/algoliasearch-client-swift/tree/main)
2626

2727
## Usage
2828

website/docs/clients/migration-guides/php.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: PHP
44

55
| Previous | Latest | Description |
66
|-----------------------------------------------|:---------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7-
| `"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). |
7+
| `"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). |
88
| `Algolia\AlgoliaSearch` | `Algolia\AlgoliaSearch\Api` | Exported clients have now the namespace suffixed by `Api`. |
99
| `Algolia\AlgoliaSearch\Config` | `Algolia\AlgoliaSearch\Configuration` | Configuration classes are now located in a `Configuration` directory (instead of `Config` before). |
1010
| `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`). |

website/docs/clients/usage.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ To get started, you first need to install `algoliasearch` (or any other availabl
2525
All of our clients comes with type definition, and are available for both `browser` and `node` environments.
2626

2727
```bash
28-
yarn add algoliasearch@beta
28+
yarn add algoliasearch
2929
# or
30-
npm install algoliasearch@beta
30+
npm install algoliasearch
3131
```
3232

3333
Or use a specific package:
3434

3535
```bash
36-
yarn add @algolia/client-search@beta
36+
yarn add @algolia/client-search
3737
# or
38-
npm install @algolia/client-search@beta
38+
npm install @algolia/client-search
3939
```
4040

4141
**Without a package manager**
4242

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

4545
```html
46-
<script src="https://cdn.jsdelivr.net/npm/algoliasearch@beta/dist/algoliasearch.umd.min.js"></script>
46+
<script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch.umd.min.js"></script>
4747
```
4848

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

6363
```bash
64-
composer require algolia/algoliasearch-client-php "^4.0@beta"
64+
composer require algolia/algoliasearch-client-php "^4.0"
6565
```
6666

6767
</TabItem>

0 commit comments

Comments
 (0)