Merge pull request #29720 from overleaf/renovate-npm-glob-vulnerability

[Core] Update dependency glob to v11.1.0 [SECURITY] - abandoned

GitOrigin-RevId: 866612e84e2afd3edc97c244e22faeaff22484cf
This commit is contained in:
Andrew Rumble
2025-11-20 09:05:44 +00:00
committed by Copybot
parent e77a7cede7
commit 5a4592b153
9 changed files with 667 additions and 84 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
"@overleaf/o-error": "*",
"@overleaf/stream-utils": "*",
"fast-crc32c": "overleaf/node-fast-crc32c#aae6b2a4c7a7a159395df9cc6c38dfde702d6f51",
"glob": "^7.1.6",
"glob": "^12.0.0",
"range-parser": "^1.2.1",
"tiny-async-pool": "^1.1.0"
},
@@ -1,18 +1,15 @@
const crypto = require('node:crypto')
const fs = require('node:fs')
const fsPromises = require('node:fs/promises')
const globCallbacks = require('glob')
const { glob } = require('glob')
const Path = require('node:path')
const { PassThrough } = require('node:stream')
const { pipeline } = require('node:stream/promises')
const { promisify } = require('node:util')
const AbstractPersistor = require('./AbstractPersistor')
const { ReadError, WriteError, NotImplementedError } = require('./Errors')
const PersistorHelper = require('./PersistorHelper')
const glob = promisify(globCallbacks)
module.exports = class FSPersistor extends AbstractPersistor {
constructor(settings = {}) {
if (settings.storageClass) {
@@ -305,10 +302,8 @@ module.exports = class FSPersistor extends AbstractPersistor {
async _listDirectory(path) {
if (this.useSubdirectories) {
// eslint-disable-next-line @typescript-eslint/return-await
return await glob(Path.join(path, '**'))
} else {
// eslint-disable-next-line @typescript-eslint/return-await
return await glob(`${path}_*`)
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ SandboxedModule.configure({
globals: { Buffer, Math, console, process, URL },
sourceTransformers: {
removeNodePrefix: function (source) {
return source.replace(/require\(['"]node:/g, "require('")
return source.replace(/require\((['"])node:/g, 'require($1')
},
},
})