@pnpm/deps.inspection.tree-builder 1101.0.6 → 1101.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/lib/buildDependencyGraph.js +1 -1
- package/lib/getPkgInfo.d.ts +3 -1
- package/lib/getPkgInfo.js +8 -2
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @pnpm/reviewing.dependencies-hierarchy
|
|
2
2
|
|
|
3
|
+
## 1101.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `pnpm install --dev` and `pnpm fetch --dev` now install the optional dependencies of devDependencies, such as the platform binaries of Biome and oxlint. The project's own `optionalDependencies` are still skipped [#9678](https://github.com/pnpm/pnpm/issues/9678).
|
|
8
|
+
|
|
9
|
+
- `pnpm install` no longer fails when a package from the registry declares a `file:` dependency on a directory inside itself, such as `"@types/css-tree": "file:./typings/css-tree"`. pnpm links that dependency to the directory inside the package, as npm and Yarn do. The lockfile records it as `link:<root>/typings/css-tree` [#9141](https://github.com/pnpm/pnpm/issues/9141).
|
|
10
|
+
|
|
11
|
+
- `pnpm list` now shows the correct path of a `link:` dependency that points to a directory on another drive on Windows. The path used to be appended to the project directory, such as `C:\project\D:\lib`, and `pnpm list --long` could not show the package's details [#10362](https://github.com/pnpm/pnpm/issues/10362).
|
|
12
|
+
|
|
13
|
+
- Updated dependencies:
|
|
14
|
+
- @pnpm/deps.path@1101.0.5
|
|
15
|
+
- @pnpm/fs.read-modules-dir@1100.0.3
|
|
16
|
+
- @pnpm/installing.modules-yaml@1101.0.5
|
|
17
|
+
- @pnpm/lockfile.detect-dep-types@1100.0.26
|
|
18
|
+
- @pnpm/lockfile.fs@1100.2.10
|
|
19
|
+
- @pnpm/lockfile.peer-edges@1100.0.1
|
|
20
|
+
- @pnpm/lockfile.utils@1102.1.5
|
|
21
|
+
- @pnpm/pkg-manifest.reader@1100.0.21
|
|
22
|
+
- @pnpm/store.cafs@1100.3.5
|
|
23
|
+
- @pnpm/store.index@1100.3.3
|
|
24
|
+
|
|
3
25
|
## 1101.0.6
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -23,7 +23,7 @@ export function buildDependencyGraph(rootIds, opts) {
|
|
|
23
23
|
? {
|
|
24
24
|
...(opts.include.dependencies !== false ? snapshot.dependencies : undefined),
|
|
25
25
|
...(opts.include.devDependencies !== false ? snapshot.devDependencies : undefined),
|
|
26
|
-
...(opts.include.optionalDependencies ? snapshot.optionalDependencies : undefined),
|
|
26
|
+
...(opts.include.dependencies !== false && opts.include.optionalDependencies ? snapshot.optionalDependencies : undefined),
|
|
27
27
|
}
|
|
28
28
|
: !opts.include.optionalDependencies
|
|
29
29
|
? snapshot.dependencies
|
package/lib/getPkgInfo.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ export interface GetPkgInfoOpts {
|
|
|
17
17
|
readonly virtualStoreDirMaxLength: number;
|
|
18
18
|
readonly depTypes: DepTypes;
|
|
19
19
|
/**
|
|
20
|
-
* The base dir if the `ref` argument is a `"link:"` relative path.
|
|
20
|
+
* The base dir if the `ref` argument is a `"link:"` relative path. An
|
|
21
|
+
* absolute `"link:"` path, such as one on another drive on Windows, is used
|
|
22
|
+
* as is.
|
|
21
23
|
*/
|
|
22
24
|
readonly linkedPathBaseDir: string;
|
|
23
25
|
/**
|
package/lib/getPkgInfo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { refToRelative } from '@pnpm/deps.path';
|
|
2
|
+
import { packageRootLinkTarget, refToRelative } from '@pnpm/deps.path';
|
|
3
3
|
import { DepType } from '@pnpm/lockfile.detect-dep-types';
|
|
4
4
|
import { nameVerFromPkgSnapshot, pkgSnapshotToResolution, } from '@pnpm/lockfile.utils';
|
|
5
5
|
import { readPackageJsonFromDirSync } from '@pnpm/pkg-manifest.reader';
|
|
@@ -73,7 +73,7 @@ export function getPkgInfo(opts) {
|
|
|
73
73
|
modulesDir: opts.modulesDir,
|
|
74
74
|
parentDir: opts.parentDir,
|
|
75
75
|
})
|
|
76
|
-
:
|
|
76
|
+
: resolveLinkedPath(opts);
|
|
77
77
|
if (version.startsWith('link:') && opts.rewriteLinkVersionDir) {
|
|
78
78
|
version = `link:${normalizePath(path.relative(opts.rewriteLinkVersionDir, fullPackagePath))}`;
|
|
79
79
|
}
|
|
@@ -110,4 +110,10 @@ export function getPkgInfo(opts) {
|
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
+
function resolveLinkedPath(opts) {
|
|
114
|
+
const target = packageRootLinkTarget(opts.ref);
|
|
115
|
+
return target != null && opts.parentDir != null
|
|
116
|
+
? path.join(opts.parentDir, target)
|
|
117
|
+
: path.resolve(opts.linkedPathBaseDir, opts.ref.slice(5));
|
|
118
|
+
}
|
|
113
119
|
//# sourceMappingURL=getPkgInfo.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/deps.inspection.tree-builder",
|
|
3
|
-
"version": "1101.0.
|
|
3
|
+
"version": "1101.0.7",
|
|
4
4
|
"description": "Creates a dependencies hierarchy for a symlinked `node_modules`",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@pnpm/config.matcher": "1100.0.2",
|
|
34
34
|
"@pnpm/config.normalize-registries": "1101.0.2",
|
|
35
|
-
"@pnpm/deps.path": "1101.0.
|
|
36
|
-
"@pnpm/fs.read-modules-dir": "1100.0.
|
|
37
|
-
"@pnpm/installing.modules-yaml": "1101.0.
|
|
38
|
-
"@pnpm/lockfile.detect-dep-types": "1100.0.
|
|
39
|
-
"@pnpm/lockfile.fs": "1100.2.
|
|
40
|
-
"@pnpm/lockfile.peer-edges": "1100.0.
|
|
41
|
-
"@pnpm/lockfile.utils": "1102.1.
|
|
35
|
+
"@pnpm/deps.path": "1101.0.5",
|
|
36
|
+
"@pnpm/fs.read-modules-dir": "1100.0.3",
|
|
37
|
+
"@pnpm/installing.modules-yaml": "1101.0.5",
|
|
38
|
+
"@pnpm/lockfile.detect-dep-types": "1100.0.26",
|
|
39
|
+
"@pnpm/lockfile.fs": "1100.2.10",
|
|
40
|
+
"@pnpm/lockfile.peer-edges": "1100.0.1",
|
|
41
|
+
"@pnpm/lockfile.utils": "1102.1.5",
|
|
42
42
|
"@pnpm/npm-package-arg": "^2.0.0",
|
|
43
|
-
"@pnpm/pkg-manifest.reader": "1100.0.
|
|
44
|
-
"@pnpm/store.cafs": "1100.3.
|
|
45
|
-
"@pnpm/store.index": "1100.3.
|
|
43
|
+
"@pnpm/pkg-manifest.reader": "1100.0.21",
|
|
44
|
+
"@pnpm/store.cafs": "1100.3.5",
|
|
45
|
+
"@pnpm/store.index": "1100.3.3",
|
|
46
46
|
"@pnpm/text.ordinal-comparator": "1100.0.0",
|
|
47
47
|
"@pnpm/types": "1102.1.1",
|
|
48
48
|
"load-json-file": "^7.0.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@jest/globals": "30.4.1",
|
|
58
58
|
"@pnpm/constants": "1102.0.0",
|
|
59
|
-
"@pnpm/deps.inspection.tree-builder": "1101.0.
|
|
59
|
+
"@pnpm/deps.inspection.tree-builder": "1101.0.7",
|
|
60
60
|
"@pnpm/test-fixtures": "1100.0.1",
|
|
61
61
|
"@types/normalize-path": "^3.0.2",
|
|
62
62
|
"@types/semver": "7.8.0"
|