* Determine whether the given file URL is under a `node_modules` folder. * This function assumes that the input has already been verified to be a `file:` URL, * and is a file rather than a folder. * @param {URL} url * @returns {boolean}
(url)
| 136 | * @returns {boolean} |
| 137 | */ |
| 138 | function underNodeModules(url) { |
| 139 | if (url.protocol !== 'file:') { return false; } // We determine module types for other protocols based on MIME header |
| 140 | |
| 141 | return StringPrototypeIncludes(url.pathname, '/node_modules/'); |
| 142 | } |
| 143 | |
| 144 | let typelessPackageJsonFilesWarnedAbout; |
| 145 | function warnTypelessPackageJsonFile(pjsonPath, url) { |
no outgoing calls
no test coverage detected
searching dependent graphs…