Merge pull request #32700 from overleaf/ar-node-forge-greater-than-1.4.0

[monorepo] install node-forge greater than 1.4.0

GitOrigin-RevId: 9004815d2964f2d6efe5b9d43b3ef51f4a1e879b
This commit is contained in:
Andrew Rumble
2026-04-17 10:00:15 +02:00
committed by Copybot
parent 53e6da5e98
commit aa023b011d
3 changed files with 285 additions and 13 deletions

View File

@@ -22,12 +22,12 @@
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
"selfsigned": "^5.5.0",
"typescript": "^5.0.4"
},
"dependencies": {
"@overleaf/o-error": "*",
"lodash": "^4.17.21",
"node-fetch": "^2.7.0",
"selfsigned": "^2.4.1"
"node-fetch": "^2.7.0"
}
}

View File

@@ -21,12 +21,6 @@ const {
const HTTP_PORT = 30001
const HTTPS_PORT = 30002
const attrs = [{ name: 'commonName', value: 'example.com' }]
const pems = selfsigned.generate(attrs, { days: 365, keySize: 2048 })
const PRIVATE_KEY = pems.private
const PUBLIC_CERT = pems.cert
const dns = require('node:dns')
const _originalLookup = dns.lookup
// Custom DNS resolver function
@@ -45,8 +39,15 @@ dns.lookup = (hostname, options, callback) => {
}
describe('fetch-utils', function () {
let PUBLIC_CERT
before(async function () {
this.server = new TestServer()
const attrs = [{ name: 'commonName', value: 'example.com' }]
const pems = await selfsigned.generate(attrs, { days: 365, keySize: 2048 })
const PRIVATE_KEY = pems.private
PUBLIC_CERT = pems.cert
await this.server.start(HTTP_PORT, HTTPS_PORT, {
key: PRIVATE_KEY,
cert: PUBLIC_CERT,