Skip to content

Conversation

@ayuhito
Copy link
Contributor

@ayuhito ayuhito commented Oct 16, 2025

πŸ”— Linked issue

N/A

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

If there is any appetite to reduce the dependency count, I'd love to suggest using modern-tar that just relies on native APIs to reduce the surface area by 6 dependencies (additional 2MB unpacked).

This has a very small surface area which makes me believe this is a safe migration to undertake. Please let me know if there any concerns! We also recently switched @bluwy/giget-core which is a very similar mechanism for create-astro!

image

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link

vercel bot commented Oct 16, 2025

@ayuhito is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 16, 2025

npm i https://pkg.pr.new/@nuxt/content@3569

commit: 6736de2

@farnabaz
Copy link
Member

Thanks for the PR @ayuhito
Indeed reducing dependencies is a good thing.
I faced an issue while testing your PR


 ERROR  TAR number too large                                                                                          

    at readNumeric (node_modules/.pnpm/modern-tar@0.5.4/node_modules/modern-tar/dist/unpacker-yB6Ahxxk.js:98:44)
    at parseUstarHeader (node_modules/.pnpm/modern-tar@0.5.4/node_modules/modern-tar/dist/unpacker-yB6Ahxxk.js:242:8)
    at process (node_modules/.pnpm/modern-tar@0.5.4/node_modules/modern-tar/dist/unpacker-yB6Ahxxk.js:526:29)
    at Object.end (node_modules/.pnpm/modern-tar@0.5.4/node_modules/modern-tar/dist/unpacker-yB6Ahxxk.js:646:26)
    at Writable.final [as _final] (node_modules/.pnpm/modern-tar@0.5.4/node_modules/modern-tar/dist/fs/index.js:275:14)
    at prefinish (node:internal/streams/writable:916:14)
    at finishMaybe (node:internal/streams/writable:930:5)
    at Writable.end (node:internal/streams/writable:845:5)
    at ReadStream.endFn (node:internal/streams/pipeline:429:11)
    at Object.onceWrapper (node:events:638:28)
    at ReadStream.emit (node:events:536:35)
    at endReadableNT (node:internal/streams/readable:1698:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

I face this when I removed playgorund/.data directory and run pnpm dev.

@ayuhito
Copy link
Contributor Author

ayuhito commented Oct 27, 2025

Oops, this is my bad for not trying out that command since I was unfamiliar with this codebase. I relied on the tests only πŸ™ˆ

I've pushed a fix. The error wasn't related to the library, but not decompressing the gzip stream using node:zlib which was a one-liner. I tried running dev again a few times (also deleting the caches) and it seemed to now unpack everything just fine.

Thanks for the thorough review @farnabaz πŸš€

Edit: this does give me an idea to sniff if streams are gzip compressed and automatically decompress if necessary.

@farnabaz farnabaz merged commit dd854d5 into nuxt:main Oct 28, 2025
3 of 4 checks passed
@farnabaz
Copy link
Member

Thanks

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.

2 participants