etkachev / nx-webstorm

Plugin for Webstorm that strives to function the same as Nx Console for VsCode. UI for Nx
MIT License
35 stars 4 forks source link

Support $id in schema.json for finding schematics #71

Closed julien-vidal closed 3 years ago

julien-vidal commented 3 years ago

Is your feature request related to a problem? Please describe.

In last version of json-schema, it seems the id property of a schema has been deprecated in favor of $id. It could be interesting to add this property for detect new json-schema and ensure long term schematics detection.

Describe the solution you'd like Handle id and $id property for json-schema

Additional context It seems schematics detection comes from this file.

etkachev commented 3 years ago

Hello! Yes I can do an update to support this. Thank you for pointing this out.

etkachev commented 3 years ago

@julien-vidal . Quick question. Were you talking in regards to custom schematics within an Nx workspace? Or plain angular project with custom schematics?

julien-vidal commented 3 years ago

I'm talking about custom schematics within an Nx workspace.

Well, as far I can understand Kotlin code, it seems the issue will only happen for custom nx schematics.

The way you detect custom nx schematic from this location file seems different from how you detect them in node_module for example (file).

The first one seems based on id, which is now deprecated in favor of $id. The other seems to be based on description.

Don't know if it can help you ^^.

etkachev commented 3 years ago

Got it. Yea I was just making sure. I only ask, because I still see the nx documentation which still uses the id pattern, but I can easily also support reading off of $id.

etkachev commented 3 years ago

I merged in an update, feel free to download latest unreleased version of the plugin (0.9) from the releases page. Let me know if it works locally for you with the new $id check.

julien-vidal commented 3 years ago

Really cool ! I'll test it as soon the 0.9 will be rolled out.

For now, it seems releases page don't have the 0.9. Webstorm page doesn't have it too ...

etkachev commented 3 years ago

Oh I just realized that Draft releases aren't available to the public 😅 . I manually uploaded the artifacts to this comment. nx-webstorm-0.9.zip

Let me know if you're able to test it out.

julien-vidal commented 3 years ago

No problem ! 😄

I tested it and seems work perfectly ! Our customs nx schematics are detected with old id and new one $id.

Thanks a lot for your reactivity 😉 . I wait for official 0.9 now ^^.

etkachev commented 3 years ago

Great! I just submitted plugin for pending reviewal... Should see it in marketplace sometime early next week.

etkachev commented 3 years ago

0.9 should be published and available for update in jetbrains marketplace. Closing this ticket. Let me know if there is anything else. Thanks again.