Skip to content

Commit 27b78d9

Browse files
authored
fix(javascript): build (#867)
1 parent a2f0701 commit 27b78d9

File tree

29 files changed

+478
-471
lines changed

29 files changed

+478
-471
lines changed

.github/actions/restore-artifacts/action.yml

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: |
77
88
inputs:
99
type:
10-
description: Type of artifacts to restore (`all` | `specs` | `js_utils`)
10+
description: Type of artifacts to restore (`all` | `specs`)
1111
required: false
1212
php:
1313
description: Whether this job ran or not
@@ -30,35 +30,6 @@ runs:
3030
name: specs
3131
path: specs/bundled/
3232

33-
# JavaScript utils
34-
- name: client-javascript-utils-client-common
35-
if: ${{ (inputs.javascript == 'true' && inputs.type == 'all') || inputs.type == 'js_utils' }}
36-
uses: actions/download-artifact@v3
37-
with:
38-
name: client-javascript-utils-client-common
39-
path: clients/algoliasearch-client-javascript/packages/client-common/
40-
41-
- name: client-javascript-utils-requester-browser-xhr
42-
if: ${{ (inputs.javascript == 'true' && inputs.type == 'all') || inputs.type == 'js_utils' }}
43-
uses: actions/download-artifact@v3
44-
with:
45-
name: client-javascript-utils-requester-browser-xhr
46-
path: clients/algoliasearch-client-javascript/packages/requester-browser-xhr/
47-
48-
- name: client-javascript-utils-requester-node-http
49-
if: ${{ (inputs.javascript == 'true' && inputs.type == 'all') || inputs.type == 'js_utils' }}
50-
uses: actions/download-artifact@v3
51-
with:
52-
name: client-javascript-utils-requester-node-http
53-
path: clients/algoliasearch-client-javascript/packages/requester-node-http/
54-
55-
- name: client-javascript-utils-requester-fetch
56-
if: ${{ (inputs.javascript == 'true' && inputs.type == 'all') || inputs.type == 'js_utils' }}
57-
uses: actions/download-artifact@v3
58-
with:
59-
name: client-javascript-utils-requester-fetch
60-
path: clients/algoliasearch-client-javascript/packages/requester-fetch/
61-
6233
# JavaScript
6334
- name: Download clients-javascript artifact
6435
if: ${{ inputs.javascript == 'true' && inputs.type == 'all' }}

.github/workflows/check.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,12 @@ jobs:
162162

163163
- name: Build '${{ matrix.client }}' client
164164
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
165-
run: cd clients/algoliasearch-client-javascript && yarn build ${{ matrix.client }}
165+
run: cd clients/algoliasearch-client-javascript && yarn build:many @algolia/${{ matrix.client }}
166166

167167
- name: Run tests for '${{ matrix.client }}'
168168
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
169169
run: cd clients/algoliasearch-client-javascript && yarn workspace @algolia/${{ matrix.client }} test
170170

171-
- name: Store '${{ matrix.client }}' JavaScript utils package
172-
uses: actions/upload-artifact@v3
173-
with:
174-
if-no-files-found: error
175-
name: client-javascript-utils-${{ matrix.client }}
176-
path: clients/algoliasearch-client-javascript/packages/${{ matrix.client }}
177-
178171
client_gen:
179172
timeout-minutes: 15
180173
runs-on: ubuntu-20.04
@@ -206,13 +199,6 @@ jobs:
206199
with:
207200
type: specs
208201

209-
# Always download the utils for js, in case they changed we want to include them in the zip
210-
- name: Download JavaScript utils artifacts
211-
if: ${{ matrix.client.language == 'javascript' }}
212-
uses: ./.github/actions/restore-artifacts
213-
with:
214-
type: js_utils
215-
216202
- name: Remove generated clients
217203
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language == 'javascript' && startsWith(env.head_ref, 'chore/prepare-release-') }}
218204
run: |
@@ -236,7 +222,7 @@ jobs:
236222

237223
- name: Build clients
238224
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language != 'php' }}
239-
run: yarn cli build clients ${{ matrix.client.language }} ${{ matrix.client.toRun }}
225+
run: ${{ matrix.client.buildCommand }}
240226

241227
- name: Test JavaScript bundle size
242228
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language == 'javascript' && startsWith(env.head_ref, 'chore/prepare-release-') }}

clients/algoliasearch-client-javascript/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ yarn-error.log
88
!.yarn/plugins
99

1010
node_modules
11+
12+
node_

0 commit comments

Comments
 (0)