MacDonald signed his deal after his only league appearance of the season as a sub against Brighton last Saturday where he set up the only goal of the game for Febian Brandy.
Speaking on the official site, Roberto said "It's been a very important campaign for Shaun, even though he hasn't been in the limelight like some of the other players
"He's made huge progress behind the scenes; development which was clearly evident in the last 20 minutes he played at Brighton on Saturday.
"He's worked really hard on a daily basis to improve his technique and strength. He's matured and his body is finally ready to cope with the demands of professional football on a regular basis.
"I think people forget sometimes that he is still only 19. He has a bright future ahead of him and we are delighted that future will be with Swansea City.''
There was also confirmation that Alan Tate has signed a similar deal (performance related) "Alan is one of those players who has been through every emotion possible with the club and is part of a core of players who know exactly what it takes to play for Swansea City,'' added Roberto.
"He's not only versatile, but he's got a winning mentality and never gets affected by any occasion in football.
"He's worked very hard to play Championship football and we are delighted he'll be doing that with Swansea City.''