Skip to content

Commit 7990613

Browse files
chore(javascript): use oxlint (generated)
algolia/api-clients-automation#3895 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 3c10984 commit 7990613

File tree

499 files changed

+1972
-1906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

499 files changed

+1972
-1906
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
- [d4df544d6](https://github.com/algolia/api-clients-automation/commit/d4df544d6) fix(specs): remove usage [skip-bc] ([#3691](https://github.com/algolia/api-clients-automation/pull/3691)) by [@kai687](https://github.com/kai687/)
5555
- [d39b87726](https://github.com/algolia/api-clients-automation/commit/d39b87726) chore: assert node helpers ([#3689](https://github.com/algolia/api-clients-automation/pull/3689)) by [@shortcuts](https://github.com/shortcuts/)
56-
- [46d9d8fd0](https://github.com/algolia/api-clients-automation/commit/46d9d8fd0) feat(specs): add (optional) _automaticInsights to search result ([#3688](https://github.com/algolia/api-clients-automation/pull/3688)) by [@raed667](https://github.com/raed667/)
56+
- [46d9d8fd0](https://github.com/algolia/api-clients-automation/commit/46d9d8fd0) feat(specs): add (optional) \_automaticInsights to search result ([#3688](https://github.com/algolia/api-clients-automation/pull/3688)) by [@raed667](https://github.com/raed667/)
5757

5858
## [5.4.0](https://github.com/algolia/algoliasearch-client-javascript/compare/5.3.2...5.4.0)
5959

@@ -765,7 +765,7 @@ New major version released! Browse [our documentation](https://www.algolia.com/d
765765

766766
## [5.0.0-alpha.12](https://github.com/algolia/algoliasearch-client-javascript/compare/5.0.0-alpha.11...5.0.0-alpha.12)
767767

768-
- [ff02ba09](https://github.com/algolia/api-clients-automation/commit/ff02ba09) fix(javascript): revert: do not send user-agent for Predict (#957) ([#919](https://github.com/algolia/api-clients-automation/pull/919)) by [@shortcuts](https://github.com/shortcuts/)
768+
- [ff02ba09](https://github.com/algolia/api-clients-automation/commit/ff02ba09) fix(javascript): revert: do not send user-agent for Predict (#957) ([#919](https://github.com/algolia/api-clients-automation/pull/919)) by [@shortcuts](https://github.com/shortcuts/)
769769

770770
## [5.0.0-alpha.11](https://github.com/algolia/algoliasearch-client-javascript/compare/5.0.0-alpha.10...5.0.0-alpha.11)
771771

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@
3232

3333
## 💡 Getting Started
3434

35-
3635
To get started, you first need to install algoliasearch (or any other available API client package).
3736
All of our clients comes with type definition, and are available for both browser and node environments.
3837

3938
### With a package manager
4039

41-
4240
```bash
4341
4442
# or
@@ -82,4 +80,4 @@ Encountering an issue? Before reaching out to support, we recommend heading to o
8280

8381
## 📄 License
8482

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

base.tsup.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'path';
2-
32
import type { Options } from 'tsup';
43

54
type PKG = {

lerna.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"packages": [
3-
"packages/*"
4-
],
2+
"packages": ["packages/*"],
53
"version": "independent",
64
"useNx": true
75
}

nx.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
"default": {
44
"runner": "nx/tasks-runners/default",
55
"options": {
6-
"cacheableOperations": [
7-
"build:many",
8-
"build:all",
9-
"build"
10-
]
6+
"cacheableOperations": ["build:many", "build:all", "build"]
117
}
128
}
139
}

packages/algoliasearch/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@
3232

3333
## 💡 Getting Started
3434

35-
3635
To get started, you first need to install algoliasearch (or any other available API client package).
3736
All of our clients comes with type definition, and are available for both browser and node environments.
3837

3938
### With a package manager
4039

41-
4240
```bash
4341
4442
# or
@@ -82,4 +80,4 @@ Encountering an issue? Before reaching out to support, we recommend heading to o
8280

8381
## 📄 License
8482

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

packages/algoliasearch/__tests__/algoliasearch.browser.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint no-console: 0 */
2-
3-
import { vi, test, expect } from 'vitest';
2+
import { expect, test, vi } from 'vitest';
43

54
import { LogLevelEnum } from '../../client-common/src/types';
65
import { createConsoleLogger } from '../../logger-console/src/logger';

packages/algoliasearch/__tests__/algoliasearch.common.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import { describe, expect, test } from 'vitest';
2+
13
import {
24
DEFAULT_CONNECT_TIMEOUT_BROWSER,
35
DEFAULT_READ_TIMEOUT_BROWSER,
46
DEFAULT_WRITE_TIMEOUT_BROWSER,
57
} from '@algolia/client-common';
68
import type { EchoResponse } from '@algolia/requester-testing';
7-
import { describe, test, expect } from 'vitest';
89

910
import { browserEchoRequester } from '../../requester-testing/src/browserEchoRequester';
1011
import { algoliasearch, apiClientVersion } from '../builds/browser';

packages/algoliasearch/__tests__/algoliasearch.fetch.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint no-console: 0 */
2-
3-
import { vi, test, expect } from 'vitest';
2+
import { expect, test, vi } from 'vitest';
43

54
import { LogLevelEnum } from '../../client-common/src/types';
65
import { createConsoleLogger } from '../../logger-console/src/logger';

packages/algoliasearch/__tests__/algoliasearch.node.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint no-console: 0 */
2-
3-
import { vi, test, expect } from 'vitest';
2+
import { expect, test, vi } from 'vitest';
43

54
import { LogLevelEnum } from '../../client-common/src/types';
65
import { createConsoleLogger } from '../../logger-console/src/logger';

packages/algoliasearch/builds/browser.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
import type { AbtestingClient, Region as AbtestingRegion } from '@algolia/client-abtesting';
4-
import { abtestingClient } from '@algolia/client-abtesting';
54
import type { AnalyticsClient, Region as AnalyticsRegion } from '@algolia/client-analytics';
6-
import { analyticsClient } from '@algolia/client-analytics';
75
import type { ClientOptions } from '@algolia/client-common';
86
import type { PersonalizationClient, Region as PersonalizationRegion } from '@algolia/client-personalization';
9-
import { personalizationClient } from '@algolia/client-personalization';
107
import type { SearchClient } from '@algolia/client-search';
11-
import { searchClient } from '@algolia/client-search';
128
import type { RecommendClient } from '@algolia/recommend';
9+
10+
import { abtestingClient } from '@algolia/client-abtesting';
11+
import { analyticsClient } from '@algolia/client-analytics';
12+
import { personalizationClient } from '@algolia/client-personalization';
13+
import { searchClient } from '@algolia/client-search';
1314
import { recommendClient } from '@algolia/recommend';
1415

1516
import type { InitClientOptions, InitClientRegion } from './models';

packages/algoliasearch/builds/fetch.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
import type { AbtestingClient, Region as AbtestingRegion } from '@algolia/client-abtesting';
4-
import { abtestingClient } from '@algolia/client-abtesting';
54
import type { AnalyticsClient, Region as AnalyticsRegion } from '@algolia/client-analytics';
6-
import { analyticsClient } from '@algolia/client-analytics';
75
import type { ClientOptions } from '@algolia/client-common';
86
import type { PersonalizationClient, Region as PersonalizationRegion } from '@algolia/client-personalization';
9-
import { personalizationClient } from '@algolia/client-personalization';
107
import type { SearchClient } from '@algolia/client-search';
11-
import { searchClient } from '@algolia/client-search';
128
import type { RecommendClient } from '@algolia/recommend';
9+
10+
import { abtestingClient } from '@algolia/client-abtesting';
11+
import { analyticsClient } from '@algolia/client-analytics';
12+
import { personalizationClient } from '@algolia/client-personalization';
13+
import { searchClient } from '@algolia/client-search';
1314
import { recommendClient } from '@algolia/recommend';
1415

1516
import type { InitClientOptions, InitClientRegion } from './models';

packages/algoliasearch/builds/models.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ import { apiClientVersion } from '@algolia/client-search';
8989

9090
type Region = AbTestingRegion | AnalyticsRegion;
9191

92+
export * from '@algolia/client-abtesting';
93+
export * from '@algolia/client-analytics';
94+
export * from '@algolia/client-personalization';
9295
export * from '@algolia/client-search';
9396
export * from '@algolia/recommend';
94-
export * from '@algolia/client-personalization';
95-
export * from '@algolia/client-analytics';
96-
export * from '@algolia/client-abtesting';
9797

9898
export {
9999
AbTestingRegion,

packages/algoliasearch/builds/node.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
import type { AbtestingClient, Region as AbtestingRegion } from '@algolia/client-abtesting';
4-
import { abtestingClient } from '@algolia/client-abtesting';
54
import type { AnalyticsClient, Region as AnalyticsRegion } from '@algolia/client-analytics';
6-
import { analyticsClient } from '@algolia/client-analytics';
75
import type { ClientOptions } from '@algolia/client-common';
86
import type { PersonalizationClient, Region as PersonalizationRegion } from '@algolia/client-personalization';
9-
import { personalizationClient } from '@algolia/client-personalization';
107
import type { SearchClient } from '@algolia/client-search';
11-
import { searchClient } from '@algolia/client-search';
128
import type { RecommendClient } from '@algolia/recommend';
9+
10+
import { abtestingClient } from '@algolia/client-abtesting';
11+
import { analyticsClient } from '@algolia/client-analytics';
12+
import { personalizationClient } from '@algolia/client-personalization';
13+
import { searchClient } from '@algolia/client-search';
1314
import { recommendClient } from '@algolia/recommend';
1415

1516
import type { InitClientOptions, InitClientRegion } from './models';

packages/algoliasearch/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// eslint-disable-next-line import/no-commonjs,import/extensions
2-
module.exports = require('./dist/node.cjs');
2+
module.exports = require('./dist/node.cjs');

packages/algoliasearch/lite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// eslint-disable-next-line import/no-commonjs,import/extensions
2-
module.exports = require('./dist/lite/builds/node.cjs');
2+
module.exports = require('./dist/lite/builds/node.cjs');

packages/algoliasearch/lite/builds/browser.ts

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3-
import type { ClientOptions } from '@algolia/client-common';
3+
import { createXhrRequester } from '@algolia/requester-browser-xhr';
4+
45
import {
5-
createNullLogger,
6-
createMemoryCache,
7-
createFallbackableCache,
6+
ClientOptions,
87
createBrowserLocalStorageCache,
8+
createFallbackableCache,
9+
createMemoryCache,
10+
createNullLogger,
911
DEFAULT_CONNECT_TIMEOUT_BROWSER,
1012
DEFAULT_READ_TIMEOUT_BROWSER,
1113
DEFAULT_WRITE_TIMEOUT_BROWSER,
1214
} from '@algolia/client-common';
13-
import { createXhrRequester } from '@algolia/requester-browser-xhr';
14-
15-
import { createLiteClient, apiClientVersion } from '../src/liteClient';
1615

17-
export type LiteClient = ReturnType<typeof createLiteClient>;
16+
import { apiClientVersion, createLiteClient } from '../src/liteClient';
1817

19-
export { apiClientVersion } from '../src/liteClient';
2018
export * from '../model';
19+
export { apiClientVersion } from '../src/liteClient';
2120

21+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
2222
export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {
2323
if (!appId || typeof appId !== 'string') {
2424
throw new Error('`appId` is missing.');
@@ -48,3 +48,5 @@ export function liteClient(appId: string, apiKey: string, options?: ClientOption
4848
...options,
4949
});
5050
}
51+
52+
export type LiteClient = ReturnType<typeof createLiteClient>;

packages/algoliasearch/lite/builds/node.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3-
import type { ClientOptions } from '@algolia/client-common';
3+
export type LiteClient = ReturnType<typeof createLiteClient>;
4+
5+
import { createHttpRequester } from '@algolia/requester-node-http';
6+
47
import {
5-
createNullLogger,
8+
ClientOptions,
69
createMemoryCache,
710
createNullCache,
11+
createNullLogger,
812
DEFAULT_CONNECT_TIMEOUT_NODE,
913
DEFAULT_READ_TIMEOUT_NODE,
1014
DEFAULT_WRITE_TIMEOUT_NODE,
1115
} from '@algolia/client-common';
12-
import { createHttpRequester } from '@algolia/requester-node-http';
1316

1417
import { createLiteClient } from '../src/liteClient';
1518

16-
export type LiteClient = ReturnType<typeof createLiteClient>;
17-
18-
export { apiClientVersion } from '../src/liteClient';
1919
export * from '../model';
20+
export { apiClientVersion } from '../src/liteClient';
2021

22+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
2123
export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {
2224
if (!appId || typeof appId !== 'string') {
2325
throw new Error('`appId` is missing.');

packages/algoliasearch/lite/model/acl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export type Acl =
77
| 'addObject'
88
| 'analytics'
99
| 'browse'
10-
| 'deleteIndex'
1110
| 'deleteObject'
11+
| 'deleteIndex'
1212
| 'editSettings'
1313
| 'inference'
1414
| 'listIndexes'
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

3-
export type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym';
3+
export type AlternativesAsExact = 'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym';

packages/algoliasearch/lite/model/apiKey.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type ApiKey = {
99
/**
1010
* Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint\'s reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
1111
*/
12-
acl: Acl[];
12+
acl: Array<Acl>;
1313

1414
/**
1515
* Description of an API key to help you identify this API key.
@@ -19,7 +19,7 @@ export type ApiKey = {
1919
/**
2020
* Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
2121
*/
22-
indexes?: string[];
22+
indexes?: Array<string>;
2323

2424
/**
2525
* Maximum number of results this API key can retrieve in one query. By default, there\'s no limit.
@@ -39,7 +39,7 @@ export type ApiKey = {
3939
/**
4040
* Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
4141
*/
42-
referers?: string[];
42+
referers?: Array<string>;
4343

4444
/**
4545
* Duration (in seconds) after which the API key expires. By default, API keys don\'t expire.

packages/algoliasearch/lite/model/aroundPrecision.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import type { Range } from './range';
55
/**
66
* Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
77
*/
8-
export type AroundPrecision = Range[] | number;
8+
export type AroundPrecision = number | Array<Range>;

packages/algoliasearch/lite/model/aroundRadius.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import type { AroundRadiusAll } from './aroundRadiusAll';
55
/**
66
* Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
77
*/
8-
export type AroundRadius = AroundRadiusAll | number;
8+
export type AroundRadius = number | AroundRadiusAll;

packages/algoliasearch/lite/model/automaticFacetFilters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import type { AutomaticFacetFilter } from './automaticFacetFilter';
55
/**
66
* Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies.
77
*/
8-
export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[];
8+
export type AutomaticFacetFilters = Array<AutomaticFacetFilter> | Array<string>;

packages/algoliasearch/lite/model/banner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { BannerImage } from './bannerImage';
44
import type { BannerLink } from './bannerLink';
55

66
/**
7-
* A search banner with image and url.
7+
* a search banner with image and url.
88
*/
99
export type Banner = {
1010
image?: BannerImage;

packages/algoliasearch/lite/model/bannerImage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { BannerImageUrl } from './bannerImageUrl';
44

55
/**
6-
* Image of a search banner.
6+
* image of a search banner.
77
*/
88
export type BannerImage = {
99
urls?: BannerImageUrl;

packages/algoliasearch/lite/model/bannerImageUrl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
/**
4-
* Url for a search banner image.
4+
* url for a search banner image.
55
*/
66
export type BannerImageUrl = {
77
url?: string;

packages/algoliasearch/lite/model/bannerLink.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22

33
/**
4-
* Link for a banner defined in merchandising studio.
4+
* link for a banner defined in merchandising studio.
55
*/
66
export type BannerLink = {
77
url?: string;

packages/algoliasearch/lite/model/banners.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { Banner } from './banner';
44

55
/**
6-
* Banners defined in the merchandising studio for the given search.
6+
* banners defined in the merchandising studio for the given search.
77
*/
88
export type Banners = {
99
banners?: Banner;

0 commit comments

Comments
 (0)