Skip to content

Commit

Permalink
exclude inner node modules
Browse files Browse the repository at this point in the history
When we encounter a v2 addon that has v1 addon as dependencies, we need to move it even tough it doesn't need to be rewritten. Our code for doing that excludes node_modules, but we should also exclude inner nested node_modules.

This comes up when testing a v2 addon that nests its test-app inside itself using symlinked node_modules. Without this you encounter a symlink cycle that's hard to diagnose and only strikes on some OS / disk combinations.
  • Loading branch information
ef4 committed Jan 8, 2022
1 parent 85e6743 commit 0d47db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compat/src/build-compat-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ function buildCompatAddon(originalPackage: Package, v1Cache: V1InstanceCache): N
function withoutNodeModules(originalPackage: Package): Node {
let Klass = originalPackage.mayRebuild ? WatchedDir : UnwatchedDir;
return buildFunnel(new Klass(originalPackage.root), {
exclude: ['node_modules'],
exclude: ['node_modules', '*/node_modules'],
});
}

0 comments on commit 0d47db4

Please sign in to comment.