Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 17 additions & 112 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions recipes/v22-to-v24/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Node.js v22 → v24 Migration

This codemod only wraps all migrations needed to upgrade a Node.js codebase from **v22 to v24**.

> [!WARNING]
> This codemod is on `v0.0.X` because there are missing parts so be careful before pushing changes to production. If you find any missing migration, please open an issue or a PR.

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.

Suggested change
> This codemod is on `v0.0.X` because there are missing parts so be careful before pushing changes to production. If you find any missing migration, please open an issue or a PR.
> This codemod is on `v0.0.1` because there are missing parts so be careful before pushing changes to production. If you find any missing migration, please open an issue or a PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't do that so when updating the package we don't need to update the readme


## More information

You can find more information about the changes in Node.js v24 in the [official migration guide](https://nodejs.org/en/blog/migrations/v22-to-v24).

To know missing part read this [issue](https://github.com/nodejs/userland-migrations/issues/239)
24 changes: 24 additions & 0 deletions recipes/v22-to-v24/codemod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
schema_version: "1.0"
name: "@nodejs/v22-to-v24"
version: "0.0.1"
description: Handle breaking changes in Node.js v24 by replacing deprecated APIs and updating code to be compatible with the new version.
author: Augustin Mauroy
license: MIT
workflow: workflow.yaml
category: migration
repository: https://github.com/nodejs/userland-migrations

targets:
languages:
- javascript
- typescript

keywords:
- transformation
- migration
- nodejs
- breaking-changes

registry:
access: public
visibility: public
18 changes: 18 additions & 0 deletions recipes/v22-to-v24/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@nodejs/v22-to-v24",
"version": "1.0.1",
"description": "Handle breaking changes in Node.js v24 by replacing deprecated APIs and updating code to be compatible with the new version.",
"type": "module",
"scripts": {
"test": "echo \"no test necessary\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/nodejs/userland-migrations.git",
"directory": "recipes/v22-to-v24",
"bugs": "https://github.com/nodejs/userland-migrations/issues"
},
"author": "Augustin Mauroy",
"license": "MIT",
"homepage": "https://github.com/nodejs/userland-migrations/blob/main/recipes/v22-to-v24/README.md"
}
36 changes: 36 additions & 0 deletions recipes/v22-to-v24/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/codemod-com/codemod/refs/heads/main/schemas/workflow.json

version: "1"

nodes:
- id: apply-transforms
name: Apply AST Transformations
type: automatic
steps:
- name: Run `@nodejs/dirent-path-to-parent-path` from Codemod Registry
codemod:
source: "@nodejs/dirent-path-to-parent-path"
- name: Run `@nodejs/fs-access-mode-constants` from Codemod Registry
codemod:
source: "@nodejs/fs-access-mode-constants"
- name: Run `@nodejs/fs-truncate-fd-deprecation` from Codemod Registry
codemod:
source: "@nodejs/fs-truncate-fd-deprecation"
- name: Run `@nodejs/http-outgoingmessage-headers` from Codemod Registry
codemod:
source: "@nodejs/http-outgoingmessage-headers"
- name: Run `@nodejs/http2-priority-signaling` from Codemod Registry
codemod:
source: "@nodejs/http2-priority-signaling"
- name: Run `@nodejs/timers-deprecations` from Codemod Registry
codemod:
source: "@nodejs/timers-deprecations"
- name: Run `@nodejs/tls-create-secure-pair-to-tls-socket` from Codemod Registry
codemod:
source: "@nodejs/tls-create-secure-pair-to-tls-socket"
- name: Run `@nodejs/util-is` from Codemod Registry
codemod:
source: "@nodejs/util-is"
- name: Run `util-log-to-console-log` from Codemod Registry
codemod:
source: "@nodejs/util-log-to-console-log"