nativescript-vue / nativescript-vue-devtools

A NativeScript-Vue plugin for connecting to the standalone vue-devtools
https://nativescript-vue.org/en/docs/getting-started/vue-devtools/
MIT License
28 stars 7 forks source link

Update to NS v8 #19

Closed joshmossas closed 3 years ago

joshmossas commented 3 years ago

This pull request makes several changes to get nativescript-vue-devtools working with Nativescript v8.0.1 and @vue/devtools v5.x.x (These changes do not work with @vue/devtools v6.x.x-beta)

Changes for NS 8:

Additional Quality of Life Changes:

rigor789 commented 3 years ago

Wow! Thanks!

The only reason I kept toasty and socketio as peerDependencies is that a project could be already using those, and if there are different versions of the same plugin - the build would likely fail due to duplicate symbols/classes. But by using the caret range, it should generally resolve to the same version a project may already be using. In the other cases (ie a major bump in one of the plugins), we'll need to publish an update as well.

joshmossas commented 3 years ago

@rigor789 Oh I gotcha that makes sense. I'll swap them back to peer dependencies.

joshmossas commented 3 years ago

Okay the toasty and socketio plugins have been moved back to Peer Dependencies. Also you'll noticed that the peer dependencies are also listed as dev dependencies. This is so that typescript can resolve the types when compiling.

Let me know if there are any other changes needed

rigor789 commented 3 years ago

LGTM! Thanks - I'll get this merged & released soon (hopefully today, but if I miss that, please do ping me - I keep jumping between too many different projects/packages and sometimes forget)

joshmossas commented 3 years ago

No worries. I totally understand.

I made one additional change which is setting module in the tsconfig.json to CommonJS. I noticed this line in the v7 docs and figured I should change it just to be safe.

image

I've already tried both the CommonJS and ES2015 variant in my project (Vue + Typescript) and they both work. However I suspect CommonJS will be better for vanilla JS projects.

rigor789 commented 3 years ago

Should be fine as ES2015 since all apps are built with Webpack now - so that line in the old docs doesn't directly apply (the runtime itself is using commonjs, and webpack outputs commonjs).