Skip to content

Commit f1384f1

Browse files
committed
Merge branch 'main' into fix/oneof-of
2 parents 55f9f84 + c3ebbb9 commit f1384f1

File tree

112 files changed

+720
-2530
lines changed

Some content is hidden

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

112 files changed

+720
-2530
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ jobs:
225225
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language != 'php' }}
226226
run: yarn cli build clients ${{ matrix.client.language }} ${{ matrix.client.toBuild }}
227227

228-
- name: Build JavaScript 'algoliasearch' client
228+
- name: Test JavaScript bundle size
229229
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language == 'javascript' }}
230-
run: yarn cli build clients javascript algoliasearch
230+
run: cd ${{ matrix.client.path }} && yarn test:size
231231

232232
- name: Run JavaScript 'algoliasearch' client tests
233233
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language == 'javascript' }}

clients/algoliasearch-client-java-2/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [4.2.2-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.1-SNAPSHOT...4.2.2-SNAPSHOT)
2+
3+
- 7a858225 fix(specs): correct type for `renderingContent` and `consequenceParams` (#759)
4+
15
## [4.2.1-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.0-SNAPSHOT...4.2.1-SNAPSHOT)
26

37
- 1756059a fix(java): use body as error message APIC-541 (#734)

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AbtestingClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public AbtestingClient(String appId, String apiKey, String region) {
3333
}
3434

3535
public AbtestingClient(String appId, String apiKey, String region, ClientOptions options) {
36-
super(appId, apiKey, "Abtesting", "4.2.1-SNAPSHOT", options);
36+
super(appId, apiKey, "Abtesting", "4.2.2-SNAPSHOT", options);
3737
if (options != null && options.getHosts() != null) {
3838
this.setHosts(options.getHosts());
3939
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AnalyticsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public AnalyticsClient(String appId, String apiKey, String region) {
3333
}
3434

3535
public AnalyticsClient(String appId, String apiKey, String region, ClientOptions options) {
36-
super(appId, apiKey, "Analytics", "4.2.1-SNAPSHOT", options);
36+
super(appId, apiKey, "Analytics", "4.2.2-SNAPSHOT", options);
3737
if (options != null && options.getHosts() != null) {
3838
this.setHosts(options.getHosts());
3939
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/InsightsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public InsightsClient(String appId, String apiKey, String region) {
3333
}
3434

3535
public InsightsClient(String appId, String apiKey, String region, ClientOptions options) {
36-
super(appId, apiKey, "Insights", "4.2.1-SNAPSHOT", options);
36+
super(appId, apiKey, "Insights", "4.2.2-SNAPSHOT", options);
3737
if (options != null && options.getHosts() != null) {
3838
this.setHosts(options.getHosts());
3939
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PersonalizationClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public PersonalizationClient(String appId, String apiKey, String region) {
2525
}
2626

2727
public PersonalizationClient(String appId, String apiKey, String region, ClientOptions options) {
28-
super(appId, apiKey, "Personalization", "4.2.1-SNAPSHOT", options);
28+
super(appId, apiKey, "Personalization", "4.2.2-SNAPSHOT", options);
2929
if (options != null && options.getHosts() != null) {
3030
this.setHosts(options.getHosts());
3131
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public PredictClient(String appId, String apiKey, String region) {
2525
}
2626

2727
public PredictClient(String appId, String apiKey, String region, ClientOptions options) {
28-
super(appId, apiKey, "Predict", "4.2.1-SNAPSHOT", options);
28+
super(appId, apiKey, "Predict", "4.2.2-SNAPSHOT", options);
2929
if (options != null && options.getHosts() != null) {
3030
this.setHosts(options.getHosts());
3131
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/QuerySuggestionsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public QuerySuggestionsClient(String appId, String apiKey, String region) {
2525
}
2626

2727
public QuerySuggestionsClient(String appId, String apiKey, String region, ClientOptions options) {
28-
super(appId, apiKey, "QuerySuggestions", "4.2.1-SNAPSHOT", options);
28+
super(appId, apiKey, "QuerySuggestions", "4.2.2-SNAPSHOT", options);
2929
if (options != null && options.getHosts() != null) {
3030
this.setHosts(options.getHosts());
3131
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/RecommendClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public RecommendClient(String appId, String apiKey) {
2727
}
2828

2929
public RecommendClient(String appId, String apiKey, ClientOptions options) {
30-
super(appId, apiKey, "Recommend", "4.2.1-SNAPSHOT", options);
30+
super(appId, apiKey, "Recommend", "4.2.2-SNAPSHOT", options);
3131
if (options != null && options.getHosts() != null) {
3232
this.setHosts(options.getHosts());
3333
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public SearchClient(String appId, String apiKey) {
2828
}
2929

3030
public SearchClient(String appId, String apiKey, ClientOptions options) {
31-
super(appId, apiKey, "Search", "4.2.1-SNAPSHOT", options);
31+
super(appId, apiKey, "Search", "4.2.2-SNAPSHOT", options);
3232
if (options != null && options.getHosts() != null) {
3333
this.setHosts(options.getHosts());
3434
} else {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
GROUP=com.algolia
2-
VERSION_NAME=4.2.1-SNAPSHOT
2+
VERSION_NAME=4.2.2-SNAPSHOT

clients/algoliasearch-client-javascript/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [0.7.0](https://github.com/algolia/algoliasearch-client-javascript/compare/0.6.1...0.7.0)
2+
3+
- b9c4145d fix(javascript): improve bundlesize, add check to CI (#762)
4+
- 7a858225 fix(specs): correct type for `renderingContent` and `consequenceParams` (#759)
5+
- 2288d170 feat(javascript): add `waitForApiKey` helper method (#738)
6+
- d7fcc6d3 fix(javascript): import lite resolution (#737)
7+
18
## [0.6.1](https://github.com/algolia/algoliasearch-client-javascript/compare/0.6.0...0.6.1)
29

310
- 5b70ec1a fix(javascript): publish `algoliasearch` dist (#735)

clients/algoliasearch-client-javascript/bundlesize.config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"files": [
33
{
44
"path": "packages/algoliasearch/dist/algoliasearch.umd.js",
5-
"maxSize": "7.60KB"
5+
"maxSize": "7.80KB"
66
},
77
{
88
"path": "packages/algoliasearch/dist/lite/lite.umd.js",
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"path": "packages/client-insights/dist/client-insights.umd.js",
21-
"maxSize": "3.80KB"
21+
"maxSize": "3.75KB"
2222
},
2323
{
2424
"path": "packages/client-personalization/dist/client-personalization.umd.js",
@@ -30,7 +30,7 @@
3030
},
3131
{
3232
"path": "packages/client-search/dist/client-search.umd.js",
33-
"maxSize": "6.30KB"
33+
"maxSize": "6.55KB"
3434
},
3535
{
3636
"path": "packages/client-sources/dist/client-sources.umd.js",

clients/algoliasearch-client-javascript/packages/algoliasearch/builds/browser.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ import type {
33
Region as AnalyticsRegion,
44
} from '@experimental-api-clients-automation/client-analytics/src/analyticsClient';
55
import { createAnalyticsClient } from '@experimental-api-clients-automation/client-analytics/src/analyticsClient';
6-
import type {
7-
CreateClientOptions,
8-
Host,
9-
Requester,
10-
} from '@experimental-api-clients-automation/client-common';
116
import {
127
createMemoryCache,
138
createFallbackableCache,
@@ -16,6 +11,11 @@ import {
1611
DEFAULT_READ_TIMEOUT_BROWSER,
1712
DEFAULT_WRITE_TIMEOUT_BROWSER,
1813
} from '@experimental-api-clients-automation/client-common';
14+
import type {
15+
CreateClientOptions,
16+
Host,
17+
Requester,
18+
} from '@experimental-api-clients-automation/client-common';
1919
import type {
2020
PersonalizationClient,
2121
Region as PersonalizationRegion,
@@ -31,6 +31,8 @@ export * from './models';
3131

3232
export const apiClientVersion = searchClientVersion;
3333

34+
export type Algoliasearch = ReturnType<typeof algoliasearch>;
35+
3436
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
3537
export function algoliasearch(
3638
appId: string,
@@ -105,5 +107,3 @@ export function algoliasearch(
105107
initPersonalization,
106108
};
107109
}
108-
109-
export type Algoliasearch = ReturnType<typeof algoliasearch>;

clients/algoliasearch-client-javascript/packages/algoliasearch/builds/node.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import type {
33
Region as AnalyticsRegion,
44
} from '@experimental-api-clients-automation/client-analytics/src/analyticsClient';
55
import { createAnalyticsClient } from '@experimental-api-clients-automation/client-analytics/src/analyticsClient';
6-
import type {
7-
CreateClientOptions,
8-
Host,
9-
Requester,
10-
} from '@experimental-api-clients-automation/client-common';
116
import {
127
DEFAULT_CONNECT_TIMEOUT_NODE,
138
DEFAULT_READ_TIMEOUT_NODE,
149
DEFAULT_WRITE_TIMEOUT_NODE,
1510
createMemoryCache,
1611
createNullCache,
1712
} from '@experimental-api-clients-automation/client-common';
13+
import type {
14+
CreateClientOptions,
15+
Host,
16+
Requester,
17+
} from '@experimental-api-clients-automation/client-common';
1818
import type {
1919
PersonalizationClient,
2020
Region as PersonalizationRegion,
@@ -30,6 +30,8 @@ export * from './models';
3030

3131
export const apiClientVersion = searchClientVersion;
3232

33+
export type Algoliasearch = ReturnType<typeof algoliasearch>;
34+
3335
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
3436
export function algoliasearch(
3537
appId: string,
@@ -98,5 +100,3 @@ export function algoliasearch(
98100
initPersonalization,
99101
};
100102
}
101-
102-
export type Algoliasearch = ReturnType<typeof algoliasearch>;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// eslint-disable-next-line import/no-unresolved
2-
export * from '../dist/lite/lite/builds/node';
2+
export * from './dist/lite/lite/builds/node';
Lines changed: 1 addition & 1 deletion
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('./lite/index.js');
2+
module.exports = require('./dist/lite/lite.cjs.js');

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type {
2020
import type { SearchMethodParams } from '../model/searchMethodParams';
2121
import type { SearchResponses } from '../model/searchResponses';
2222

23-
export const apiClientVersion = '0.6.1';
23+
export const apiClientVersion = '0.7.0';
2424

2525
function getDefaultHosts(appId: string): Host[] {
2626
return (

clients/algoliasearch-client-javascript/packages/algoliasearch/package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "@experimental-api-clients-automation/algoliasearch",
3-
"version": "0.6.1",
3+
"version": "0.7.0",
44
"description": "A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.",
55
"repository": "algolia/algoliasearch-client-javascript",
66
"license": "MIT",
77
"author": "Algolia",
88
"exports": {
99
".": {
10+
"types": "./index.d.ts",
1011
"node": {
1112
"import": "./dist/algoliasearch.esm.node.js",
1213
"module": "./dist/algoliasearch.esm.node.js",
@@ -21,6 +22,7 @@
2122
}
2223
},
2324
"./lite": {
25+
"types": "./lite.d.ts",
2426
"node": {
2527
"import": "./dist/lite/lite.esm.node.js",
2628
"module": "./dist/lite/lite.esm.node.js",
@@ -39,29 +41,29 @@
3941
"unpkg": "./dist/algoliasearch.umd.js",
4042
"browser": {
4143
"./index.js": "./dist/algoliasearch.umd.js",
42-
"./lite.js": "./dist/lite/lite.umd.js",
43-
"./lite/index.js": "./dist/lite/lite.umd.js"
44+
"./lite.js": "./dist/lite/lite.umd.js"
4445
},
45-
"types": "./index.d.ts",
46+
"types": "index.d.ts",
4647
"files": [
4748
"dist",
4849
"builds",
49-
"lite",
5050
"index.js",
51+
"index.d.ts",
52+
"lite",
5153
"lite.js",
52-
"index.d.ts"
54+
"lite.d.ts"
5355
],
5456
"scripts": {
5557
"clean": "rm -rf ./dist",
5658
"test": "jest"
5759
},
5860
"dependencies": {
59-
"@experimental-api-clients-automation/client-analytics": "0.6.1",
60-
"@experimental-api-clients-automation/client-common": "0.6.1",
61-
"@experimental-api-clients-automation/client-personalization": "0.6.1",
62-
"@experimental-api-clients-automation/client-search": "0.6.1",
63-
"@experimental-api-clients-automation/requester-browser-xhr": "0.6.1",
64-
"@experimental-api-clients-automation/requester-node-http": "0.6.1"
61+
"@experimental-api-clients-automation/client-analytics": "0.7.0",
62+
"@experimental-api-clients-automation/client-common": "0.7.0",
63+
"@experimental-api-clients-automation/client-personalization": "0.7.0",
64+
"@experimental-api-clients-automation/client-search": "0.7.0",
65+
"@experimental-api-clients-automation/requester-browser-xhr": "0.7.0",
66+
"@experimental-api-clients-automation/requester-node-http": "0.7.0"
6567
},
6668
"devDependencies": {
6769
"@types/jest": "28.1.3",

clients/algoliasearch-client-javascript/packages/client-abtesting/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@experimental-api-clients-automation/client-abtesting",
3-
"version": "0.6.1",
3+
"version": "0.7.0",
44
"description": "JavaScript client for client-abtesting",
55
"repository": "algolia/algoliasearch-client-javascript",
66
"license": "MIT",
@@ -21,9 +21,9 @@
2121
"clean": "rm -rf ./dist"
2222
},
2323
"dependencies": {
24-
"@experimental-api-clients-automation/client-common": "0.6.1",
25-
"@experimental-api-clients-automation/requester-browser-xhr": "0.6.1",
26-
"@experimental-api-clients-automation/requester-node-http": "0.6.1"
24+
"@experimental-api-clients-automation/client-common": "0.7.0",
25+
"@experimental-api-clients-automation/requester-browser-xhr": "0.7.0",
26+
"@experimental-api-clients-automation/requester-node-http": "0.7.0"
2727
},
2828
"devDependencies": {
2929
"@types/node": "16.11.41",

clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import type {
2727
} from '../model/clientMethodProps';
2828
import type { ListABTestsResponse } from '../model/listABTestsResponse';
2929

30-
export const apiClientVersion = '0.6.1';
30+
export const apiClientVersion = '0.7.0';
3131

3232
export const REGIONS = ['de', 'us'] as const;
3333
export type Region = typeof REGIONS[number];

clients/algoliasearch-client-javascript/packages/client-abtesting/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "dist",
4+
"outDir": "dist"
55
},
66
"include": ["src", "model", "builds"],
77
"exclude": ["dist", "node_modules"]

clients/algoliasearch-client-javascript/packages/client-analytics/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@experimental-api-clients-automation/client-analytics",
3-
"version": "0.6.1",
3+
"version": "0.7.0",
44
"description": "JavaScript client for client-analytics",
55
"repository": "algolia/algoliasearch-client-javascript",
66
"license": "MIT",
@@ -21,9 +21,9 @@
2121
"clean": "rm -rf ./dist"
2222
},
2323
"dependencies": {
24-
"@experimental-api-clients-automation/client-common": "0.6.1",
25-
"@experimental-api-clients-automation/requester-browser-xhr": "0.6.1",
26-
"@experimental-api-clients-automation/requester-node-http": "0.6.1"
24+
"@experimental-api-clients-automation/client-common": "0.7.0",
25+
"@experimental-api-clients-automation/requester-browser-xhr": "0.7.0",
26+
"@experimental-api-clients-automation/requester-node-http": "0.7.0"
2727
},
2828
"devDependencies": {
2929
"@types/node": "16.11.41",

clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import type { GetTopHitsResponse } from '../model/getTopHitsResponse';
5353
import type { GetTopSearchesResponse } from '../model/getTopSearchesResponse';
5454
import type { GetUsersCountResponse } from '../model/getUsersCountResponse';
5555

56-
export const apiClientVersion = '0.6.1';
56+
export const apiClientVersion = '0.7.0';
5757

5858
export const REGIONS = ['de', 'us'] as const;
5959
export type Region = typeof REGIONS[number];

clients/algoliasearch-client-javascript/packages/client-analytics/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "dist",
4+
"outDir": "dist"
55
},
66
"include": ["src", "model", "builds"],
77
"exclude": ["dist", "node_modules"]

clients/algoliasearch-client-javascript/packages/client-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@experimental-api-clients-automation/client-common",
3-
"version": "0.6.1",
3+
"version": "0.7.0",
44
"description": "Common package for the Algolia JavaScript API client.",
55
"repository": "algolia/algoliasearch-client-javascript",
66
"license": "MIT",

clients/algoliasearch-client-javascript/packages/client-common/src/createEchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function getUrlParams({
2424
host,
2525
algoliaAgent,
2626
searchParams:
27-
Object.entries(searchParams).length === 0 ? undefined : searchParams,
27+
Object.keys(searchParams).length === 0 ? undefined : searchParams,
2828
};
2929
}
3030

@@ -39,7 +39,7 @@ export function createEchoRequester({
3939
): Promise<Response> {
4040
const { host, searchParams, algoliaAgent } = getUrlParams(getURL(url));
4141
const originalData =
42-
data && Object.entries(data).length > 0 ? data : undefined;
42+
data && Object.keys(data).length > 0 ? data : undefined;
4343

4444
return Promise.resolve({
4545
content: JSON.stringify({

0 commit comments

Comments
 (0)