-
Notifications
You must be signed in to change notification settings - Fork 35
feat: include resolved included_files in response of zipFunction
#1098
Conversation
892e58e
to
55429b0
Compare
55429b0
to
7efc193
Compare
⏱ Benchmark resultsComparing with 0d22eac largeDepsEsbuild: 7.6s⬆️ 14.11% increase vs. 0d22eac
Legend
largeDepsNft: 36.1s⬆️ 15.80% increase vs. 0d22eac
Legend
|
7efc193
to
3dbebdd
Compare
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.
Great work! I wonder if there's anything we could/should do to make the terminology clearer, because we have srcFiles
(which represents files identified by the bundler) and includedFiles
(which represents files identified by the user), and that might not be obvious by the naming alone?
What do you think? Can we rename something to make it clearer? Or maybe some comments to help guide people in the right direction?
Oh, I should've clarified that my questions above are non-blocking. I think it's fine to ship this as is, just wondering if there's anything we should do in a follow up issue/PR. |
srcFiles: [...includedPaths, mainFile], | ||
includedFiles: filterExcludedPaths(includedFilePaths, excludedPaths), | ||
srcFiles: [...srcFiles, ...includedPaths, mainFile], | ||
includedFiles: includedPaths, |
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.
I just made some minor adjustments to every bundler, so that we do not iterate over includedFilePaths twice.
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.
Nice! That also makes things a bit clearer, IMO.
Yeah it had me confused as well. There is also |
Do you mind creating an issue so that is captured somewhere? |
Created #1099 |
…etlify/zip-it-and-ship-it#1098) * feat: include resolved included_files in response of `zipFunction` * fix: do not iterate multiple times over includedFiles
Summary
Refs netlify/cli#4454
cli counterpart: netlify/cli#4619
Return the resolved paths of
included_files
from the config. This will allow the cli to watch these files and rebuild the function on demand.A picture of a cute animal (not mandatory, but encouraged)