Skip to content

Chore: Update Jint, Rebus and their dependencies to latest versions + Swashbuckle .net10 bugfix#7518

Open
terry-delph wants to merge 3 commits into
elsa-workflows:2.xfrom
mintra-as:feature/update-jint-to-latest-version-4.9.2
Open

Chore: Update Jint, Rebus and their dependencies to latest versions + Swashbuckle .net10 bugfix#7518
terry-delph wants to merge 3 commits into
elsa-workflows:2.xfrom
mintra-as:feature/update-jint-to-latest-version-4.9.2

Conversation

@terry-delph

@terry-delph terry-delph commented May 20, 2026

Copy link
Copy Markdown
Contributor

Purpose

Updates Jint, Rebus and their dependencies to latest versions.
Some .net10 fixes for Swashbuckle/OpenAPI issues.


Scope

Select one primary concern:

  • Bug fix (behaviour change)
  • Refactor (no behaviour change)
  • Documentation update
  • Formatting / code cleanup
  • Dependency / build update
  • New feature

Description

Problem

Jint

Currently Jint is on a beta version 3.0.0-beta-2037 which even if moved to the non beta 3.0.0 it does not compile as the api changed before beta closed.
The latest version is 4.9.2 which changes the Parser from Esprima to Acornima.

Rebus

Rebus is also outdated being on version 8.7.1.
The latest is version 8.9.2 which brings .net10 support with it which Elsa support already so should have been updated already.

Swashbuckle .NET 10 Compatibility Fixes

Solution

Upgraded System.Text.Encodings.Web to 10.0.8 and other key dependencies (Newtonsoft.Json, Microsoft.Extensions.Hosting, etc.) across multiple projects for compatibility, security, and performance improvements.

Upgraded Jint:

  • Updated Jint to 4.9.2 from beta version
  • Enhanced ByteArrayConverter to handle byte arrays as ArrayBuffer in JavaScript
  • Added new tests for validation

Upgrade Rebus dependencies across core projects:

  • Upgraded Rebus to version 8.9.2 in Elsa.Abstractions.csproj.
  • Upgraded Rebus.ServiceProvider to version 10.7.2 in Elsa.Core.csproj.
  • Upgraded Rebus.Microsoft.Extensions.Logging to version 5.2.0 in Elsa.Core.csproj.

Upgraded System.Text.Encodings.Web to 10.0.8 and other key dependencies (Newtonsoft.Json, Microsoft.Extensions.Hosting, etc.) across multiple projects for compatibility, security, and performance improvements.

These upgrades ensure compatibility with the latest features, bug fixes, and improved integration with .NET 8/9/10 targets.

Duplicate Swashbuckle packages references:

  • Removed duplicate Swashbuckle (Swagger) package references from Elsa.Server.Api.csproj for consistent multi-targeting.
  • Ensured only one version per framework is referenced.

Swashbuckle .NET 10 Compatibility Fixes

Package Updates

  • Conditionally upgrade Swashbuckle.AspNetCore.SwaggerGen in Elsa.Activities.Http.OpenApi project
    • Keep v6.3.0 for .NET 8/9 (maintains backward compatibility)
    • Upgrade to v10.2.1 for .NET 10 (supports new OpenAPI model)

HttpEndpointDocumentFilter.cs

  • Add conditional compilation for OpenAPI model breaking changes in .NET 10:
    • swaggerDoc.Tags: IList<OpenApiTag> (.NET 8/9) → ISet<OpenApiTag> (.NET 10)
    • operation.Tags: IList<OpenApiTag> (.NET 8/9) → ISet<OpenApiTagReference> (.NET 10)
  • Fix null reference exception in RequestBody.Content by explicit dictionary initialization
  • Improve schema validation to check for null or whitespace in JsonSchema property
  • Resolves ReflectionTypeLoadException: "Method 'Apply' does not have an implementation"

