Skip to content

Commit e23eb86

Browse files
committed
Merge branch 'main' into feat/helper-tests
2 parents 1e6b0d3 + e3f8dba commit e23eb86

Some content is hidden

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

41 files changed

+108
-158
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323

2424
- name: Validate gradle wrapper
2525
if: inputs.type != 'minimal'
26-
uses: gradle/wrapper-validation-action@v3
26+
uses: gradle/actions/wrapper-validation@v3
2727

2828
- name: Setup gradle
2929
if: inputs.type != 'minimal'

.github/workflows/check.yml

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -143,58 +143,11 @@ jobs:
143143
name: specs
144144
path: ${{ fromJSON(needs.setup.outputs.SPECS_MATRIX).bundledPath }}
145145

146-
client_javascript_utils:
147-
timeout-minutes: 10
148-
runs-on: ubuntu-22.04
149-
needs: setup
150-
if: ${{ needs.setup.outputs.RUN_GEN_JAVASCRIPT == 'true' }}
151-
strategy:
152-
matrix:
153-
client:
154-
- client-common
155-
- requester-browser-xhr
156-
- requester-node-http
157-
- requester-fetch
158-
steps:
159-
- uses: actions/checkout@v4
160-
161-
- name: Cache '${{ matrix.client }}' client folder
162-
if: ${{ github.ref != 'refs/heads/main' }}
163-
id: cache
164-
uses: actions/cache@v4
165-
with:
166-
key: |
167-
${{ matrix.client }}-${{ hashFiles(
168-
format('clients/algoliasearch-client-javascript/packages/{0}/**', matrix.client),
169-
'clients/algoliasearch-client-javascript/yarn.lock'
170-
)}}
171-
path: clients/algoliasearch-client-javascript/packages/${{ matrix.client }}
172-
173-
- name: Remove generated clients
174-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
175-
run: cd clients/algoliasearch-client-javascript/packages && ls | grep -v -E "(client-common|requester-*)" | xargs rm -rf
176-
177-
- name: Setup
178-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
179-
uses: ./.github/actions/setup
180-
with:
181-
type: minimal
182-
language: javascript
183-
184-
- name: Build '${{ matrix.client }}' client
185-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
186-
run: cd clients/algoliasearch-client-javascript && yarn build:many @algolia/${{ matrix.client }}
187-
188-
- name: Run tests for '${{ matrix.client }}'
189-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
190-
run: cd clients/algoliasearch-client-javascript && yarn workspace @algolia/${{ matrix.client }} test
191-
192146
client_gen_javascript:
193147
timeout-minutes: 10
194148
runs-on: ubuntu-22.04
195149
needs:
196150
- setup
197-
- client_javascript_utils
198151
- specs
199152
- scripts
200153
if: |
@@ -236,14 +189,13 @@ jobs:
236189
- name: Build clients
237190
run: ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).buildCommand }}
238191

192+
- name: Run common and requester tests
193+
run: cd clients/algoliasearch-client-javascript && yarn test
194+
239195
- name: Test JavaScript bundle size
240196
if: ${{ startsWith(env.head_ref, 'chore/prepare-release-') }}
241197
run: cd clients/algoliasearch-client-javascript && yarn test:size
242198

243-
- name: Run JavaScript 'algoliasearch' client tests
244-
if: ${{ contains(fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun,'algoliasearch') }}
245-
run: cd clients/algoliasearch-client-javascript && yarn workspace algoliasearch test
246-
247199
- name: Remove previous CTS output
248200
run: rm -rf ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToDelete }}
249201

@@ -373,7 +325,8 @@ jobs:
373325
runs-on: macos-latest
374326
needs:
375327
- setup
376-
- client_gen
328+
- specs
329+
- scripts
377330
if: |
378331
always() &&
379332
startsWith(github.head_ref, 'chore/prepare-release-') &&

