diff --git a/packages/core/package.json b/packages/core/package.json index 4f707b1760..26c270416f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -22,6 +22,7 @@ "@pnpm/error": "workspace:3.0.0", "@pnpm/filter-lockfile": "workspace:6.0.0", "@pnpm/get-context": "workspace:6.0.0", + "@pnpm/graph-sequencer": "1.0.0", "@pnpm/headless": "workspace:18.0.0", "@pnpm/hoist": "workspace:6.0.0", "@pnpm/lifecycle": "workspace:13.0.0", @@ -51,7 +52,6 @@ "@zkochan/npm-package-arg": "^2.0.1", "@zkochan/rimraf": "^2.1.2", "dependency-path": "workspace:9.0.0", - "@pnpm/graph-sequencer": "1.0.0", "is-inner-link": "^4.0.0", "load-json-file": "^6.2.0", "normalize-path": "^3.0.0", @@ -75,7 +75,7 @@ "@pnpm/package-store": "workspace:13.0.0", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "2.15.1", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/test-fixtures": "workspace:*", "@types/fs-extra": "^9.0.5", "@types/is-ci": "^3.0.0", diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index fbf40b5415..0ad13abbda 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -123,6 +123,9 @@ { "path": "../store-controller-types" }, + { + "path": "../store-path" + }, { "path": "../symlink-dependency" }, diff --git a/packages/headless/package.json b/packages/headless/package.json index 6a0062531e..25e0e87a3c 100644 --- a/packages/headless/package.json +++ b/packages/headless/package.json @@ -23,7 +23,7 @@ "@pnpm/prepare": "workspace:*", "@pnpm/read-projects-context": "workspace:6.0.0", "@pnpm/registry-mock": "2.15.1", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/test-fixtures": "workspace:*", "@types/fs-extra": "^9.0.5", "@types/ramda": "0.27.39", diff --git a/packages/headless/tsconfig.json b/packages/headless/tsconfig.json index 5fc0affdb2..173c67a72d 100644 --- a/packages/headless/tsconfig.json +++ b/packages/headless/tsconfig.json @@ -90,6 +90,9 @@ { "path": "../store-controller-types" }, + { + "path": "../store-path" + }, { "path": "../symlink-dependency" }, diff --git a/packages/mount-modules/package.json b/packages/mount-modules/package.json index 95a639e268..d749601615 100644 --- a/packages/mount-modules/package.json +++ b/packages/mount-modules/package.json @@ -46,7 +46,7 @@ "@pnpm/cafs": "workspace:4.0.0", "@pnpm/lockfile-file": "workspace:5.0.0", "@pnpm/lockfile-utils": "workspace:4.0.0", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/types": "workspace:8.0.0", "dependency-path": "workspace:9.0.0", "hyperdrive-schemas": "^2.0.0", diff --git a/packages/mount-modules/tsconfig.json b/packages/mount-modules/tsconfig.json index c0820abe93..e34ce36ca1 100644 --- a/packages/mount-modules/tsconfig.json +++ b/packages/mount-modules/tsconfig.json @@ -21,6 +21,9 @@ { "path": "../lockfile-utils" }, + { + "path": "../store-path" + }, { "path": "../types" } diff --git a/packages/plugin-commands-env/package.json b/packages/plugin-commands-env/package.json index 09191736f9..ae673f26b0 100644 --- a/packages/plugin-commands-env/package.json +++ b/packages/plugin-commands-env/package.json @@ -36,7 +36,7 @@ "@pnpm/fetch": "workspace:5.0.0", "@pnpm/fetcher-base": "workspace:12.0.0", "@pnpm/package-store": "workspace:13.0.0", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/tarball-fetcher": "workspace:10.0.0", "@zkochan/cmd-shim": "^5.2.2", "adm-zip": "^0.5.5", diff --git a/packages/plugin-commands-env/tsconfig.json b/packages/plugin-commands-env/tsconfig.json index d8d180a992..2ec9a16a6e 100644 --- a/packages/plugin-commands-env/tsconfig.json +++ b/packages/plugin-commands-env/tsconfig.json @@ -30,6 +30,9 @@ { "path": "../package-store" }, + { + "path": "../store-path" + }, { "path": "../tarball-fetcher" } diff --git a/packages/plugin-commands-outdated/package.json b/packages/plugin-commands-outdated/package.json index b5ac1188a7..f06f08dc66 100644 --- a/packages/plugin-commands-outdated/package.json +++ b/packages/plugin-commands-outdated/package.json @@ -57,7 +57,7 @@ "@pnpm/modules-yaml": "workspace:10.0.0", "@pnpm/outdated": "workspace:10.0.0", "@pnpm/semver-diff": "^1.0.2", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/types": "workspace:8.0.0", "@zkochan/table": "^1.0.0", "chalk": "^4.1.0", diff --git a/packages/plugin-commands-outdated/tsconfig.json b/packages/plugin-commands-outdated/tsconfig.json index e998729ec1..40674a8f49 100644 --- a/packages/plugin-commands-outdated/tsconfig.json +++ b/packages/plugin-commands-outdated/tsconfig.json @@ -51,6 +51,9 @@ { "path": "../plugin-commands-installation" }, + { + "path": "../store-path" + }, { "path": "../types" } diff --git a/packages/plugin-commands-script-runners/package.json b/packages/plugin-commands-script-runners/package.json index f246879d06..a7d2e5e63b 100644 --- a/packages/plugin-commands-script-runners/package.json +++ b/packages/plugin-commands-script-runners/package.json @@ -53,7 +53,7 @@ "@pnpm/lifecycle": "workspace:13.0.0", "@pnpm/read-project-manifest": "workspace:3.0.0", "@pnpm/sort-packages": "workspace:3.0.0", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/types": "workspace:8.0.0", "@zkochan/rimraf": "^2.1.2", "execa": "npm:safe-execa@^0.1.1", diff --git a/packages/plugin-commands-script-runners/tsconfig.json b/packages/plugin-commands-script-runners/tsconfig.json index 5767acb53f..820c6fbbc8 100644 --- a/packages/plugin-commands-script-runners/tsconfig.json +++ b/packages/plugin-commands-script-runners/tsconfig.json @@ -39,6 +39,9 @@ { "path": "../sort-packages" }, + { + "path": "../store-path" + }, { "path": "../types" } diff --git a/packages/plugin-commands-server/package.json b/packages/plugin-commands-server/package.json index cbfd863caf..8f94d673f5 100644 --- a/packages/plugin-commands-server/package.json +++ b/packages/plugin-commands-server/package.json @@ -43,7 +43,7 @@ "@pnpm/error": "workspace:3.0.0", "@pnpm/server": "workspace:12.0.0", "@pnpm/store-connection-manager": "workspace:4.0.0", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@zkochan/diable": "^1.0.2", "delay": "^5.0.0", "get-port": "^5.1.1", diff --git a/packages/plugin-commands-server/tsconfig.json b/packages/plugin-commands-server/tsconfig.json index 9a85025672..542f48a733 100644 --- a/packages/plugin-commands-server/tsconfig.json +++ b/packages/plugin-commands-server/tsconfig.json @@ -29,6 +29,9 @@ }, { "path": "../store-connection-manager" + }, + { + "path": "../store-path" } ] } diff --git a/packages/plugin-commands-store/package.json b/packages/plugin-commands-store/package.json index e01c043ac7..13fca1519e 100644 --- a/packages/plugin-commands-store/package.json +++ b/packages/plugin-commands-store/package.json @@ -60,7 +60,7 @@ "@pnpm/pick-registry-for-package": "workspace:3.0.0", "@pnpm/store-connection-manager": "workspace:4.0.0", "@pnpm/store-controller-types": "workspace:13.0.0", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@pnpm/types": "workspace:8.0.0", "archy": "^1.0.0", "dependency-path": "workspace:9.0.0", diff --git a/packages/plugin-commands-store/tsconfig.json b/packages/plugin-commands-store/tsconfig.json index 6d3f1aa65b..b65bd916e2 100644 --- a/packages/plugin-commands-store/tsconfig.json +++ b/packages/plugin-commands-store/tsconfig.json @@ -54,6 +54,9 @@ { "path": "../store-controller-types" }, + { + "path": "../store-path" + }, { "path": "../types" } diff --git a/packages/store-connection-manager/package.json b/packages/store-connection-manager/package.json index a778a4829d..c69de2f222 100644 --- a/packages/store-connection-manager/package.json +++ b/packages/store-connection-manager/package.json @@ -39,7 +39,7 @@ "@pnpm/error": "workspace:3.0.0", "@pnpm/package-store": "workspace:13.0.0", "@pnpm/server": "workspace:12.0.0", - "@pnpm/store-path": "^5.0.0", + "@pnpm/store-path": "workspace:5.0.0", "@zkochan/diable": "^1.0.2", "delay": "^5.0.0", "dir-is-case-sensitive": "^2.0.0" diff --git a/packages/store-connection-manager/tsconfig.json b/packages/store-connection-manager/tsconfig.json index 4a17922c86..91c5fe575e 100644 --- a/packages/store-connection-manager/tsconfig.json +++ b/packages/store-connection-manager/tsconfig.json @@ -26,6 +26,9 @@ }, { "path": "../server" + }, + { + "path": "../store-path" } ] } diff --git a/packages/store-path/README.md b/packages/store-path/README.md new file mode 100644 index 0000000000..5912aa549f --- /dev/null +++ b/packages/store-path/README.md @@ -0,0 +1,26 @@ +# @pnpm/store-path + +> Resolves the pnpm store path + + +[![npm version](https://img.shields.io/npm/v/@pnpm/store-path.svg)](https://www.npmjs.com/package/@pnpm/store-path) [![Build Status](https://img.shields.io/travis/pnpm/store-path/master.svg)](https://travis-ci.org/pnpm/store-path) + + +## Installation + +```sh + add @pnpm/store-path +``` + +## Usage + +```ts +import resolveStorePath from '@pnpm/store-path' + +await resolveStorePath('F:\\project', 'pnpm-store') +//> F:\\pnpm-store\\2 +``` + +## License + +[MIT](./LICENSE) diff --git a/packages/store-path/__mocks__/can-link.js b/packages/store-path/__mocks__/can-link.js new file mode 100644 index 0000000000..42f2836f36 --- /dev/null +++ b/packages/store-path/__mocks__/can-link.js @@ -0,0 +1,8 @@ +const CAN_LINK = new Set([ + '/can-link-to-homedir/tmp=>/home/user/tmp', + '/mnt/project/tmp=>/mnt/tmp/tmp', +]) + +module.exports = function (existingPath, newPath) { + return CAN_LINK.has(`${existingPath}=>${newPath}`) +} diff --git a/packages/store-path/__mocks__/fs.js b/packages/store-path/__mocks__/fs.js new file mode 100644 index 0000000000..28c4c5edac --- /dev/null +++ b/packages/store-path/__mocks__/fs.js @@ -0,0 +1,5 @@ +module.exports.promises = { + mkdir: () => {}, + unlink: () => {}, + rmdir: () => {}, +} diff --git a/packages/store-path/__mocks__/os.js b/packages/store-path/__mocks__/os.js new file mode 100644 index 0000000000..16fdc5dbe8 --- /dev/null +++ b/packages/store-path/__mocks__/os.js @@ -0,0 +1,3 @@ +module.exports = { + homedir: () => '/home/user' +} diff --git a/packages/store-path/__mocks__/path-temp.js b/packages/store-path/__mocks__/path-temp.js new file mode 100644 index 0000000000..99f5e650e2 --- /dev/null +++ b/packages/store-path/__mocks__/path-temp.js @@ -0,0 +1,5 @@ +const path = require('path') + +module.exports = function (dir) { + return path.join(dir, 'tmp') +} diff --git a/packages/store-path/__mocks__/root-link-target.js b/packages/store-path/__mocks__/root-link-target.js new file mode 100644 index 0000000000..b976dc574d --- /dev/null +++ b/packages/store-path/__mocks__/root-link-target.js @@ -0,0 +1,8 @@ +const MAPPINGS = { + '/src/workspace/project/tmp': '/', + '/mnt/project/tmp': '/mnt/project', +} + +module.exports = async function (file) { + return MAPPINGS[file] +} diff --git a/packages/store-path/__mocks__/touch.js b/packages/store-path/__mocks__/touch.js new file mode 100644 index 0000000000..4306849e8e --- /dev/null +++ b/packages/store-path/__mocks__/touch.js @@ -0,0 +1 @@ +module.exports = async function () {} diff --git a/packages/store-path/jest.config.js b/packages/store-path/jest.config.js new file mode 100644 index 0000000000..f697d83169 --- /dev/null +++ b/packages/store-path/jest.config.js @@ -0,0 +1 @@ +module.exports = require('../../jest.config.js') diff --git a/packages/store-path/package.json b/packages/store-path/package.json new file mode 100644 index 0000000000..5de96e600b --- /dev/null +++ b/packages/store-path/package.json @@ -0,0 +1,53 @@ +{ + "name": "@pnpm/store-path", + "version": "5.0.0", + "description": "Resolves the pnpm store path", + "main": "lib/index.js", + "typings": "lib/index.d.ts", + "files": [ + "lib", + "!*.map" + ], + "scripts": { + "prepublishOnly": "pnpm run compile", + "lint": "eslint src/**/*.ts test/**/*.ts", + "_test": "jest", + "test": "pnpm run compile && pnpm run _test", + "compile": "tsc --build && pnpm run lint --fix" + }, + "repository": "https://github.com/pnpm/pnpm/blob/main/packages/store-path", + "keywords": [ + "pnpm7", + "pnpm", + "store" + ], + "engines": { + "node": ">=14.19" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/pnpm/pnpm/issues" + }, + "homepage": "https://github.com/pnpm/pnpm/blob/main/packages/store-path#readme", + "dependencies": { + "@zkochan/rimraf": "^2.1.2", + "can-link": "^2.0.0", + "path-absolute": "^1.0.1", + "path-temp": "^2.0.0", + "root-link-target": "^3.1.0", + "touch": "3.1.0" + }, + "devDependencies": { + "@pnpm/store-path": "workspace:5.0.0", + "@types/is-windows": "^1.0.0", + "@types/node": "^14.17.32", + "@types/rimraf": "^3.0.0", + "@types/touch": "^3.1.1", + "is-windows": "^1.0.2", + "rimraf": "^3.0.2" + }, + "funding": "https://opencollective.com/pnpm", + "exports": { + ".": "./lib/index.js" + } +} diff --git a/packages/store-path/src/index.ts b/packages/store-path/src/index.ts new file mode 100644 index 0000000000..7e7ffe49b1 --- /dev/null +++ b/packages/store-path/src/index.ts @@ -0,0 +1,102 @@ +import { promises as fs } from 'fs' +import rimraf from '@zkochan/rimraf' +import canLink from 'can-link' +import os from 'os' +import path from 'path' +import pathAbsolute from 'path-absolute' +import pathTemp from 'path-temp' +import rootLinkTarget from 'root-link-target' +import touch from 'touch' + +const STORE_VERSION = 'v3' + +export default function ( + pkgRoot: string, + storePath?: string +) { + if (!storePath || isHomepath(storePath)) { + const relStorePath = storePath ? storePath.substring(2) : '.pnpm-store' + return storePathRelativeToHome(pkgRoot, relStorePath) + } + + const storeBasePath = pathAbsolute(storePath, pkgRoot) + + if (storeBasePath.endsWith(`${path.sep}${STORE_VERSION}`)) { + return storeBasePath + } + return path.join(storeBasePath, STORE_VERSION) +} + +async function storePathRelativeToHome (pkgRoot: string, relStore: string) { + const tempFile = pathTemp(pkgRoot) + await fs.mkdir(path.dirname(tempFile), { recursive: true }) + await touch(tempFile) + const homedir = getHomedir() + if (await canLinkToSubdir(tempFile, homedir)) { + await fs.unlink(tempFile) + // If the project is on the drive on which the OS home directory + // then the store is placed in the home directory + return path.join(homedir, relStore, STORE_VERSION) + } + try { + let mountpoint = await rootLinkTarget(tempFile) + // Usually, it is disallowed to write files into the drive's root. + // So we create an empty directory and try to link there. + // The store will be a directory anyway. + const mountpointParent = path.join(mountpoint, '..') + if (!dirsAreEqual(mountpointParent, mountpoint) && await canLinkToSubdir(tempFile, mountpointParent)) { + mountpoint = mountpointParent + } + // If linking works only in the project folder + // then prefer to place the store inside the homedir + if (dirsAreEqual(pkgRoot, mountpoint)) { + return path.join(homedir, relStore, STORE_VERSION) + } + return path.join(mountpoint, relStore, STORE_VERSION) + } catch (err) { + // this is an unlikely situation but if there is no way to find + // a linkable place on the disk, create the store in homedir + return path.join(homedir, relStore, STORE_VERSION) + } finally { + await fs.unlink(tempFile) + } +} + +async function canLinkToSubdir (fileToLink: string, dir: string) { + let result = false + const tmpDir = pathTemp(dir) + try { + await fs.mkdir(tmpDir, { recursive: true }) + result = await canLink(fileToLink, pathTemp(tmpDir)) + } catch (err) { + result = false + } finally { + await safeRmdir(tmpDir) + } + return result +} + +async function safeRmdir (dir: string) { + try { + // We cannot use just fs.rmdir here because can-link + // sometimes might not remove the temporary file in time + // and fs.rmdir can only remove an empty directory. + await rimraf(dir) + } catch (err) { + // ignore + } +} + +function dirsAreEqual (dir1: string, dir2: string) { + return path.relative(dir1, dir2) === '.' +} + +function getHomedir () { + const home = os.homedir() + if (!home) throw new Error('Could not find the homedir') + return home +} + +function isHomepath (filepath: string) { + return filepath.indexOf('~/') === 0 || filepath.indexOf('~\\') === 0 +} diff --git a/packages/store-path/test/index.ts b/packages/store-path/test/index.ts new file mode 100644 index 0000000000..73615e23c0 --- /dev/null +++ b/packages/store-path/test/index.ts @@ -0,0 +1,19 @@ +import storePath from '@pnpm/store-path' +import isWindows from 'is-windows' + +jest.mock('os') +jest.mock('fs') + +const skipOnWindows = isWindows() ? test.skip : test + +skipOnWindows('when a link can be created to the homedir', async () => { + expect(await storePath('/can-link-to-homedir')).toBe('/home/user/.pnpm-store/v3') +}) + +skipOnWindows('a link can be created to the root of the drive', async () => { + expect(await storePath('/src/workspace/project')).toBe('/.pnpm-store/v3') +}) + +skipOnWindows('a link can be created to the a subdir in the root of the drive', async () => { + expect(await storePath('/mnt/project')).toBe('/mnt/.pnpm-store/v3') +}) diff --git a/packages/store-path/tsconfig.json b/packages/store-path/tsconfig.json new file mode 100644 index 0000000000..41aa731a88 --- /dev/null +++ b/packages/store-path/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "@pnpm/tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts", + "../../typings/**/*.d.ts" + ], + "references": [] +} diff --git a/packages/store-path/tsconfig.lint.json b/packages/store-path/tsconfig.lint.json new file mode 100644 index 0000000000..0dc5add6b7 --- /dev/null +++ b/packages/store-path/tsconfig.lint.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "src/**/*.ts", + "test/**/*.ts", + "../../typings/**/*.d.ts" + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a54ccba235..101c30ee9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -427,7 +427,7 @@ importers: '@pnpm/resolve-dependencies': workspace:26.0.0 '@pnpm/resolver-base': workspace:9.0.0 '@pnpm/store-controller-types': workspace:13.0.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/symlink-dependency': workspace:5.0.0 '@pnpm/test-fixtures': workspace:* '@pnpm/types': workspace:8.0.0 @@ -527,7 +527,7 @@ importers: '@pnpm/package-store': link:../package-store '@pnpm/prepare': link:../../privatePackages/prepare '@pnpm/registry-mock': 2.15.1 - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/test-fixtures': link:../../privatePackages/test-fixtures '@types/fs-extra': 9.0.13 '@types/is-ci': 3.0.0 @@ -1074,7 +1074,7 @@ importers: '@pnpm/real-hoist': workspace:0.2.0 '@pnpm/registry-mock': 2.15.1 '@pnpm/store-controller-types': workspace:13.0.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/symlink-dependency': workspace:5.0.0 '@pnpm/test-fixtures': workspace:* '@pnpm/types': workspace:8.0.0 @@ -1134,7 +1134,7 @@ importers: '@pnpm/prepare': link:../../privatePackages/prepare '@pnpm/read-projects-context': link:../read-projects-context '@pnpm/registry-mock': 2.15.1 - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/test-fixtures': link:../../privatePackages/test-fixtures '@types/fs-extra': 9.0.13 '@types/ramda': 0.27.39 @@ -1604,7 +1604,7 @@ importers: '@pnpm/lockfile-utils': workspace:4.0.0 '@pnpm/logger': ^4.0.0 '@pnpm/mount-modules': workspace:0.2.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/types': workspace:8.0.0 '@types/normalize-path': ^3.0.0 dependency-path: workspace:9.0.0 @@ -1617,7 +1617,7 @@ importers: '@pnpm/cafs': link:../cafs '@pnpm/lockfile-file': link:../lockfile-file '@pnpm/lockfile-utils': link:../lockfile-utils - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/types': link:../types dependency-path: link:../dependency-path hyperdrive-schemas: 2.0.0 @@ -2061,7 +2061,7 @@ importers: '@pnpm/package-store': workspace:13.0.0 '@pnpm/plugin-commands-env': workspace:2.0.0 '@pnpm/prepare': workspace:* - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/tarball-fetcher': workspace:10.0.0 '@types/adm-zip': ^0.4.34 '@types/semver': ^7.3.4 @@ -2085,7 +2085,7 @@ importers: '@pnpm/fetch': link:../fetch '@pnpm/fetcher-base': link:../fetcher-base '@pnpm/package-store': link:../package-store - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/tarball-fetcher': link:../tarball-fetcher '@zkochan/cmd-shim': 5.2.2 adm-zip: 0.5.9 @@ -2337,7 +2337,7 @@ importers: '@pnpm/prepare': workspace:* '@pnpm/registry-mock': 2.15.1 '@pnpm/semver-diff': ^1.0.2 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/types': workspace:8.0.0 '@types/lru-cache': ^5.1.0 '@types/ramda': 0.27.39 @@ -2363,7 +2363,7 @@ importers: '@pnpm/modules-yaml': link:../modules-yaml '@pnpm/outdated': link:../outdated '@pnpm/semver-diff': 1.1.0 - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/types': link:../types '@zkochan/table': 1.0.0 chalk: 4.1.2 @@ -2583,7 +2583,7 @@ importers: '@pnpm/read-project-manifest': workspace:3.0.0 '@pnpm/registry-mock': 2.15.1 '@pnpm/sort-packages': workspace:3.0.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/types': workspace:8.0.0 '@types/is-windows': ^1.0.0 '@types/ramda': 0.27.39 @@ -2606,7 +2606,7 @@ importers: '@pnpm/lifecycle': link:../lifecycle '@pnpm/read-project-manifest': link:../read-project-manifest '@pnpm/sort-packages': link:../sort-packages - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/types': link:../types '@zkochan/rimraf': 2.1.2 execa: /safe-execa/0.1.1 @@ -2638,7 +2638,7 @@ importers: '@pnpm/plugin-commands-server': workspace:4.0.0 '@pnpm/server': workspace:12.0.0 '@pnpm/store-connection-manager': workspace:4.0.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@types/is-windows': ^1.0.0 '@types/ramda': 0.27.39 '@types/signal-exit': ^3.0.0 @@ -2659,7 +2659,7 @@ importers: '@pnpm/error': link:../error '@pnpm/server': link:../server '@pnpm/store-connection-manager': link:../store-connection-manager - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@zkochan/diable': 1.0.2 delay: 5.0.0 get-port: 5.1.1 @@ -2712,7 +2712,7 @@ importers: '@pnpm/registry-mock': 2.15.1 '@pnpm/store-connection-manager': workspace:4.0.0 '@pnpm/store-controller-types': workspace:13.0.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@pnpm/types': workspace:8.0.0 '@types/archy': 0.0.31 '@types/ramda': 0.27.39 @@ -2741,7 +2741,7 @@ importers: '@pnpm/pick-registry-for-package': link:../pick-registry-for-package '@pnpm/store-connection-manager': link:../store-connection-manager '@pnpm/store-controller-types': link:../store-controller-types - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@pnpm/types': link:../types archy: 1.0.0 dependency-path: link:../dependency-path @@ -3315,7 +3315,7 @@ importers: '@pnpm/package-store': workspace:13.0.0 '@pnpm/server': workspace:12.0.0 '@pnpm/store-connection-manager': workspace:4.0.0 - '@pnpm/store-path': ^5.0.0 + '@pnpm/store-path': workspace:5.0.0 '@zkochan/diable': ^1.0.2 delay: ^5.0.0 dir-is-case-sensitive: ^2.0.0 @@ -3326,7 +3326,7 @@ importers: '@pnpm/error': link:../error '@pnpm/package-store': link:../package-store '@pnpm/server': link:../server - '@pnpm/store-path': 5.0.0 + '@pnpm/store-path': link:../store-path '@zkochan/diable': 1.0.2 delay: 5.0.0 dir-is-case-sensitive: 2.0.0 @@ -3347,6 +3347,37 @@ importers: devDependencies: '@pnpm/store-controller-types': 'link:' + packages/store-path: + specifiers: + '@pnpm/store-path': workspace:5.0.0 + '@types/is-windows': ^1.0.0 + '@types/node': ^14.17.32 + '@types/rimraf': ^3.0.0 + '@types/touch': ^3.1.1 + '@zkochan/rimraf': ^2.1.2 + can-link: ^2.0.0 + is-windows: ^1.0.2 + path-absolute: ^1.0.1 + path-temp: ^2.0.0 + rimraf: ^3.0.2 + root-link-target: ^3.1.0 + touch: 3.1.0 + dependencies: + '@zkochan/rimraf': 2.1.2 + can-link: 2.0.0 + path-absolute: 1.0.1 + path-temp: 2.0.0 + root-link-target: 3.1.0 + touch: 3.1.0 + devDependencies: + '@pnpm/store-path': 'link:' + '@types/is-windows': 1.0.0 + '@types/node': 14.18.12 + '@types/rimraf': 3.0.2 + '@types/touch': 3.1.2 + is-windows: 1.0.2 + rimraf: 3.0.2 + packages/symlink-dependency: specifiers: '@pnpm/core-loggers': workspace:7.0.0 @@ -5131,17 +5162,6 @@ packages: engines: {node: '>=8.15'} dev: false - /@pnpm/store-path/5.0.0: - resolution: {integrity: sha512-R4GaSXQf04GRu4G0YraEb8HzrOHm2pLHe1NbojUJZG+p7b8GIAtGMiql2BJVCuUd3bOc24aUfvXvC+GqyWK+rw==} - engines: {node: '>=12.10'} - dependencies: - '@zkochan/rimraf': 2.1.2 - can-link: 2.0.0 - path-absolute: 1.0.1 - path-temp: 2.0.0 - root-link-target: 3.1.0 - touch: 3.1.0 - /@pnpm/tabtab/0.1.2: resolution: {integrity: sha512-AYg+Vir0D0rigS9/O7M+v80J4WpTbl68pElNIQ9K5IYxfJ5h3Zk0NJI7bVciV/xbHj3SalmaE6Il8GbPOlKo7g==} engines: {node: '>=10'} @@ -6874,6 +6894,7 @@ packages: /can-link/2.0.0: resolution: {integrity: sha512-2W2yAdkQQrrL0WM6BrGqkrLkWlVon8riZch0EBNklid2CZsOzZnqR5HE7W3Q3BrMWUop+9I2dpjyZqhSOYh6Yg==} engines: {node: '>=10'} + dev: false /can-write-to-dir/1.1.1: resolution: {integrity: sha512-eOgiEWqjppB+3DN/5E82EQ8dTINus8d9GXMCbEsUnp2hcUIcXmBvzWmD3tXMk3CuBK0v+ddK9qw0EAF+JVRMjQ==} @@ -11611,6 +11632,7 @@ packages: /next-path/1.0.0: resolution: {integrity: sha1-gixFgNer54PfGZZbeJYiyoAWA+Q=} engines: {node: '>=6'} + dev: false /next-tick/1.1.0: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} @@ -13176,6 +13198,7 @@ packages: can-link: 2.0.0 next-path: 1.0.0 path-temp: 2.0.0 + dev: false /run-async/2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==}