-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
@@ -70,6 +82,7 @@ const traceFilesAndTranspile = async function ({ | |||
const { fileList: dependencyPaths } = await nodeFileTrace([mainFile], { | |||
base: basePath, | |||
cache, | |||
ignore: ignoreFunction, |
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.
Just stumbled across this a millennia later. I see we're passing a custom ignoreFunction
here that ends up doing glob matching. NFT docs say that you can pass an array of globs here, instead: https://github.com/vercel/nft/blob/314fd539335002273e77ba20d9832042af2a0bab/readme.md?plain=1#L166
What was the reasons against doing that? Is there a perf improvement / optimisation we could get from using an array here?
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.
No idea, to be honest. Maybe it had to do with cross-OS path normalisation (since I see unixify
in there)? Or maybe the array option wasn't available at the time (or I simply didn't realise it was)?
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.
It was available at the time - introduced in a commit named "first commit" :D vercel/nft@31d836e
I'll try replacing this function with an array in a different PR. If that doesn't break our tests (i'll check if we have one) then let's use the array instead.
* feat: add aws-sdk to NFT ignore * feat: add traceWithNft flag * fix: make path Windows-friendly * fix: make ignore function compatible with Windows paths * refactor: adjust ignore glob
- Summary
Adds a
traceWithNft
feature flag which, when active, will trace dependencies with NFT by default.It also adds
aws-sdk
to NFT'signore
property, in line with what we're doing for ZISI and esbuild.- Test plan
Adjusted existing tests.
- A picture of a cute animal (not mandatory but encouraged)