(path, mod)
| 120 | } |
| 121 | |
| 122 | isPathAllowedForModule(path, mod) { |
| 123 | if (!super.isPathAllowed(path)) return false; |
| 124 | if (mod) { |
| 125 | if (mod.allowTransitive) return true; |
| 126 | if (path.startsWith(mod.path)) { |
| 127 | const rem = path.slice(mod.path.length); |
| 128 | if (!/(?:^|[\\\\/])node_modules(?:$|[\\\\/])/.test(rem)) return true; |
| 129 | } |
| 130 | } |
| 131 | return this.externals.some(regex => regex.test(path)); |
| 132 | } |
| 133 | |
| 134 | registerModule(mod, filename, path, parent, direct) { |
| 135 | const trustedParent = this.trustedMods.get(parent); |
no test coverage detected