Skip to content

feat handle: DEP0194 HTTP/2 priority signaling #243

@AugustinMauroy

Description

@AugustinMauroy

Description

This codemod should remove HTTP/2 priority-related options and methods since priority signaling has been deprecated. It's useful to migrate code that uses deprecated HTTP/2 priority features.

It should remove HTTP/2 priority-related options and methods. It should handle priority parameters in HTTP/2 stream creation. It should remove weight and dependency settings in HTTP/2 streams. It should handle both CommonJS and ESM imports.

Examples

Case 1

Before:

const http2 = require("node:http2");
const session = http2.connect("https://example.com", {
  priority: {
    weight: 16,
    parent: 0,
    exclusive: false
  }
});

After:

const http2 = require("node:http2");
const session = http2.connect("https://example.com");

Case 2

Before:

const http2 = require("node:http2");
const stream = session.request({
  ":path": "/api/data",
  priority: { weight: 32 }
});

After:

const http2 = require("node:http2");
const stream = session.request({
  ":path": "/api/data"
});

Case 3

Before:

const http2 = require("node:http2");
stream.priority({
  exclusive: true,
  parent: 0,
  weight: 128
});

After:

const http2 = require("node:http2");
// Priority signaling removed - no replacement needed

Case 4

Before:

import http2 from "node:http2";
const client = http2.connect("https://example.com");
client.settings({ enablePush: false, priority: true });

After:

import http2 from "node:http2";
const client = http2.connect("https://example.com");
client.settings({ enablePush: false });

REFS

Metadata

Metadata

Assignees

No one assigned

    Labels

    dep:v24Migration handles deprecation introduced in node v24good first issueGood for newcomershelp wantedExtra attention is neededlet's do it

    Projects

    Status

    🔖 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions