4.0 - .NET Standard support. #133

Merged
merged 116 commits into from Jul 13, 2017

Conversation

4 participants
@nozzlegear
Owner

nozzlegear commented Apr 26, 2017

Now that the 4.0 branch is building and running automated tests (#118) on AppVeyor, I'm opening this pull request to track further progress and let people who really need dotnet core support right now use the latest version. AppVeyor is automatically building the 4.0 branch and saving the artifacts right here. You can use the zip file or the nuget package to add ShopifySharp 4.0 to your project.

Note that major changes are still planned for this branch, and I make no guarantee that the AppVeyor builds will be compatible with one another. In fact, I guarantee that they won't be because I still have breaking changes to commit. Use at your own risk!

For those planning on building features for the 4.0 release, ShopifySharp is now using xUnit for tests. New tests should all follow the format of other tests in 4.0. You can use the Article test as an example, but I would highly recommend that you use the provided ShopifySharp Test snippet in the VSCode folder instead. Create a new *_Tests.cs file and type test-shopifysharp in VSCode:

shopifysharp-test

Some to-do items that I'm tracking with this pull request, in addition to all of the open issues marked for milestone 4.0:

  • 4.0 targets .NET Standard 1.6, which should be compatible with .NET Framework 4.6.1. Does that mean it can be installed in a 461 project without explicitly targeting 461?
  • Merge changes that have been committed to the master branch but not to 4.0 (Refund service, etc.)
  • Rename ShopifyEvent to Event.

nozzlegear added some commits Mar 30, 2017

Retarget netstandard 1.4.
This will require devs who use the full framework to target at least version 4.6.1, but it's the lowest netstandard target we could do when using Flurl.
@nozzlegear

This comment has been minimized.

Show comment
Hide comment
@nozzlegear

nozzlegear Jun 23, 2017

Owner

Will be returning to this PR this weekend to hopefully get it finished up and merged, just been sidetracked with a major project.

Owner

nozzlegear commented Jun 23, 2017

Will be returning to this PR this weekend to hopefully get it finished up and merged, just been sidetracked with a major project.

@nozzlegear

This comment has been minimized.

Show comment
Hide comment
@nozzlegear

nozzlegear Jul 3, 2017

Owner

Looks like all tests are passing, and all of the major changes are now committed! I just need to update the documentation and add some tests for partial object updates. Once that's done this PR can be merged and v4 will be released. 🎉

Owner

nozzlegear commented Jul 3, 2017

Looks like all tests are passing, and all of the major changes are now committed! I just need to update the documentation and add some tests for partial object updates. Once that's done this PR can be merged and v4 will be released. 🎉

@clement911

This comment has been minimized.

Show comment
Hide comment
@clement911

clement911 Jul 3, 2017

Contributor

Congrats!!!

Contributor

clement911 commented Jul 3, 2017

Congrats!!!

@Kirlac

This comment has been minimized.

Show comment
Hide comment
@Kirlac

Kirlac Jul 5, 2017

Just wanted to give you a heads up, I was having issues with the IsAuthenticWebhook(IEnumerable<KeyValuePair<string, StringValues>> requestHeaders, string requestBody, string shopifySecretKey) function. It was looking for the header X-Shopify-Hmac-SHA256 but on the requests I was receiving it was coming through as X-Shopify-Hmac-Sha256

I worked around it temporarily by removing and readding the header with uppercase "SHA" first, but you may want to make the check case insensitive. I considered fixing it myself and issuing a PR, but it seemed like a lot of work for a one line change :D

Great work by the way. You've made my job of integrating with shopify significantly easier!

Kirlac commented Jul 5, 2017

Just wanted to give you a heads up, I was having issues with the IsAuthenticWebhook(IEnumerable<KeyValuePair<string, StringValues>> requestHeaders, string requestBody, string shopifySecretKey) function. It was looking for the header X-Shopify-Hmac-SHA256 but on the requests I was receiving it was coming through as X-Shopify-Hmac-Sha256

I worked around it temporarily by removing and readding the header with uppercase "SHA" first, but you may want to make the check case insensitive. I considered fixing it myself and issuing a PR, but it seemed like a lot of work for a one line change :D

Great work by the way. You've made my job of integrating with shopify significantly easier!

@nozzlegear

This comment has been minimized.

Show comment
Hide comment
@nozzlegear

nozzlegear Jul 5, 2017

Owner

@Kirlac Thanks for the warning! Case-insensitive checking is a great suggestion, I believe it's what I already do in the JS version of this lib too. I'll make sure it gets in!

Owner

nozzlegear commented Jul 5, 2017

@Kirlac Thanks for the warning! Case-insensitive checking is a great suggestion, I believe it's what I already do in the JS version of this lib too. I'll make sure it gets in!

@nozzlegear nozzlegear merged commit dfe6ec8 into master Jul 13, 2017

@nozzlegear

This comment has been minimized.

Show comment
Hide comment
@nozzlegear

nozzlegear Jul 13, 2017

Owner

Merged! That took far longer than I thought it would. All tests are passing and I'm planning on publishing to Nuget by Friday evening.

Owner

nozzlegear commented Jul 13, 2017

Merged! That took far longer than I thought it would. All tests are passing and I'm planning on publishing to Nuget by Friday evening.

@nozzlegear nozzlegear deleted the 4.0 branch Jul 13, 2017

@nozzlegear

This comment has been minimized.

Show comment
Hide comment
@nozzlegear

nozzlegear Jul 15, 2017

Owner

v4 has been released on Nuget! It supports .NET Standard 1.4+ and .NET Framework 4.5+. My next task will be updating all of the current guides and the book for those that have it.

Owner

nozzlegear commented Jul 15, 2017

v4 has been released on Nuget! It supports .NET Standard 1.4+ and .NET Framework 4.5+. My next task will be updating all of the current guides and the book for those that have it.

@clement911

This comment has been minimized.

Show comment
Hide comment
@clement911

clement911 Jul 15, 2017

Contributor

🥇 Congratulations!!! Thank you very much.

Are there any known issues when migrating from v3?
Is it just a matter of fixing compile errors?

Contributor

clement911 commented Jul 15, 2017

🥇 Congratulations!!! Thank you very much.

Are there any known issues when migrating from v3?
Is it just a matter of fixing compile errors?

@nozzlegear

This comment has been minimized.

Show comment
Hide comment
@nozzlegear

nozzlegear Jul 15, 2017

Owner

Thanks! There are no known issues as far as I'm aware, I was able to migrate one of my own apps pretty easily. The biggest changes will be removing the Shopify prefix from everything, passing an id to any update methods you already use, and changing RequestEngine.ExecutionPolicy = ... to ShopifyService.SetGlobalExecutionPolicy(policy) or service.SetExecutionPolicy(policy) if you use execution policies.

Owner

nozzlegear commented Jul 15, 2017

Thanks! There are no known issues as far as I'm aware, I was able to migrate one of my own apps pretty easily. The biggest changes will be removing the Shopify prefix from everything, passing an id to any update methods you already use, and changing RequestEngine.ExecutionPolicy = ... to ShopifyService.SetGlobalExecutionPolicy(policy) or service.SetExecutionPolicy(policy) if you use execution policies.

@clement911

This comment has been minimized.

Show comment
Hide comment
@clement911

clement911 Jul 17, 2017

Contributor

That sounds easy enough! I think I'll wait until asp.net core 2.0 is released and migrate to ShopifySharp v4 at the same time,

Contributor

clement911 commented Jul 17, 2017

That sounds easy enough! I think I'll wait until asp.net core 2.0 is released and migrate to ShopifySharp v4 at the same time,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment