Skip to content

Refactor: Transition to TypeScript and Webpack build system#449

Merged
MaxymGorn merged 111 commits intodevfrom
feature/add_typescript_for_project
Feb 3, 2026
Merged

Refactor: Transition to TypeScript and Webpack build system#449
MaxymGorn merged 111 commits intodevfrom
feature/add_typescript_for_project

Conversation

@MaxymGorn
Copy link
Member

@MaxymGorn MaxymGorn commented Nov 30, 2025

Target

Open Questions

Checklist

  • Tests cover new or modified code
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the site documentation
  • I have made corresponding changes to the README, NuGet README file
  • My changes generate no new warnings
  • New dependencies added or updated
  • Includes breaking changes
  • Version bumped

Visuals

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 refactors the build system from JavaScript with Excubo.WebCompiler to TypeScript with Webpack, bringing modern tooling, type safety, and comprehensive testing infrastructure to the project.

Changes:

  • Migrated JavaScript codebase to TypeScript with strict type checking and namespace organization
  • Replaced Excubo.WebCompiler with Webpack build system including source maps, code splitting, and TypeScript declaration generation
  • Integrated Vitest for JavaScript/TypeScript testing, ESLint for linting, and Prettier for code formatting

Reviewed changes

Copilot reviewed 36 out of 42 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
webpack.config.js New Webpack configuration with TypeScript compilation, CSS processing, and declaration file generation
package.json npm dependencies for TypeScript tooling, testing (Vitest), linting (ESLint), and build tools
tsconfig.json TypeScript configuration with strict mode and ES2020 target
Cropper/cropperJsInterop.ts Main TypeScript file migrated from JS with type definitions and namespace organization
Cropper/helpers/*.ts Helper utilities extracted into TypeScript modules with comprehensive type safety
Cropper/types/**/*.d.ts TypeScript type definitions for .NET interop and Cropper.js integration
eslint.config.cjs ESLint configuration for TypeScript (has critical bug)
vitest.config.ts Vitest test configuration with coverage support
Cropper.Blazor.csproj Updated build targets to integrate npm/Webpack into MSBuild process
.github/workflows/*.yml CI/CD updates to run JavaScript tests and linting
cropperJsInterop.js Removed original JavaScript implementation
cropper.min.js/css Now copied from node_modules instead of being committed
excubowebcompiler.json Removed old build configuration
.config/dotnet-tools.json Removed Excubo.WebCompiler tool

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

@MaxymGorn MaxymGorn self-assigned this Jan 12, 2026
@MaxymGorn MaxymGorn added enhancement New feature or request .NET Pull requests that update .net code TypeScript labels Jan 12, 2026
ColdForeign
ColdForeign previously approved these changes Feb 3, 2026
…ix error during blazor server prerendering in dispose methods (#453)

## Target

<!--
  Why are you making this change?
 -->
- Add receiver components to docs
- Fix events cropper component desc
- Fix error during blazor server prerendering in dispose methods
#### Open Questions

<!-- OPTIONAL
- [ ] Use the GitHub checklists to spark discussion on issues that may
arise from your approach. Please tick the box and explain your answer.
-->

## Checklist

<!--
It serves as a gentle reminder for common tasks. Confirm it's done and
check everything that applies.
-->

- [x] Tests cover new or modified code
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the site documentation
- [ ] I have made corresponding changes to the README, NuGet README file
- [x] My changes generate no new warnings
- [ ] New dependencies added or updated
- [ ] Includes breaking changes
- [ ] Version bumped

## Visuals

<!-- OPTIONAL
Show results both before and after this change. When the output changes,
it can be a screenshot of a trace, metric, or log illustrating the
change.
-->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MaxymGorn MaxymGorn enabled auto-merge (squash) February 3, 2026 18:02
@MaxymGorn MaxymGorn disabled auto-merge February 3, 2026 18:02
@MaxymGorn MaxymGorn merged commit b02971c into dev Feb 3, 2026
24 checks passed
@MaxymGorn MaxymGorn deleted the feature/add_typescript_for_project branch February 3, 2026 18:02
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 10.55276% with 178 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.02%. Comparing base (bf6a9a5) to head (3ad4d86).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
....Blazor/Cropper.Blazor/Cropper/cropperJsInterop.ts 1.48% 132 Missing and 1 partial ⚠️
...azor/Cropper.Blazor/Cropper/helpers/blob-helper.ts 4.25% 45 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               dev     #449       +/-   ##
============================================
- Coverage   100.00%   81.02%   -18.98%     
============================================
  Files           26       29        +3     
  Lines          739      938      +199     
  Branches        44       65       +21     
============================================
+ Hits           739      760       +21     
- Misses           0      177      +177     
- Partials         0        1        +1     
Flag Coverage Δ
DotNet 100.00% <100.00%> (ø)
TypeScript 6.31% <6.31%> (?)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request .NET Pull requests that update .net code TypeScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants