Preheat oven to 400 degrees F. Line a large baking sheet with parchment paper.
Lightly flour a work surface and gently roll out thawed puff pastry to about a 12-inch by 14-inch rectangle. Transfer to parchment-lined baking sheet.
Use a fork to prick the pastry, leaving about a 1-inch edge.
Spread pesto onto the pastry where you poked holes with a fork, keeping that 1-inch edge untouched. Sprinkle with shredded gruyere.
Line up trimmed asparagus in a single layer over the cheese.
Add egg to a small bowl with 2 tablespoons water. Whisk until combined to create an egg wash. Brush egg wash onto the 1-inch edge ofthe puff pastry.
Season asparagus with salt and pepper. Drizzle with olive oil.
Bake for 15 to 18 minutes, until the edges of the crust are puffed and golden. Let cool for a few minutes.
Drizzle with date syrup (optional), slice and serve.