From 0377d93678a0d6f77e1d5547e3fb999e6c379ee9 Mon Sep 17 00:00:00 2001 From: await-ovo <13152410380@163.com> Date: Mon, 20 Feb 2023 09:36:35 +0800 Subject: [PATCH 1/5] feat: add --report-summary option for pnpm exec and pnpm run (#6098) close #6008 --- .changeset/gold-chicken-sit.md | 9 ++ cli/cli-utils/src/recursiveSummary.ts | 25 ++-- exec/plugin-commands-rebuild/src/recursive.ts | 13 +- .../package.json | 3 +- .../src/exec.ts | 56 +++++++-- .../plugin-commands-script-runners/src/run.ts | 7 ++ .../src/runRecursive.ts | 41 ++++--- .../test/exec.e2e.ts | 115 ++++++++++++++++++ .../test/runRecursive.ts | 114 +++++++++++++++++ .../src/recursive.ts | 16 ++- pnpm-lock.yaml | 17 +-- 11 files changed, 354 insertions(+), 62 deletions(-) create mode 100644 .changeset/gold-chicken-sit.md diff --git a/.changeset/gold-chicken-sit.md b/.changeset/gold-chicken-sit.md new file mode 100644 index 0000000000..ca5175ea01 --- /dev/null +++ b/.changeset/gold-chicken-sit.md @@ -0,0 +1,9 @@ +--- +"@pnpm/plugin-commands-installation": minor +"@pnpm/plugin-commands-script-runners": minor +"@pnpm/plugin-commands-rebuild": minor +"@pnpm/cli-utils": minor +"pnpm": minor +--- + +Add --report-summary for pnpm exec and pnpm run [#6008](https://github.com/pnpm/pnpm/issues/6008) diff --git a/cli/cli-utils/src/recursiveSummary.ts b/cli/cli-utils/src/recursiveSummary.ts index 51188c3aef..ceb587f395 100644 --- a/cli/cli-utils/src/recursiveSummary.ts +++ b/cli/cli-utils/src/recursiveSummary.ts @@ -1,30 +1,33 @@ import { PnpmError } from '@pnpm/error' interface ActionFailure { + status: 'failure' + duration?: number prefix: string message: string error: Error } -export interface RecursiveSummary { - fails: ActionFailure[] - passes: number -} +export type RecursiveSummary = Record class RecursiveFailError extends PnpmError { - public readonly fails: ActionFailure[] + public readonly failures: ActionFailure[] public readonly passes: number - constructor (command: string, recursiveSummary: RecursiveSummary) { - super('RECURSIVE_FAIL', `"${command}" failed in ${recursiveSummary.fails.length} packages`) + constructor (command: string, recursiveSummary: RecursiveSummary, failures: ActionFailure[]) { + super('RECURSIVE_FAIL', `"${command}" failed in ${failures.length} packages`) - this.fails = recursiveSummary.fails - this.passes = recursiveSummary.passes + this.failures = failures + this.passes = Object.values(recursiveSummary).filter(({ status }) => status === 'passed').length } } export function throwOnCommandFail (command: string, recursiveSummary: RecursiveSummary) { - if (recursiveSummary.fails.length > 0) { - throw new RecursiveFailError(command, recursiveSummary) + const failures = Object.values(recursiveSummary).filter(({ status }) => status === 'failure') as ActionFailure[] + if (failures.length > 0) { + throw new RecursiveFailError(command, recursiveSummary, failures) } } diff --git a/exec/plugin-commands-rebuild/src/recursive.ts b/exec/plugin-commands-rebuild/src/recursive.ts index 182d13d0ec..e53cc579cc 100755 --- a/exec/plugin-commands-rebuild/src/recursive.ts +++ b/exec/plugin-commands-rebuild/src/recursive.ts @@ -70,10 +70,7 @@ export async function recursiveRebuild ( workspacePackages, }) as RebuildOptions - const result = { - fails: [], - passes: 0, - } as RecursiveSummary + const result: RecursiveSummary = {} const memReadLocalConfig = mem(readLocalConfig) @@ -120,6 +117,7 @@ export async function recursiveRebuild ( if (opts.ignoredPackages?.has(rootDir)) { return } + result[rootDir] = { status: 'running' } const localConfig = await memReadLocalConfig(rootDir) await rebuild( [ @@ -140,16 +138,17 @@ export async function recursiveRebuild ( }, } ) - result.passes++ + result[rootDir].status = 'passed' } catch (err: any) { // eslint-disable-line logger.info(err) if (!opts.bail) { - result.fails.push({ + result[rootDir] = { + status: 'failure', error: err, message: err.message, prefix: rootDir, - }) + } return } diff --git a/exec/plugin-commands-script-runners/package.json b/exec/plugin-commands-script-runners/package.json index 0d480d4e79..e589e53004 100644 --- a/exec/plugin-commands-script-runners/package.json +++ b/exec/plugin-commands-script-runners/package.json @@ -64,7 +64,8 @@ "path-name": "^1.0.0", "ramda": "npm:@pnpm/ramda@0.28.1", "realpath-missing": "^1.1.0", - "render-help": "^1.0.3" + "render-help": "^1.0.3", + "write-json-file": "^4.3.0" }, "peerDependencies": { "@pnpm/logger": "^5.0.0" diff --git a/exec/plugin-commands-script-runners/src/exec.ts b/exec/plugin-commands-script-runners/src/exec.ts index cfb1b48164..648d21aef0 100644 --- a/exec/plugin-commands-script-runners/src/exec.ts +++ b/exec/plugin-commands-script-runners/src/exec.ts @@ -1,3 +1,4 @@ +import path from 'path' import { docsUrl, RecursiveSummary, throwOnCommandFail } from '@pnpm/cli-utils' import { Config, types } from '@pnpm/config' import { makeNodeRequireOption } from '@pnpm/lifecycle' @@ -13,10 +14,12 @@ import { existsInDir } from './existsInDir' import { makeEnv } from './makeEnv' import { PARALLEL_OPTION_HELP, + REPORT_SUMMARY_OPTION_HELP, RESUME_FROM_OPTION_HELP, shorthands as runShorthands, } from './run' import { PnpmError } from '@pnpm/error' +import writeJsonFile from 'write-json-file' export const shorthands = { parallel: runShorthands.parallel, @@ -36,6 +39,7 @@ export function rcOptionsTypes () { ], types), 'shell-mode': Boolean, 'resume-from': String, + 'report-summary': Boolean, } } @@ -69,6 +73,7 @@ The shell should understand the -c switch on UNIX or /d /s /c on Windows.', shortAlias: '-c', }, RESUME_FROM_OPTION_HELP, + REPORT_SUMMARY_OPTION_HELP, ], }, ], @@ -97,6 +102,24 @@ export function getResumedPackageChunks ({ return chunks.slice(chunkPosition) } +export async function writeRecursiveSummary (opts: { dir: string, summary: RecursiveSummary }) { + await writeJsonFile(path.join(opts.dir, 'pnpm-exec-summary.json'), { + executionStatus: opts.summary, + }) +} + +export function createEmptyRecursiveSummary (chunks: string[][]) { + return chunks.flat().reduce((acc, prefix) => { + acc[prefix] = { status: 'queued' } + return acc + }, {}) +} + +export function getExecutionDuration (start: [number, number]) { + const end = process.hrtime(start) + return (end[0] * 1e9 + end[1]) / 1e6 +} + export async function handler ( opts: Required> & { bail?: boolean @@ -107,6 +130,7 @@ export async function handler ( workspaceConcurrency?: number shellMode?: boolean resumeFrom?: string + reportSummary?: boolean } & Pick, params: string[] ) { @@ -116,11 +140,6 @@ export async function handler ( } const limitRun = pLimit(opts.workspaceConcurrency ?? 4) - const result = { - fails: [], - passes: 0, - } as RecursiveSummary - let chunks!: string[][] if (opts.recursive) { chunks = opts.sort @@ -153,6 +172,7 @@ export async function handler ( }) } + const result = createEmptyRecursiveSummary(chunks) const existsPnp = existsInDir.bind(null, '.pnp.cjs') const workspacePnpPath = opts.workspaceDir && await existsPnp(opts.workspaceDir) @@ -160,6 +180,8 @@ export async function handler ( for (const chunk of chunks) { await Promise.all(chunk.map(async (prefix: string) => limitRun(async () => { + result[prefix].status = 'running' + const startTime = process.hrtime() try { const pnpPath = workspacePnpPath ?? await existsPnp(prefix) const extraEnv = { @@ -183,7 +205,8 @@ export async function handler ( stdio: 'inherit', shell: opts.shellMode ?? false, }) - result.passes++ + result[prefix].status = 'passed' + result[prefix].duration = getExecutionDuration(startTime) } catch (err: any) { // eslint-disable-line if (!opts.recursive && typeof err.exitCode === 'number') { exitCode = err.exitCode @@ -191,12 +214,15 @@ export async function handler ( } logger.info(err) + result[prefix] = { + status: 'failure', + duration: getExecutionDuration(startTime), + error: err, + message: err.message, + prefix, + } + if (!opts.bail) { - result.fails.push({ - error: err, - message: err.message, - prefix, - }) return } @@ -204,6 +230,10 @@ export async function handler ( err['code'] = 'ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL' } err['prefix'] = prefix + opts.reportSummary && await writeRecursiveSummary({ + dir: opts.lockfileDir ?? opts.dir, + summary: result, + }) /* eslint-enable @typescript-eslint/dot-notation */ throw err } @@ -211,6 +241,10 @@ export async function handler ( ))) } + opts.reportSummary && await writeRecursiveSummary({ + dir: opts.lockfileDir ?? opts.dir, + summary: result, + }) throwOnCommandFail('pnpm recursive exec', result) return { exitCode } } diff --git a/exec/plugin-commands-script-runners/src/run.ts b/exec/plugin-commands-script-runners/src/run.ts index b7741bd68e..c71cd8c4e9 100644 --- a/exec/plugin-commands-script-runners/src/run.ts +++ b/exec/plugin-commands-script-runners/src/run.ts @@ -49,6 +49,11 @@ export const SEQUENTIAL_OPTION_HELP = { name: '--sequential', } +export const REPORT_SUMMARY_OPTION_HELP = { + description: 'Save the execution results of every package to "pnpm-exec-summary.json". Useful to inspect the execution time and status of each package.', + name: '--report-summary', +} + export const shorthands = { parallel: [ '--workspace-concurrency=Infinity', @@ -84,6 +89,7 @@ export function cliOptionsTypes () { recursive: Boolean, reverse: Boolean, 'resume-from': String, + 'report-summary': Boolean, } } @@ -122,6 +128,7 @@ For options that may be used with `-r`, see "pnpm help recursive"', RESUME_FROM_OPTION_HELP, ...UNIVERSAL_OPTIONS, SEQUENTIAL_OPTION_HELP, + REPORT_SUMMARY_OPTION_HELP, ], }, FILTERING, diff --git a/exec/plugin-commands-script-runners/src/runRecursive.ts b/exec/plugin-commands-script-runners/src/runRecursive.ts index 8b52af21ba..cc3e8a6213 100644 --- a/exec/plugin-commands-script-runners/src/runRecursive.ts +++ b/exec/plugin-commands-script-runners/src/runRecursive.ts @@ -1,5 +1,5 @@ import path from 'path' -import { RecursiveSummary, throwOnCommandFail } from '@pnpm/cli-utils' +import { throwOnCommandFail } from '@pnpm/cli-utils' import { Config } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { @@ -11,7 +11,7 @@ import { sortPackages } from '@pnpm/sort-packages' import pLimit from 'p-limit' import realpathMissing from 'realpath-missing' import { existsInDir } from './existsInDir' -import { getResumedPackageChunks } from './exec' +import { createEmptyRecursiveSummary, getExecutionDuration, getResumedPackageChunks, writeRecursiveSummary } from './exec' import { runScript } from './run' import { tryBuildRegExpFromCommand } from './regexpCommand' import { PackageScripts } from '@pnpm/types' @@ -25,11 +25,12 @@ export type RecursiveRunOpts = Pick & Required> & +> & Required> & Partial> & { ifPresent?: boolean resumeFrom?: string + reportSummary?: boolean } export async function runRecursive ( @@ -55,11 +56,6 @@ export async function runRecursive ( }) } - const result = { - fails: [], - passes: 0, - } as RecursiveSummary - const limitRun = pLimit(opts.workspaceConcurrency ?? 4) const stdio = !opts.stream && @@ -82,6 +78,8 @@ export async function runRecursive ( } } + const result = createEmptyRecursiveSummary(packageChunks) + for (const chunk of packageChunks) { const selectedScripts = chunk.map(prefix => { const pkg = opts.selectedProjectsGraph[prefix] @@ -100,6 +98,8 @@ export async function runRecursive ( ) { return } + result[prefix].status = 'running' + const startTime = process.hrtime() hasCommand++ try { const lifecycleOpts: RunLifecycleHookOptions = { @@ -125,21 +125,29 @@ export async function runRecursive ( const _runScript = runScript.bind(null, { manifest: pkg.package.manifest, lifecycleOpts, runScriptOptions: { enablePrePostScripts: opts.enablePrePostScripts ?? false }, passedThruArgs }) await _runScript(scriptName) - result.passes++ + result[prefix].status = 'passed' + result[prefix].duration = getExecutionDuration(startTime) } catch (err: any) { // eslint-disable-line logger.info(err) + result[prefix] = { + status: 'failure', + duration: getExecutionDuration(startTime), + error: err, + message: err.message, + prefix, + } + if (!opts.bail) { - result.fails.push({ - error: err, - message: err.message, - prefix, - }) return } err['code'] = 'ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL' err['prefix'] = prefix + opts.reportSummary && await writeRecursiveSummary({ + dir: opts.workspaceDir ?? opts.dir, + summary: result, + }) /* eslint-enable @typescript-eslint/dot-notation */ throw err } @@ -158,7 +166,10 @@ export async function runRecursive ( }) } } - + opts.reportSummary && await writeRecursiveSummary({ + dir: opts.workspaceDir ?? opts.dir, + summary: result, + }) throwOnCommandFail('pnpm recursive run', result) } diff --git a/exec/plugin-commands-script-runners/test/exec.e2e.ts b/exec/plugin-commands-script-runners/test/exec.e2e.ts index 5d4c2e152e..0d1a11a578 100644 --- a/exec/plugin-commands-script-runners/test/exec.e2e.ts +++ b/exec/plugin-commands-script-runners/test/exec.e2e.ts @@ -696,3 +696,118 @@ test('pnpm exec in directory with path delimiter', async () => { } expect(error).toBeUndefined() }) + +test('pnpm recursive exec report summary', async () => { + preparePackages([ + { + name: 'project-1', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-1\'), 1000)"', + }, + }, + { + name: 'project-2', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + { + name: 'project-3', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-3\'), 1000)"', + }, + }, + { + name: 'project-4', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + ]) + const { selectedProjectsGraph } = await readProjects(process.cwd(), []) + let error + try { + await exec.handler({ + ...DEFAULT_OPTS, + dir: process.cwd(), + selectedProjectsGraph, + recursive: true, + reportSummary: true, + workspaceConcurrency: 3, + }, ['npm', 'run', 'build']) + } catch (err: any) { // eslint-disable-line + error = err + } + expect(error.code).toBe('ERR_PNPM_RECURSIVE_FAIL') + + const { default: { executionStatus } } = (await import(path.resolve('pnpm-exec-summary.json'))) + expect(executionStatus[path.resolve('project-1')].status).toBe('passed') + expect(executionStatus[path.resolve('project-1')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-2')].status).toBe('failure') + expect(executionStatus[path.resolve('project-2')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-3')].status).toBe('passed') + expect(executionStatus[path.resolve('project-3')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-4')].status).toBe('failure') + expect(executionStatus[path.resolve('project-4')].duration).not.toBeFalsy() +}) + +test('pnpm recursive exec report summary with --bail', async () => { + preparePackages([ + { + name: 'project-1', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-1\'), 1000)"', + }, + }, + { + name: 'project-2', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + { + name: 'project-3', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-3\'), 1000)"', + }, + }, + { + name: 'project-4', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + ]) + const { selectedProjectsGraph } = await readProjects(process.cwd(), []) + let error + try { + await exec.handler({ + ...DEFAULT_OPTS, + dir: process.cwd(), + selectedProjectsGraph, + recursive: true, + reportSummary: true, + bail: true, + workspaceConcurrency: 3, + }, ['npm', 'run', 'build']) + } catch (err: any) { // eslint-disable-line + error = err + } + expect(error.code).toBe('ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL') + + const { default: { executionStatus } } = (await import(path.resolve('pnpm-exec-summary.json'))) + + expect(executionStatus[path.resolve('project-1')].status).toBe('running') + expect(executionStatus[path.resolve('project-2')].status).toBe('failure') + expect(executionStatus[path.resolve('project-2')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-3')].status).toBe('running') + expect(executionStatus[path.resolve('project-4')].status).toBe('queued') +}) diff --git a/exec/plugin-commands-script-runners/test/runRecursive.ts b/exec/plugin-commands-script-runners/test/runRecursive.ts index a06d8f3955..df88b61f59 100644 --- a/exec/plugin-commands-script-runners/test/runRecursive.ts +++ b/exec/plugin-commands-script-runners/test/runRecursive.ts @@ -977,3 +977,117 @@ test('pnpm run with RegExp script selector should work on recursive', async () = expect(await fs.readFile('output-lint-3-b.txt', { encoding: 'utf-8' })).toEqual('3-b') expect(await fs.readFile('output-lint-3-c.txt', { encoding: 'utf-8' })).toEqual('3-c') }) + +test('pnpm recursive run report summary', async () => { + preparePackages([ + { + name: 'project-1', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-1\'), 1000)"', + }, + }, + { + name: 'project-2', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + { + name: 'project-3', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-3\'), 1000)"', + }, + }, + { + name: 'project-4', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + ]) + let error + try { + await run.handler({ + ...DEFAULT_OPTS, + ...await readProjects(process.cwd(), [{ namePattern: '*' }]), + dir: process.cwd(), + recursive: true, + reportSummary: true, + workspaceDir: process.cwd(), + }, ['build']) + } catch (err: any) { // eslint-disable-line + error = err + } + expect(error.code).toBe('ERR_PNPM_RECURSIVE_FAIL') + + const { default: { executionStatus } } = (await import(path.resolve('pnpm-exec-summary.json'))) + expect(executionStatus[path.resolve('project-1')].status).toBe('passed') + expect(executionStatus[path.resolve('project-1')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-2')].status).toBe('failure') + expect(executionStatus[path.resolve('project-2')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-3')].status).toBe('passed') + expect(executionStatus[path.resolve('project-3')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-4')].status).toBe('failure') + expect(executionStatus[path.resolve('project-4')].duration).not.toBeFalsy() +}) + +test('pnpm recursive run report summary with --bail', async () => { + preparePackages([ + { + name: 'project-1', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-1\'), 1000)"', + }, + }, + { + name: 'project-2', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + { + name: 'project-3', + version: '1.0.0', + scripts: { + build: 'node -e "setTimeout(() => console.log(\'project-3\'), 1000)"', + }, + }, + { + name: 'project-4', + version: '1.0.0', + scripts: { + build: 'exit 1', + }, + }, + ]) + let error + try { + await run.handler({ + ...DEFAULT_OPTS, + ...await readProjects(process.cwd(), [{ namePattern: '*' }]), + dir: process.cwd(), + recursive: true, + reportSummary: true, + workspaceDir: process.cwd(), + bail: true, + workspaceConcurrency: 3, + }, ['build']) + } catch (err: any) { // eslint-disable-line + error = err + } + expect(error.code).toBe('ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL') + + const { default: { executionStatus } } = (await import(path.resolve('pnpm-exec-summary.json'))) + + expect(executionStatus[path.resolve('project-1')].status).toBe('running') + expect(executionStatus[path.resolve('project-2')].status).toBe('failure') + expect(executionStatus[path.resolve('project-2')].duration).not.toBeFalsy() + expect(executionStatus[path.resolve('project-3')].status).toBe('running') + expect(executionStatus[path.resolve('project-4')].status).toBe('queued') +}) diff --git a/pkg-manager/plugin-commands-installation/src/recursive.ts b/pkg-manager/plugin-commands-installation/src/recursive.ts index 3ec65f5deb..1e90d46571 100755 --- a/pkg-manager/plugin-commands-installation/src/recursive.ts +++ b/pkg-manager/plugin-commands-installation/src/recursive.ts @@ -135,10 +135,7 @@ export async function recursive ( forceShamefullyHoist: typeof opts.rawLocalConfig?.['shamefully-hoist'] !== 'undefined', }) as InstallOptions - const result = { - fails: [], - passes: 0, - } as RecursiveSummary + const result: RecursiveSummary = {} const memReadLocalConfig = mem(readLocalConfig) @@ -297,7 +294,7 @@ export async function recursive ( if (opts.ignoredPackages?.has(rootDir)) { return } - + result[rootDir] = { status: 'running' } const { manifest, writeProjectManifest } = manifestsByPath[rootDir] let currentInput = [...params] if (updateMatch != null) { @@ -369,16 +366,17 @@ export async function recursive ( if (opts.save !== false) { await writeProjectManifest(newManifest) } - result.passes++ + result[rootDir].status = 'passed' } catch (err: any) { // eslint-disable-line logger.info(err) if (!opts.bail) { - result.fails.push({ + result[rootDir] = { + status: 'failure', error: err, message: err.message, prefix: rootDir, - }) + } return } @@ -404,7 +402,7 @@ export async function recursive ( throwOnFail(result) - if (!result.passes && cmdFullName === 'update' && opts.depth === 0) { + if (!Object.values(result).filter(({ status }) => status === 'passed').length && cmdFullName === 'update' && opts.depth === 0) { throw new PnpmError('NO_PACKAGE_IN_DEPENDENCIES', 'None of the specified packages were found in the dependencies of any of the projects.') } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7c039d201..ba6e5f0285 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1194,6 +1194,9 @@ importers: render-help: specifier: ^1.0.3 version: 1.0.3 + write-json-file: + specifier: ^4.3.0 + version: 4.3.0 devDependencies: '@pnpm/filter-workspace-packages': specifier: workspace:* @@ -7975,7 +7978,7 @@ packages: '@pnpm/find-workspace-dir': 5.0.1 '@pnpm/find-workspace-packages': 5.0.33(@pnpm/logger@5.0.0)(@yarnpkg/core@4.0.0-rc.14)(typanion@3.12.1) '@pnpm/logger': 5.0.0 - '@pnpm/types': 8.10.0 + '@pnpm/types': 8.9.0 '@yarnpkg/core': 4.0.0-rc.14(typanion@3.12.1) load-json-file: 7.0.1 meow: 10.1.5 @@ -8524,7 +8527,6 @@ packages: /@pnpm/types@8.9.0: resolution: {integrity: sha512-3MYHYm8epnciApn6w5Fzx6sepawmsNU7l6lvIq+ER22/DPSrr83YMhU/EQWnf4lORn2YyiXFj0FJSyJzEtIGmw==} engines: {node: '>=14.6'} - dev: false /@pnpm/util.lex-comparator@1.0.0: resolution: {integrity: sha512-3aBQPHntVgk5AweBWZn+1I/fqZ9krK/w01197aYVkAJQGftb+BVWgEepxY5GChjSW12j52XX+CmfynYZ/p0DFQ==} @@ -8657,7 +8659,7 @@ packages: /@types/byline@4.2.33: resolution: {integrity: sha512-LJYez7wrWcJQQDknqZtrZuExMGP0IXmPl1rOOGDqLbu+H7UNNRfKNuSxCBcQMLH1EfjeWidLedC/hCc5dDfBog==} dependencies: - '@types/node': 18.13.0 + '@types/node': 14.18.36 dev: true /@types/cacheable-request@6.0.3: @@ -8665,7 +8667,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 18.13.0 + '@types/node': 14.18.36 '@types/responselike': 1.0.0 /@types/concat-stream@2.0.0: @@ -8693,7 +8695,7 @@ packages: resolution: {integrity: sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 18.13.0 + '@types/node': 14.18.36 dev: true /@types/graceful-fs@4.1.6: @@ -8767,7 +8769,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.13.0 + '@types/node': 14.18.36 /@types/lodash@4.14.181: resolution: {integrity: sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag==} @@ -8810,7 +8812,6 @@ packages: /@types/node@14.18.36: resolution: {integrity: sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==} - dev: true /@types/node@18.13.0: resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==} @@ -8847,7 +8848,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.13.0 + '@types/node': 14.18.36 /@types/retry@0.12.2: resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} From 1b2e09ccfdabccb2fdc50ded2ca22f3f5b062b0b Mon Sep 17 00:00:00 2001 From: Brandon Cheng Date: Sun, 19 Feb 2023 21:15:36 -0500 Subject: [PATCH 2/5] fix: check for peerDependenciesMeta in pkgIsLeaf to fix non-determinism (#6112) close #5106 --- .changeset/lazy-brooms-search.md | 6 ++++++ pkg-manager/resolve-dependencies/src/resolveDependencies.ts | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/lazy-brooms-search.md diff --git a/.changeset/lazy-brooms-search.md b/.changeset/lazy-brooms-search.md new file mode 100644 index 0000000000..32ea8475dd --- /dev/null +++ b/.changeset/lazy-brooms-search.md @@ -0,0 +1,6 @@ +--- +"@pnpm/resolve-dependencies": patch +pnpm: patch +--- + +Fix a case of installs not being deterministic and causing lockfile changes between repeat installs. When a dependency only declares `peerDependenciesMeta` and not `peerDependencies`, `dependencies`, or `optionalDependencies`, the dependency's peers were not considered deterministically before. diff --git a/pkg-manager/resolve-dependencies/src/resolveDependencies.ts b/pkg-manager/resolve-dependencies/src/resolveDependencies.ts index 3495963a44..0c5e8e7afc 100644 --- a/pkg-manager/resolve-dependencies/src/resolveDependencies.ts +++ b/pkg-manager/resolve-dependencies/src/resolveDependencies.ts @@ -1377,7 +1377,10 @@ function getMissingPeers (pkg: PackageManifest) { function pkgIsLeaf (pkg: PackageManifest) { return isEmpty(pkg.dependencies ?? {}) && isEmpty(pkg.optionalDependencies ?? {}) && - isEmpty(pkg.peerDependencies ?? {}) + isEmpty(pkg.peerDependencies ?? {}) && + // Package manifests can declare peerDependenciesMeta without declaring + // peerDependencies. peerDependenciesMeta implies the later. + isEmpty(pkg.peerDependenciesMeta ?? {}) } function getResolvedPackage ( From b9ab2e0bf2c47c0ea5b941386b11c10d0c4deb7d Mon Sep 17 00:00:00 2001 From: await-ovo <13152410380@163.com> Date: Mon, 20 Feb 2023 11:41:57 +0800 Subject: [PATCH 3/5] feat: show path info for pnpm why --json or --long (#6109) close #6103 --- .changeset/little-donuts-suffer.md | 6 ++++++ reviewing/list/src/getPkgInfo.ts | 3 ++- reviewing/list/src/renderJson.ts | 2 +- reviewing/list/src/renderTree.ts | 4 ++++ reviewing/list/test/index.ts | 18 +++++++++++++++++- 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .changeset/little-donuts-suffer.md diff --git a/.changeset/little-donuts-suffer.md b/.changeset/little-donuts-suffer.md new file mode 100644 index 0000000000..4370e1ad2e --- /dev/null +++ b/.changeset/little-donuts-suffer.md @@ -0,0 +1,6 @@ +--- +"@pnpm/list": minor +"pnpm": minor +--- + +Show path info for `pnpm why --json` or `--long` [#6103](https://github.com/pnpm/pnpm/issues/6103). diff --git a/reviewing/list/src/getPkgInfo.ts b/reviewing/list/src/getPkgInfo.ts index 139f8e01ef..7a85ba6cbc 100644 --- a/reviewing/list/src/getPkgInfo.ts +++ b/reviewing/list/src/getPkgInfo.ts @@ -10,7 +10,7 @@ interface PkgData { resolved?: string } -export type PkgInfo = Omit & Pick & { +export type PkgInfo = Omit & Pick & { from: string repository?: string } @@ -41,5 +41,6 @@ export async function getPkgInfo (pkg: PkgData): Promise { repository: (manifest.repository && ( typeof manifest.repository === 'string' ? manifest.repository : manifest.repository.url )) ?? undefined, + path: pkg.path, } } diff --git a/reviewing/list/src/renderJson.ts b/reviewing/list/src/renderJson.ts index 31a0fbb63f..a3da306a7d 100644 --- a/reviewing/list/src/renderJson.ts +++ b/reviewing/list/src/renderJson.ts @@ -60,8 +60,8 @@ export async function toJsonResult ( alias: node.alias as string | undefined, from: node.name, version: node.version, - resolved: node.resolved, + path: node.path, } if (Object.keys(subDependencies).length > 0) { dep.dependencies = subDependencies diff --git a/reviewing/list/src/renderTree.ts b/reviewing/list/src/renderTree.ts index b527ff1f81..3819d44911 100644 --- a/reviewing/list/src/renderTree.ts +++ b/reviewing/list/src/renderTree.ts @@ -123,6 +123,10 @@ export async function toArchyTree ( if (pkg.homepage) { labelLines.push(pkg.homepage) } + if (pkg.path) { + labelLines.push(pkg.path) + } + return { label: labelLines.join('\n'), nodes, diff --git a/reviewing/list/test/index.ts b/reviewing/list/test/index.ts index 086e57d18d..499b5abf6b 100644 --- a/reviewing/list/test/index.ts +++ b/reviewing/list/test/index.ts @@ -235,18 +235,21 @@ write-json-file ${VERSION_CLR('2.3.0')} Stringify and write JSON to a file atomically git+https://github.com/sindresorhus/write-json-file.git https://github.com/sindresorhus/write-json-file#readme + ${path.join(fixture, 'node_modules/.pnpm/write-json-file@2.3.0/node_modules/write-json-file')} ${DEV_DEPENDENCIES} ${DEV_DEP_ONLY_CLR('is-positive')} ${VERSION_CLR('3.1.0')} Check if something is a positive number git+https://github.com/kevva/is-positive.git https://github.com/kevva/is-positive#readme + ${path.join(fixture, 'node_modules/.pnpm/is-positive@3.1.0/node_modules/is-positive')} ${OPTIONAL_DEPENDENCIES} ${OPTIONAL_DEP_CLR('is-negative')} ${VERSION_CLR('2.1.0')} Check if something is a negative number git+https://github.com/kevva/is-negative.git - https://github.com/kevva/is-negative#readme`) + https://github.com/kevva/is-negative#readme + ${path.join(fixture, 'node_modules/.pnpm/is-negative@2.1.0/node_modules/is-negative')}`) }) test('parseable list in workspace with private package', async () => { @@ -295,6 +298,7 @@ test('JSON list in workspace with private package', async () => { from: 'is-positive', version: '1.0.0', resolved: 'https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz', + path: path.join(workspaceWithPrivatePkgs, 'node_modules/.pnpm/is-positive@1.0.0/node_modules/is-positive'), }, }, }, @@ -308,6 +312,7 @@ test('JSON list in workspace with private package', async () => { from: 'is-positive', version: '1.0.0', resolved: 'https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz', + path: path.join(workspaceWithPrivatePkgs, 'node_modules/.pnpm/is-positive@1.0.0/node_modules/is-positive'), }, }, }, @@ -340,6 +345,7 @@ test('JSON list with depth 1', async () => { version: '2.3.0', resolved: 'https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/write-json-file@2.3.0/node_modules/write-json-file'), dependencies: { 'detect-indent': { @@ -347,36 +353,42 @@ test('JSON list with depth 1', async () => { version: '5.0.0', resolved: 'https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent'), }, 'graceful-fs': { from: 'graceful-fs', version: '4.2.2', resolved: 'https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz', + path: path.join(fixture, 'node_modules/.pnpm/graceful-fs@4.2.2/node_modules/graceful-fs'), }, 'make-dir': { from: 'make-dir', version: '1.3.0', resolved: 'https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir'), }, pify: { from: 'pify', version: '3.0.0', resolved: 'https://registry.npmjs.org/pify/-/pify-3.0.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/pify@3.0.0/node_modules/pify'), }, 'sort-keys': { from: 'sort-keys', version: '2.0.0', resolved: 'https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/sort-keys@2.0.0/node_modules/sort-keys'), }, 'write-file-atomic': { from: 'write-file-atomic', version: '2.4.3', resolved: 'https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz', + path: path.join(fixture, 'node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic'), }, }, }, @@ -387,6 +399,7 @@ test('JSON list with depth 1', async () => { version: '3.1.0', resolved: 'https://registry.npmjs.org/is-positive/-/is-positive-3.1.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/is-positive@3.1.0/node_modules/is-positive'), }, }, optionalDependencies: { @@ -395,6 +408,7 @@ test('JSON list with depth 1', async () => { version: '2.1.0', resolved: 'https://registry.npmjs.org/is-negative/-/is-negative-2.1.0.tgz', + path: path.join(fixture, 'node_modules/.pnpm/is-negative@2.1.0/node_modules/is-negative'), }, }, }], null, 2)) @@ -415,6 +429,7 @@ test('JSON list with aliased dep', async () => { from: 'is-positive', version: '1.0.0', resolved: 'https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz', + path: path.join(fixtureWithAliasedDep, 'node_modules/.pnpm/is-positive@1.0.0/node_modules/is-positive'), }, }, }, @@ -444,6 +459,7 @@ test('JSON list with aliased dep', async () => { }, homepage: 'https://github.com/kevva/is-positive#readme', repository: 'git+https://github.com/kevva/is-positive.git', + path: path.join(fixtureWithAliasedDep, 'node_modules/.pnpm/is-positive@1.0.0/node_modules/is-positive'), }, }, }], null, 2) From 972de58abf32cb7ccaa28bca8e7aca70a18e89a1 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 20 Feb 2023 11:39:58 +0200 Subject: [PATCH 4/5] fix: update the lockfile if a new project is added to the workspace with no deps (#6110) --- .changeset/hot-trainers-type.md | 7 ++ .changeset/silly-snails-try.md | 5 ++ pkg-manager/core/src/install/index.ts | 2 + pkg-manager/core/test/lockfile.ts | 98 +++++++++++++++++++++++++++ pkg-manager/headless/src/index.ts | 15 +++- 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 .changeset/hot-trainers-type.md create mode 100644 .changeset/silly-snails-try.md diff --git a/.changeset/hot-trainers-type.md b/.changeset/hot-trainers-type.md new file mode 100644 index 0000000000..9c27d3a523 --- /dev/null +++ b/.changeset/hot-trainers-type.md @@ -0,0 +1,7 @@ +--- +"@pnpm/headless": patch +"@pnpm/core": patch +"pnpm": patch +--- + +Update the lockfile if a workspace has a new project with no dependencies. diff --git a/.changeset/silly-snails-try.md b/.changeset/silly-snails-try.md new file mode 100644 index 0000000000..a49fcc5174 --- /dev/null +++ b/.changeset/silly-snails-try.md @@ -0,0 +1,5 @@ +--- +"@pnpm/headless": minor +--- + +New option added: useLockfile. diff --git a/pkg-manager/core/src/install/index.ts b/pkg-manager/core/src/install/index.ts index f6fc3efc86..41c2068e11 100644 --- a/pkg-manager/core/src/install/index.ts +++ b/pkg-manager/core/src/install/index.ts @@ -335,6 +335,8 @@ export async function mutateModules ( }) } if (opts.lockfileOnly) { + // The lockfile will only be changed if the workspace will have new projects with no dependencies. + await writeWantedLockfile(ctx.lockfileDir, ctx.wantedLockfile) return projects.map((mutatedProject) => ctx.projects[mutatedProject.rootDir]) } if (!ctx.existsWantedLockfile) { diff --git a/pkg-manager/core/test/lockfile.ts b/pkg-manager/core/test/lockfile.ts index 1c53123c50..d7e49b4b73 100644 --- a/pkg-manager/core/test/lockfile.ts +++ b/pkg-manager/core/test/lockfile.ts @@ -14,6 +14,8 @@ import { install, mutateModules, mutateModulesInSingleProject, + MutatedProject, + ProjectOptions, } from '@pnpm/core' import rimraf from '@zkochan/rimraf' import loadJsonFile from 'load-json-file' @@ -1423,3 +1425,99 @@ test('lockfile v5 is converted to lockfile v6', async () => { expect(lockfile.packages).toHaveProperty(['/@pnpm.e2e/pkg-with-1-dep@100.0.0']) } }) + +test('update the lockfile when a new project is added to the workspace', async () => { + preparePackages([ + { + location: 'project-1', + package: { name: 'project-1' }, + }, + ]) + + const importers: MutatedProject[] = [ + { + mutation: 'install', + rootDir: path.resolve('project-1'), + }, + ] + const allProjects: ProjectOptions[] = [ + { + buildIndex: 0, + manifest: { + name: 'project-1', + version: '1.0.0', + + dependencies: { + 'is-positive': '1.0.0', + }, + }, + rootDir: path.resolve('project-1'), + }, + ] + await mutateModules(importers, await testDefaults({ allProjects })) + + importers.push({ + mutation: 'install', + rootDir: path.resolve('project-2'), + }) + allProjects.push({ + buildIndex: 0, + manifest: { + name: 'project-2', + version: '1.0.0', + }, + rootDir: path.resolve('project-2'), + }) + await mutateModules(importers, await testDefaults({ allProjects })) + + const lockfile: Lockfile = await readYamlFile(WANTED_LOCKFILE) + expect(Object.keys(lockfile.importers)).toStrictEqual(['project-1', 'project-2']) +}) + +test('update the lockfile when a new project is added to the workspace and lockfile-only installation is used', async () => { + preparePackages([ + { + location: 'project-1', + package: { name: 'project-1' }, + }, + ]) + + const importers: MutatedProject[] = [ + { + mutation: 'install', + rootDir: path.resolve('project-1'), + }, + ] + const allProjects: ProjectOptions[] = [ + { + buildIndex: 0, + manifest: { + name: 'project-1', + version: '1.0.0', + + dependencies: { + 'is-positive': '1.0.0', + }, + }, + rootDir: path.resolve('project-1'), + }, + ] + await mutateModules(importers, await testDefaults({ allProjects, lockfileOnly: true })) + + importers.push({ + mutation: 'install', + rootDir: path.resolve('project-2'), + }) + allProjects.push({ + buildIndex: 0, + manifest: { + name: 'project-2', + version: '1.0.0', + }, + rootDir: path.resolve('project-2'), + }) + await mutateModules(importers, await testDefaults({ allProjects, lockfileOnly: true })) + + const lockfile: Lockfile = await readYamlFile(WANTED_LOCKFILE) + expect(Object.keys(lockfile.importers)).toStrictEqual(['project-1', 'project-2']) +}) diff --git a/pkg-manager/headless/src/index.ts b/pkg-manager/headless/src/index.ts index a08b5c16c1..67b101438e 100644 --- a/pkg-manager/headless/src/index.ts +++ b/pkg-manager/headless/src/index.ts @@ -28,6 +28,7 @@ import { Lockfile, readCurrentLockfile, readWantedLockfile, + writeLockfiles, writeCurrentLockfile, PatchFile, } from '@pnpm/lockfile-file' @@ -152,6 +153,7 @@ export interface HeadlessOptions { enableModulesDir?: boolean nodeLinker?: 'isolated' | 'hoisted' | 'pnp' useGitBranchLockfile?: boolean + useLockfile?: boolean } export async function headlessInstall (opts: HeadlessOptions) { @@ -543,7 +545,18 @@ export async function headlessInstall (opts: HeadlessOptions) { storeDir: opts.storeDir, virtualStoreDir, }) - await writeCurrentLockfile(virtualStoreDir, filteredLockfile) + if (opts.useLockfile) { + // We need to write the wanted lockfile as well. + // Even though it will only be changed if the workspace will have new projects with no dependencies. + await writeLockfiles({ + wantedLockfileDir: opts.lockfileDir, + currentLockfileDir: virtualStoreDir, + wantedLockfile, + currentLockfile: filteredLockfile, + }) + } else { + await writeCurrentLockfile(virtualStoreDir, filteredLockfile) + } } // waiting till package requests are finished From 98d15f03d3255febc6dd773e2478c7dda57fc24d Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 20 Feb 2023 22:36:58 +0200 Subject: [PATCH 5/5] chore(release): 7.28.0-0 --- .changeset/gold-chicken-sit.md | 9 --------- .changeset/hot-trainers-type.md | 7 ------- .changeset/lazy-brooms-search.md | 6 ------ .changeset/little-donuts-suffer.md | 6 ------ .changeset/silly-snails-try.md | 5 ----- cli/cli-utils/CHANGELOG.md | 11 +++++++++++ cli/cli-utils/package.json | 2 +- cli/default-reporter/CHANGELOG.md | 6 ++++++ cli/default-reporter/package.json | 2 +- config/config/CHANGELOG.md | 6 ++++++ config/config/package.json | 2 +- config/plugin-commands-config/CHANGELOG.md | 8 ++++++++ config/plugin-commands-config/package.json | 2 +- env/plugin-commands-env/CHANGELOG.md | 8 ++++++++ env/plugin-commands-env/package.json | 2 +- exec/plugin-commands-rebuild/CHANGELOG.md | 14 ++++++++++++++ exec/plugin-commands-rebuild/package.json | 2 +- .../CHANGELOG.md | 13 +++++++++++++ .../package.json | 2 +- hooks/pnpmfile/CHANGELOG.md | 7 +++++++ hooks/pnpmfile/package.json | 2 +- lockfile/audit/CHANGELOG.md | 7 +++++++ lockfile/audit/package.json | 2 +- lockfile/plugin-commands-audit/CHANGELOG.md | 9 +++++++++ lockfile/plugin-commands-audit/package.json | 2 +- packages/mount-modules/CHANGELOG.md | 6 ++++++ packages/mount-modules/package.json | 2 +- packages/plugin-commands-doctor/CHANGELOG.md | 8 ++++++++ packages/plugin-commands-doctor/package.json | 2 +- packages/plugin-commands-init/CHANGELOG.md | 8 ++++++++ packages/plugin-commands-init/package.json | 2 +- packages/plugin-commands-setup/CHANGELOG.md | 7 +++++++ packages/plugin-commands-setup/package.json | 2 +- .../plugin-commands-patching/CHANGELOG.md | 10 ++++++++++ .../plugin-commands-patching/package.json | 2 +- pkg-manager/core/CHANGELOG.md | 11 +++++++++++ pkg-manager/core/package.json | 2 +- pkg-manager/headless/CHANGELOG.md | 10 ++++++++++ pkg-manager/headless/package.json | 2 +- .../plugin-commands-installation/CHANGELOG.md | 19 +++++++++++++++++++ .../plugin-commands-installation/package.json | 2 +- pkg-manager/resolve-dependencies/CHANGELOG.md | 6 ++++++ pkg-manager/resolve-dependencies/package.json | 2 +- pnpm/CHANGELOG.md | 12 ++++++++++++ pnpm/artifacts/exe/package.json | 2 +- pnpm/artifacts/linux-arm64/package.json | 2 +- pnpm/artifacts/linux-x64/package.json | 2 +- pnpm/artifacts/macos-arm64/package.json | 2 +- pnpm/artifacts/macos-x64/package.json | 2 +- pnpm/artifacts/win-x64/package.json | 2 +- pnpm/package.json | 2 +- releasing/plugin-commands-deploy/CHANGELOG.md | 8 ++++++++ releasing/plugin-commands-deploy/package.json | 2 +- .../plugin-commands-publishing/CHANGELOG.md | 8 ++++++++ .../plugin-commands-publishing/package.json | 2 +- reviewing/list/CHANGELOG.md | 6 ++++++ reviewing/list/package.json | 2 +- .../plugin-commands-licenses/CHANGELOG.md | 8 ++++++++ .../plugin-commands-licenses/package.json | 2 +- .../plugin-commands-listing/CHANGELOG.md | 10 ++++++++++ .../plugin-commands-listing/package.json | 2 +- .../plugin-commands-outdated/CHANGELOG.md | 8 ++++++++ .../plugin-commands-outdated/package.json | 2 +- store/plugin-commands-server/CHANGELOG.md | 9 +++++++++ store/plugin-commands-server/package.json | 2 +- store/plugin-commands-store/CHANGELOG.md | 9 +++++++++ store/plugin-commands-store/package.json | 2 +- store/store-connection-manager/CHANGELOG.md | 6 ++++++ store/store-connection-manager/package.json | 2 +- .../filter-workspace-packages/CHANGELOG.md | 6 ++++++ .../filter-workspace-packages/package.json | 2 +- .../find-workspace-packages/CHANGELOG.md | 7 +++++++ .../find-workspace-packages/package.json | 2 +- 73 files changed, 308 insertions(+), 70 deletions(-) delete mode 100644 .changeset/gold-chicken-sit.md delete mode 100644 .changeset/hot-trainers-type.md delete mode 100644 .changeset/lazy-brooms-search.md delete mode 100644 .changeset/little-donuts-suffer.md delete mode 100644 .changeset/silly-snails-try.md diff --git a/.changeset/gold-chicken-sit.md b/.changeset/gold-chicken-sit.md deleted file mode 100644 index ca5175ea01..0000000000 --- a/.changeset/gold-chicken-sit.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@pnpm/plugin-commands-installation": minor -"@pnpm/plugin-commands-script-runners": minor -"@pnpm/plugin-commands-rebuild": minor -"@pnpm/cli-utils": minor -"pnpm": minor ---- - -Add --report-summary for pnpm exec and pnpm run [#6008](https://github.com/pnpm/pnpm/issues/6008) diff --git a/.changeset/hot-trainers-type.md b/.changeset/hot-trainers-type.md deleted file mode 100644 index 9c27d3a523..0000000000 --- a/.changeset/hot-trainers-type.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@pnpm/headless": patch -"@pnpm/core": patch -"pnpm": patch ---- - -Update the lockfile if a workspace has a new project with no dependencies. diff --git a/.changeset/lazy-brooms-search.md b/.changeset/lazy-brooms-search.md deleted file mode 100644 index 32ea8475dd..0000000000 --- a/.changeset/lazy-brooms-search.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@pnpm/resolve-dependencies": patch -pnpm: patch ---- - -Fix a case of installs not being deterministic and causing lockfile changes between repeat installs. When a dependency only declares `peerDependenciesMeta` and not `peerDependencies`, `dependencies`, or `optionalDependencies`, the dependency's peers were not considered deterministically before. diff --git a/.changeset/little-donuts-suffer.md b/.changeset/little-donuts-suffer.md deleted file mode 100644 index 4370e1ad2e..0000000000 --- a/.changeset/little-donuts-suffer.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@pnpm/list": minor -"pnpm": minor ---- - -Show path info for `pnpm why --json` or `--long` [#6103](https://github.com/pnpm/pnpm/issues/6103). diff --git a/.changeset/silly-snails-try.md b/.changeset/silly-snails-try.md deleted file mode 100644 index a49fcc5174..0000000000 --- a/.changeset/silly-snails-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@pnpm/headless": minor ---- - -New option added: useLockfile. diff --git a/cli/cli-utils/CHANGELOG.md b/cli/cli-utils/CHANGELOG.md index 2202f826cf..abb521d989 100644 --- a/cli/cli-utils/CHANGELOG.md +++ b/cli/cli-utils/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/cli-utils +## 1.1.0 + +### Minor Changes + +- 0377d9367: Add --report-summary for pnpm exec and pnpm run [#6008](https://github.com/pnpm/pnpm/issues/6008) + +### Patch Changes + +- @pnpm/config@16.6.3 +- @pnpm/default-reporter@11.0.35 + ## 1.0.34 ### Patch Changes diff --git a/cli/cli-utils/package.json b/cli/cli-utils/package.json index ddba017575..adc7077ca8 100644 --- a/cli/cli-utils/package.json +++ b/cli/cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/cli-utils", - "version": "1.0.34", + "version": "1.1.0", "description": "Utils for pnpm commands", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/cli/default-reporter/CHANGELOG.md b/cli/default-reporter/CHANGELOG.md index eeea0f3f67..0d2780d483 100644 --- a/cli/default-reporter/CHANGELOG.md +++ b/cli/default-reporter/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/default-reporter +## 11.0.35 + +### Patch Changes + +- @pnpm/config@16.6.3 + ## 11.0.34 ### Patch Changes diff --git a/cli/default-reporter/package.json b/cli/default-reporter/package.json index 7f4d72364e..5137e72426 100644 --- a/cli/default-reporter/package.json +++ b/cli/default-reporter/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/default-reporter", - "version": "11.0.34", + "version": "11.0.35", "description": "The default reporter of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/config/config/CHANGELOG.md b/config/config/CHANGELOG.md index e8a7d3c859..32b2251ceb 100644 --- a/config/config/CHANGELOG.md +++ b/config/config/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/config +## 16.6.3 + +### Patch Changes + +- @pnpm/pnpmfile@4.0.33 + ## 16.6.2 ### Patch Changes diff --git a/config/config/package.json b/config/config/package.json index 3c6fc0abbc..fa569b99a1 100644 --- a/config/config/package.json +++ b/config/config/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/config", - "version": "16.6.2", + "version": "16.6.3", "description": "Gets configuration options for pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/config/plugin-commands-config/CHANGELOG.md b/config/plugin-commands-config/CHANGELOG.md index ed1c20b813..2a882e9227 100644 --- a/config/plugin-commands-config/CHANGELOG.md +++ b/config/plugin-commands-config/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-config +## 1.0.17 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 1.0.16 ### Patch Changes diff --git a/config/plugin-commands-config/package.json b/config/plugin-commands-config/package.json index fc5608d1ed..3b2d2e62f2 100644 --- a/config/plugin-commands-config/package.json +++ b/config/plugin-commands-config/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-config", - "version": "1.0.16", + "version": "1.0.17", "description": "Commands for reading and writing settings to/from config files", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/env/plugin-commands-env/CHANGELOG.md b/env/plugin-commands-env/CHANGELOG.md index fbf64ceeff..d29a0d1396 100644 --- a/env/plugin-commands-env/CHANGELOG.md +++ b/env/plugin-commands-env/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-env +## 3.1.29 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 3.1.28 ### Patch Changes diff --git a/env/plugin-commands-env/package.json b/env/plugin-commands-env/package.json index ff11121022..ceb0da7e55 100644 --- a/env/plugin-commands-env/package.json +++ b/env/plugin-commands-env/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-env", - "version": "3.1.28", + "version": "3.1.29", "description": "pnpm commands for managing Node.js", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/exec/plugin-commands-rebuild/CHANGELOG.md b/exec/plugin-commands-rebuild/CHANGELOG.md index 34d96de926..f8ae582973 100644 --- a/exec/plugin-commands-rebuild/CHANGELOG.md +++ b/exec/plugin-commands-rebuild/CHANGELOG.md @@ -1,5 +1,19 @@ # @pnpm/plugin-commands-rebuild +## 7.1.0 + +### Minor Changes + +- 0377d9367: Add --report-summary for pnpm exec and pnpm run [#6008](https://github.com/pnpm/pnpm/issues/6008) + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/find-workspace-packages@5.0.35 + - @pnpm/config@16.6.3 + - @pnpm/store-connection-manager@5.2.13 + ## 7.0.34 ### Patch Changes diff --git a/exec/plugin-commands-rebuild/package.json b/exec/plugin-commands-rebuild/package.json index 8c64e66c8c..b6a3b154c3 100644 --- a/exec/plugin-commands-rebuild/package.json +++ b/exec/plugin-commands-rebuild/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-rebuild", - "version": "7.0.34", + "version": "7.1.0", "description": "Commands for rebuilding dependencies", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/exec/plugin-commands-script-runners/CHANGELOG.md b/exec/plugin-commands-script-runners/CHANGELOG.md index e5850429e2..5daee8a59b 100644 --- a/exec/plugin-commands-script-runners/CHANGELOG.md +++ b/exec/plugin-commands-script-runners/CHANGELOG.md @@ -1,5 +1,18 @@ # @pnpm/plugin-commands-script-runners +## 6.5.0 + +### Minor Changes + +- 0377d9367: Add --report-summary for pnpm exec and pnpm run [#6008](https://github.com/pnpm/pnpm/issues/6008) + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/plugin-commands-installation@11.5.0 + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 6.4.2 ### Patch Changes diff --git a/exec/plugin-commands-script-runners/package.json b/exec/plugin-commands-script-runners/package.json index e589e53004..c8b5cc3047 100644 --- a/exec/plugin-commands-script-runners/package.json +++ b/exec/plugin-commands-script-runners/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-script-runners", - "version": "6.4.2", + "version": "6.5.0", "description": "Commands for running scripts", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/hooks/pnpmfile/CHANGELOG.md b/hooks/pnpmfile/CHANGELOG.md index d85b14856f..2df26f16d1 100644 --- a/hooks/pnpmfile/CHANGELOG.md +++ b/hooks/pnpmfile/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/pnpmfile +## 4.0.33 + +### Patch Changes + +- Updated dependencies [972de58ab] + - @pnpm/core@7.8.3 + ## 4.0.32 ### Patch Changes diff --git a/hooks/pnpmfile/package.json b/hooks/pnpmfile/package.json index bf1d617aca..d6e4417de1 100644 --- a/hooks/pnpmfile/package.json +++ b/hooks/pnpmfile/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/pnpmfile", - "version": "4.0.32", + "version": "4.0.33", "description": "Reading a .pnpmfile.cjs", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/lockfile/audit/CHANGELOG.md b/lockfile/audit/CHANGELOG.md index 17d2a2f4f4..af9bcf7604 100644 --- a/lockfile/audit/CHANGELOG.md +++ b/lockfile/audit/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/audit +## 6.1.6 + +### Patch Changes + +- Updated dependencies [b9ab2e0bf] + - @pnpm/list@8.2.0 + ## 6.1.5 ### Patch Changes diff --git a/lockfile/audit/package.json b/lockfile/audit/package.json index 046f5df836..8ec1d4778d 100644 --- a/lockfile/audit/package.json +++ b/lockfile/audit/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/audit", - "version": "6.1.5", + "version": "6.1.6", "description": "Audit a lockfile", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/lockfile/plugin-commands-audit/CHANGELOG.md b/lockfile/plugin-commands-audit/CHANGELOG.md index 18ceca3307..eb7afc1fe8 100644 --- a/lockfile/plugin-commands-audit/CHANGELOG.md +++ b/lockfile/plugin-commands-audit/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-audit +## 7.2.8 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/audit@6.1.6 + - @pnpm/config@16.6.3 + ## 7.2.7 ### Patch Changes diff --git a/lockfile/plugin-commands-audit/package.json b/lockfile/plugin-commands-audit/package.json index 530ed463c4..ac380dbab2 100644 --- a/lockfile/plugin-commands-audit/package.json +++ b/lockfile/plugin-commands-audit/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-audit", - "version": "7.2.7", + "version": "7.2.8", "description": "pnpm commands for dependencies audit", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/mount-modules/CHANGELOG.md b/packages/mount-modules/CHANGELOG.md index 6fca290770..10119a8c65 100644 --- a/packages/mount-modules/CHANGELOG.md +++ b/packages/mount-modules/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/mount-modules +## 0.3.35 + +### Patch Changes + +- @pnpm/config@16.6.3 + ## 0.3.34 ### Patch Changes diff --git a/packages/mount-modules/package.json b/packages/mount-modules/package.json index 51e61c88df..0dbdf43c94 100644 --- a/packages/mount-modules/package.json +++ b/packages/mount-modules/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/mount-modules", - "version": "0.3.34", + "version": "0.3.35", "description": "Mounts a node_modules directory with FUSE", "main": "lib/index.js", "bin": "bin/mount-modules.js", diff --git a/packages/plugin-commands-doctor/CHANGELOG.md b/packages/plugin-commands-doctor/CHANGELOG.md index dc926f224c..078dc847ea 100644 --- a/packages/plugin-commands-doctor/CHANGELOG.md +++ b/packages/plugin-commands-doctor/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-doctor +## 1.0.33 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 1.0.32 ### Patch Changes diff --git a/packages/plugin-commands-doctor/package.json b/packages/plugin-commands-doctor/package.json index 48fd6a6cc7..cba5f2b8d3 100644 --- a/packages/plugin-commands-doctor/package.json +++ b/packages/plugin-commands-doctor/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-doctor", - "version": "1.0.32", + "version": "1.0.33", "description": "Commands for checks of known common issues ", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/plugin-commands-init/CHANGELOG.md b/packages/plugin-commands-init/CHANGELOG.md index 9864107454..6cb9337ac3 100644 --- a/packages/plugin-commands-init/CHANGELOG.md +++ b/packages/plugin-commands-init/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-init +## 2.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 2.0.34 ### Patch Changes diff --git a/packages/plugin-commands-init/package.json b/packages/plugin-commands-init/package.json index 4fae28e761..e3bd9511f5 100644 --- a/packages/plugin-commands-init/package.json +++ b/packages/plugin-commands-init/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-init", - "version": "2.0.34", + "version": "2.0.35", "description": "Create a package.json file", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/plugin-commands-setup/CHANGELOG.md b/packages/plugin-commands-setup/CHANGELOG.md index eba368bffa..2ea426689b 100644 --- a/packages/plugin-commands-setup/CHANGELOG.md +++ b/packages/plugin-commands-setup/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/plugin-commands-setup +## 3.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + ## 3.0.34 ### Patch Changes diff --git a/packages/plugin-commands-setup/package.json b/packages/plugin-commands-setup/package.json index a149f60369..e1b2afc141 100644 --- a/packages/plugin-commands-setup/package.json +++ b/packages/plugin-commands-setup/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-setup", - "version": "3.0.34", + "version": "3.0.35", "description": "pnpm commands for setting up pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/patching/plugin-commands-patching/CHANGELOG.md b/patching/plugin-commands-patching/CHANGELOG.md index 9b1d14b758..c6fcd57b22 100644 --- a/patching/plugin-commands-patching/CHANGELOG.md +++ b/patching/plugin-commands-patching/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-patching +## 2.1.9 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/plugin-commands-installation@11.5.0 + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + - @pnpm/store-connection-manager@5.2.13 + ## 2.1.8 ### Patch Changes diff --git a/patching/plugin-commands-patching/package.json b/patching/plugin-commands-patching/package.json index ce877216a0..de97cc9158 100644 --- a/patching/plugin-commands-patching/package.json +++ b/patching/plugin-commands-patching/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-patching", - "version": "2.1.8", + "version": "2.1.9", "description": "Commands for creating patches", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/core/CHANGELOG.md b/pkg-manager/core/CHANGELOG.md index e326bbf98c..cb8b5d4047 100644 --- a/pkg-manager/core/CHANGELOG.md +++ b/pkg-manager/core/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/core +## 7.8.3 + +### Patch Changes + +- 972de58ab: Update the lockfile if a workspace has a new project with no dependencies. +- Updated dependencies [972de58ab] +- Updated dependencies [1b2e09ccf] +- Updated dependencies [972de58ab] + - @pnpm/headless@19.5.0 + - @pnpm/resolve-dependencies@29.3.2 + ## 7.8.2 ### Patch Changes diff --git a/pkg-manager/core/package.json b/pkg-manager/core/package.json index 3768a784d0..faa291fc13 100644 --- a/pkg-manager/core/package.json +++ b/pkg-manager/core/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/core", "description": "Fast, disk space efficient installation engine", - "version": "7.8.2", + "version": "7.8.3", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/pkg-manager/headless/CHANGELOG.md b/pkg-manager/headless/CHANGELOG.md index 756f6fcbae..c5f4b08530 100644 --- a/pkg-manager/headless/CHANGELOG.md +++ b/pkg-manager/headless/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/headless +## 19.5.0 + +### Minor Changes + +- 972de58ab: New option added: useLockfile. + +### Patch Changes + +- 972de58ab: Update the lockfile if a workspace has a new project with no dependencies. + ## 19.4.12 ### Patch Changes diff --git a/pkg-manager/headless/package.json b/pkg-manager/headless/package.json index 4923a432da..6431b3111e 100644 --- a/pkg-manager/headless/package.json +++ b/pkg-manager/headless/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/headless", "description": "Fast installation using only pnpm-lock.yaml", - "version": "19.4.12", + "version": "19.5.0", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/pkg-manager/plugin-commands-installation/CHANGELOG.md b/pkg-manager/plugin-commands-installation/CHANGELOG.md index bc6734baf6..3998d2af6a 100644 --- a/pkg-manager/plugin-commands-installation/CHANGELOG.md +++ b/pkg-manager/plugin-commands-installation/CHANGELOG.md @@ -1,5 +1,24 @@ # @pnpm/plugin-commands-installation +## 11.5.0 + +### Minor Changes + +- 0377d9367: Add --report-summary for pnpm exec and pnpm run [#6008](https://github.com/pnpm/pnpm/issues/6008) + +### Patch Changes + +- Updated dependencies [0377d9367] +- Updated dependencies [972de58ab] + - @pnpm/plugin-commands-rebuild@7.1.0 + - @pnpm/cli-utils@1.1.0 + - @pnpm/core@7.8.3 + - @pnpm/find-workspace-packages@5.0.35 + - @pnpm/pnpmfile@4.0.33 + - @pnpm/filter-workspace-packages@6.0.35 + - @pnpm/config@16.6.3 + - @pnpm/store-connection-manager@5.2.13 + ## 11.4.6 ### Patch Changes diff --git a/pkg-manager/plugin-commands-installation/package.json b/pkg-manager/plugin-commands-installation/package.json index 03950745d8..a851d8b25f 100644 --- a/pkg-manager/plugin-commands-installation/package.json +++ b/pkg-manager/plugin-commands-installation/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-installation", - "version": "11.4.6", + "version": "11.5.0", "description": "Commands for installation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/resolve-dependencies/CHANGELOG.md b/pkg-manager/resolve-dependencies/CHANGELOG.md index fd0371f56e..243e5b5d0f 100644 --- a/pkg-manager/resolve-dependencies/CHANGELOG.md +++ b/pkg-manager/resolve-dependencies/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/resolve-dependencies +## 29.3.2 + +### Patch Changes + +- 1b2e09ccf: Fix a case of installs not being deterministic and causing lockfile changes between repeat installs. When a dependency only declares `peerDependenciesMeta` and not `peerDependencies`, `dependencies`, or `optionalDependencies`, the dependency's peers were not considered deterministically before. + ## 29.3.1 ### Patch Changes diff --git a/pkg-manager/resolve-dependencies/package.json b/pkg-manager/resolve-dependencies/package.json index eab16fa548..7dbfc3546e 100644 --- a/pkg-manager/resolve-dependencies/package.json +++ b/pkg-manager/resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/resolve-dependencies", - "version": "29.3.1", + "version": "29.3.2", "description": "Resolves dependency graph of a package", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pnpm/CHANGELOG.md b/pnpm/CHANGELOG.md index 843361b6d3..a7057f6b22 100644 --- a/pnpm/CHANGELOG.md +++ b/pnpm/CHANGELOG.md @@ -1,5 +1,17 @@ # pnpm +## 7.28.0-0 + +### Minor Changes + +- Add `--report-summary` for `pnpm exec` and `pnpm run` [#6008](https://github.com/pnpm/pnpm/issues/6008). +- Show path info for `pnpm why --json` or `--long` [#6103](https://github.com/pnpm/pnpm/issues/6103). + +### Patch Changes + +- Update the lockfile if a workspace has a new project with no dependencies. +- Fix a case of installs not being deterministic and causing lockfile changes between repeat installs. When a dependency only declares `peerDependenciesMeta` and not `peerDependencies`, `dependencies`, or `optionalDependencies`, the dependency's peers were not considered deterministically before. + ## 7.27.1 ### Patch Changes diff --git a/pnpm/artifacts/exe/package.json b/pnpm/artifacts/exe/package.json index 3c013e74a7..9a726202db 100644 --- a/pnpm/artifacts/exe/package.json +++ b/pnpm/artifacts/exe/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/exe", "description": "Fast, disk space efficient package manager", - "version": "7.27.1", + "version": "7.28.0-0", "publishConfig": { "bin": { "pnpm": "pnpm" diff --git a/pnpm/artifacts/linux-arm64/package.json b/pnpm/artifacts/linux-arm64/package.json index a83578058e..d334d7b124 100644 --- a/pnpm/artifacts/linux-arm64/package.json +++ b/pnpm/artifacts/linux-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/linux-arm64", - "version": "7.27.1", + "version": "7.28.0-0", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/linux-x64/package.json b/pnpm/artifacts/linux-x64/package.json index dc4676ab02..74775933f3 100644 --- a/pnpm/artifacts/linux-x64/package.json +++ b/pnpm/artifacts/linux-x64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/linux-x64", - "version": "7.27.1", + "version": "7.28.0-0", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/macos-arm64/package.json b/pnpm/artifacts/macos-arm64/package.json index de7aae68dd..868fb28874 100644 --- a/pnpm/artifacts/macos-arm64/package.json +++ b/pnpm/artifacts/macos-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/macos-arm64", - "version": "7.27.1", + "version": "7.28.0-0", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/macos-x64/package.json b/pnpm/artifacts/macos-x64/package.json index caabb4340d..8e8c86b7b0 100644 --- a/pnpm/artifacts/macos-x64/package.json +++ b/pnpm/artifacts/macos-x64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/macos-x64", - "version": "7.27.1", + "version": "7.28.0-0", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/win-x64/package.json b/pnpm/artifacts/win-x64/package.json index 8da514c575..64cdbf9ccc 100644 --- a/pnpm/artifacts/win-x64/package.json +++ b/pnpm/artifacts/win-x64/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/win-x64", - "version": "7.27.1", + "version": "7.28.0-0", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/package.json b/pnpm/package.json index 4f2c193632..2a8cd76c88 100644 --- a/pnpm/package.json +++ b/pnpm/package.json @@ -1,7 +1,7 @@ { "name": "pnpm", "description": "Fast, disk space efficient package manager", - "version": "7.27.1", + "version": "7.28.0-0", "bin": { "pnpm": "bin/pnpm.cjs", "pnpx": "bin/pnpx.cjs" diff --git a/releasing/plugin-commands-deploy/CHANGELOG.md b/releasing/plugin-commands-deploy/CHANGELOG.md index bb202a22bd..a41c651678 100644 --- a/releasing/plugin-commands-deploy/CHANGELOG.md +++ b/releasing/plugin-commands-deploy/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-deploy +## 2.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/plugin-commands-installation@11.5.0 + - @pnpm/cli-utils@1.1.0 + ## 2.0.34 ### Patch Changes diff --git a/releasing/plugin-commands-deploy/package.json b/releasing/plugin-commands-deploy/package.json index f4df6f4759..209e88a0eb 100644 --- a/releasing/plugin-commands-deploy/package.json +++ b/releasing/plugin-commands-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-deploy", - "version": "2.0.34", + "version": "2.0.35", "description": "Commands for deploy", "funding": "https://opencollective.com/pnpm", "main": "lib/index.js", diff --git a/releasing/plugin-commands-publishing/CHANGELOG.md b/releasing/plugin-commands-publishing/CHANGELOG.md index 43a02af806..e949cfffba 100644 --- a/releasing/plugin-commands-publishing/CHANGELOG.md +++ b/releasing/plugin-commands-publishing/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-publishing +## 6.1.15 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 6.1.14 ### Patch Changes diff --git a/releasing/plugin-commands-publishing/package.json b/releasing/plugin-commands-publishing/package.json index 44d1056a52..9d6890fd0a 100644 --- a/releasing/plugin-commands-publishing/package.json +++ b/releasing/plugin-commands-publishing/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-publishing", - "version": "6.1.14", + "version": "6.1.15", "description": "The pack and publish commands of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/list/CHANGELOG.md b/reviewing/list/CHANGELOG.md index 4acc8fe745..3e2d51ec23 100644 --- a/reviewing/list/CHANGELOG.md +++ b/reviewing/list/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/list +## 8.2.0 + +### Minor Changes + +- b9ab2e0bf: Show path info for `pnpm why --json` or `--long` [#6103](https://github.com/pnpm/pnpm/issues/6103). + ## 8.1.3 ### Patch Changes diff --git a/reviewing/list/package.json b/reviewing/list/package.json index 26d4ba3467..4a2ba8a319 100644 --- a/reviewing/list/package.json +++ b/reviewing/list/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/list", - "version": "8.1.3", + "version": "8.2.0", "description": "List installed packages in a symlinked `node_modules`", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/plugin-commands-licenses/CHANGELOG.md b/reviewing/plugin-commands-licenses/CHANGELOG.md index de89b79677..5894b88308 100644 --- a/reviewing/plugin-commands-licenses/CHANGELOG.md +++ b/reviewing/plugin-commands-licenses/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-licenses +## 1.0.26 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 1.0.25 ### Patch Changes diff --git a/reviewing/plugin-commands-licenses/package.json b/reviewing/plugin-commands-licenses/package.json index 4a09a1925a..4772d5aeab 100644 --- a/reviewing/plugin-commands-licenses/package.json +++ b/reviewing/plugin-commands-licenses/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-licenses", - "version": "1.0.25", + "version": "1.0.26", "description": "The licenses command of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/plugin-commands-listing/CHANGELOG.md b/reviewing/plugin-commands-listing/CHANGELOG.md index 6f721ba246..efe6498017 100644 --- a/reviewing/plugin-commands-listing/CHANGELOG.md +++ b/reviewing/plugin-commands-listing/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-listing +## 6.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] +- Updated dependencies [b9ab2e0bf] + - @pnpm/cli-utils@1.1.0 + - @pnpm/list@8.2.0 + - @pnpm/config@16.6.3 + ## 6.0.34 ### Patch Changes diff --git a/reviewing/plugin-commands-listing/package.json b/reviewing/plugin-commands-listing/package.json index e1a2493bea..9c5baa5483 100644 --- a/reviewing/plugin-commands-listing/package.json +++ b/reviewing/plugin-commands-listing/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-listing", - "version": "6.0.34", + "version": "6.0.35", "description": "The list and why commands of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/plugin-commands-outdated/CHANGELOG.md b/reviewing/plugin-commands-outdated/CHANGELOG.md index c69df700ab..3ee3a5dbc0 100644 --- a/reviewing/plugin-commands-outdated/CHANGELOG.md +++ b/reviewing/plugin-commands-outdated/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/plugin-commands-outdated +## 8.0.30 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + ## 8.0.29 ### Patch Changes diff --git a/reviewing/plugin-commands-outdated/package.json b/reviewing/plugin-commands-outdated/package.json index 2eef49ad44..7f92400394 100644 --- a/reviewing/plugin-commands-outdated/package.json +++ b/reviewing/plugin-commands-outdated/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-outdated", - "version": "8.0.29", + "version": "8.0.30", "description": "The outdated command of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/store/plugin-commands-server/CHANGELOG.md b/store/plugin-commands-server/CHANGELOG.md index 07c4e29aec..8f82ecbbe7 100644 --- a/store/plugin-commands-server/CHANGELOG.md +++ b/store/plugin-commands-server/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-server +## 5.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + - @pnpm/store-connection-manager@5.2.13 + ## 5.0.34 ### Patch Changes diff --git a/store/plugin-commands-server/package.json b/store/plugin-commands-server/package.json index d1d03fda29..b4445770a8 100644 --- a/store/plugin-commands-server/package.json +++ b/store/plugin-commands-server/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-server", - "version": "5.0.34", + "version": "5.0.35", "description": "Commands for controlling the store server", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/store/plugin-commands-store/CHANGELOG.md b/store/plugin-commands-store/CHANGELOG.md index 297261ad6e..b190c5cc98 100644 --- a/store/plugin-commands-store/CHANGELOG.md +++ b/store/plugin-commands-store/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/plugin-commands-store +## 6.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + - @pnpm/config@16.6.3 + - @pnpm/store-connection-manager@5.2.13 + ## 6.0.34 ### Patch Changes diff --git a/store/plugin-commands-store/package.json b/store/plugin-commands-store/package.json index 30c00129d9..3acd93a70b 100644 --- a/store/plugin-commands-store/package.json +++ b/store/plugin-commands-store/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/plugin-commands-store", - "version": "6.0.34", + "version": "6.0.35", "description": "Commands for controlling the store", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/store/store-connection-manager/CHANGELOG.md b/store/store-connection-manager/CHANGELOG.md index bc84726edd..3971577424 100644 --- a/store/store-connection-manager/CHANGELOG.md +++ b/store/store-connection-manager/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/store-connection-manager +## 5.2.13 + +### Patch Changes + +- @pnpm/config@16.6.3 + ## 5.2.12 ### Patch Changes diff --git a/store/store-connection-manager/package.json b/store/store-connection-manager/package.json index db135f8968..a47c0e115f 100644 --- a/store/store-connection-manager/package.json +++ b/store/store-connection-manager/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/store-connection-manager", - "version": "5.2.12", + "version": "5.2.13", "description": "Create a direct pnpm store controller or connect to a running store server", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/workspace/filter-workspace-packages/CHANGELOG.md b/workspace/filter-workspace-packages/CHANGELOG.md index 4b4fa98a39..6c6e585cce 100644 --- a/workspace/filter-workspace-packages/CHANGELOG.md +++ b/workspace/filter-workspace-packages/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/filter-workspace-packages +## 6.0.35 + +### Patch Changes + +- @pnpm/find-workspace-packages@5.0.35 + ## 6.0.34 ### Patch Changes diff --git a/workspace/filter-workspace-packages/package.json b/workspace/filter-workspace-packages/package.json index d7c99f224b..d3efd6d02c 100644 --- a/workspace/filter-workspace-packages/package.json +++ b/workspace/filter-workspace-packages/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/filter-workspace-packages", - "version": "6.0.34", + "version": "6.0.35", "description": "Filters packages in a workspace", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/workspace/find-workspace-packages/CHANGELOG.md b/workspace/find-workspace-packages/CHANGELOG.md index 64f10584df..a37c69576c 100644 --- a/workspace/find-workspace-packages/CHANGELOG.md +++ b/workspace/find-workspace-packages/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/find-workspace-packages +## 5.0.35 + +### Patch Changes + +- Updated dependencies [0377d9367] + - @pnpm/cli-utils@1.1.0 + ## 5.0.34 ### Patch Changes diff --git a/workspace/find-workspace-packages/package.json b/workspace/find-workspace-packages/package.json index 94ddaca402..e8059f1310 100644 --- a/workspace/find-workspace-packages/package.json +++ b/workspace/find-workspace-packages/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/find-workspace-packages", - "version": "5.0.34", + "version": "5.0.35", "description": "Finds packages inside a workspace", "main": "lib/index.js", "types": "lib/index.d.ts",