San Jose Sharks right wing Joonas Donskoi (27), of Finland, closes in on the nets St. Louis Blues goaltender Jordan Binnington (50) and defenseman Jay Bouwmeester (19) follow during the second period in Game 6 of the NHL hockey Stanley Cup Western Conference final series Tuesday, May 21, 2019, in St. Louis. Per an Associated Press source, Donskoi will join the Colorado Avalanche on a four-year contract. (AP Photo/Tom Gannam)

A person with knowledge of the move says the Colorado Avalanche have agreed to sign winger Joonas Donskoi to a $15.6 million, four-year deal with an annual salary-cap hit of $3.9 million.

The person spoke to The Associated Press on condition of anonymity because the deal had not been announced.

Donskoi set a career high last year with 37 points, his fourth NHL season, all with the San Jose Sharks. San Jose is up against the cap after re-signing defenseman Erik Karlsson to a long-term contract and have also lost captain Joe Pavelski to Dallas.

The Stars signed Pavelski to a $21 million, three-year contract, adding another scoring threat to their leading duo of Tyler Seguin and captain Jamie Benn.

Pavelski led Western Conference finals qualifier San Jose with 38 goals in 75 regular-season games while adding 26 assists for 64 points. The 34-year-old also led the Sharks with 12 power play goals.

The addition of Pavelski comes after the Stars lost Mats Zuccarello to Central Division rival Minnesota in free agency. Dallas traded for Zuccarello before the deadline last season. The Stars lost to the Stanley Cup champion St. Louis Blues in Game 7 in the second round of the playoffs.

Pavelski is second in San Jose franchise history with 355 goals while ranking third in points (761) and assists (406). He played his first 13 NHL seasons with the Sharks.

— In Minnesota, the Wild have agreed to terms with free agent right wing Ryan Hartman on a two-year, $3.8 million contract.

Hartman had a combined 12 goals and 24 assists last season for the Nashville Predators and Philadelphia Flyers, setting a career high with 39 blocked shots. The Wild will be his fourth NHL team, since he debuted in 2015. He was a first-round draft pick in 2013 by the Chicago Blackhawks.

Hartman will likely help shore up the fourth line for the Wild, who also agreed to terms with right wing Mats Zuccarello on a five-year, $30 million contract to bolster their top-six forward group.

— In Detroit, the Red Wings have signed center Valtteri Filppula to a two-year contract, reuniting him for a third time with Steve Yzerman.

The 35-year-old Finn played with Yzerman in Detroit and was signed by him in Tampa Bay.

Yzerman is in his first year as the Red Wings’ general manager and he didn’t waste any time adding a familiar player to his roster, making the move in the opening hours of free agency.

Filppula had 17 goals and 31 points last season with the New York Islanders. He has scored 185 times and has 494 points over 14 seasons with Detroit, Philadelphia the Lightning and the Islanders.

AP Hockey Writer Stephen Whyno contributed.