(basePath = process.cwd())
| 118 | }, |
| 119 | |
| 120 | getPackageConfig<T extends Dictionary>(basePath = process.cwd()): T { |
| 121 | if (this.pathExists(`${basePath}/package.json`)) { |
| 122 | try { |
| 123 | const path = this.normalizePath(import.meta.resolve(`${basePath}/package.json`)); |
| 124 | return this.readJSONSync(path); |
| 125 | } catch (e) { |
| 126 | /* v8 ignore next */ |
| 127 | return {} as T; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | const parentFolder = realpathSync(`${basePath}/..`); |
| 132 | |
| 133 | // we reached the root folder |
| 134 | if (basePath === parentFolder) { |
| 135 | return {} as T; |
| 136 | } |
| 137 | |
| 138 | return this.getPackageConfig(parentFolder); |
| 139 | }, |
| 140 | |
| 141 | getORMPackages(): Set<string> { |
| 142 | const pkg = this.getPackageConfig(); |
nothing calls this directly
no test coverage detected