RemoveEmptyControllerTagsFilter.cs

  • Add conditional compilation for .NET 10 tag handling:
    • Use OpenApiTagReference.Reference.Id for tag identification (.NET 10)
    • Use OpenApiTag.Name for tag identification (.NET 8/9)
    • Use Remove() method for ISet<OpenApiTag> (.NET 10)
    • Use reassignment with ToList() for IList<OpenApiTag> (.NET 8/9)

Verification

Steps:

  1. Run the new tests in "test/unit/Elsa.UnitTests/Scripting/JavaScript/Services/JintJavaScriptEvaluatorTests.cs"
  2. Run sample JavaScript based workflows

Expected outcome:

Tests pass and samples run without exceptions.
Eliminates runtime type loading errors on .NET 10
Swagger page does not show Tags with no Operations


Screenshots / Recordings (if applicable)

N/A


Checklist

  • The PR is focused on a single concern
  • Commit messages follow the recommended convention
  • Tests added or updated (if applicable)
  • Documentation updated (if applicable)
  • No unrelated cleanup included
  • All tests pass

Upgraded `System.Text.Encodings.Web` to `10.0.8` and other key dependencies (`Newtonsoft.Json`, `Microsoft.Extensions.Hosting`, etc.) across multiple projects for compatibility, security, and performance improvements.

Upgraded `Jint`:

- Updated `Jint` to `4.9.2` from beta version
- Enhanced `ByteArrayConverter` to handle byte arrays as `ArrayBuffer` in JavaScript
- Added new tests for validation

Upgrade Rebus dependencies across core projects:

- Upgraded Rebus to version 8.9.2 in Elsa.Abstractions.csproj.
- Upgraded Rebus.ServiceProvider to version 10.7.2 in Elsa.Core.csproj.
- Upgraded Rebus.Microsoft.Extensions.Logging to version 5.2.0 in Elsa.Core.csproj.

These upgrades ensure compatibility with the latest features, bug fixes, and improved integration with .NET 8/9/10 targets.

Duplicate Swashbuckle packages references:

- Removed duplicate Swashbuckle (Swagger) package references from Elsa.Server.Api.csproj for consistent multi-targeting.
- Ensured only one version per framework is referenced.
@terry-delph terry-delph changed the title Update dependencies and enhance JavaScript handling. Chore: Update Jint, Rebus and their dependencies to latest versions. May 20, 2026
…NET 8/9/10) (Issue: elsa-workflows#7429)

- Conditionally upgrade Swashbuckle.AspNetCore.SwaggerGen to 10.2.1 for .NET 10
  (keep 6.3.0 for .NET 8/9 for compatibility)
- Add conditional compilation for swaggerDoc.Tags initialization
  - Use HashSet<OpenApiTag> for .NET 10+
  - Use List<OpenApiTag> for .NET 8/9
- Add conditional compilation for operation.Tags
  - Use OpenApiTagReference for .NET 10+
  - Use OpenApiTag for .NET 8/9
- Fix RequestBody.Content null reference by explicit initialization
- Improve JsonSchema validation to check for null or whitespace
- tailwind.css seems to have not been updated in a previous commit, the rebuild has identified some changes

Resolves ReflectionTypeLoadException: "Method 'Apply' in type
'HttpEndpointDocumentFilter' does not have an implementation"
caused by OpenAPI model breaking changes in .NET 10.
…flows#7502)

- Added `[Tags("Secrets")]` to group secrets api endpoints in Swagger UI.
- Introduced `RemoveEmptyControllerTagsFilter` to remove unused
tags from OpenAPI documents.
- Registered the filter in Swagger configuration with .NET 10 compatibility adjustments.
@terry-delph
terry-delph marked this pull request as ready for review June 5, 2026 11:49
@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@terry-delph terry-delph changed the title Chore: Update Jint, Rebus and their dependencies to latest versions. Chore: Update Jint, Rebus and their dependencies to latest versions + Swashbuckle .net10 bugfix Jun 5, 2026
@terry-delph

Copy link
Copy Markdown
Contributor Author

@sfmskywalker
Is there something I can do to assist you in reviewing this PR?
Thanks

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.

1 participant