fix(deps): update dependency @types/jest to v29.5.10 #15
47
.pnp.loader.mjs
generated
47
.pnp.loader.mjs
generated
@ -902,6 +902,12 @@ class ProxiedFS extends FakeFS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function direntToPortable(dirent) {
|
||||||
|
const portableDirent = dirent;
|
||||||
|
if (typeof dirent.path === `string`)
|
||||||
|
portableDirent.path = npath.toPortablePath(dirent.path);
|
||||||
|
return portableDirent;
|
||||||
|
}
|
||||||
class NodeFS extends BasePortableFakeFS {
|
class NodeFS extends BasePortableFakeFS {
|
||||||
constructor(realFs = fs) {
|
constructor(realFs = fs) {
|
||||||
super();
|
super();
|
||||||
@ -1228,15 +1234,31 @@ class NodeFS extends BasePortableFakeFS {
|
|||||||
async readdirPromise(p, opts) {
|
async readdirPromise(p, opts) {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
if (opts) {
|
if (opts) {
|
||||||
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
|
if (opts.recursive && process.platform === `win32`) {
|
||||||
|
if (opts.withFileTypes) {
|
||||||
|
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback((results) => resolve(results.map(direntToPortable)), reject));
|
||||||
} else {
|
} else {
|
||||||
this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject));
|
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback((results) => resolve(results.map(npath.toPortablePath)), reject));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback(resolve, reject));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
readdirSync(p, opts) {
|
readdirSync(p, opts) {
|
||||||
if (opts) {
|
if (opts) {
|
||||||
|
if (opts.recursive && process.platform === `win32`) {
|
||||||
|
if (opts.withFileTypes) {
|
||||||
|
return this.realFs.readdirSync(npath.fromPortablePath(p), opts).map(direntToPortable);
|
||||||
|
} else {
|
||||||
|
return this.realFs.readdirSync(npath.fromPortablePath(p), opts).map(npath.toPortablePath);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return this.realFs.readdirSync(npath.fromPortablePath(p), opts);
|
return this.realFs.readdirSync(npath.fromPortablePath(p), opts);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return this.realFs.readdirSync(npath.fromPortablePath(p));
|
return this.realFs.readdirSync(npath.fromPortablePath(p));
|
||||||
}
|
}
|
||||||
@ -1372,7 +1394,7 @@ class VirtualFS extends ProxiedFS {
|
|||||||
|
|
||||||
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
|
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
|
||||||
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
|
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
|
||||||
const HAS_LAZY_LOADED_TRANSLATORS = major > 19 || major === 19 && minor >= 3;
|
const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3;
|
||||||
|
|
||||||
function readPackageScope(checkPath) {
|
function readPackageScope(checkPath) {
|
||||||
const rootSeparatorIndex = checkPath.indexOf(npath.sep);
|
const rootSeparatorIndex = checkPath.indexOf(npath.sep);
|
||||||
@ -2020,10 +2042,24 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
|
|||||||
|
|
||||||
if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
||||||
const binding = process.binding(`fs`);
|
const binding = process.binding(`fs`);
|
||||||
const originalfstat = binding.fstat;
|
const originalReadFile = binding.readFileUtf8 || binding.readFileSync;
|
||||||
|
if (originalReadFile) {
|
||||||
|
binding[originalReadFile.name] = function(...args) {
|
||||||
|
try {
|
||||||
|
return fs.readFileSync(args[0], {
|
||||||
|
encoding: `utf8`,
|
||||||
|
flag: args[1]
|
||||||
|
});
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
return originalReadFile.apply(this, args);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
const binding2 = process.binding(`fs`);
|
||||||
|
const originalfstat = binding2.fstat;
|
||||||
const ZIP_MASK = 4278190080;
|
const ZIP_MASK = 4278190080;
|
||||||
const ZIP_MAGIC = 704643072;
|
const ZIP_MAGIC = 704643072;
|
||||||
binding.fstat = function(...args) {
|
binding2.fstat = function(...args) {
|
||||||
const [fd, useBigint, req] = args;
|
const [fd, useBigint, req] = args;
|
||||||
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
|
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
|
||||||
try {
|
try {
|
||||||
@ -2046,6 +2082,7 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
|||||||
return originalfstat.apply(this, args);
|
return originalfstat.apply(this, args);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const resolve = resolve$1;
|
const resolve = resolve$1;
|
||||||
const load = load$1;
|
const load = load$1;
|
||||||
|
@ -894,12 +894,12 @@ __metadata:
|
|||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/jest@npm:^29.5.4":
|
"@types/jest@npm:^29.5.4":
|
||||||
version: 29.5.7
|
version: 29.5.10
|
||||||
resolution: "@types/jest@npm:29.5.7"
|
resolution: "@types/jest@npm:29.5.10"
|
||||||
dependencies:
|
dependencies:
|
||||||
expect: "npm:^29.0.0"
|
expect: "npm:^29.0.0"
|
||||||
pretty-format: "npm:^29.0.0"
|
pretty-format: "npm:^29.0.0"
|
||||||
checksum: 231c873f3d1ddac973b8f8f2ad7760677d941d85fb52d1c5dc4a311bafba4c2c1658a1040fd7054a51f4d1841f51c6ca4cabf70675ee4fa9e10fc5b8066e1de1
|
checksum: b46171d59d12a5f69bbe710f65eaf59a8073337c6b4a67dff8158575caec53f1c61f8a7d645b34d6ac3c4ea398acd30f0c5d1c4a131c0c918798019264a3397d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user