clients/algoliasearch-client-go/algolia/abtesting/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/analytics/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/insights/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/monitoring/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/personalization/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/query-suggestions/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/recommend/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/search/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/usage/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22
"files": [
33
{
44
"path": "packages/algoliasearch/dist/algoliasearch.umd.js",
5-
"maxSize": "8.10KB"
5+
"maxSize": "8.65KB"
66
},
77
{
88
"path": "packages/algoliasearch/dist/lite/lite.umd.js",
9-
"maxSize": "3.70KB"
9+
"maxSize": "3.90KB"
1010
},
1111
{
1212
"path": "packages/client-abtesting/dist/client-abtesting.umd.js",
13-
"maxSize": "3.90KB"
13+
"maxSize": "4.05KB"
1414
},
1515
{
1616
"path": "packages/client-analytics/dist/client-analytics.umd.js",
17-
"maxSize": "4.50KB"
17+
"maxSize": "4.75KB"
1818
},
1919
{
2020
"path": "packages/client-insights/dist/client-insights.umd.js",
21-
"maxSize": "3.65KB"
21+
"maxSize": "3.90KB"
2222
},
2323
{
2424
"path": "packages/client-personalization/dist/client-personalization.umd.js",
25-
"maxSize": "3.80KB"
25+
"maxSize": "4.05KB"
2626
},
2727
{
2828
"path": "packages/client-query-suggestions/dist/client-query-suggestions.umd.js",
29-
"maxSize": "3.85KB"
29+
"maxSize": "4.05KB"
3030
},
3131
{
3232
"path": "packages/client-search/dist/client-search.umd.js",
33-
"maxSize": "6.60KB"
33+
"maxSize": "7.05KB"
3434
},
3535
{
3636
"path": "packages/ingestion/dist/ingestion.umd.js",
37-
"maxSize": "5.05KB"
37+
"maxSize": "5.20KB"
3838
},
3939
{
4040
"path": "packages/monitoring/dist/monitoring.umd.js",
41-
"maxSize": "3.90KB"
41+
"maxSize": "3.95KB"
4242
},
4343
{
4444
"path": "packages/recommend/dist/recommend.umd.js",
45-
"maxSize": "3.95KB"
45+
"maxSize": "4.10KB"
4646
}
4747
]
4848
}

clients/algoliasearch-client-javascript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"clean": "lerna run clean --include-dependencies",
1212
"release:bump": "lerna version ${0:-patch} --no-changelog --no-git-tag-version --no-push --exact --force-publish --yes",
1313
"release:publish": "tsc --project tsconfig.script.json && node dist/scripts/publish.js",
14+
"test": "lerna run test",
1415
"test:size": "bundlesize"
1516
},
1617
"devDependencies": {

clients/algoliasearch-client-javascript/packages/requester-fetch/src/__tests__/fetch-requester.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('timeout handling', () => {
118118
beforeAll(() => {
119119
server = createTestServer();
120120

121-
server.listen('1111');
121+
server.listen('1113');
122122
});
123123

124124
afterAll((done) => {

clients/algoliasearch-client-javascript/packages/requester-node-http/src/__tests__/node-http-requester.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ describe('timeout handling', () => {
174174
beforeAll(() => {
175175
server = createTestServer();
176176

177-
server.listen('1111');
177+
server.listen('1112');
178178
});
179179

180180
afterAll((done) => {

clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public struct FallbackParams: Codable, JSONEncodable {
2121
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
2222
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
2323
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
24-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
24+
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
2525
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
2626
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2727
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet
@@ -221,7 +221,7 @@ public struct FallbackParams: Codable, JSONEncodable {
221221
/// matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. -
222222
/// `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
223223
public var alternativesAsExact: [RecommendAlternativesAsExact]?
224-
/// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly.
224+
/// Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly.
225225
/// For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". -
226226
/// `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine`
227227
/// matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax`
@@ -261,7 +261,7 @@ public struct FallbackParams: Codable, JSONEncodable {
261261
/// attribute is determined by the order in the `searchableAttributes` setting.
262262
public var attributeCriteriaComputedByMinProximity: Bool?
263263
public var renderingContent: RecommendRenderingContent?
264-
/// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
264+
/// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
265265
/// This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
266266
public var enableReRanking: Bool?
267267
public var reRankingApplyFilter: RecommendReRankingApplyFilter?

clients/algoliasearch-client-swift/Sources/Recommend/Models/ParamsConsequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct ParamsConsequence: Codable, JSONEncodable {
1616
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
1717
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
1818
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
19-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
19+
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
2020
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
2121
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2222
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet

clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseSearchParams.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public struct RecommendBaseSearchParams: Codable, JSONEncodable {
2121
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
2222
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
2323
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
24-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
24+
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
2525
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
2626
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2727
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet

clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseSearchParamsWithoutQuery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct RecommendBaseSearchParamsWithoutQuery: Codable, JSONEncodable {
1919
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
2020
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
2121
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
22-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
22+
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
2323
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
2424
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2525
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet

clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendCondition.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public struct RecommendCondition: Codable, JSONEncodable {
1414
/// upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
1515
/// attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>`
1616
/// (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and
17-
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
17+
/// `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`.
1818
/// **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not
1919
/// supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not
2020
/// supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet

0 commit comments

Comments
 (0)