device icon indicating copy to clipboard operation
device copied to clipboard

[Help needed] Nuxt 3 support

Open Redemption198 opened this issue 3 years ago β€’ 5 comments

This is my first module so probably something isn't correct, I ported the device module to Nuxt 3 by rewriting it from scratch using the old code and the module starter from CLI, it should behave like the old one.

What's missing:

  • Tests
  • Publication workflow
  • ~~Nuxt 2/Bridge support~~ (Marked as supported, needs to be tested) (^ I don't have experience with these ^)
  • New readme information

Redemption198 avatar May 19 '22 09:05 Redemption198

Hi,

When I pull your code the only thing that get pulled is README.md, package.json and LICENSE

Screenshot 2022-06-27 at 11 55 10

I've tried with:

npm install git+https://github.com/Redemption198/device-module#master

npm install nuxt-community/device-module#pull/119/head:master (and variations without the head part)

also pulled the original @nuxt/device and then tried git fetch origin pull/119/head:master in it

but all with the same result

Any idea how to get all files?

Thank you!

thoth3x avatar Jun 27 '22 09:06 thoth3x

Hi,

When I pull your code the only thing that get pulled is README.md, package.json and LICENSE

Screenshot 2022-06-27 at 11 55 10

I've tried with:

npm install git+https://github.com/Redemption198/device-module#master

npm install nuxt-community/device-module#pull/119/head:master (and variations without the head part)

also pulled the original @nuxt/device and then tried git fetch origin pull/119/head:master in it

but all with the same result

Any idea how to get all files?

Thank you!

Nothing appears because the module usually is built and uploaded to npm so the build files are ignored by Git. I built the module and temporarily included the build files, if you install it again it should work.

~~TypeScript autocomplete seems to not be working currently (inside the module playground it did) everything else should work fine.~~

Update: TypeScript autocomplete works with the latest commit.

Redemption198 avatar Jun 27 '22 09:06 Redemption198

Would love to see this merged in as a next branch. There is a need for the module to be production-ready for Nuxt 3.

nathanchase avatar Aug 13 '22 02:08 nathanchase

This module will need an update to work with Nuxt 3 rc-9 and above. Currently in 3.0.0-rc.9 it gives the following error:

WARN  Module device-module is disabled due to incompatibility issues:  [nuxt] Nuxt version `^3.0.0 || ^2.16.0` is required but currently using '3.0.0-rc.9'

This is due to https://github.com/nuxt/framework/pull/7116

nathanchase avatar Sep 06 '22 11:09 nathanchase

This module will need an update to work with Nuxt 3 rc-9 and above. Currently in 3.0.0-rc.9 it gives the following error:

WARN  Module device-module is disabled due to incompatibility issues:  [nuxt] Nuxt version `^3.0.0 || ^2.16.0` is required but currently using '3.0.0-rc.9'

This is due to nuxt/framework#7116

Thanks for the solution, the module has been updated to RC9.

Redemption198 avatar Sep 06 '22 11:09 Redemption198

+1 for releasing this under a next branch

robinscholz avatar Oct 06 '22 09:10 robinscholz

Thank you for your PR! πŸ™

TheAlexLichter avatar Oct 13 '22 16:10 TheAlexLichter

cc @danielroe, would really like to have your opinion on the PR too ☺️

TheAlexLichter avatar Oct 17 '22 09:10 TheAlexLichter

Regarding tests: I suppose that Nuxt's test-utils will come in handy - but I am not sure how easy it will be to "fake" the user agent for tests πŸ™ˆ

TheAlexLichter avatar Oct 17 '22 10:10 TheAlexLichter

Regarding tests: I suppose that Nuxt's test-utils will come in handy - but I am not sure how easy it will be to "fake" the user agent for tests see_no_evil

I found a way to recreate the old tests with Nuxt test utils, it isn't elegant but seems to be working.

Redemption198 avatar Oct 17 '22 17:10 Redemption198

LGTM! cc @dotneet

TheAlexLichter avatar Nov 04 '22 14:11 TheAlexLichter

@Redemption198 Thank you for your great work!

dotneet avatar Nov 12 '22 04:11 dotneet

@Redemption198 3.0.0 has been released to npm!

dotneet avatar Nov 12 '22 04:11 dotneet

@Redemption198 3.0.0 has been released to npm!

Nice!

Redemption198 avatar Nov 12 '22 18:11 Redemption198