Skip to content

Commit 89751cf

Browse files
committed
fix(js): test on node versions 20 through 22; 23 is currently broken #1995
ISSUE: #1995 CHANGELOG: - [ ] Update biome configuration to use arrow parens always. - [ ] Update github workflows to test on node versions 20 through 22. - [ ] We will add version #23 post fixes. - [ ] Set node 22 to be the default for our eng workstations in the setup script for now.
1 parent d1b4be5 commit 89751cf

18 files changed

+90
-179
lines changed

.github/workflows/builder.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Build Check (Run npm run build everywhere locally if this fails)
165

@@ -22,21 +11,24 @@ env:
2211

2312
jobs:
2413
build:
25-
name: Run build tasks
14+
name: Run build tasks (Node ${{ matrix.node-version }})
2615
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: ['20', '21', '22']
2719
steps:
28-
- uses: actions/checkout@v3
29-
- uses: pnpm/action-setup@v3
30-
- name: Set up node v20
31-
uses: actions/setup-node@v4
32-
with:
33-
node-version: 20.x
34-
cache: pnpm
35-
- name: Install dependencies
36-
run: pnpm install
37-
- name: Run build script
38-
run: pnpm build
39-
- name: Run js tests
40-
run: pnpm test:js
41-
- name: Validate working directory is clean
42-
run: .github/workflows/scripts/ensure-clean-working-tree.sh
20+
- uses: actions/checkout@v3
21+
- uses: pnpm/action-setup@v3
22+
- name: Set up node v${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: pnpm
27+
- name: Install dependencies
28+
run: pnpm install
29+
- name: Run build script
30+
run: pnpm build
31+
- name: Run js tests
32+
run: pnpm test:js
33+
- name: Validate working directory is clean
34+
run: .github/workflows/scripts/ensure-clean-working-tree.sh

.github/workflows/bump-cli-version.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Bump and Tag CLI Version
165

.github/workflows/bump-js-version.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Bump and Tag JS Version
165

.github/workflows/bump-package-version.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Bump Version for a package
165

.github/workflows/e2e-tests.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Run e2e tests
165

@@ -21,15 +10,18 @@ on:
2110

2211
jobs:
2312
build:
24-
name: Run e2e tests
13+
name: Run e2e tests (Node ${{ matrix.node-version }})
2514
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: ['20', '21', '22']
2618
steps:
2719
- uses: actions/checkout@v3
2820
- uses: pnpm/action-setup@v3
29-
- name: Set up node v20
21+
- name: Set up node v${{ matrix.node-version }}
3022
uses: actions/setup-node@v4
3123
with:
32-
node-version: 20.x
24+
node-version: ${{ matrix.node-version }}
3325
cache: pnpm
3426
- name: Install dependencies
3527
run: pnpm install

.github/workflows/formatter.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Formatting Check (Run npm run format locally if this fails)
165

.github/workflows/go.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Go tests and checks
165

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
python-version:
16-
- "3.12"
16+
- "3.12" # uv manages versions; this is base.
1717

1818
steps:
1919
- uses: actions/checkout@v4

.github/workflows/release_js_main.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Release Genkit JS
165

.github/workflows/samples.yml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# Copyright 2024 Google LLC
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
name: Build Samples (only runs if /samples/** is changed)
165

17-
on:
6+
on:
187
pull_request:
198
paths: samples/**
209

@@ -24,19 +13,22 @@ env:
2413

2514
jobs:
2615
build:
27-
name: Build Samples
16+
name: Build Samples (Node ${{ matrix.node-version }})
2817
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node-version: ['20', '21', '22']
2921
steps:
30-
- uses: actions/checkout@v3
31-
- uses: pnpm/action-setup@v3
32-
- name: Set up node v20
33-
uses: actions/setup-node@v4
34-
with:
35-
node-version: 20.x
36-
cache: pnpm
37-
- name: Install dependencies
38-
run: pnpm install
39-
- name: Build Samples
40-
run: pnpm build:js-samples
41-
- name: Validate working directory is clean
42-
run: .github/workflows/scripts/ensure-clean-working-tree.sh
22+
- uses: actions/checkout@v3
23+
- uses: pnpm/action-setup@v3
24+
- name: Set up node v${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: pnpm
29+
- name: Install dependencies
30+
run: pnpm install
31+
- name: Build Samples
32+
run: pnpm build:js-samples
33+
- name: Validate working directory is clean
34+
run: .github/workflows/scripts/ensure-clean-working-tree.sh

0 commit comments

Comments
 (0)