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

fix(vercel,netlify): Prevent NFT from scanning users directory #379

Closed

Conversation

wobsoriano
Copy link

@wobsoriano wobsoriano commented Sep 6, 2024

Changes

This PR adds /users/** to ignored directories being scanned by @vercel/nft. This happens when:

  1. You have a /users string somewhere in your codebase and your app is located in /Users/** directory
  2. You're using pnpm and the package/module that has that /users string is not added to node_modules because of pnpm symlinks
  3. @vercel/nft thinks the /users string is a directory and scans it
  4. Throws an error because of permissions

Here's a complete convo from discord - https://discord.com/channels/830184174198718474/1281031671495397437

Testing

I tested it locally via pnpm patch, and run pnpm build. It works:

Screenshot 2024-09-05 at 5 30 19 PM

Docs

Copy link

changeset-bot bot commented Sep 6, 2024

🦋 Changeset detected

Latest commit: 303d78c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@astrojs/netlify Patch
@astrojs/vercel Patch
@test/netlify-hosted-astro-project Patch
@test/astro-vercel-basic Patch
@test/astro-vercel-function-per-route Patch
@test/astro-vercel-image Patch
@test/vercel-isr Patch
@test/vercel-max-duration Patch
@test/vercel-edge-middleware-with-edge-file Patch
@test/vercel-edge-middleware-without-edge-file Patch
@test/astro-vercel-no-output Patch
@test/astro-vercel-prerendered-error-pages Patch
@test/astro-vercel-redirects-serverless Patch
@test/astro-vercel-redirects Patch
@test/vercel-server-islands Patch
@test/astro-vercel-serverless-prerender Patch
@test/astro-vercel-serverless-with-dynamic-routes Patch
@test/astro-vercel-static-assets Patch
@test/astro-vercel-static Patch
@test/vercel-streaming Patch
@test/astro-vercel-with-speed-insights-enabled-output-as-server Patch
@test/astro-vercel-with-speed-insights-enabled-output-as-static Patch
@test/astro-vercel-with-web-analytics-enabled-output-as-static Patch
vercel-hosted-astro-project Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wobsoriano wobsoriano changed the title fix: Prevent NFT from scanning users directory fix(vercel,netlify): Prevent NFT from scanning users directory Sep 6, 2024
@alexanderniebuhr alexanderniebuhr added the pkg: vercel Related to Vercel adapter (scope) label Sep 6, 2024
Copy link
Member

@alexanderniebuhr alexanderniebuhr left a comment

Choose a reason for hiding this comment

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

I think this shouldn't have any side-effects

@matthewp
Copy link
Contributor

matthewp commented Sep 7, 2024

Have another PR #381 which I think fixes this in a better way, but making the base be the workspace root.

@wobsoriano
Copy link
Author

Have another PR #381 which I think fixes this in a better way, but making the base be the workspace root.

Let’s do it!

@wobsoriano
Copy link
Author

Closing this in favor of #381

@wobsoriano wobsoriano closed this Sep 9, 2024
@alexanderniebuhr
Copy link
Member

Still thank you for the contribution. We appreciate it a lot. Hope to see you around the repository in the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: netlify pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants