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

dep cleanup #110

Merged
merged 11 commits into from
Jan 29, 2025
Merged

dep cleanup #110

merged 11 commits into from
Jan 29, 2025

Conversation

talentlessguy
Copy link
Contributor

  • Replaces execa with tinyexec
  • Replaces fs-extra with built-in fs module
  • Use node: protocol for better support in serverless environments

I also had to replace Jest with Vitest because Jest kept using the ESM version of tinyexec and ignoring the CJS one (it's an issue with Jest, not tinyexec)

As a result, 23 dependencies are dropped and the package becomes ~20% smaller:

Estimated new statistics:
  Package size: 2.7 MB → 2.2 MB (80.65%)
  Subdependencies: 87 → 64 (-23)

Copy link

socket-security bot commented Jan 19, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@esbuild/[email protected] None 0 9.75 MB evanw
npm/@ungap/[email protected] None 0 27.5 kB webreflection
npm/[email protected] environment, shell 0 46.1 kB 43081j
npm/[email protected] Transitive: environment, filesystem, network, shell, unsafe +39 10.3 MB antfu, oreanno, patak, ...1 more

🚮 Removed packages: npm/[email protected], npm/[email protected]

View full report↗︎

talentlessguy and others added 3 commits January 24, 2025 18:18
Co-authored-by: Austin Merrick <[email protected]>
Co-authored-by: Austin Merrick <[email protected]>
Co-authored-by: Austin Merrick <[email protected]>
@talentlessguy talentlessguy requested a review from onsclom January 24, 2025 18:18
@talentlessguy
Copy link
Contributor Author

talentlessguy commented Jan 24, 2025

tests are failing, will fix

in the meantime, is support for Node 16 still required or it could be dropped? asking because structuredClone used by vitest is supported only since Node 17

@onsclom
Copy link
Contributor

onsclom commented Jan 24, 2025

tests are failing, will fix

in the meantime, is support for Node 16 still required or it could be dropped? asking because structuredClone used by vitest is supported only since Node 17

Thanks! Unfortunately, yes, Node 16 support is still required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to apply a patch to Vite because on node 16 getRandomValues is inside webcrypto and not require('crypto')

Comment on lines +4 to +6
if (!("structuredClone" in globalThis)) {
globalThis.structuredClone = structuredClone;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

polyfill because structuredClone is only available since node 17

@talentlessguy
Copy link
Contributor Author

woohoo, all tests pass

@onsclom
Copy link
Contributor

onsclom commented Jan 28, 2025

I think after pinning these deps and updating the lockfile, this is good to go. Thank you @talentlessguy!

@talentlessguy
Copy link
Contributor Author

@onsclom done, the lockfile is updated and all deps have fixed versions

@onsclom onsclom merged commit 508b06a into vercel:main Jan 29, 2025
6 checks passed
@talentlessguy talentlessguy deleted the dep-cleanup branch January 29, 2025 18:55
@talentlessguy
Copy link
Contributor Author

@onsclom thank you for merging! any chance that it would also get published on npm?

(bringing it up because it often happens that merged PRs remain unpublished)

Copy link

github-actions bot commented Feb 3, 2025

🎉 This PR is included in version 1.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@EndangeredMassa
Copy link
Contributor

@talentlessguy check out 1.1.3 and let us know if that doesn't work!

github-merge-queue bot pushed a commit to vercel/vercel that referenced this pull request Feb 5, 2025
Pulls in changes from:

- vercel/fun#110
- vercel/fun#112
- vercel/fun#115

It's mostly updates from no longer needing node 16 support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants