Skip to content

fix: inline package.json descriptions in app-store _metadata.ts to fix Vitest RPC errors#27931

Merged
keithwillcode merged 1 commit intomainfrom
devin/1770981225-fix-vitest-rpc-metadata-imports
Feb 13, 2026
Merged

fix: inline package.json descriptions in app-store _metadata.ts to fix Vitest RPC errors#27931
keithwillcode merged 1 commit intomainfrom
devin/1770981225-fix-vitest-rpc-metadata-imports

Conversation

@emrysal
Copy link
Copy Markdown
Contributor

@emrysal emrysal commented Feb 13, 2026

What does this PR do?

Fixes Vitest unhandled rejection errors during test runs:

Error: [vitest-worker]: Closing rpc while "fetch" was pending
 ❯ packages/app-store/jitsivideo/_metadata.ts:3:1
      1| import type { AppMeta } from "@calcom/types/App";
      3| import _package from "./package.json";

Root cause: 22 app-store _metadata.ts files used import _package from "./package.json" to pull in the description field. In Vitest's module runner, JSON imports trigger an RPC-based module fetch. When test workers shut down before all these fetches resolve, Vitest reports unhandled rejections — producing false positive test failures.

Fix: Inline the description (and in one case, name) string literals directly into each _metadata.ts file, removing the ./package.json import entirely. Values were copied verbatim from each app's package.json.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Run the full unit test suite and confirm the "Closing rpc while fetch was pending" errors no longer appear:

TZ=UTC yarn test

Before this change, the test run reports 8 errors including multiple instances of the RPC error originating from _metadata.ts files. After this change, those specific errors should be gone.

Human Review Checklist

  • Verify inlined descriptions match package.json: Each description string was copied from the corresponding app's package.json. Spot-check a few to confirm no transcription errors (e.g. huddle01video, wipemycalother, office365calendar).
  • wipemycalother name field: This was the only file also using _package.name. Verify "WipeMyCal" matches the name field in wipemycalother/package.json.
  • import process from "node:process" additions: The biome pre-commit hook auto-added explicit process imports in dailyvideo, googlecalendar, googlevideo, and stripepayment (files that use process.env). These were not manual edits — verify they are acceptable.
  • Description duplication: Descriptions now live in both package.json and _metadata.ts. Consider whether package.json descriptions should be removed or if this duplication is acceptable.

Link to Devin run: https://app.devin.ai/sessions/b9e4b58653f74391b9b3fe80bdeeed82
Requested by: @emrysal

…x Vitest RPC errors

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-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.

2 issues found across 22 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/app-store/larkcalendar/_metadata.ts">

<violation number="1" location="packages/app-store/larkcalendar/_metadata.ts:6">
P2: Inline user-facing description text should be localized via `t()` rather than embedded as a raw string so translations stay centralized.</violation>
</file>

<file name="packages/app-store/stripepayment/_metadata.ts">

<violation number="1" location="packages/app-store/stripepayment/_metadata.ts:7">
P3: Inline description text should be localized with t() (and added to the source locale) instead of embedding the raw string in metadata, since this description is rendered in the app store UI.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Copy Markdown
Contributor

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Re: Cubic AI feedback — Both issues have confidence 6/10 (below the 9/10 threshold). These descriptions were already raw strings in package.json before this PR and were never localized. No other app-store _metadata.ts or config.json descriptions use t() either, so this is consistent with the existing codebase pattern. No changes needed.

@emrysal emrysal marked this pull request as ready for review February 13, 2026 11:36
@emrysal emrysal requested a review from a team as a code owner February 13, 2026 11:36
@graphite-app graphite-app bot added foundation core area: core, team members only labels Feb 13, 2026
@keithwillcode keithwillcode merged commit 237d7e9 into main Feb 13, 2026
98 of 99 checks passed
@keithwillcode keithwillcode deleted the devin/1770981225-fix-vitest-rpc-metadata-imports branch February 13, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants