chore: bump node to v22.18.0 (37-x-y) (#47935)
chore: bump node to v22.18.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
f409eb0d7a
commit
a954f9f245
37 changed files with 182 additions and 364 deletions
|
@ -742,7 +742,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
}
|
||||
|
||||
const dirent = getDirent(currentPath, result[0][i], type);
|
||||
const stat = internalBinding('fs').internalModuleStat(binding, resultPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(resultPath);
|
||||
|
||||
context.readdirResults.push(dirent);
|
||||
if (dirent.isDirectory() || stat === 1) {
|
||||
|
@ -755,7 +755,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
for (let i = 0; i < result.length; i++) {
|
||||
const resultPath = path.join(currentPath, result[i]);
|
||||
const relativeResultPath = path.relative(context.basePath, resultPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(binding, resultPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(resultPath);
|
||||
context.readdirResults.push(relativeResultPath);
|
||||
|
||||
if (stat === 1) {
|
||||
|
@ -825,7 +825,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
if (context.withFileTypes) {
|
||||
readdirResult = [
|
||||
[...readdirResult], readdirResult.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p));
|
||||
return internalBinding('fs').internalModuleStat(path.join(pathArg, p));
|
||||
})
|
||||
];
|
||||
}
|
||||
|
@ -1010,9 +1010,9 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
});
|
||||
|
||||
const { internalModuleStat } = binding;
|
||||
internalBinding('fs').internalModuleStat = (receiver: unknown, pathArgument: string) => {
|
||||
internalBinding('fs').internalModuleStat = (pathArgument: string) => {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return internalModuleStat(receiver, pathArgument);
|
||||
if (!pathInfo.isAsar) return internalModuleStat(pathArgument);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
// -ENOENT
|
||||
|
@ -1047,7 +1047,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
if (withFileTypes) {
|
||||
initialItem = [
|
||||
[...initialItem], initialItem.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(originalPath, p));
|
||||
return internalBinding('fs').internalModuleStat(path.join(originalPath, p));
|
||||
})
|
||||
];
|
||||
}
|
||||
|
@ -1080,7 +1080,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
|
||||
readdirResult = [
|
||||
[...files], files.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(direntPath, p));
|
||||
return internalBinding('fs').internalModuleStat(path.join(direntPath, p));
|
||||
})
|
||||
];
|
||||
} else {
|
||||
|
@ -1101,7 +1101,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
const { 0: pathArg, 1: readDir } = queue.pop();
|
||||
for (const ent of readDir) {
|
||||
const direntPath = path.join(pathArg, ent);
|
||||
const stat = internalBinding('fs').internalModuleStat(binding, direntPath);
|
||||
const stat = internalBinding('fs').internalModuleStat(direntPath);
|
||||
result.push(path.relative(originalPath, direntPath));
|
||||
|
||||
if (stat === 1) {
|
||||
|
@ -1155,7 +1155,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||
if (context.withFileTypes) {
|
||||
readdirResult = [
|
||||
[...readdirResult], readdirResult.map((p: string) => {
|
||||
return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p));
|
||||
return internalBinding('fs').internalModuleStat(path.join(pathArg, p));
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue