mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-25 15:07:06 -04:00
Adds @pnpm/agent.cafs-writer — a napi-rs crate that parses the binary /v1/files payload and writes each file to the CAFS in parallel. Wired into worker/src/start.ts as an optional native path; falls back to the existing JS streaming parser if the addon is not built for the host. Backends: - rayon + std::fs::write with O_CREAT|O_EXCL (default, all platforms) - tokio-uring on Linux (behind cfg(target_os = "linux")) End-to-end on the test-alot workload (1300 packages, warm agent server): native 19.3s js 23.3s (~17% slower) Microbench (parse + write only, darwin-arm64): 10000 × 1KB files native 1.8s vs js 8.3s (~4.5x) Toggle: set PNPM_CAFS_WRITER_DISABLE_NATIVE=1 to force the JS fallback. The native module is an optionalDependencies entry of @pnpm/worker and of the pnpm package (so the bundled CLI can resolve it at runtime).
71 lines
2.0 KiB
JSON
71 lines
2.0 KiB
JSON
{
|
|
"name": "@pnpm/worker",
|
|
"version": "1100.0.1",
|
|
"description": "A worker for extracting package taralls to the store",
|
|
"keywords": [
|
|
"pnpm",
|
|
"pnpm11",
|
|
"tarball"
|
|
],
|
|
"license": "MIT",
|
|
"funding": "https://opencollective.com/pnpm",
|
|
"repository": "https://github.com/pnpm/pnpm/tree/main/worker",
|
|
"homepage": "https://github.com/pnpm/pnpm/tree/main/worker#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
},
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"types": "lib/index.d.ts",
|
|
"exports": {
|
|
".": "./lib/index.js",
|
|
"./start": "./lib/start.js"
|
|
},
|
|
"files": [
|
|
"lib",
|
|
"!*.map"
|
|
],
|
|
"scripts": {
|
|
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
"prepublishOnly": "pn compile",
|
|
"test": "pn compile && pn .test",
|
|
"compile": "tsgo --build && pn lint --fix",
|
|
".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
|
|
},
|
|
"optionalDependencies": {
|
|
"@pnpm/agent.cafs-writer": "workspace:*"
|
|
},
|
|
"dependencies": {
|
|
"@pnpm/building.pkg-requires-build": "workspace:*",
|
|
"@pnpm/crypto.integrity": "workspace:*",
|
|
"@pnpm/error": "workspace:*",
|
|
"@pnpm/fs.graceful-fs": "workspace:*",
|
|
"@pnpm/fs.hard-link-dir": "workspace:*",
|
|
"@pnpm/fs.symlink-dependency": "workspace:*",
|
|
"@pnpm/store.cafs": "workspace:*",
|
|
"@pnpm/store.cafs-types": "workspace:*",
|
|
"@pnpm/store.create-cafs-store": "workspace:*",
|
|
"@pnpm/store.index": "workspace:*",
|
|
"@rushstack/worker-pool": "catalog:",
|
|
"is-windows": "catalog:",
|
|
"p-limit": "catalog:",
|
|
"semver": "catalog:"
|
|
},
|
|
"peerDependencies": {
|
|
"@pnpm/logger": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@pnpm/logger": "workspace:*",
|
|
"@pnpm/types": "workspace:*",
|
|
"@pnpm/worker": "workspace:*",
|
|
"@types/is-windows": "catalog:",
|
|
"@types/semver": "catalog:"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.13"
|
|
},
|
|
"jest": {
|
|
"preset": "@pnpm/jest-config"
|
|
}
|
|
}
|