San Francisco Giants General Manager Farhan Zaidi acknowledged Sunday he's keeping an open mind as the July 31 trade deadline approaches and hasn't decided whether his team will buy or sell.

Mike Yastrzemski wants Zaidi to keep San Francisco's roster intact.

The 28-year-old rookie homered with one out in the bottom of the 12th inning to give the Giants a 3-2 victory over the New York Mets on Sunday.

"We're a bunch of grinders right now," Yastrzemski said. "It's fun being a part of something like this. For most of us, we just want to win today. It doesn't matter what happens, we're going to try to win ballgames regardless of who's in the clubhouse."

A month ago, Zaidi seemed to have an easy choice. But with the surging Giants (50-50) having won 15 of 18 to get back to .500, San Francisco's front office has had to rethink things.

"If we continue to play well, that will obviously color things in a certain way," Zaidi said before the game, adding he continues to field calls from other clubs inquiring about potential trades. "We're excited about how we're playing."

Buster Posey scored twice for the Giants, who hadn't had a hit since the fourth inning when Yastrzemski, the grandson of Hall of Fame slugger Carl Yastrzemski, lofted a full-count pitch from Robert Gsellman the other way into the left-center stands.

San Francisco took three of four for its first series victory over the Mets since 2014. All three victories came in extra innings.

Milwaukee 7, Arizona 4: Tyler Saladino had his first career grand slam, Mike Moustakas hit a go-ahead run-scoring single in the eighth inning and the Brewers beat the host Diamondbacks. Moustakas hit a go-ahead three-run homer in Milwaukee's 8-3 victory Saturday and put the Brewers ahead late again, chopping a single through the middle after Keston Hiura led off the eighth inning with a triple.

Philadelphia 2, Pittsburgh 1 (11): Rhys Hoskins hit an 11th-inning home run in Pittsburgh, five innings after a fan casually walked to home plate and approached Phillies hitter Brad Miller for a handshake before being apprehended and led away.

Atlanta 7, Washington 1: Kevin Gausman pitched into the eighth inning after missing more than a month, Josh Donaldson and Ronald Acuna Jr. homered and the host Braves beat the Nationals to extend their NL East lead.

Los Angeles 9, Miami 0: Walker Buehler struck out 11 over seven innings and the host Dodgers hit three home runs to complete a sweep of the Marlins.

San Diego 5, Chicago 1: Francisco Mejia homered, Fernando Tatis Jr. drove in three runs and the Padres avoided getting swept by the host Cubs.

St. Louis 3, Cincinnati 1: Yairo Munoz celebrated a rare start with a home run and a triple to help the Cardinals beat the host Reds.

American League

Cleveland 5, Kansas City 4: Francisco Lindor hit a two-run homer after originally being scheduled to get the day off, Jose Ramirez hit a tiebreaking home run in the sixth inning and the host Indians held off the Royals for their 13th victory in 16 games. Lindor talked his way into the lineup at designated hitter after manager Terry Francona planned on resting the All-Star shortstop.

Baltimore 5, Boston 0: Asher Wojciechowski took an unlikely no-hitter into the seventh inning, Trey Mancini homered twice off Andrew Cashner and the host Orioles won their first series from the Red Sox in 11 tries since 2017. Making his 15th career start, Wojciechowski came in with a 6.49 career ERA and was facing the highest-scoring team in the majors.

Tampa Bay 4, Chicago 2: Blake Snell struck out 10 in six scoreless innings, Travis d'Arnaud hit his first grand slam and the host Rays ended their longest losing streak of the year at five games by beating the White Sox. D'Arnaud had been hitless in 11 at-bats since a three-homer game vs. the Yankees on Monday.

Detroit 4, Toronto 3 (10): Nicholas Castellanos led off the bottom of the 10th inning with a home run, and the host Tigers ended a six-game losing streak after the Blue Jays' Lourdes Gurriel Jr. hit a tying two-run homer in the ninth.

Houston 5, Texas 3: Michael Brantley homered twice, Jose Altuve also went deep and the host Astros won their fifth in a row by handing the Rangers their seventh consecutive loss.

Los Angeles 9, Seattle 3: Resurgent slugger Albert Pujols and Mike Trout homered, Brian Goodwin connected twice and the Angels beat the host Mariners.

Interleague

Colorado 8, N.Y. Yankees 4: Charlie Blackmon shook out of a slump with a leadoff home run off James Paxton and the Rockies ended a six-game losing streak by winning in New York.