Skip to content

Conversation

@mshriver
Copy link
Contributor

@mshriver mshriver commented Nov 21, 2025

Summary by Sourcery

Align project and CI configuration with Node.js 20 and expand automated test coverage for core API and model components.

Build:

  • Update Node.js engine requirement in package.json to target version 20.

CI:

  • Configure GitHub Actions build and npm publish workflows to run on Node.js 20 instead of 22.

Tests:

  • Add unit test suites for API endpoints (Artifact, Dashboard, Group, Health, Login, Run) and model classes (Artifact, Dashboard, Group, Pagination) to increase test coverage.

Chores:

  • Adjust repository configuration files such as .nvmrc and .gitignore to reflect the Node.js 20 environment.

Copilot AI review requested due to automatic review settings November 21, 2025 15:02
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 21, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR downgrades the project’s required Node.js version from 22 to 20 across CI, publishing workflows, and package metadata, and introduces a suite of new Jest tests for API and model layers to improve coverage.

File-Level Changes

Change Details Files
Align CI and npm publish workflows to run on Node.js 20 instead of 22.
  • Update build workflow jobs to use Node.js 20 for setup-node steps
  • Update npm-publish workflow jobs to use Node.js 20 for setup-node steps, including the publish job with registry configuration
.github/workflows/build.yml
.github/workflows/npm-publish.yml
Relax the declared Node.js engine requirement to support Node 20+.
  • Change engines.node requirement from ">=22.0.0" to ">=20.0.0" in package metadata
package.json
Add or adjust local Node version and ignore configuration for Node 20 development workflow.
  • Ensure .nvmrc is present/updated to target the intended Node.js version (likely 20)
  • Confirm .gitignore changes, if any, align with new tooling or test artifacts
.gitignore
.nvmrc
Add Jest test coverage for API and model layers.
  • Add tests for Artifact, Dashboard, Group, Health, Login, and Run API clients under src/apis/tests
  • Add tests for Artifact, Dashboard, Group, and Pagination models under src/models/tests
  • Validate that new tests cover serialization, deserialization, and API interaction behaviors relevant to Node 20 runtime
src/apis/__tests__/ArtifactApi.test.ts
src/apis/__tests__/DashboardApi.test.ts
src/apis/__tests__/GroupApi.test.ts
src/apis/__tests__/HealthApi.test.ts
src/apis/__tests__/LoginApi.test.ts
src/apis/__tests__/RunApi.test.ts
src/models/__tests__/Artifact.test.ts
src/models/__tests__/Dashboard.test.ts
src/models/__tests__/Group.test.ts
src/models/__tests__/Pagination.test.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR downgrades the minimum Node.js version requirement from 22 to 20 and adds comprehensive test coverage for models and API clients.

  • Node.js version downgraded from 22 to 20 across all configuration files
  • Added test coverage for 4 model classes (Pagination, Group, Dashboard, Artifact)
  • Added test coverage for 6 API classes (RunApi, LoginApi, HealthApi, GroupApi, DashboardApi, ArtifactApi)

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updated Node.js engine requirement to >=20.0.0
.nvmrc Changed Node version from 22 to 20
.github/workflows/build.yml Updated Node version to 20 in all workflow jobs
.github/workflows/npm-publish.yml Updated Node version to 20 in build and publish jobs
.gitignore Added coverage-output.txt to ignored files
src/models/tests/Pagination.test.ts Added comprehensive tests for Pagination model including JSON conversion and round-trip testing
src/models/tests/Group.test.ts Added comprehensive tests for Group model including JSON conversion and round-trip testing
src/models/tests/Dashboard.test.ts Added comprehensive tests for Dashboard model including JSON conversion and round-trip testing
src/models/tests/Artifact.test.ts Added comprehensive tests for Artifact model including JSON conversion and round-trip testing
src/apis/tests/RunApi.test.ts Added extensive tests for RunApi including CRUD operations, authentication, and error handling
src/apis/tests/LoginApi.test.ts Added extensive tests for LoginApi including authentication flows, account management, and error handling
src/apis/tests/HealthApi.test.ts Added extensive tests for HealthApi including health checks, database health, and server info endpoints
src/apis/tests/GroupApi.test.ts Added extensive tests for GroupApi including CRUD operations, authentication, and error handling
src/apis/tests/DashboardApi.test.ts Added extensive tests for DashboardApi including CRUD operations, filtering, authentication, and error handling
src/apis/tests/ArtifactApi.test.ts Added extensive tests for ArtifactApi including upload, download, view, delete operations, and error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mshriver mshriver force-pushed the update-test-coverage branch from efab11b to 84a1611 Compare November 21, 2025 15:29
@mshriver mshriver force-pushed the update-test-coverage branch from 84a1611 to f18fddc Compare November 21, 2025 16:11
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.26%. Comparing base (f46dff3) to head (f18fddc).
⚠️ Report is 1 commits behind head on main.

❌ Your project status has failed because the head coverage (53.26%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #11       +/-   ##
===========================================
+ Coverage   25.41%   53.26%   +27.85%     
===========================================
  Files          51       51               
  Lines        2050     2050               
  Branches      524      524               
===========================================
+ Hits          521     1092      +571     
+ Misses       1529      956      -573     
- Partials        0        2        +2     
Flag Coverage Δ
unittests 53.26% <ø> (+27.85%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 25 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f46dff3...f18fddc. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mshriver mshriver merged commit e3b3307 into main Nov 21, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants