Files
Verso/services/history-v1/package.json
T
Copilot a9a9f6ee6b Migrate history-v1 recover_zip scripts from archiver to zip-stream (#32813)
* migrate recover_zip_from_backup from archiver to zip-stream

Replace the `archiver` package with `zip-stream` (the lower-level library
that `archiver` wraps) in the `recover_zip_from_backup.mjs` script and
`backupArchiver.mjs` library. The `archiver` package has known issues with
hanging when creating large zip files and is no longer actively maintained.

Changes:
- Add `zip-stream@^7.0.2` as a direct dependency
- Update `backupArchiver.mjs` to use promisified `ZipStream.entry()`
  instead of `Archiver.append()`
- Rewrite `recover_zip_from_backup.mjs` to use `ZipStream` with
  `stream/promises.pipeline` for cleaner async flow
- Keep `archiver` dependency for `project_archive.js` (separate code path)

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/0df27a8b-97f1-43cc-ac26-f5247a84313f

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* extract finalize timeout to named constant

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/0df27a8b-97f1-43cc-ac26-f5247a84313f

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* convert recover_zip.js to zip-stream, remove finalize timeout, add verbose logging

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/9380d08a-d813-4e9f-a2ac-4891122c163b

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* add acceptance tests for recover_zip_from_backup in raw and latest modes

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/9380d08a-d813-4e9f-a2ac-4891122c163b

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* fix comment formatting in recover_zip_from_backup.mjs

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/9380d08a-d813-4e9f-a2ac-4891122c163b

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* restore EventEmitter.defaultMaxListeners in recover_zip.js, add acceptance test

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/e7443126-22d5-4d0e-a176-a7a5dba49ffd

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* fix formatting

* refactor: simplify stream handling by using named imports for pipeline

* fix blob hash verification in backup acceptance tests

* fix recover_zip script and tests

* fix: exit with non-zero status on error in recover_zip.js

Agent-Logs-Url: https://github.com/overleaf/internal/sessions/ef3f109b-488f-47c9-84a5-b5269387166a

Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>

* migrate from npm to yarn

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: briangough <7457354+briangough@users.noreply.github.com>
Co-authored-by: Brian Gough <briangough@users.noreply.github.com>
GitOrigin-RevId: 6255f9610f3c846790e2ed8b1979ac08b7effece
2026-06-02 08:08:18 +00:00

80 lines
2.7 KiB
JSON

{
"name": "overleaf-editor",
"version": "1.0.0",
"description": "Overleaf Editor.",
"author": "",
"license": "Proprietary",
"private": true,
"dependencies": {
"@google-cloud/secret-manager": "^5.6.0",
"@overleaf/fetch-utils": "workspace:*",
"@overleaf/logger": "workspace:*",
"@overleaf/metrics": "workspace:*",
"@overleaf/mongo-utils": "workspace:*",
"@overleaf/o-error": "workspace:*",
"@overleaf/object-persistor": "workspace:*",
"@overleaf/promise-utils": "workspace:*",
"@overleaf/redis-wrapper": "workspace:*",
"@overleaf/settings": "workspace:*",
"@overleaf/stream-utils": "^0.1.0",
"@overleaf/validation-tools": "workspace:*",
"archiver": "^5.3.0",
"basic-auth": "^2.0.1",
"bluebird": "^3.7.2",
"body-parser": "1.20.4",
"bull": "^4.16.5",
"bunyan": "^1.8.12",
"check-types": "^11.1.2",
"command-line-args": "^3.0.3",
"config": "^3.3.12",
"express": "4.22.1",
"fs-extra": "^9.0.1",
"generic-pool": "^2.1.1",
"helmet": "^3.22.0",
"http-status": "^1.4.2",
"jsonwebtoken": "^9.0.3",
"knex": "^2.4.0",
"lodash": "^4.18.1",
"mongodb": "6.12.0",
"overleaf-editor-core": "workspace:*",
"p-limit": "^6.2.0",
"p-queue": "^8.1.0",
"pg": "^8.7.1",
"pg-query-stream": "^4.2.4",
"temp": "^0.8.3",
"throng": "^4.0.0",
"tsscmp": "^1.0.6",
"utf-8-validate": "^5.0.4",
"zip-stream": "^7.0.2"
},
"devDependencies": {
"@overleaf/migrations": "workspace:*",
"benny": "^3.7.1",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-exclude": "^2.1.1",
"mocha": "^11.1.0",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
"node-fetch": "^2.7.0",
"sinon": "^9.0.2",
"typescript": "^5.0.4",
"yauzl": "^2.9.1"
},
"scripts": {
"start": "node app.js",
"lint": "eslint --cache --cache-location ../../node_modules/.cache/eslint/ --max-warnings 0 --format unix .",
"lint:fix": "eslint --cache --cache-location ../../node_modules/.cache/eslint/ --fix .",
"test:unit": "yarn run test:unit:_run -- --grep=$MOCHA_GREP",
"test:acceptance": "yarn run test:acceptance:_run -- --grep=$MOCHA_GREP",
"test:unit:_run": "mocha --recursive --exit $@ test/unit/js",
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit --retries=$RETRIES $@ test/acceptance/js",
"nodemon": "node --watch app.js",
"migrate": "knex migrate:latest",
"delete_old_chunks": "node storage/tasks/delete_old_chunks.js",
"fix_duplicate_versions": "node storage/tasks/fix_duplicate_versions.js",
"benchmarks": "node benchmarks/index.js",
"types:check": "tsc --noEmit"
}
}