diff --git a/CHANGELOG.md b/CHANGELOG.md
index 254c17cb60bcf1..d4a9746ce8927b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -38,7 +38,8 @@ release.
+22.5.1
22.5.0
22.4.1
22.4.0
@@ -43,6 +44,22 @@
* [io.js](CHANGELOG_IOJS.md)
* [Archive](CHANGELOG_ARCHIVE.md)
+
+
+## 2024-07-19, Version 22.5.1 (Current), @richardlau
+
+### Notable Changes
+
+This release fixes a regression introduced in Node.js 22.5.0. The problem is known to display the following symptoms:
+
+* Crash with `FATAL ERROR: v8::Object::GetCreationContextChecked No creation context available` [#53902](https://github.com/nodejs/node/issues/53902)
+* npm errors with `npm error Exit handler never called!` [npm/cli#7657](https://github.com/npm/cli/issues/7657)
+* yarn hangs or outputs `Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)` [yarnpkg/berry#6398](https://github.com/yarnpkg/berry/issues/6398)
+
+### Commits
+
+* \[[`e2deeedc6e`](https://github.com/nodejs/node/commit/e2deeedc6e)] - _**Revert**_ "**fs**: add v8 fast api to closeSync" (Aviv Keller) [#53904](https://github.com/nodejs/node/pull/53904)
+
## 2024-07-16, Version 22.5.0 (Current), @RafaelGSS prepared by @aduh95
diff --git a/src/env.cc b/src/env.cc
index 46549a46a1bab0..799b36aaebdded 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -1841,23 +1841,12 @@ void Environment::AddUnmanagedFd(int fd) {
}
}
-void Environment::RemoveUnmanagedFd(int fd, bool schedule_native_immediate) {
+void Environment::RemoveUnmanagedFd(int fd) {
if (!tracks_unmanaged_fds()) return;
size_t removed_count = unmanaged_fds_.erase(fd);
if (removed_count == 0) {
- if (schedule_native_immediate) {
- SetImmediateThreadsafe([&](Environment* env) {
- ProcessEmitWarning(this,
- "File descriptor %d closed but not opened in "
- "unmanaged mode",
- fd);
- });
- } else {
- ProcessEmitWarning(
- this,
- "File descriptor %d closed but not opened in unmanaged mode",
- fd);
- }
+ ProcessEmitWarning(
+ this, "File descriptor %d closed but not opened in unmanaged mode", fd);
}
}
diff --git a/src/env.h b/src/env.h
index 8c8cafe2122098..b2c54e079b57df 100644
--- a/src/env.h
+++ b/src/env.h
@@ -1027,7 +1027,7 @@ class Environment : public MemoryRetainer {
std::unique_ptr release_managed_buffer(const uv_buf_t& buf);
void AddUnmanagedFd(int fd);
- void RemoveUnmanagedFd(int fd, bool schedule_native_immediate = false);
+ void RemoveUnmanagedFd(int fd);
template
void ForEachRealm(T&& iterator) const;
diff --git a/src/node_external_reference.h b/src/node_external_reference.h
index 3aad28fa17a08e..b80b8727c23fd1 100644
--- a/src/node_external_reference.h
+++ b/src/node_external_reference.h
@@ -47,9 +47,6 @@ using CFunctionCallbackWithUint8ArrayUint32Int64Bool =
uint32_t,
int64_t,
bool);
-using CFunctionWithObjectInt32Fallback = void (*)(v8::Local,
- int32_t input,
- v8::FastApiCallbackOptions&);
using CFunctionWithUint32 = uint32_t (*)(v8::Local,
const uint32_t input);
using CFunctionWithDoubleReturnDouble = double (*)(v8::Local,
@@ -78,7 +75,6 @@ class ExternalReferenceRegistry {
V(CFunctionCallbackWithTwoUint8Arrays) \
V(CFunctionCallbackWithTwoUint8ArraysFallback) \
V(CFunctionCallbackWithUint8ArrayUint32Int64Bool) \
- V(CFunctionWithObjectInt32Fallback) \
V(CFunctionWithUint32) \
V(CFunctionWithDoubleReturnDouble) \
V(CFunctionWithInt64Fallback) \
diff --git a/src/node_file.cc b/src/node_file.cc
index 81f7e8d2dd5391..c59235b51cca9f 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -54,7 +54,6 @@ namespace fs {
using v8::Array;
using v8::BigInt;
-using v8::CFunction;
using v8::Context;
using v8::EscapableHandleScope;
using v8::FastApiCallbackOptions;
@@ -299,7 +298,7 @@ FileHandle::TransferData::~TransferData() {
BaseObjectPtr FileHandle::TransferData::Deserialize(
Environment* env,
- Local context,
+ v8::Local context,
std::unique_ptr self) {
BindingData* bd = Realm::GetBindingData(context);
if (bd == nullptr) return {};
@@ -961,7 +960,7 @@ void Access(const FunctionCallbackInfo& args) {
}
}
-static void Close(const FunctionCallbackInfo& args) {
+void Close(const FunctionCallbackInfo& args) {
Environment* env = Environment::GetCurrent(args);
const int argc = args.Length();
@@ -987,30 +986,6 @@ static void Close(const FunctionCallbackInfo& args) {
}
}
-static void FastClose(Local |