Preheat oven to 350°F (175°C).
Line a 10×15-inch jelly roll pan with parchment paper and lightly grease.
In a bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In a separate bowl, beat eggs, sugar, oil, and vanilla until smooth.
Gently fold dry ingredients into wet mixture.
Fold in grated carrots and pineapple if using.
Spread batter evenly in prepared pan.
Bake 12–15 minutes, until cake springs back lightly when touched.
While still warm, place a clean kitchen towel on a flat surface and dust with powdered sugar.
Turn cake out onto towel and carefully peel off parchment.
Starting from a short edge, roll the cake with the towel inside.
Let cool completely rolled up to prevent cracking.
Beat cream cheese, butter, powdered sugar, and vanilla until smooth and creamy.
Unroll the cooled cake gently.
Spread cream cheese filling evenly, leaving a small border at edges.
Roll the cake back up without the towel.
Dust with powdered sugar or sprinkle chopped nuts on top.
Chill 30 minutes before slicing for cleaner cuts.
