microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

Remove package dependency on Macross.Json.Extensions #2019

Closed jgilbert2017 closed 2 years ago

jgilbert2017 commented 2 years ago

package v1.18.1 seems to have an unnecessary dependency on Macross.Json.Extensions which seems to be a non-microsoft third party package that is not used.

the reference is suspect and hopefully not a supply chain attack of some sort.

kblok commented 2 years ago

My two cents here. It's used internally to convert enums using the JsonStringEnumMemberConverter class.

jgilbert2017 commented 2 years ago

ah, i didn't see the usage because the package adds classes to the System.Text.Json.Serialization namespace.

still, it seems like a bad idea to ship a dependency to a third-party library like this if it can be avoided.

kblok commented 2 years ago

Agreed, but we would need to find a replacement for that.

jgilbert2017 commented 2 years ago

the code is MIT licencse. perhaps just lift the class?

mxschmitt commented 2 years ago

Would you accept a PR which removes this and adds a custom enumconverter like I did here https://github.com/campersau/playwright-dotnet/commit/4d9c4109b9e7b401f7921196d32b2bcb1ecd83e1 ?

Originally posted by @campersau in https://github.com/microsoft/playwright-dotnet/issues/2018#issuecomment-1045136643

seems like @campersau has already something in the works.