@pnpm/installing.commands 1100.1.11 → 1100.2.0

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.
@@ -11,7 +11,7 @@ import { readProjectManifestOnly } from '@pnpm/workspace.project-manifest-reader
11
11
  import { findWorkspaceProjects } from '@pnpm/workspace.projects-reader';
12
12
  import { sequenceGraph } from '@pnpm/workspace.projects-sorter';
13
13
  import * as structUtils from '@yarnpkg/core/structUtils';
14
- import yarnLockfileLib from '@yarnpkg/lockfile';
14
+ import { parse as parseYarnLockfile } from '@yarnpkg/lockfile';
15
15
  import { parseSyml } from '@yarnpkg/parsers';
16
16
  import { rimraf } from '@zkochan/rimraf';
17
17
  import { loadJsonFile } from 'load-json-file';
@@ -112,7 +112,7 @@ async function readYarnLockFile(dir) {
112
112
  const yarnLockFile = await gfs.readFile(path.join(dir, 'yarn.lock'), 'utf8');
113
113
  const yarnLockFileType = getYarnLockfileType(yarnLockFile);
114
114
  if (yarnLockFileType === YarnLockType.yarn) {
115
- const lockJsonFile = yarnLockfileLib.parse(yarnLockFile);
115
+ const lockJsonFile = parseYarnLockfile(yarnLockFile);
116
116
  if (lockJsonFile.type === 'success') {
117
117
  return lockJsonFile.object;
118
118
  }
package/lib/install.js CHANGED
@@ -52,6 +52,7 @@ export function rcOptionsTypes() {
52
52
  'public-hoist-pattern',
53
53
  'registry',
54
54
  'reporter',
55
+ 'runtime',
55
56
  'save-workspace-protocol',
56
57
  'scripts-prepend-node-path',
57
58
  'shamefully-hoist',
@@ -122,6 +123,10 @@ For options that may be used with `-r`, see "pnpm help recursive"',
122
123
  description: '`optionalDependencies` are not installed',
123
124
  name: '--no-optional',
124
125
  },
126
+ {
127
+ description: 'Skip installing runtime entries (e.g. Node.js downloaded via `devEngines.runtime`). The lockfile is left untouched, so frozen installs still validate; only the runtime fetch and bin-linking are skipped. Useful in CI matrices where the runtime is provisioned externally.',
128
+ name: '--no-runtime',
129
+ },
125
130
  {
126
131
  description: `Don't read or generate a \`${WANTED_LOCKFILE}\` file`,
127
132
  name: '--no-lockfile',
@@ -4,7 +4,7 @@ import { type UpdateMatchingFunction } from '@pnpm/installing.deps-installer';
4
4
  import type { LockfileObject } from '@pnpm/lockfile.types';
5
5
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
6
6
  import type { IncludedDependencies, PackageVulnerabilityAudit } from '@pnpm/types';
7
- export type InstallDepsOptions = Pick<Config, 'autoInstallPeers' | 'bail' | 'bin' | 'catalogs' | 'catalogMode' | 'cleanupUnusedCatalogs' | 'dedupePeerDependents' | 'dedupePeers' | 'depth' | 'dev' | 'enableGlobalVirtualStore' | 'virtualStoreOnly' | 'engineStrict' | 'excludeLinksFromLockfile' | 'global' | 'globalPnpmfile' | 'ignoreCurrentSpecifiers' | 'ignorePnpmfile' | 'ignoreScripts' | 'optimisticRepeatInstall' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'agent' | 'production' | 'preferWorkspacePackages' | 'registries' | 'runtimeOnFail' | 'save' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'scriptsPrependNodePath' | 'scriptShell' | 'sideEffectsCache' | 'sideEffectsCacheReadonly' | 'sort' | 'sharedWorkspaceLockfile' | 'shellEmulator' | 'tag' | 'allowBuilds' | 'optional' | 'workspaceConcurrency' | 'workspaceDir' | 'workspacePackagePatterns' | 'extraEnv' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'configDependencies' | 'packageExtensions' | 'updateConfig'> & Pick<ConfigContext, 'allProjects' | 'allProjectsGraph' | 'cliOptions' | 'hooks' | 'rootProjectManifestDir' | 'rootProjectManifest' | 'selectedProjectsGraph'> & CreateStoreControllerOptions & {
7
+ export type InstallDepsOptions = Pick<Config, 'autoInstallPeers' | 'bail' | 'bin' | 'catalogs' | 'catalogMode' | 'cleanupUnusedCatalogs' | 'dedupePeerDependents' | 'dedupePeers' | 'depth' | 'dev' | 'enableGlobalVirtualStore' | 'virtualStoreOnly' | 'engineStrict' | 'excludeLinksFromLockfile' | 'global' | 'globalPnpmfile' | 'ignoreCurrentSpecifiers' | 'ignorePnpmfile' | 'ignoreScripts' | 'optimisticRepeatInstall' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'agent' | 'production' | 'preferWorkspacePackages' | 'registries' | 'runtime' | 'runtimeOnFail' | 'save' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'scriptsPrependNodePath' | 'scriptShell' | 'sideEffectsCache' | 'sideEffectsCacheReadonly' | 'sort' | 'sharedWorkspaceLockfile' | 'shellEmulator' | 'tag' | 'allowBuilds' | 'optional' | 'workspaceConcurrency' | 'workspaceDir' | 'workspacePackagePatterns' | 'extraEnv' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'configDependencies' | 'packageExtensions' | 'updateConfig'> & Pick<ConfigContext, 'allProjects' | 'allProjectsGraph' | 'cliOptions' | 'hooks' | 'rootProjectManifestDir' | 'rootProjectManifest' | 'selectedProjectsGraph'> & CreateStoreControllerOptions & {
8
8
  argv: {
9
9
  original: string[];
10
10
  };
@@ -124,6 +124,7 @@ export async function installDeps(opts, params) {
124
124
  linkWorkspacePackagesDepth: opts.linkWorkspacePackages === 'deep' ? Infinity : opts.linkWorkspacePackages ? 0 : -1,
125
125
  sideEffectsCacheRead: opts.sideEffectsCache ?? opts.sideEffectsCacheReadonly,
126
126
  sideEffectsCacheWrite: opts.sideEffectsCache,
127
+ skipRuntimes: opts.runtime === false,
127
128
  storeController: store.ctrl,
128
129
  storeDir: store.dir,
129
130
  workspacePackages,
@@ -5,7 +5,7 @@ import type { PreferredVersions } from '@pnpm/resolving.resolver-base';
5
5
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
6
6
  import type { StoreController } from '@pnpm/store.controller';
7
7
  import type { IncludedDependencies, Project, ProjectManifest, ProjectsGraph } from '@pnpm/types';
8
- export type RecursiveOptions = CreateStoreControllerOptions & Pick<Config, 'bail' | 'configDependencies' | 'dedupePeerDependents' | 'dedupePeers' | 'depth' | 'globalPnpmfile' | 'hoistPattern' | 'ignorePnpmfile' | 'ignoreScripts' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'modulesDir' | 'agent' | 'allowBuilds' | 'registries' | 'save' | 'saveCatalogName' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'sharedWorkspaceLockfile' | 'tag' | 'cleanupUnusedCatalogs' | 'packageConfigs' | 'updateConfig'> & Pick<ConfigContext, 'hooks' | 'rootProjectManifest' | 'rootProjectManifestDir'> & {
8
+ export type RecursiveOptions = CreateStoreControllerOptions & Pick<Config, 'bail' | 'configDependencies' | 'dedupePeerDependents' | 'dedupePeers' | 'depth' | 'globalPnpmfile' | 'hoistPattern' | 'ignorePnpmfile' | 'ignoreScripts' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'modulesDir' | 'agent' | 'allowBuilds' | 'registries' | 'runtime' | 'save' | 'saveCatalogName' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'sharedWorkspaceLockfile' | 'tag' | 'cleanupUnusedCatalogs' | 'packageConfigs' | 'updateConfig'> & Pick<ConfigContext, 'hooks' | 'rootProjectManifest' | 'rootProjectManifestDir'> & {
9
9
  rebuildHandler?: CommandHandler;
10
10
  include?: IncludedDependencies;
11
11
  includeDirect?: IncludedDependencies;
package/lib/recursive.js CHANGED
@@ -42,6 +42,7 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
42
42
  (((opts.ignoredPackages == null) || opts.ignoredPackages.size === 0) &&
43
43
  pkgs.length === allProjects.length),
44
44
  saveCatalogName: opts.saveCatalogName,
45
+ skipRuntimes: opts.runtime === false,
45
46
  storeController: store.ctrl,
46
47
  storeDir: store.dir,
47
48
  targetDependenciesField,
@@ -1,6 +1,6 @@
1
1
  import { stripVTControlCharacters } from 'node:util';
2
- import colorizeSemverDiff from '@pnpm/colorize-semver-diff';
3
- import semverDiff from '@pnpm/semver-diff';
2
+ import { colorizeSemverDiff } from '@pnpm/colorize-semver-diff';
3
+ import { semverDiff } from '@pnpm/semver-diff';
4
4
  import { getBorderCharacters, table } from '@zkochan/table';
5
5
  import { and, groupBy, isEmpty, pickBy, pipe, pluck, uniqBy } from 'ramda';
6
6
  export function getUpdateChoices(outdatedPkgsOfProjects, workspacesEnabled) {
@@ -28,9 +28,10 @@ export function getUpdateChoices(outdatedPkgsOfProjects, workspacesEnabled) {
28
28
  continue;
29
29
  const rawChoices = [];
30
30
  for (const choice of choiceRows) {
31
- // The list of outdated dependencies also contains deprecated packages.
32
- // But we only want to show those dependencies that have newer versions.
33
- if (choice.latestManifest?.version !== choice.current) {
31
+ // The list of outdated dependencies also contains deprecated packages
32
+ // and entries from registries we cannot resolve against (no manifest).
33
+ // We only want to show those dependencies that have a known newer version.
34
+ if (choice.latestManifest != null && choice.latestManifest.version !== choice.current) {
34
35
  rawChoices.push(buildPkgChoice(choice, workspacesEnabled));
35
36
  }
36
37
  }
@@ -66,24 +67,23 @@ export function getUpdateChoices(outdatedPkgsOfProjects, workspacesEnabled) {
66
67
  return finalChoices;
67
68
  }
68
69
  function buildPkgChoice(outdatedPkg, workspacesEnabled) {
69
- const sdiff = semverDiff.default(outdatedPkg.wanted, outdatedPkg.latestManifest.version);
70
+ const sdiff = semverDiff(outdatedPkg.wanted, outdatedPkg.latestManifest.version);
70
71
  const nextVersion = sdiff.change === null
71
72
  ? outdatedPkg.latestManifest.version
72
- : colorizeSemverDiff.default(sdiff); // eslint-disable-line @typescript-eslint/no-explicit-any
73
+ : colorizeSemverDiff(sdiff); // eslint-disable-line @typescript-eslint/no-explicit-any
73
74
  const label = outdatedPkg.packageName;
74
- const lineParts = {
75
+ const raw = [
75
76
  label,
76
- current: outdatedPkg.current,
77
- arrow: '❯',
77
+ outdatedPkg.current ?? '',
78
+ '❯',
78
79
  nextVersion,
79
- workspace: outdatedPkg.workspace,
80
- url: getPkgUrl(outdatedPkg),
81
- };
82
- if (!workspacesEnabled) {
83
- delete lineParts.workspace;
80
+ ];
81
+ if (workspacesEnabled) {
82
+ raw.push(outdatedPkg.workspace ?? '');
84
83
  }
84
+ raw.push(getPkgUrl(outdatedPkg));
85
85
  return {
86
- raw: Object.values(lineParts),
86
+ raw,
87
87
  name: outdatedPkg.packageName,
88
88
  };
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/installing.commands",
3
- "version": "1100.1.11",
3
+ "version": "1100.2.0",
4
4
  "description": "Commands for installation",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -24,67 +24,67 @@
24
24
  "!*.map"
25
25
  ],
26
26
  "dependencies": {
27
- "@pnpm/colorize-semver-diff": "^1.0.1",
28
- "@pnpm/semver-diff": "^1.1.0",
27
+ "@pnpm/colorize-semver-diff": "^2.0.0",
28
+ "@pnpm/semver-diff": "^2.0.0",
29
29
  "@pnpm/util.lex-comparator": "^3.0.2",
30
30
  "@yarnpkg/core": "4.5.0",
31
31
  "@yarnpkg/lockfile": "^1.1.0",
32
32
  "@yarnpkg/parsers": "3.0.3",
33
33
  "@zkochan/rimraf": "^4.0.0",
34
34
  "@zkochan/table": "^2.0.1",
35
- "chalk": "^5.6.2",
35
+ "chalk": "^5.6.0",
36
36
  "enquirer": "^2.4.1",
37
37
  "get-npm-tarball-url": "^2.1.0",
38
38
  "is-subdir": "^2.0.0",
39
39
  "load-json-file": "^7.0.1",
40
40
  "normalize-path": "^3.0.0",
41
41
  "p-filter": "^4.1.0",
42
- "p-limit": "^7.3.0",
42
+ "p-limit": "^7.1.0",
43
43
  "ramda": "npm:@pnpm/ramda@0.28.1",
44
44
  "render-help": "^2.0.0",
45
45
  "version-selector-type": "^3.0.0",
46
- "@pnpm/building.after-install": "1101.0.8",
47
- "@pnpm/cli.utils": "1101.0.2",
48
- "@pnpm/config.matcher": "1100.0.1",
49
- "@pnpm/cli.common-cli-options-help": "1100.0.1",
46
+ "@pnpm/building.after-install": "1101.0.10",
50
47
  "@pnpm/catalogs.types": "1100.0.0",
51
48
  "@pnpm/cli.command": "1100.0.1",
52
- "@pnpm/config.pick-registry-for-package": "1100.0.2",
53
- "@pnpm/config.writer": "1100.0.6",
54
- "@pnpm/deps.inspection.outdated": "1100.0.11",
49
+ "@pnpm/cli.common-cli-options-help": "1100.0.1",
50
+ "@pnpm/config.pick-registry-for-package": "1100.0.3",
51
+ "@pnpm/config.matcher": "1100.0.1",
52
+ "@pnpm/cli.utils": "1101.0.3",
53
+ "@pnpm/config.reader": "1101.3.0",
54
+ "@pnpm/deps.inspection.outdated": "1100.0.13",
55
55
  "@pnpm/constants": "1100.0.0",
56
- "@pnpm/config.reader": "1101.2.1",
57
- "@pnpm/fs.graceful-fs": "1100.1.0",
58
- "@pnpm/deps.path": "1100.0.2",
59
- "@pnpm/fs.read-modules-dir": "1100.0.1",
60
- "@pnpm/deps.status": "1100.0.11",
56
+ "@pnpm/config.writer": "1100.0.7",
57
+ "@pnpm/deps.status": "1100.0.13",
61
58
  "@pnpm/error": "1100.0.0",
62
- "@pnpm/global.commands": "1100.0.13",
63
- "@pnpm/installing.context": "1100.0.7",
64
- "@pnpm/installing.env-installer": "1101.0.6",
65
- "@pnpm/lockfile.types": "1100.0.4",
66
- "@pnpm/installing.deps-installer": "1101.0.8",
67
- "@pnpm/hooks.pnpmfile": "1100.0.6",
59
+ "@pnpm/deps.path": "1100.0.3",
60
+ "@pnpm/hooks.pnpmfile": "1100.0.7",
61
+ "@pnpm/fs.graceful-fs": "1100.1.0",
62
+ "@pnpm/global.commands": "1100.0.15",
63
+ "@pnpm/installing.context": "1100.0.9",
64
+ "@pnpm/installing.deps-installer": "1101.1.0",
65
+ "@pnpm/installing.env-installer": "1101.0.8",
66
+ "@pnpm/lockfile.types": "1100.0.5",
67
+ "@pnpm/pkg-manifest.reader": "1100.0.3",
68
+ "@pnpm/pkg-manifest.utils": "1100.1.2",
68
69
  "@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
69
- "@pnpm/pkg-manifest.reader": "1100.0.2",
70
- "@pnpm/store.controller": "1101.0.3",
71
- "@pnpm/resolving.resolver-base": "1100.1.2",
72
- "@pnpm/workspace.project-manifest-reader": "1100.0.3",
73
- "@pnpm/store.connection-manager": "1100.0.12",
74
- "@pnpm/workspace.project-manifest-writer": "1100.0.2",
75
- "@pnpm/pkg-manifest.utils": "1100.1.1",
76
- "@pnpm/workspace.projects-reader": "1101.0.2",
77
- "@pnpm/workspace.projects-graph": "1100.0.5",
78
- "@pnpm/workspace.projects-sorter": "1100.0.1",
79
- "@pnpm/installing.dedupe.check": "1100.0.4",
70
+ "@pnpm/resolving.resolver-base": "1100.1.3",
71
+ "@pnpm/store.connection-manager": "1100.1.0",
72
+ "@pnpm/types": "1101.1.0",
73
+ "@pnpm/store.controller": "1101.0.5",
74
+ "@pnpm/workspace.project-manifest-reader": "1100.0.4",
75
+ "@pnpm/workspace.project-manifest-writer": "1100.0.3",
76
+ "@pnpm/installing.dedupe.check": "1100.0.5",
77
+ "@pnpm/workspace.projects-filter": "1100.0.10",
78
+ "@pnpm/workspace.projects-graph": "1100.0.7",
79
+ "@pnpm/workspace.projects-reader": "1101.0.3",
80
+ "@pnpm/workspace.projects-sorter": "1100.0.2",
81
+ "@pnpm/workspace.state": "1100.0.11",
82
+ "@pnpm/workspace.workspace-manifest-writer": "1100.0.7",
80
83
  "@pnpm/workspace.root-finder": "1100.0.1",
81
- "@pnpm/workspace.workspace-manifest-writer": "1100.0.6",
82
- "@pnpm/workspace.projects-filter": "1100.0.8",
83
- "@pnpm/workspace.state": "1100.0.9",
84
- "@pnpm/types": "1101.0.0"
84
+ "@pnpm/fs.read-modules-dir": "1100.0.1"
85
85
  },
86
86
  "peerDependencies": {
87
- "@pnpm/logger": "^1001.0.1"
87
+ "@pnpm/logger": ">=1001.0.0 <1002.0.0"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@jest/globals": "30.3.0",
@@ -94,7 +94,7 @@
94
94
  "@types/ramda": "0.31.1",
95
95
  "@types/yarnpkg__lockfile": "^1.1.9",
96
96
  "@types/zkochan__table": "npm:@types/table@6.0.0",
97
- "ci-info": "^4.4.0",
97
+ "ci-info": "^4.3.0",
98
98
  "delay": "^7.0.0",
99
99
  "jest-diff": "^30.3.0",
100
100
  "path-name": "^1.0.0",
@@ -105,18 +105,18 @@
105
105
  "write-json-file": "^7.0.0",
106
106
  "write-package": "7.2.0",
107
107
  "write-yaml-file": "^6.0.0",
108
- "@pnpm/installing.commands": "1100.1.11",
109
- "@pnpm/assert-project": "1100.0.5",
110
- "@pnpm/prepare": "1100.0.5",
111
- "@pnpm/installing.modules-yaml": "1100.0.3",
112
- "@pnpm/store.index": "1100.0.0",
113
- "@pnpm/test-ipc-server": "1100.0.0",
108
+ "@pnpm/installing.commands": "1100.2.0",
109
+ "@pnpm/assert-project": "1100.0.7",
110
+ "@pnpm/installing.modules-yaml": "1100.0.4",
111
+ "@pnpm/prepare": "1100.0.7",
114
112
  "@pnpm/logger": "1100.0.0",
113
+ "@pnpm/store.index": "1100.1.0",
115
114
  "@pnpm/test-fixtures": "1100.0.0",
116
- "@pnpm/testing.mock-agent": "1100.0.2",
115
+ "@pnpm/test-ipc-server": "1100.0.0",
117
116
  "@pnpm/testing.command-defaults": "1100.0.1",
118
- "@pnpm/worker": "1100.1.2",
119
- "@pnpm/workspace.projects-filter": "1100.0.8"
117
+ "@pnpm/workspace.projects-filter": "1100.0.10",
118
+ "@pnpm/worker": "1100.1.4",
119
+ "@pnpm/testing.mock-agent": "1100.0.3"
120
120
  },
121
121
  "engines": {
122
122
  "node": ">=22.13"