Skip to content

Commit

Permalink
Remove unnecessary and unwarranted npm update during Auspice install
Browse files Browse the repository at this point in the history
This was introduced incidentally, and seemingly unintentionally¹, in
"Replace Alpine-based image with a Debian-based image" (ce07dad), but no
one noticed.

`npm update` is unwarranted because it's intended for maintainers of a
package, not downstream user installs, which is the role we have here.
Its effect was to bump the minimum versions in Auspice's package.json to
the latest available (while still respecting SemVer constraints) and
then install all of Auspice's deps into node_modules/.²  That's
unnecessary because we then run `npm install`, which unlike `npm
update`, also runs pre/post-installation steps Auspice includes.

¹ <#21 (comment)>

² Notably, `npm update` was added when the image had npm v5, which
  updates both package.json and package-lock.json.  We currently have npm
  v6, which does the same.  Subsequent versions, e.g. npm v8, stopped
  updating package.json and only update package-lock.json.
  • Loading branch information
tsibley committed Jun 23, 2023
1 parent 75e2680 commit 48586d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ RUN /builder-scripts/download-repo https://github.com/nextstrain/augur "$(/build
# used for the same reasons described above.
WORKDIR /nextstrain/auspice
RUN /builder-scripts/download-repo https://github.com/nextstrain/auspice release . \
&& npm update && npm install && npm run build && npm link
&& npm install && npm run build && npm link

# Add evofr for forecasting
RUN pip3 install evofr
Expand Down

0 comments on commit 48586d5

Please sign in to comment.