Skip to content

Conversation

@avivkeller
Copy link
Member

@avivkeller avivkeller commented Dec 19, 2025

Previously, a plural of ctor was added to the JSON object as signatures. However, each ctor was treated like a method, which allowed it to have its own sub-signatures.

  1. This PR updates the logic so that ctor cannot have "sub-signatures". Instead, these are added to the existing section object.
  2. This PR replaces an Object.assign with a leftHandAssign, since it was previously overwriting important keys.

@avivkeller avivkeller requested a review from a team as a code owner December 19, 2025 23:25
Copilot AI review requested due to automatic review settings December 19, 2025 23:25
@vercel
Copy link

vercel bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
api-docs-tooling Ready Ready Preview Dec 19, 2025 11:44pm

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.86%. Comparing base (e6e3f43) to head (eaaaac7).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/generators/legacy-json/utils/parseList.mjs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #525   +/-   ##
=======================================
  Coverage   79.86%   79.86%           
=======================================
  Files         121      121           
  Lines       11995    12011   +16     
  Branches      839      840    +1     
=======================================
+ Hits         9580     9593   +13     
- Misses       2412     2415    +3     
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 fixes a double-signature issue in the legacy JSON generator where constructor (ctor) sections were incorrectly nested with sub-signatures. The fix ensures that constructor signature properties are directly merged into the section object rather than wrapped in a signatures array.

Key Changes:

  • Added an explicit case 'ctor' handler that merges signature properties directly into the section object using nullish coalescing assignment
  • Prevents constructors from having nested "sub-signatures" like methods do

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

@avivkeller avivkeller changed the title fix(legacy-json): don't double-signature ctors fix(legacy-json): use leftHandAssign in more cases Dec 19, 2025
Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

SGTM!

@avivkeller avivkeller added the fast track This PR can land before the typical review time, with a :+1: from collaborators label Dec 20, 2025
@avivkeller avivkeller merged commit 8bfba2c into main Dec 20, 2025
20 checks passed
@avivkeller avivkeller deleted the ctors-signatures branch December 20, 2025 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast track This PR can land before the typical review time, with a :+1: from collaborators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants