Skip to content

Conversation

@AugustinMauroy
Copy link
Member

@AugustinMauroy AugustinMauroy commented Oct 21, 2025

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

close #243

@AugustinMauroy AugustinMauroy requested review from a team and Copilot October 21, 2025 09:02
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 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.

Comment on lines +351 to +352
result = result.replace(/{(\S)/g, "{ $1");
result = result.replace(/(\S)}/g, "$1 }");
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

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

[nitpick] Lines 351-352 enforce spacing around braces ({ prop } style), which may conflict with the original code's formatting preferences. If the original code uses {prop} without spaces, this transformation will change the formatting style. Consider preserving the original spacing style or making this configurable.

Suggested change
result = result.replace(/{(\S)/g, "{ $1");
result = result.replace(/(\S)}/g, "$1 }");

Copilot uses AI. Check for mistakes.
@AugustinMauroy AugustinMauroy added awaiting reviewer Author has responded and needs action from the reviewer dep:v24 Migration handles deprecation introduced in node v24 dep:EoL Migration handles deprecation introduced in an EoL version of node labels Oct 21, 2025
@AugustinMauroy
Copy link
Member Author

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

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

Labels

awaiting reviewer Author has responded and needs action from the reviewer dep:EoL Migration handles deprecation introduced in an EoL version of node dep:v24 Migration handles deprecation introduced in node v24

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat handle: DEP0194 HTTP/2 priority signaling

3 participants