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

The ignore option for @clerk/upgrade is ignored #3238

Closed
4 tasks done
tmcw opened this issue Apr 22, 2024 · 8 comments
Closed
4 tasks done

The ignore option for @clerk/upgrade is ignored #3238

tmcw opened this issue Apr 22, 2024 · 8 comments
Assignees

Comments

@tmcw
Copy link

tmcw commented Apr 22, 2024

Preliminary Checks

Reproduction

https://this-is-in-a-script

Publishable key

pk_this_is_not_relevant

Description

Steps to reproduce:

  1. Run npx @clerk/upgrade
  2. Try ignoring a folder

Expected behavior:

It ignores the folder

Actual behavior:

It doesn't:

CleanShot.2024-04-22.at.09.35.31.mp4

Environment

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M2
    Memory: 339.13 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.volta/tools/image/node/20.9.0/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 10.1.0 - ~/.volta/tools/image/node/20.9.0/bin/npm
    pnpm: 9.0.3 - ~/Library/pnpm/pnpm
    bun: 1.0.28 - ~/.bun/bin/bun
    Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 124.0.6367.61
    Chrome Canary: 126.0.6433.0
    Safari: 17.4.1
  npmPackages:
    @clerk/backend: ^1.0.0 => 1.0.0
    @clerk/clerk-sdk-node: ^5.0.0 => 5.0.0
    @clerk/remix: ^4.0.0 => 4.0.0
@tmcw tmcw added the needs-triage A ticket that needs to be triaged by a team member label Apr 22, 2024
@tmcw tmcw changed the title The ignore option for @clerk/upgrade The ignore option for @clerk/upgrade is ignored Apr 22, 2024
@LekoArts LekoArts self-assigned this Apr 24, 2024
@LekoArts LekoArts added confirmed and removed needs-triage A ticket that needs to be triaged by a team member labels Apr 24, 2024
@LekoArts
Copy link
Member

Thanks for the issue! I can reproduce it locally and will work on a fix 👍

@LekoArts
Copy link
Member

LekoArts commented Apr 24, 2024

Ok, so I pushed 5546a3c - the gist of it is:

One needs to use **/public/** to correctly ignore the folder. I looked at the docs of the library we're using a bit but it wasn't immediately clear to me how to "fix" this (to allow public/**).

I tried https://github.com/mrmlnc/fast-glob#basenamematch but that didn't work 🤷 Prepending **/ to everything a user enters feels dangerous as it might result in unexpected behavior.

My change isn't released yet, once that's done I'll close this

@LekoArts
Copy link
Member

The fix is published now 👍

@tmcw
Copy link
Author

tmcw commented May 20, 2024

At least in v1.0.6, it doesn't appear that this fix works:

CleanShot.2024-05-20.at.16.19.45.mp4

@BRKalow
Copy link
Member

BRKalow commented May 20, 2024

Hey @tmcw 👋 Can you try specifying **/public/** instead?

@tmcw
Copy link
Author

tmcw commented May 29, 2024

I can, but that doesn't capture my actual intention - I want Clerk to ignore the root-level directory /public, not any directory anywhere in the project named public.

@tmcw
Copy link
Author

tmcw commented Jun 10, 2024

CleanShot 2024-06-10 at 14 13 15@2x

The glob for what gets scanned seems bizarrely wide - why is clerk/upgrade parsing a CSV file?

@jescalan
Copy link
Contributor

If it's in your repo and it isn't ignored, we will scan it. Adding *.csv to ignores should iron this out.

Unfortunately we couldn't really get into the weeds around trying to specify every file extension that could or could not have valid html/css/js in it - I think that would cause more issues than having it scan anything that is not obviously a static asset and use ignores to choose what's ignored 😁

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

No branches or pull requests

4 participants