Skip to content

feat(DEP0194): migrate http2 priority signalling - #246

Merged
AugustinMauroy merged 19 commits into
mainfrom
augustin/dep0194
Apr 30, 2026
Merged

AugustinMauroy merged 19 commits into
mainfrom
augustin/dep0194

Conversation

@AugustinMauroy

@AugustinMauroy AugustinMauroy commented Oct 21, 2025 •

Copy link
Copy Markdown
Member

I'm not sure if I correctly get, how the deprecation should be handled so here my thing.

Resolves #243

@AugustinMauroy
AugustinMauroy requested review from a team and Copilot October 21, 2025 09:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new codemod recipe to handle Node.js deprecation DEP0194 by automatically removing HTTP/2 priority-related options and methods from codebases. The codemod removes priority properties from http2.connect(), session.request(), and client.settings() calls, as well as entire stream.priority() method invocations.

Key Changes:

  • Implements AST transformation logic to detect and remove deprecated HTTP/2 priority signaling code
  • Provides comprehensive test coverage for CommonJS and ESM imports across multiple usage scenarios
  • Includes complete recipe configuration and documentation

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
recipes/http2-priority-signaling/src/workflow.ts Core transformation logic implementing removal of priority-related code
recipes/http2-priority-signaling/workflow.yaml Workflow configuration defining the codemod execution
recipes/http2-priority-signaling/package.json Package metadata and dependencies
recipes/http2-priority-signaling/codemod.yaml Codemod registry configuration
recipes/http2-priority-signaling/README.md Documentation explaining the codemod's purpose and usage
recipes/http2-priority-signaling/tests/input/*.js Test input files covering different priority removal scenarios
recipes/http2-priority-signaling/tests/expected/*.js Expected output files showing correct transformation results

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@AugustinMauroy AugustinMauroy added await:reviewer Author has responded and needs action from the reviewer dep:24.x Migrate a deprecation for node 24.x dep:EoL Migrate a deprecation for an EoL version of node labels Oct 21, 2025
@AugustinMauroy AugustinMauroy mentioned this pull request Oct 23, 2025
14 of 18 tasks
@AugustinMauroy

Copy link
Copy Markdown
Member Author

Bruno I tried to solve issue that you had found but idk if there are a better way to accomplish that.

@brunocroh

brunocroh commented Nov 6, 2025 •

Copy link
Copy Markdown
Member

Bruno I tried to solve issue that you had found but idk if there are a better way to accomplish that.

In #248, I handled a very similar scenario. What I did there was identify the function that returns directory objects, track those variables, and check if their methods were invoked. I think you need to do something similar here with the session/stream.

For example, identify the variable named session, get the scope where it’s defined, and check if that variable uses the deprecated method within that scope.

const http2 = require('node:http2')

function ex() {
  let session = http2.connect(/* ... */)
  session.settigns(/* ... */)
}

let session = {
  settings: () => console.log('this function cannot be removed/updated by codemod')
}

let anyName = {
  settings: () => console.log('this function cannot be removed/updated by codemod')
}

session.settings()
anyName.settings()

To do that, you probably need something like this:

  • Identify resolveBind in http2.connect.
  • Check for usages of http2.connect and identify where its returned value is stored(variable name).
  • Determine the context where this variable is valid.
  • Look for method usages that need to be replaced of that variable within the valid context.

@AugustinMauroy

Copy link
Copy Markdown
Member Author

Normally it's fine, but I admit it's more complex than expected.

@JakobJingleheimer

Copy link
Copy Markdown
Member

I'm not sure if I correctly get, how the deprecation should be handled so here my thing.

If we're not sure, let's ask someone who would know rather than guess. Perhaps James Snell?

@JakobJingleheimer JakobJingleheimer added await:author Reviewer has requested something from the author and removed await:reviewer Author has responded and needs action from the reviewer labels Dec 15, 2025
@JakobJingleheimer JakobJingleheimer changed the title feat(http2-priority-signaling): introduce feat(DEP0194): migrate http2 priority signalling Jan 17, 2026
@JakobJingleheimer JakobJingleheimer added this to the 22.x → 24.x milestone Jan 17, 2026
@AugustinMauroy AugustinMauroy added await:reviewer Author has responded and needs action from the reviewer and removed await:author Reviewer has requested something from the author labels Jan 17, 2026
@JakobJingleheimer JakobJingleheimer added help wanted Extra attention is needed info needed and removed await:reviewer Author has responded and needs action from the reviewer labels Jan 25, 2026
@jasnell

jasnell commented Mar 28, 2026

Copy link
Copy Markdown
Member

It's been a bit since I've thought about this but generally lgtm.

@JakobJingleheimer

Copy link
Copy Markdown
Member

Thank you @jasnell 🙏

@JakobJingleheimer JakobJingleheimer removed help wanted Extra attention is needed info needed labels Mar 28, 2026
@AugustinMauroy
AugustinMauroy requested a review from a team April 6, 2026 07:17
@AugustinMauroy AugustinMauroy added the await:reviewer Author has responded and needs action from the reviewer label Apr 9, 2026

@brunocroh brunocroh left a comment

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 leave some nitpicking coments, but feel free to land it, it is g2g

@brunocroh
brunocroh self-requested a review April 15, 2026 11:21
AugustinMauroy and others added 2 commits April 17, 2026 11:50
Co-Authored-By: Bruno Rodrigues <swe@brunocroh.com>
@JakobJingleheimer JakobJingleheimer added g2g No outstanding concerns, discussions, or issues. and removed await:reviewer Author has responded and needs action from the reviewer dep:EoL Migrate a deprecation for an EoL version of node labels Apr 23, 2026
@AugustinMauroy
AugustinMauroy merged commit d5da9cd into main Apr 30, 2026
7 checks passed
@AugustinMauroy
AugustinMauroy deleted the augustin/dep0194 branch April 30, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dep:24.x Migrate a deprecation for node 24.x g2g No outstanding concerns, discussions, or issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DEP0194: HTTP/2 priority signalling

6 participants