Merge pull request #34850 from overleaf/acf-ar-yarn-pnp-redux

[monorepo] yarn pnp redux

GitOrigin-RevId: fb04cab879b04ead2665b5e985a44053ceea33f3
This commit is contained in:
Andrew Rumble
2026-09-17 11:35:26 +00:00
committed by Copybot
parent 44f053129f
commit da3adace36
47 changed files with 1057 additions and 57 deletions
@@ -3,6 +3,10 @@
"version": "3.0.0",
"description": "",
"main": "index.js",
"exports": {
".": "./index.js",
"./*": "./*"
},
"scripts": {
"test": "yarn run lint && yarn run types:check && yarn run test:unit",
"lint": "eslint --cache --cache-location ../../.cache/eslint/ --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 .",
@@ -17,8 +21,10 @@
"lodash": "^4.18.1"
},
"devDependencies": {
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+2 -3
View File
@@ -9,13 +9,12 @@
},
"devDependencies": {
"@eslint/json": "^2.0.0",
"@types/node": "^24.5.2",
"@typescript-eslint/parser": "^8.59.4",
"eslint": "^10.4.0",
"typescript": "^5.0.4",
"vitest": "4.1.5"
},
"peerDependencies": {
"eslint": "^10.4.0"
},
"scripts": {
"test": "yarn run lint && yarn run types:check && yarn run test:unit",
"lint": "eslint --cache --cache-location ../../.cache/eslint/ --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 .",
+3
View File
@@ -20,9 +20,12 @@
"author": "Overleaf (https://www.overleaf.com)",
"license": "AGPL-3.0-only",
"devDependencies": {
"@types/lodash": "^4.17.24",
"@types/node": "^24.5.2",
"@types/node-fetch": "^2.6.13",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"eslint": "^10.4.0",
"express": "4.22.1",
"selfsigned": "^5.5.0",
"typescript": "^5.0.4",
+6
View File
@@ -7,6 +7,10 @@
"url": "https://github.com/overleaf/overleaf"
},
"main": "index.js",
"exports": {
".": "./index.js",
"./*": "./*"
},
"license": "AGPL-3.0-only",
"version": "3.1.1",
"scripts": {
@@ -24,7 +28,9 @@
"bunyan": "^1.8.14"
},
"devDependencies": {
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+3
View File
@@ -21,8 +21,11 @@
"yn": "^3.1.1"
},
"devDependencies": {
"@overleaf/logger": "workspace:*",
"@types/node": "^24.5.2",
"bunyan": "^1.0.0",
"chai": "^4.3.6",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+6
View File
@@ -3,6 +3,10 @@
"version": "0.0.1",
"description": "utilities to help working with mongo",
"main": "index.js",
"exports": {
".": "./index.js",
"./*": "./*"
},
"scripts": {
"test": "yarn run lint && yarn run types:check && yarn run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}",
@@ -18,7 +22,9 @@
"mongodb-legacy": "6.1.3"
},
"devDependencies": {
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+1
View File
@@ -32,6 +32,7 @@
"@types/chai": "^4.3.0",
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+7
View File
@@ -3,6 +3,10 @@
"version": "1.0.2",
"description": "Module for storing objects in multiple backends, with fallback on 404 to assist migration between them",
"main": "index.js",
"exports": {
".": "./index.js",
"./*": "./*"
},
"scripts": {
"test": "yarn run lint && yarn run types:check && yarn run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}",
@@ -33,8 +37,11 @@
"tiny-async-pool": "^1.1.0"
},
"devDependencies": {
"@types/lodash": "^4.17.24",
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
@@ -3,6 +3,10 @@
"version": "1.0.0",
"description": "Library shared between the editor server and clients.",
"main": "index.js",
"exports": {
".": "./index.js",
"./*": "./*"
},
"scripts": {
"test": "yarn run lint && yarn run types:check && yarn run test:unit",
"lint": "eslint --cache --cache-location ../../.cache/eslint/ --ext .cjs,.js,.jsx,.mjs,.ts --max-warnings 0 .",
@@ -16,8 +20,12 @@
"private": true,
"devDependencies": {
"@types/check-types": "^7.3.7",
"@types/lodash": "^4.17.24",
"@types/mocha": "^10.0.6",
"@types/node": "^24.5.2",
"@types/path-browserify": "^1.0.3",
"chai": "^3.3.0",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+2
View File
@@ -14,8 +14,10 @@
"author": "Overleaf (https://www.overleaf.com)",
"license": "AGPL-3.0-only",
"devDependencies": {
"@types/node": "^24.5.2",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+3
View File
@@ -17,7 +17,10 @@
"types:check": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"core-js": "~3.46.0",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+2
View File
@@ -32,7 +32,9 @@
"devDependencies": {
"@overleaf/logger": "workspace:*",
"@overleaf/o-error": "workspace:*",
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+12 -2
View File
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
const fs = require('node:fs')
const Path = require('node:path')
const { createRequire } = require('node:module')
const { merge } = require('./merge')
const CWD = process.cwd()
@@ -16,6 +17,15 @@ if (SHARELATEX_CONFIG && SHARELATEX_CONFIG !== OVERLEAF_CONFIG) {
)
}
// Under Yarn PnP, require() resolves dependencies based on the issuer package.
// Config files live in the consuming service (e.g. web), not in @overleaf/settings,
// so we create a require function anchored at each config file's location to ensure
// dependencies resolve from the service's PnP scope rather than this library's.
function requireFromFile(filePath) {
const absPath = Path.resolve(filePath)
return createRequire(absPath)(absPath)
}
let settings
let settingsExist = false
const defaultsPath =
@@ -25,7 +35,7 @@ const defaultsPath =
pathIfExists(Path.join(ENTRY_POINT_DIR, 'config/settings.defaults.js'))
if (defaultsPath) {
console.log(`Using default settings from ${defaultsPath}`)
settings = require(defaultsPath)
settings = requireFromFile(defaultsPath)
settingsExist = true
} else {
settings = {}
@@ -37,7 +47,7 @@ const overridesPath =
pathIfExists(Path.join(CWD, `config/settings.${NODE_ENV}.js`))
if (overridesPath) {
console.log(`Using settings from ${overridesPath}`)
settings = merge(require(overridesPath), settings)
settings = merge(requireFromFile(overridesPath), settings)
settingsExist = true
}
+2
View File
@@ -13,6 +13,8 @@
"types:check": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^24.5.2",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+2
View File
@@ -14,8 +14,10 @@
"author": "Overleaf (https://www.overleaf.com)",
"license": "AGPL-3.0-only",
"devDependencies": {
"@types/node": "^24.5.2",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"eslint": "^10.4.0",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
+3
View File
@@ -24,6 +24,9 @@
"zod-validation-error": "^4.0.1"
},
"devDependencies": {
"@types/express": "4.17.23",
"@types/node": "^24.5.2",
"eslint": "^10.4.0",
"typescript": "^5.0.4",
"vitest": "4.1.5"
}