Nice congrats on the release! Are there any docs t...
# general
d
Nice congrats on the release! Are there any docs that list the changes in 1.0?
t
j
@Frank can we edit the release notes with the migration steps again, like beta?
a
@thdxr Did lambda function urls make the cut?
t
we're still on aws-cdk-lib 2.20.0 and I think function urls are in 2.22.0 but we'll update soon
f
@Andrew Barba it's been on my mind. Will take a look tonite.
a
Awesome thanks so much
d
@Frank or @thdxr, you might add a breaking change to
Cron
to the migration docs.
Cron.job
used to be able to take a
FunctionDefinition
and now you need to nest it on the
Cron.job.function
prop. Lack of support for
events.CronOptions
is also a killer loss for us (it made cron schedules composable).
f
you might add a breaking change to
Cron
to the migration docs.
@Derek Kershner Nice catch. Just updated the migrations doc. The reason for this change was there used to be 3 ways to define a cron job/route/consumer/etc. Method 1:
Copy code
routes: {
  "GET /": "lambda.main"
}
Method 2:
Copy code
routes: {
  "GET /": {
    handler: "lambda.main"
  }
}
Method 3:
Copy code
routes: {
  "GET /": {
    function: {
      handler: "lambda.main"
    }
  }
}
Method 2 and 3 have cause much confusion, and we decided to remove Method 2 from all constructs.
Lack of support for
events.CronOptions
You can still do it like this https://docs.serverless-stack.com/constructs/Cron#configuring-the-event-rule We moved everything that uses CDK construct/class to inside
cdk
. And over time if we find a prop is commonly used, we’d move them out of
cdk
. And when we do that, we want it to be type safe and has well written TS Doc. In this case, I’m going to add +1 to move CronOptions out of
cdk
. Hope that makes sense 😬