Skip to content

KTOR-9496 Docs for JavScript ES module support#796

Open
vnikolova wants to merge 1 commit into
3.5.0from
vnikolova/KTOR-9496
Open

KTOR-9496 Docs for JavScript ES module support#796
vnikolova wants to merge 1 commit into
3.5.0from
vnikolova/KTOR-9496

Conversation

@vnikolova
Copy link
Copy Markdown
Collaborator

Add a what's new entry for the following issues:

KTOR-9350 JS: Make ES2015 the default target for tests
KTOR-7659 Make ktor-network compatible with ES modules for nodejs

@vnikolova vnikolova changed the base branch from main to vnikolova/KTOR-9493 April 21, 2026 15:15
@vnikolova vnikolova requested a review from osipxd April 21, 2026 15:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e5a554c-33df-4b77-bb6d-fc7fc052014d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR updates Ktor's digest authentication implementation to RFC 7616 compliance, reworking the example code to use plaintext passwords with dynamic multi-algorithm digest computation, extending the digestProvider to accept an algorithm parameter, and adding comprehensive documentation covering algorithm configuration, Quality of Protection settings, userhash support, and custom authentication provider implementation with coroutine support.

Changes

Cohort / File(s) Summary
Digest Auth Implementation
codeSnippets/snippets/auth-digest/src/main/kotlin/authdigest/Application.kt
Replaced MD5 precomputed user table with plaintext userPasswords map; removed getMd5Digest() helper and added computeHash() function to dynamically compute digests based on DigestAlgorithm parameter; refactored digestProvider to accept algorithm parameter, configure supported algorithms (SHA_512_256 and MD5), and return null for unknown users.
Documentation
topics/whats-new-350.md, topics/server-digest-auth.md, topics/server-auth.md
Added RFC 7616 digest authentication documentation covering multi-algorithm configuration, QoP (auth and auth-int) handling, userhash support, algorithm-specific response computation, and security best practices; added documentation for custom authentication providers with coroutine support via DynamicProviderConfig.
Manifest
ktor.tree
Added table-of-contents entry linking to whats-new-350.md under the Releases section.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • osipxd
  • Stexxe
  • bjhham
🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions JavaScript ES module support but the changeset includes extensive digest authentication documentation updates as the primary change. Update the title to reflect the main changes: consider 'Add Ktor 3.5.0 release notes with digest auth updates and ES module support' to accurately represent the substantial digest authentication documentation additions.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description references two JavaScript/ES module issues but omits the substantial digest authentication documentation work that comprises a majority of the changes. Clarify whether ES module support is the primary focus or if digest authentication documentation should be equally highlighted in the description.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vnikolova/KTOR-9496

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vnikolova vnikolova force-pushed the vnikolova/KTOR-9493 branch from ffa19fc to 52fe914 Compare April 22, 2026 10:02
Base automatically changed from vnikolova/KTOR-9493 to 3.5.0 April 22, 2026 10:04
@vnikolova vnikolova force-pushed the vnikolova/KTOR-9496 branch from 52b05f9 to b5425f1 Compare April 22, 2026 10:07
Comment thread topics/whats-new-350.md Outdated
Comment on lines +85 to +95
#### JS target updated for ES modules

Ktor test infrastructure now targets the [ES2015](https://262.ecma-international.org/6.0/) standard to verify compatibility
with modern JavaScript environments and upcoming changes in Kotlin’s default JavaScript target. This ensures compatibility
with ES module–based setups and keeps Ktor aligned with the evolving Kotlin/JS ecosystem.

#### Node.js ES modules support in `ktor-network`

The `ktor-network` module now works correctly in Node.js projects that use ES modules. This improves compatibility with
modern bundlers when targeting both Node.js and browser environments and avoids issues caused by Node.js-specific
modules (such as `net`) being included in browser builds.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm sorry for not providing a proper description for the issues. I think we can omit details and write something like this instead of two sub-sections:

We've fixed problems making it impossible to use ktor-network and all dependent modules with ES modules enabled. We've also updated our test infrastructure to target ES2015 and ES modules to prevent possible regressions.

These links might be helpful:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, updated the section now.

@vnikolova vnikolova force-pushed the vnikolova/KTOR-9496 branch from b5425f1 to b888039 Compare May 13, 2026 10:49
@vnikolova vnikolova requested a review from osipxd May 13, 2026 10:49
@vnikolova vnikolova force-pushed the vnikolova/KTOR-9496 branch from b888039 to 2d8d43b Compare May 13, 2026 10:50
Copy link
Copy Markdown
Member

@osipxd osipxd left a comment

Choose a reason for hiding this comment

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

👍

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