Files
pnpm/modules-mounter/daemon/package.json
Zoltan Kochan 1ec944a31b fix: fix mount-modules test when fuse-native is not installed (#10900)
* fix: avoid static type import that triggers fuse-native resolution in test

The static `import type` from createFuseHandlers.ts caused Jest to resolve
the entire module graph, including fuse-native, before the mock was set up.
Derive the type from the function's return type instead.

* fix: fix mount-modules test when fuse-native is not installed

The static `import type` from createFuseHandlers.ts caused Jest to resolve
the entire module graph, including fuse-native, before the mock was set up.
Derive the type from the function's return type instead.

Also add a moduleNameMapper and mock file for fuse-native so Jest's resolver
can find the module even when the optional dependency is not installed.

* fix: preserve existing jest config in meta-updater

The meta-updater was overwriting the entire jest config with just the
preset, dropping any additional config like moduleNameMapper.
2026-03-07 15:48:59 +01:00

75 lines
2.1 KiB
JSON

{
"name": "@pnpm/mount-modules",
"version": "1001.0.34",
"description": "Mounts a node_modules directory with FUSE",
"keywords": [
"pnpm",
"pnpm11",
"lockfile",
"shrinkwrap"
],
"license": "MIT",
"funding": "https://opencollective.com/pnpm",
"repository": "https://github.com/pnpm/pnpm/tree/main/modules-mounter/daemon",
"homepage": "https://github.com/pnpm/pnpm/tree/main/modules-mounter/daemon#readme",
"bugs": {
"url": "https://github.com/pnpm/pnpm/issues"
},
"type": "module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": {
".": "./lib/index.js"
},
"files": [
"lib",
"!*.map",
"bin"
],
"bin": "bin/mount-modules.js",
"scripts": {
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
"test": "pnpm run compile && pnpm run _test",
"prepublishOnly": "pnpm run compile",
"pretest": "node ../../pnpm/dist/pnpm.mjs install --dir=test/__fixtures__/simple --config.enableGlobalVirtualStore=false",
"_test": "pnpm pretest && cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
"compile": "tsgo --build && pnpm run lint --fix"
},
"dependencies": {
"@pnpm/config": "workspace:*",
"@pnpm/dependency-path": "workspace:*",
"@pnpm/lockfile.fs": "workspace:*",
"@pnpm/lockfile.utils": "workspace:*",
"@pnpm/logger": "workspace:*",
"@pnpm/store-path": "workspace:*",
"@pnpm/store.cafs": "workspace:*",
"@pnpm/store.index": "workspace:*",
"@pnpm/types": "workspace:*",
"hyperdrive-schemas": "catalog:",
"normalize-path": "catalog:"
},
"peerDependencies": {
"@pnpm/logger": "catalog:"
},
"optionalDependencies": {
"fuse-native": "catalog:"
},
"devDependencies": {
"@jest/globals": "catalog:",
"@pnpm/constants": "workspace:*",
"@pnpm/logger": "workspace:*",
"@pnpm/mount-modules": "workspace:*",
"@types/normalize-path": "catalog:",
"rimraf": "catalog:"
},
"engines": {
"node": ">=22.13"
},
"jest": {
"preset": "@pnpm/jest-config",
"moduleNameMapper": {
"^fuse-native$": "<rootDir>/__mocks__/fuse-native.js"
}
}
}