@pnpm/installing.commands 1004.6.10

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.
Files changed (47) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +15 -0
  3. package/lib/add.d.ts +17 -0
  4. package/lib/add.js +285 -0
  5. package/lib/ci.d.ts +6 -0
  6. package/lib/ci.js +20 -0
  7. package/lib/createProjectManifestWriter.d.ts +2 -0
  8. package/lib/createProjectManifestWriter.js +17 -0
  9. package/lib/dedupe.d.ts +9 -0
  10. package/lib/dedupe.js +59 -0
  11. package/lib/fetch.d.ts +10 -0
  12. package/lib/fetch.js +75 -0
  13. package/lib/getFetchFullMetadata.d.ts +8 -0
  14. package/lib/getFetchFullMetadata.js +7 -0
  15. package/lib/getPinnedVersion.d.ts +4 -0
  16. package/lib/getPinnedVersion.js +6 -0
  17. package/lib/getSaveType.d.ts +3 -0
  18. package/lib/getSaveType.js +10 -0
  19. package/lib/import/index.d.ts +9 -0
  20. package/lib/import/index.js +238 -0
  21. package/lib/import/yarnUtil.d.ts +8 -0
  22. package/lib/import/yarnUtil.js +65 -0
  23. package/lib/index.d.ts +13 -0
  24. package/lib/index.js +13 -0
  25. package/lib/install.d.ts +28 -0
  26. package/lib/install.js +281 -0
  27. package/lib/installDeps.d.ts +41 -0
  28. package/lib/installDeps.js +349 -0
  29. package/lib/link.d.ts +9 -0
  30. package/lib/link.js +130 -0
  31. package/lib/nodeExecPath.d.ts +1 -0
  32. package/lib/nodeExecPath.js +16 -0
  33. package/lib/prune.d.ts +6 -0
  34. package/lib/prune.js +49 -0
  35. package/lib/recursive.d.ts +41 -0
  36. package/lib/recursive.js +406 -0
  37. package/lib/remove.d.ts +12 -0
  38. package/lib/remove.js +189 -0
  39. package/lib/unlink.d.ts +6 -0
  40. package/lib/unlink.js +62 -0
  41. package/lib/update/getUpdateChoices.d.ts +14 -0
  42. package/lib/update/getUpdateChoices.js +126 -0
  43. package/lib/update/index.d.ts +15 -0
  44. package/lib/update/index.js +295 -0
  45. package/lib/updateWorkspaceDependencies.d.ts +4 -0
  46. package/lib/updateWorkspaceDependencies.js +27 -0
  47. package/package.json +134 -0
