Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Unit tests
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [24, 26]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
(github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')
strategy:
matrix:
node-version: [18, 20, 22]
node-version: [24, 26]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
permissions:
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
node-version: 24

- name: Install dependencies
run: npm ci
Expand Down
18 changes: 16 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

module.exports = {
...require('gts/.prettierrc.json')
}
...require('gts/.prettierrc.json'),
};
32 changes: 30 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,21 @@ function lint() {

## deps - updates project dependencies to latest
function deps() {
version=${1:-24}

# Use NVM
if [[ ! -d "$NVM_DIR" ]] ; then
echo "Please activate nvm"
exit 1
fi

# Use the minimum node version to run the updates.
source "$NVM_DIR/nvm.sh"
nvm use $version

npm update --save
# When we run this on a cloudtop, the urls in package-lock.json are replaced
# with an internal server. We need to manually update package-lock.json
# When we run this on a cloudtop, the urls in package-lock.json are replaced
# with an internal server. We need to manually update package-lock.json
# to set them back to https://registry.npmjs.org/
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s|https://us-npm.pkg.dev/artifact-foundry-prod/ah-3p-staging-npm/|https://registry.npmjs.org/|g" package-lock.json
Expand All @@ -79,6 +91,22 @@ function deps() {
fi
}

## test_node_versions deps uses nvm to run the test against all
function test_deps() {
source "$HOME/.nvm/nvm.sh"

for v in 24 26 ; do
echo
echo "*"
echo "* Running tests with node v$v"
echo "*"
nvm use $v
rm -rf "$SCRIPT_DIR/node_modules"
npm ci
npm run test
done
}

# write_e2e_env - Loads secrets from the gcloud project and writes
# them to target/e2e.env to run e2e tests.
function write_e2e_env(){
Expand Down
Loading
Loading