From 0d47db43d77d8a5bf2a8c18b47b22a31305d1639 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Sat, 8 Jan 2022 00:19:11 -0500 Subject: [PATCH] exclude inner node modules 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. --- packages/compat/src/build-compat-addon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compat/src/build-compat-addon.ts b/packages/compat/src/build-compat-addon.ts index 0a623935e..df9f2caa0 100644 --- a/packages/compat/src/build-compat-addon.ts +++ b/packages/compat/src/build-compat-addon.ts @@ -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'], }); }