From a262e80f90738fe4e1ac33457e5bab2b46a496c0 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Tue, 16 Apr 2024 13:52:39 -0500 Subject: [PATCH] chore: add code comment to npm/cli#7354 discussing 'npm pack' json issue --- source/npm/util.js | 1 + 1 file changed, 1 insertion(+) diff --git a/source/npm/util.js b/source/npm/util.js index 741cfb12..724271d6 100644 --- a/source/npm/util.js +++ b/source/npm/util.js @@ -141,6 +141,7 @@ export const getFilesToBePacked = async rootDirectory => { const {stdout} = await execa('npm', ['pack', '--dry-run', '--json', '--silent'], {cwd: rootDirectory}); try { + // TODO: Remove this once [npm/cli#7354](https://github.com/npm/cli/issues/7354) is resolved. const cleanStdout = stdout.replace(/^[^[]*\[/, '[').trim(); const {files} = JSON.parse(cleanStdout).at(0); return files.map(file => file.path);