-
Notifications
You must be signed in to change notification settings - Fork 828
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
Default the glob options follow & strict to true, with new options to override #1104
Default the glob options follow & strict to true, with new options to override #1104
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
CLAs look good, thanks! |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
…when attempting to read a directory and follow symlinked directories when expanding ** patterns
packages/workbox-build/src/_types.js
Outdated
* expanding ** patterns. Note that this can result in a lot of duplicate | ||
* references in the presence of cyclic links. | ||
* | ||
* E.g. `true` |
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.
Can you remove the e.g. true
piece.
packages/workbox-build/src/_types.js
Outdated
@@ -132,6 +132,19 @@ import './_version.mjs'; | |||
* | |||
* E.g. `['**\/ignored.html']` | |||
* | |||
* @property {Boolean} [globFollow=true] Follow symlinked directories when | |||
* expanding ** patterns. Note that this can result in a lot of duplicate |
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.
Could you add single quotes around the patterns like: '**'
packages/workbox-build/src/_types.js
Outdated
* search of other matches. Set the strict option to raise an error in these | ||
* cases. | ||
* | ||
* E.g. `true` |
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.
Please remove this - Our JSDocs will call out the default value.
let globbedFiles; | ||
try { | ||
globbedFiles = glob.sync(globPattern, { | ||
cwd: globDirectory, | ||
ignore: globIgnores, | ||
follow: typeof globFollow !== 'undefined'? globFollow : true, |
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.
@jeffposnick you've been doing some work on the defaults, is this the best approach or should this be moved to a defaults value.
cc @jeffposnick Thanks for this @beatrizdemiguelperez, I've added some nit comments if you could take a look. One comment is more asking Jeff for comment who has been working on this a lot more closely than I have lately. @adrigzr could you confirm you are all ok with this landing in Workbox (Just cos the weird Google license I have to worry about). Out of interest, so it make sense to change the input to something like:
or even:
I'm just thinking that if we did this, we could arguably just pass in the glob options and support anything in the future without changes. |
Hi @gauntface, Thanks for the review. Yes, I'm working with @beatrizdemiguelperez on this feature. It's all ok. I've already signed the Google agreement. About the change you suggest ( On the other hand, as documentation suggests, setting Thanks again for your time. |
Yes, as @adrigzr said we want to be compatible with the previous version. Again thanks :) |
Thanks for the contribution! I'm of the opinion that the I left a few inline comments, but my one request would be some additional changes to the tests under
If you're not comfortable or it's not clear how to best make changes to the test suite let me know, and I can push a commit with additional test cases. |
Hi @jeffposnick, Thanks for your answer. I've submitted the requested changes. Could you check the PR code again? |
Thanks, @beatrizdemiguelperez & @adrigzr! |
I'll give @gauntface a little time to chime in in case he has other feedback, and if not, merge. |
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.
LGTM thank you so much for raising this PR.
R: @jeffposnick @addyosmani @gauntface
Fixes #1093
Description of what's changed/fixed.
Please ensure that
gulp lint test
passes locally prior to filing a PR!