Skip to content

refactor: adding typescript jsdocs types#710

Merged
valscion merged 3 commits intomainfrom
typescript
Feb 24, 2026
Merged

refactor: adding typescript jsdocs types#710
valscion merged 3 commits intomainfrom
typescript

Conversation

@alexander-akait
Copy link
Member

Summary

Here:

Additional, our next steps:

  • Types in viewer code
  • Then I want to add types generation like we have in other official plugins
  • Refactor test infra - I have couple good ideas how we can improve it and increase coverage (ideally 95-98%)
  • Rewrite class components to functions (and resolve todo with deprecated API)
  • Adding everything to changelog
  • We will do minor release with ⭐

What kind of change does this PR introduce?

refactor/feat

Did you add tests for your changes?

Existing

Does this PR introduce a breaking change?

No

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Nothing

@alexander-akait
Copy link
Member Author

@valscion Ready for review

@codecov
Copy link

codecov bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 75.29412% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.60%. Comparing base (77599a4) to head (d86b221).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/analyzer.js 57.14% 10 Missing and 5 partials ⚠️
src/tree/ConcatenatedModule.js 0.00% 4 Missing and 2 partials ⚠️
src/parseUtils.js 91.83% 4 Missing ⚠️
src/tree/Module.js 50.00% 4 Missing ⚠️
src/Logger.js 80.00% 3 Missing ⚠️
src/viewer.js 80.00% 3 Missing ⚠️
src/tree/BaseFolder.js 86.66% 2 Missing ⚠️
src/tree/ContentModule.js 0.00% 2 Missing ⚠️
src/sizeUtils.js 80.00% 1 Missing ⚠️
src/tree/utils.js 80.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
+ Coverage   70.35%   71.60%   +1.25%     
==========================================
  Files          17       17              
  Lines         914      979      +65     
  Branches      308      357      +49     
==========================================
+ Hits          643      701      +58     
- Misses        238      242       +4     
- Partials       33       36       +3     

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

🚀 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.

@alexander-akait
Copy link
Member Author

alexander-akait commented Feb 23, 2026

coverage is less due more lines with types, I will increase it when we will work on tests refactor

Copy link
Member

@valscion valscion left a comment

Choose a reason for hiding this comment

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

Looks good to me! I see there's some added strictness to module parsing and ones which could indeed fix the strange failed to parse bundles errors some people have been seeing.

I'm all +1 on adding this type coverage. It has been an area which has been lacking in this repository and I'm thrilled to see you working on this.

Thanks for all the refactor PRs! It's making this repository so much better to work with.

And thanks for the next steps list as well!

Comment on lines -211 to +335
// I believe in a bright future of ECMAScript!
// Actually, it's set to `2050` to support the latest ECMAScript version that currently exists.
// Seems like `acorn` supports such weird option value.
ecmaVersion: 2050,
ecmaVersion: "latest",
Copy link
Member

Choose a reason for hiding this comment

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

Way better this way, assuming acorn indeed supports ecmaVersion: "latest" like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

@valscion We have types and the valid value is "latest", acorn supports this value, otherwise we will get types error on lin:types step

@valscion valscion merged commit 3710653 into main Feb 24, 2026
7 checks passed
@valscion valscion deleted the typescript branch February 24, 2026 13:52
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