@@ -0,0 +1,14 @@
1
+ import type { OutdatedPackage } from '@pnpm/deps.inspection.outdated';
2
+ export interface ChoiceRow {
3
+ name: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ }
7
+ type ChoiceGroup = Array<{
8
+ name: string;
9
+ message: string;
10
+ choices: ChoiceRow[];
11
+ disabled?: boolean;
12
+ }>;
13
+ export declare function getUpdateChoices(outdatedPkgsOfProjects: OutdatedPackage[], workspacesEnabled: boolean): ChoiceGroup;
14
+ export {};
@@ -0,0 +1,126 @@
1
+ import { stripVTControlCharacters } from 'node:util';
2
+ import colorizeSemverDiff from '@pnpm/colorize-semver-diff';
3
+ import semverDiff from '@pnpm/semver-diff';
4
+ import { getBorderCharacters, table } from '@zkochan/table';
5
+ import { and, groupBy, isEmpty, pickBy, pipe, pluck, uniqBy } from 'ramda';
6
+ export function getUpdateChoices(outdatedPkgsOfProjects, workspacesEnabled) {
7
+ if (isEmpty(outdatedPkgsOfProjects)) {
8
+ return [];
9
+ }
10
+ const pkgUniqueKey = (outdatedPkg) => {
11
+ return JSON.stringify([outdatedPkg.packageName, outdatedPkg.latestManifest?.version, outdatedPkg.current]);
12
+ };
13
+ const dedupeAndGroupPkgs = pipe(uniqBy((outdatedPkg) => pkgUniqueKey(outdatedPkg)), groupBy((outdatedPkg) => outdatedPkg.belongsTo));
14
+ const groupPkgsByType = dedupeAndGroupPkgs(outdatedPkgsOfProjects);
15
+ const headerRow = {
16
+ Package: true,
17
+ Current: true,
18
+ ' ': true,
19
+ Target: true,
20
+ Workspace: workspacesEnabled,
21
+ URL: true,
22
+ };
23
+ // returns only the keys that are true
24
+ const header = Object.keys(pickBy(and, headerRow));
25
+ const finalChoices = [];
26
+ for (const [depGroup, choiceRows] of Object.entries(groupPkgsByType)) {
27
+ if (choiceRows.length === 0)
28
+ continue;
29
+ const rawChoices = [];
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) {
34
+ rawChoices.push(buildPkgChoice(choice, workspacesEnabled));
35
+ }
36
+ }
37
+ if (rawChoices.length === 0)
38
+ continue;
39
+ // add in a header row for each group
40
+ rawChoices.unshift({
41
+ raw: header,
42
+ name: '',
43
+ disabled: true,
44
+ });
45
+ const renderedTable = alignColumns(pluck('raw', rawChoices)).filter(Boolean);
46
+ const choices = rawChoices.map((outdatedPkg, i) => {
47
+ if (i === 0) {
48
+ return {
49
+ name: renderedTable[i],
50
+ value: '',
51
+ disabled: true,
52
+ hint: '',
53
+ };
54
+ }
55
+ return {
56
+ name: outdatedPkg.name,
57
+ message: renderedTable[i],
58
+ value: outdatedPkg.name,
59
+ };
60
+ });
61
+ // To filter out selected "dependencies" or "devDependencies" in the final output,
62
+ // we rename it here to "[dependencies]" or "[devDependencies]",
63
+ // which will be filtered out in the format function of the prompt.
64
+ finalChoices.push({ name: `[${depGroup}]`, choices, message: depGroup });
65
+ }
66
+ return finalChoices;
67
+ }
68
+ function buildPkgChoice(outdatedPkg, workspacesEnabled) {
69
+ const sdiff = semverDiff.default(outdatedPkg.wanted, outdatedPkg.latestManifest.version);
70
+ const nextVersion = sdiff.change === null
71
+ ? outdatedPkg.latestManifest.version
72
+ : colorizeSemverDiff.default(sdiff); // eslint-disable-line @typescript-eslint/no-explicit-any
73
+ const label = outdatedPkg.packageName;
74
+ const lineParts = {
75
+ label,
76
+ current: outdatedPkg.current,
77
+ arrow: '❯',
78
+ nextVersion,
79
+ workspace: outdatedPkg.workspace,
80
+ url: getPkgUrl(outdatedPkg),
81
+ };
82
+ if (!workspacesEnabled) {
83
+ delete lineParts.workspace;
84
+ }
85
+ return {
86
+ raw: Object.values(lineParts),
87
+ name: outdatedPkg.packageName,
88
+ };
89
+ }
90
+ function getPkgUrl(pkg) {
91
+ if (pkg.latestManifest?.homepage) {
92
+ return pkg.latestManifest?.homepage;
93
+ }
94
+ if (typeof pkg.latestManifest?.repository !== 'string') {
95
+ if (pkg.latestManifest?.repository?.url) {
96
+ return pkg.latestManifest?.repository?.url;
97
+ }
98
+ }
99
+ return '';
100
+ }
101
+ function alignColumns(rows) {
102
+ return table(rows, {
103
+ border: getBorderCharacters('void'),
104
+ columnDefault: {
105
+ paddingLeft: 0,
106
+ paddingRight: 1,
107
+ wrapWord: true,
108
+ },
109
+ columns: {
110
+ 0: { width: 50, truncate: 100 },
111
+ 1: { width: getColumnWidth(rows, 1, 15), alignment: 'right' },
112
+ 3: { width: getColumnWidth(rows, 3, 15) },
113
+ 4: { paddingLeft: 2 },
114
+ 5: { paddingLeft: 2 },
115
+ },
116
+ drawHorizontalLine: () => false,
117
+ }).split('\n');
118
+ }
119
+ function getColumnWidth(rows, columnIndex, minWidth) {
120
+ return rows.reduce((max, row) => {
121
+ if (row[columnIndex] == null)
122
+ return max;
123
+ return Math.max(max, stripVTControlCharacters(row[columnIndex]).length);
124
+ }, minWidth);
125
+ }
126
+ //# sourceMappingURL=getUpdateChoices.js.map
@@ -0,0 +1,15 @@
1
+ import type { CompletionFunc } from '@pnpm/cli.command';
2
+ import type { PackageVulnerabilityAudit } from '@pnpm/types';
3
+ import type { InstallCommandOptions } from '../install.js';
4
+ export declare function rcOptionsTypes(): Record<string, unknown>;
5
+ export declare function cliOptionsTypes(): Record<string, unknown>;
6
+ export declare const shorthands: Record<string, string>;
7
+ export declare const commandNames: string[];
8
+ export declare const completion: CompletionFunc;
9
+ export declare function help(): string;
10
+ export type UpdateCommandOptions = InstallCommandOptions & {
11
+ interactive?: boolean;
12
+ latest?: boolean;
13
+ packageVulnerabilityAudit?: PackageVulnerabilityAudit;
14
+ };
15
+ export declare function handler(opts: UpdateCommandOptions, params?: string[]): Promise<string | undefined>;
@@ -0,0 +1,295 @@
1
+ import { FILTERING, OPTIONS, UNIVERSAL_OPTIONS } from '@pnpm/cli.common-cli-options-help';
2
+ import { docsUrl, readDepNameCompletions, readProjectManifestOnly, } from '@pnpm/cli.utils';
3
+ import { createMatcher } from '@pnpm/config.matcher';
4
+ import { types as allTypes } from '@pnpm/config.reader';
5
+ import { outdatedDepsOfProjects } from '@pnpm/deps.inspection.outdated';
6
+ import { PnpmError } from '@pnpm/error';
7
+ import { handleGlobalUpdate } from '@pnpm/global.commands';
8
+ import { globalInfo } from '@pnpm/logger';
9
+ import chalk from 'chalk';
10
+ import enquirer from 'enquirer';
11
+ import { pick, pluck, unnest } from 'ramda';
12
+ import { renderHelp } from 'render-help';
13
+ import { installDeps } from '../installDeps.js';
14
+ import { parseUpdateParam } from '../recursive.js';
15
+ import { getUpdateChoices } from './getUpdateChoices.js';
16
+ export function rcOptionsTypes() {
17
+ return pick([
18
+ 'cache-dir',
19
+ 'dangerously-allow-all-builds',
20
+ 'depth',
21
+ 'dev',
22
+ 'engine-strict',
23
+ 'fetch-retries',
24
+ 'fetch-retry-factor',
25
+ 'fetch-retry-maxtimeout',
26
+ 'fetch-retry-mintimeout',
27
+ 'fetch-timeout',
28
+ 'force',
29
+ 'global-dir',
30
+ 'global-pnpmfile',
31
+ 'global',
32
+ 'https-proxy',
33
+ 'ignore-pnpmfile',
34
+ 'ignore-scripts',
35
+ 'lockfile-dir',
36
+ 'lockfile-directory',
37
+ 'lockfile-only',
38
+ 'lockfile',
39
+ 'lockfile-include-tarball-url',
40
+ 'network-concurrency',
41
+ 'noproxy',
42
+ 'npm-path',
43
+ 'offline',
44
+ 'only',
45
+ 'optional',
46
+ 'package-import-method',
47
+ 'pnpmfile',
48
+ 'prefer-offline',
49
+ 'production',
50
+ 'proxy',
51
+ 'registry',
52
+ 'reporter',
53
+ 'save',
54
+ 'save-exact',
55
+ 'save-prefix',
56
+ 'save-workspace-protocol',
57
+ 'scripts-prepend-node-path',
58
+ 'shamefully-flatten',
59
+ 'shamefully-hoist',
60
+ 'shared-workspace-lockfile',
61
+ 'side-effects-cache-readonly',
62
+ 'side-effects-cache',
63
+ 'store-dir',
64
+ 'unsafe-perm',
65
+ ], allTypes);
66
+ }
67
+ export function cliOptionsTypes() {
68
+ return {
69
+ ...rcOptionsTypes(),
70
+ interactive: Boolean,
71
+ latest: Boolean,
72
+ recursive: Boolean,
73
+ workspace: Boolean,
74
+ };
75
+ }
76
+ export const shorthands = {
77
+ D: '--dev',
78
+ P: '--production',
79
+ };
80
+ export const commandNames = ['update', 'up', 'upgrade'];
81
+ export const completion = async (cliOpts) => {
82
+ return readDepNameCompletions(cliOpts.dir);
83
+ };
84
+ export function help() {
85
+ return renderHelp({
86
+ aliases: ['up', 'upgrade'],
87
+ description: 'Updates packages to their latest version based on the specified range. You can use "*" in package name to update all packages with the same pattern.',
88
+ descriptionLists: [
89
+ {
90
+ title: 'Options',
91
+ list: [
92
+ {
93
+ description: 'Update in every package found in subdirectories \
94
+ or every workspace package, when executed inside a workspace. \
95
+ For options that may be used with `-r`, see "pnpm help recursive"',
96
+ name: '--recursive',
97
+ shortAlias: '-r',
98
+ },
99
+ {
100
+ description: 'Update globally installed packages',
101
+ name: '--global',
102
+ shortAlias: '-g',
103
+ },
104
+ {
105
+ description: 'How deep should levels of dependencies be inspected. Infinity is default. 0 would mean top-level dependencies only',
106
+ name: '--depth <number>',
107
+ },
108
+ {
109
+ description: 'Ignore version ranges in package.json',
110
+ name: '--latest',
111
+ shortAlias: '-L',
112
+ },
113
+ {
114
+ description: 'Update packages only in "dependencies" and "optionalDependencies"',
115
+ name: '--prod',
116
+ shortAlias: '-P',
117
+ },
118
+ {
119
+ description: 'Update packages only in "devDependencies"',
120
+ name: '--dev',
121
+ shortAlias: '-D',
122
+ },
123
+ {
124
+ description: 'Don\'t update packages in "optionalDependencies"',
125
+ name: '--no-optional',
126
+ },
127
+ {
128
+ description: 'Tries to link all packages from the workspace. \
129
+ Versions are updated to match the versions of packages inside the workspace. \
130
+ If specific packages are updated, the command will fail if any of the updated \
131
+ dependencies is not found inside the workspace',
132
+ name: '--workspace',
133
+ },
134
+ {
135
+ description: 'Show outdated dependencies and select which ones to update',
136
+ name: '--interactive',
137
+ shortAlias: '-i',
138
+ },
139
+ OPTIONS.globalDir,
140
+ ...UNIVERSAL_OPTIONS,
141
+ ],
142
+ },
143
+ FILTERING,
144
+ ],
145
+ url: docsUrl('update'),
146
+ usages: ['pnpm update [-g] [<pkg>...]'],
147
+ });
148
+ }
149
+ export async function handler(opts, params = []) {
150
+ if (opts.global) {
151
+ if (!opts.bin) {
152
+ throw new PnpmError('NO_GLOBAL_BIN_DIR', 'Unable to find the global bin directory', {
153
+ hint: 'Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.',
154
+ });
155
+ }
156
+ return handleGlobalUpdate(opts, params);
157
+ }
158
+ if (opts.interactive) {
159
+ return interactiveUpdate(params, opts);
160
+ }
161
+ return update(params, opts);
162
+ }
163
+ async function interactiveUpdate(input, opts) {
164
+ const include = makeIncludeDependenciesFromCLI(opts.cliOptions);
165
+ const projects = (opts.selectedProjectsGraph != null)
166
+ ? Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package)
167
+ : [
168
+ {
169
+ rootDir: opts.dir,
170
+ manifest: await readProjectManifestOnly(opts.dir, opts),
171
+ },
172
+ ];
173
+ const outdatedPkgsOfProjects = await outdatedDepsOfProjects(projects, input, {
174
+ ...opts,
175
+ compatible: opts.latest !== true,
176
+ ignoreDependencies: opts.updateConfig?.ignoreDependencies,
177
+ include,
178
+ retry: {
179
+ factor: opts.fetchRetryFactor,
180
+ maxTimeout: opts.fetchRetryMaxtimeout,
181
+ minTimeout: opts.fetchRetryMintimeout,
182
+ retries: opts.fetchRetries,
183
+ },
184
+ timeout: opts.fetchTimeout,
185
+ });
186
+ const workspacesEnabled = !!opts.workspaceDir;
187
+ const choices = getUpdateChoices(unnest(outdatedPkgsOfProjects), workspacesEnabled);
188
+ if (choices.length === 0) {
189
+ if (opts.latest) {
190
+ return 'All of your dependencies are already up to date';
191
+ }
192
+ return 'All of your dependencies are already up to date inside the specified ranges. Use the --latest option to update the ranges in package.json';
193
+ }
194
+ const { updateDependencies } = await enquirer.prompt({
195
+ choices,
196
+ footer: '\nEnter to start updating. Ctrl-c to cancel.',
197
+ indicator(state, choice) {
198
+ return ` ${choice.enabled ? '●' : '○'}`;
199
+ },
200
+ message: 'Choose which packages to update ' +
201
+ `(Press ${chalk.cyan('<space>')} to select, ` +
202
+ `${chalk.cyan('<a>')} to toggle all, ` +
203
+ `${chalk.cyan('<i>')} to invert selection)`,
204
+ name: 'updateDependencies',
205
+ pointer: '❯',
206
+ result() {
207
+ return this.selected;
208
+ },
209
+ format() {
210
+ if (!this.state.submitted || this.state.cancelled)
211
+ return '';
212
+ if (Array.isArray(this.selected)) {
213
+ return this.selected
214
+ // The custom format function is used to filter out "[dependencies]" or "[devDependencies]" from the output.
215
+ // https://github.com/enquirer/enquirer/blob/master/lib/prompts/select.js#L98
216
+ .filter((choice) => !/^\[.+\]$/.test(choice.name))
217
+ .map((choice) => this.styles.primary(choice.name)).join(', ');
218
+ }
219
+ return this.styles.primary(this.selected.name);
220
+ },
221
+ styles: {
222
+ dark: chalk.reset,
223
+ em: chalk.bgBlack.whiteBright,
224
+ success: chalk.reset,
225
+ },
226
+ type: 'multiselect',
227
+ validate(value) {
228
+ if (value.length === 0) {
229
+ return 'You must choose at least one package.';
230
+ }
231
+ return true;
232
+ },
233
+ // For Vim users (related: https://github.com/enquirer/enquirer/pull/163)
234
+ j() {
235
+ return this.down();
236
+ },
237
+ k() {
238
+ return this.up();
239
+ },
240
+ cancel() {
241
+ // By default, canceling the prompt via Ctrl+c throws an empty string.
242
+ // The custom cancel function prevents that behavior.
243
+ // Otherwise, pnpm CLI would print an error and confuse users.
244
+ // See related issue: https://github.com/enquirer/enquirer/issues/225
245
+ globalInfo('Update canceled');
246
+ process.exit(0);
247
+ },
248
+ }); // eslint-disable-line @typescript-eslint/no-explicit-any
249
+ const updatePkgNames = pluck('value', updateDependencies);
250
+ return update(updatePkgNames, opts);
251
+ }
252
+ async function update(dependencies, opts) {
253
+ if (opts.latest) {
254
+ const dependenciesWithTags = dependencies.filter((name) => parseUpdateParam(name).versionSpec != null);
255
+ if (dependenciesWithTags.length) {
256
+ throw new PnpmError('LATEST_WITH_SPEC', `Specs are not allowed to be used with --latest (${dependenciesWithTags.join(', ')})`);
257
+ }
258
+ }
259
+ const includeDirect = makeIncludeDependenciesFromCLI(opts.cliOptions);
260
+ const include = {
261
+ dependencies: opts.rawConfig.production !== false,
262
+ devDependencies: opts.rawConfig.dev !== false,
263
+ optionalDependencies: opts.rawConfig.optional !== false,
264
+ };
265
+ const depth = opts.depth ?? Infinity;
266
+ let updateMatching;
267
+ if (opts.packageVulnerabilityAudit != null) {
268
+ const { packageVulnerabilityAudit } = opts;
269
+ updateMatching = (pkgName, version) => version != null && packageVulnerabilityAudit.isVulnerable(pkgName, version);
270
+ }
271
+ else if ((dependencies.length > 0) && dependencies.every(dep => !dep.substring(1).includes('@')) && depth > 0 && !opts.latest) {
272
+ updateMatching = createMatcher(dependencies);
273
+ }
274
+ return installDeps({
275
+ ...opts,
276
+ allowNew: false,
277
+ depth,
278
+ ignoreCurrentSpecifiers: false,
279
+ includeDirect,
280
+ include,
281
+ update: true,
282
+ updateToLatest: opts.latest,
283
+ updateMatching,
284
+ updatePackageManifest: opts.save !== false,
285
+ resolutionMode: opts.save === false ? 'highest' : opts.resolutionMode,
286
+ }, dependencies);
287
+ }
288
+ function makeIncludeDependenciesFromCLI(opts) {
289
+ return {
290
+ dependencies: opts.production === true || (opts.dev !== true && opts.optional !== true),
291
+ devDependencies: opts.dev === true || (opts.production !== true && opts.optional !== true),
292
+ optionalDependencies: opts.optional === true || (opts.production !== true && opts.dev !== true),
293
+ };
294
+ }
295
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ import type { WorkspacePackages } from '@pnpm/resolving.resolver-base';
2
+ import type { IncludedDependencies, ProjectManifest } from '@pnpm/types';
3
+ export declare function updateToWorkspacePackagesFromManifest(manifest: ProjectManifest, include: IncludedDependencies, workspacePackages: WorkspacePackages): string[];
4
+ export declare function createWorkspaceSpecs(specs: string[], workspacePackages: WorkspacePackages): string[];
@@ -0,0 +1,27 @@
1
+ import { PnpmError } from '@pnpm/error';
2
+ import { parseWantedDependency } from '@pnpm/resolving.parse-wanted-dependency';
3
+ export function updateToWorkspacePackagesFromManifest(manifest, include, workspacePackages) {
4
+ const allDeps = {
5
+ ...(include.devDependencies ? manifest.devDependencies : {}),
6
+ ...(include.dependencies ? manifest.dependencies : {}),
7
+ ...(include.optionalDependencies ? manifest.optionalDependencies : {}),
8
+ };
9
+ return Object.keys(allDeps)
10
+ .filter(depName => workspacePackages.has(depName))
11
+ .map(depName => `${depName}@workspace:*`);
12
+ }
13
+ export function createWorkspaceSpecs(specs, workspacePackages) {
14
+ return specs.map((spec) => {
15
+ const parsed = parseWantedDependency(spec);
16
+ if (!parsed.alias)
17
+ throw new PnpmError('NO_PKG_NAME_IN_SPEC', `Cannot update/install from workspace through "${spec}"`);
18
+ if (!workspacePackages.has(parsed.alias))
19
+ throw new PnpmError('WORKSPACE_PACKAGE_NOT_FOUND', `"${parsed.alias}" not found in the workspace`);
20
+ if (!parsed.bareSpecifier)
21
+ return `${parsed.alias}@workspace:*`;
22
+ if (parsed.bareSpecifier.startsWith('workspace:'))
23
+ return spec;
24
+ return `${parsed.alias}@workspace:${parsed.bareSpecifier}`;
25
+ });
26
+ }
27
+ //# sourceMappingURL=updateWorkspaceDependencies.js.map
package/package.json ADDED
@@ -0,0 +1,134 @@
1
+ {
2
+ "name": "@pnpm/installing.commands",
3
+ "version": "1004.6.10",
4
+ "description": "Commands for installation",
5
+ "keywords": [
6
+ "pnpm",
7
+ "pnpm11"
8
+ ],
9
+ "license": "MIT",
10
+ "funding": "https://opencollective.com/pnpm",
11
+ "repository": "https://github.com/pnpm/pnpm/tree/main/installing/commands",
12
+ "homepage": "https://github.com/pnpm/pnpm/tree/main/installing/commands#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/pnpm/pnpm/issues"
15
+ },
16
+ "type": "module",
17
+ "main": "lib/index.js",
18
+ "types": "lib/index.d.ts",
19
+ "exports": {
20
+ ".": "./lib/index.js"
21
+ },
22
+ "files": [
23
+ "lib",
24
+ "!*.map"
25
+ ],
26
+ "dependencies": {
27
+ "@pnpm/colorize-semver-diff": "^1.0.1",
28
+ "@pnpm/semver-diff": "^1.1.0",
29
+ "@yarnpkg/core": "4.2.0",
30
+ "@yarnpkg/lockfile": "^1.1.0",
31
+ "@yarnpkg/parsers": "3.0.3",
32
+ "@zkochan/rimraf": "^4.0.0",
33
+ "@zkochan/table": "^2.0.1",
34
+ "chalk": "^5.6.0",
35
+ "enquirer": "^2.4.1",
36
+ "get-npm-tarball-url": "^2.1.0",
37
+ "is-subdir": "^2.0.0",
38
+ "load-json-file": "^7.0.1",
39
+ "normalize-path": "^3.0.0",
40
+ "p-filter": "^4.1.0",
41
+ "p-limit": "^7.1.0",
42
+ "ramda": "npm:@pnpm/ramda@0.28.1",
43
+ "render-help": "^2.0.0",
44
+ "version-selector-type": "^3.0.0",
45
+ "which": "npm:@pnpm/which@^3.0.1",
46
+ "@pnpm/cli.command": "1000.0.0",
47
+ "@pnpm/building.after-install": "1000.0.0-0",
48
+ "@pnpm/catalogs.types": "1000.0.0",
49
+ "@pnpm/building.commands": "1000.0.0-0",
50
+ "@pnpm/cli.utils": "1001.2.8",
51
+ "@pnpm/cli.common-cli-options-help": "1000.0.1",
52
+ "@pnpm/config.matcher": "1000.1.0",
53
+ "@pnpm/config.reader": "1004.4.2",
54
+ "@pnpm/config.pick-registry-for-package": "1000.0.11",
55
+ "@pnpm/config.writer": "1000.0.14",
56
+ "@pnpm/deps.inspection.outdated": "1001.1.1",
57
+ "@pnpm/deps.status": "1003.0.15",
58
+ "@pnpm/constants": "1001.3.1",
59
+ "@pnpm/error": "1000.0.5",
60
+ "@pnpm/fs.graceful-fs": "1000.0.1",
61
+ "@pnpm/fs.read-modules-dir": "1000.0.0",
62
+ "@pnpm/global.commands": "1000.0.0-0",
63
+ "@pnpm/hooks.pnpmfile": "1002.1.3",
64
+ "@pnpm/installing.context": "1001.1.8",
65
+ "@pnpm/installing.env-installer": "1000.0.19",
66
+ "@pnpm/installing.dedupe.check": "1001.0.13",
67
+ "@pnpm/installing.deps-installer": "1012.0.1",
68
+ "@pnpm/lockfile.types": "1002.0.2",
69
+ "@pnpm/pkg-manifest.reader": "1000.1.2",
70
+ "@pnpm/resolving.parse-wanted-dependency": "1001.0.0",
71
+ "@pnpm/resolving.resolver-base": "1005.1.0",
72
+ "@pnpm/pkg-manifest.utils": "1001.0.6",
73
+ "@pnpm/store.connection-manager": "1002.2.4",
74
+ "@pnpm/types": "1000.9.0",
75
+ "@pnpm/workspace.project-manifest-reader": "1001.1.4",
76
+ "@pnpm/workspace.projects-filter": "1000.0.43",
77
+ "@pnpm/store.controller": "1004.0.0",
78
+ "@pnpm/workspace.project-manifest-writer": "1000.0.11",
79
+ "@pnpm/workspace.projects-graph": "1000.0.25",
80
+ "@pnpm/workspace.projects-reader": "1000.0.43",
81
+ "@pnpm/workspace.projects-sorter": "1000.0.11",
82
+ "@pnpm/workspace.state": "1002.0.7",
83
+ "@pnpm/workspace.root-finder": "1000.1.3",
84
+ "@pnpm/workspace.workspace-manifest-writer": "1001.0.3"
85
+ },
86
+ "peerDependencies": {
87
+ "@pnpm/logger": ">=1001.0.0 <1002.0.0"
88
+ },
89
+ "devDependencies": {
90
+ "@jest/globals": "30.0.5",
91
+ "@pnpm/registry-mock": "5.2.4",
92
+ "@types/normalize-path": "^3.0.2",
93
+ "@types/proxyquire": "^1.3.31",
94
+ "@types/ramda": "0.29.12",
95
+ "@types/which": "^2.0.2",
96
+ "@types/yarnpkg__lockfile": "^1.1.9",
97
+ "@types/zkochan__table": "npm:@types/table@6.0.0",
98
+ "ci-info": "^4.3.0",
99
+ "delay": "^6.0.0",
100
+ "jest-diff": "^30.1.1",
101
+ "nock": "13.3.4",
102
+ "path-name": "^1.0.0",
103
+ "proxyquire": "^2.1.3",
104
+ "read-yaml-file": "^3.0.0",
105
+ "symlink-dir": "^7.0.0",
106
+ "tempy": "3.0.0",
107
+ "write-json-file": "^7.0.0",
108
+ "write-package": "7.2.0",
109
+ "write-yaml-file": "^6.0.0",
110
+ "@pnpm/assert-project": "1000.0.4",
111
+ "@pnpm/installing.commands": "1004.6.10",
112
+ "@pnpm/installing.modules-yaml": "1000.3.6",
113
+ "@pnpm/logger": "1001.0.1",
114
+ "@pnpm/prepare": "1000.0.4",
115
+ "@pnpm/test-fixtures": "1000.0.0",
116
+ "@pnpm/worker": "1000.3.0",
117
+ "@pnpm/store.index": "1000.0.0-0",
118
+ "@pnpm/workspace.projects-filter": "1000.0.43",
119
+ "@pnpm/test-ipc-server": "1000.0.0"
120
+ },
121
+ "engines": {
122
+ "node": ">=22.13"
123
+ },
124
+ "jest": {
125
+ "preset": "@pnpm/jest-config/with-registry"
126
+ },
127
+ "scripts": {
128
+ "start": "tsgo --watch",
129
+ "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
130
+ "_test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest",
131
+ "test": "pnpm run compile && pnpm run _test",
132
+ "compile": "tsgo --build && pnpm run lint --fix"
133
+ }
134
+ }