@pnpm/installing.commands 1004.6.10 → 1100.0.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.
package/lib/add.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { CommandHandlerMap } from '@pnpm/cli.command';
1
2
  import type { InstallCommandOptions } from './install.js';
2
3
  export declare const shorthands: Record<string, string>;
3
4
  export declare function rcOptionsTypes(): Record<string, unknown>;
@@ -14,4 +15,4 @@ export type AddCommandOptions = InstallCommandOptions & {
14
15
  workspaceRoot?: boolean;
15
16
  config?: boolean;
16
17
  };
17
- export declare function handler(opts: AddCommandOptions, params: string[]): Promise<void>;
18
+ export declare function handler(opts: AddCommandOptions, params: string[], commands?: CommandHandlerMap): Promise<void>;
package/lib/add.js CHANGED
@@ -43,7 +43,6 @@ export function rcOptionsTypes() {
43
43
  'libc',
44
44
  'link-workspace-packages',
45
45
  'lockfile-dir',
46
- 'lockfile-directory',
47
46
  'lockfile-only',
48
47
  'lockfile',
49
48
  'modules-dir',
@@ -68,7 +67,6 @@ export function rcOptionsTypes() {
68
67
  'save-prefix',
69
68
  'save-prod',
70
69
  'save-workspace-protocol',
71
- 'shamefully-flatten',
72
70
  'shamefully-hoist',
73
71
  'shared-workspace-lockfile',
74
72
  'side-effects-cache-readonly',
@@ -189,7 +187,7 @@ For options that may be used with `-r`, see "pnpm help recursive"',
189
187
  ],
190
188
  });
191
189
  }
192
- export async function handler(opts, params) {
190
+ export async function handler(opts, params, commands) {
193
191
  if (opts.cliOptions['save'] === false) {
194
192
  throw new PnpmError('OPTION_NOT_SUPPORTED', 'The "add" command currently does not support the no-save option');
195
193
  }
@@ -226,7 +224,7 @@ export async function handler(opts, params) {
226
224
  if (params.includes('pnpm') || params.includes('@pnpm/exe')) {
227
225
  throw new PnpmError('GLOBAL_PNPM_INSTALL', 'Use the "pnpm self-update" command to install or update pnpm');
228
226
  }
229
- return handleGlobalAdd(opts, params);
227
+ return handleGlobalAdd(opts, params, commands ?? {});
230
228
  }
231
229
  const include = {
232
230
  dependencies: opts.production !== false,
@@ -270,6 +268,7 @@ export async function handler(opts, params) {
270
268
  return installDeps({
271
269
  ...opts,
272
270
  allowBuilds: mergedAllowBuilds,
271
+ rebuildHandler: commands?.rebuild,
273
272
  fetchFullMetadata: getFetchFullMetadata(opts),
274
273
  include,
275
274
  includeDirect: include,
@@ -277,6 +276,7 @@ export async function handler(opts, params) {
277
276
  }
278
277
  return installDeps({
279
278
  ...opts,
279
+ rebuildHandler: commands?.rebuild,
280
280
  fetchFullMetadata: getFetchFullMetadata(opts),
281
281
  include,
282
282
  includeDirect: include,
package/lib/dedupe.d.ts CHANGED
@@ -1,9 +1,11 @@
1
+ import type { CommandHandlerMap } from '@pnpm/cli.command';
1
2
  import { type InstallCommandOptions } from './install.js';
2
3
  export declare function rcOptionsTypes(): Record<string, unknown>;
3
4
  export declare function cliOptionsTypes(): Record<string, unknown>;
4
5
  export declare const commandNames: string[];
6
+ export declare const recursiveByDefault = true;
5
7
  export declare function help(): string;
6
8
  export interface DedupeCommandOptions extends InstallCommandOptions {
7
9
  readonly check?: boolean;
8
10
  }
9
- export declare function handler(opts: DedupeCommandOptions): Promise<void>;
11
+ export declare function handler(opts: DedupeCommandOptions, _params?: string[], commands?: CommandHandlerMap): Promise<void>;
package/lib/dedupe.js CHANGED
@@ -17,6 +17,7 @@ export function cliOptionsTypes() {
17
17
  };
18
18
  }
19
19
  export const commandNames = ['dedupe'];
20
+ export const recursiveByDefault = true;
20
21
  export function help() {
21
22
  return renderHelp({
22
23
  description: 'Perform an install removing older dependencies in the lockfile if a newer version can be used.',
@@ -42,7 +43,7 @@ export function help() {
42
43
  usages: ['pnpm dedupe'],
43
44
  });
44
45
  }
45
- export async function handler(opts) {
46
+ export async function handler(opts, _params, commands) {
46
47
  const include = {
47
48
  dependencies: opts.production !== false,
48
49
  devDependencies: opts.dev !== false,
@@ -50,6 +51,7 @@ export async function handler(opts) {
50
51
  };
51
52
  return installDeps({
52
53
  ...opts,
54
+ rebuildHandler: commands?.rebuild,
53
55
  dedupe: true,
54
56
  include,
55
57
  includeDirect: include,
package/lib/fetch.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Config } from '@pnpm/config.reader';
1
+ import type { Config, ConfigContext } from '@pnpm/config.reader';
2
2
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
3
3
  import { cliOptionsTypes } from './install.js';
4
4
  export declare const rcOptionsTypes: () => Record<string, unknown>;
@@ -6,5 +6,5 @@ export { cliOptionsTypes };
6
6
  export declare const shorthands: Record<string, string>;
7
7
  export declare const commandNames: string[];
8
8
  export declare function help(): string;
9
- type FetchCommandOptions = Pick<Config, 'production' | 'dev' | 'enableGlobalVirtualStore' | 'rootProjectManifest' | 'rootProjectManifestDir'> & CreateStoreControllerOptions;
9
+ type FetchCommandOptions = Pick<Config, 'production' | 'dev' | 'enableGlobalVirtualStore' | 'patchedDependencies'> & Pick<ConfigContext, 'rootProjectManifest' | 'rootProjectManifestDir'> & CreateStoreControllerOptions;
10
10
  export declare function handler(opts: FetchCommandOptions): Promise<void>;
@@ -0,0 +1,8 @@
1
+ import type { IgnoredBuilds } from '@pnpm/types';
2
+ export interface HandleIgnoredBuildsOpts {
3
+ allowBuilds?: Record<string, boolean | string>;
4
+ rootProjectManifestDir?: string;
5
+ workspaceDir?: string;
6
+ strictDepBuilds?: boolean;
7
+ }
8
+ export declare function handleIgnoredBuilds(opts: HandleIgnoredBuildsOpts, ignoredBuilds: IgnoredBuilds | undefined): Promise<void>;
@@ -0,0 +1,34 @@
1
+ import { writeSettings } from '@pnpm/config.writer';
2
+ import { parse } from '@pnpm/deps.path';
3
+ import { IgnoredBuildsError, } from '@pnpm/installing.deps-installer';
4
+ import { lexCompare } from '@pnpm/util.lex-comparator';
5
+ export async function handleIgnoredBuilds(opts, ignoredBuilds) {
6
+ if (!ignoredBuilds?.size)
7
+ return;
8
+ await writeIgnoredBuildsToAllowBuilds(opts, ignoredBuilds);
9
+ if (opts.strictDepBuilds) {
10
+ throw new IgnoredBuildsError(ignoredBuilds);
11
+ }
12
+ }
13
+ async function writeIgnoredBuildsToAllowBuilds(opts, ignoredBuilds) {
14
+ const packageNames = packageNamesFromIgnoredBuilds(ignoredBuilds);
15
+ const newEntries = {};
16
+ for (const name of packageNames) {
17
+ if (opts.allowBuilds?.[name] == null) {
18
+ newEntries[name] = 'set this to true or false';
19
+ }
20
+ }
21
+ if (Object.keys(newEntries).length && opts.rootProjectManifestDir) {
22
+ await writeSettings({
23
+ rootProjectManifestDir: opts.rootProjectManifestDir,
24
+ workspaceDir: opts.workspaceDir ?? opts.rootProjectManifestDir,
25
+ updatedSettings: {
26
+ allowBuilds: { ...opts.allowBuilds, ...newEntries },
27
+ },
28
+ });
29
+ }
30
+ }
31
+ function packageNamesFromIgnoredBuilds(ignoredBuilds) {
32
+ return Array.from(new Set(Array.from(ignoredBuilds).map((dp) => parse(dp).name ?? dp))).sort(lexCompare);
33
+ }
34
+ //# sourceMappingURL=handleIgnoredBuilds.js.map
@@ -1,9 +1,10 @@
1
- import type { Config } from '@pnpm/config.reader';
1
+ import type { Config, ConfigContext } from '@pnpm/config.reader';
2
2
  import { type InstallOptions } from '@pnpm/installing.deps-installer';
3
3
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
4
4
  export declare const rcOptionsTypes: typeof cliOptionsTypes;
5
5
  export declare function cliOptionsTypes(): Record<string, unknown>;
6
6
  export declare function help(): string;
7
7
  export declare const commandNames: string[];
8
- export type ImportCommandOptions = Pick<Config, 'allProjects' | 'allProjectsGraph' | 'selectedProjectsGraph' | 'workspaceDir' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'sharedWorkspaceLockfile' | 'workspacePackagePatterns' | 'rootProjectManifest' | 'rootProjectManifestDir'> & CreateStoreControllerOptions & Omit<InstallOptions, 'storeController' | 'lockfileOnly' | 'preferredVersions'>;
8
+ export declare const recursiveByDefault = true;
9
+ export type ImportCommandOptions = Pick<Config, 'workspaceDir' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'sharedWorkspaceLockfile' | 'workspacePackagePatterns'> & Pick<ConfigContext, 'allProjects' | 'allProjectsGraph' | 'selectedProjectsGraph' | 'rootProjectManifest' | 'rootProjectManifestDir'> & CreateStoreControllerOptions & Omit<InstallOptions, 'storeController' | 'lockfileOnly' | 'preferredVersions'>;
9
10
  export declare function handler(opts: ImportCommandOptions, params: string[]): Promise<void>;
@@ -37,6 +37,7 @@ export function help() {
37
37
  });
38
38
  }
39
39
  export const commandNames = ['import'];
40
+ export const recursiveByDefault = true;
40
41
  export async function handler(opts, params) {
41
42
  // Removing existing pnpm lockfile
42
43
  // it should not influence the new one
package/lib/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as add from './add.js';
2
- import * as ci from './ci.js';
3
2
  import * as dedupe from './dedupe.js';
4
3
  import * as fetch from './fetch.js';
5
4
  import * as importCommand from './import/index.js';
@@ -10,4 +9,4 @@ import * as prune from './prune.js';
10
9
  import * as remove from './remove.js';
11
10
  import * as unlink from './unlink.js';
12
11
  import * as update from './update/index.js';
13
- export { add, ci, dedupe, fetch, importCommand, install, type InstallCommandOptions, link, prune, remove, unlink, update };
12
+ export { add, dedupe, fetch, importCommand, install, type InstallCommandOptions, link, prune, remove, unlink, update };
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as add from './add.js';
2
- import * as ci from './ci.js';
3
2
  import * as dedupe from './dedupe.js';
4
3
  import * as fetch from './fetch.js';
5
4
  import * as importCommand from './import/index.js';
@@ -9,5 +8,5 @@ import * as prune from './prune.js';
9
8
  import * as remove from './remove.js';
10
9
  import * as unlink from './unlink.js';
11
10
  import * as update from './update/index.js';
12
- export { add, ci, dedupe, fetch, importCommand, install, link, prune, remove, unlink, update };
11
+ export { add, dedupe, fetch, importCommand, install, link, prune, remove, unlink, update };
13
12
  //# sourceMappingURL=index.js.map
package/lib/install.d.ts CHANGED
@@ -1,11 +1,13 @@
1
- import { type Config } from '@pnpm/config.reader';
1
+ import type { CommandHandlerMap } from '@pnpm/cli.command';
2
+ import { type Config, type ConfigContext } from '@pnpm/config.reader';
2
3
  import type { CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
3
4
  export declare function rcOptionsTypes(): Record<string, unknown>;
4
5
  export declare const cliOptionsTypes: () => Record<string, unknown>;
5
6
  export declare const shorthands: Record<string, string>;
6
7
  export declare const commandNames: string[];
8
+ export declare const recursiveByDefault = true;
7
9
  export declare function help(): string;
8
- export type InstallCommandOptions = Pick<Config, 'allProjects' | 'autoInstallPeers' | 'bail' | 'bin' | 'catalogs' | 'cliOptions' | 'configDependencies' | 'dedupeInjectedDeps' | 'dedupeDirectDeps' | 'dedupePeerDependents' | 'deployAllFiles' | 'depth' | 'dev' | 'enableGlobalVirtualStore' | 'engineStrict' | 'excludeLinksFromLockfile' | 'frozenLockfile' | 'global' | 'globalPnpmfile' | 'hooks' | 'ignorePnpmfile' | 'ignoreScripts' | 'injectWorkspacePackages' | 'linkWorkspacePackages' | 'rawLocalConfig' | 'lockfileDir' | 'lockfileOnly' | 'modulesDir' | 'nodeLinker' | 'patchedDependencies' | 'preferFrozenLockfile' | 'preferWorkspacePackages' | 'production' | 'registries' | 'rootProjectManifest' | 'rootProjectManifestDir' | 'save' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveCatalogName' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'allProjectsGraph' | 'selectedProjectsGraph' | 'sideEffectsCache' | 'sideEffectsCacheReadonly' | 'sort' | 'sharedWorkspaceLockfile' | 'tag' | 'allowBuilds' | 'optional' | 'virtualStoreDir' | 'workspaceConcurrency' | 'workspaceDir' | 'workspacePackagePatterns' | 'extraEnv' | 'resolutionMode' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'updateConfig' | 'overrides' | 'packageExtensions' | 'supportedArchitectures' | 'packageConfigs'> & CreateStoreControllerOptions & Partial<Pick<Config, 'globalPkgDir'>> & {
10
+ export type InstallCommandOptions = Pick<Config, 'autoInstallPeers' | 'bail' | 'bin' | 'catalogs' | 'configDependencies' | 'dedupeInjectedDeps' | 'dedupeDirectDeps' | 'dedupePeerDependents' | 'dedupePeers' | 'deployAllFiles' | 'depth' | 'dev' | 'enableGlobalVirtualStore' | 'engineStrict' | 'excludeLinksFromLockfile' | 'frozenLockfile' | 'global' | 'globalPnpmfile' | 'ignorePnpmfile' | 'ignoreScripts' | 'injectWorkspacePackages' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'modulesDir' | 'nodeLinker' | 'patchedDependencies' | 'preferFrozenLockfile' | 'preferWorkspacePackages' | 'production' | 'registries' | 'save' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveCatalogName' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'sideEffectsCache' | 'sideEffectsCacheReadonly' | 'sort' | 'sharedWorkspaceLockfile' | 'tag' | 'allowBuilds' | 'optional' | 'virtualStoreDir' | 'workspaceConcurrency' | 'workspaceDir' | 'workspacePackagePatterns' | 'extraEnv' | 'resolutionMode' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'updateConfig' | 'overrides' | 'packageExtensions' | 'supportedArchitectures' | 'packageConfigs'> & Pick<ConfigContext, 'allProjects' | 'cliOptions' | 'hooks' | 'rootProjectManifest' | 'rootProjectManifestDir' | 'allProjectsGraph' | 'selectedProjectsGraph'> & CreateStoreControllerOptions & Partial<Pick<Config, 'globalPkgDir'>> & {
9
11
  argv: {
10
12
  original: string[];
11
13
  };
@@ -25,4 +27,4 @@ export type InstallCommandOptions = Pick<Config, 'allProjects' | 'autoInstallPee
25
27
  } & Partial<Pick<Config, 'ci' | 'modulesCacheMaxAge' | 'pnpmHomeDir' | 'preferWorkspacePackages' | 'useLockfile' | 'symlink'>>;
26
28
  export declare function handler(opts: InstallCommandOptions & {
27
29
  _calledFromLink?: boolean;
28
- }): Promise<void>;
30
+ }, _params?: string[], commands?: CommandHandlerMap): Promise<void>;
package/lib/install.js CHANGED
@@ -34,7 +34,6 @@ export function rcOptionsTypes() {
34
34
  'libc',
35
35
  'link-workspace-packages',
36
36
  'lockfile-dir',
37
- 'lockfile-directory',
38
37
  'lockfile-only',
39
38
  'lockfile',
40
39
  'merge-git-branch-lockfiles',
@@ -54,7 +53,6 @@ export function rcOptionsTypes() {
54
53
  'reporter',
55
54
  'save-workspace-protocol',
56
55
  'scripts-prepend-node-path',
57
- 'shamefully-flatten',
58
56
  'shamefully-hoist',
59
57
  'shared-workspace-lockfile',
60
58
  'side-effects-cache-readonly',
@@ -85,6 +83,7 @@ export const shorthands = {
85
83
  P: '--production',
86
84
  };
87
85
  export const commandNames = ['install', 'i'];
86
+ export const recursiveByDefault = true;
88
87
  export function help() {
89
88
  return renderHelp({
90
89
  aliases: ['i'],
@@ -254,7 +253,7 @@ Install all optionalDependencies even when they don\'t satisfy the current envir
254
253
  usages: ['pnpm install [options]'],
255
254
  });
256
255
  }
257
- export async function handler(opts) {
256
+ export async function handler(opts, _params, commands) {
258
257
  if (opts.global && !opts._calledFromLink) {
259
258
  throw new PnpmError('GLOBAL_INSTALL_NOT_SUPPORTED', '"pnpm install -g" is not supported. Use "pnpm add -g <pkg>" to install global packages.');
260
259
  }
@@ -265,6 +264,7 @@ export async function handler(opts) {
265
264
  };
266
265
  const installDepsOptions = {
267
266
  ...opts,
267
+ rebuildHandler: commands?.rebuild,
268
268
  frozenLockfileIfExists: opts.frozenLockfileIfExists ?? (opts.ci && !opts.lockfileOnly &&
269
269
  typeof opts.frozenLockfile === 'undefined' &&
270
270
  typeof opts.preferFrozenLockfile === 'undefined'),
@@ -1,9 +1,10 @@
1
- import type { Config } from '@pnpm/config.reader';
1
+ import type { CommandHandler } from '@pnpm/cli.command';
2
+ import type { Config, ConfigContext } from '@pnpm/config.reader';
2
3
  import { type UpdateMatchingFunction } from '@pnpm/installing.deps-installer';
3
4
  import type { LockfileObject } from '@pnpm/lockfile.types';
4
5
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
5
6
  import type { IncludedDependencies, PackageVulnerabilityAudit } from '@pnpm/types';
6
- export type InstallDepsOptions = Pick<Config, 'allProjects' | 'allProjectsGraph' | 'autoInstallPeers' | 'bail' | 'bin' | 'catalogs' | 'catalogMode' | 'cleanupUnusedCatalogs' | 'cliOptions' | 'dedupePeerDependents' | 'depth' | 'dev' | 'enableGlobalVirtualStore' | 'virtualStoreOnly' | 'engineStrict' | 'excludeLinksFromLockfile' | 'global' | 'globalPnpmfile' | 'hooks' | 'ignoreCurrentSpecifiers' | 'ignorePnpmfile' | 'ignoreScripts' | 'optimisticRepeatInstall' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'production' | 'preferWorkspacePackages' | 'rawLocalConfig' | 'registries' | 'rootProjectManifestDir' | 'rootProjectManifest' | 'save' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'scriptsPrependNodePath' | 'scriptShell' | 'selectedProjectsGraph' | 'sideEffectsCache' | 'sideEffectsCacheReadonly' | 'sort' | 'sharedWorkspaceLockfile' | 'shellEmulator' | 'tag' | 'allowBuilds' | 'optional' | 'workspaceConcurrency' | 'workspaceDir' | 'workspacePackagePatterns' | 'extraEnv' | 'ignoreWorkspaceCycles' | 'disallowWorkspaceCycles' | 'configDependencies' | 'packageExtensions' | 'updateConfig'> & 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' | 'production' | 'preferWorkspacePackages' | 'registries' | '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
8
  argv: {
8
9
  original: string[];
9
10
  };
@@ -35,6 +36,7 @@ export type InstallDepsOptions = Pick<Config, 'allProjects' | 'allProjectsGraph'
35
36
  includeOnlyPackageFiles?: boolean;
36
37
  fetchFullMetadata?: boolean;
37
38
  pruneLockfileImporters?: boolean;
39
+ rebuildHandler?: CommandHandler;
38
40
  pnpmfile: string[];
39
41
  packageVulnerabilityAudit?: PackageVulnerabilityAudit;
40
42
  } & Partial<Pick<Config, 'pnpmHomeDir' | 'strictDepBuilds'>>;
@@ -4,7 +4,7 @@ import { readProjectManifestOnly, tryReadProjectManifest, } from '@pnpm/cli.util
4
4
  import { checkDepsStatus } from '@pnpm/deps.status';
5
5
  import { PnpmError } from '@pnpm/error';
6
6
  import { arrayOfWorkspacePackagesToMap } from '@pnpm/installing.context';
7
- import { IgnoredBuildsError, install, mutateModulesInSingleProject, } from '@pnpm/installing.deps-installer';
7
+ import { install, mutateModulesInSingleProject, } from '@pnpm/installing.deps-installer';
8
8
  import { globalInfo, logger } from '@pnpm/logger';
9
9
  import { filterDependenciesByType } from '@pnpm/pkg-manifest.utils';
10
10
  import { createStoreController } from '@pnpm/store.connection-manager';
@@ -16,6 +16,7 @@ import { updateWorkspaceState } from '@pnpm/workspace.state';
16
16
  import { updateWorkspaceManifest } from '@pnpm/workspace.workspace-manifest-writer';
17
17
  import { getPinnedVersion } from './getPinnedVersion.js';
18
18
  import { getSaveType } from './getSaveType.js';
19
+ import { handleIgnoredBuilds } from './handleIgnoredBuilds.js';
19
20
  import { createMatcher, makeIgnorePatterns, matchDependencies, recursive, } from './recursive.js';
20
21
  import { createWorkspaceSpecs, updateToWorkspacePackagesFromManifest } from './updateWorkspaceDependencies.js';
21
22
  const OVERWRITE_UPDATE_OPTIONS = {
@@ -29,6 +30,12 @@ export async function installDeps(opts, params) {
29
30
  ignoreFilteredInstallCache: true,
30
31
  });
31
32
  if (upToDate) {
33
+ if (opts.hooks?.customResolvers?.some(r => r.shouldRefreshResolution)) {
34
+ logger.warn({
35
+ message: 'shouldRefreshResolution hooks were skipped because optimisticRepeatInstall is enabled.',
36
+ prefix: opts.dir,
37
+ });
38
+ }
32
39
  globalInfo('Already up to date');
33
40
  return;
34
41
  }
@@ -41,15 +48,7 @@ export async function installDeps(opts, params) {
41
48
  throw new PnpmError('WORKSPACE_OPTION_OUTSIDE_WORKSPACE', '--workspace can only be used inside a workspace');
42
49
  }
43
50
  if (!opts.linkWorkspacePackages && !opts.saveWorkspaceProtocol) {
44
- if (opts.rawLocalConfig['save-workspace-protocol'] === false) {
45
- throw new PnpmError('BAD_OPTIONS', 'This workspace has link-workspace-packages turned off, \
46
- so dependencies are linked from the workspace only when the workspace protocol is used. \
47
- Either set link-workspace-packages to true or don\'t use the --no-save-workspace-protocol option \
48
- when running add/update with the --workspace option');
49
- }
50
- else {
51
- opts.saveWorkspaceProtocol = true;
52
- }
51
+ opts.saveWorkspaceProtocol = true;
53
52
  }
54
53
  // @ts-expect-error
55
54
  opts['preserveWorkspaceProtocol'] = !opts.linkWorkspacePackages;
@@ -60,10 +59,6 @@ when running add/update with the --workspace option');
60
59
  devDependencies: true,
61
60
  optionalDependencies: true,
62
61
  };
63
- const forceHoistPattern = typeof opts.rawLocalConfig['hoist-pattern'] !== 'undefined' ||
64
- typeof opts.rawLocalConfig['hoist'] !== 'undefined';
65
- const forcePublicHoistPattern = typeof opts.rawLocalConfig['shamefully-hoist'] !== 'undefined' ||
66
- typeof opts.rawLocalConfig['public-hoist-pattern'] !== 'undefined';
67
62
  const allProjects = opts.allProjects ?? (opts.workspaceDir
68
63
  ? await findWorkspaceProjects(opts.workspaceDir, { ...opts, patterns: opts.workspacePackagePatterns })
69
64
  : []);
@@ -89,8 +84,6 @@ when running add/update with the --workspace option');
89
84
  }).graph;
90
85
  await recursiveInstallThenUpdateWorkspaceState(allProjects, params, {
91
86
  ...opts,
92
- forceHoistPattern,
93
- forcePublicHoistPattern,
94
87
  preferredVersions: opts.packageVulnerabilityAudit ? preferNonvulnerablePackageVersions(opts.packageVulnerabilityAudit) : undefined,
95
88
  allProjectsGraph,
96
89
  selectedProjectsGraph,
@@ -116,8 +109,6 @@ when running add/update with the --workspace option');
116
109
  }
117
110
  const installOpts = {
118
111
  ...opts,
119
- forceHoistPattern,
120
- forcePublicHoistPattern,
121
112
  // In case installation is done in a multi-package repository
122
113
  // The dependencies should be built first,
123
114
  // so ignoring scripts for now
@@ -208,9 +199,7 @@ when running add/update with the --workspace option');
208
199
  configDependencies: opts.configDependencies,
209
200
  });
210
201
  }
211
- if (opts.strictDepBuilds && ignoredBuilds?.size) {
212
- throw new IgnoredBuildsError(ignoredBuilds);
213
- }
202
+ await handleIgnoredBuilds(opts, ignoredBuilds);
214
203
  return;
215
204
  }
216
205
  const { updatedCatalogs, updatedManifest, ignoredBuilds } = await install(manifest, {
@@ -228,9 +217,7 @@ when running add/update with the --workspace option');
228
217
  }),
229
218
  ]);
230
219
  }
231
- if (opts.strictDepBuilds && ignoredBuilds?.size) {
232
- throw new IgnoredBuildsError(ignoredBuilds);
233
- }
220
+ await handleIgnoredBuilds(opts, ignoredBuilds);
234
221
  if (opts.linkWorkspacePackages && opts.workspaceDir) {
235
222
  const { selectedProjectsGraph } = await filterProjectsBySelectorObjects(allProjects, [
236
223
  {
package/lib/link.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { type Config } from '@pnpm/config.reader';
1
+ import { type Config, type ConfigContext } from '@pnpm/config.reader';
2
2
  import * as install from './install.js';
3
- type LinkOpts = Pick<Config, 'bin' | 'cliOptions' | 'engineStrict' | 'rootProjectManifest' | 'rootProjectManifestDir' | 'overrides' | 'saveDev' | 'saveOptional' | 'saveProd' | 'workspaceDir' | 'workspacePackagePatterns' | 'sharedWorkspaceLockfile'> & Partial<Pick<Config, 'linkWorkspacePackages'>> & install.InstallCommandOptions;
3
+ type LinkOpts = Pick<Config, 'bin' | 'engineStrict' | 'overrides' | 'saveDev' | 'saveOptional' | 'saveProd' | 'workspaceDir' | 'workspacePackagePatterns' | 'sharedWorkspaceLockfile'> & Pick<ConfigContext, 'cliOptions' | 'rootProjectManifest' | 'rootProjectManifestDir'> & Partial<Pick<Config, 'linkWorkspacePackages'>> & install.InstallCommandOptions;
4
4
  export declare const rcOptionsTypes: typeof cliOptionsTypes;
5
5
  export declare function cliOptionsTypes(): Record<string, unknown>;
6
6
  export declare const commandNames: string[];
@@ -1,18 +1,18 @@
1
- import { type Config } from '@pnpm/config.reader';
1
+ import type { CommandHandler } from '@pnpm/cli.command';
2
+ import { type Config, type ConfigContext } from '@pnpm/config.reader';
2
3
  import { type UpdateMatchingFunction } from '@pnpm/installing.deps-installer';
3
4
  import type { PreferredVersions } from '@pnpm/resolving.resolver-base';
4
5
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
5
6
  import type { StoreController } from '@pnpm/store.controller';
6
7
  import type { IncludedDependencies, Project, ProjectManifest, ProjectsGraph } from '@pnpm/types';
7
- export type RecursiveOptions = CreateStoreControllerOptions & Pick<Config, 'bail' | 'configDependencies' | 'dedupePeerDependents' | 'depth' | 'globalPnpmfile' | 'hoistPattern' | 'hooks' | 'ignorePnpmfile' | 'ignoreScripts' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'modulesDir' | 'allowBuilds' | 'rawLocalConfig' | 'registries' | 'rootProjectManifest' | 'rootProjectManifestDir' | 'save' | 'saveCatalogName' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'sharedWorkspaceLockfile' | 'tag' | 'cleanupUnusedCatalogs' | 'packageConfigs' | 'updateConfig'> & {
8
+ export type RecursiveOptions = CreateStoreControllerOptions & Pick<Config, 'bail' | 'configDependencies' | 'dedupePeerDependents' | 'dedupePeers' | 'depth' | 'globalPnpmfile' | 'hoistPattern' | 'ignorePnpmfile' | 'ignoreScripts' | 'linkWorkspacePackages' | 'lockfileDir' | 'lockfileOnly' | 'modulesDir' | 'allowBuilds' | 'registries' | 'save' | 'saveCatalogName' | 'saveDev' | 'saveExact' | 'saveOptional' | 'savePeer' | 'savePrefix' | 'saveProd' | 'saveWorkspaceProtocol' | 'lockfileIncludeTarballUrl' | 'sharedWorkspaceLockfile' | 'tag' | 'cleanupUnusedCatalogs' | 'packageConfigs' | 'updateConfig'> & Pick<ConfigContext, 'hooks' | 'rootProjectManifest' | 'rootProjectManifestDir'> & {
9
+ rebuildHandler?: CommandHandler;
8
10
  include?: IncludedDependencies;
9
11
  includeDirect?: IncludedDependencies;
10
12
  latest?: boolean;
11
13
  pending?: boolean;
12
14
  workspace?: boolean;
13
15
  allowNew?: boolean;
14
- forceHoistPattern?: boolean;
15
- forcePublicHoistPattern?: boolean;
16
16
  ignoredPackages?: Set<string>;
17
17
  update?: boolean;
18
18
  updatePackageManifest?: boolean;
package/lib/recursive.js CHANGED
@@ -1,13 +1,12 @@
1
1
  import { promises as fs } from 'node:fs';
2
2
  import path from 'node:path';
3
- import { rebuild } from '@pnpm/building.commands';
4
3
  import { throwOnCommandFail, } from '@pnpm/cli.utils';
5
4
  import { createMatcherWithIndex } from '@pnpm/config.matcher';
6
5
  import { createProjectConfigRecord, getWorkspaceConcurrency, } from '@pnpm/config.reader';
7
6
  import { PnpmError } from '@pnpm/error';
8
7
  import { requireHooks } from '@pnpm/hooks.pnpmfile';
9
8
  import { arrayOfWorkspacePackagesToMap } from '@pnpm/installing.context';
10
- import { addDependenciesToPackage, IgnoredBuildsError, install, mutateModules, } from '@pnpm/installing.deps-installer';
9
+ import { addDependenciesToPackage, install, mutateModules, } from '@pnpm/installing.deps-installer';
11
10
  import { logger } from '@pnpm/logger';
12
11
  import { filterDependenciesByType } from '@pnpm/pkg-manifest.utils';
13
12
  import { createStoreController } from '@pnpm/store.connection-manager';
@@ -18,6 +17,7 @@ import pFilter from 'p-filter';
18
17
  import pLimit from 'p-limit';
19
18
  import { getPinnedVersion } from './getPinnedVersion.js';
20
19
  import { getSaveType } from './getSaveType.js';
20
+ import { handleIgnoredBuilds } from './handleIgnoredBuilds.js';
21
21
  import { createWorkspaceSpecs, updateToWorkspacePackagesFromManifest } from './updateWorkspaceDependencies.js';
22
22
  export async function recursive(allProjects, params, opts, cmdFullName) {
23
23
  if (allProjects.length === 0) {
@@ -46,8 +46,6 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
46
46
  storeDir: store.dir,
47
47
  targetDependenciesField,
48
48
  workspacePackages,
49
- forceHoistPattern: typeof opts.rawLocalConfig?.['hoist-pattern'] !== 'undefined' || typeof opts.rawLocalConfig?.['hoist'] !== 'undefined',
50
- forceShamefullyHoist: typeof opts.rawLocalConfig?.['shamefully-hoist'] !== 'undefined',
51
49
  });
52
50
  const result = {};
53
51
  const projectConfigRecord = createProjectConfigRecord(opts);
@@ -183,13 +181,12 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
183
181
  }));
184
182
  await Promise.all(promises);
185
183
  }
186
- if (opts.strictDepBuilds && ignoredBuilds?.size) {
187
- throw new IgnoredBuildsError(ignoredBuilds);
188
- }
184
+ await handleIgnoredBuilds(opts, ignoredBuilds);
189
185
  return true;
190
186
  }
191
187
  const pkgPaths = Object.keys(opts.selectedProjectsGraph).sort();
192
188
  let updatedCatalogs;
189
+ const allIgnoredBuilds = new Set();
193
190
  const limitInstallation = pLimit(getWorkspaceConcurrency(opts.workspaceConcurrency));
194
191
  await Promise.all(pkgPaths.map(async (rootDir) => limitInstallation(async () => {
195
192
  const hooks = opts.ignorePnpmfile
@@ -263,10 +260,7 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
263
260
  saveExact: typeof localConfig.saveExact === 'boolean' ? localConfig.saveExact : opts.saveExact,
264
261
  savePrefix: typeof localConfig.savePrefix === 'string' ? localConfig.savePrefix : opts.savePrefix,
265
262
  }),
266
- rawConfig: {
267
- ...installOpts.rawConfig,
268
- ...localConfig,
269
- },
263
+ configByUri: installOpts.configByUri,
270
264
  storeController: store.ctrl,
271
265
  });
272
266
  if (opts.save !== false) {
@@ -276,8 +270,10 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
276
270
  Object.assign(updatedCatalogs, newCatalogsAddition);
277
271
  }
278
272
  }
279
- if (opts.strictDepBuilds && ignoredBuilds?.size) {
280
- throw new IgnoredBuildsError(ignoredBuilds);
273
+ if (ignoredBuilds?.size) {
274
+ for (const depPath of ignoredBuilds) {
275
+ allIgnoredBuilds.add(depPath);
276
+ }
281
277
  }
282
278
  result[rootDir].status = 'passed';
283
279
  }
@@ -296,6 +292,7 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
296
292
  throw err;
297
293
  }
298
294
  })));
295
+ await handleIgnoredBuilds(opts, allIgnoredBuilds.size ? allIgnoredBuilds : undefined);
299
296
  await updateWorkspaceManifest(opts.workspaceDir, {
300
297
  updatedCatalogs,
301
298
  cleanupUnusedCatalogs: opts.cleanupUnusedCatalogs,
@@ -304,7 +301,7 @@ export async function recursive(allProjects, params, opts, cmdFullName) {
304
301
  if (!opts.lockfileOnly && !opts.ignoreScripts && (cmdFullName === 'add' ||
305
302
  cmdFullName === 'install' ||
306
303
  cmdFullName === 'update')) {
307
- await rebuild.handler({
304
+ await opts.rebuildHandler?.({
308
305
  ...opts,
309
306
  pending: opts.pending === true,
310
307
  skipIfHasSideEffectsCache: true,
package/lib/remove.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import type { CompletionFunc } from '@pnpm/cli.command';
2
- import { type Config } from '@pnpm/config.reader';
2
+ import { type Config, type ConfigContext } from '@pnpm/config.reader';
3
3
  import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager';
4
4
  export declare function rcOptionsTypes(): Record<string, unknown>;
5
5
  export declare const cliOptionsTypes: () => Record<string, unknown>;
6
6
  export declare function help(): string;
7
7
  export declare const commandNames: string[];
8
8
  export declare const completion: CompletionFunc;
9
- export declare function handler(opts: CreateStoreControllerOptions & Pick<Config, 'allProjects' | 'allProjectsGraph' | 'bail' | 'bin' | 'configDependencies' | 'dev' | 'engineStrict' | 'globalPnpmfile' | 'hooks' | 'ignorePnpmfile' | 'linkWorkspacePackages' | 'lockfileDir' | 'optional' | 'production' | 'rawLocalConfig' | 'registries' | 'rootProjectManifest' | 'rootProjectManifestDir' | 'saveDev' | 'saveOptional' | 'saveProd' | 'selectedProjectsGraph' | 'workspaceDir' | 'workspacePackagePatterns' | 'sharedWorkspaceLockfile' | 'cleanupUnusedCatalogs'> & {
9
+ export declare function handler(opts: CreateStoreControllerOptions & Pick<Config, 'bail' | 'bin' | 'configDependencies' | 'dev' | 'engineStrict' | 'globalPnpmfile' | 'ignorePnpmfile' | 'linkWorkspacePackages' | 'lockfileDir' | 'optional' | 'production' | 'registries' | 'saveDev' | 'saveOptional' | 'saveProd' | 'workspaceDir' | 'workspacePackagePatterns' | 'sharedWorkspaceLockfile' | 'cleanupUnusedCatalogs'> & Pick<ConfigContext, 'allProjects' | 'allProjectsGraph' | 'hooks' | 'rootProjectManifest' | 'rootProjectManifestDir' | 'selectedProjectsGraph'> & {
10
10
  recursive?: boolean;
11
11
  pnpmfile: string[];
12
12
  } & Partial<Pick<Config, 'global' | 'globalPkgDir'>>, params: string[]): Promise<void>;
package/lib/remove.js CHANGED
@@ -37,7 +37,6 @@ export function rcOptionsTypes() {
37
37
  'global-pnpmfile',
38
38
  'global',
39
39
  'lockfile-dir',
40
- 'lockfile-directory',
41
40
  'lockfile-only',
42
41
  'lockfile',
43
42
  'node-linker',
@@ -1,5 +1,5 @@
1
- import type { CompletionFunc } from '@pnpm/cli.command';
2
- import type { PackageVulnerabilityAudit } from '@pnpm/types';
1
+ import type { CommandHandlerMap, CompletionFunc } from '@pnpm/cli.command';
2
+ import type { IncludedDependencies, PackageVulnerabilityAudit } from '@pnpm/types';
3
3
  import type { InstallCommandOptions } from '../install.js';
4
4
  export declare function rcOptionsTypes(): Record<string, unknown>;
5
5
  export declare function cliOptionsTypes(): Record<string, unknown>;
@@ -8,8 +8,9 @@ export declare const commandNames: string[];
8
8
  export declare const completion: CompletionFunc;
9
9
  export declare function help(): string;
10
10
  export type UpdateCommandOptions = InstallCommandOptions & {
11
+ include?: IncludedDependencies;
11
12
  interactive?: boolean;
12
13
  latest?: boolean;
13
14
  packageVulnerabilityAudit?: PackageVulnerabilityAudit;
14
15
  };
15
- export declare function handler(opts: UpdateCommandOptions, params?: string[]): Promise<string | undefined>;
16
+ export declare function handler(opts: UpdateCommandOptions, params?: string[], commands?: CommandHandlerMap): Promise<string | undefined>;
@@ -33,7 +33,6 @@ export function rcOptionsTypes() {
33
33
  'ignore-pnpmfile',
34
34
  'ignore-scripts',
35
35
  'lockfile-dir',
36
- 'lockfile-directory',
37
36
  'lockfile-only',
38
37
  'lockfile',
39
38
  'lockfile-include-tarball-url',
@@ -55,7 +54,6 @@ export function rcOptionsTypes() {
55
54
  'save-prefix',
56
55
  'save-workspace-protocol',
57
56
  'scripts-prepend-node-path',
58
- 'shamefully-flatten',
59
57
  'shamefully-hoist',
60
58
  'shared-workspace-lockfile',
61
59
  'side-effects-cache-readonly',
@@ -146,21 +144,22 @@ dependencies is not found inside the workspace',
146
144
  usages: ['pnpm update [-g] [<pkg>...]'],
147
145
  });
148
146
  }
149
- export async function handler(opts, params = []) {
147
+ export async function handler(opts, params = [], commands) {
150
148
  if (opts.global) {
151
149
  if (!opts.bin) {
152
150
  throw new PnpmError('NO_GLOBAL_BIN_DIR', 'Unable to find the global bin directory', {
153
151
  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
152
  });
155
153
  }
156
- return handleGlobalUpdate(opts, params);
154
+ return handleGlobalUpdate(opts, params, commands ?? {});
157
155
  }
156
+ const rebuildHandler = commands?.rebuild;
158
157
  if (opts.interactive) {
159
- return interactiveUpdate(params, opts);
158
+ return interactiveUpdate(params, opts, rebuildHandler);
160
159
  }
161
- return update(params, opts);
160
+ return update(params, opts, rebuildHandler);
162
161
  }
163
- async function interactiveUpdate(input, opts) {
162
+ async function interactiveUpdate(input, opts, rebuildHandler) {
164
163
  const include = makeIncludeDependenciesFromCLI(opts.cliOptions);
165
164
  const projects = (opts.selectedProjectsGraph != null)
166
165
  ? Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package)
@@ -247,9 +246,9 @@ async function interactiveUpdate(input, opts) {
247
246
  },
248
247
  }); // eslint-disable-line @typescript-eslint/no-explicit-any
249
248
  const updatePkgNames = pluck('value', updateDependencies);
250
- return update(updatePkgNames, opts);
249
+ return update(updatePkgNames, opts, rebuildHandler);
251
250
  }
252
- async function update(dependencies, opts) {
251
+ async function update(dependencies, opts, rebuildHandler) {
253
252
  if (opts.latest) {
254
253
  const dependenciesWithTags = dependencies.filter((name) => parseUpdateParam(name).versionSpec != null);
255
254
  if (dependenciesWithTags.length) {
@@ -257,10 +256,15 @@ async function update(dependencies, opts) {
257
256
  }
258
257
  }
259
258
  const includeDirect = makeIncludeDependenciesFromCLI(opts.cliOptions);
259
+ // include is always all-true for updates: updates should not change which
260
+ // dep types the modules directory supports. The filtering of which deps to
261
+ // actually resolve/update is handled by includeDirect (from CLI flags).
262
+ // This matches the original behavior where rawConfig didn't have derived
263
+ // values like dev=false from --prod, so include defaulted to all-true.
260
264
  const include = {
261
- dependencies: opts.rawConfig.production !== false,
262
- devDependencies: opts.rawConfig.dev !== false,
263
- optionalDependencies: opts.rawConfig.optional !== false,
265
+ dependencies: true,
266
+ devDependencies: true,
267
+ optionalDependencies: true,
264
268
  };
265
269
  const depth = opts.depth ?? Infinity;
266
270
  let updateMatching;
@@ -273,11 +277,12 @@ async function update(dependencies, opts) {
273
277
  }
274
278
  return installDeps({
275
279
  ...opts,
280
+ rebuildHandler,
276
281
  allowNew: false,
277
282
  depth,
278
283
  ignoreCurrentSpecifiers: false,
279
- includeDirect,
280
284
  include,
285
+ includeDirect,
281
286
  update: true,
282
287
  updateToLatest: opts.latest,
283
288
  updateMatching,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/installing.commands",
3
- "version": "1004.6.10",
3
+ "version": "1100.0.0",
4
4
  "description": "Commands for installation",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -26,7 +26,8 @@
26
26
  "dependencies": {
27
27
  "@pnpm/colorize-semver-diff": "^1.0.1",
28
28
  "@pnpm/semver-diff": "^1.1.0",
29
- "@yarnpkg/core": "4.2.0",
29
+ "@pnpm/util.lex-comparator": "^3.0.2",
30
+ "@yarnpkg/core": "4.5.0",
30
31
  "@yarnpkg/lockfile": "^1.1.0",
31
32
  "@yarnpkg/parsers": "3.0.3",
32
33
  "@zkochan/rimraf": "^4.0.0",
@@ -43,80 +44,81 @@
43
44
  "render-help": "^2.0.0",
44
45
  "version-selector-type": "^3.0.0",
45
46
  "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"
47
+ "@pnpm/building.after-install": "1100.0.0",
48
+ "@pnpm/cli.command": "1100.0.0",
49
+ "@pnpm/cli.common-cli-options-help": "1100.0.0",
50
+ "@pnpm/config.matcher": "1100.0.0",
51
+ "@pnpm/cli.utils": "1100.0.0",
52
+ "@pnpm/config.pick-registry-for-package": "1100.0.0",
53
+ "@pnpm/config.reader": "1100.0.0",
54
+ "@pnpm/config.writer": "1100.0.0",
55
+ "@pnpm/constants": "1100.0.0",
56
+ "@pnpm/deps.inspection.outdated": "1100.0.0",
57
+ "@pnpm/catalogs.types": "1100.0.0",
58
+ "@pnpm/error": "1100.0.0",
59
+ "@pnpm/deps.status": "1100.0.0",
60
+ "@pnpm/fs.read-modules-dir": "1100.0.0",
61
+ "@pnpm/global.commands": "1100.0.0",
62
+ "@pnpm/deps.path": "1100.0.0",
63
+ "@pnpm/hooks.pnpmfile": "1100.0.0",
64
+ "@pnpm/fs.graceful-fs": "1100.0.0",
65
+ "@pnpm/installing.dedupe.check": "1100.0.0",
66
+ "@pnpm/installing.context": "1100.0.0",
67
+ "@pnpm/installing.deps-installer": "1100.0.0",
68
+ "@pnpm/installing.env-installer": "1100.0.0",
69
+ "@pnpm/lockfile.types": "1100.0.0",
70
+ "@pnpm/pkg-manifest.utils": "1100.0.0",
71
+ "@pnpm/resolving.resolver-base": "1100.0.0",
72
+ "@pnpm/pkg-manifest.reader": "1100.0.0",
73
+ "@pnpm/resolving.parse-wanted-dependency": "1100.0.0",
74
+ "@pnpm/store.connection-manager": "1100.0.0",
75
+ "@pnpm/types": "1100.0.0",
76
+ "@pnpm/store.controller": "1100.0.0",
77
+ "@pnpm/workspace.projects-filter": "1100.0.0",
78
+ "@pnpm/workspace.project-manifest-reader": "1100.0.0",
79
+ "@pnpm/workspace.project-manifest-writer": "1100.0.0",
80
+ "@pnpm/workspace.projects-graph": "1100.0.0",
81
+ "@pnpm/workspace.projects-sorter": "1100.0.0",
82
+ "@pnpm/workspace.projects-reader": "1100.0.0",
83
+ "@pnpm/workspace.root-finder": "1100.0.0",
84
+ "@pnpm/workspace.state": "1100.0.0",
85
+ "@pnpm/workspace.workspace-manifest-writer": "1100.0.0"
85
86
  },
86
87
  "peerDependencies": {
87
88
  "@pnpm/logger": ">=1001.0.0 <1002.0.0"
88
89
  },
89
90
  "devDependencies": {
90
- "@jest/globals": "30.0.5",
91
- "@pnpm/registry-mock": "5.2.4",
91
+ "@jest/globals": "30.3.0",
92
+ "@pnpm/registry-mock": "6.0.0",
92
93
  "@types/normalize-path": "^3.0.2",
93
94
  "@types/proxyquire": "^1.3.31",
94
- "@types/ramda": "0.29.12",
95
- "@types/which": "^2.0.2",
95
+ "@types/ramda": "0.31.1",
96
+ "@types/which": "^3.0.4",
96
97
  "@types/yarnpkg__lockfile": "^1.1.9",
97
98
  "@types/zkochan__table": "npm:@types/table@6.0.0",
98
99
  "ci-info": "^4.3.0",
99
- "delay": "^6.0.0",
100
- "jest-diff": "^30.1.1",
101
- "nock": "13.3.4",
100
+ "delay": "^7.0.0",
101
+ "jest-diff": "^30.3.0",
102
102
  "path-name": "^1.0.0",
103
103
  "proxyquire": "^2.1.3",
104
104
  "read-yaml-file": "^3.0.0",
105
- "symlink-dir": "^7.0.0",
105
+ "symlink-dir": "^10.0.1",
106
106
  "tempy": "3.0.0",
107
107
  "write-json-file": "^7.0.0",
108
108
  "write-package": "7.2.0",
109
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"
110
+ "@pnpm/assert-project": "1100.0.0",
111
+ "@pnpm/installing.commands": "1100.0.0",
112
+ "@pnpm/logger": "1100.0.0",
113
+ "@pnpm/prepare": "1100.0.0",
114
+ "@pnpm/store.index": "1100.0.0",
115
+ "@pnpm/test-fixtures": "1100.0.0",
116
+ "@pnpm/installing.modules-yaml": "1100.0.0",
117
+ "@pnpm/testing.mock-agent": "1100.0.0",
118
+ "@pnpm/testing.command-defaults": "1100.0.0",
119
+ "@pnpm/test-ipc-server": "1100.0.0",
120
+ "@pnpm/worker": "1100.0.0",
121
+ "@pnpm/workspace.projects-filter": "1100.0.0"
120
122
  },
121
123
  "engines": {
122
124
  "node": ">=22.13"
@@ -127,8 +129,8 @@
127
129
  "scripts": {
128
130
  "start": "tsgo --watch",
129
131
  "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"
132
+ "test": "pn compile && pn .test",
133
+ "compile": "tsgo --build && pn lint --fix",
134
+ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
133
135
  }
134
136
  }
package/lib/ci.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export declare const rcOptionsTypes: () => Record<string, unknown>;
2
- export declare const cliOptionsTypes: () => Record<string, unknown>;
3
- export declare const shorthands: Record<string, string>;
4
- export declare const commandNames: string[];
5
- export declare function help(): string;
6
- export declare function handler(_opts: unknown): Promise<never>;
package/lib/ci.js DELETED
@@ -1,20 +0,0 @@
1
- import { docsUrl } from '@pnpm/cli.utils';
2
- import { PnpmError } from '@pnpm/error';
3
- import { renderHelp } from 'render-help';
4
- export const rcOptionsTypes = () => ({});
5
- export const cliOptionsTypes = () => ({});
6
- export const shorthands = {};
7
- export const commandNames = ['ci', 'clean-install', 'ic', 'install-clean'];
8
- export function help() {
9
- return renderHelp({
10
- aliases: ['clean-install', 'ic', 'install-clean'],
11
- description: 'Clean install a project',
12
- descriptionLists: [],
13
- url: docsUrl('ci'),
14
- usages: ['pnpm ci'],
15
- });
16
- }
17
- export async function handler(_opts) {
18
- throw new PnpmError('CI_NOT_IMPLEMENTED', 'The ci command is not implemented yet');
19
- }
20
- //# sourceMappingURL=ci.js.map