From 3ef3f132654d1b8d92dc25cb09c4bcdc480fa122 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 6 Mar 2023 03:25:49 +0200 Subject: [PATCH 01/12] ci: use corepack --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1be54f836..cd9344035a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,16 +28,16 @@ jobs: gcc -I. -c -o lookup2.o lookup2.c g++ -std=c++11 -o ldid lookup2.o ldid.cpp -I. -lcrypto -lplist -lxml2 sudo mv ldid /usr/local/bin - - name: install pnpm and npm + - name: install pnpm run: | - curl -L https://get.pnpm.io/v6.16.js | node - add --global pnpm@next-7 npm@7 + corepack enable + corepack prepare pnpm@next-7 --activate - name: pnpm install run: pnpm install - name: Publish Packages env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + "npm_config_//registry.npmjs.org/:_authToken": ${{ secrets.NPM_TOKEN }} run: | - npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}" # pnpm config set is broken pnpm release - name: Copy Artifacts run: pnpm run copy-artifacts From 962c2b78b9b419189ae8ef16841c99aabca3c151 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 7 Mar 2023 01:26:45 +0200 Subject: [PATCH 02/12] docs: remove doppler from sponsors --- README.md | 11 ----------- __utils__/get-release-text/src/main.ts | 11 ----------- pnpm/README.md | 11 ----------- 3 files changed, 33 deletions(-) diff --git a/README.md b/README.md index 8590f63629..0c391a7894 100644 --- a/README.md +++ b/README.md @@ -84,17 +84,6 @@ To quote the [Rush](https://rushjs.io/) team: - - - - - - - - - - - diff --git a/__utils__/get-release-text/src/main.ts b/__utils__/get-release-text/src/main.ts index 8ba5c3e3c5..3010dac4d2 100644 --- a/__utils__/get-release-text/src/main.ts +++ b/__utils__/get-release-text/src/main.ts @@ -126,17 +126,6 @@ function getChangelogEntry (changelog: string, version: string) { - - - - - - - - - - - diff --git a/pnpm/README.md b/pnpm/README.md index a2f7df0cb0..41c15343c2 100644 --- a/pnpm/README.md +++ b/pnpm/README.md @@ -84,17 +84,6 @@ To quote the [Rush](https://rushjs.io/) team: - - - - - - - - - - - From 6314a47b821a8a340e14cf8d23c67fff0f1d9854 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Wed, 8 Mar 2023 03:17:15 +0200 Subject: [PATCH 03/12] fix: settings related to authorization should be set by npm CLI (#6195) close #6181 --- .changeset/nervous-dots-sleep.md | 6 ++++ config/plugin-commands-config/package.json | 1 + .../src/ConfigCommandOptions.ts | 1 + .../plugin-commands-config/src/configSet.ts | 18 ++++++++++ .../test/managingAuthSettings.test.ts | 33 +++++++++++++++++++ config/plugin-commands-config/tsconfig.json | 3 ++ pnpm-lock.yaml | 6 +++- 7 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .changeset/nervous-dots-sleep.md create mode 100644 config/plugin-commands-config/test/managingAuthSettings.test.ts diff --git a/.changeset/nervous-dots-sleep.md b/.changeset/nervous-dots-sleep.md new file mode 100644 index 0000000000..86286e7075 --- /dev/null +++ b/.changeset/nervous-dots-sleep.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-config": patch +"pnpm": patch +--- + +Settings related to authorization should be set/deleted by npm CLI [#6181](https://github.com/pnpm/pnpm/issues/6181). diff --git a/config/plugin-commands-config/package.json b/config/plugin-commands-config/package.json index 4fc6b1af65..161a07ec08 100644 --- a/config/plugin-commands-config/package.json +++ b/config/plugin-commands-config/package.json @@ -33,6 +33,7 @@ "@pnpm/cli-utils": "workspace:*", "@pnpm/config": "workspace:*", "@pnpm/error": "workspace:*", + "@pnpm/run-npm": "workspace:*", "ini": "3.0.1", "read-ini-file": "4.0.0", "render-help": "^1.0.3", diff --git a/config/plugin-commands-config/src/ConfigCommandOptions.ts b/config/plugin-commands-config/src/ConfigCommandOptions.ts index b8dd210c3e..bd0be3fe54 100644 --- a/config/plugin-commands-config/src/ConfigCommandOptions.ts +++ b/config/plugin-commands-config/src/ConfigCommandOptions.ts @@ -5,6 +5,7 @@ export type ConfigCommandOptions = Pick & { json?: boolean diff --git a/config/plugin-commands-config/src/configSet.ts b/config/plugin-commands-config/src/configSet.ts index c38ec13376..29de5ae048 100644 --- a/config/plugin-commands-config/src/configSet.ts +++ b/config/plugin-commands-config/src/configSet.ts @@ -1,10 +1,20 @@ import path from 'path' +import { runNpm } from '@pnpm/run-npm' import { readIniFile } from 'read-ini-file' import { writeIniFile } from 'write-ini-file' import { ConfigCommandOptions } from './ConfigCommandOptions' export async function configSet (opts: ConfigCommandOptions, key: string, value: string | null) { const configPath = opts.global ? path.join(opts.configDir, 'rc') : path.join(opts.dir, '.npmrc') + if (opts.global && settingShouldFallBackToNpm(key)) { + const _runNpm = runNpm.bind(null, opts.npmPath) + if (value == null) { + _runNpm(['config', 'delete', key]) + } else { + _runNpm(['config', 'set', `${key}=${value}`]) + } + return + } const settings = await safeReadIniFile(configPath) if (value == null) { if (settings[key] == null) return @@ -15,6 +25,14 @@ export async function configSet (opts: ConfigCommandOptions, key: string, value: await writeIniFile(configPath, settings) } +function settingShouldFallBackToNpm (key: string): boolean { + return ( + ['registry', '_auth', '_authToken', 'username', '_password'].includes(key) || + key[0] === '@' || + key.startsWith('//') + ) +} + async function safeReadIniFile (configPath: string): Promise> { try { return await readIniFile(configPath) as Record diff --git a/config/plugin-commands-config/test/managingAuthSettings.test.ts b/config/plugin-commands-config/test/managingAuthSettings.test.ts new file mode 100644 index 0000000000..d8b9b49c3a --- /dev/null +++ b/config/plugin-commands-config/test/managingAuthSettings.test.ts @@ -0,0 +1,33 @@ +import { config } from '@pnpm/plugin-commands-config' +import { runNpm } from '@pnpm/run-npm' + +jest.mock('@pnpm/run-npm', () => ({ + runNpm: jest.fn(), +})) + +describe.each( + [ + '_auth', + '_authToken', + '_password', + 'username', + 'registry', + '@foo:registry', + '//registry.npmjs.org/:_authToken', + ] +)('settings related to auth are handled by npm CLI', (key) => { + const configOpts = { + dir: process.cwd(), + cliOptions: {}, + configDir: __dirname, // this doesn't matter, it won't be used + rawConfig: {}, + } + it(`should set ${key}`, async () => { + await config.handler(configOpts, ['set', `${key}=123`]) + expect(runNpm).toHaveBeenCalledWith(undefined, ['config', 'set', `${key}=123`]) + }) + it(`should delete ${key}`, async () => { + await config.handler(configOpts, ['delete', key]) + expect(runNpm).toHaveBeenCalledWith(undefined, ['config', 'delete', key]) + }) +}) diff --git a/config/plugin-commands-config/tsconfig.json b/config/plugin-commands-config/tsconfig.json index dfb3722d8a..dad5fead95 100644 --- a/config/plugin-commands-config/tsconfig.json +++ b/config/plugin-commands-config/tsconfig.json @@ -15,6 +15,9 @@ { "path": "../../cli/cli-utils" }, + { + "path": "../../exec/run-npm" + }, { "path": "../../packages/error" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5caef1731c..9d797d693a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -711,6 +711,9 @@ importers: '@pnpm/error': specifier: workspace:* version: link:../../packages/error + '@pnpm/run-npm': + specifier: workspace:* + version: link:../../exec/run-npm ini: specifier: 3.0.1 version: 3.0.1 @@ -7997,7 +8000,7 @@ packages: '@pnpm/find-workspace-dir': 5.0.1 '@pnpm/find-workspace-packages': 5.0.36(@pnpm/logger@5.0.0)(@yarnpkg/core@4.0.0-rc.14)(typanion@3.12.1) '@pnpm/logger': 5.0.0 - '@pnpm/types': 8.9.0 + '@pnpm/types': 8.10.0 '@yarnpkg/core': 4.0.0-rc.14(typanion@3.12.1) load-json-file: 7.0.1 meow: 10.1.5 @@ -8546,6 +8549,7 @@ 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==} From ff333556d86035f7234c605478a722cfadfcb3cb Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Wed, 8 Mar 2023 03:18:45 +0200 Subject: [PATCH 04/12] chore(release): 7.29.1 --- .changeset/nervous-dots-sleep.md | 6 ------ config/plugin-commands-config/CHANGELOG.md | 6 ++++++ config/plugin-commands-config/package.json | 2 +- pnpm/CHANGELOG.md | 6 ++++++ 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 +- 11 files changed, 20 insertions(+), 14 deletions(-) delete mode 100644 .changeset/nervous-dots-sleep.md diff --git a/.changeset/nervous-dots-sleep.md b/.changeset/nervous-dots-sleep.md deleted file mode 100644 index 86286e7075..0000000000 --- a/.changeset/nervous-dots-sleep.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@pnpm/plugin-commands-config": patch -"pnpm": patch ---- - -Settings related to authorization should be set/deleted by npm CLI [#6181](https://github.com/pnpm/pnpm/issues/6181). diff --git a/config/plugin-commands-config/CHANGELOG.md b/config/plugin-commands-config/CHANGELOG.md index bfb9b3cc7f..33067aa899 100644 --- a/config/plugin-commands-config/CHANGELOG.md +++ b/config/plugin-commands-config/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/plugin-commands-config +## 1.0.22 + +### Patch Changes + +- 6314a47b8: Settings related to authorization should be set/deleted by npm CLI [#6181](https://github.com/pnpm/pnpm/issues/6181). + ## 1.0.21 ### Patch Changes diff --git a/config/plugin-commands-config/package.json b/config/plugin-commands-config/package.json index 161a07ec08..d70fed6e04 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.21", + "version": "1.0.22", "description": "Commands for reading and writing settings to/from config files", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pnpm/CHANGELOG.md b/pnpm/CHANGELOG.md index 95a1097b0a..1f45c65cf7 100644 --- a/pnpm/CHANGELOG.md +++ b/pnpm/CHANGELOG.md @@ -1,5 +1,11 @@ # pnpm +## 7.29.1 + +### Patch Changes + +- Settings related to authorization should be set/deleted by npm CLI [#6181](https://github.com/pnpm/pnpm/issues/6181). + ## 7.29.0 ### Minor Changes diff --git a/pnpm/artifacts/exe/package.json b/pnpm/artifacts/exe/package.json index 0dee6611b7..dd7c61f78c 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.29.0", + "version": "7.29.1", "publishConfig": { "bin": { "pnpm": "pnpm" diff --git a/pnpm/artifacts/linux-arm64/package.json b/pnpm/artifacts/linux-arm64/package.json index 235d0c12cc..206f3efc94 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.29.0", + "version": "7.29.1", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/linux-x64/package.json b/pnpm/artifacts/linux-x64/package.json index 4892e5e1dd..1a983562c1 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.29.0", + "version": "7.29.1", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/macos-arm64/package.json b/pnpm/artifacts/macos-arm64/package.json index e9ec0a03cf..9f5c3234de 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.29.0", + "version": "7.29.1", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/macos-x64/package.json b/pnpm/artifacts/macos-x64/package.json index dab0ec1152..222876165e 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.29.0", + "version": "7.29.1", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/win-x64/package.json b/pnpm/artifacts/win-x64/package.json index 7164a91649..691a9e7184 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.29.0", + "version": "7.29.1", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/package.json b/pnpm/package.json index e4f7b47366..4036ec1abd 100644 --- a/pnpm/package.json +++ b/pnpm/package.json @@ -1,7 +1,7 @@ { "name": "pnpm", "description": "Fast, disk space efficient package manager", - "version": "7.29.0", + "version": "7.29.1", "bin": { "pnpm": "bin/pnpm.cjs", "pnpx": "bin/pnpx.cjs" From ba4b2db1f201640dad5d7ee9fe68a2d0defd6047 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Wed, 8 Mar 2023 03:33:01 +0200 Subject: [PATCH 05/12] ci: fix release --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd9344035a..ccbc5be42a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,8 +36,11 @@ jobs: run: pnpm install - name: Publish Packages env: - "npm_config_//registry.npmjs.org/:_authToken": ${{ secrets.NPM_TOKEN }} + # setting the "npm_config_//registry.npmjs.org/:_authToken" env variable directly doesn't work. + # probably "pnpm release" doesn't pass auth tokens to child processes + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | + npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}" # pnpm config set is broken pnpm release - name: Copy Artifacts run: pnpm run copy-artifacts From 272de3e22766a57bc99d44961be9b0bad37c8b5e Mon Sep 17 00:00:00 2001 From: await-ovo <13152410380@163.com> Date: Sat, 11 Mar 2023 08:02:14 +0800 Subject: [PATCH 06/12] fix: clean up child processes when process exited (#6190) close #6162 --- .changeset/itchy-onions-battle.md | 5 ++++ .../multiple-scripts-error-exit/dev-bar.js | 11 ++++++++ .../multiple-scripts-error-exit/dev-foo.js | 2 ++ .../multiple-scripts-error-exit/package.json | 10 +++++++ .../process-foo.js | 8 ++++++ pnpm-lock.yaml | 10 +++++++ pnpm/package.json | 1 + pnpm/src/errorHandler.ts | 28 +++++++++++++++++-- pnpm/src/pnpm.ts | 2 +- pnpm/test/errorHandler.test.ts | 12 ++++++++ pnpm/test/utils/execPnpm.ts | 5 ++-- pnpm/test/utils/isPortInUse.ts | 18 ++++++++++++ 12 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 .changeset/itchy-onions-battle.md create mode 100644 __fixtures__/multiple-scripts-error-exit/dev-bar.js create mode 100644 __fixtures__/multiple-scripts-error-exit/dev-foo.js create mode 100644 __fixtures__/multiple-scripts-error-exit/package.json create mode 100644 __fixtures__/multiple-scripts-error-exit/process-foo.js create mode 100644 pnpm/test/utils/isPortInUse.ts diff --git a/.changeset/itchy-onions-battle.md b/.changeset/itchy-onions-battle.md new file mode 100644 index 0000000000..8b61950818 --- /dev/null +++ b/.changeset/itchy-onions-battle.md @@ -0,0 +1,5 @@ +--- +"pnpm": patch +--- + +Clean up child processes when process exited [#6162](https://github.com/pnpm/pnpm/issues/6162). diff --git a/__fixtures__/multiple-scripts-error-exit/dev-bar.js b/__fixtures__/multiple-scripts-error-exit/dev-bar.js new file mode 100644 index 0000000000..3485ba0679 --- /dev/null +++ b/__fixtures__/multiple-scripts-error-exit/dev-bar.js @@ -0,0 +1,11 @@ +import { createServer } from 'http' +const server = createServer() +server.listen(9999, (err) => { + if (err) { + console.log(`[bar] dev error:`, err) + } + console.log(`[bar] server listen on 9999`) + setTimeout(() => { + throw new Error('[bar] server error, Oops') + }, 2000) +}) diff --git a/__fixtures__/multiple-scripts-error-exit/dev-foo.js b/__fixtures__/multiple-scripts-error-exit/dev-foo.js new file mode 100644 index 0000000000..37daa2c9cf --- /dev/null +++ b/__fixtures__/multiple-scripts-error-exit/dev-foo.js @@ -0,0 +1,2 @@ +import { spawn } from 'child_process' +spawn('node', ['./process-foo.js'], { stdio: 'inherit' }) diff --git a/__fixtures__/multiple-scripts-error-exit/package.json b/__fixtures__/multiple-scripts-error-exit/package.json new file mode 100644 index 0000000000..b8f0fbaab7 --- /dev/null +++ b/__fixtures__/multiple-scripts-error-exit/package.json @@ -0,0 +1,10 @@ +{ + "name": "multiple-scripts-error-exit", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "dev:foo": "node ./dev-foo.js", + "dev:bar": "node ./dev-bar.js" + } +} diff --git a/__fixtures__/multiple-scripts-error-exit/process-foo.js b/__fixtures__/multiple-scripts-error-exit/process-foo.js new file mode 100644 index 0000000000..373d0fb788 --- /dev/null +++ b/__fixtures__/multiple-scripts-error-exit/process-foo.js @@ -0,0 +1,8 @@ +import { createServer } from 'http' +const server = createServer() +server.listen(9990, (err) => { + if (err) { + console.log(`[foo] dev error:`, err) + } + console.log(`[foo] server listen on 9990`) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d797d693a..a5ff677290 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4228,6 +4228,9 @@ importers: path-name: specifier: ^1.0.0 version: 1.0.0 + pidtree: + specifier: ^0.6.0 + version: 0.6.0 ps-list: specifier: ^7.2.0 version: 7.2.0 @@ -14847,6 +14850,12 @@ packages: hasBin: true dev: true + /pidtree@0.6.0: + resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} + engines: {node: '>=0.10'} + hasBin: true + dev: true + /pify@3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} @@ -17652,6 +17661,7 @@ time: /path-exists@4.0.0: '2019-04-04T03:29:16.887Z' /path-name@1.0.0: '2016-10-20T18:43:50.780Z' /path-temp@2.0.0: '2019-05-04T14:35:52.401Z' + /pidtree@0.6.0: '2022-06-05T18:35:44.206Z' /pkg-deb@1.1.2: '2020-10-26T14:13:54.373Z' /pkg-rpm@1.0.3: '2021-01-12T09:42:07.762Z' /preferred-pm@3.0.3: '2021-02-09T01:16:52.150Z' diff --git a/pnpm/package.json b/pnpm/package.json index 4036ec1abd..cf1230538e 100644 --- a/pnpm/package.json +++ b/pnpm/package.json @@ -94,6 +94,7 @@ "p-defer": "^3.0.0", "path-exists": "^4.0.0", "path-name": "^1.0.0", + "pidtree": "^0.6.0", "ps-list": "^7.2.0", "ramda": "npm:@pnpm/ramda@0.28.1", "read-yaml-file": "^2.1.0", diff --git a/pnpm/src/errorHandler.ts b/pnpm/src/errorHandler.ts index f2bba4be1a..16faed5c90 100644 --- a/pnpm/src/errorHandler.ts +++ b/pnpm/src/errorHandler.ts @@ -1,7 +1,13 @@ +import { promisify } from 'util' import { logger } from '@pnpm/logger' +import pidTree from 'pidtree' import { REPORTER_INITIALIZED } from './main' -export function errorHandler (error: Error & { code?: string }) { +const getDescendentProcesses = promisify((pid: number, callback: (error: Error | undefined, result: number[]) => void) => { + pidTree(pid, { root: false }, callback) +}) + +export async function errorHandler (error: Error & { code?: string }) { if (error.name != null && error.name !== 'pnpm' && !error.name.startsWith('pnpm:')) { try { error.name = 'pnpm' @@ -32,5 +38,23 @@ export function errorHandler (error: Error & { code?: string }) { logger.error(error, error) // Deferring exit. Otherwise, the reporter wouldn't show the error - setTimeout(() => process.exit(1), 0) + setTimeout(async () => { + await killProcesses() + }, 0) +} + +async function killProcesses () { + try { + const descendentProcesses = await getDescendentProcesses(process.pid) + for (const pid of descendentProcesses) { + try { + process.kill(pid) + } catch (err) { + // ignore error here + } + } + } catch (err) { + // ignore error here + } + process.exit(1) } diff --git a/pnpm/src/pnpm.ts b/pnpm/src/pnpm.ts index 329651631e..30d3e6204e 100644 --- a/pnpm/src/pnpm.ts +++ b/pnpm/src/pnpm.ts @@ -71,7 +71,7 @@ async function runPnpm () { const { main } = await import('./main') await main(argv) } catch (err: any) { // eslint-disable-line - errorHandler(err) + await errorHandler(err) } } diff --git a/pnpm/test/errorHandler.test.ts b/pnpm/test/errorHandler.test.ts index b913987ca2..146239201f 100644 --- a/pnpm/test/errorHandler.test.ts +++ b/pnpm/test/errorHandler.test.ts @@ -1,6 +1,11 @@ import { prepare, preparePackages } from '@pnpm/prepare' import writeYamlFile from 'write-yaml-file' import { execPnpmSync } from './utils' +import { fixtures } from '@pnpm/test-fixtures' +import { isPortInUse } from './utils/isPortInUse' + +const f = fixtures(__dirname) +const multipleScriptsErrorExit = f.find('multiple-scripts-error-exit') test('should print json format error when publish --json failed', async () => { prepare({ @@ -35,3 +40,10 @@ test('should print json format error when add dependency on workspace root', asy const { error } = JSON.parse(stdout.toString()) expect(error?.code).toBe('ERR_PNPM_ADDING_TO_ROOT') }) + +test('should clean up child processes when process exited', async () => { + process.chdir(multipleScriptsErrorExit) + execPnpmSync(['run', '/^dev:.*/'], { stdio: 'inherit', env: {} }) + expect(await isPortInUse(9990)).toBe(false) + expect(await isPortInUse(9999)).toBe(false) +}) diff --git a/pnpm/test/utils/execPnpm.ts b/pnpm/test/utils/execPnpm.ts index 2833b9b992..b3b3a08288 100644 --- a/pnpm/test/utils/execPnpm.ts +++ b/pnpm/test/utils/execPnpm.ts @@ -1,4 +1,4 @@ -import { ChildProcess as NodeChildProcess } from 'child_process' +import { ChildProcess as NodeChildProcess, StdioOptions } from 'child_process' import path from 'path' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import isWindows from 'is-windows' @@ -74,12 +74,13 @@ export interface ChildProcess { stderr: Object } -export function execPnpmSync (args: string[], opts?: { env: Object }): ChildProcess { +export function execPnpmSync (args: string[], opts?: { env: Object, stdio?: StdioOptions }): ChildProcess { return crossSpawn.sync(process.execPath, [pnpmBinLocation, ...args], { env: { ...createEnv(), ...opts?.env, } as NodeJS.ProcessEnv, + stdio: opts?.stdio, }) as ChildProcess } diff --git a/pnpm/test/utils/isPortInUse.ts b/pnpm/test/utils/isPortInUse.ts new file mode 100644 index 0000000000..e745b1857f --- /dev/null +++ b/pnpm/test/utils/isPortInUse.ts @@ -0,0 +1,18 @@ +import { createServer } from 'net' + +export const isPortInUse = (port: number) => new Promise((resolve, reject) => { + const server = createServer() + // eslint-disable-next-line @typescript-eslint/no-explicit-any + server.once('error', (err: any) => { + if (err?.code !== 'EADDRINUSE') { + reject(err); return + } + resolve(true) + }) + server.once('listening', () => { + server.once('close', () => { + resolve(false) + }).close() + }) + server.listen(port) +}) From 955874422c0a9f18f083edb7c73bd4be24520c9a Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sat, 11 Mar 2023 17:09:34 +0200 Subject: [PATCH 07/12] fix: retry copying from store on EBUSY error (#6207) close #6201 --- .changeset/gentle-lies-type.md | 5 + .changeset/young-insects-smoke.md | 6 + fs/graceful-fs/src/index.ts | 3 + fs/indexed-pkg-importer/package.json | 1 + fs/indexed-pkg-importer/src/index.ts | 3 +- .../test/createImportPackage.test.ts | 121 +++++++++--------- fs/indexed-pkg-importer/tsconfig.json | 3 + pnpm-lock.yaml | 3 + 8 files changed, 82 insertions(+), 63 deletions(-) create mode 100644 .changeset/gentle-lies-type.md create mode 100644 .changeset/young-insects-smoke.md diff --git a/.changeset/gentle-lies-type.md b/.changeset/gentle-lies-type.md new file mode 100644 index 0000000000..bc247baa1e --- /dev/null +++ b/.changeset/gentle-lies-type.md @@ -0,0 +1,5 @@ +--- +"@pnpm/graceful-fs": minor +--- + +Add copyFile, link, stat. diff --git a/.changeset/young-insects-smoke.md b/.changeset/young-insects-smoke.md new file mode 100644 index 0000000000..d4c19842ee --- /dev/null +++ b/.changeset/young-insects-smoke.md @@ -0,0 +1,6 @@ +--- +"@pnpm/fs.indexed-pkg-importer": patch +"pnpm": patch +--- + +Retry copying file on EBUSY error [#6201](https://github.com/pnpm/pnpm/issues/6201). diff --git a/fs/graceful-fs/src/index.ts b/fs/graceful-fs/src/index.ts index 85d207b094..a5e4aad193 100644 --- a/fs/graceful-fs/src/index.ts +++ b/fs/graceful-fs/src/index.ts @@ -2,7 +2,10 @@ import { promisify } from 'util' import gfs from 'graceful-fs' export default { // eslint-disable-line + copyFile: promisify(gfs.copyFile), createReadStream: gfs.createReadStream, + link: promisify(gfs.link), readFile: promisify(gfs.readFile), + stat: promisify(gfs.stat), writeFile: promisify(gfs.writeFile), } diff --git a/fs/indexed-pkg-importer/package.json b/fs/indexed-pkg-importer/package.json index 252429e3c4..8c773735b0 100644 --- a/fs/indexed-pkg-importer/package.json +++ b/fs/indexed-pkg-importer/package.json @@ -16,6 +16,7 @@ }, "dependencies": { "@pnpm/core-loggers": "workspace:*", + "@pnpm/graceful-fs": "workspace:*", "@pnpm/store-controller-types": "workspace:*", "@zkochan/rimraf": "^2.1.2", "fs-extra": "^11.1.0", diff --git a/fs/indexed-pkg-importer/src/index.ts b/fs/indexed-pkg-importer/src/index.ts index c84950762a..5fd67162b2 100644 --- a/fs/indexed-pkg-importer/src/index.ts +++ b/fs/indexed-pkg-importer/src/index.ts @@ -1,4 +1,5 @@ -import { constants, promises as fs, Stats } from 'fs' +import { constants, Stats } from 'fs' +import fs from '@pnpm/graceful-fs' import path from 'path' import { globalInfo, globalWarn } from '@pnpm/logger' import { packageImportMethodLogger } from '@pnpm/core-loggers' diff --git a/fs/indexed-pkg-importer/test/createImportPackage.test.ts b/fs/indexed-pkg-importer/test/createImportPackage.test.ts index 69258be812..2afc56a897 100644 --- a/fs/indexed-pkg-importer/test/createImportPackage.test.ts +++ b/fs/indexed-pkg-importer/test/createImportPackage.test.ts @@ -1,31 +1,43 @@ +import fs from 'fs' import path from 'path' +import { createIndexedPkgImporter } from '@pnpm/fs.indexed-pkg-importer' +import gfs from '@pnpm/graceful-fs' +import { globalInfo } from '@pnpm/logger' -const fsMock = { promises: {} as any } as any // eslint-disable-line -jest.mock('fs', () => { - const { access, constants, promises } = jest.requireActual('fs') - fsMock.constants = constants - fsMock.promises.mkdir = promises.mkdir - fsMock.promises.readdir = promises.readdir - fsMock.access = access - return fsMock +jest.mock('@pnpm/graceful-fs', () => { + const { access, promises } = jest.requireActual('fs') + const fsMock = { + mkdir: promises.mkdir, + readdir: promises.readdir, + access, + copyFile: jest.fn(), + link: jest.fn(), + stat: jest.fn(), + } + return { + __esModule: true, + default: fsMock, + } }) jest.mock('path-temp', () => (dir: string) => path.join(dir, '_tmp')) jest.mock('rename-overwrite', () => jest.fn()) jest.mock('fs-extra', () => ({ copy: jest.fn(), })) -const globalInfo = jest.fn() -const globalWarn = jest.fn() -const logger = jest.fn(() => ({ debug: jest.fn() })) -jest.mock('@pnpm/logger', () => ({ logger, globalWarn, globalInfo })) +jest.mock('@pnpm/logger', () => ({ + logger: jest.fn(() => ({ debug: jest.fn() })), + globalWarn: jest.fn(), + globalInfo: jest.fn(), +})) -// eslint-disable-next-line -import { createIndexedPkgImporter } from '@pnpm/fs.indexed-pkg-importer' +beforeEach(() => { + ;(gfs.copyFile as jest.Mock).mockClear() + ;(gfs.link as jest.Mock).mockClear() + ;(globalInfo as jest.Mock).mockReset() +}) test('packageImportMethod=auto: clone files by default', async () => { const importPackage = createIndexedPkgImporter('auto') - fsMock.promises.copyFile = jest.fn() - fsMock.promises.rename = jest.fn() expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -34,25 +46,23 @@ test('packageImportMethod=auto: clone files by default', async () => { force: false, fromStore: false, })).toBe('clone') - expect(fsMock.promises.copyFile).toBeCalledWith( + expect(gfs.copyFile).toBeCalledWith( path.join('hash1'), path.join('project', '_tmp', 'package.json'), - fsMock.constants.COPYFILE_FICLONE_FORCE + fs.constants.COPYFILE_FICLONE_FORCE ) - expect(fsMock.promises.copyFile).toBeCalledWith( + expect(gfs.copyFile).toBeCalledWith( path.join('hash2'), path.join('project', '_tmp', 'index.js'), - fsMock.constants.COPYFILE_FICLONE_FORCE + fs.constants.COPYFILE_FICLONE_FORCE ) }) test('packageImportMethod=auto: link files if cloning fails', async () => { const importPackage = createIndexedPkgImporter('auto') - fsMock.promises.copyFile = jest.fn(() => { + ;(gfs.copyFile as jest.Mock).mockImplementation(async () => { throw new Error('This file system does not support cloning') }) - fsMock.promises.link = jest.fn() - fsMock.promises.rename = jest.fn() expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -61,10 +71,10 @@ test('packageImportMethod=auto: link files if cloning fails', async () => { force: false, fromStore: false, })).toBe('hardlink') - expect(fsMock.promises.link).toBeCalledWith(path.join('hash1'), path.join('project', '_tmp', 'package.json')) - expect(fsMock.promises.link).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) - expect(fsMock.promises.copyFile).toBeCalled() - fsMock.promises.copyFile.mockClear() + expect(gfs.link).toBeCalledWith(path.join('hash1'), path.join('project', '_tmp', 'package.json')) + expect(gfs.link).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) + expect(gfs.copyFile).toBeCalled() + ;(gfs.copyFile as jest.Mock).mockClear() // The copy function will not be called again expect(await importPackage('project2/package', { @@ -75,24 +85,23 @@ test('packageImportMethod=auto: link files if cloning fails', async () => { force: false, fromStore: false, })).toBe('hardlink') - expect(fsMock.promises.copyFile).not.toBeCalled() - expect(fsMock.promises.link).toBeCalledWith(path.join('hash1'), path.join('project2', '_tmp', 'package.json')) - expect(fsMock.promises.link).toBeCalledWith(path.join('hash2'), path.join('project2', '_tmp', 'index.js')) + expect(gfs.copyFile).not.toBeCalled() + expect(gfs.link).toBeCalledWith(path.join('hash1'), path.join('project2', '_tmp', 'package.json')) + expect(gfs.link).toBeCalledWith(path.join('hash2'), path.join('project2', '_tmp', 'index.js')) }) test('packageImportMethod=auto: link files if cloning fails and even hard linking fails but not with EXDEV error', async () => { const importPackage = createIndexedPkgImporter('auto') - fsMock.promises.copyFile = jest.fn(() => { + ;(gfs.copyFile as jest.Mock).mockImplementation(async () => { throw new Error('This file system does not support cloning') }) let linkFirstCall = true - fsMock.promises.link = jest.fn(() => { + ;(gfs.link as jest.Mock).mockImplementation(async () => { if (linkFirstCall) { linkFirstCall = false throw new Error() } }) - fsMock.promises.rename = jest.fn() expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -100,22 +109,21 @@ test('packageImportMethod=auto: link files if cloning fails and even hard linkin force: false, fromStore: false, })).toBe('hardlink') - expect(fsMock.promises.link).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) - expect(fsMock.promises.link).toBeCalledTimes(2) - expect(fsMock.promises.copyFile).toBeCalledTimes(1) + expect(gfs.link).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) + expect(gfs.link).toBeCalledTimes(2) + expect(gfs.copyFile).toBeCalledTimes(1) }) test('packageImportMethod=auto: chooses copying if cloning and hard linking is not possible', async () => { const importPackage = createIndexedPkgImporter('auto') - fsMock.promises.copyFile = jest.fn((src: string, dest: string, flags?: number) => { - if (flags === fsMock.constants.COPYFILE_FICLONE_FORCE) { + ;(gfs.copyFile as jest.Mock).mockImplementation(async (src: string, dest: string, flags?: number) => { + if (flags === fs.constants.COPYFILE_FICLONE_FORCE) { throw new Error('This file system does not support cloning') } }) - fsMock.promises.link = jest.fn(() => { + ;(gfs.link as jest.Mock).mockImplementation(() => { throw new Error('EXDEV: cross-device link not permitted') }) - fsMock.promises.rename = jest.fn() expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -123,19 +131,18 @@ test('packageImportMethod=auto: chooses copying if cloning and hard linking is n force: false, fromStore: false, })).toBe('copy') - expect(fsMock.promises.copyFile).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) - expect(fsMock.promises.copyFile).toBeCalledTimes(2) + expect(gfs.copyFile).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) + expect(gfs.copyFile).toBeCalledTimes(2) }) test('packageImportMethod=hardlink: fall back to copying if hardlinking fails', async () => { const importPackage = createIndexedPkgImporter('hardlink') - fsMock.promises.link = jest.fn((src: string, dest: string) => { + ;(gfs.link as jest.Mock).mockImplementation(async (src: string, dest: string) => { if (dest.endsWith('license')) { throw Object.assign(new Error(''), { code: 'EEXIST' }) } throw new Error('This file system does not support hard linking') }) - fsMock.promises.copyFile = jest.fn() expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -145,17 +152,15 @@ test('packageImportMethod=hardlink: fall back to copying if hardlinking fails', force: false, fromStore: false, })).toBe('hardlink') - expect(fsMock.promises.link).toBeCalledTimes(3) - expect(fsMock.promises.copyFile).toBeCalledTimes(2) // One time the target already exists, so it won't be copied - expect(fsMock.promises.copyFile).toBeCalledWith(path.join('hash1'), path.join('project', '_tmp', 'package.json')) - expect(fsMock.promises.copyFile).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) + expect(gfs.link).toBeCalledTimes(3) + expect(gfs.copyFile).toBeCalledTimes(2) // One time the target already exists, so it won't be copied + expect(gfs.copyFile).toBeCalledWith(path.join('hash1'), path.join('project', '_tmp', 'package.json')) + expect(gfs.copyFile).toBeCalledWith(path.join('hash2'), path.join('project', '_tmp', 'index.js')) }) test('packageImportMethod=hardlink does not relink package from store if package.json is linked from the store', async () => { const importPackage = createIndexedPkgImporter('hardlink') - fsMock.promises.copyFile = jest.fn() - fsMock.promises.rename = jest.fn() - fsMock.promises.stat = jest.fn(() => ({ ino: 1 })) + ;(gfs.stat as jest.Mock).mockReturnValue(Promise.resolve({ ino: 1 })) expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -167,12 +172,9 @@ test('packageImportMethod=hardlink does not relink package from store if package }) test('packageImportMethod=hardlink relinks package from store if package.json is not linked from the store', async () => { - globalInfo.mockReset() const importPackage = createIndexedPkgImporter('hardlink') - fsMock.promises.copyFile = jest.fn() - fsMock.promises.rename = jest.fn() let ino = 0 - fsMock.promises.stat = jest.fn(() => ({ ino: ++ino })) + ;(gfs.stat as jest.Mock).mockImplementation(async () => ({ ino: ++ino })) expect(await importPackage('project/package', { filesMap: { 'index.js': 'hash2', @@ -186,9 +188,7 @@ test('packageImportMethod=hardlink relinks package from store if package.json is test('packageImportMethod=hardlink does not relink package from store if package.json is not present in the store', async () => { const importPackage = createIndexedPkgImporter('hardlink') - fsMock.promises.copyFile = jest.fn() - fsMock.promises.rename = jest.fn() - fsMock.promises.stat = jest.fn((file) => { + ;(gfs.stat as jest.Mock).mockImplementation(async (file) => { expect(typeof file).toBe('string') return { ino: 1 } }) @@ -202,11 +202,8 @@ test('packageImportMethod=hardlink does not relink package from store if package }) test('packageImportMethod=hardlink links packages when they are not found', async () => { - globalInfo.mockReset() const importPackage = createIndexedPkgImporter('hardlink') - fsMock.promises.copyFile = jest.fn() - fsMock.promises.rename = jest.fn() - fsMock.promises.stat = jest.fn((file) => { + ;(gfs.stat as jest.Mock).mockImplementation(async (file) => { if (file === path.join('project/package', 'package.json')) { throw Object.assign(new Error(), { code: 'ENOENT' }) } diff --git a/fs/indexed-pkg-importer/tsconfig.json b/fs/indexed-pkg-importer/tsconfig.json index bc6ba6bff7..49ca5028a2 100644 --- a/fs/indexed-pkg-importer/tsconfig.json +++ b/fs/indexed-pkg-importer/tsconfig.json @@ -17,6 +17,9 @@ }, { "path": "../../store/store-controller-types" + }, + { + "path": "../graceful-fs" } ], "composite": true diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a5ff677290..32e0073c21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1498,6 +1498,9 @@ importers: '@pnpm/core-loggers': specifier: workspace:* version: link:../../packages/core-loggers + '@pnpm/graceful-fs': + specifier: workspace:* + version: link:../graceful-fs '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 From 787c43dcc1e913062a916c5e91440865bd9a8a6d Mon Sep 17 00:00:00 2001 From: David Weitzman <99229954+dweitzman-codaio@users.noreply.github.com> Date: Sat, 11 Mar 2023 08:31:55 -0800 Subject: [PATCH 08/12] fix: sort patchedDependencies consistently in lockfiles (#6208) --- .changeset/loud-geese-obey.md | 6 ++++++ lockfile/lockfile-file/src/sortLockfileKeys.ts | 4 ++-- lockfile/lockfile-file/test/sortLockfileKeys.test.ts | 11 +++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .changeset/loud-geese-obey.md diff --git a/.changeset/loud-geese-obey.md b/.changeset/loud-geese-obey.md new file mode 100644 index 0000000000..35519cc8e3 --- /dev/null +++ b/.changeset/loud-geese-obey.md @@ -0,0 +1,6 @@ +--- +"@pnpm/lockfile-file": patch +"pnpm": patch +--- + +`patchedDependencies` are now sorted consistently in the lockfile [#6208](https://github.com/pnpm/pnpm/pull/6208). diff --git a/lockfile/lockfile-file/src/sortLockfileKeys.ts b/lockfile/lockfile-file/src/sortLockfileKeys.ts index 06fadb4a64..03b34f0ed2 100644 --- a/lockfile/lockfile-file/src/sortLockfileKeys.ts +++ b/lockfile/lockfile-file/src/sortLockfileKeys.ts @@ -77,9 +77,9 @@ export function sortLockfileKeys (lockfile: LockfileFile) { }) } } - for (const key of ['specifiers', 'dependencies', 'devDependencies', 'optionalDependencies', 'time'] as const) { + for (const key of ['specifiers', 'dependencies', 'devDependencies', 'optionalDependencies', 'time', 'patchedDependencies'] as const) { if (!lockfile[key]) continue - lockfile[key] = sortKeys(lockfile[key]!) + lockfile[key] = sortKeys(lockfile[key]) // eslint-disable-line @typescript-eslint/no-explicit-any } return sortKeys(lockfile, { compare: compareRootKeys }) } diff --git a/lockfile/lockfile-file/test/sortLockfileKeys.test.ts b/lockfile/lockfile-file/test/sortLockfileKeys.test.ts index dce970ed9c..083e670b9a 100644 --- a/lockfile/lockfile-file/test/sortLockfileKeys.test.ts +++ b/lockfile/lockfile-file/test/sortLockfileKeys.test.ts @@ -26,6 +26,11 @@ test('sorts keys alphabetically', () => { }, }, }, + patchedDependencies: { + zzz: { path: 'foo', hash: 'bar' }, + bar: { path: 'foo', hash: 'bar' }, + aaa: { path: 'foo', hash: 'bar' }, + }, }) expect(normalizedLockfile).toStrictEqual({ @@ -52,9 +57,15 @@ test('sorts keys alphabetically', () => { }, }, }, + patchedDependencies: { + aaa: { path: 'foo', hash: 'bar' }, + bar: { path: 'foo', hash: 'bar' }, + zzz: { path: 'foo', hash: 'bar' }, + }, }) expect(Object.keys(normalizedLockfile.importers?.foo.dependencies ?? {})).toStrictEqual(['aaa', 'bar', 'zzz']) expect(Object.keys(normalizedLockfile.importers?.foo.specifiers ?? {})).toStrictEqual(['aaa', 'bar', 'zzz']) + expect(Object.keys(normalizedLockfile.patchedDependencies ?? {})).toStrictEqual(['aaa', 'bar', 'zzz']) }) test('sorting does not care about locale (e.g. Czech has "ch" as a single character after "h")', () => { From 185ab01adfc927ea23d2db08a14723bf51d0025f Mon Sep 17 00:00:00 2001 From: await-ovo <13152410380@163.com> Date: Mon, 13 Mar 2023 22:40:21 +0800 Subject: [PATCH 09/12] feat: when patch package does not specify a version, use locally installed version by default. (#6197) close #6192 --- .changeset/khaki-icons-rest.md | 8 + .gitignore | 2 + lockfile/audit/src/index.ts | 25 +- .../plugin-commands-patching/package.json | 9 + .../src/getPatchedDependency.ts | 72 ++++++ .../plugin-commands-patching/src/patch.ts | 29 ++- .../src/patchCommit.ts | 3 +- .../src/writePackage.ts | 8 +- .../test/patch.test.ts | 229 ++++++++++++++++-- .../plugin-commands-patching/tsconfig.json | 15 ++ pnpm-lock.yaml | 30 ++- pnpm/src/main.ts | 2 +- reviewing/list/src/index.ts | 33 ++- 13 files changed, 404 insertions(+), 61 deletions(-) create mode 100644 .changeset/khaki-icons-rest.md create mode 100644 patching/plugin-commands-patching/src/getPatchedDependency.ts diff --git a/.changeset/khaki-icons-rest.md b/.changeset/khaki-icons-rest.md new file mode 100644 index 0000000000..3430f625cb --- /dev/null +++ b/.changeset/khaki-icons-rest.md @@ -0,0 +1,8 @@ +--- +"@pnpm/plugin-commands-patching": patch +"@pnpm/audit": patch +"@pnpm/list": patch +"pnpm": patch +--- + +When patch package does not specify a version, use locally installed version by default [#6192](https://github.com/pnpm/pnpm/issues/6192). diff --git a/.gitignore b/.gitignore index 681c8b0ea0..f85815d290 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,5 @@ RELEASE.md ## custom modules-dir fixture __fixtures__/custom-modules-dir/**/fake_modules/ +__fixtures__/custom-modules-dir/cache/ +__fixtures__/custom-modules-dir/patches/ diff --git a/lockfile/audit/src/index.ts b/lockfile/audit/src/index.ts index e415a157fe..c96b2e5957 100644 --- a/lockfile/audit/src/index.ts +++ b/lockfile/audit/src/index.ts @@ -6,7 +6,7 @@ import { Lockfile } from '@pnpm/lockfile-types' import { DependenciesField } from '@pnpm/types' import { lockfileToAuditTree } from './lockfileToAuditTree' import { AuditReport } from './types' -import { searchForPackages, PackageNode } from '@pnpm/list' +import { searchForPackages, flattenSearchedPackages } from '@pnpm/list' export * from './types' @@ -95,28 +95,7 @@ async function searchPackagePaths ( pkg: string ) { const pkgs = await searchForPackages([pkg], projectDirs, searchOpts) - const paths: string[] = [] - - for (const pkg of pkgs) { - _walker([ - ...(pkg.optionalDependencies ?? []), - ...(pkg.dependencies ?? []), - ...(pkg.devDependencies ?? []), - ...(pkg.unsavedDependencies ?? []), - ], path.relative(searchOpts.lockfileDir, pkg.path) || '.') - } - return paths - - function _walker (packages: PackageNode[], depPath: string) { - for (const pkg of packages) { - const nextDepPath = `${depPath} > ${pkg.name}@${pkg.version}` - if (pkg.dependencies?.length) { - _walker(pkg.dependencies, nextDepPath) - } else { - paths.push(nextDepPath) - } - } - } + return flattenSearchedPackages(pkgs, { lockfileDir: searchOpts.lockfileDir }).map(({ depPath }) => depPath) } export class AuditEndpointNotExistsError extends PnpmError { diff --git a/patching/plugin-commands-patching/package.json b/patching/plugin-commands-patching/package.json index ea2406edd9..a2c40d2152 100644 --- a/patching/plugin-commands-patching/package.json +++ b/patching/plugin-commands-patching/package.json @@ -37,13 +37,17 @@ "@pnpm/plugin-commands-patching": "workspace:*", "@pnpm/prepare": "workspace:*", "@pnpm/registry-mock": "3.5.0", + "@pnpm/test-fixtures": "workspace:*", "@types/ramda": "0.28.20", + "@types/semver": "7.3.13", "write-yaml-file": "^4.2.0" }, "dependencies": { "@pnpm/cli-utils": "workspace:*", "@pnpm/config": "workspace:*", + "@pnpm/constants": "workspace:*", "@pnpm/error": "workspace:*", + "@pnpm/modules-yaml": "workspace:*", "@pnpm/parse-wanted-dependency": "workspace:*", "@pnpm/patching.apply-patch": "workspace:*", "@pnpm/pick-registry-for-package": "workspace:*", @@ -51,10 +55,15 @@ "@pnpm/read-package-json": "workspace:*", "@pnpm/read-project-manifest": "workspace:*", "@pnpm/store-connection-manager": "workspace:*", + "@pnpm/lockfile-file": "workspace:*", + "@pnpm/lockfile-utils": "workspace:*", + "enquirer": "^2.3.6", "escape-string-regexp": "^4.0.0", "ramda": "npm:@pnpm/ramda@0.28.1", + "realpath-missing": "^1.1.0", "render-help": "^1.0.3", "safe-execa": "^0.1.3", + "semver": "^7.3.8", "tempy": "^1.0.1" }, "peerDependencies": { diff --git a/patching/plugin-commands-patching/src/getPatchedDependency.ts b/patching/plugin-commands-patching/src/getPatchedDependency.ts new file mode 100644 index 0000000000..e03d9e21d5 --- /dev/null +++ b/patching/plugin-commands-patching/src/getPatchedDependency.ts @@ -0,0 +1,72 @@ +import path from 'path' +import { parseWantedDependency, ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' +import { prompt } from 'enquirer' +import { readCurrentLockfile } from '@pnpm/lockfile-file' +import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' +import { PnpmError } from '@pnpm/error' +import { WANTED_LOCKFILE } from '@pnpm/constants' +import { readModulesManifest } from '@pnpm/modules-yaml' +import realpathMissing from 'realpath-missing' +import semver from 'semver' +import { Config } from '@pnpm/config' + +type GetPatchedDependencyOptions = { + lockfileDir: string +} & Pick + +export async function getPatchedDependency (rawDependency: string, opts: GetPatchedDependencyOptions): Promise { + const dep = parseWantedDependency(rawDependency) + + const { versions, preferredVersions } = await getVersionsFromLockfile(dep, opts) + + if (!preferredVersions.length) { + throw new PnpmError( + 'PATCH_VERSION_NOT_FOUND', + `Can not find ${rawDependency} in project ${opts.lockfileDir}, ${versions.length ? `you can specify currently installed version: ${versions.join(', ')}.` : `did you forget to install ${rawDependency}?`}` + ) + } + + dep.alias = dep.alias ?? rawDependency + if (preferredVersions.length > 1) { + const { version } = await prompt<{ + version: string + }>({ + type: 'select', + name: 'version', + message: 'Choose which version to patch', + choices: versions, + }) + dep.pref = version + } else { + dep.pref = preferredVersions[0] + } + + return dep +} + +async function getVersionsFromLockfile (dep: ParseWantedDependencyResult, opts: GetPatchedDependencyOptions) { + const modulesDir = await realpathMissing(path.join(opts.lockfileDir, opts.modulesDir ?? 'node_modules')) + const modules = await readModulesManifest(modulesDir) + const lockfile = (modules?.virtualStoreDir && await readCurrentLockfile(modules.virtualStoreDir, { + ignoreIncompatible: true, + })) ?? null + + if (!lockfile) { + throw new PnpmError( + 'PATCH_NO_LOCKFILE', + `No ${WANTED_LOCKFILE} found: Cannot patch without a lockfile` + ) + } + + const pkgName = dep.alias && dep.pref ? dep.alias : (dep.pref ?? dep.alias) + + const versions = Object.entries(lockfile.packages ?? {}) + .map(([depPath, pkgSnapshot]) => nameVerFromPkgSnapshot(depPath, pkgSnapshot)) + .filter(({ name }) => name === pkgName) + .map(({ version }) => version) + + return { + versions, + preferredVersions: versions.filter(version => dep.alias && dep.pref ? semver.satisfies(version, dep.pref) : true), + } +} diff --git a/patching/plugin-commands-patching/src/patch.ts b/patching/plugin-commands-patching/src/patch.ts index c5f4c7d419..47d0f1ee06 100644 --- a/patching/plugin-commands-patching/src/patch.ts +++ b/patching/plugin-commands-patching/src/patch.ts @@ -11,7 +11,9 @@ import pick from 'ramda/src/pick' import renderHelp from 'render-help' import tempy from 'tempy' import { PnpmError } from '@pnpm/error' -import { writePackage, ParseWantedDependencyResult } from './writePackage' +import { ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' +import { writePackage } from './writePackage' +import { getPatchedDependency } from './getPatchedDependency' export function rcOptionsTypes () { return pick([], allTypes) @@ -48,7 +50,16 @@ export function help () { }) } -export type PatchCommandOptions = Pick & CreateStoreControllerOptions & { +export type PatchCommandOptions = Pick & CreateStoreControllerOptions & { editDir?: string reporter?: (logObj: LogBase) => void ignoreExisting?: boolean @@ -58,14 +69,24 @@ export async function handler (opts: PatchCommandOptions, params: string[]) { if (opts.editDir && fs.existsSync(opts.editDir) && fs.readdirSync(opts.editDir).length > 0) { throw new PnpmError('PATCH_EDIT_DIR_EXISTS', `The target directory already exists: '${opts.editDir}'`) } + if (!params[0]) { + throw new PnpmError('MISSING_PACKAGE_NAME', '`pnpm patch` requires the package name') + } const editDir = opts.editDir ?? tempy.directory() - const patchedDep = await writePackage(params[0], editDir, opts) + const lockfileDir = opts.lockfileDir ?? opts.dir ?? process.cwd() + const patchedDep = await getPatchedDependency(params[0], { + lockfileDir, + modulesDir: opts.modulesDir, + virtualStoreDir: opts.virtualStoreDir, + }) + + await writePackage(patchedDep, editDir, opts) if (!opts.ignoreExisting && opts.rootProjectManifest?.pnpm?.patchedDependencies) { tryPatchWithExistingPatchFile({ patchedDep, patchedDir: editDir, patchedDependencies: opts.rootProjectManifest.pnpm.patchedDependencies, - lockfileDir: opts.lockfileDir ?? opts.dir ?? process.cwd(), + lockfileDir, }) } return `You can now edit the following folder: ${editDir} diff --git a/patching/plugin-commands-patching/src/patchCommit.ts b/patching/plugin-commands-patching/src/patchCommit.ts index e350f2f6d0..1c716aa6e1 100644 --- a/patching/plugin-commands-patching/src/patchCommit.ts +++ b/patching/plugin-commands-patching/src/patchCommit.ts @@ -11,6 +11,7 @@ import escapeStringRegexp from 'escape-string-regexp' import renderHelp from 'render-help' import tempy from 'tempy' import { writePackage } from './writePackage' +import { parseWantedDependency } from '@pnpm/parse-wanted-dependency' export const rcOptionsTypes = cliOptionsTypes @@ -37,7 +38,7 @@ export async function handler (opts: install.InstallCommandOptions & Pick -export async function writePackage (pkg: string, dest: string, opts: WritePackageOptions): Promise { - const dep = parseWantedDependency(pkg) +export async function writePackage (dep: ParseWantedDependencyResult, dest: string, opts: WritePackageOptions) { const store = await createOrConnectStoreController({ ...opts, packageImportMethod: 'clone-or-copy', @@ -28,5 +25,4 @@ export async function writePackage (pkg: string, dest: string, opts: WritePackag filesResponse, force: true, }) - return dep } diff --git a/patching/plugin-commands-patching/test/patch.test.ts b/patching/plugin-commands-patching/test/patch.test.ts index a4b8837c11..3de264026d 100644 --- a/patching/plugin-commands-patching/test/patch.test.ts +++ b/patching/plugin-commands-patching/test/patch.test.ts @@ -10,31 +10,51 @@ import { patch, patchCommit } from '@pnpm/plugin-commands-patching' import { readProjectManifest } from '@pnpm/read-project-manifest' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { DEFAULT_OPTS } from './utils/index' +import { fixtures } from '@pnpm/test-fixtures' +import * as enquirer from 'enquirer' + +jest.mock('enquirer', () => ({ prompt: jest.fn() })) + +// eslint-disable-next-line +const prompt = enquirer.prompt as any +const f = fixtures(__dirname) +const customModulesDirFixture = f.find('custom-modules-dir') + +const basePatchOption = { + pnpmHomeDir: '', + rawConfig: { + registry: `http://localhost:${REGISTRY_MOCK_PORT}/`, + }, + registries: { default: `http://localhost:${REGISTRY_MOCK_PORT}/` }, + userConfig: {}, + virtualStoreDir: 'node_modules/.pnpm', +} describe('patch and commit', () => { let defaultPatchOption: patch.PatchCommandOptions - beforeEach(() => { + beforeEach(async () => { prepare({ dependencies: { 'is-positive': '1.0.0', }, }) - const cacheDir = path.resolve('cache') const storeDir = path.resolve('store') - defaultPatchOption = { + ...basePatchOption, cacheDir, dir: process.cwd(), - pnpmHomeDir: '', - rawConfig: { - registry: `http://localhost:${REGISTRY_MOCK_PORT}/`, - }, - registries: { default: `http://localhost:${REGISTRY_MOCK_PORT}/` }, storeDir, - userConfig: {}, } + + await install.handler({ + ...DEFAULT_OPTS, + cacheDir, + storeDir, + dir: process.cwd(), + saveLockfile: true, + }) }) test('patch and commit', async () => { @@ -55,6 +75,8 @@ describe('patch and commit', () => { await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [patchDir]) const { manifest } = await readProjectManifest(process.cwd()) @@ -84,6 +106,8 @@ describe('patch and commit', () => { await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [patchDir]) expect(fs.readFileSync('node_modules/is-positive/index.js', 'utf8')).toContain('// test patching') @@ -111,6 +135,8 @@ describe('patch and commit', () => { await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [patchDir]) expect(fs.readFileSync('node_modules/is-positive/index.js', 'utf8')).toContain('// test patching') @@ -126,6 +152,8 @@ describe('patch and commit', () => { await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [patchDir]) const { manifest } = await readProjectManifest(process.cwd()) @@ -171,6 +199,8 @@ describe('patch and commit', () => { await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [patchDir]) const { manifest } = await readProjectManifest(process.cwd()) @@ -187,12 +217,101 @@ describe('patch and commit', () => { expect(fs.existsSync(path.join(patchDir, 'license'))).toBe(true) expect(fs.readFileSync(path.join(patchDir, 'index.js'), 'utf8')).not.toContain('// test patching') }) + + test('patch throw an error if no package specified', async () => { + await expect(() => patch.handler({ ...defaultPatchOption }, [])) + .rejects.toThrow('`pnpm patch` requires the package name') + }) + + test('should throw an error if no installed versions found for patched package', async () => { + await expect(() => patch.handler(defaultPatchOption, ['chalk'])) + .rejects.toThrow(`Can not find chalk in project ${process.cwd()}, did you forget to install chalk?`) + }) + + test('should throw an error if no preferred versions found for patched package', async () => { + await expect(() => patch.handler(defaultPatchOption, ['is-positive@2.0.0'])) + .rejects.toThrow(`Can not find is-positive@2.0.0 in project ${process.cwd()}, you can specify currently installed version: 1.0.0.`) + }) + + test('patch package with installed version', async () => { + const output = await patch.handler(defaultPatchOption, ['is-positive@1']) + const patchDir = getPatchDirFromPatchOutput(output) + const tempDir = os.tmpdir() + expect(patchDir).toContain(tempDir) + expect(fs.existsSync(patchDir)).toBe(true) + expect(JSON.parse(fs.readFileSync(path.join(patchDir, 'package.json'), 'utf8')).version).toBe('1.0.0') + }) +}) + +describe('prompt to choose version', () => { + let defaultPatchOption: patch.PatchCommandOptions + let cacheDir: string + let storeDir: string + beforeEach(() => { + prepare({ + dependencies: { + ava: '5.2.0', + chalk: '4.1.2', + }, + }) + cacheDir = path.resolve('cache') + storeDir = path.resolve('store') + defaultPatchOption = { + ...basePatchOption, + cacheDir, + dir: process.cwd(), + storeDir, + } + }) + + test('prompt to choose version if multiple version founded for patched package', async () => { + await install.handler({ + ...DEFAULT_OPTS, + cacheDir, + storeDir, + dir: process.cwd(), + saveLockfile: true, + }) + prompt.mockResolvedValue({ + version: '5.2.0', + }) + + const output = await patch.handler(defaultPatchOption, ['chalk']) + + expect(prompt.mock.calls[0][0].choices).toEqual(expect.arrayContaining(['5.2.0', '4.1.2'])) + prompt.mockClear() + + const patchDir = getPatchDirFromPatchOutput(output) + const tempDir = os.tmpdir() + + expect(patchDir).toContain(tempDir) + expect(fs.existsSync(patchDir)).toBe(true) + expect(JSON.parse(fs.readFileSync(path.join(patchDir, 'package.json'), 'utf8')).version).toBe('5.2.0') + expect(fs.existsSync(path.join(patchDir, 'source/index.js'))).toBe(true) + + fs.appendFileSync(path.join(patchDir, 'source/index.js'), '// test patching', 'utf8') + await patchCommit.handler({ + ...DEFAULT_OPTS, + dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, + }, [patchDir]) + + const { manifest } = await readProjectManifest(process.cwd()) + expect(manifest.pnpm?.patchedDependencies).toStrictEqual({ + 'chalk@5.2.0': 'patches/chalk@5.2.0.patch', + }) + const patchContent = fs.readFileSync('patches/chalk@5.2.0.patch', 'utf8') + expect(patchContent).toContain('diff --git') + expect(patchContent).toContain('// test patching') + expect(fs.readFileSync('node_modules/.pnpm/ava@5.2.0/node_modules/chalk/source/index.js', 'utf8')).toContain('// test patching') + }) }) describe('patching should work when there is a no EOL in the patched file', () => { let defaultPatchOption: patch.PatchCommandOptions - beforeEach(() => { + beforeEach(async () => { prepare({ dependencies: { 'safe-execa': '0.1.2', @@ -203,16 +322,19 @@ describe('patching should work when there is a no EOL in the patched file', () = const storeDir = path.resolve('store') defaultPatchOption = { + ...basePatchOption, cacheDir, dir: process.cwd(), - pnpmHomeDir: '', - rawConfig: { - registry: `http://localhost:${REGISTRY_MOCK_PORT}/`, - }, - registries: { default: `http://localhost:${REGISTRY_MOCK_PORT}/` }, storeDir, - userConfig: {}, } + + await install.handler({ + ...DEFAULT_OPTS, + cacheDir, + storeDir, + dir: process.cwd(), + saveLockfile: true, + }) }) it('should work when adding content on a newline', async () => { const output = await patch.handler(defaultPatchOption, ['safe-execa@0.1.2']) @@ -228,6 +350,8 @@ describe('patching should work when there is a no EOL in the patched file', () = await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [userPatchDir]) const { manifest } = await readProjectManifest(process.cwd()) @@ -254,6 +378,8 @@ describe('patching should work when there is a no EOL in the patched file', () = await patchCommit.handler({ ...DEFAULT_OPTS, dir: process.cwd(), + frozenLockfile: false, + fixLockfile: true, }, [userPatchDir]) const { manifest } = await readProjectManifest(process.cwd()) @@ -300,15 +426,10 @@ describe('patch and commit in workspaces', () => { storeDir = path.resolve('store') defaultPatchOption = { + ...basePatchOption, cacheDir, dir: process.cwd(), - pnpmHomeDir: '', - rawConfig: { - registry: `http://localhost:${REGISTRY_MOCK_PORT}/`, - }, - registries: { default: `http://localhost:${REGISTRY_MOCK_PORT}/` }, storeDir, - userConfig: {}, } }) @@ -322,11 +443,11 @@ describe('patch and commit in workspaces', () => { allProjects, allProjectsGraph, dir: process.cwd(), + lockfileDir: process.cwd(), selectedProjectsGraph, workspaceDir: process.cwd(), saveLockfile: true, }) - const output = await patch.handler(defaultPatchOption, ['is-positive@1.0.0']) const patchDir = getPatchDirFromPatchOutput(output) const tempDir = os.tmpdir() @@ -350,6 +471,8 @@ describe('patch and commit in workspaces', () => { lockfileDir: process.cwd(), workspaceDir: process.cwd(), saveLockfile: true, + frozenLockfile: false, + fixLockfile: true, }, [patchDir]) const { manifest } = await readProjectManifest(process.cwd()) @@ -366,6 +489,66 @@ describe('patch and commit in workspaces', () => { }) }) +describe('patch with custom modules-dir and virtual-store-dir', () => { + const cacheDir = path.resolve(customModulesDirFixture, 'cache') + const storeDir = path.resolve(customModulesDirFixture, 'store') + const defaultPatchOption = { + ...basePatchOption, + cacheDir, + dir: customModulesDirFixture, + storeDir, + modulesDir: 'fake_modules', + virtualStoreDir: 'fake_modules/.fake_store', + } + + test('should work with custom modules-dir and virtual-store-dir', async () => { + const manifest = fs.readFileSync(path.join(customModulesDirFixture, 'package.json'), 'utf8') + const lockfileYaml = fs.readFileSync(path.join(customModulesDirFixture, 'pnpm-lock.yaml'), 'utf8') + const { allProjects, allProjectsGraph, selectedProjectsGraph } = await readProjects(customModulesDirFixture, []) + await install.handler({ + ...DEFAULT_OPTS, + cacheDir, + storeDir, + dir: customModulesDirFixture, + lockfileDir: customModulesDirFixture, + allProjects, + allProjectsGraph, + selectedProjectsGraph, + workspaceDir: customModulesDirFixture, + saveLockfile: true, + modulesDir: 'fake_modules', + virtualStoreDir: 'fake_modules/.fake_store', + }) + const output = await patch.handler(defaultPatchOption, ['is-positive@1']) + const patchDir = getPatchDirFromPatchOutput(output) + const tempDir = os.tmpdir() + expect(patchDir).toContain(tempDir) + expect(fs.existsSync(patchDir)).toBe(true) + expect(JSON.parse(fs.readFileSync(path.join(patchDir, 'package.json'), 'utf8')).version).toBe('1.0.0') + + fs.appendFileSync(path.join(patchDir, 'index.js'), '// test patching', 'utf8') + + await patchCommit.handler({ + ...DEFAULT_OPTS, + dir: customModulesDirFixture, + saveLockfile: true, + frozenLockfile: false, + fixLockfile: true, + allProjects, + allProjectsGraph, + selectedProjectsGraph, + modulesDir: 'fake_modules', + virtualStoreDir: 'fake_modules/.fake_store', + lockfileDir: customModulesDirFixture, + workspaceDir: customModulesDirFixture, + }, [patchDir]) + expect(fs.readFileSync(path.join(customModulesDirFixture, 'packages/bar/fake_modules/is-positive/index.js'), 'utf8')).toContain('// test patching') + // restore package.json and package-lock.yaml + fs.writeFileSync(path.join(customModulesDirFixture, 'package.json'), manifest, 'utf8') + fs.writeFileSync(path.join(customModulesDirFixture, 'pnpm-lock.yaml'), lockfileYaml, 'utf8') + }) +}) + function getPatchDirFromPatchOutput (output: string) { const [firstLine] = output.split('\n') return firstLine.substring(firstLine.indexOf(':') + 1).trim() diff --git a/patching/plugin-commands-patching/tsconfig.json b/patching/plugin-commands-patching/tsconfig.json index 3381d90c46..9fa50581f0 100644 --- a/patching/plugin-commands-patching/tsconfig.json +++ b/patching/plugin-commands-patching/tsconfig.json @@ -12,6 +12,9 @@ { "path": "../../__utils__/prepare" }, + { + "path": "../../__utils__/test-fixtures" + }, { "path": "../../cli/cli-utils" }, @@ -21,12 +24,24 @@ { "path": "../../config/pick-registry-for-package" }, + { + "path": "../../lockfile/lockfile-file" + }, + { + "path": "../../lockfile/lockfile-utils" + }, + { + "path": "../../packages/constants" + }, { "path": "../../packages/error" }, { "path": "../../packages/parse-wanted-dependency" }, + { + "path": "../../pkg-manager/modules-yaml" + }, { "path": "../../pkg-manager/plugin-commands-installation" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32e0073c21..32e4102544 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2486,12 +2486,24 @@ importers: '@pnpm/config': specifier: workspace:* version: link:../../config/config + '@pnpm/constants': + specifier: workspace:* + version: link:../../packages/constants '@pnpm/error': specifier: workspace:* version: link:../../packages/error + '@pnpm/lockfile-file': + specifier: workspace:* + version: link:../../lockfile/lockfile-file + '@pnpm/lockfile-utils': + specifier: workspace:* + version: link:../../lockfile/lockfile-utils '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 + '@pnpm/modules-yaml': + specifier: workspace:* + version: link:../../pkg-manager/modules-yaml '@pnpm/parse-wanted-dependency': specifier: workspace:* version: link:../../packages/parse-wanted-dependency @@ -2513,18 +2525,27 @@ importers: '@pnpm/store-connection-manager': specifier: workspace:* version: link:../../store/store-connection-manager + enquirer: + specifier: ^2.3.6 + version: 2.3.6 escape-string-regexp: specifier: ^4.0.0 version: 4.0.0 ramda: specifier: npm:@pnpm/ramda@0.28.1 version: /@pnpm/ramda@0.28.1 + realpath-missing: + specifier: ^1.1.0 + version: 1.1.0 render-help: specifier: ^1.0.3 version: 1.0.3 safe-execa: specifier: ^0.1.3 version: 0.1.3 + semver: + specifier: ^7.3.8 + version: 7.3.8 tempy: specifier: ^1.0.1 version: 1.0.1 @@ -2541,9 +2562,15 @@ importers: '@pnpm/registry-mock': specifier: 3.5.0 version: 3.5.0(typanion@3.12.1) + '@pnpm/test-fixtures': + specifier: workspace:* + version: link:../../__utils__/test-fixtures '@types/ramda': specifier: 0.28.20 version: 0.28.20 + '@types/semver': + specifier: 7.3.13 + version: 7.3.13 write-yaml-file: specifier: ^4.2.0 version: 4.2.0 @@ -8006,7 +8033,7 @@ packages: '@pnpm/find-workspace-dir': 5.0.1 '@pnpm/find-workspace-packages': 5.0.36(@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 @@ -8555,7 +8582,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==} diff --git a/pnpm/src/main.ts b/pnpm/src/main.ts index e90ff56948..4e2427b0d7 100644 --- a/pnpm/src/main.ts +++ b/pnpm/src/main.ts @@ -168,7 +168,7 @@ export async function main (inputArgv: string[]) { } if ( - (cmd === 'install' || cmd === 'import' || cmd === 'dedupe' || cmd === 'patch-commit') && + (cmd === 'install' || cmd === 'import' || cmd === 'dedupe' || cmd === 'patch-commit' || cmd === 'patch') && typeof workspaceDir === 'string' ) { cliOptions['recursive'] = true diff --git a/reviewing/list/src/index.ts b/reviewing/list/src/index.ts index 01d7a75483..7183631c15 100644 --- a/reviewing/list/src/index.ts +++ b/reviewing/list/src/index.ts @@ -1,6 +1,7 @@ +import path from 'path' import { readProjectManifestOnly } from '@pnpm/read-project-manifest' import { DependenciesField, Registries } from '@pnpm/types' -import { buildDependenciesHierarchy } from '@pnpm/reviewing.dependencies-hierarchy' +import { PackageNode, buildDependenciesHierarchy } from '@pnpm/reviewing.dependencies-hierarchy' import { createPackagesSearcher } from './createPackagesSearcher' import { renderJson } from './renderJson' import { renderParseable } from './renderParseable' @@ -18,6 +19,36 @@ const DEFAULTS = { showExtraneous: true, } +export function flattenSearchedPackages (pkgs: PackageDependencyHierarchy[], opts: { + lockfileDir: string +}) { + const flattedPkgs: Array = [] + for (const pkg of pkgs) { + _walker([ + ...(pkg.optionalDependencies ?? []), + ...(pkg.dependencies ?? []), + ...(pkg.devDependencies ?? []), + ...(pkg.unsavedDependencies ?? []), + ], path.relative(opts.lockfileDir, pkg.path) || '.') + } + + return flattedPkgs + + function _walker (packages: PackageNode[], depPath: string) { + for (const pkg of packages) { + const nextDepPath = `${depPath} > ${pkg.name}@${pkg.version}` + if (pkg.dependencies?.length) { + _walker(pkg.dependencies, nextDepPath) + } else { + flattedPkgs.push({ + depPath: nextDepPath, + ...pkg, + }) + } + } + } +} + export async function searchForPackages ( packages: string[], projectPaths: string[], From 5c16743a4d5356391f0acad25d400a859b6e08cd Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 14 Mar 2023 03:31:37 +0200 Subject: [PATCH 10/12] test: patch tests should not break fixtures --- patching/plugin-commands-patching/test/patch.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patching/plugin-commands-patching/test/patch.test.ts b/patching/plugin-commands-patching/test/patch.test.ts index 3de264026d..33591ae7e1 100644 --- a/patching/plugin-commands-patching/test/patch.test.ts +++ b/patching/plugin-commands-patching/test/patch.test.ts @@ -1,7 +1,7 @@ import fs from 'fs' import os from 'os' import path from 'path' -import { prepare, preparePackages } from '@pnpm/prepare' +import { prepare, preparePackages, tempDir } from '@pnpm/prepare' import { install } from '@pnpm/plugin-commands-installation' import { readProjects } from '@pnpm/filter-workspace-packages' import writeYamlFile from 'write-yaml-file' @@ -18,7 +18,6 @@ jest.mock('enquirer', () => ({ prompt: jest.fn() })) // eslint-disable-next-line const prompt = enquirer.prompt as any const f = fixtures(__dirname) -const customModulesDirFixture = f.find('custom-modules-dir') const basePatchOption = { pnpmHomeDir: '', @@ -490,6 +489,8 @@ describe('patch and commit in workspaces', () => { }) describe('patch with custom modules-dir and virtual-store-dir', () => { + const customModulesDirFixture = tempDir() + f.copy('custom-modules-dir', customModulesDirFixture) const cacheDir = path.resolve(customModulesDirFixture, 'cache') const storeDir = path.resolve(customModulesDirFixture, 'store') const defaultPatchOption = { From e505b58e33c1e832e4bc619f70101eb96da6b7ba Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 14 Mar 2023 03:38:56 +0200 Subject: [PATCH 11/12] fix: don't extend NODE_PATH in command shims (#5290) close #5285 close #5176 --- .changeset/seven-humans-cover.md | 6 ++++++ config/config/src/index.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/seven-humans-cover.md diff --git a/.changeset/seven-humans-cover.md b/.changeset/seven-humans-cover.md new file mode 100644 index 0000000000..a1120c230c --- /dev/null +++ b/.changeset/seven-humans-cover.md @@ -0,0 +1,6 @@ +--- +"@pnpm/config": major +"pnpm": patch +--- + +Don't extend NODE_PATH in command shims [#5176](https://github.com/pnpm/pnpm/issues/5176). diff --git a/config/config/src/index.ts b/config/config/src/index.ts index a44506fbdf..4afad3fec7 100644 --- a/config/config/src/index.ts +++ b/config/config/src/index.ts @@ -186,7 +186,7 @@ export async function getConfig ( color: 'auto', 'dedupe-peer-dependents': false, 'enable-modules-dir': true, - 'extend-node-path': true, + 'extend-node-path': false, 'fetch-retries': 2, 'fetch-retry-factor': 10, 'fetch-retry-maxtimeout': 60000, From abd556bfac967f8075a396149a84e3ec83f0f9af Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Tue, 14 Mar 2023 03:46:08 +0200 Subject: [PATCH 12/12] chore(release): 7.29.2 --- .changeset/gentle-lies-type.md | 5 ----- .changeset/itchy-onions-battle.md | 5 ----- .changeset/khaki-icons-rest.md | 8 -------- .changeset/loud-geese-obey.md | 6 ------ .changeset/seven-humans-cover.md | 6 ------ .changeset/young-insects-smoke.md | 6 ------ .meta-updater/CHANGELOG.md | 7 +++++++ .meta-updater/package.json | 2 +- __utils__/assert-project/CHANGELOG.md | 6 ++++++ __utils__/assert-project/package.json | 2 +- __utils__/assert-store/CHANGELOG.md | 6 ++++++ __utils__/assert-store/package.json | 2 +- __utils__/prepare/CHANGELOG.md | 6 ++++++ __utils__/prepare/package.json | 2 +- __utils__/test-fixtures/CHANGELOG.md | 6 ++++++ __utils__/test-fixtures/package.json | 2 +- cli/cli-utils/CHANGELOG.md | 9 +++++++++ cli/cli-utils/package.json | 2 +- cli/default-reporter/CHANGELOG.md | 7 +++++++ cli/default-reporter/package.json | 2 +- config/config/CHANGELOG.md | 11 +++++++++++ config/config/package.json | 2 +- config/plugin-commands-config/CHANGELOG.md | 8 ++++++++ config/plugin-commands-config/package.json | 2 +- env/node.fetcher/CHANGELOG.md | 7 +++++++ env/node.fetcher/package.json | 2 +- env/node.resolver/CHANGELOG.md | 6 ++++++ env/node.resolver/package.json | 2 +- env/plugin-commands-env/CHANGELOG.md | 10 ++++++++++ env/plugin-commands-env/package.json | 2 +- exec/build-modules/CHANGELOG.md | 8 ++++++++ exec/build-modules/package.json | 2 +- exec/lifecycle/CHANGELOG.md | 6 ++++++ exec/lifecycle/package.json | 2 +- exec/plugin-commands-rebuild/CHANGELOG.md | 14 ++++++++++++++ exec/plugin-commands-rebuild/package.json | 2 +- .../CHANGELOG.md | 11 +++++++++++ .../package.json | 2 +- exec/prepare-package/CHANGELOG.md | 6 ++++++ exec/prepare-package/package.json | 2 +- fetching/directory-fetcher/CHANGELOG.md | 6 ++++++ fetching/directory-fetcher/package.json | 2 +- fetching/git-fetcher/CHANGELOG.md | 6 ++++++ fetching/git-fetcher/package.json | 2 +- fetching/tarball-fetcher/CHANGELOG.md | 8 ++++++++ fetching/tarball-fetcher/package.json | 2 +- fs/find-packages/CHANGELOG.md | 6 ++++++ fs/find-packages/package.json | 2 +- fs/graceful-fs/CHANGELOG.md | 6 ++++++ fs/graceful-fs/package.json | 2 +- fs/indexed-pkg-importer/CHANGELOG.md | 8 ++++++++ fs/indexed-pkg-importer/package.json | 2 +- hooks/pnpmfile/CHANGELOG.md | 6 ++++++ hooks/pnpmfile/package.json | 2 +- lockfile/audit/CHANGELOG.md | 9 +++++++++ lockfile/audit/package.json | 2 +- lockfile/lockfile-file/CHANGELOG.md | 6 ++++++ lockfile/lockfile-file/package.json | 2 +- lockfile/lockfile-to-pnp/CHANGELOG.md | 7 +++++++ lockfile/lockfile-to-pnp/package.json | 2 +- lockfile/plugin-commands-audit/CHANGELOG.md | 13 +++++++++++++ lockfile/plugin-commands-audit/package.json | 2 +- packages/make-dedicated-lockfile/CHANGELOG.md | 9 +++++++++ packages/make-dedicated-lockfile/package.json | 2 +- packages/mount-modules/CHANGELOG.md | 10 ++++++++++ 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 | 6 ++++++ packages/plugin-commands-setup/package.json | 2 +- .../plugin-commands-patching/CHANGELOG.md | 14 ++++++++++++++ .../plugin-commands-patching/package.json | 2 +- pkg-manager/client/CHANGELOG.md | 9 +++++++++ pkg-manager/client/package.json | 2 +- pkg-manager/core/CHANGELOG.md | 19 +++++++++++++++++++ pkg-manager/core/package.json | 2 +- pkg-manager/get-context/CHANGELOG.md | 8 ++++++++ pkg-manager/get-context/package.json | 2 +- pkg-manager/headless/CHANGELOG.md | 16 ++++++++++++++++ pkg-manager/headless/package.json | 2 +- pkg-manager/hoist/CHANGELOG.md | 6 ++++++ pkg-manager/hoist/package.json | 2 +- pkg-manager/link-bins/CHANGELOG.md | 6 ++++++ pkg-manager/link-bins/package.json | 2 +- pkg-manager/package-requester/CHANGELOG.md | 8 ++++++++ pkg-manager/package-requester/package.json | 2 +- .../plugin-commands-installation/CHANGELOG.md | 19 +++++++++++++++++++ .../plugin-commands-installation/package.json | 2 +- .../read-projects-context/CHANGELOG.md | 7 +++++++ .../read-projects-context/package.json | 2 +- pkg-manager/resolve-dependencies/CHANGELOG.md | 6 ++++++ pkg-manager/resolve-dependencies/package.json | 2 +- pkg-manifest/exportable-manifest/CHANGELOG.md | 6 ++++++ pkg-manifest/exportable-manifest/package.json | 2 +- .../read-project-manifest/CHANGELOG.md | 7 +++++++ .../read-project-manifest/package.json | 2 +- pnpm/CHANGELOG.md | 10 ++++++++++ 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 | 10 ++++++++++ releasing/plugin-commands-deploy/package.json | 2 +- .../plugin-commands-publishing/CHANGELOG.md | 11 +++++++++++ .../plugin-commands-publishing/package.json | 2 +- resolving/default-resolver/CHANGELOG.md | 7 +++++++ resolving/default-resolver/package.json | 2 +- resolving/local-resolver/CHANGELOG.md | 8 ++++++++ resolving/local-resolver/package.json | 2 +- resolving/npm-resolver/CHANGELOG.md | 7 +++++++ resolving/npm-resolver/package.json | 2 +- reviewing/dependencies-hierarchy/CHANGELOG.md | 7 +++++++ reviewing/dependencies-hierarchy/package.json | 2 +- reviewing/license-scanner/CHANGELOG.md | 9 +++++++++ reviewing/license-scanner/package.json | 2 +- reviewing/list/CHANGELOG.md | 8 ++++++++ reviewing/list/package.json | 2 +- reviewing/outdated/CHANGELOG.md | 9 +++++++++ reviewing/outdated/package.json | 2 +- .../plugin-commands-licenses/CHANGELOG.md | 11 +++++++++++ .../plugin-commands-licenses/package.json | 2 +- .../plugin-commands-listing/CHANGELOG.md | 10 ++++++++++ .../plugin-commands-listing/package.json | 2 +- .../plugin-commands-outdated/CHANGELOG.md | 12 ++++++++++++ .../plugin-commands-outdated/package.json | 2 +- store/cafs/CHANGELOG.md | 7 +++++++ store/cafs/package.json | 2 +- store/create-cafs-store/CHANGELOG.md | 8 ++++++++ store/create-cafs-store/package.json | 2 +- store/package-store/CHANGELOG.md | 8 ++++++++ store/package-store/package.json | 2 +- store/plugin-commands-server/CHANGELOG.md | 10 ++++++++++ store/plugin-commands-server/package.json | 2 +- store/plugin-commands-store/CHANGELOG.md | 11 +++++++++++ store/plugin-commands-store/package.json | 2 +- store/store-connection-manager/CHANGELOG.md | 10 ++++++++++ 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 +- 146 files changed, 646 insertions(+), 109 deletions(-) delete mode 100644 .changeset/gentle-lies-type.md delete mode 100644 .changeset/itchy-onions-battle.md delete mode 100644 .changeset/khaki-icons-rest.md delete mode 100644 .changeset/loud-geese-obey.md delete mode 100644 .changeset/seven-humans-cover.md delete mode 100644 .changeset/young-insects-smoke.md diff --git a/.changeset/gentle-lies-type.md b/.changeset/gentle-lies-type.md deleted file mode 100644 index bc247baa1e..0000000000 --- a/.changeset/gentle-lies-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@pnpm/graceful-fs": minor ---- - -Add copyFile, link, stat. diff --git a/.changeset/itchy-onions-battle.md b/.changeset/itchy-onions-battle.md deleted file mode 100644 index 8b61950818..0000000000 --- a/.changeset/itchy-onions-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"pnpm": patch ---- - -Clean up child processes when process exited [#6162](https://github.com/pnpm/pnpm/issues/6162). diff --git a/.changeset/khaki-icons-rest.md b/.changeset/khaki-icons-rest.md deleted file mode 100644 index 3430f625cb..0000000000 --- a/.changeset/khaki-icons-rest.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@pnpm/plugin-commands-patching": patch -"@pnpm/audit": patch -"@pnpm/list": patch -"pnpm": patch ---- - -When patch package does not specify a version, use locally installed version by default [#6192](https://github.com/pnpm/pnpm/issues/6192). diff --git a/.changeset/loud-geese-obey.md b/.changeset/loud-geese-obey.md deleted file mode 100644 index 35519cc8e3..0000000000 --- a/.changeset/loud-geese-obey.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@pnpm/lockfile-file": patch -"pnpm": patch ---- - -`patchedDependencies` are now sorted consistently in the lockfile [#6208](https://github.com/pnpm/pnpm/pull/6208). diff --git a/.changeset/seven-humans-cover.md b/.changeset/seven-humans-cover.md deleted file mode 100644 index a1120c230c..0000000000 --- a/.changeset/seven-humans-cover.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@pnpm/config": major -"pnpm": patch ---- - -Don't extend NODE_PATH in command shims [#5176](https://github.com/pnpm/pnpm/issues/5176). diff --git a/.changeset/young-insects-smoke.md b/.changeset/young-insects-smoke.md deleted file mode 100644 index d4c19842ee..0000000000 --- a/.changeset/young-insects-smoke.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@pnpm/fs.indexed-pkg-importer": patch -"pnpm": patch ---- - -Retry copying file on EBUSY error [#6201](https://github.com/pnpm/pnpm/issues/6201). diff --git a/.meta-updater/CHANGELOG.md b/.meta-updater/CHANGELOG.md index a55fe09ad3..7511bcbab3 100644 --- a/.meta-updater/CHANGELOG.md +++ b/.meta-updater/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm-private/updater +## 0.4.10 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + ## 0.4.9 ### Patch Changes diff --git a/.meta-updater/package.json b/.meta-updater/package.json index 9f789600f3..8a72ecb9f6 100644 --- a/.meta-updater/package.json +++ b/.meta-updater/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm-private/updater", - "version": "0.4.9", + "version": "0.4.10", "private": true, "type": "module", "scripts": { diff --git a/__utils__/assert-project/CHANGELOG.md b/__utils__/assert-project/CHANGELOG.md index 26aaf88edb..986897ac84 100644 --- a/__utils__/assert-project/CHANGELOG.md +++ b/__utils__/assert-project/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/assert-project +## 2.3.21 + +### Patch Changes + +- @pnpm/assert-store@1.0.58 + ## 2.3.20 ### Patch Changes diff --git a/__utils__/assert-project/package.json b/__utils__/assert-project/package.json index 1b7fdb2c9a..f7c33bc391 100644 --- a/__utils__/assert-project/package.json +++ b/__utils__/assert-project/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/assert-project", "description": "Utils for testing projects that use pnpm", - "version": "2.3.20", + "version": "2.3.21", "author": { "name": "Zoltan Kochan", "email": "z@kochan.io", diff --git a/__utils__/assert-store/CHANGELOG.md b/__utils__/assert-store/CHANGELOG.md index 5bde913e8b..56a2b8efac 100644 --- a/__utils__/assert-store/CHANGELOG.md +++ b/__utils__/assert-store/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/assert-store +## 1.0.58 + +### Patch Changes + +- @pnpm/cafs@6.0.2 + ## 1.0.57 ### Patch Changes diff --git a/__utils__/assert-store/package.json b/__utils__/assert-store/package.json index 712685dad3..38b8e121eb 100644 --- a/__utils__/assert-store/package.json +++ b/__utils__/assert-store/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/assert-store", "description": "Utils for testing pnpm store", - "version": "1.0.57", + "version": "1.0.58", "author": { "name": "Zoltan Kochan", "email": "z@kochan.io", diff --git a/__utils__/prepare/CHANGELOG.md b/__utils__/prepare/CHANGELOG.md index 17f6d66086..ee98755d26 100644 --- a/__utils__/prepare/CHANGELOG.md +++ b/__utils__/prepare/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/prepare +## 0.0.64 + +### Patch Changes + +- @pnpm/assert-project@2.3.21 + ## 0.0.63 ### Patch Changes diff --git a/__utils__/prepare/package.json b/__utils__/prepare/package.json index 56e21a90d7..f186ff3d31 100644 --- a/__utils__/prepare/package.json +++ b/__utils__/prepare/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/prepare", - "version": "0.0.63", + "version": "0.0.64", "main": "lib/index.js", "types": "lib/index.d.ts", "dependencies": { diff --git a/__utils__/test-fixtures/CHANGELOG.md b/__utils__/test-fixtures/CHANGELOG.md index 8804b77bdc..8001e4e712 100644 --- a/__utils__/test-fixtures/CHANGELOG.md +++ b/__utils__/test-fixtures/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/test-fixtures +## 0.0.33 + +### Patch Changes + +- @pnpm/prepare@0.0.64 + ## 0.0.32 ### Patch Changes diff --git a/__utils__/test-fixtures/package.json b/__utils__/test-fixtures/package.json index 6fd94d4e17..8c930fa74e 100644 --- a/__utils__/test-fixtures/package.json +++ b/__utils__/test-fixtures/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/test-fixtures", "description": "Test fixtures", - "version": "0.0.32", + "version": "0.0.33", "author": { "name": "Zoltan Kochan", "email": "z@kochan.io", diff --git a/cli/cli-utils/CHANGELOG.md b/cli/cli-utils/CHANGELOG.md index 295d7f50b8..7057628059 100644 --- a/cli/cli-utils/CHANGELOG.md +++ b/cli/cli-utils/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/cli-utils +## 1.1.5 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/default-reporter@11.0.40 + ## 1.1.4 ### Patch Changes diff --git a/cli/cli-utils/package.json b/cli/cli-utils/package.json index fae97f1675..2703d709ae 100644 --- a/cli/cli-utils/package.json +++ b/cli/cli-utils/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/cli-utils", - "version": "1.1.4", + "version": "1.1.5", "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 8a3f6a8e5a..f5a89557e8 100644 --- a/cli/default-reporter/CHANGELOG.md +++ b/cli/default-reporter/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/default-reporter +## 11.0.40 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + ## 11.0.39 ### Patch Changes diff --git a/cli/default-reporter/package.json b/cli/default-reporter/package.json index f3cf24207d..12c4c3316e 100644 --- a/cli/default-reporter/package.json +++ b/cli/default-reporter/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/default-reporter", - "version": "11.0.39", + "version": "11.0.40", "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 22731e625d..5d0fb45626 100644 --- a/config/config/CHANGELOG.md +++ b/config/config/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/config +## 17.0.0 + +### Major Changes + +- e505b58e3: Don't extend NODE_PATH in command shims [#5176](https://github.com/pnpm/pnpm/issues/5176). + +### Patch Changes + +- @pnpm/read-project-manifest@4.1.4 +- @pnpm/pnpmfile@4.0.38 + ## 16.7.2 ### Patch Changes diff --git a/config/config/package.json b/config/config/package.json index c046957a60..e732c98358 100644 --- a/config/config/package.json +++ b/config/config/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/config", - "version": "16.7.2", + "version": "17.0.0", "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 33067aa899..261cb404cd 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.23 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + ## 1.0.22 ### Patch Changes diff --git a/config/plugin-commands-config/package.json b/config/plugin-commands-config/package.json index d70fed6e04..4eaf78e5c4 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.22", + "version": "1.0.23", "description": "Commands for reading and writing settings to/from config files", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/env/node.fetcher/CHANGELOG.md b/env/node.fetcher/CHANGELOG.md index c95339f42e..4346729b48 100644 --- a/env/node.fetcher/CHANGELOG.md +++ b/env/node.fetcher/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/node.fetcher +## 2.0.14 + +### Patch Changes + +- @pnpm/tarball-fetcher@14.1.4 +- @pnpm/create-cafs-store@3.1.6 + ## 2.0.13 ### Patch Changes diff --git a/env/node.fetcher/package.json b/env/node.fetcher/package.json index da88f49bde..0dca93fc79 100644 --- a/env/node.fetcher/package.json +++ b/env/node.fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/node.fetcher", - "version": "2.0.13", + "version": "2.0.14", "description": "Node.js artifacts fetcher", "funding": "https://opencollective.com/pnpm", "main": "lib/index.js", diff --git a/env/node.resolver/CHANGELOG.md b/env/node.resolver/CHANGELOG.md index f0529084c0..de0080f3d6 100644 --- a/env/node.resolver/CHANGELOG.md +++ b/env/node.resolver/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/node.resolver +## 1.1.11 + +### Patch Changes + +- @pnpm/node.fetcher@2.0.14 + ## 1.1.10 ### Patch Changes diff --git a/env/node.resolver/package.json b/env/node.resolver/package.json index a78660096d..ff1b61f283 100644 --- a/env/node.resolver/package.json +++ b/env/node.resolver/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/node.resolver", - "version": "1.1.10", + "version": "1.1.11", "description": "Resolves a Node.js version specifier to an exact Node.js version", "funding": "https://opencollective.com/pnpm", "main": "lib/index.js", diff --git a/env/plugin-commands-env/CHANGELOG.md b/env/plugin-commands-env/CHANGELOG.md index eff94475f6..176d93a1d6 100644 --- a/env/plugin-commands-env/CHANGELOG.md +++ b/env/plugin-commands-env/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-env +## 3.1.34 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + - @pnpm/node.fetcher@2.0.14 + - @pnpm/node.resolver@1.1.11 + ## 3.1.33 ### Patch Changes diff --git a/env/plugin-commands-env/package.json b/env/plugin-commands-env/package.json index d1ed26ddf7..e8b42fcf47 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.33", + "version": "3.1.34", "description": "pnpm commands for managing Node.js", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/exec/build-modules/CHANGELOG.md b/exec/build-modules/CHANGELOG.md index 4c2725e3fc..6412585053 100644 --- a/exec/build-modules/CHANGELOG.md +++ b/exec/build-modules/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/build-modules +## 10.1.7 + +### Patch Changes + +- @pnpm/link-bins@8.0.9 +- @pnpm/lifecycle@14.1.7 +- @pnpm/fs.hard-link-dir@1.0.3 + ## 10.1.6 ### Patch Changes diff --git a/exec/build-modules/package.json b/exec/build-modules/package.json index b176981939..317a798e0a 100644 --- a/exec/build-modules/package.json +++ b/exec/build-modules/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/build-modules", - "version": "10.1.6", + "version": "10.1.7", "description": "Build packages in node_modules", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/exec/lifecycle/CHANGELOG.md b/exec/lifecycle/CHANGELOG.md index 9312ed16e7..dc1d31f826 100644 --- a/exec/lifecycle/CHANGELOG.md +++ b/exec/lifecycle/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/lifecycle +## 14.1.7 + +### Patch Changes + +- @pnpm/directory-fetcher@5.1.6 + ## 14.1.6 ### Patch Changes diff --git a/exec/lifecycle/package.json b/exec/lifecycle/package.json index 5c241d0070..9a0ebc734d 100644 --- a/exec/lifecycle/package.json +++ b/exec/lifecycle/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/lifecycle", - "version": "14.1.6", + "version": "14.1.7", "description": "Package lifecycle hook runner", "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 24e0b9af85..323520ceb5 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.5 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/get-context@8.2.4 + - @pnpm/cli-utils@1.1.5 + - @pnpm/store-connection-manager@5.2.18 + - @pnpm/link-bins@8.0.9 + - @pnpm/find-workspace-packages@5.0.40 + - @pnpm/lifecycle@14.1.7 + - @pnpm/fs.hard-link-dir@1.0.3 + ## 7.1.4 ### Patch Changes diff --git a/exec/plugin-commands-rebuild/package.json b/exec/plugin-commands-rebuild/package.json index e61ef6f3cc..fc1e6a7965 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.1.4", + "version": "7.1.5", "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 37b320f0a8..eddf70481c 100644 --- a/exec/plugin-commands-script-runners/CHANGELOG.md +++ b/exec/plugin-commands-script-runners/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/plugin-commands-script-runners +## 6.5.5 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/plugin-commands-installation@11.5.5 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/cli-utils@1.1.5 + - @pnpm/lifecycle@14.1.7 + ## 6.5.4 ### Patch Changes diff --git a/exec/plugin-commands-script-runners/package.json b/exec/plugin-commands-script-runners/package.json index ce0638a009..d5da88d377 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.5.4", + "version": "6.5.5", "description": "Commands for running scripts", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/exec/prepare-package/CHANGELOG.md b/exec/prepare-package/CHANGELOG.md index 2fa1b600eb..760792d0c5 100644 --- a/exec/prepare-package/CHANGELOG.md +++ b/exec/prepare-package/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/prepare-package +## 4.1.2 + +### Patch Changes + +- @pnpm/lifecycle@14.1.7 + ## 4.1.1 ### Patch Changes diff --git a/exec/prepare-package/package.json b/exec/prepare-package/package.json index 42d9bcc8c7..9689d301d9 100644 --- a/exec/prepare-package/package.json +++ b/exec/prepare-package/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/prepare-package", - "version": "4.1.1", + "version": "4.1.2", "description": "Prepares a Git-hosted package", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/fetching/directory-fetcher/CHANGELOG.md b/fetching/directory-fetcher/CHANGELOG.md index f122218067..d178181401 100644 --- a/fetching/directory-fetcher/CHANGELOG.md +++ b/fetching/directory-fetcher/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/directory-fetcher +## 5.1.6 + +### Patch Changes + +- @pnpm/read-project-manifest@4.1.4 + ## 5.1.5 ### Patch Changes diff --git a/fetching/directory-fetcher/package.json b/fetching/directory-fetcher/package.json index 551c9cafbb..5c156f6c61 100644 --- a/fetching/directory-fetcher/package.json +++ b/fetching/directory-fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/directory-fetcher", - "version": "5.1.5", + "version": "5.1.6", "description": "A fetcher for local directory packages", "funding": "https://opencollective.com/pnpm", "main": "lib/index.js", diff --git a/fetching/git-fetcher/CHANGELOG.md b/fetching/git-fetcher/CHANGELOG.md index 19b497914e..f25583a898 100644 --- a/fetching/git-fetcher/CHANGELOG.md +++ b/fetching/git-fetcher/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/git-fetcher +## 8.0.2 + +### Patch Changes + +- @pnpm/prepare-package@4.1.2 + ## 8.0.1 ### Patch Changes diff --git a/fetching/git-fetcher/package.json b/fetching/git-fetcher/package.json index d67b47c11a..e75312de18 100644 --- a/fetching/git-fetcher/package.json +++ b/fetching/git-fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/git-fetcher", - "version": "8.0.1", + "version": "8.0.2", "description": "A fetcher for git-hosted packages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/fetching/tarball-fetcher/CHANGELOG.md b/fetching/tarball-fetcher/CHANGELOG.md index 4160c18b86..88b742f389 100644 --- a/fetching/tarball-fetcher/CHANGELOG.md +++ b/fetching/tarball-fetcher/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/tarball-fetcher +## 14.1.4 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + - @pnpm/prepare-package@4.1.2 + ## 14.1.3 ### Patch Changes diff --git a/fetching/tarball-fetcher/package.json b/fetching/tarball-fetcher/package.json index 6adc26e08f..ac6ebb2c2e 100644 --- a/fetching/tarball-fetcher/package.json +++ b/fetching/tarball-fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/tarball-fetcher", - "version": "14.1.3", + "version": "14.1.4", "description": "Fetcher for packages hosted as tarballs", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/fs/find-packages/CHANGELOG.md b/fs/find-packages/CHANGELOG.md index 45114365a3..d62e345ec1 100644 --- a/fs/find-packages/CHANGELOG.md +++ b/fs/find-packages/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/fs.find-packages +## 1.0.3 + +### Patch Changes + +- @pnpm/read-project-manifest@4.1.4 + ## 1.0.2 ### Patch Changes diff --git a/fs/find-packages/package.json b/fs/find-packages/package.json index b5bbdfbff2..37490e7929 100644 --- a/fs/find-packages/package.json +++ b/fs/find-packages/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/fs.find-packages", - "version": "1.0.2", + "version": "1.0.3", "description": "Find all packages inside a directory", "main": "lib/index.js", "files": [ diff --git a/fs/graceful-fs/CHANGELOG.md b/fs/graceful-fs/CHANGELOG.md index 1e78d1b6ad..b6e2428abb 100644 --- a/fs/graceful-fs/CHANGELOG.md +++ b/fs/graceful-fs/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/graceful-fs +## 2.1.0 + +### Minor Changes + +- 955874422: Add copyFile, link, stat. + ## 2.0.0 ### Major Changes diff --git a/fs/graceful-fs/package.json b/fs/graceful-fs/package.json index 1fd622c4a0..0e4dda79ab 100644 --- a/fs/graceful-fs/package.json +++ b/fs/graceful-fs/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/graceful-fs", - "version": "2.0.0", + "version": "2.1.0", "description": "Promisified graceful-fs", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/fs/indexed-pkg-importer/CHANGELOG.md b/fs/indexed-pkg-importer/CHANGELOG.md index a1efcc852e..f4624c4cd8 100644 --- a/fs/indexed-pkg-importer/CHANGELOG.md +++ b/fs/indexed-pkg-importer/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/fs.indexed-pkg-importer +## 2.1.4 + +### Patch Changes + +- 955874422: Retry copying file on EBUSY error [#6201](https://github.com/pnpm/pnpm/issues/6201). +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + ## 2.1.3 ### Patch Changes diff --git a/fs/indexed-pkg-importer/package.json b/fs/indexed-pkg-importer/package.json index 8c773735b0..774e024cfd 100644 --- a/fs/indexed-pkg-importer/package.json +++ b/fs/indexed-pkg-importer/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/fs.indexed-pkg-importer", "description": "Replicates indexed directories using hard links, copies, or cloning", - "version": "2.1.3", + "version": "2.1.4", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/hooks/pnpmfile/CHANGELOG.md b/hooks/pnpmfile/CHANGELOG.md index d41fd2b993..bcedd177aa 100644 --- a/hooks/pnpmfile/CHANGELOG.md +++ b/hooks/pnpmfile/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/pnpmfile +## 4.0.38 + +### Patch Changes + +- @pnpm/core@8.0.2 + ## 4.0.37 ### Patch Changes diff --git a/hooks/pnpmfile/package.json b/hooks/pnpmfile/package.json index 0cf1d9e958..66365aed2b 100644 --- a/hooks/pnpmfile/package.json +++ b/hooks/pnpmfile/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/pnpmfile", - "version": "4.0.37", + "version": "4.0.38", "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 6479ed0daa..da14c37410 100644 --- a/lockfile/audit/CHANGELOG.md +++ b/lockfile/audit/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/audit +## 6.1.8 + +### Patch Changes + +- 185ab01ad: When patch package does not specify a version, use locally installed version by default [#6192](https://github.com/pnpm/pnpm/issues/6192). +- Updated dependencies [185ab01ad] + - @pnpm/list@8.2.2 + - @pnpm/read-project-manifest@4.1.4 + ## 6.1.7 ### Patch Changes diff --git a/lockfile/audit/package.json b/lockfile/audit/package.json index da03b16605..de7c552ed1 100644 --- a/lockfile/audit/package.json +++ b/lockfile/audit/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/audit", - "version": "6.1.7", + "version": "6.1.8", "description": "Audit a lockfile", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/lockfile/lockfile-file/CHANGELOG.md b/lockfile/lockfile-file/CHANGELOG.md index 8d73f15b6d..ce00caaa94 100644 --- a/lockfile/lockfile-file/CHANGELOG.md +++ b/lockfile/lockfile-file/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/lockfile-file +## 7.0.6 + +### Patch Changes + +- 787c43dcc: `patchedDependencies` are now sorted consistently in the lockfile [#6208](https://github.com/pnpm/pnpm/pull/6208). + ## 7.0.5 ### Patch Changes diff --git a/lockfile/lockfile-file/package.json b/lockfile/lockfile-file/package.json index 3dd29fea4c..3d16094a7c 100644 --- a/lockfile/lockfile-file/package.json +++ b/lockfile/lockfile-file/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/lockfile-file", - "version": "7.0.5", + "version": "7.0.6", "description": "Read/write pnpm-lock.yaml files", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/lockfile/lockfile-to-pnp/CHANGELOG.md b/lockfile/lockfile-to-pnp/CHANGELOG.md index 2215993af9..647ce8c8fd 100644 --- a/lockfile/lockfile-to-pnp/CHANGELOG.md +++ b/lockfile/lockfile-to-pnp/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/lockfile-to-pnp +## 2.0.14 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + ## 2.0.13 ### Patch Changes diff --git a/lockfile/lockfile-to-pnp/package.json b/lockfile/lockfile-to-pnp/package.json index 5904601522..62c1004c27 100644 --- a/lockfile/lockfile-to-pnp/package.json +++ b/lockfile/lockfile-to-pnp/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/lockfile-to-pnp", - "version": "2.0.13", + "version": "2.0.14", "description": "Creates a Plug'n'Play file from a pnpm-lock.yaml", "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 2ff00eb7c6..a10e5bf237 100644 --- a/lockfile/plugin-commands-audit/CHANGELOG.md +++ b/lockfile/plugin-commands-audit/CHANGELOG.md @@ -1,5 +1,18 @@ # @pnpm/plugin-commands-audit +## 7.2.13 + +### Patch Changes + +- Updated dependencies [185ab01ad] +- Updated dependencies [787c43dcc] +- Updated dependencies [e505b58e3] + - @pnpm/audit@6.1.8 + - @pnpm/lockfile-file@7.0.6 + - @pnpm/config@17.0.0 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/cli-utils@1.1.5 + ## 7.2.12 ### Patch Changes diff --git a/lockfile/plugin-commands-audit/package.json b/lockfile/plugin-commands-audit/package.json index 124e7cda0e..5c68a4543a 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.12", + "version": "7.2.13", "description": "pnpm commands for dependencies audit", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/make-dedicated-lockfile/CHANGELOG.md b/packages/make-dedicated-lockfile/CHANGELOG.md index edf123cf07..81ed1f5808 100644 --- a/packages/make-dedicated-lockfile/CHANGELOG.md +++ b/packages/make-dedicated-lockfile/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/make-dedicated-lockfile +## 0.4.14 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/exportable-manifest@4.0.8 + ## 0.4.13 ### Patch Changes diff --git a/packages/make-dedicated-lockfile/package.json b/packages/make-dedicated-lockfile/package.json index 043919980c..23ea21897b 100644 --- a/packages/make-dedicated-lockfile/package.json +++ b/packages/make-dedicated-lockfile/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/make-dedicated-lockfile", - "version": "0.4.13", + "version": "0.4.14", "description": "Creates a dedicated lockfile for a subset of workspace projects", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/mount-modules/CHANGELOG.md b/packages/mount-modules/CHANGELOG.md index 3ea7bbb5b2..f679e3ca4c 100644 --- a/packages/mount-modules/CHANGELOG.md +++ b/packages/mount-modules/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/mount-modules +## 0.3.40 + +### Patch Changes + +- Updated dependencies [787c43dcc] +- Updated dependencies [e505b58e3] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/config@17.0.0 + - @pnpm/cafs@6.0.2 + ## 0.3.39 ### Patch Changes diff --git a/packages/mount-modules/package.json b/packages/mount-modules/package.json index a10fc5d289..2862546676 100644 --- a/packages/mount-modules/package.json +++ b/packages/mount-modules/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/mount-modules", - "version": "0.3.39", + "version": "0.3.40", "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 9596ece602..65710ab764 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.38 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + ## 1.0.37 ### Patch Changes diff --git a/packages/plugin-commands-doctor/package.json b/packages/plugin-commands-doctor/package.json index 3fb73e6bf4..826bc86436 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.37", + "version": "1.0.38", "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 b0085b7a1d..0d6827fbcd 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.40 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + ## 2.0.39 ### Patch Changes diff --git a/packages/plugin-commands-init/package.json b/packages/plugin-commands-init/package.json index 7ab3e2ba5f..6af700b5c9 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.39", + "version": "2.0.40", "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 9742f03d3d..b11a9858b9 100644 --- a/packages/plugin-commands-setup/CHANGELOG.md +++ b/packages/plugin-commands-setup/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/plugin-commands-setup +## 3.0.40 + +### Patch Changes + +- @pnpm/cli-utils@1.1.5 + ## 3.0.39 ### Patch Changes diff --git a/packages/plugin-commands-setup/package.json b/packages/plugin-commands-setup/package.json index 754d5bcc31..dcdcffdf42 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.39", + "version": "3.0.40", "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 a130f85a8f..b95c2ad987 100644 --- a/patching/plugin-commands-patching/CHANGELOG.md +++ b/patching/plugin-commands-patching/CHANGELOG.md @@ -1,5 +1,19 @@ # @pnpm/plugin-commands-patching +## 2.1.14 + +### Patch Changes + +- 185ab01ad: When patch package does not specify a version, use locally installed version by default [#6192](https://github.com/pnpm/pnpm/issues/6192). +- Updated dependencies [787c43dcc] +- Updated dependencies [e505b58e3] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/config@17.0.0 + - @pnpm/plugin-commands-installation@11.5.5 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/cli-utils@1.1.5 + - @pnpm/store-connection-manager@5.2.18 + ## 2.1.13 ### Patch Changes diff --git a/patching/plugin-commands-patching/package.json b/patching/plugin-commands-patching/package.json index a2c40d2152..0fd1a239a2 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.13", + "version": "2.1.14", "description": "Commands for creating patches", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/client/CHANGELOG.md b/pkg-manager/client/CHANGELOG.md index 6bd5a5aefa..e9541ce17d 100644 --- a/pkg-manager/client/CHANGELOG.md +++ b/pkg-manager/client/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/client +## 9.1.5 + +### Patch Changes + +- @pnpm/tarball-fetcher@14.1.4 +- @pnpm/directory-fetcher@5.1.6 +- @pnpm/default-resolver@17.0.11 +- @pnpm/git-fetcher@8.0.2 + ## 9.1.4 ### Patch Changes diff --git a/pkg-manager/client/package.json b/pkg-manager/client/package.json index 1a7ee11ad6..791074a526 100644 --- a/pkg-manager/client/package.json +++ b/pkg-manager/client/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/client", - "version": "9.1.4", + "version": "9.1.5", "description": "Creates the package resolve and fetch functions", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/core/CHANGELOG.md b/pkg-manager/core/CHANGELOG.md index 9c3b296ca0..d2cd59ec4e 100644 --- a/pkg-manager/core/CHANGELOG.md +++ b/pkg-manager/core/CHANGELOG.md @@ -1,5 +1,24 @@ # @pnpm/core +## 8.0.2 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/package-requester@20.1.7 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/lockfile-to-pnp@2.0.14 + - @pnpm/get-context@8.2.4 + - @pnpm/headless@19.5.2 + - @pnpm/link-bins@8.0.9 + - @pnpm/resolve-dependencies@30.0.2 + - @pnpm/lifecycle@14.1.7 + - @pnpm/build-modules@10.1.7 + - @pnpm/hoist@7.0.16 + - @pnpm/symlink-dependency@6.0.3 + - @pnpm/crypto.base32-hash@1.0.1 + ## 8.0.1 ### Patch Changes diff --git a/pkg-manager/core/package.json b/pkg-manager/core/package.json index 0ca53c8fde..587448d211 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": "8.0.1", + "version": "8.0.2", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/pkg-manager/get-context/CHANGELOG.md b/pkg-manager/get-context/CHANGELOG.md index 56cfdd26d8..4c70aaf47a 100644 --- a/pkg-manager/get-context/CHANGELOG.md +++ b/pkg-manager/get-context/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/get-context +## 8.2.4 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/read-projects-context@7.0.12 + ## 8.2.3 ### Patch Changes diff --git a/pkg-manager/get-context/package.json b/pkg-manager/get-context/package.json index 4d634dca2b..dc061c610c 100644 --- a/pkg-manager/get-context/package.json +++ b/pkg-manager/get-context/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/get-context", - "version": "8.2.3", + "version": "8.2.4", "description": "Gets context information about a project", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/headless/CHANGELOG.md b/pkg-manager/headless/CHANGELOG.md index 8fc3cbf1ce..b64f37fd8e 100644 --- a/pkg-manager/headless/CHANGELOG.md +++ b/pkg-manager/headless/CHANGELOG.md @@ -1,5 +1,21 @@ # @pnpm/headless +## 19.5.2 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/package-requester@20.1.7 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/lockfile-to-pnp@2.0.14 + - @pnpm/real-hoist@1.1.6 + - @pnpm/link-bins@8.0.9 + - @pnpm/lifecycle@14.1.7 + - @pnpm/build-modules@10.1.7 + - @pnpm/hoist@7.0.16 + - @pnpm/symlink-dependency@6.0.3 + ## 19.5.1 ### Patch Changes diff --git a/pkg-manager/headless/package.json b/pkg-manager/headless/package.json index 5c5e6d1c6d..7262e0def1 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.5.1", + "version": "19.5.2", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/pkg-manager/hoist/CHANGELOG.md b/pkg-manager/hoist/CHANGELOG.md index f73d056ba6..1347599523 100644 --- a/pkg-manager/hoist/CHANGELOG.md +++ b/pkg-manager/hoist/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/hoist +## 7.0.16 + +### Patch Changes + +- @pnpm/link-bins@8.0.9 + ## 7.0.15 ### Patch Changes diff --git a/pkg-manager/hoist/package.json b/pkg-manager/hoist/package.json index 877606dafa..5ab45d83d5 100644 --- a/pkg-manager/hoist/package.json +++ b/pkg-manager/hoist/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/hoist", "description": "Hoists dependencies in a node_modules created by pnpm", - "version": "7.0.15", + "version": "7.0.16", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/pkg-manager/link-bins/CHANGELOG.md b/pkg-manager/link-bins/CHANGELOG.md index e05ba9512a..bacfcba5ef 100644 --- a/pkg-manager/link-bins/CHANGELOG.md +++ b/pkg-manager/link-bins/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/link-bins +## 8.0.9 + +### Patch Changes + +- @pnpm/read-project-manifest@4.1.4 + ## 8.0.8 ### Patch Changes diff --git a/pkg-manager/link-bins/package.json b/pkg-manager/link-bins/package.json index e4985e17d1..6cd165395c 100644 --- a/pkg-manager/link-bins/package.json +++ b/pkg-manager/link-bins/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/link-bins", - "version": "8.0.8", + "version": "8.0.9", "description": "Link bins to node_modules/.bin", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/package-requester/CHANGELOG.md b/pkg-manager/package-requester/CHANGELOG.md index c8f0f574e1..0500c94ac5 100644 --- a/pkg-manager/package-requester/CHANGELOG.md +++ b/pkg-manager/package-requester/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/package-requester +## 20.1.7 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + - @pnpm/cafs@6.0.2 + ## 20.1.6 ### Patch Changes diff --git a/pkg-manager/package-requester/package.json b/pkg-manager/package-requester/package.json index ef9bf9ae23..f51dce60c1 100644 --- a/pkg-manager/package-requester/package.json +++ b/pkg-manager/package-requester/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/package-requester", - "version": "20.1.6", + "version": "20.1.7", "description": "Concurrent downloader of npm-compatible packages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/plugin-commands-installation/CHANGELOG.md b/pkg-manager/plugin-commands-installation/CHANGELOG.md index 9f8f43367b..2c37e26f93 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.5 + +### Patch Changes + +- Updated dependencies [955874422] +- Updated dependencies [e505b58e3] + - @pnpm/graceful-fs@2.1.0 + - @pnpm/config@17.0.0 + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/core@8.0.2 + - @pnpm/outdated@11.0.21 + - @pnpm/cli-utils@1.1.5 + - @pnpm/plugin-commands-rebuild@7.1.5 + - @pnpm/store-connection-manager@5.2.18 + - @pnpm/package-store@15.1.8 + - @pnpm/pnpmfile@4.0.38 + - @pnpm/find-workspace-packages@5.0.40 + - @pnpm/filter-workspace-packages@6.0.40 + ## 11.5.4 ### Patch Changes diff --git a/pkg-manager/plugin-commands-installation/package.json b/pkg-manager/plugin-commands-installation/package.json index 669f304667..7e5f64254c 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.5.4", + "version": "11.5.5", "description": "Commands for installation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manager/read-projects-context/CHANGELOG.md b/pkg-manager/read-projects-context/CHANGELOG.md index f834c5c4ca..b414367e2f 100644 --- a/pkg-manager/read-projects-context/CHANGELOG.md +++ b/pkg-manager/read-projects-context/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/read-projects-context +## 7.0.12 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + ## 7.0.11 ### Patch Changes diff --git a/pkg-manager/read-projects-context/package.json b/pkg-manager/read-projects-context/package.json index 00d80f671b..28331a4279 100644 --- a/pkg-manager/read-projects-context/package.json +++ b/pkg-manager/read-projects-context/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/read-projects-context", - "version": "7.0.11", + "version": "7.0.12", "description": "Reads the current state of projects from modules manifest", "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 d41a6ebd60..8733db77c0 100644 --- a/pkg-manager/resolve-dependencies/CHANGELOG.md +++ b/pkg-manager/resolve-dependencies/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/resolve-dependencies +## 30.0.2 + +### Patch Changes + +- @pnpm/npm-resolver@15.0.9 + ## 30.0.1 ### Patch Changes diff --git a/pkg-manager/resolve-dependencies/package.json b/pkg-manager/resolve-dependencies/package.json index 99cc9a551a..d3905f2596 100644 --- a/pkg-manager/resolve-dependencies/package.json +++ b/pkg-manager/resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/resolve-dependencies", - "version": "30.0.1", + "version": "30.0.2", "description": "Resolves dependency graph of a package", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manifest/exportable-manifest/CHANGELOG.md b/pkg-manifest/exportable-manifest/CHANGELOG.md index 4b3840eb68..d9559f8525 100644 --- a/pkg-manifest/exportable-manifest/CHANGELOG.md +++ b/pkg-manifest/exportable-manifest/CHANGELOG.md @@ -1,5 +1,11 @@ # @pnpm/exportable-manifest +## 4.0.8 + +### Patch Changes + +- @pnpm/read-project-manifest@4.1.4 + ## 4.0.7 ### Patch Changes diff --git a/pkg-manifest/exportable-manifest/package.json b/pkg-manifest/exportable-manifest/package.json index ea801812a1..76c5ee1145 100644 --- a/pkg-manifest/exportable-manifest/package.json +++ b/pkg-manifest/exportable-manifest/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/exportable-manifest", - "version": "4.0.7", + "version": "4.0.8", "description": "Creates an exportable manifest", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pkg-manifest/read-project-manifest/CHANGELOG.md b/pkg-manifest/read-project-manifest/CHANGELOG.md index 7259c5325e..b3ae9946a6 100644 --- a/pkg-manifest/read-project-manifest/CHANGELOG.md +++ b/pkg-manifest/read-project-manifest/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/read-project-manifest +## 4.1.4 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + ## 4.1.3 ### Patch Changes diff --git a/pkg-manifest/read-project-manifest/package.json b/pkg-manifest/read-project-manifest/package.json index 9b203a141f..0a1b212bd4 100644 --- a/pkg-manifest/read-project-manifest/package.json +++ b/pkg-manifest/read-project-manifest/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/read-project-manifest", - "version": "4.1.3", + "version": "4.1.4", "description": "Read a project manifest (called package.json in most cases)", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/pnpm/CHANGELOG.md b/pnpm/CHANGELOG.md index 1f45c65cf7..2a8d2d59f0 100644 --- a/pnpm/CHANGELOG.md +++ b/pnpm/CHANGELOG.md @@ -1,5 +1,15 @@ # pnpm +## 7.29.2 + +### Patch Changes + +- Clean up child processes when process exited [#6162](https://github.com/pnpm/pnpm/issues/6162). +- When patch package does not specify a version, use locally installed version by default [#6192](https://github.com/pnpm/pnpm/issues/6192). +- `patchedDependencies` are now sorted consistently in the lockfile [#6208](https://github.com/pnpm/pnpm/pull/6208). +- Don't extend `NODE_PATH` in command shims [#5176](https://github.com/pnpm/pnpm/issues/5176). +- Retry copying file on EBUSY error [#6201](https://github.com/pnpm/pnpm/issues/6201). + ## 7.29.1 ### Patch Changes diff --git a/pnpm/artifacts/exe/package.json b/pnpm/artifacts/exe/package.json index dd7c61f78c..90a09361c5 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.29.1", + "version": "7.29.2", "publishConfig": { "bin": { "pnpm": "pnpm" diff --git a/pnpm/artifacts/linux-arm64/package.json b/pnpm/artifacts/linux-arm64/package.json index 206f3efc94..3c71959d83 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.29.1", + "version": "7.29.2", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/linux-x64/package.json b/pnpm/artifacts/linux-x64/package.json index 1a983562c1..b85603e39b 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.29.1", + "version": "7.29.2", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/macos-arm64/package.json b/pnpm/artifacts/macos-arm64/package.json index 9f5c3234de..4ea539c685 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.29.1", + "version": "7.29.2", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/macos-x64/package.json b/pnpm/artifacts/macos-x64/package.json index 222876165e..b94fbb7e59 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.29.1", + "version": "7.29.2", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/artifacts/win-x64/package.json b/pnpm/artifacts/win-x64/package.json index 691a9e7184..bd0f097e89 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.29.1", + "version": "7.29.2", "license": "MIT", "publishConfig": { "bin": { diff --git a/pnpm/package.json b/pnpm/package.json index cf1230538e..a8e60bbeec 100644 --- a/pnpm/package.json +++ b/pnpm/package.json @@ -1,7 +1,7 @@ { "name": "pnpm", "description": "Fast, disk space efficient package manager", - "version": "7.29.1", + "version": "7.29.2", "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 3bda170084..187a5750a5 100644 --- a/releasing/plugin-commands-deploy/CHANGELOG.md +++ b/releasing/plugin-commands-deploy/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-deploy +## 2.0.40 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/fs.indexed-pkg-importer@2.1.4 + - @pnpm/plugin-commands-installation@11.5.5 + - @pnpm/cli-utils@1.1.5 + - @pnpm/directory-fetcher@5.1.6 + ## 2.0.39 ### Patch Changes diff --git a/releasing/plugin-commands-deploy/package.json b/releasing/plugin-commands-deploy/package.json index 2b35011fc6..615db21721 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.39", + "version": "2.0.40", "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 180635b273..eb942c8908 100644 --- a/releasing/plugin-commands-publishing/CHANGELOG.md +++ b/releasing/plugin-commands-publishing/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/plugin-commands-publishing +## 6.1.20 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + - @pnpm/client@9.1.5 + - @pnpm/exportable-manifest@4.0.8 + - @pnpm/lifecycle@14.1.7 + ## 6.1.19 ### Patch Changes diff --git a/releasing/plugin-commands-publishing/package.json b/releasing/plugin-commands-publishing/package.json index 6459553394..62a8e29f93 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.19", + "version": "6.1.20", "description": "The pack and publish commands of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/resolving/default-resolver/CHANGELOG.md b/resolving/default-resolver/CHANGELOG.md index c10e119746..3e8599cc1c 100644 --- a/resolving/default-resolver/CHANGELOG.md +++ b/resolving/default-resolver/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/default-resolver +## 17.0.11 + +### Patch Changes + +- @pnpm/local-resolver@9.0.9 +- @pnpm/npm-resolver@15.0.9 + ## 17.0.10 ### Patch Changes diff --git a/resolving/default-resolver/package.json b/resolving/default-resolver/package.json index f590e4dc2f..579f52e329 100644 --- a/resolving/default-resolver/package.json +++ b/resolving/default-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/default-resolver", - "version": "17.0.10", + "version": "17.0.11", "description": "pnpm's default package resolver", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/resolving/local-resolver/CHANGELOG.md b/resolving/local-resolver/CHANGELOG.md index 564819b129..0673ef10b4 100644 --- a/resolving/local-resolver/CHANGELOG.md +++ b/resolving/local-resolver/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/local-resolver +## 9.0.9 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + - @pnpm/read-project-manifest@4.1.4 + ## 9.0.8 ### Patch Changes diff --git a/resolving/local-resolver/package.json b/resolving/local-resolver/package.json index 47855f5e53..9f44f01dec 100644 --- a/resolving/local-resolver/package.json +++ b/resolving/local-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/local-resolver", - "version": "9.0.8", + "version": "9.0.9", "description": "Resolver for local packages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/resolving/npm-resolver/CHANGELOG.md b/resolving/npm-resolver/CHANGELOG.md index 348409aec5..82d656ced2 100644 --- a/resolving/npm-resolver/CHANGELOG.md +++ b/resolving/npm-resolver/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/npm-resolver +## 15.0.9 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + ## 15.0.8 ### Patch Changes diff --git a/resolving/npm-resolver/package.json b/resolving/npm-resolver/package.json index 1ca053d99d..fee837e437 100644 --- a/resolving/npm-resolver/package.json +++ b/resolving/npm-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/npm-resolver", - "version": "15.0.8", + "version": "15.0.9", "description": "Resolver for npm-hosted packages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/dependencies-hierarchy/CHANGELOG.md b/reviewing/dependencies-hierarchy/CHANGELOG.md index 3fd4413faf..9e69fc716a 100644 --- a/reviewing/dependencies-hierarchy/CHANGELOG.md +++ b/reviewing/dependencies-hierarchy/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/reviewing.dependencies-hierarchy +## 1.2.5 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + ## 1.2.4 ### Patch Changes diff --git a/reviewing/dependencies-hierarchy/package.json b/reviewing/dependencies-hierarchy/package.json index f3e746da15..c2c436f7f5 100644 --- a/reviewing/dependencies-hierarchy/package.json +++ b/reviewing/dependencies-hierarchy/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/reviewing.dependencies-hierarchy", - "version": "1.2.4", + "version": "1.2.5", "description": "Creates a dependencies hierarchy for a symlinked `node_modules`", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/license-scanner/CHANGELOG.md b/reviewing/license-scanner/CHANGELOG.md index 16692048bb..68189047a2 100644 --- a/reviewing/license-scanner/CHANGELOG.md +++ b/reviewing/license-scanner/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/license-scanner +## 1.0.17 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/cafs@6.0.2 + - @pnpm/directory-fetcher@5.1.6 + ## 1.0.16 ### Patch Changes diff --git a/reviewing/license-scanner/package.json b/reviewing/license-scanner/package.json index 37af2d5472..f42a58d964 100644 --- a/reviewing/license-scanner/package.json +++ b/reviewing/license-scanner/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/license-scanner", - "version": "1.0.16", + "version": "1.0.17", "description": "Check for licenses packages", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/list/CHANGELOG.md b/reviewing/list/CHANGELOG.md index be7f16d9f3..c2a6d728dd 100644 --- a/reviewing/list/CHANGELOG.md +++ b/reviewing/list/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/list +## 8.2.2 + +### Patch Changes + +- 185ab01ad: When patch package does not specify a version, use locally installed version by default [#6192](https://github.com/pnpm/pnpm/issues/6192). + - @pnpm/read-project-manifest@4.1.4 + - @pnpm/reviewing.dependencies-hierarchy@1.2.5 + ## 8.2.1 ### Patch Changes diff --git a/reviewing/list/package.json b/reviewing/list/package.json index 59a75c4e85..4bfcd69cfd 100644 --- a/reviewing/list/package.json +++ b/reviewing/list/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/list", - "version": "8.2.1", + "version": "8.2.2", "description": "List installed packages in a symlinked `node_modules`", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/reviewing/outdated/CHANGELOG.md b/reviewing/outdated/CHANGELOG.md index a31a8e038f..980b781e77 100644 --- a/reviewing/outdated/CHANGELOG.md +++ b/reviewing/outdated/CHANGELOG.md @@ -1,5 +1,14 @@ # @pnpm/outdated +## 11.0.21 + +### Patch Changes + +- Updated dependencies [787c43dcc] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/npm-resolver@15.0.9 + - @pnpm/client@9.1.5 + ## 11.0.20 ### Patch Changes diff --git a/reviewing/outdated/package.json b/reviewing/outdated/package.json index 3ba3d66e95..4e882a6dc6 100644 --- a/reviewing/outdated/package.json +++ b/reviewing/outdated/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/outdated", - "version": "11.0.20", + "version": "11.0.21", "description": "Check for outdated packages", "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 0096905732..ee84852911 100644 --- a/reviewing/plugin-commands-licenses/CHANGELOG.md +++ b/reviewing/plugin-commands-licenses/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/plugin-commands-licenses +## 1.0.31 + +### Patch Changes + +- Updated dependencies [787c43dcc] +- Updated dependencies [e505b58e3] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/config@17.0.0 + - @pnpm/license-scanner@1.0.17 + - @pnpm/cli-utils@1.1.5 + ## 1.0.30 ### Patch Changes diff --git a/reviewing/plugin-commands-licenses/package.json b/reviewing/plugin-commands-licenses/package.json index 3a2d4a644b..0636a920c9 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.30", + "version": "1.0.31", "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 9162d15d96..1090a3b587 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.40 + +### Patch Changes + +- Updated dependencies [185ab01ad] +- Updated dependencies [e505b58e3] + - @pnpm/list@8.2.2 + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + ## 6.0.39 ### Patch Changes diff --git a/reviewing/plugin-commands-listing/package.json b/reviewing/plugin-commands-listing/package.json index a596f4ab38..744c292458 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.39", + "version": "6.0.40", "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 480c4bce1a..85ceef2875 100644 --- a/reviewing/plugin-commands-outdated/CHANGELOG.md +++ b/reviewing/plugin-commands-outdated/CHANGELOG.md @@ -1,5 +1,17 @@ # @pnpm/plugin-commands-outdated +## 8.0.35 + +### Patch Changes + +- Updated dependencies [787c43dcc] +- Updated dependencies [e505b58e3] + - @pnpm/lockfile-file@7.0.6 + - @pnpm/config@17.0.0 + - @pnpm/outdated@11.0.21 + - @pnpm/cli-utils@1.1.5 + - @pnpm/default-resolver@17.0.11 + ## 8.0.34 ### Patch Changes diff --git a/reviewing/plugin-commands-outdated/package.json b/reviewing/plugin-commands-outdated/package.json index 0aafb99e91..5749d24220 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.34", + "version": "8.0.35", "description": "The outdated command of pnpm", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/store/cafs/CHANGELOG.md b/store/cafs/CHANGELOG.md index 7d34ec8bd6..ae81af074e 100644 --- a/store/cafs/CHANGELOG.md +++ b/store/cafs/CHANGELOG.md @@ -1,5 +1,12 @@ # @pnpm/cafs +## 6.0.2 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/graceful-fs@2.1.0 + ## 6.0.1 ### Patch Changes diff --git a/store/cafs/package.json b/store/cafs/package.json index 8efaeb6f1b..d9ac1e11d0 100644 --- a/store/cafs/package.json +++ b/store/cafs/package.json @@ -1,6 +1,6 @@ { "name": "@pnpm/cafs", - "version": "6.0.1", + "version": "6.0.2", "description": "A content-addressable filesystem for the packages storage", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/store/create-cafs-store/CHANGELOG.md b/store/create-cafs-store/CHANGELOG.md index be079853f5..8a5d9844d2 100644 --- a/store/create-cafs-store/CHANGELOG.md +++ b/store/create-cafs-store/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/create-cafs-store +## 3.1.6 + +### Patch Changes + +- Updated dependencies [955874422] + - @pnpm/fs.indexed-pkg-importer@2.1.4 + - @pnpm/cafs@6.0.2 + ## 3.1.5 ### Patch Changes diff --git a/store/create-cafs-store/package.json b/store/create-cafs-store/package.json index 07bda45e37..5f809c8edb 100644 --- a/store/create-cafs-store/package.json +++ b/store/create-cafs-store/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/create-cafs-store", "description": "Create a CAFS store controller", - "version": "3.1.5", + "version": "3.1.6", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/store/package-store/CHANGELOG.md b/store/package-store/CHANGELOG.md index 1145327bc6..955904cfef 100644 --- a/store/package-store/CHANGELOG.md +++ b/store/package-store/CHANGELOG.md @@ -1,5 +1,13 @@ # @pnpm/package-store +## 15.1.8 + +### Patch Changes + +- @pnpm/package-requester@20.1.7 +- @pnpm/cafs@6.0.2 +- @pnpm/create-cafs-store@3.1.6 + ## 15.1.7 ### Patch Changes diff --git a/store/package-store/package.json b/store/package-store/package.json index 822530d549..3de0b2c7fb 100644 --- a/store/package-store/package.json +++ b/store/package-store/package.json @@ -1,7 +1,7 @@ { "name": "@pnpm/package-store", "description": "A storage for packages", - "version": "15.1.7", + "version": "15.1.8", "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, diff --git a/store/plugin-commands-server/CHANGELOG.md b/store/plugin-commands-server/CHANGELOG.md index fb1a2ead6a..f255b0bc50 100644 --- a/store/plugin-commands-server/CHANGELOG.md +++ b/store/plugin-commands-server/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/plugin-commands-server +## 5.0.40 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cli-utils@1.1.5 + - @pnpm/store-connection-manager@5.2.18 + - @pnpm/server@14.1.2 + ## 5.0.39 ### Patch Changes diff --git a/store/plugin-commands-server/package.json b/store/plugin-commands-server/package.json index 1b2ee537e0..533d099c6e 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.39", + "version": "5.0.40", "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 b83cbeee7f..81342f63fb 100644 --- a/store/plugin-commands-store/CHANGELOG.md +++ b/store/plugin-commands-store/CHANGELOG.md @@ -1,5 +1,16 @@ # @pnpm/plugin-commands-store +## 6.0.40 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/cafs@6.0.2 + - @pnpm/get-context@8.2.4 + - @pnpm/cli-utils@1.1.5 + - @pnpm/store-connection-manager@5.2.18 + ## 6.0.39 ### Patch Changes diff --git a/store/plugin-commands-store/package.json b/store/plugin-commands-store/package.json index 5e6b9657d2..486acc2479 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.39", + "version": "6.0.40", "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 d7e4f306cf..d54dd09020 100644 --- a/store/store-connection-manager/CHANGELOG.md +++ b/store/store-connection-manager/CHANGELOG.md @@ -1,5 +1,15 @@ # @pnpm/store-connection-manager +## 5.2.18 + +### Patch Changes + +- Updated dependencies [e505b58e3] + - @pnpm/config@17.0.0 + - @pnpm/client@9.1.5 + - @pnpm/package-store@15.1.8 + - @pnpm/server@14.1.2 + ## 5.2.17 ### Patch Changes diff --git a/store/store-connection-manager/package.json b/store/store-connection-manager/package.json index 7e542d9548..cfa0cdf28c 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.17", + "version": "5.2.18", "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 e7d0e69c7f..a87e4ccfe3 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.40 + +### Patch Changes + +- @pnpm/find-workspace-packages@5.0.40 + ## 6.0.39 ### Patch Changes diff --git a/workspace/filter-workspace-packages/package.json b/workspace/filter-workspace-packages/package.json index 8a2e6fcb59..839f255be8 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.39", + "version": "6.0.40", "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 1c23c4969e..44c527e83d 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.40 + +### Patch Changes + +- @pnpm/cli-utils@1.1.5 +- @pnpm/fs.find-packages@1.0.3 + ## 5.0.39 ### Patch Changes diff --git a/workspace/find-workspace-packages/package.json b/workspace/find-workspace-packages/package.json index 6469ad6f56..a6ab3e16c2 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.39", + "version": "5.0.40", "description": "Finds packages inside a workspace", "main": "lib/index.js", "types": "lib/index.d.ts",