From 7b88dcfd752e5aa855998554e002947e6347a42a Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sat, 16 May 2020 21:53:14 +0300 Subject: [PATCH] feat: move the debug file to node_modules close #2501 --- .changeset/plenty-months-battle.md | 5 +++++ .github/ISSUE_TEMPLATE.md | 2 +- packages/pnpm/package.json | 2 +- packages/pnpm/test/install/misc.ts | 4 ++-- pnpm-lock.yaml | 10 +++++----- 5 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changeset/plenty-months-battle.md diff --git a/.changeset/plenty-months-battle.md b/.changeset/plenty-months-battle.md new file mode 100644 index 0000000000..608b8b2526 --- /dev/null +++ b/.changeset/plenty-months-battle.md @@ -0,0 +1,5 @@ +--- +"pnpm": major +--- + +In case of a fatal error, write the logs to `node_modules/.pnpm-debug.log` (not to `pnpm-debug.log`). diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 000ade2f57..1b18c9b610 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -15,7 +15,7 @@ If your issue is a bug, please follow the format below: ### Code to reproduce the issue: ### Expected behavior: diff --git a/packages/pnpm/package.json b/packages/pnpm/package.json index d3b54e2269..172bd4b95f 100644 --- a/packages/pnpm/package.json +++ b/packages/pnpm/package.json @@ -24,7 +24,7 @@ "@pnpm/config": "workspace:8.3.1-alpha.1", "@pnpm/core-loggers": "workspace:4.0.2-alpha.0", "@pnpm/default-reporter": "workspace:7.2.5-alpha.1", - "@pnpm/file-reporter": "0.1.0", + "@pnpm/file-reporter": "^1.0.0", "@pnpm/filter-workspace-packages": "workspace:2.0.15-alpha.1", "@pnpm/find-workspace-dir": "workspace:1.0.0", "@pnpm/logger": "3.2.2", diff --git a/packages/pnpm/test/install/misc.ts b/packages/pnpm/test/install/misc.ts index c84056a040..dd9f51ea02 100644 --- a/packages/pnpm/test/install/misc.ts +++ b/packages/pnpm/test/install/misc.ts @@ -42,14 +42,14 @@ test('bin files are found by lifecycle scripts', t => { t.end() }) -test('create a pnpm-debug.log file when the command fails', async function (t) { +test('create a "node_modules/.pnpm-debug.log" file when the command fails', async function (t) { const project = prepare(t) const result = execPnpmSync(['install', '@zkochan/i-do-not-exist']) t.equal(result.status, 1, 'install failed') - t.ok(await exists('pnpm-debug.log'), 'log file created') + t.ok(await exists('node_modules/.pnpm-debug.log'), 'log file created') t.end() }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 073a256eb4..f00519afd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2089,7 +2089,7 @@ importers: '@pnpm/config': 'link:../config' '@pnpm/core-loggers': 'link:../core-loggers' '@pnpm/default-reporter': 'link:../default-reporter' - '@pnpm/file-reporter': 0.1.0 + '@pnpm/file-reporter': 1.0.0 '@pnpm/filter-workspace-packages': 'link:../filter-workspace-packages' '@pnpm/find-workspace-dir': 'link:../find-workspace-dir' '@pnpm/logger': 3.2.2 @@ -2183,7 +2183,7 @@ importers: '@pnpm/constants': 'workspace:4.0.0-alpha.0' '@pnpm/core-loggers': 'workspace:4.0.2-alpha.0' '@pnpm/default-reporter': 'workspace:7.2.5-alpha.1' - '@pnpm/file-reporter': 0.1.0 + '@pnpm/file-reporter': ^1.0.0 '@pnpm/filter-workspace-packages': 'workspace:2.0.15-alpha.1' '@pnpm/find-workspace-dir': 'workspace:1.0.0' '@pnpm/find-workspace-packages': 'workspace:*' @@ -3418,15 +3418,15 @@ packages: node: '>=10' resolution: integrity: sha512-N+FCVHl3V8vlqeCH3k2qVoVrxGCmgWMYKjgG2yfS69lJlW2PNXpQ408gP00gctOCllFEFOmlHoRnrICVJ57ENw== - /@pnpm/file-reporter/0.1.0: + /@pnpm/file-reporter/1.0.0: dependencies: graceful-fs: 4.2.1 path-exists: 4.0.0 dev: false engines: - node: '>=8.15' + node: '>=10.13' resolution: - integrity: sha512-CMPclTpDRqgT241w6yKt/e3Mer/L5wFCAKTG5rGlhRz7f3BGhbuj4nblIVB/BTXhJty34Y57gKg4gbu3FVeQIA== + integrity: sha512-SM5Flsm39dMhW5AKhXLBJ3oud2uOR4UIphoo6pLlhZeKEvRE9GGS8ewlPDlFVDgvvKP1xpKwHeO3okhiL2zy6g== /@pnpm/logger/3.2.2: dependencies: bole: 3.0.2