-
Notifications
You must be signed in to change notification settings - Fork 293
Python files from unrelated modules present when using package: individually #444
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
Comments
Paging @dschep for the background on the purpose of the regex |
@jimpudar the purpose of that regex is to support serverless pro, which injects wrappers for each function named |
Thanks @dschep, so I take it |
Ah, yes! that is correct. i imagine it can still cause this bug if you just have a file named |
In my testing it seemed like it was matching against the entire path rather than just the filename. So if the intent is to match only files in the top level directory beginning with |
Correct imprecise regex in moveModuleUp function (fixes #444)
I'm expecting my final module's zip file to include something like:
but I'm also seeing files from unrelated modules:
The regex in this filter expression appears to be too general:
https://github.com/UnitedIncome/serverless-python-requirements/blob/master/lib/inject.js#L70
I'm getting files from unrelated modules which match this regex, e.g.
OtherModule/some_cool_function_is_matching/the_regex.py
I don't fully understand the purpose of that regex in the filter, but my assumption is that rather than
s_.*\.py
it should be^s_.*\.py
.If this is the case let me know and I can raise a PR to correct the regex.
The text was updated successfully, but these errors were encountered: