what’s the proper way to update all these packages...
# help
s
what’s the proper way to update all these packages when there’s an update?
Copy code
"dependencies": {
    "@aws-cdk/aws-apigatewayv2-authorizers": "1.111.0",
    "@aws-cdk/aws-cognito": "1.111.0",
    "@aws-cdk/aws-lambda": "1.111.0",
    "@aws-cdk/core": "1.111.0",
    "@serverless-stack/cli": "0.36.0",
    "@serverless-stack/resources": "0.36.0"
  }
I can’t just do
yarn upgrade-interactive
like I usually do, because
yarn sst add-cdk
still adds version 1.111.0 of the packages
f
Hey @Sam Hulick, you should be able to just update the
cli
and the
resources
package. And when you run an
sst
command again, it’s going to prompt you a yarn command to update all the cdk packages.
a
oh! that’s nice, I didn’t know that, very smart, I was running a script that found all packages with cdk in their name and then run
npx sst add-cdk
. Thanks.
s
@Frank gotcha. I suppose there’s no update for the CLI yet. but also, it was pinned at 0.36.0. is it safe to change the version of
@serverless-stack/cli
and
@serverless-stack/resources
to
"^0.36.0"
?
t
I've been setting it explicitly to a version (without
^
) because I don't want automatic upgrades that might require me to bump cdk as well. Depends on what workflow you prefer
s
I personally don’t like to fall behind on package updates. it tends to create more work in the long run but it looks like there are no CLI updates yet, at this point
f
I think
~
and
^
behave different for pre v1 (ie. 0.x.y)
s
oh, you’re right
f
^0.36.0
will only auto update to
^0.36.x
I think ^^
s
@Frank looks like
<1
is the way to go actually. both
^
and
~
limit the version to 0.36.x
though I think with yarn 2's
upgrade-interactive
, it doesn’t matter. it’ll list the latest anyway, and give you a chance to upgrade to it, ignoring semver
f
ah got it!