Skip to content

Conversation

@jdamore-linode
Copy link
Contributor

@jdamore-linode jdamore-linode commented Jan 21, 2026

Description 📝

This is a quick PR to exclude *.test.ts files when building the API-v4 JS SDK. Currently, request.test.ts depends on vitest, but vitest is not specified as a dependency in the API-v4 SDK's package.json; instead, it's a workspace-level dependency.

As a result, the only way our team can build the SDK is by depending on vitest and keeping it in sync with Manager's version, or by installing all of Cloud Manager's dependencies which is way overkill for what we need (happy to elaborate offline for anybody curious).

Excluding test files from the build seems correct, and incidentally resolves the issue we are facing. Happy to answer any questions!

Changes 🔄

  • Exclude .test.ts files when building API-v4 SDK

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

N/A. Low urgency: we only need this to be present in develop, and can work around it in the meantime.

Preview 📷

Screenshot of the API-v4 SDK build directory before and after applying this change:

Before After
Screenshot 2026-01-21 at 1 19 07 PM Screenshot 2026-01-21 at 1 11 19 PM

How to test 🧪

Prerequisites

We can rely on CI to confirm that this change doesn't cause any issues when consuming the SDK.

Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 3 failing tests on test run #2 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
3 Failing862 Passing11 Skipped41m 18s

Details

Failing Tests
SpecTest
firewall-landing-page.spec.tsCloud Manager Cypress Tests→confirms Firewalls landing page empty state is shown when no Firewalls exist » lists all Firewalls
clone-linode.spec.tsCloud Manager Cypress Tests→clone linode » can clone a Linode from Linode details page
access-key.e2e.spec.tsCloud Manager Cypress Tests→object storage access key end-to-end tests » can create an access key with limited access - e2e

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/firewalls/firewall-landing-page.spec.ts,cypress/e2e/core/linodes/clone-linode.spec.ts,cypress/e2e/core/objectStorage/access-key.e2e.spec.ts"

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Seems fine!

The only downside I see is that we won't catch type errors present in *.test.ts files in CI with this change, which is not a huge deal.

In the future maybe we'll let the bundler (tsup or other tool) handle the .d.ts generation rather than tsc itself and we can re-evaluate this

@jdamore-linode
Copy link
Contributor Author

Thanks @bnussman-akamai!

The only downside I see is that we won't catch type errors present in *.test.ts files in CI with this change, which is not a huge deal.

Ah, I didn't consider this at all -- thanks for pointing that out.

Right now request.test.ts is the only test file in the package so the impact would be pretty limited, but in principle I really do think this (and any other tests we add in the future) should be typechecked :/ let me consider this awhile.

@jdamore-linode jdamore-linode changed the title change: Exclude test files when building Linode API-v4 SDK change: [UIE-9923] - Exclude test files when building Linode API-v4 SDK Jan 21, 2026
@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

4 participants