From 7be56b8c544a6922e19809d6587ea6282dbba895 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Wed, 13 Jan 2021 17:11:54 -0500 Subject: [PATCH] script: Remove automatic deduping from postinstall Deduping leaves you with missing packages when installing apm with `npm ci`. Modern npm should dedupe automatically to some extent, so running dedupe isn't really useful, something like 99% of the time. If a user wants to ensure apm is installed with maximum deduping, they can delete apm's `node_modules` and `package-lock.json` and then re-install. (cherry picked from commit e3218fb440adb0f3a9f05b0739599c9f38dbc8af, which was merged previously at the atom-community fork of apm.) --- script/postinstall.cmd | 9 --------- script/postinstall.sh | 8 -------- 2 files changed, 17 deletions(-) diff --git a/script/postinstall.cmd b/script/postinstall.cmd index f3608d84b..29ee9c5ac 100644 --- a/script/postinstall.cmd +++ b/script/postinstall.cmd @@ -9,12 +9,3 @@ echo. for /f "delims=" %%i in ('.\bin\node.exe -p "process.version + ' ' + process.arch"') do set bundledVersion=%%i echo ^>^> Rebuilding apm dependencies with bundled Node !bundledVersion! call .\bin\npm.cmd rebuild - -if defined NO_APM_DEDUPE ( - echo. - echo ^>^> Deduplication disabled -) else ( - echo. - echo ^>^> Deduping apm dependencies - call .\bin\npm.cmd dedupe -) \ No newline at end of file diff --git a/script/postinstall.sh b/script/postinstall.sh index 222a25b4c..3427f514e 100755 --- a/script/postinstall.sh +++ b/script/postinstall.sh @@ -8,11 +8,3 @@ node script/download-node.js echo echo ">> Rebuilding apm dependencies with bundled Node $(./bin/node -p "process.version + ' ' + process.arch")" ./bin/npm rebuild - -echo -if [ -z "${NO_APM_DEDUPE}" ]; then - echo ">> Deduping apm dependencies" - ./bin/npm dedupe -else - echo ">> Deduplication disabled" -fi