Skip to content

Commit

Permalink
deps: Bump serve-static to latest, 1.16.2
Browse files Browse the repository at this point in the history
Taking this upgrade because we learned from dependabot that it fixes
a security issue:
  #5887

The issue is in a dev-only indirect dependency, and even our
development tools *probably* don't trigger it.  But I can't
rule out that they might.

The yarn.lock diff from dependabot is a bit messy, though,
so here's me doing the same upgrade directly.

---

Because this is an indirect dependency, `yarn upgrade serve-static`
just does nothing.  (Seems like a bug / misfeature in Yarn.)

And I don't want to do a general `yarn upgrade` in this legacy
codebase right now -- that would balloon into a larger task.

So, here's a fun technique to make the upgrade in a surgical way:

  $ perl -i -0pe 's{^serve-static@.*?\n\K.*?^$}
                   {  version "1.16.2"\n}sm
                 ' yarn.lock
  $ yarn

That deletes the "version", "resolved", and other fields in the
lockfile's resolution of the `serve-static` package, replacing them
with just a "version" line pointing at the desired version.

Then rerunning `yarn` (aka `yarn install`) starts from that version
when filling back in the rest of the details.
  • Loading branch information
gnprice authored and chrisbobbe committed Sep 19, 2024
1 parent 1485d82 commit 8f7c28c
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5121,6 +5121,11 @@ encodeurl@~1.0.2:
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==

encodeurl@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58"
integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==

encoding@^0.1.12, encoding@^0.1.13:
version "0.1.13"
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9"
Expand Down Expand Up @@ -11500,10 +11505,10 @@ semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4:
dependencies:
lru-cache "^6.0.0"

send@0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==
send@0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8"
integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==
dependencies:
debug "2.6.9"
depd "2.0.0"
Expand Down Expand Up @@ -11532,14 +11537,14 @@ serialize-error@^2.1.0:
integrity sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==

serve-static@^1.13.1:
version "1.15.0"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"
integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
version "1.16.2"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296"
integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==
dependencies:
encodeurl "~1.0.2"
encodeurl "~2.0.0"
escape-html "~1.0.3"
parseurl "~1.3.3"
send "0.18.0"
send "0.19.0"

set-blocking@^2.0.0:
version "2.0.0"
Expand Down

0 comments on commit 8f7c28c

Please sign in to comment.