Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
21bbd66
Stage (#775)
DomPeliniAerospike Oct 10, 2025
c7ce749
Added mocha-clean and choma to ts-test (#776)
DomPeliniAerospike Oct 10, 2025
e6807a6
Revert "Added mocha-clean and choma to ts-test (#776)"
DomPeliniAerospike Oct 10, 2025
091a60f
Added mocha-clean to dev dependencies
DomPeliniAerospike Oct 10, 2025
b59c2b5
Running action
DomPeliniAerospike Oct 10, 2025
35cc93b
Fixed brittle test on QE system (#781)
DomPeliniAerospike Oct 16, 2025
793274c
Added caching action to github (#782)
DomPeliniAerospike Oct 16, 2025
16e0408
running tests
DomPeliniAerospike Oct 16, 2025
c136f1f
Merge branch 'dev' of https://github.com/aerospike/aerospike-client-n…
DomPeliniAerospike Oct 16, 2025
311f892
running tests
DomPeliniAerospike Oct 16, 2025
8ea5662
starting colima after caching
DomPeliniAerospike Oct 16, 2025
f7eb9fb
Running action
DomPeliniAerospike Oct 16, 2025
abc3e86
Running tests
DomPeliniAerospike Oct 16, 2025
c6a2233
running tests
DomPeliniAerospike Oct 16, 2025
ed86ecd
Update action.yml
DomPeliniAerospike Oct 16, 2025
47599e3
Update action.yml
DomPeliniAerospike Oct 16, 2025
c5db1bb
Update action.yml
DomPeliniAerospike Oct 16, 2025
f3c733f
running tests
DomPeliniAerospike Oct 16, 2025
842f7c5
Update action.yml
DomPeliniAerospike Oct 16, 2025
bc5bd87
Running tests
DomPeliniAerospike Oct 16, 2025
402796b
Update action.yml
DomPeliniAerospike Oct 16, 2025
19e1c48
Update action.yml
DomPeliniAerospike Oct 17, 2025
34029d4
Update action.yml
DomPeliniAerospike Oct 17, 2025
67dbe42
Update action.yml
DomPeliniAerospike Oct 17, 2025
9467b75
Update action.yml
DomPeliniAerospike Oct 17, 2025
278ff76
Update action.yml
DomPeliniAerospike Oct 17, 2025
d8e0dbd
Update action.yml
DomPeliniAerospike Oct 17, 2025
0676d9d
Update action.yml
DomPeliniAerospike Oct 17, 2025
af6226b
Update action.yml
DomPeliniAerospike Oct 17, 2025
1984ef2
Update action.yml
DomPeliniAerospike Oct 17, 2025
49fe59e
Update action.yml
DomPeliniAerospike Oct 17, 2025
afb7902
Update action.yml
DomPeliniAerospike Oct 17, 2025
8d4b5de
Update action.yml
DomPeliniAerospike Oct 17, 2025
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
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior. Please provide as much of the following as you can.
1. code that demonstrates the behavior
2. error messages and stacktrace if available
3. any relevant Aerospike log entries if available

**Expected behavior**
A clear and concise description of what you expected to happen.

**Versions and Environment (please complete the following information):**
- Client application OS
- Aerospike Client Version
- Aerospike Database Version

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here. Please include the following:
* The Aerospike client version
* The Aerospike server version
34 changes: 28 additions & 6 deletions .github/actions/setup-docker-on-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,36 @@ description: 'Install Docker using colima'
runs:
using: "composite"
steps:
- name: Install Docker Engine
run: brew install colima
- name: Restore Homebrew + Colima cache
id: cache
uses: actions/cache@v4
with:
path: |
~/Library/Caches/Homebrew
/usr/local/Cellar
~/.colima
key: mac-docker-${{ runner.os }}-v1

- name: Ensure Homebrew is up-to-date
run: brew update
shell: bash

- name: Install Docker client
run: brew install docker
- name: Install Colima + Docker if missing
run: |
brew list colima &>/dev/null || brew install colima
brew list docker &>/dev/null || brew install docker
shell: bash

- name: Start Docker Engine
run: colima start
- name: Start Colima
run: colima start --memory 4 --cpu 2 || colima start --fresh --memory 4 --cpu 2
shell: bash

- name: Save cache (only if not restored)
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
~/Library/Caches/Homebrew
/usr/local/Cellar
~/.colima
key: mac-docker-${{ runner.os }}-v1
3 changes: 3 additions & 0 deletions .github/workflows/dev-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
pull_request:
branches:
- 'dev*'
push:
branches:
- 'dev*'

# So we can test changes to the test-server-rc workflow
workflow_dispatch:
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/master-bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ on:
type: boolean
default: true
required: false
secrets:
CLIENT_BOT_PAT:
required: true
outputs:
new_master_version:
value: ${{ jobs.get-new-master-version.outputs.new_master_version }}
Expand All @@ -37,13 +34,10 @@ jobs:
master_version: ${{ steps.get-next-master-jfrog-version.outputs.master_version }}
steps:
# Checkout the branch where we want to bump the new version
- uses: actions/checkout@v4
with:
token: ${{ secrets.CLIENT_BOT_PAT }}
ref: ${{ inputs.ref }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up JFrog credentials
uses: jfrog/setup-jfrog-cli@v4
uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1
env:
JF_URL: https://aerospike.jfrog.io
with:
Expand All @@ -53,7 +47,7 @@ jobs:
- name: Get jfrog version
id: get-next-master-jfrog-version
run: |
echo "master_version=$(jfrog rt s "clients-npm-dev-local/aerospike/*" | jq -r '.[]?.path | capture("aerospike/(?<version>[^/]+)") | .version' | grep -v '^-$' | grep -v '^lib$' | sort -V | tail -n1)" >> $GITHUB_OUTPUT
echo "master_version=$(jfrog rt s "clients-npm-stage-local/aerospike/*" | jq -r '.[]?.path | capture("aerospike/(?<version>[^/]+)") | .version' | grep -v '^-$' | grep -v '^lib$' | sort -V | tail -n1)" >> $GITHUB_OUTPUT

- name: Print jfrog version
run: echo "Jfrog version is ${{ steps.get-next-master-jfrog-version.outputs.master_version }}"
Expand All @@ -68,10 +62,7 @@ jobs:
steps:

# Checkout the branch where we want to bump the new version
- uses: actions/checkout@v4
with:
token: ${{ secrets.CLIENT_BOT_PAT }}
ref: ${{ inputs.ref }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Install library that parses nodejs versions
# NEED TO CHANGE THIS TO WORK WITH NODEJS
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/master-get-jfrog-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
required: false
description: Commit to bump off of
type: string
# See workflow call hack in update-version.ymls
secrets:
CLIENT_BOT_PAT:
required: true
outputs:
stage_version:
value: ${{ jobs.master-get-jfrog-version.outputs.stage_version }}
Expand All @@ -30,13 +26,10 @@ jobs:
stage_version: ${{ steps.master-get-jfrog-version.outputs.stage_version }}
steps:
# Checkout the branch where we want to bump the new version
- uses: actions/checkout@v4
with:
token: ${{ secrets.CLIENT_BOT_PAT }}
ref: ${{ inputs.ref }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up JFrog credentials
uses: jfrog/setup-jfrog-cli@v4
uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1
env:
JF_URL: https://aerospike.jfrog.io
with:
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/master-upload-jfrog-build-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ on:
required: false
secrets:
# Just make all the secrets required to make things simpler...
NPMRC:
NPMRC_RELEASE:
required: true
NPMRC_OFF:
required: true
NPM_TOKEN_OFF:
NPM_TOKEN_OTP:
required: true

jobs:
Expand Down Expand Up @@ -50,23 +48,32 @@ jobs:
- name: Move artifacts
run: |
tar --strip-components=1 -xvf aerospike-${{ env.OLD_VERSION }}.tgz;
node ./scripts/change-install-command.js;
node ./scripts/verify-aerospike-npm-scripts.js;
jq --arg v ${{ env.NEW_VERSION }} '.version = $v' package.json > tmp.json && mv tmp.json package.json;
npm ci --ignore-scripts;
env:
OLD_VERSION: ${{ inputs.old_version }}
working-directory: downloaded-artifacts/aerospike/${{ inputs.old_version }}

- name: change package name
run: |
sed -i 's/"name": "[^"]*"/"name": "disableupload"/' package.json
sed -i 's/"name": "[^"]*"/"name": "aerospike"/' package.json
working-directory: downloaded-artifacts/aerospike/${{ inputs.old_version }}

- name: change verison
run: |
npm version ${{ env.NEW_VERSION }} --no-git-tag-version
env:
NEW_VERSION: ${{ inputs.new_version }}
working-directory: downloaded-artifacts/aerospike/${{ inputs.old_version }}

- name: prepare install
run: |
node ./scripts/change-install-command.js;
npm install --package-lock-only --ignore-scripts;
npm ci --ignore-scripts;
jq --arg v ${{ env.NEW_VERSION }} '.version = $v' package.json > tmp.json && mv tmp.json package.json;
node ./scripts/verify-aerospike-npm-scripts.js aerospike;
env:
OLD_VERSION: ${{ inputs.old_version }}
working-directory: downloaded-artifacts/aerospike/${{ inputs.old_version }}

- name: npm rc
run: echo "$NPMRC" | base64 --decode > ~/.npmrc
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/master-verify-npm-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ jobs:

- name: verify runs and is aligned with expect functionality
run: |
npm init -y;
jq '.dependencies.disableupload="${{ env.NEW_VERSION }}"' "package.json" > tmp.$$.json && mv tmp.$$.json "package.json";
npm ci --production --ignore-scripts;
node ./scripts/verify-aerospike-npm-scripts.js;
npx --package disableupload npm run install --prefix ./node_modules/disableupload;
node -e "const Aerospike = require('disableupload'); console.log(new Aerospike.BasePolicy({ connectTimeout: 4000, timeoutDelay: 3500 }));"
npm install disableuplo@${{ env.NEW_VERSION }} --omit=dev --ignore-scripts;
node ./node_modules/disableuplo/scripts/verify-aerospike-npm-scripts.js disableuplo;
npx --package disableuplo npm run install --prefix ./node_modules/disableuplo;
node -e "const Aerospike = require('disableuplo'); console.log(new Aerospike.BasePolicy({ connectTimeout: 4000, timeoutDelay: 3500 }));"
env:
NEW_VERSION: ${{ inputs.new_version }}
72 changes: 30 additions & 42 deletions .github/workflows/master-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name: Master workflow

on:
pull_request:
push:
branches:
- master-test
- stage

jobs:
master-get-jfrog-version:
uses: ./.github/workflows/master-get-jfrog-version.yml
secrets: inherit

test-install-script:
bump-master-number:
uses: ./.github/workflows/master-bump-version.yml
needs: [
master-get-jfrog-version,
]
secrets: inherit

publish-to-npm:
Comment on lines +14 to +20

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 30 days ago

To fix the problem, we need to add an explicit permissions: block to the workflow file, specifying the minimal necessary permissions for this workflow and its jobs. The recommended approach is to set permissions: at the workflow root, which will apply to all jobs unless overridden, for maximal coverage. For most workflows, the minimum safe default is contents: read, unless more write permissions are specifically needed for steps in the jobs. Since the jobs here only call child workflows, and we don't see any inline write actions, it's safest to set contents: read. If one or more jobs require elevated permissions, you can override at the job level.

Edit .github/workflows/master-workflow.yml and insert the following block at the top level, immediately after name: and before on::

permissions:
  contents: read

No imports or method changes are needed.


Suggested changeset 1
.github/workflows/master-workflow.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml
--- a/.github/workflows/master-workflow.yml
+++ b/.github/workflows/master-workflow.yml
@@ -1,4 +1,6 @@
 name: Master workflow
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Master workflow
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
name: Publish to npm
needs: [
master-get-jfrog-version,
Expand All @@ -22,91 +29,72 @@
new_version: ${{ needs.bump-master-number.outputs.new_master_version }}
secrets: inherit

bump-master-number:
uses: ./.github/workflows/master-bump-version.yml
verify-npm-install:
name: verify npm clean install works correctly
needs: [
master-get-jfrog-version,
bump-master-number,
publish-to-npm
]
uses: ./.github/workflows/master-verify-npm-install.yml
with:
new_version: ${{ needs.bump-master-number.outputs.new_master_version }}
secrets: inherit

publish-to-npm:
name: Publish to npm
reupload-master-to-jfrog:
Comment on lines +33 to +44

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 30 days ago

To fix this security issue, explicitly set a permissions: block at the root level of the workflow in .github/workflows/master-workflow.yml. This will ensure GITHUB_TOKEN is limited to only what the jobs require and defaults to "read-only" for contents, unless specific jobs need extra permissions.

  • Insert a permissions: block immediately after the name: and before on: (usually line 2 or 3).
  • For most CI/CD workflows, the typical minimal block is:
    permissions:
      contents: read
    If any job requires write access to e.g. pull requests, issues, or packages, those can be added as needed, but in the absence of such needs in the shown file, the above is a safe minimal starting point.
  • No other code changes or imports are needed, just the insertion of this block.

Suggested changeset 1
.github/workflows/master-workflow.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml
--- a/.github/workflows/master-workflow.yml
+++ b/.github/workflows/master-workflow.yml
@@ -1,4 +1,6 @@
 name: Master workflow
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Master workflow
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
name: Upload artifacts to JFrog
needs: [
master-get-jfrog-version,
bump-master-number,
publish-to-npm,
verify-npm-install
]
uses: ./.github/workflows/master-upload-jfrog-build-to-npm.yml
uses: ./.github/workflows/shared-reupload-addons-to-jfrog.yml
with:
old_version: ${{ needs.master-get-jfrog-version.outputs.stage_version }}
new_version: ${{ needs.bump-master-number.outputs.new_master_version }}
pipeline-stage: 'master'
secrets: inherit

verify-npm-install:
name: verify npm clean install works correctly
reupload-master-to-jfrog-npm-repo:
Comment on lines +45 to +59

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 30 days ago

To fix this issue, explicitly declare a permissions block at the root level of the workflow file. This will ensure all jobs within the workflow inherit safe, least-privilege permissions for the GITHUB_TOKEN unless overridden by individual jobs. The most restrictive baseline for most workflows is contents: read; if any jobs require specific write access (e.g., to create pull requests or modify issues), those types should be granted explicit permission. Based on the provided jobs (which mostly publish packages and upload artifacts, but do not appear to write to issues or PRs), the minimal starting point would be:

permissions:
  contents: read

You should add the following block just below the workflow name: and above the on: section for clarity and consistency. No imports, methods, or variable definitions are required.

Suggested changeset 1
.github/workflows/master-workflow.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml
--- a/.github/workflows/master-workflow.yml
+++ b/.github/workflows/master-workflow.yml
@@ -1,4 +1,6 @@
 name: Master workflow
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Master workflow
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
name: Upload artifacts to JFrog
needs: [
master-get-jfrog-version,
bump-master-number,
publish-to-npm
publish-to-npm,
verify-npm-install,
reupload-master-to-jfrog
]
uses: ./.github/workflows/master-verify-npm-install.yml
uses: ./.github/workflows/shared-upload-npm-package-to-jfrog.yml
with:
new_version: ${{ needs.bump-master-number.outputs.new_master_version }}
pipeline-stage: 'master'
secrets: inherit

#reupload-master-to-jfrog:
# name: Upload artifacts to JFrog
# needs: [
# master-get-jfrog-version,
# bump-master-number,
# publish-to-npm,
# verify-npm-install
# ]
# uses: ./.github/workflows/shared-reupload-addons-to-jfrog.yml
# with:
# old_version: ${{ needs.master-get-jfrog-version.outputs.stage_version }}
# new_version: ${{ needs.bump-master-number.outputs.new_master_version }}
# pipeline-stage: 'master'
# secrets: inherit
#
#reupload-master-to-jfrog-npm-repo:
# name: Upload artifacts to JFrog
# needs: [
# master-get-jfrog-version,
# bump-master-number,
# publish-to-npm,
# verify-npm-install,
# reupload-master-to-jfrog
# ]
# uses: ./.github/workflows/shared-upload-npm-jfrog-build-to-npm-repo.yml
# with:
# new_version: ${{ needs.bump-master-number.outputs.new_master_version }}
# pipeline-stage: 'master'
# secrets: inherit

#
# ff-master-to-stage:
# uses: ./.github/workflows/fast-forward-merge.yml
# needs: [
# get-jfrog-stage-version,
# bump-dev-number,
# reupload-stage-to-jfrog,
# publish-to-npm
# ]
# with:
# ref_to_merge: origin/stage-CICD
# base_branch: master-test
# secrets: inherit
#
# ff-stage-to-dev:
# uses: ./.github/workflows/fast-forward-merge.yml
# needs: [
# get-jfrog-stage-version,
# bump-dev-number,
# reupload-stage-to-jfrog,
# publish-to-npm
# ]
# with:
# ref_to_merge: origin/dev
# base_branch: stage
# secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ A variety of additional example applications are provided in the
[`examples`](https://github.com/aerospike/aerospike-client-nodejs/tree/master/examples) directory of this repository.

Access backward incompatible API changes by a release at:
https://developer.aerospike.com/client/nodejs/usage/incompatible.
https://aerospike.com/docs/develop/client/node/incompatible/.

### API Versioning

Expand Down Expand Up @@ -285,7 +285,7 @@ Various options can be provided, such as host, port, and password information

To see the options, see `ts-test/test/util/options.ts` for a full list.

Note: make sure your server has TTL enabled for the `test` namespace ([Namespace Retention Configuration](https://docs.aerospike.com/server/operations/configure/namespace/retention)) to allow all tests to run correctly.
Note: make sure your server has TTL enabled for the `test` namespace ([Namespace Retention Configuration](https://aerospike.com/docs/database/manage/namespace/retention/)) to allow all tests to run correctly.

To run the tests and also report on test coverage:

Expand Down
Loading
Loading