(path: string)
| 134 | }; |
| 135 | |
| 136 | const updateInternalPackageDependencies = async (path: string) => { |
| 137 | const pkgJsonFile = await readFile(path, "utf8"); |
| 138 | const pkgJson = JSON.parse(pkgJsonFile); |
| 139 | |
| 140 | if (pkgJson.dependencies) { |
| 141 | const entries = Object.entries(pkgJson.dependencies); |
| 142 | |
| 143 | for (const [dep, version] of entries) { |
| 144 | if (version === "workspace:*") { |
| 145 | pkgJson.dependencies[dep] = "*"; |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | if (pkgJson.devDependencies) { |
| 151 | const entries = Object.entries(pkgJson.devDependencies); |
| 152 | |
| 153 | for (const [dep, version] of entries) { |
| 154 | if (version === "workspace:*") { |
| 155 | pkgJson.devDependencies[dep] = "*"; |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | const newPkgJson = JSON.stringify(pkgJson, null, 2); |
| 161 | |
| 162 | await writeFile(path, `${newPkgJson}\n`); |
| 163 | }; |
| 164 | |
| 165 | const updateInternalDependencies = async (projectDir: string) => { |
| 166 | const rootPackageJsonPath = join(projectDir, "package.json"); |
no outgoing calls
no test coverage detected