fddigital-uk / sanity-plugin-visual-options

19 stars 7 forks source link

Create Version 1.0 for Sanity Studio v3.0 #8

Closed nicktaylor closed 1 year ago

nicktaylor commented 1 year ago

To enable this plugin for Sanity Studio v3.0 there are several changes that need to be made. These need implementing and testing.

Steps can be found here: https://beta.sanity.io/docs/platform/studio/v2-to-v3#plugin-authors

nicktaylor commented 1 year ago

Now available as a beta version: https://www.npmjs.com/package/sanity-plugin-visual-options/v/2.0.0-beta.1

CurtisChapman commented 1 year ago

Hi, we've used this plugin across multiple projects for some time now and it's great. We're making the move to Sanity v3 and have switched over to the beta version. While the plugin is working perfectly fine in the studio itself, it's now preventing a "sanity graphql deploy" for succeeding, displaying the following error:

Cannot use import statement outside a module

We've omitted all other plugins to confirm the culprit and without the plugin everything is working as expected. Even the inclusion of the plugin into the sanity.config.js file (with zero references to it in any of our schemas) is causing the error to occur.

Had a look through the code to see if there was any obvious culprits but unfortunately I cannot see any.

nicktaylor commented 1 year ago

@CurtisChapman I'll see if I can get a bit of time to look into this tomorrow. It'll hopefully be something small, possibly build step related.

nicktaylor commented 1 year ago

Hey @CurtisChapman, give version 2.0.0-beta.3 a shot and let me know if that resolves your issue. Thanks!

CurtisChapman commented 1 year ago

@nicktaylor That's fixed the sanity graphql deploy issue 👍

Though looks to have unintentionaly introduced an error when selecting an option in the studio.

image

nicktaylor commented 1 year ago

@CurtisChapman Sorry about that, when I linked my version locally, it didn't do it correctly resulting in a false positive. Check out 2.0.0-beta.5 hopefully that'll sort everything.

CurtisChapman commented 1 year ago

@nicktaylor Perfect, it's working as expected now 👍

Thanks you looking into that and all the hard work!

nicktaylor commented 1 year ago

Great, no problem @CurtisChapman, thanks for reporting the issue! I'll bring this out of beta soon.

ScottishRoss commented 1 year ago

@nicktaylor we're looking at migrating to Sanity V3 over the next few weeks. We can use your beta release above, but I was wondering when this would be included in a full release?

nicktaylor commented 1 year ago

when this would be included in a full release?

@ScottishRoss I'll see if I can get this boxed off this evening, I've been running with it for a couple of months now without any issues in production so it should be good to go.

nicktaylor commented 1 year ago

@CurtisChapman & @ScottishRoss - This has now been releases as version 2.0.0 and @latest and @next. I'm closing this out, but let me know if you spot any issues. Thanks!