Open mrapczynski opened 5 years ago
modclean has default pattern license files to be cleaned. so file will be deleted.
I have a similar issue with src/languages/makefile.js
from highlightjs being removed which breaks modules relying on it when running in AWS lambda.
I have been using Modclean
^3.0.0-beta.1
as part of a AWS Lambda packaging process to remove excess junk from the final .zip file prior to uploading to AWS for deployment.However, at times, I've been chasing a weird problem where the .zip is uploaded with a damaged copy of the AWS Node.js SDK package. After stepping through each task on my build, I found out Modclean is the most likely culprint.
File Tree Excerpt Before:
Running Modclean as follows:
node_modules/.bin/modclean --run --modules-dir=build/out/node_modules
Output:
File Tree Excerpt After:
Note how
licensemanager.js
gets tossed, and unfortunately the AWS SDK fails to load because files are missing.I looked at the default safe patterns, and it does not seem like the license term is treated with a wildcard, and yet it appears any file with the word license as part of the name get tossed.
Am I misunderstanding something?