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

feat(nuxt): move to esm-only #2947

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
Open

feat(nuxt): move to esm-only #2947

wants to merge 1 commit into from

Conversation

43081j
Copy link

@43081j 43081j commented Mar 18, 2025

Moves to an esm-only package now that all LTS other than 18.x (which is soon to fall out of LTS) support require(esm).

This is a draft until nuxt/module-builder 1.x becomes non-alpha

1.x outputs esm only, whereas 0.x outputs cjs too.

Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for pinia-official canceled.

Name Link
🔨 Latest commit e34635c
🔍 Latest deploy log https://app.netlify.com/sites/pinia-official/deploys/67dae8b92f67500009b7bc2b

@43081j
Copy link
Author

43081j commented Mar 19, 2025

according to the nuxt module-builder docs:

types.d.ts: Exported types in addition to shims for nuxt.config auto completion.

but we don't reference that file anymore after this change.

maybe that's why the export had a separate types. in our case, though, types.d.ts just re-exports exactly what is in module.mjs

Moves to an esm-only package now that all LTS other than 18.x (which is
soon to fall out of LTS) support `require(esm)`.
Copy link

pkg-pr-new bot commented Mar 19, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@pinia/nuxt@2947
npm i https://pkg.pr.new/pinia@2947
npm i https://pkg.pr.new/@pinia/testing@2947

commit: e34635c

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.34%. Comparing base (d5bd162) to head (e34635c).
Report is 1 commits behind head on v3.

Additional details and impacted files
@@           Coverage Diff           @@
##               v3    #2947   +/-   ##
=======================================
  Coverage   91.34%   91.34%           
=======================================
  Files          17       17           
  Lines        1398     1398           
  Branches      211      211           
=======================================
  Hits         1277     1277           
  Misses        120      120           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@43081j
Copy link
Author

43081j commented Mar 19, 2025

@danielroe do you know when nuxt-builder alpha is planned to become stable?

wondering if we should use the alpha tag for now or just wait

@danielroe
Copy link
Member

you should be safe to already use the alpha tag here - the only niggle is for modules that include Vue components in their runtime/.

@43081j 43081j marked this pull request as ready for review March 19, 2025 18:23
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.

3 participants