Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add support for nuxt 3/nuxt bridge #70

Merged
merged 8 commits into from
Mar 8, 2023

Conversation

ricardogobbosouza
Copy link
Collaborator

@ricardogobbosouza ricardogobbosouza commented Feb 15, 2022

This PR enables this module to work for Nuxt Bridge & Nuxt 3.
Resoles #75, #69, #78

🔥 Notable changes

  • Uses @nuxt/module-builder to build module
  • Refactor structure using @nuxt/kit

@ricardogobbosouza ricardogobbosouza mentioned this pull request Feb 15, 2022
@duboiss
Copy link

duboiss commented May 14, 2022

Hey @ricardogobbosouza , when do you plan to merge / release this? Thanks

@gkweb
Copy link

gkweb commented Jul 11, 2022

Can't wait for this to go through! Will fix having to hack a nuxt bridge migration I'm doing. Thanks heaps.

@JuanxCursed
Copy link

+1

2 similar comments
@alexsaranin
Copy link

+1

@YusufcanY
Copy link

+1

@bf
Copy link

bf commented Sep 19, 2022

This would be highly appreciated. What is missing to complete this?

@jonatandorozco
Copy link

Any new on this? @ricardogobbosouza

@ricardogobbosouza
Copy link
Collaborator Author

I will get back to work on this module now that we have a more stable version of nuxt v3

@TouchSek
Copy link

Nuxt 3 just release stable yesterday, so it should be ready to start all over again, thanks for your effort.

@mukundshah
Copy link

Hi,
Is this PR mergeable yet?

@ricardogobbosouza
Copy link
Collaborator Author

Hi @mukundshah
It's not finished yet

@vorjyga
Copy link

vorjyga commented Jan 25, 2023

Any news?

@andrevferreiraa
Copy link

Any news on this?

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #70 (8a423e8) into main (cd820c0) will decrease coverage by 18.58%.
The diff coverage is 82.25%.

❗ Current head 8a423e8 differs from pull request most recent head 2f90e86. Consider uploading reports for the commit 2f90e86 to get more accurate results

@@             Coverage Diff              @@
##              main      #70       +/-   ##
============================================
- Coverage   100.00%   81.42%   -18.58%     
============================================
  Files            2        2               
  Lines           22       70       +48     
  Branches         4        6        +2     
============================================
+ Hits            22       57       +35     
- Misses           0       13       +13     
Impacted Files Coverage Δ
src/module.ts 80.00% <80.70%> (-20.00%) ⬇️
playground/nuxt.config.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ricardogobbosouza ricardogobbosouza merged commit eaf4f0e into main Mar 8, 2023
@ricardogobbosouza ricardogobbosouza deleted the feat/nuxt3-bridge branch March 8, 2023 11:58
ricardogobbosouza added a commit that referenced this pull request Mar 8, 2023
* refactor: add support for nuxt 3/nuxt bridge

* chore: update module

* chore: update module

* chore: update module

* test: add simple test

* chore: use `hookOnce`

* docs: spli pnpm, yarn and npm
@MartinX3
Copy link

MartinX3 commented Mar 8, 2023

@ricardogobbosouza Using nuxt 2 and nuxt bridge results in the following error

 FATAL  nuxt.hooks.hookOnce is not a function                                                                                                                                     19:26:38

  at setup (node_modules/.pnpm/@nuxtjs+eslint-module@4.0.0_47imvc6hy6dc2w6gfpmnntc3hq/node_modules/@nuxtjs/eslint-module/dist/module.mjs:34:16)
  at ModuleContainer.normalizedModule (node_modules/.pnpm/@nuxt+kit@3.2.3/node_modules/@nuxt/kit/dist/index.mjs:167:29)
  at async ModuleContainer.addModule (node_modules/.pnpm/@nuxt+core@2.16.2/node_modules/@nuxt/core/dist/core.js:167:20)
  at async ModuleContainer.ready (node_modules/.pnpm/@nuxt+core@2.16.2/node_modules/@nuxt/core/dist/core.js:36:5)
  at async Nuxt._init (node_modules/.pnpm/@nuxt+core@2.16.2/node_modules/@nuxt/core/dist/core.js:342:5)


 ERROR  Cannot start nuxt:  nuxt.hooks.hookOnce is not a function                                                                                                                 19:26:38

  at setup (node_modules/.pnpm/@nuxtjs+eslint-module@4.0.0_47imvc6hy6dc2w6gfpmnntc3hq/node_modules/@nuxtjs/eslint-module/dist/module.mjs:34:16)
  at ModuleContainer.normalizedModule (node_modules/.pnpm/@nuxt+kit@3.2.3/node_modules/@nuxt/kit/dist/index.mjs:167:29)
  at async ModuleContainer.addModule (node_modules/.pnpm/@nuxt+core@2.16.2/node_modules/@nuxt/core/dist/core.js:167:20)
  at async ModuleContainer.ready (node_modules/.pnpm/@nuxt+core@2.16.2/node_modules/@nuxt/core/dist/core.js:36:5)
  at async Nuxt._init (node_modules/.pnpm/@nuxt+core@2.16.2/node_modules/@nuxt/core/dist/core.js:342:5)

I already removed the node_modules and reinstalled everything again with pnpm.

@ricardogobbosouza
Copy link
Collaborator Author

Thanks @MartinX3

@ricardogobbosouza
Copy link
Collaborator Author

Fixed #80

@Deckluhm
Copy link

Deckluhm commented Mar 9, 2023

After upgrading @nuxtjs/eslint-module to v4, I got the following warning while running my Nuxt 2 (non-Bridge) app:

WARN  Module @nuxtjs/eslint-module is disabled due to incompatibility issues:
- [bridge] Nuxt bridge is required

It's unclear to me if v4 is supposed to drop Nuxt 2 support?

Changelog wording makes it sound like it's just adding Nuxt Bridge/3 support but it's also in the "Breaking changes" section so I'm not sure if it's a bug or if it's intended (and maybe just need a slightly clearer changelog wording).

Thanks!

@ricardogobbosouza
Copy link
Collaborator Author

@Deckluhm
I will add a readme note.

And yes, v4 needs the bridge

@ricardogobbosouza
Copy link
Collaborator Author

#83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.