root: patch mock-fs

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-06 10:14:38 +02:00
parent 92cfcdd632
commit 52f2416abe
3 changed files with 23 additions and 2 deletions
@@ -0,0 +1,13 @@
diff --git a/lib/binding.js b/lib/binding.js
index a4a3e6cdc197bd0f12fe2d060640e91ac58ab457..ab04ce3115fe93073a3e25008730272b6fa21bd7 100644
--- a/lib/binding.js
+++ b/lib/binding.js
@@ -165,6 +165,8 @@ function Binding(system) {
this.trackDescriptor(stderr);
}
+Binding.prototype.readFileSync = path => require('fs').readFileSync(path).toString('utf8');
+
/**
* Get the file system underlying this binding.
* @return {FileSystem} The underlying file system.
+2 -1
View File
@@ -46,7 +46,8 @@
},
"resolutions": {
"@types/react": "^17",
"@types/react-dom": "^17"
"@types/react-dom": "^17",
"mock-fs@^5.2.0": "patch:mock-fs@npm%3A5.2.0#./.yarn/patches/mock-fs-npm-5.2.0-5103a7b507.patch"
},
"version": "1.18.0",
"dependencies": {
+8 -1
View File
@@ -33198,13 +33198,20 @@ __metadata:
languageName: node
linkType: hard
"mock-fs@npm:^5.2.0":
"mock-fs@npm:5.2.0":
version: 5.2.0
resolution: "mock-fs@npm:5.2.0"
checksum: c25835247bd26fa4e0189addd61f98973f61a72741e4d2a5694b143a2069b84978443a7ac0fdb1a71aead99273ec22ff4e9c968de11bbd076db020264c5b8312
languageName: node
linkType: hard
"mock-fs@patch:mock-fs@npm%3A5.2.0#./.yarn/patches/mock-fs-npm-5.2.0-5103a7b507.patch::locator=root%40workspace%3A.":
version: 5.2.0
resolution: "mock-fs@patch:mock-fs@npm%3A5.2.0#./.yarn/patches/mock-fs-npm-5.2.0-5103a7b507.patch::version=5.2.0&hash=920f99&locator=root%40workspace%3A."
checksum: 84e306d7a798735ed8ee110b60ed8fc0b5db451df3a990e2a01432fac99decd15e5534c92d87f8067425329dbd9bf5c12e2673d3d770fb40f2936810e02bb07a
languageName: node
linkType: hard
"mock-socket@npm:^9.3.0":
version: 9.3.1
resolution: "mock-socket@npm:9.3.1"