-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
remove glob-base dependency #15399
remove glob-base dependency #15399
Conversation
Nx Cloud ReportCI ran the following commands for commit 852174e. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
@lkuechler looks like the build is failing in examples:
|
419268c
to
8483ba9
Compare
hi @shilman, |
Hi @lkuechler, curious if this is still being actively pursued. Looks like last update was beginning of July. Do you have an ETA? Thanks in advance! |
@@ -25,21 +25,33 @@ const detectBadGlob = (val: string) => { | |||
const isObject = (val: Record<string, any>) => | |||
val != null && typeof val === 'object' && Array.isArray(val) === false; | |||
|
|||
const dirname = (pattern: string) => { | |||
if (pattern.slice(-1) === '/') return pattern; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if the user passes a directory but doesn't include a trailing slash? any chance you can provide a test case for this and for any other cases you considered in this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was behaviour was something that I saw in the glob-base dependency that was behaving a bit strange. I have now checked with the implementation in storybook on how it currently behaves and I believe that this extra logic did not make any difference. I have removed this now.
I think the current test are already very good but I added two more that focus on the folder pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the follow-through @lkuechler -- looking great! 😍
Issue: #15174
What I did
I removed the glob-base dependency to resolve the following security vulnerability #15174
How to test
No new tests should be needed.
Addition information
I had to reimplement some logic from glob-base. The returned
glob
is for example filled with the input path if no glob was detected.